Application of AT88RF020 in school dining management system

Publisher:LovingLife2023Latest update time:2014-10-17 Source: dzscKeywords:AT88RF020 Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

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.

AT88RF020 internal structure schematic diagram

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.

High-frequency interface principle of inductive coupling system

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.


Storage Organization

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.

Keywords:AT88RF020 Reference address:Application of AT88RF020 in school dining management system

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

RFID Information Collection and Processing System Based on Embedded Linux
Radio frequency identification (RFID) is a contactless automatic identification technology that automatically identifies the target object and obtains relevant data through radio frequency signals. The identification process does not require human intervention and can work in various harsh environments. RFID technology
[Microcontroller]
RFID Information Collection and Processing System Based on Embedded Linux
Highway RFID Ambiguity Path Identification System Solution
1. System Overview Network charging is the general trend of road network charging in various provinces. Most provinces have implemented road network charging systems based on IC cards. In the network charging system, accurate splitting and settlement are the key to ensuring the interests of vario
[Automotive Electronics]
Highway RFID Ambiguity Path Identification System Solution
Design of RFID receiving system based on MSC1211 single chip microcomputer
1 Introduction Radio Frequency Identification (RFID) is a non-contact automatic identification technology that uses radio frequency signals and their spatial coupling and transmission characteristics for non-contact two-way communication. Data exchange is not through the contact of current but through
[Microcontroller]
Design of RFID receiving system based on MSC1211 single chip microcomputer
Application design of active RFID tag based on MSP430F2012 and nRF24L01
  This article introduces the design concept of active tags, and designs RFID tags based on the principles of low power consumption and high efficiency in response to the needs of RFID positioning in a small space in coal mines. The system uses a low-power combination of MSP430F2012 microcontroller and nRF24L01 radio c
[Microcontroller]
Application design of active RFID tag based on MSP430F2012 and nRF24L01
Application of RFID technology in baby anti-theft system (Intetag)
1. System Overview The safety of infants in hospital has always been a concern for parents and hospitals. The Intetag Infant Protection System can solve the worries of parents and hospitals, and enable hospitals to focus more on providing high-quality care for patients. Hospitals in many countries in America and Eur
[Power Management]
Application of RFID technology in baby anti-theft system (Intetag)
Discussion on RFID positioning solution based on Wi-Fi
Abstract: With the development of wireless positioning technology, indoor positioning technology has become a hot topic. WiFi-based positioning technology has the advantages of wide coverage, fast information transmission speed, and low implementation cost. This study applies radio frequency identification technolog
[Analog Electronics]
Discussion on RFID positioning solution based on Wi-Fi
Latest Microcontroller Articles
  • Download from the Internet--ARM Getting Started Notes
    A brief introduction: From today on, the ARM notebook of the rookie is open, and it can be regarded as a place to store these notes. Why publish it? Maybe you are interested in it. In fact, the reason for these notes is ...
  • Learn ARM development(22)
    Turning off and on interrupts Interrupts are an efficient dialogue mechanism, but sometimes you don't want to interrupt the program while it is running. For example, when you are printing something, the program suddenly interrupts and another ...
  • Learn ARM development(21)
    First, declare the task pointer, because it will be used later. Task pointer volatile TASK_TCB* volatile g_pCurrentTask = NULL;volatile TASK_TCB* vol ...
  • Learn ARM development(20)
    With the previous Tick interrupt, the basic task switching conditions are ready. However, this "easterly" is also difficult to understand. Only through continuous practice can we understand it. ...
  • Learn ARM development(19)
    After many days of hard work, I finally got the interrupt working. But in order to allow RTOS to use timer interrupts, what kind of interrupts can be implemented in S3C44B0? There are two methods in S3C44B0. ...
  • Learn ARM development(14)
  • Learn ARM development(15)
  • Learn ARM development(16)
  • Learn ARM development(17)
Change More Related Popular Components

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

About Us Customer Service Contact Information Datasheet Sitemap LatestNews


Room 1530, 15th Floor, Building B, No.18 Zhongguancun Street, Haidian District, Beijing, Postal Code: 100190 China Telephone: 008610 8235 0740

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京ICP证060456号 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号