introduction
The current customs supervision of transit goods mainly adopts the traditional one-time lead sealing method, which uses manual operation and visual identification to mechanically seal, verify and unseal the container. The operation cost is high and the safety is low. More importantly, this supervision method has low operation efficiency and is far from meeting the supervision requirements of customs with high density and high intensity business flow. RFID (Radio Frequency Identification) technology uses induction, radio waves or microwave energy for non-contact two-way communication to achieve automatic identification technology for the purpose of identifying and exchanging data. It automatically identifies the target object and obtains relevant data through radio frequency signals, and the identification work does not require human intervention. This paper designs an electronic lock system based on active RFID technology, and uses electronic locks instead of traditional lead seals to electronically monitor and manage transit containers.
System architecture and operation mode
The system consists of four parts: monitoring center server, crossing monitoring machine, RF reader (crossing reader, handheld reader), and electronic lock. The system architecture is shown in Figure 1. The monitoring center server is responsible for background data storage and management; the crossing monitoring machine controls the crossing reader through the serial port to communicate with the lock through RF; the electronic lock, as a wireless terminal, mainly realizes functions such as information storage, wireless communication, mechanism control, and status monitoring.
Figure 1 Network topology of electronic locking system
System underlying hardware structure and design
The bottom layer of the electronic lock system consists of a reader and an electronic lock, and the basic components are MCU and RF transceiver circuit. The difference is that the crossing reader has an RS-485 communication interface, the handheld reader has a human-computer interaction interface, including a 4×4 membrane keyboard and a 128×64 dot matrix LCD display module, and the electronic lock has expanded the abnormal state monitoring circuit and motor drive circuit. The motor drive circuit is used to drive the motor to achieve electronic sealing and unlocking of the lock.
Electronic locks require 10-20 meters of wireless data communication. This article uses nRF2401 (hereinafter referred to as 2401) produced by Nordic as the RF transceiver chip. 2401 works in the globally open 2.4GHz frequency band, 125 channels, uses GFKS modulation, and the maximum wireless data transmission rate can reach 1Mbit/s. It has built-in hardware address decoding and CRC encoding and decoding circuits. In the actual design, the single-channel mode is adopted. The MCU needs to be connected to the 6 pins of 2401, namely DATA, CLK1, DR1, PWR, CE, and CS. Among them, PWR, CE, and CS are used to configure the working mode. DATA and CLK1 form the SPI bus. DR1 is the data preparation pin, which is connected to the interrupt I/O pin of the MCU. Figure 2 is the schematic diagram of the RF transceiver circuit.
Software Design
The software design of this system is divided into three levels: the monitoring center server is the top level; the crossing monitoring machine is the middle level; the reader and the electronic lock are the bottom level. Due to space limitations, the software design of the bottom level system is mainly described here.
2401 Communication Method Analysis
2401 has two communication modes, namely direct transmission mode (Dire Mode) and burst transmission mode (Shock BurST). This design adopts the latter.
In this design, the address segment is set to 2 bytes, the data segment is 28 bytes, and the check code is 2 bytes. The address segment is the receiving address configured by the 2401 chip. In the system, the electronic lock is set as the called party, and their receiving addresses are the same; accordingly, the receiving addresses set for the calling party, that is, all readers and writers, are also the same. 2401 is a half-duplex mode, and the data transmission and reception mode must be switched by configuring the status word.
Communication protocol research
The design-defined RF data packet is loaded into the data segment (PAYLOAD), and the data packet is fixed-length 28 bytes.
Analyze the application requirements of the system. Since there are multiple readers and multiple locks communicating separately on site, the wireless communication protocol must be designed for multi-point to multi-point. At the beginning of each communication, the caller needs to establish a connection with the answerer. The following is the connection establishment process:
1. The reader sends a broadcast call (general call for short), which is a single packet command. The responder ID needs to be filled with 0xFFFFFF, and the command code is 'S'. At this time, all electronic locks within the effective communication distance will be awakened, and they will fill in their own ID in the responder ID and return it to the reader.
2. The reader will select a target lock from the returned lock identification and issue a single-point call instruction (referred to as point call) to it. For the crossing reader, a directional antenna is used to ensure that only one lock is called each time the full call is made, and the lock is directly called; for the handheld reader, it is possible to get multiple locks to respond, and the keypad can be used to select and then point call. When calling, the ID of the target lock needs to be filled in the responder identification.
3. After receiving the command, the electronic lock will parse the data packet, authenticate the host identity and confirm that the responder is its own ID, and then return a response confirmation command to the host. After receiving the confirmation command, the host believes that the connection has been established.
Figure 2 RF transceiver circuit
Electronic lock main program design
Generally, the electronic lock is in a dormant listening state. After 2401 receives the RF data frame, it generates a DR1 interrupt to wake up the MCU. After the MCU parses the data and authenticates the identity according to the RF protocol data packet format, it processes according to the command code and finally packages and sends the response data. The abnormal state detection after the electronic seal is processed by a timer interrupt. The main program flow of the electronic lock is shown in Figure 3.
Key Issues Analysis #e#
Key Issues Analysis
Low power design
电子关锁采用电池供电,因此低功耗是设计重点,软件设计中合理设置工作方式可以大大降低功耗。电子关锁在大部分时间里是无需进行通信的,但是它必须保持无线监听状态,以保证随时应答主机的呼叫。2401处于接收模式时的消耗电流为18mA,这种消耗相对较大,不满足系统需求。设计中采用时间窗监听方式,电子关锁每秒钟仅开启2401无线监听1ms,在接收到唤醒指令后,才进入长时间监听模式。实际测试时间窗监听状态时的功耗仅为0.68mA,功耗显著降低。对于主机即读写器,每次连接关锁前需要增加一个唤醒过程,在1秒钟内持续发送唤醒指令,保证其时长覆盖关锁监听时间窗。
Avoid adjacent channel interference
There are usually multiple lanes at the customs checkpoint, and there may be co-frequency interference between adjacent lanes. In the system design, two methods are combined to avoid this interference: one is that the crossing reader uses a directional antenna, so that the RF signal emitted by the reader is directed to a single lane, which can avoid the impact of the reader's RF signal on adjacent lanes. However, it is impossible for electronic locks to use directional antennas, so a frequency hopping communication working mode is added. The working base frequency of each lane is set to the same, but once the reader and the electronic lock establish a communication connection, both parties jump to the fixed frequency specified by the host, that is, the reader, so that different lanes can effectively avoid interference with adjacent lanes due to different frequency hopping settings. It is very convenient to set the frequency hopping for 2401. You only need to set the channel status word in the configuration mode.
Figure 3 Electronic locking main program flow chart
Time-sharing answer
The application environment of the handheld reader is different from that of the roadside reader. It uses a wide-directional antenna, and there may be multiple locks within the effective communication range. Due to the same frequency, the synchronous response of the electronic lock during the broadcast call will cause signal conflict. To avoid conflicts, time-sharing response is adopted in the software design. After receiving the broadcast call command, the lock will randomly delay for a period of time before returning the response command. It should be noted that the random delay is not arbitrary, but segmented to ensure that the host processes different response signals within the time gap.
Here, the time-sharing response design is analyzed. The communication time after the reader sends the broadcast command is set to Tc, and Tc is divided into n time slots, each of which is sufficient to complete the identification reading and storage of a certain lock. After receiving the broadcast call, the lock randomly assigns the response time point to a certain time slot and returns the response command. If there are x locks within the communication range, when n>>x, the collision probability of the return signal will be very low. In practical applications, the number of locks on site generally does not exceed 10, usually 3 to 4, so a low collision probability can be guaranteed when n is set to 100. At the same time, since the response time is very short (large batches of data interaction occur after the connection is confirmed), a larger setting of n will not significantly reduce the response time.
Conclusion
实际测试表明,该电子关锁系统可靠性高,抗干扰能力强,可扩展性好。本系统是主动式RFID技术在物流监控领域的一个新应用,它显著提高了海关转关业务的运行效率。
Previous article:Design of automatic bus stop announcement system based on ZigBee
Next article:Application of Low Power RF Transceiver in Wireless Headset Communications
Recommended ReadingLatest update time:2024-11-16 20:43
- Popular Resources
- Popular amplifiers
- Radio Frequency Identification (RFID) System Technology and Application (Written by Ci Xinxin, Wang Subin, and Wang Shuo)
- Introduction to Internet of Things Engineering 2nd Edition (Gongyi Wu)
- Intelligent environmental perception technology for autonomous unmanned systems
- A review of deep learning applications in traffic safety analysis
- High signal-to-noise ratio MEMS microphone drives artificial intelligence interaction
- Advantages of using a differential-to-single-ended RF amplifier in a transmit signal chain design
- ON Semiconductor CEO Appears at Munich Electronica Show and Launches Treo Platform
- ON Semiconductor Launches Industry-Leading Analog and Mixed-Signal Platform
- Analog Devices ADAQ7767-1 μModule DAQ Solution for Rapid Development of Precision Data Acquisition Systems Now Available at Mouser
- Domestic high-precision, high-speed ADC chips are on the rise
- Microcontrollers that combine Hi-Fi, intelligence and USB multi-channel features – ushering in a new era of digital audio
- Using capacitive PGA, Naxin Micro launches high-precision multi-channel 24/16-bit Δ-Σ ADC
- Fully Differential Amplifier Provides High Voltage, Low Noise Signals for Precision Data Acquisition Signal Chain
- 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
- PIC16F1824
- EEWORLD University ---- Webinar - How to quickly design power rails for Xilinx FPGA and SoC
- EEWORLD University----simulink video tutorial
- Interleaved CCM Totem Pole Bridgeless Power Factor Correction (PFC) Reference Design
- Openmv3 photography
- [2022 Digi-Key Innovation Design Competition] Distributed Temperature and Humidity Acquisition System-STM32H745I-DISCO Basic Learning
- Start at 2pm: TI MSP430 development training, online hands-on demo + analysis by frontline experts
- What are the common types of LED dimming power supplies and their working principles?
- Chip Manufacturing: A Practical Tutorial on Semiconductor Process Technology (Sixth Edition)
- CircuitPython 6.0.0 Beta 2 released