1 Overview
At present, in some universities, technical secondary schools and middle schools where dining is concentrated, students' dining is basically managed by microcomputers, and students can easily consume in the school cafeteria with a contactless RFID card. Some schools have also adopted campus cards, and as long as they hold a legal RFID card, they can consume in public consumption places throughout the school.
RFID (Radio Frequency Identification) is a radio frequency identification card or an inductive electronic chip. RFID is a contactless automatic identification technology that automatically identifies the target object and obtains relevant data through radio frequency signals. The identification work does not require human intervention and can work in various harsh environments. RFID technology can identify high-speed moving objects and can identify multiple tags at the same time. The operation is quick and convenient. AT88RF020 is a contactless RFID card produced by Atmel.
2 Features of RFlD card AT88RF020
◇AT88RF020 is a 13.56 MHz radio frequency card that complies with ISO/IEC 14443 Type B protocol;
◇Capacity is 2048 bits;
◇Each card has a unique serial number;
◇With encryption and locking functions;
◇A one-time counter;
◇All transmitted information includes a byte of cyclic checksum;
◇Write time is 3 ms;
◇The number of writes is 100,000 times;
◇The working environment is 0~70℃.
3 Composition and working principle of RFID technology
3.1 Basic components of RFID system
① Tag (i.e. radio frequency card). It is composed of coupling elements and chips. The tag has a built-in antenna for communication with the radio frequency antenna. Each tag has a unique electronic code and is attached to an object to identify the target object. Figure 1 is a schematic diagram of the internal structure of the RFID chip AT88RF020.
Click to see the original image
②Reader (reader or card reader): A device that reads (can write in addition to reading cards) tag information, which can be designed to be handheld or fixed.
③Antenna: Transmits radio frequency signals between the tag (radio frequency card) and the card reader.
Some systems also connect to an external computer (host system) through the RS232 or RS485 interface of the card reader for data exchange.
3.2 Basic working principle of RFID system
The card reader sends a radio frequency signal of a certain frequency (such as 13.56 MHz) through the transmitting antenna. When the radio frequency card enters the working area of the transmitting antenna, an induced current is generated, and the radio frequency card obtains energy and is activated. The radio frequency card sends its own coding and other information through the built-in transmitting antenna of the radio frequency card. The system receiving antenna receives the carrier signal sent from the radio frequency card, which is transmitted to the card reader through the antenna regulator. The card reader demodulates and decodes the received signal, and then sends it to the background main system for related processing. The main system determines the legitimacy of the card based on logical operations, makes corresponding processing and control for different settings, and sends command signals to control the action of the actuator.
3.3 Structure and working principle of RFID system reader
For the card reader, different contactless transmission methods are fundamentally different in terms of coupling mode (such as inductive-electromagnetic), communication process (such as FDX, HDX, SEQ), data transmission method from RFID card to card reader (such as load modulation, backscattering, high-order harmonics) and frequency range. However, all card readers are very similar in functional principle and design structure determined by this. All readers can be simplified into two basic modules: high-frequency interface and control unit. The high-frequency interface includes a transmitter and a receiver, and its functions include: generating high-frequency transmission power to start the RFID card and provide energy; modulating the transmission signal for transmitting data to the RFID card; receiving and demodulating the high-frequency signal from the RFID card. There are some differences in the high-frequency interface design of different RFID systems. The high-frequency interface principle of the inductive coupling system is shown in Figure 2.
Click to see the original image
The functions of the card reader control unit include: communicating with the application system software and executing the commands sent by the application system software; controlling the communication process with the RFID card (master-slave principle); signal encoding and decoding. For some special systems, there are also additional functions such as executing anti-collision algorithms, encrypting and decrypting the data to be transmitted between the RFID card and the reader, and performing identity verification between the RFID card and the reader.
4 Storage structure of RFID card AT88RF020
Atmel's AT88Rt020 RF card chip has a storage capacity of 2048 bits, divided into 32 pages, 8 bytes per page, and the storage organization structure is listed in Table 1.
Click to see the original image
The bytes marked with “—” in Table 1 are defined by the user and their initial value is 0 when shipped from the factory.
①Pseudo Unique PICC Identifier. The card’s unique serial number is written by the card manufacturer and cannot be modified.
②Application Data: Application data, which is transmitted from the card to the reader as part of the ATQB reply information.
③counter. Counter. Each time the COUNT instruction is executed, the counter value increases by 1. The initial value is set to 0 by the manufacturer.
④Signature. Signature (for encryption), this data is located in the first 6 bytes of page 2 and can be modified by the COUNT instruction. Counter and Signature can provide further security protection.
⑤Password. The password is placed on the third page and cannot be read out.
⑥Lock Bits. The lock bits are located on page 0. After the password is verified, they can be modified using the LockK command. Each bit in the lock bits corresponds to a page of memory. If a bit is set to "1", the corresponding page is locked and can no longer be written. There is no mechanism to unlock it. Therefore, once a page is locked, its content can no longer be modified. The factory default value is 0.
The working process of powering on or restarting the AT88RF020 is shown in Figure 3.
[page]
5 Common commands and functions of RFlD card AT88RF020
5.1 Common commands of AT88RF020
①REQB/WUPB: used to search for a card or wake up a card in HALT state. This card only responds to the application code (API) of 00 or 01. If a WUPB command with an invalid API code is received, the card remains in HALT state.
②ATTRIB: Used to select a card from all cards that respond to REQB/WUPB. After that, the card enters the AC-TIVE state.
③Slot MARKER: Provides a card for the reader to query a random number greater than 1.
④HALTB: Set the card to HALT state, after which only WUPB commands can be executed.
⑤READ: used to read the data in the card. Pages 0 to 2 can be read without password verification, while the data on page 3 cannot be read and can only be modified through the PASS-WORD command. Other pages can be read after password verification.
⑥WRITE: used to write data to the card.
⑦LOCK: It can only be executed after the password is verified. It is used to lock a certain address area. The locked address area can only be read after the password is verified.
⑧CHECK PASSWORD: Password verification command, executed after the device enters the ready state.
⑨DESELECT: If this command is executed on a card in the ACTIVE state and passes, the card sends a correct response message and enters the HALT state.
⑩COUNT: Used to write page 2. The data in the COUNT command is written into the first 6 bytes of page 2, and the last 2 bytes are used as a counter. Each time the COUNT command is executed, the counter value increases by 1. If the counter value reaches 2 to the 15th power, the COUNT operation cannot be executed, and page 2 is locked and cannot be modified. The password must be verified before executing this command.
5.2 AT88RF020 Functions
The following uses the rf_attrib() function as an example to illustrate the function usage of AT88RF020.
①Format of function rLattrib(): int rI_attrib(HANDLE icdev, unsigned long pupi, unsigned char param, unsigned char cid, unsigned charbrTx, unsigned char brRx);
② Function: Select a card from the cards that have responded to the REQB/WUPB command and assign an ID number to each card.
-------------------------------------------------- ----------------------------------
③Parameter description of the function.
icdev: device descriptor returned by rf_init(). pupi: Pseudo-Unique PICC Identifier. param: set to 0. cid: card ID number (0-15), this value is stored in the card for later operations.
brTx: baud rate from CD (close-coupled device) to PICC (close-coupled integrated circuit card). For AT88RF020, 0x00 represents 106 kb/s.
brRx: The baud rate from PICC to PCD. For AT88RF020, 0x00 represents 106 kb/s.
④Return value: 0 indicates success; not equal to 0 indicates failure.
⑤Routine.
int st;
unsigned char Mode="0";
unsigned char_Data[15];
unsigned long pupi="0";
st="rf"_request
b(iedev, Mode, 0~0 Data);
if(st==0) {
memcpy(&pupi, &Data[1],4);
st="rf"_attrih(icdev, pupi, 0, 0, 0.0);
}
After selecting the card, if multiple cards enter the activation state, you can operate multiple cards at the same time according to the CID (radio frequency card ID number). Take two cards as an example:
int st;
unsigned long pupi[2];
unsigned char receive[256], data[10];
pupi[o]=0x25510200;//pupi of card 1
pupill]=Ox344e0200;//pupi of card 2
unsigned char cid= "0";
st="rf"_requestb(icdev,0,0,0,receive);//Select a card
//in the case of the response card is card 1
cid-0;//slot 0
st= "rf"_attrib(icdev,pupiEO],o,cid,0,O);
//select card 2
st="rf"_request(iedev,0,0,0,receive);
//in the case of the response card is card 2
cid="1";
st="rf"_attrib(icdev.pupi[l].0,cid,0,0);
//operate the two cards in the same time
for (int i-0; i-(2; i++){
st="rt"_read(icdev, i, 0, data);
//deseleet card 1
st="at88rf020 "deseleet(iedev, 0);
//deseleet card 2
st="at88rf020" deseleet(icdev.1);
6 Application of RFID Card in School Dining Management
6.1 System Overall Plan
The dining management system for the school canteen is developed by using the AT88RF020 radio frequency identification card, IDIc (Identification Integrated Circuit), read-write base station integrated circuit u2270B and Atmel's 8-bit single-chip microcomputer produced by Atmel Company of the United States. The system has the functions of prepayment, target recognition, identity authentication, data acquisition, data encryption and database management. The system consists of four parts: AT88RF020 card, dining management terminal, database management system, and communication system between dining management terminal and database management microcomputer. The communication between the host and dining management terminal adopts RS-485 communication standard, and the working mode is half-duplex. Each communication is that the host first calls the slave. The system structure is shown in Figure 4.
6.2 Communication Hardware Interface Design
In this system, the communication between the dining management terminal and the host computer uses the RS485 bus standard and is implemented using the MAX465 chip, which has all the functions required by the RS485 communication interface. The direction of data communication is controlled by the RE and DE pins. In the design, the two are connected together and controlled by the PI,5 of the microcontroller. When it is high, the data is sent from the dining management terminal to the external serial bus via the MAX485, that is, it is in the sending state; when it is low, the data is sent from the external serial bus to the dining management terminal. The serial port of a general microcomputer uses the RS232 interface, so an RS232/RS485 converter is required at the host computer end. This design uses the IC-485SN converter produced by Taiwan Aten Company, which is a bidirectional RS232/RS485 or RS422 converter that can provide point-to-point,
point-to-multipoint (up to 254 points) full-duplex and half-duplex and multi-point simplex serial communication.
6.3 Communication software interface design
The host computer database management system is written in Visual FoxPro (VF). The serial communication program introduced here mainly implements the communication program design with the dining management terminal in VF. This system uses standard communication controls commLmications to design the communication program to realize the sending of loss report data, the sending of user card numbers, the issuance of cards and the reception of dining data. Each time communication occurs, the communication control olecon-troll is first initialized in the lnlt event of the host computer. The initialization settings are:
thisform,olecontroll,commPort=1 //Select serial port COM1
thisform,olecontroll,PortOpen=1 //Open serial port COM1
thisform,olecontroll,lnpLltMode=O //Received data in text mode
thisform olecontroll,RTSEnable=1 //Allow the use of RTs line. Used for
//RS232/485 converter's transmission control and power supply
thisform,oleconatroll,InputLen=1 //Read the receive buffer //
one character at a time
thisform,olecontroll,OutbifferCount=O //Clear the transmit buffer
thisform,olecontroll,InbufferCotInt=O //Clear the receive buffer
Conclusion
This article introduces the features, working principle and application of RFID card ATRF88020 in school dining management. Other typical applications of RFID technology include logistics and supply management, manufacturing and assembly, airline baggage handling, mail/express package handling , document tracking/library management, animal identification, sports timing, access control/electronic tickets, automatic road toll collection, etc.
Previous article:On the Design of UPS Power Supply Intelligent Monitoring System
Next article:Application of BL2100 controller in biological fermentation
Recommended ReadingLatest update time:2024-11-16 21:53
- 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
- Do a little survey:
- GD32E231 Learning 2: GPIO drive OLED and TC0 timing interrupt
- I need help with a power supply simulation question
- Smart home security integrated solution terminal
- Low Power Methodology Manual - For System-on-Chip Design
- 28377d When using EMFI to read and write data, the address needs to be shifted to be read correctly. What is the reason?
- Xilinx platform DDR3 design tutorial comprehensive chapter_Chinese version tutorial.pdf
- Ofweek Talent Network recruitment and job search results, let's talk about it
- EEWorld invites you to disassemble (fifth issue): dismantle power strips to learn circuits
- The first pit of domestic FPGA chip Sipeed Tang Nano 4K running routine