Academic Journal of Science and Technology ISSN: 2771-3032 | Vol. 3, No. 2, 2022 153 Intelligent Courier Car Design Based on 32 Microcontroller Chenyu Zan, Zi Li Shenyang Institute of Technology, Fushun 113122, China Abstract: With the emergence of e-commerce, the logistics industry has grown, and the manual transport and sorting of express delivery has gradually revealed its drawbacks. This system is mainly applied to the machine sorting work in the courier transfer station, which can realize the identification and positioning of the courier pieces through the vision module, sorting through the mechanical arm, transporting through the trolley, and finally putting into the corresponding area to improve the speed and accuracy of courier sorting. The robot is designed to improve the speed and accuracy of courier sorting. The design of courier sorting robot can greatly improve the development of automation industry, solve the problem of labor shortage and high labor cost, and achieve the purpose of social and technological progress. Keywords: Courier, Sorting, Courier Truck. 1. Introduction With the rapid development of China's economy, the e- commerce industry is growing rapidly, and with it comes the need to sort and deliver large volumes of express shipments. Traditional manual sorting is inefficient and can no longer meet the requirements. In some large storage centers, although automated sorting of express pieces has been achieved, the complete sorting system is bulky and expensive. Large sorting systems are not applicable in small and medium-sized sorting stations. In small and medium-sized express transit stations, manual sorting is still required, and the huge volume of express delivery puts workers in heavy labor. So we designed a 32 MCU based intelligent courier sorting car, our car can sort the courier, such as identifying the specified courier in multiple couriers to the specified location, and return the same way, and then the next sorting, and multiple carts for wfi interconnection, multiple carts working at the same time will not collide with each other, and the sorting robot will take the initiative to avoid other robots, in the case of obstacles, the carts will avoid and then work, or the carts will move the obstacles through the robot arm and then work, and we have made a prototype machine, running well. 2. System Design 2.1. General system design The system framework structure consists of 32 microcontroller, infrared module, ultrasonic distance measurement module, IOT communication module, gray sensor module, vision module, robot arm, cart body and other structures. stm32F103C8T6 is responsible for the normal operation of the control system. The workflow of the system is shown in Figure 1. Firstly, after the vision module identifies the corresponding courier, the robot arm makes a grab, secondly, the trolley walks according to the corresponding route, at this time, the ultrasonic and infrared modules work continuously to measure the distance of the front lot, if the infrared module detects an obstacle, the data is transmitted to the microcontroller, the 32 microcontroller issues a command to the trolley to make a turn to avoid obstacles, at the same time, the trolley issues an alarm to notify the administrator to clean up, finally, when the trolley reaches the destination, the receiver arm moves to put the object and complete the sorting, after which it returns to the original route for the next work. Figure 1. System workflow 154 2.2. System operation principle 2.2.1. Microcontroller operation principle This system uses STM32 microcontroller, which has a powerful system structure, easy to use, modularization and strong processing functions, fast, low voltage, low power consumption, easy to produce portable products, strong control functions and other significant features, so it is often used in the control of a system The core component of a system. After receiving the circuit stimulation signals from each module, the microcontroller controls the robot arm and the body, and controls the system according to the originally written program. 2.2.2. Vision module works In order to ensure the accuracy of information transmission, the transmission protocol needs to be agreed. According to the actual situation, it is agreed that each transmission of five 8 bit binary numbers, the first two bits are 0xAA, that is, the decimal number 170. the third and fourth bits are valid information data. The fifth bit is 0x55, that is, the decimal number 85 to be effective, so that the accuracy of transmission can be greatly improved. After the intelligent courier vehicle arrives at the recognition area, the microcontroller sends the start recognition command and the machine vision module starts the contour recognition. If there is an express piece, the vision module sends an express piece command to the microcontroller. After the microcontroller receives it, the machine vision module starts to scan the code and sends the center coordinates, path information, as well as the category and number of express pieces to the microcontroller. 2.2.3. Grayscale sensor working principle By installing black marking lines on the ground of small and medium-sized courier sites as markers, and by using 5 groups of photoelectric sensors for trajectory recognition, different markers are used to determine courier scanning recognition points, parking points, and trajectories. The intelligent courier sorting robot is driven by four-wheel independent drive, and turns and turns around by differential speed control. The Arduino mega2560 is used as the core controller to control five infrared sensors, which detect five positions: left front, left center, center, right center, and right front, and control the four-wheel independent motors by the position signals returned from the grayscale sensors. 2.2.4. Working principle of the robot arm Six-degree-of-freedom robotic arm This type of robotic arm is more common in industrial applications, commonly used in handling, assembly, welding, painting and other work. It consists of a servo and a claw, and uses a master-slave control method, with an STM32 microcontroller system as the control core, while connecting a camera and an infrared sensor, and accessing WiFi to connect to a third platform to form an integrated vision system and control system. The maximum control can be achieved by the following two aspects while improving the response speed of the rudder: on the one hand, the control mode of the machinery is changed, and the output torque margin of the control signal to the rudder is used to increase the angular speed and duty cycle of the rudder to speed up the response speed of the rudder; on the other hand, the control of the control frequency signal of the rudder and the increase of the duty cycle frequency of the PWM waveform are mainly used to improve the response speed. The schematic diagram of the Arduino mega2560 mechanism that controls the robot arm is shown in Figure 2. Arduino Mega 2560 vcc GND PWM output electric machinery A electric machinery B electric machinery C electric machinery D electric machinery E electric machinery F chassis rotation boom swing jib swing paw swing paw rotation claw opening and closing 5V regulated DC power supply Figure 2. Hardware connection diagram of mechanical arm control system 3. Testing of Intelligent Delivery Vehicles This intelligent courier vehicle is mainly for small parcels with length not exceeding 50 cm, width not exceeding 40 cm, thickness below 6 cm, and weight below 5 kg, with the function of scanning, grabbing, sorting and distributing "four in one". The sorter only needs to put the express mail into the identification area, and the robot can independently complete the scanning code to identify the information on the express manifest, and each code reading time can be controlled within 1 second, with an accuracy rate higher than 99%. After recognizing the information, the robot can determine the picking and delivery location and automatically plan the optimal route for delivery, running at a speed of up to 2 meters per second. After reaching the designated position next to the unloading port, the robot arm moves to put the express to the unloading port, which is docked to the inclined track, and the express enters the parcel staging area through the chute, which also greatly reduces the accidental damage caused by the parcel in manual sorting. In addition to the basic sorting function, this intelligent courier vehicle system can customize the low battery value and the working state battery value, charge at the charging area when the battery is low, and return to work after reaching the working battery value, with each charging time less than 1.5 hours, and can work continuously for 5 hours; and it has multi-level safety protection such as ultrasonic obstacle 155 avoidance detection and emergency stop button to realize safe and reliable motion control. As shown in Figure 3, the physical diagram of our designed intelligent courier vehicle. Figure 3. Intelligent express vehicle 4. The Market Application Prospects of Intelligent Delivery Vehicles This intelligent sorting system makes express sorting more efficient, high-speed and accurate, saving manpower, reducing costs and having a low error rate. With the introduction of the intelligent sorting robots, each courier truck can handle up to 300 packages per hour, which is expected to reduce the number of daily warehouse operators by more than 80 when fully put into operation, and the actual number of robots operating on site can be flexibly selected depending on the daily order volume. The use of intelligent sorting robots can save at least half of the labor costs compared to the previous all-manual sorting. "Previously, manual picking was error-prone, with delays of at least 2 days if the picking was wrong, but the error rate of the intelligent robots is almost zero, and it also reduces the difficulty of building packages." According to our market research, last year, Shentong Express has activated sorting robots in Yiwu and Tianjin, and Linyi is the third one. A number of courier companies have indicated that they will introduce this series of robots for national promotion, and 2 million intelligent sorting robots will be put into use in the next market, which will further liberate the labor force. 5. Conclusion Based on the analysis of current domestic and foreign courier sorting robots, an intelligent courier vehicle control system was designed. According to the actual application requirements, machine vision technology was applied to Shaanxi delivery sorting, and the hardware circuit and software program were designed. The prototype courier sorting robot met the expected design requirements and was able to automatically sort the courier pieces placed on the ground and successfully completed courier sorting, verifying the rationality of the control system design. The system is designed to combine with the existing logistics automation industry to improve the efficiency of courier sorting in logistics and transportation. With the development of technology, social work is becoming more and more intelligent and mechanized, and the design of robots has an important role in the logistics sorting industry. This enables intelligent sorting and handling by reducing costs. The courier sorting robot has the advantage of being efficient, accurate and able to operate for long periods of time compared to manual sorting, which has a large number of shortcomings that limit the progress of most industrial production References [1] Gu Pengfei, Yu Pengcheng, Zhang Jinsheng. STM32-Based Intelligent Logistics Sorting Robot Design. Computer Knowledge and Technology. Vol. 19 (2020) No. 16,p168- 169+171 . [2] He Liang, Zhao Yanni. Intelligent Robot Sorting System for Courier Logistics Application. Electronic Technology and Software Engineering . Vol. 15 (2019) No. 15, p65-66. [3] Wan Hang. Discussion and Innovation Analysis of Intelligent Sorting Robot Value Based on Internet of Things technology. Science and Technology Perspective . Vol. 07 (2022) No. 07, p29-32 . [4] Meng Deqiang, Liu Liang. Design and Implementation of Intelligent Courier Vehicle Obstacle Avoidance Path Planning System. Automotive Practical Technology .Vol. 09 (2020) No. 09, p58-60 . [5] Ren Fang. Intelligent Express Vehicle Technology Development and Trend from Jingdong Logistics Practice. Logistics Technology and Applications. Vol. 26 (2021) No. 03, p126-128.