0 Introduction
With the development of the national economy, aviation has become a travel mode that people rely on. In the air cargo logistics system, there are many types of food and goods, high safety requirements, and complicated handover procedures. It is urgent to introduce information management. The emergence of RFID technology has a positive significance for improving the logistics management of civil aviation. The aviation logistics RFID system is mainly composed of electronic seals, card readers and database management systems. The existing card readers generally use single-chip microcomputer systems (such as STC89C54 or MC9S12X128) or STM32 series. Their common disadvantages are: low main frequency, no support for operating system and poor user experience, which cannot meet the growing application needs of air cargo logistics systems. In the aviation food and duty-free goods logistics system, ground staff and flight attendants urgently need handheld card readers that are simple to operate, quick to respond, and can upload data through wireless networks at any time, so as to speed up logistics and improve the work efficiency of airport staff. Based on the above situation, a high-frequency RFID reader based on S3C6410 is proposed. It supports the Linux operating system and multi-threaded operation. Operators can switch between multiple card reading interfaces and upload data to the SQL database via GPRS anytime and anywhere, which not only greatly reduces the workload of airport staff, but also improves the speed and safety of aviation logistics.
1 Hardware Design
The system structure is shown in Figure 1. The system uses the S3C6410 microprocessor, which has a stable main frequency of 667MHz and a maximum main frequency of 800MHz. The S3C6410 integrates many peripheral interfaces, such as Camera interface, TFT-24bit true color LCD controller, power system management, 4-channel UART, 32-channel DMA, 4-channel timer, general I/O port, IIS, IIC bus interface, USBHost, USB OTG (480Mbps), 3-channel SD/MMC Host controller and clock generation PLL, etc. In addition, the use of 90nm COMS technology, low power consumption, simplicity, exquisiteness and full static design make the S3C6410 very suitable for applications that are sensitive to cost and power consumption.
The system's display screen uses a 3.5-inch 24-bit true color touch TFT-LCD with a maximum resolution of 1 024×1 024. The resolution of this card reader is 480×272. The storage peripherals are Nand flash, 24C64 and SD card.
LINUX's Uboot, kernel, boot image and file system are all burned into nand flash. 24C64 is used to save touch screen calibration parameters and data read from electronic tags. When the system starts, S3C6410 automatically reads the calibration parameters from 24C64 to avoid the need to calibrate the screen every time the system starts. SD card is used to store data read from the electronic seal. In addition, Chinese character library and icons and other files are also stored in the SD card.
Figure 1 System structure
S3C6410 drives the GPRS module (SIM300) to communicate wirelessly with the host computer SQL database through serial port 1. SIM300 is a 3-band GSM/GPRS module that can operate at 3 frequencies of EGSM 900 MHz, DCS 1 800MHz, and PCS 1 900MHz worldwide. It can provide up to 10 GPRS multi-channel types and supports 4 GPRS coding schemes: CS-1, CS-2, CS-3, and CS-4.
The RF chip uses NXP's CLRC632, which is a highly integrated wireless RF IC for 13.56MHz. Its pins are compatible with MF RC500, MF RC530, MF RC531 and SL RC 400. It can read and write Type A and Type B cards that comply with the ISO14443 protocol, as well as electronic tags that support the ISO15693 protocol. RC632 provides two communication interfaces. The first is an 8-bit parallel port that can be directly connected to various 8-bit microprocessors; the second is an SPI interface. This system uses this communication interface. The microprocessor can achieve RF operation by setting the registers of RC632 (see Figure 2).
Figure 2 CL RC632 principle[page]
The SPI bus is a high-speed, full-duplex, synchronous communication bus that uses four lines: MISO, MOSI, SCLK, and CS. Its main features include: sending and receiving serial data simultaneously; being able to work as a master or a slave; providing a frequency-programmable clock; sending an end interrupt flag; write conflict protection; and bus contention protection.
RC632 has 32 pins in total, of which pins 22, 23, and 24 are the address lines of the register, and pins 13 to 20 are 8-bit parallel ports. When using SPI communication, pin 13, i.e. data bit D0, is MISO, pin 22, i.e. address line A0, is MOSI, pin 24, i.e. address line A2, is CLK, and D1 to D7 do not need to be connected. In addition, A1 and NCS must be set to the low level, and NRD and NWR must be set to the high level.
RC632 communicates with the antenna through three pins DTX1, DTX2 and DRX. It transmits the modulated 13.56MHz energy carrier to the antenna through pins DTX1 and DTX2, and the antenna transmits the 13.56MHz energy carrier back to RC632 through pin DRX. Generally, there are two methods to connect the antenna to RC632: direct matching antenna and 50Ω matching antenna. This system uses direct matching to connect RC632 to the antenna, which includes EMC low-pass filter, antenna matching circuit and receiving circuit.
The system uses a PCB loop antenna, whose EMC low-pass filter is used to filter out high-frequency electromagnetic waves. The antenna matching circuit matches the antenna impedance to obtain maximum power transmission, increase the card reading distance, and avoid possible damage to the circuit caused by impedance mismatch. According to actual measurements, the operable distance of the antenna is 5~10cm.
Card reader software design
The operating system of the card reader uses the relatively stable Linux-2.6.30 kernel, and the file system is the yaffs file system. The software is divided into two parts: the first part is the QT program, whose main function is to accept user instructions and display the graphical interface; the second part is the RF driver, which is responsible for operating the registers of RC632 to realize specific RF functions. After writing the QT application for the RF card reader, it needs to be integrated into the yaffs file system. In addition, the Linux kernel needs to be tailored and the driver needs to be configured in the kernel configuration list.
Typical protocols for 13.56MHz RFID are ISO-14443 and ISO-15693. ISO-14443 is a standard protocol for contactless IC cards and is more widely used than ISO-15693. The following will mainly analyze the ISO-14443 protocol, which consists of four parts: the first part, physical characteristics; the second part, spectrum power and signal interface; the third part, initialization and anti-collision algorithm; the fourth part, communication protocol.
The message of ISO-14443 communication protocol can be divided into 6 parts, as shown in Table 1:
Table 1 Message data format of ISO-14443 communication protocol
The header 2 bytes are fixed as AABB, the message length represents the sum of bytes from the node to the checksum, and the command code indicates the function of the message. Commonly used command codes include 0201 (search card), 0202 (anti-collision), 0203 (select card), 0206 (password authentication), 0208 (read card), 0209 (write card), etc.
After the QT program is started, a series of icons will be displayed on the TFT-LCD, including: card search, card reading, card writing, sector selection, etc. Card search includes anti-collision detection, which is a very important step in the card reading process [10-11]. The process is as follows: when the user clicks the card search icon on the TFT-LCD, a touch point position signal will be generated on the touch screen. The system determines the area where the touch point is located based on the coordinates of the touch point, and the system makes corresponding processing based on the touched area. The QT program integrates the card search (0201), anti-collision (0202), card selection (0203), and password authentication (0206) in the ISO-14443 protocol into one sub-function. The card search process is divided into 4 processes:
1) Search for tags - that is, S3C6410 sends instructions to RC632 through serial port 1 to operate the relevant registers for antenna operation. Regardless of whether there is a card within the antenna sensing area, RC632 will send back relevant data to S3C6410. After receiving the data, S3C6410 determines whether there is an electronic tag.
2) Anti-collision - If there is more than one electronic tag within the antenna sensing area, the card reader needs to make a selection. After anti-collision, RC632 will return the 4-byte electronic tag card number to the microprocessor.
3) Select the tag - If you want to operate the electronic tag with the corresponding card number, the microprocessor will send a command to RC632 to select this electronic tag for the next read and write operation.
4) Password authentication - Only the card reader with the correct password can read and write the corresponding electronic tag.
After selecting the sector, if you want to read the card, just click the card reading icon. If you want to write the card, you need to input data. See Figure 3.
Figure 3 QT application process. [page]
After receiving the message from the application, the RF driver removes the header and check bit, judges the command code through the case statement, and then jumps to the corresponding subroutine. The subroutine sets the register of RC632 through the driver to implement RF operation. When reading RC632 data, the first byte of the MOSI line sets the mode and address: specifically, the 0th bit is set to 1, the 1st to 6th bits are the address, and the 7th bit is set to 0. The other bytes of the MOSI line are set accordingly. The first byte of the MISO line is reserved, and the data returned from the RC632 is from the second byte. When writing data to the RC632, the first byte of the MOSI line represents the address, and the data written to the RC632 is from the second byte. At this time, the MISO line is not enabled.
When driving RC632, first set the channel check register, set bits 0 and 2 to 1 (enable parity check and CRC check), then clear bit 3 of the control register to zero (disable data encryption), then write 0x07 to the bit structure controller, and the last step is to set the transmission control register to 0x03 (send unmodulated 13.56MHz continuous carrier at pin TX2). After setting the register status, RC632 can communicate with the electronic seal. The register operation during the communication process includes the following steps:
1) Set the interrupt enable and interrupt request registers to 0x07, set the command register, and cancel the current command; 2) Clear the FIFO BUF read and write pointers (i.e., clear FIFO[6:0]), set the interrupt enable register, and prompt that the flag bit has been set; 3) Write the data to the FIFO BUF in sequence and send the data out from the antenna; 4) Set the command register, activate the command to be executed, read the error flag register, and determine whether there is an error; 5) Wait for the specified time, then read the FIFO BUF, and read the data received by the antenna into RC632; 6) Set the interrupt enable and interrupt request registers to 0x07, set the control register, stop the timer, set the command register, and cancel the current command.
3 On-site measurement and host computer SQL database communication example
During the field test, 20 operations were performed on sectors 4, 16, and 33 of the electronic seal, and only one write process on sector 16 resulted in data loss, which shows stable operation performance. Table 2 is an example of the card reader writing and reading data on the electronic seal of the goods: first write the content 11220003, and then read the written content. The sector operated is 04, and the password is set to FFFFFFFFFF.
The interface after the read data is transferred to the host computer SQL database is shown in Figure 4.
Table 2 Field measured electronic seal reading and writing data.
Figure 4 Interface for transferring data to the database
4 Conclusion
A high-frequency RFID card reader based on the S3C6410 microprocessor is proposed, which realizes the functions of reading cards, writing cards and uploading data to the database. Experiments show that the card reader has good stability and practicality, and is suitable for application in the field of civil aviation. The card reader system has certain reference value and application prospects for the development and improvement of civil aviation logistics.
References:
[1]. GPRS datasheet http://www.dzsc.com/datasheet/GPRS_1594650.html.
[2]. 24C64 datasheet http://www.dzsc.com/datasheet/24C64+_32293.html.
[3]. SIM300 datasheet http://www.dzsc.com/datasheet/SIM300_1135859.html.
[4]. CS-1 datasheet http://www.dzsc.com/datasheet/CS-1_2525798.html.
[5]. ISO15693 datasheet http://www.dzsc.com/datasheet/ISO15693.html.
[6]. EMC datasheet http://www.dzsc.com/datasheet/EMC_2342312.html.
[7]. PCB datasheet http://www.dzsc.com/datasheet/PCB_1201640.html.
Previous article:Design of Touch Screen Interface Based on Embedded Microprocessor S3C44BOX
Next article:Design of home gateway based on S3C2440
Recommended ReadingLatest update time:2024-11-16 20:24
- 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)
- Detailed explanation and engineering practice of unmanned monitoring technology (Xie Jianbin, Li Peiqin, Yan Wei, Liu Tong, Lin Chenglong, Hong Quanyi, Zhou Hongfei, Cui Yibing)
- Introduction to Wireless Sensor Networks (Edited by Ma Sasa et al.)
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
- Review Weekly Report 20220104: New arrivals~ Linux RISC-V development kit, National Technology M4 hot-selling model, fresh ST60
- Here it comes, here comes the weekly review information~~
- MS5192T replaces AD7792
- Why does the output voltage of a power amplifier have errors? (Part 2)
- [Unmanned driving smart car based on ESP32 road sign identification] Unboxing ESP32-S2-KALUGA-1+K210Sipeed M1 docking station kit
- Challenge and collect cards | Light electric vehicles and power tools are just the right time, Infineon invites you to join the fun!
- script_recording_test_no_reply
- RT-thread introductory training
- [RVB2601 Creative Application Development] Power Monitoring
- Pingtouge RISC-V Low Power Board-RVB2601 Development Board Quick Start Guide