Abstract:To improve the level of industrial automation in today’s society, a sorting handing robot was designed based on STM32F407.To identify the five colors, TCS3200 color recognition sensor was used. Cargo handing functions was achieved through servocontrolled mechanical claw. In order to carry cargos to exact destination, photo electric detection tracing method was used to identify the path. This paper using the output of encoder as feedback, and classic PID algorithms to improve the stability of the robot speed. nRF24L01 wireless communication black was used to achieve the realtime connecting to PC and the realtime operation state of the robot was obtained. The experiments prove that the control system can be stable operation, robot handling of goods according to a predetermined trajectory.