Abstract: The role of sorting in modern logistics is particularly important. In order to ensure the accuracy of sorting, a logistics re-inspection system design based on ARM-LINUX is proposed. The system adopts a master-slave architecture of the main control node and the terminal node. The terminal node and the main control node are interconnected through the CAN bus. The purpose of processing and comparing the barcode database information is achieved by using the ARM-LINUX structure on the terminal node and receiving the barcode data on the terminal node. Practical application shows that the re-inspection system can ensure the accurate and efficient operation of the sorting mechanism, and the design requirements are met during the test.
With the rapid development of e-commerce, the importance of logistics has become increasingly prominent, and the sorting link is very critical in the logistics system. Therefore, it is necessary to effectively ensure the accurate and efficient operation of the sorting mechanism. At present, the identification method of sorting mainly relies on barcode recognition, which captures barcode information through photoelectric switches triggering barcode scanning equipment, and then the photoelectric switch signal and delay control sorting machine complete the final sorting. However, due to the sensitivity of the photoelectric switch, the location of the goods, and the quality of the barcode pasting, the logistics cost will increase and the logistics efficiency will decrease, causing serious losses to the company.
It can be seen that improving the accuracy of logistics sorting has become particularly important. In order to solve the sorting errors in the sorting system and improve the efficiency of logistics, a logistics re-inspection system design based on ARM-LINUX is proposed on the basis of demand analysis. The re-inspection system can improve the accuracy of logistics sorting and solve the sorting errors of the system.
1 Overall Design
The re-inspection system places terminal nodes at each outlet of the sorting system, communicates with the master node through the CAN bus, and can access the remote database server through the Ethernet master node. Figure 1 shows the architecture of the entire re-inspection system. The terminal node uses the STM32F103RBT6 processor based on the Cortex-M3 core architecture, transplants RT-Thread as the software platform, obtains the one-dimensional barcode read by the laser scanner through the RS232 interface, and then reports the barcode to the master node through the interface, using different CAN data packet ID numbers to identify different offline numbers. After the master obtains the barcode information reported by the terminal node corresponding to different offline ports through the CAN bus, it queries the database server in the local area network through Ethernet and marks the queried item as queried. After querying the database, the master node needs to refresh the display of the graphical interface according to the results, send out an alarm signal, and notify the control system of the sorting system that the sorting error is realized to achieve linkage.
The master control node also returns the query results to the corresponding terminal node, which controls the conveying device at the offline port and performs corresponding actions, such as the operation and stop of the telescopic belt conveyor.
2 Design of terminal nodes
2.1 Hardware Design of Terminal Nodes
The terminal node is installed at the end of the sorting system, and multiple nodes can be configured according to the actual number of offline ports. The terminal node is mainly responsible for collecting the barcode information of the goods after the previous sorting, and then uploading it to the main control node through the CAN bus. The system structure block diagram is shown in Figure 2, which shows the main hardware modules of the terminal node. The STM32 processor is responsible for controlling each module. For the STM32F103RBT6 used in the terminal interface, in order to make it work properly, it should at least have a power supply circuit, a reset circuit, a clock circuit, a power supply filter circuit, a JTAG program debugging and downloading circuit, and a startup mode selection circuit. The STM32 requires a 3.3 V power supply, while the barcode scanner and the CAN physical layer driver require a 5 V power supply. The task of the power supply module is to provide a stable and high-quality power supply for the system. The barcode scanner uses a high-speed and high-precision laser barcode scanner. It re-collects the barcode information of the goods sorted by the sorting system at the offline port and sends it to the STM32 processor through the RS232 bus. The CAN module is used to achieve reliable communication with the master node, transmit information such as barcodes uploaded by the terminal node and control information sent by the master node. The CAN interface design is shown in Figure 4. The belt conveyor module is used to control the operation of the belt conveyor at the offline port according to the control information sent by the master node. The wireless module and data acquisition module are used to expand the functions of the system. The wireless module can assist in manual control of the belt conveyor and facilitate the operator; the data acquisition module can help collect information such as the working status of the terminal equipment and the ambient temperature.
2.2 RT-Thread porting on STM32F103RBT6
RT-Thread adopts modular design, which not only includes a stable and efficient real-time kernel, but also a complete embedded system software platform. In the process of transplantation, RealView MDK launched by ARM is used as the system development tool. At present, RealView MDK has integrated the most advanced technology in the industry, including Vision3 integrated development environment and RealView compiler. It supports the latest Cortex-M3 core processor, integrates Flash burning module, and is equipped with Simulation device simulation, performance analysis and other functions, making it very suitable for RTOS development.
2.3 CAN interface programming
In order for the CAN module to work properly, it must be programmed to control it to complete the specified task. The control of CAN is completed by operating a series of registers. In order to facilitate the operation of the register group, a structure CAN_TypeDef is defined according to the relative address of each register in the memory, and the CAN register group base address CAN_BASE is forced to be converted to
The (CAN_TypeDef*) pointer is macro-defined as CAN, and then the relevant registers of the CAN controller are accessed through the members of the CAN_TypeDef structure pointed to by CAN. After the hardware reset, the CAN controller enters sleep mode to save power. In order to use CAN normally, it needs to be initialized. The initialization of CAN needs to be performed in the initialization mode. Enter the initialization mode by programming the INRQ bit of CAN->MCR to 1. At the same time, the hardware will set INAK of CAN->MSR to respond. After completing the initialization, reset the INRQ bit of CAN->MCR, and enter the normal mode after CAN is synchronized with the bus. In the normal mode, the normal sending and receiving of messages can be completed. To send a message, first query the CAN-TSR register, select an empty mailbox, set the identifier, data length, and data to be sent, and then set TXRQ to request sending. The barcode format sent by the barcode scanner through the serial port is ASSIC code, and the barcode length also varies. A CAN data message sends a maximum of eight bytes of data, so it must be sent multiple times. Finally, the '/r' and '/n' characters are added to the end of the barcode data to indicate a complete barcode transmission.
2.4 Design of system application
After completing the porting of RT-Thread to the STM32F103RBT6 target platform, the next task is to develop system applications to implement the required functions. The first step in application development is to complete the initialization of related hardware or peripherals. In RT-Thread, there are two ways to complete the related initialization work. One is to write the initialization function of the corresponding module in the board.c file and call it in the rt_hw_board_init function. The other way is to complete it in the thread function. Then develop the application thread. The use of multi-threading technology can reduce the complexity of application development and improve the reliability of the system with a smaller system overhead. RT-Thread uses threads as the smallest scheduling unit and adopts a priority-based fully preemptive scheduling algorithm. For this application, four main threads, CAN thread, barcode thread, daemon and deal thread, are created, and they are coordinated through thread synchronization and communication methods.
3 Design of the master node system
3.1 Design of the master node hardware system
The master control node is the core of the whole re-inspection system. It mainly completes the processing of barcode information. Its hardware structure is shown in Figure 4. The master control node consists of multiple modules. Each module requires a different power supply voltage. The voltage required by the processor core and on-chip peripheral modules is also different. These different voltages are provided by the power supply system. The touch screen is the input and output interface of the system, which is used to display the barcode information after querying the database and receive the input command of the operator. The CAN module consists of a CAN controller and a driver with an SPI interface, which is used to communicate with the terminal node. The CAN interface design of the master control node is shown in Figure 5. In order to serve the database through the network, it is equipped with a 100M Ethernet communication interface. The RS232 interface is used as the console of Linux and the boot program to assist in the development of the LED module. In the experiment, it is used to simulate the notification of sorting errors to the sorting system controller. As the control core of the master control node, S3C6410 also coordinates the work of each module.
Previous article:Application of floating point unit in ARM processor under Linux
Next article:Design of dual-drive electric vehicle control system based on LPC2132 (Part 1)
Recommended ReadingLatest update time:2024-11-16 23:48
- Popular Resources
- Popular amplifiers
Professor at Beihang University, dedicated to promoting microcontrollers and embedded systems for over 20 years.
- Innolux's intelligent steer-by-wire solution makes cars smarter and safer
- 8051 MCU - Parity Check
- How to efficiently balance the sensitivity of tactile sensing interfaces
- What should I do if the servo motor shakes? What causes the servo motor to shake quickly?
- 【Brushless Motor】Analysis of three-phase BLDC motor and sharing of two popular development boards
- Midea Industrial Technology's subsidiaries Clou Electronics and Hekang New Energy jointly appeared at the Munich Battery Energy Storage Exhibition and Solar Energy Exhibition
- Guoxin Sichen | Application of ferroelectric memory PB85RS2MC in power battery management, with a capacity of 2M
- Analysis of common faults of frequency converter
- In a head-on competition with Qualcomm, what kind of cockpit products has Intel come up with?
- Dalian Rongke's all-vanadium liquid flow battery energy storage equipment industrialization project has entered the sprint stage before production
- Allegro MicroSystems Introduces Advanced Magnetic and Inductive Position Sensing Solutions at Electronica 2024
- Car key in the left hand, liveness detection radar in the right hand, UWB is imperative for cars!
- After a decade of rapid development, domestic CIS has entered the market
- Aegis Dagger Battery + Thor EM-i Super Hybrid, Geely New Energy has thrown out two "king bombs"
- A brief discussion on functional safety - fault, error, and failure
- In the smart car 2.0 cycle, these core industry chains are facing major opportunities!
- The United States and Japan are developing new batteries. CATL faces challenges? How should China's new energy battery industry respond?
- Murata launches high-precision 6-axis inertial sensor for automobiles
- Ford patents pre-charge alarm to help save costs and respond to emergencies
- New real-time microcontroller system from Texas Instruments enables smarter processing in automotive and industrial applications
- msp clock setting program
- Rigol Oscilloscope and Micsig Oscilloscope
- Parameters of terminal blocks
- [New version of Zhongke Bluexun AB32VG1 RISC-V development board] - 7: Using RT-Thread in VS Code on Ubuntu
- Analysis of Factors Affecting WiFi RF EVM
- Transistor replacement
- How GaN FETs with integrated drivers and self-protection enable next-generation industrial power supply designs
- It’s like face to face with real people. What do you think of this black technology?
- C Basic skills training
- Discussion: How many spacings should be used to drill a GND via in RF high-speed PCB design? [Repost]