STM32-based intelligent logistics sorting system and control method thereof

By using an STM32-based intelligent logistics sorting system that combines infrared sensors, ultrasonic sensors, and QR code recognition modules, low-cost and high-efficiency logistics sorting is achieved, solving the problems of low efficiency and high cost in small and medium-sized scenarios and providing a highly reliable and flexible material sorting solution.

CN121244543APending Publication Date: 2026-01-02KUNMING UNIV OF SCI & TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511728805.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-11-24
Publication Date
2026-01-02

AI Technical Summary

Technical Problem

Existing logistics sorting systems suffer from low efficiency, high cost, and insufficient flexibility in small and medium-sized scenarios, making it difficult to meet the demand for high timeliness.

Method used

An intelligent logistics sorting system based on STM32 is adopted, including a main control module, a tracking module, an obstacle avoidance module, a QR code recognition module, and a robotic arm module. It utilizes a TCRT5000 infrared sensor, an HC-SR04 ultrasonic sensor, an MJ-3000 QR code recognition module, and a TB6612 motor driver to achieve precise tracking, obstacle avoidance, and material gripping.

Benefits of technology

It achieves low-cost, high-reliability, and high-efficiency logistics sorting with an error of less than 2mm, adapts to complex scenarios, supports multi-angle grasping and dynamic information updates, and meets the needs of all-weather operation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121244543A_ABST
    Figure CN121244543A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of automatic sorting, in particular to an STM32-based intelligent logistics sorting system which comprises a main control module, a tracking module, an obstacle avoidance module, a two-dimensional code recognition module, a mechanical arm module and a power module which are mounted on a mobile carrier. Low-cost sensors such as STM32F429 + TCRT5000 / HC-SR04 are adopted, the total cost of the system is smaller than or equal to 2000 yuan, the tracking and obstacle avoidance error is smaller than or equal to 2 mm, and the system adapts to complex scenes, mechanical arm six-degree-of-freedom configuration and PWM precise control, supports multi-angle grabbing and adapts to materials of different sizes; the two-dimensional code recognition module supports dynamic information updating and flexibly adjusts a sorting strategy, the TB6612 driving efficiency is high, the STM32 low-power-consumption mode is adopted, and the all-weather operation requirement is met.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the field of automated sorting technology, in particular to an intelligent logistics sorting system based on STM32 and a control method thereof. BACKGROUND

[0002] With the rapid development of e-commerce and intelligent manufacturing, the logistics industry is facing challenges such as an explosive increase in order volume, rising labor costs, and increasing sorting efficiency requirements. The traditional manual sorting mode has problems such as low efficiency (about 800-1200 pieces / hour), high error rate (3%-5%), and high labor intensity, which cannot meet the high timeliness requirements of modern logistics. Although existing automated sorting equipment has high efficiency (such as a large AGV cluster which can reach 20000 pieces / hour), it has defects such as large floor area, high investment cost (several million yuan), and insufficient flexibility, which limits its popularization in small and medium-sized logistics scenarios. Therefore, there is a need for an intelligent logistics sorting system and control method that is low-cost, high-reliability, high-functionality, and scalable. SUMMARY

[0003] The present application relates to the field of automated sorting technology, in particular to an intelligent logistics sorting system based on STM32 and a control method thereof.

[0004] To achieve the above-mentioned purpose, an intelligent logistics sorting system based on STM32 includes a main control module, a tracking module, an obstacle avoidance module, a two-dimensional code recognition module, a mechanical arm module, and a power module installed on a mobile carrier. The main control module is used to coordinate the work of each component. The tracking module includes two infrared sensors and a four-way motor drive module. The infrared sensors are installed on both sides of the vehicle head, detect the ground black mark, and output signals to the main control module. The four-way motor drive module drives four DC speed reduction motors to control the movement of the mobile carrier. The obstacle avoidance module includes an ultrasonic sensor installed in front of the vehicle head. The ultrasonic sensor calculates the distance of the obstacle by emitting and receiving ultrasonic waves and feeds back to the main control module. The two-dimensional code recognition module is used to collect material two-dimensional code information. The mechanical arm module includes a six-degree-of-freedom mechanical arm and six servos. The servos are controlled by the main control through PWM signals to realize material grabbing and placing. The power module is used to power each module.

[0005] Preferably, the tracking module generates path state data by detecting ground marker signals and transmits the data to the main control module in real time. The master module judges whether the trolley deviates from the preset path according to the path state data, and generates a steering instruction to the driving module if deviating, so as to adjust the driving direction of the trolley to maintain tracking.

[0006] Preferably, the obstacle avoidance module calculates the relative distance between the obstacle and the trolley by emitting a detection signal and receiving a reflected signal, and feeds the distance data to the master module. The master module judges whether there is a collision risk according to the distance data, and generates a stop instruction to the driving module if the risk exists, to control the trolley to be stationary.

[0007] Preferably, the two-dimensional code recognition module scans the identification information on the material to obtain target sorting position data, and transmits the data to the master module through the communication interface. The master module stores the target position data, and plans the driving path of the trolley and the grabbing or placing strategy of the mechanical arm based on the data.

[0008] Preferably, the multiple servos of the mechanical arm module work cooperatively through the PWM signals generated by the master module: the first group of servos control the overall lifting and horizontal rotation of the mechanical arm, the second group of servos adjust the angle and posture of the mechanical claw, and the third group of servos control the opening and closing action of the mechanical claw, to realize accurate grabbing and stable placing of the material.

[0009] Preferably, the four-way motor driving module receives the instructions of the master module, and realizes accurate speed control and direction control by adjusting the signals output to the motor.

[0010] Preferably, the power module provides adaptive voltage for different modules through a voltage conversion circuit.

[0011] The application also provides a control method of an intelligent logistics sorting system based on STM32, comprising the following steps: S1: system initialization, detecting the state of sensors and actuators; S2: the two-dimensional code recognition module collects the target position information of the material and transmits it to the master module; S3: the master module controls the mechanical arm module to grab the material; S4: the master module plans the path according to the two-dimensional code information, and realizes tracking movement through the feedback of the infrared sensor; S5: the ultrasonic sensor detects the front obstacle in real time, and the trolley stops if the distance is ≤30cm, otherwise it continues to track; S6: after reaching the target position, the master module controls the mechanical arm module to place the material and reset.

[0012] Preferred: in the step S4, the tracking logic is: if only the right infrared sensor detects the black line, the trolley turns left, if both sides detect the black line, the trolley straightens, and when the target position is reached, both sides of the sensor continuously detect the black line, and the trolley stops.

[0013] Preferred: in the step S5, the obstacle avoidance threshold is 30cm, if the obstacle distance is ≤30cm, the main control sends a command to the TB6612 motor drive, and the motor stops.

[0014] Compared with the prior art, the beneficial effects of the present application are: 1. Low-cost sensors such as STM32F429+TCRT5000 / HC-SR04 are used, the total cost of the system is ≤2000 yuan, the tracking and obstacle avoidance error is ≤2mm, and it is suitable for complex scenes; 2. Six degrees of freedom configuration of the mechanical arm and PWM precise control support multi-angle grabbing and adapt to different sizes of materials; the two-dimensional code recognition module supports dynamic information updating and flexible adjustment of sorting strategy; 3. TB6612 drive has high efficiency, and STM32 has low power consumption mode, which meets the all-weather operation requirements. BRIEF DESCRIPTION OF DRAWINGS

[0015] Figure 1 is the working process schematic diagram of the present application; Figure 2 is the overall wiring schematic diagram of the present application; Figure 3 is the interactive logic schematic diagram of each module of the logistics sorting trolley of the present application; Figure 4 is the mechanical arm steering control schematic diagram of the present application; Figure 5 is the tracking module working process schematic diagram of the logistics sorting trolley of the present application; Figure 6 is the obstacle avoidance module working process schematic diagram of the logistics sorting trolley of the present application. DETAILED DESCRIPTION

[0016] The technical solutions in the embodiments of the present application will be described clearly and completely below with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative labor are within the scope of protection of the present application.

[0017] Please refer to Figures 1-6, Fig. is a preferred embodiment of the application, a kind of intelligent logistics sorting system based on STM32, including main control module, tracking module, obstacle avoidance module, two-dimensional code recognition module, mechanical arm module, drive module and power module, each module is communicated with main control module by bus, cooperates to complete material sorting task.

[0018] The specific structure of each module is as follows: The main control module: the main control board as the control center of design is the brain of the trolley, and the program burning and instruction issuing are all responsible by it, and the information collected by each module also needs to be processed and judged, so careful research needs to be carried out in selection.

[0019] Through the analysis of each type of control board, STM32F429 is finally selected as the main control board of this design. STM32F429 control board is an embedded development board based on high-performance ARM Cortex-M4 32-bit RISC core, with a working frequency of up to 180 Hz, a single-precision floating-point operation unit (FPU), support for DSP instructions and memory protection unit (MPU), which enhances the safety of application. It is widely used in various embedded applications that require high performance and rich peripheral interfaces. STM32F429ZGT6 microcontroller as the hub of the system, responsible for data processing, instruction issuing and module coordination.

[0020] In the application, the development board integrates ST-LINK / V2 emulator (SWD interface), QVGA TFT liquid crystal screen, 64Mbits SDRAM, and GPIO, PWM, UART, I2C interfaces. The built-in ST-LINK / V2 emulator is used to simplify program burning and real-time debugging such as sensor signal or motor control logic verification; The configured QVGA TFT liquid crystal screen can display the system state in real time, such as path deviation, obstacle distance, mechanical arm pose information, auxiliary debugging and function verification; 64Mbits SDRAM provides large capacity data cache, such as storing two-dimensional code analysis results and path planning parameters; sufficient GPIO, PWM, UART, I2C interfaces, directly connect tracking sensor (TCRT5000), obstacle avoidance module (HC-SR04), two-dimensional code recognition module (MJ-3000) and mechanical arm servo driver, reduce signal conversion circuit, reduce system complexity.

[0021] In actual application environment, there may be low temperature environment in logistics warehouse and Cainiao station, and the chip can work in the working environment of-40 to 85 degrees, which is better than the performance of most chips. It is also often used in medical equipment, unmanned aerial vehicle technology and high-end instruments, so it can fully meet the design requirements of the trolley of the subject.

[0022] Tracking module: composed of 2 TCRT5000 infrared sensors (active, emitting 850-950nm infrared light, receiving reflected signal) and TB6612 four-way motor drive module; TCRT5000 is installed on both sides of the vehicle head, detects the ground black tape (reflectivity 5%-10%), outputs TTL level signal to the main control; TB6612 drives 4 JGA25-370 DC speed reduction motors (with encoder, rated voltage 12V, speed 100RPM), controls the steering and speed of the trolley.

[0023] Obstacle avoidance module: HC-SR04 ultrasonic sensor (range 2cm-400cm, accuracy ±3mm) is installed in front of the vehicle head, receives a high level trigger of 10us or more through the TRIG pin, emits 40kHz ultrasonic waves, and the ECHO pin outputs a high level corresponding to the distance. The main control calculates the obstacle distance by the formula S=vt / 2 (v=340m / s).

[0024] Two-dimensional code recognition module: MJ-3000 embedded two-dimensional barcode scanning module (supports one-dimensional / two-dimensional bar code, decoding speed ≤50ms) is selected, which communicates with the main control through UART interface, and transmits the data (such as target sorting position) to the main control storage after scanning the two-dimensional code of the material.

[0025] The two-dimensional code recognition module gives the logistics sorting trolley the ability to recognize logistics information. It is not only a "calibrator" to eliminate positioning errors, but also a "traffic light" to deliver instructions and a "scanning gun" to identify targets. By digitizing physical location and object, two-dimensional code technology greatly improves the precision, automation, flexibility and traceability of logistics sorting trolley operation, and is one of the indispensable infrastructure in modern intelligent logistics system.

[0026] In the present application, we compare two schemes of GM65 two-dimensional code recognition module and MJ-3000 embedded two-dimensional code recognition module respectively.

[0027] Scheme one: MJ-3000 embedded two-dimensional code recognition module MJ-3000 is a small, modular, easy-to-use, powerful embedded two-dimensional scanner. MJ-3000 two-dimensional code scanning module can be widely used in various types and various products. Such as: ring type, chest strap type, Bluetooth palm type and other handheld devices. MJ-3000 two-dimensional code scanning module uses the most advanced image recognition algorithm and the widest camera, which can realize fast and efficient one-dimensional barcode and two-dimensional barcode scanning, and can complete any complex scanning task. MJ-3000 has excellent reading performance, can quickly and effectively realize scanning function in completely dark light, extremely harsh temperature and humidity environment, has excellent scalability, high degree of modularity, can be developed, and rich built-in API interface provides powerful, flexible and efficient development capability for complex applications, so that it can quickly adapt to various environments and meet various needs. MJ-3000 module has wide applicability and can adapt to various application environments. It covers data acquisition and object recognition technology. It is applied in automatic vending machines, payment and collection devices and other application scenarios.

[0028] Scheme two: GM65 two-dimensional code recognition module GM65 two-dimensional code recognition module is a high-efficiency designed device specially developed for fast analysis of various general one-dimensional barcodes (Barcode) and two-dimensional codes. The two-dimensional code recognition module of GM65 is built on the basis of advanced image intelligent recognition algorithm. Its efficient and accurate barcode decoding technology significantly improves the recognition efficiency and significantly reduces the development complexity of barcode recognition products, realizing easy and accurate recognition task. GM65 has high compatibility and can be easily integrated into many devices that rely on one-dimensional code or two-dimensional code scanning function. Such as automatic vending machines, automatic gates related to subway stations and various payment and collection devices.

[0029] These two two-dimensional code recognition modules have their own characteristics and advantages. The recognition ability of MJ-3000 embedded two-dimensional code recognition module is strong, and it can perform recognition function in various harsh environments, so it can fully meet the design of the scanning module.

[0030] Mechanical arm module: six degrees of freedom mechanical arm, equipped with 6 MG996R digital servo (working voltage 7.2V, torque 13KG / cm, control precision ±0.5°), the servo is driven by the TIM3 / TIM4 timer channel of STM32 through PWM signal (duty ratio corresponds to 0°-180°, range 500-2500μs), realizing the lifting, rotation and claw opening and closing of the mechanical arm (No. 0-3 servo controls lifting / rotation, No. 4 controls claw rotation, No. 5 controls claw opening and closing).

[0031] Drive module: including TB6612 motor drive (control car movement) and steering drive circuit (PWM signal generated by STM32 timer), commonly used TB6612 chip can drive two DC motors at the same time, each motor can independently control its speed and direction of rotation. It also has high efficiency and low heat, using MOSFET as power switching device, with low on-resistance, which brings significantly higher efficiency than L298N and other old driving chips, which means lower power consumption and heat, usually no large heat sink is needed, even completely without heat sink in small current application. Each motor channel has an independent PWM input pin, which can realize stepless speed regulation of the motor by inputting PWM signals with different duty cycles. Not only is the speed control easy to implement, but the control logic is also simple, each motor channel only needs two control pins (AIN1 / AIN2, control motor A, BIN1 / BIN2 control motor B) and a PWM pin (PWMA / PWMB).

[0032] In the present application, we compare two schemes of TB6612FNG drive module and L298N drive module respectively.

[0033] Scheme one: TB6612FNG drive module TB6612FNG is a DC motor driver produced by Toshiba Semiconductor Company, which has a large current MOSFET-H bridge structure, double-channel circuit output, high integration, and can provide sufficient output capacity, and has advantages in running performance and energy consumption. Therefore, in the integrated and miniaturized motor control system, it can be used as an ideal motor driving device.

[0034] Scheme two: L298N drive module L298N is a high-voltage motor driver that can drive DC motors and stepper motors. A piece of driving chip can control two DC motors to do different actions at the same time, and can provide 2 amperes of current in the voltage range of 6V to 46V, and has overheat self-disconnection and feedback detection function. L298N can directly control the motor, set its control level through the I / O input of the master control chip, and can drive the motor to rotate forward and reverse, which is simple to operate and stable, and can meet the large current driving conditions of DC motor.

[0035] The present application adopts TB6612FNG as the core drive, compared with the common drive such as L298N, the advantages of TB6612FNG are obvious, high efficiency and small size, convenient to install and use, the main advantage of L298N is that the price is extremely low and the voltage is slightly higher, which is a low-cost expansion scheme.

[0036] The application does not take the conventional drive board, considering the actual wiring and the matching condition with the development board, two pieces of TB6612 integrated 4-way drive module can be directly connected with four motors, greatly reducing the workload and error rate, and the control truth table is shown in the following table. The protection measures of this drive are realized by the built-in protection circuit, mainly including overheat shutdown protection, when the temperature of the chip exceeds the safety threshold, the output protection chip is automatically closed; the second kind is under-voltage lock, when the logic power voltage (VCC) is too low, the chip automatically closes the output to prevent the motor from losing control caused by logic error; the third kind needs to detect overcurrent, although there is no explicit overcurrent shutdown (OCP), but the chip has a detection circuit inside, generally needs external cooperation to realize accurate overcurrent protection, and the design can withstand certain overload.

[0037] In the application, TB6612FNG is used as the core drive, is responsible for the motor control of the tracking module driving wheel, meets the high efficiency, precision and stable movement demand, and is almost superior to L298N for most modern small robots, intelligent vehicles and maker projects, especially in the aspects of efficiency, heat, volume and 3.3V system compatibility.

[0038] The power module adopts 12V lithium battery power supply, is reduced to 5V through LM2596 to supply power for the sensor, the two-dimensional code module and the STM32, and supplies power for the steering engine through AMS1117-7.2V.

[0039] The overall control system of the application is composed of an infrared sensor, an ultrasonic sensor, a steering engine driving module, a motor driving module, a two-dimensional code recognition module, a mechanical arm module and an STM32 development board.

[0040] The core controller of the whole system adopts an STM32 single-chip microcomputer, in order to realize the functional integrity of the control board, the application adopts welding line connection and uses an expansion board to increase I / O pin connection, ensures that various information can be efficiently processed, so that the modules involved in the trolley can work cooperatively, the trolley is designed to use multiple sensors, mainly uses ultrasonic sensors and infrared sensors, through the embedded two-dimensional code recognition module, logistics information can be scanned, then the data is transmitted into the STM32 control board, the control board can make the trolley and the mechanical arm produce corresponding actions through the received two-dimensional code information.

[0041] The ultrasonic obstacle avoidance module is used to detect whether there is an obstacle in front during operation, and the actual purpose is to avoid the collision between the trolley and the pickup person during the distribution of express delivery, when the obstacle appears in front of the vehicle head and is within the minimum distance, the trolley stops advancing until the obstacle is removed, and the trolley continues to travel according to the predetermined route.

[0042] The head-mounted infrared sensor transmits the recognized route information to the STM32 control board for information interaction, and the control board adjusts the state of the trolley after correctly recognizing the information, and judges whether the trolley should turn right, turn left or go straight.

[0043] The actuators are servos and motors, and the mechanical arm is composed of six servos, the first four servos from bottom to top control the lifting and rotation of the mechanical arm, the fifth servo controls the free rotation of the mechanical claw, and the last servo controls the gripping and releasing of the claw, the STM32 outputs high and low levels through different serial ports to control the rotation direction of the motor, so that the motor can produce forward rotation and reverse rotation, and the trolley can produce forward and backward movements; different analog value signals are output through the PWM serial port to output different voltages, so as to control the output speed of the motor, so that the trolley can realize left and right turning movements according to the differential principle of the left and right wheels.

[0044] The intelligent logistics sorting control method of the application is that after the main control module is powered on, each peripheral device is initialized, the sensor and actuator states are detected, and after no error is confirmed, the standby mode is entered. When sorting, the materials are placed in the sorting starting position manually or automatically, the MJ-3000 two-dimensional code scanning module scans the material two-dimensional code, and the information (such as coordinates and shelf number) containing the target sorting position is transmitted to the main control through UART, the main control stores and analyzes the information, the main control controls the servo movement through the PWM signal according to the preset initial pose of the mechanical arm, the No. 0-3 servos drive the mechanical arm to move to the top of the material, the No. 5 servo controls the closure of the claw part, the No. 4 servo adjusts the angle of the claw part to ensure the stability of the material. The main control calculates the target path according to the two-dimensional code information, controls the TB6612 drive motor, realizes tracking through the feedback of the infrared sensor, if only the right infrared sensor detects the black line, the trolley turns left until both sides of the sensor detect the black line; if both sides detect the black line, the trolley goes straight, when reaching the target position, both sides of the sensor continuously detect the black line, and the trolley stops. During the movement, the HC-SR04 ultrasonic sensor detects the obstacles within 30 cm in front in real time, if the distance is ≤30 cm, the main control sends instructions to the TB6612, and the motor stops rotating, and the trolley is stationary; if the distance is > 30 cm, the tracking is restored, and the trolley continues to move forward. After the trolley reaches the target position, the main control adjusts the angle of the claw part of the No. 4 servo to align with the shelf, the No. 5 servo controls the opening of the claw part to release the material, and the mechanical arm is reset to the initial position to wait for the next round of tasks.

[0045] The above content is a further detailed description of the application in combination with the specific embodiments, and cannot be regarded as the limitation of the specific embodiments of the application. For ordinary skilled persons in the technical field to which the application belongs, without departing from the concept of the application, a number of simple deductions or replacements can be made, which should be regarded as belonging to the protection scope determined by the claims of the application.

Claims

1. An STM32-based intelligent logistics sorting system, characterized in that, The application relates to a sorting robot, which comprises a main control module, a tracking module, an obstacle avoidance module, a two-dimensional code recognition module, a mechanical arm module and a power module. The main control module is used for coordinating the work of various components. The tracking module comprises two infrared sensors and a four-way motor driving module, the infrared sensors are installed on both sides of the vehicle head, detect ground black marks and output signals to the main control module, and the four-way motor driving module drives four direct-current speed reduction motors to control the movement of the mobile carrier. The obstacle avoidance module comprises an ultrasonic sensor, the ultrasonic sensor is installed at the front of the vehicle head, calculates the distance of obstacles by emitting and receiving ultrasonic waves and feeds back to the main control module. The two-dimensional code recognition module is used for collecting material two-dimensional code information. The mechanical arm module comprises a six-degree-of-freedom mechanical arm and six servos, the servos are controlled by the main control through PWM signals, and material grabbing and placing are realized. The power module is used for supplying power to various modules.

2. The intelligent logistics sorting system based on STM32 according to claim 1, characterized in that: The tracking module generates path state data by detecting ground mark signals and transmits the data to the main control module in real time. The main control module judges whether the vehicle deviates from the preset path according to the path state data, generates a steering instruction to the driving module if the vehicle deviates from the preset path, adjusts the driving direction of the vehicle to maintain tracking.

3. The intelligent logistics sorting system based on STM32 according to claim 1, characterized in that: The obstacle avoidance module calculates the relative distance between the obstacle and the vehicle by emitting a detection signal and receiving a reflection signal, and feeds back the distance data to the main control module. The main control module judges whether there is a collision risk according to the distance data, and generates a stop instruction to the driving module if the risk exists to control the vehicle to be stationary.

4. The intelligent logistics sorting system based on STM32 according to claim 1, characterized in that: The two-dimensional code recognition module scans the identification information on the material, analyzes the target sorting position data, and transmits the data to the main control module through a communication interface. The main control module stores the target position data and plans the driving path of the vehicle and the grabbing or placing strategy of the mechanical arm based on the data.

5. The intelligent logistics sorting system based on STM32 according to claim 1, characterized in that: The multiple servos of the mechanical arm module work cooperatively through the PWM signals generated by the main control module: the first group of servos control the overall lifting and horizontal rotation of the mechanical arm, the second group of servos adjust the angle and posture of the mechanical claw, and the third group of servos control the opening and closing actions of the mechanical claw, so that the material can be accurately grabbed and stably placed.

6. The intelligent logistics sorting system based on STM32 according to claim 1, characterized in that: After receiving the instruction of the main control module, the four-way motor driving module adjusts the signal output to the motor to realize accurate speed control and direction control.

7. The intelligent logistics sorting system based on STM32 according to claim 1, characterized in that: The power module provides adaptive voltage for different modules through a voltage conversion circuit.

8. A control method applied to the STM32-based intelligent logistics sorting system according to any one of claims 1-7, characterized in that, The application further discloses a sorting method of the sorting robot. S1: system initialization, detecting the state of sensors and actuators; S2: the two-dimensional code recognition module collects the target position information of the material and transmits the information to the main control module; S3: the main control module controls the mechanical arm module to grab the material; S4: the main control module plans a path according to the two-dimensional code information and realizes tracking movement through the feedback of the infrared sensor; S5: the ultrasonic sensor detects the front obstacle in real time, and the vehicle stops if the distance is less than or equal to 30 cm, otherwise, the vehicle continues tracking; S6: after reaching the target position, the main control module controls the mechanical arm module to place the material and reset.

9. The control method of the intelligent logistics sorting system based on STM32 according to claim 8, characterized in that: In the step S4, the tracking logic is: if only the right infrared sensor detects the black line, the car turns left, if both sides detect the black line, the car drives straight, and when the car reaches the target position, both sides of the sensor continue to detect the black line, and the car stops.

10. The control method of the intelligent logistics sorting system based on STM32 according to claim 8, characterized in that: In the step S5, the obstacle avoidance threshold is 30 cm, if the distance of the obstacle ≤ 30 cm, the main control sends a command to the TB6612 motor drive, and the motor stops.