LCD Display Inverter

Display Inverter / VGA Board / LCD Controller

Design of RFID reader system based on AT89S51 and MF RC500

RFlD is the abbreviation of Radio Frequency Denti-fieation (Radio Frequency Denti-fieation), also known as an Electronic tag. It uses radio frequency signals to achieve contactless information transmission through spatial coupling (alternating magnetic field or electromagnetic field) and achieve identification through the transmitted information The purpose of the technology. The earliest application of RFID can be traced back to the “identification friend or foe” system used to distinguish between coalition forces and Nazi aircraft in World War II. Compared with the widely used automatic identification technology such as bar code, magnetic card, IC card, etc.

1 Introduction

RFlD is the abbreviation of Radio Frequency Denti-fieation (Radio Frequency Denti-fieation), also known as an electronic tag. It uses radio frequency signals to achieve contactless information transmission through spatial coupling (alternating magnetic field or electromagnetic field) and achieve identification through the transmitted information The purpose of the technology. The earliest application of RFID can be traced back to the “identification friend or foe” system used to distinguish between coalition forces and Nazi aircraft in World War II. Compared with the widely used automatic identification technology such as bar code, magnetic card, IC card, etc.

Radio frequency identification technology has many outstanding advantages: First, high security. It is suitable for high-security terminals. In terms of data security, in addition to the password protection of electronic tags, some algorithms can be used to implement security management in the data part. There is a mutual authentication process between the reader and the tag. It can realize secure communication and storage. The reader has a physical interface that is not directly open to the end user, which can ensure its own security: second. It can identify multiple at the same time Electronic tags; third, no mechanical abrasion. Long life span. It can work in various oil stains, dust pollution and other harsh environments; fourth, non-contact operation, no manual intervention is required to complete the identification work. The application is convenient. It is precisely because of these advantages that the application of RFID has been in full swing in recent years. In order to simplify the complex RFID system. A low-cost passive RFID system based on the MF RC500 card reader is designed. The external interface of the system is a serial port, so that devices with serial ports, including PCs, can be easily connected to it, which is of great significance to the promotion of RFID.

2 The composition of a general passive RFID system

The passive RFID system consists of passive RFID tags, antennas, and RFID readers, as shown in Figure 1.

  

Design of RFID reader system based on AT89S51 and MF RC500

The RFID tag is composed of coupling elements and circuits, and the energy required for the transmission of electric waves and the operation of the internal processor comes from the electromagnetic waves generated by the reader. After the passive tag receives the electromagnetic wave signal sent by the reader, it converts part of the electromagnetic energy into energy for its own work. Each electronic tag has a globally unique identification number (ID), which cannot be modified or imitated, ensuring safety. The electronic data in the agreed format is stored in the electronic label.

The antenna transmits the radio frequency signal between the tag and the reader, that is, the data information of the tag.

RFID reader is a device that reads (or writes) electronic tag information. The reader can read and identify the electronic data stored in the electronic tag without contact, and can automatically identify the object. The reader is connected to the computer through the network port, and the read label information is transmitted to the computer for further processing.

3 Features and design of MF RC500

3.1 Features of MF RC500

Philips’ MF RC500 card reader is a member of the highly integrated card reader IC series used in 13.56 MHz contactless communication. This card reader IC series utilizes advanced modulation and demodulation concepts. It fully integrates all types of passive non-contact communication methods and protocols under 13.56 MHz. MF RC500 supports all layers of IS014443A. The internal transmitter part does not need to increase the active circuit and can directly drive the antenna at a short operating distance (up to 100 mm): the receiver part provides a robust and effective demodulation and decoding circuit, Used for IS014443 compatible transponder signals; the digital part processes IS014443A frames and error detection (parity & CRC). In addition, it also supports the fast CRYPTOI encryption algorithm for verifying Mifare series products. The convenient parallel interface can be directly connected to any 8-bit microprocessor. It provides great flexibility to the design of the reader. MF RC500 can be conveniently used in a variety of applications based on ISO/IEC 14443A standards and requiring low cost, small size, high performance, and single power non-contact communication.

3.2 Function of MF RCS00

MF RC500 includes parallel micro-controller interface, two-way. FIFO buffer, interrupt, data processing unit, status control unit, security and password control unit, analog circuit interface and antenna interface. The external interface of MF RC500 includes data bus, address bus, control bus (including read and write signals and interrupts, etc.) and power supply. The parallel microcontroller interface of MF RC500 automatically detects the type of 8-bit parallel interface connected. It contains an easy-to-use two-way FIFO buffer and a configurable interrupt output, which provides great flexibility for connecting various MCUs.

Even with very low-cost devices, it can meet the requirements of high-speed non-contact communication. The data processing part performs parallel-to-serial conversion of data. Supported frames include CRC and parity. MF RC500 operates in a completely transparent mode. Therefore, it supports all layers of IS014443A. The state and control section allows the device to be configured to adapt to environmental influences and adjust the performance to the best state. When communicating with Mifare Standard and Mifare, use a high-speed CRYPTOI stream cipher unit and a reliable non-volatile key memory. The analog circuit contains a transmitting section with a very low impedance bridge driver output. This makes the maximum operating distance up to 100 mm. The receiver can detect and decode very weak response signals.

4 System design

4.1 System hardware design

According to the RFID principle and the characteristics of MF RC500, an RFID reader system based on AT89S51 and MF RC500 can be designed, and its structural block diagram is shown in Figure 3.

  

Design of RFID reader system based on AT89S51 and MF RC500

The system is mainly composed of AT89S51, MF RC500, clock circuit, watchdog, MAX232 and matrix keyboard. The way the system works is by first. The MCU controls the MF RC500 to drive the antenna to read and write to the Mifare card, that is, to read and write to the transponder (PICC), then communicate with the PC and transmit the data to the upper computer. The main control circuit adopts AT89S51, because the development of AT89S51 is simple, fast and stable. Use ATMEL AT24C256 type .12C bus EEPROM to store the data of the system. In order to prevent the system “crash”. Use MAX813 as a watchdog to realize system power-on reset, hot restart of buttons, and voltage detection. The communication with the host computer adopts RS-232 mode, and the whole system is powered by a 9V power supply. Then the voltage stabilizing module 7805 is regulated into a 5V power supply.

Both the MF RC500 and the single-chip AT89S51 use standard TTL levels, without level conversion. The microcontroller AT89S51 does not match the PC serial port level. Use the MAX232 type level converter for level conversion. The key interface parts in the hardware design of the system are connected as follows:

ADO-AD7 (pin 13 and pin 20) of MF RC500 is a bidirectional data and address multiplexing bus with Schmitt trigger, connected to the ADO-AD7 (pin 39 and pin 32) of the single-chip AT89C51.

The NWPdRNW (pin 10) of MF RC500 is a write prohibition/read-only signal with Schmitt trigger, which is connected to the write signal WR (pin 16) of the single-chip microcomputer.

The NRD/NDS (pin 11) of MF RC500 is the read prohibition with Schmitt trigger, and the data strobe prohibition signal is connected to the read signal RD (pin 17) of the single-chip microcomputer.

The NCS (pin 19) of MF RC500 is a chip selection prohibition signal with Schmitt trigger. It is connected to the I/O port line P2.7 (pin 28) of the microcontroller.

The ALE (pin 21) of MF RC500 is the address latch enable signal with Schmitt trigger, which is connected to the address latch signal (pin 30) of the microcontroller.

The IRQ (pin 2) of MF RC500 is an interrupt request signal with Schmitt trigger, which is connected to the interrupt 0 (pin 12) of the microcontroller.

4.2 System antenna design

The non-contact antenna interface of MF RC500 uses the 4 pins listed in Table 1.

  

Design of RFID reader system based on AT89S51 and MF RC500

To drive the antenna. MF RC500 provides 13.56 MHz energy carrier through TX1 and TX2. According to the register setting, modulate the sent data to get the sent signal. The S50 card uses the load modulation of the RF field to respond. The signal picked up by the antenna is sent to the RX pin through the antenna matching circuit. The internal receiver of MF RC500 detects and demodulates the signal and processes it according to the setting of the register. Then the data is sent to the parallel interface and read by the microcontroller. MF RC500 uses a separate power supply for the driving part.

The general antenna design must meet the following requirements: 1) Maximize the current of the antenna coil to generate the largest magnetic flux; 2) Power matching. To maximize the use of the available energy to generate the magnetic flux; 3) Enough bandwidth so that there is no distortion Ground to transmit a carrier signal modulated with data. The antenna is a resonant circuit with a certain load impedance. The reader has a certain source impedance. In order to obtain the best performance, the coil impedance must be converted to the source impedance through a passive matching loop. Then, the power can be transmitted from the final stage of the reader to the matching circuit through the coaxial cable without loss and radiation.

In order to save cost and reduce system volume, this system adopts PCB board antenna design. The quality factor Q is a very important parameter. The characteristic value of an antenna used in an inductively coupled radio frequency identification system is its resonant frequency and quality factor. A higher quality factor value will increase the current intensity in the antenna coil, thereby improving the power transmission to the RFID card. On the contrary, the transmission bandwidth of the antenna changes in inverse proportion to the value of the quality factor. If the quality factor is selected too high, the bandwidth will be reduced. This significantly weakens the modulation edge received by the card. The quality factor can be calculated by the ratio of the inductance coil reactance to the resistance, the formula is as (1):

Q=(coaxLm)/RANT (1)

Where ωa=2πfRo

The principle of the antenna part of the circuit and EMC is shown in Figure 4.

  

Design of RFID reader system based on AT89S51 and MF RC500

4.3 System workflow

Except for reset, most of the control of MF RC500 is realized by reading and writing the registers of MF RC500. MFRC500 has 64 registers in total, divided into 8 register pages, 8 per page. Each register is 8 bits. The microcontroller operates these registers as off-chip RAM. The most commonly used are FIFODATA (data stack), COMMAND (command), FIFOLENGTH (stack length) and PRIMARYSTATUS (mark). To implement an operation, just write the code corresponding to the operation into the corresponding address. For example, the control register corresponding to the sleep mode of MF RC500 is named Contr01, the address is bit4 of 09H and it is 1 valid, then the instruction to make MFRC500 enter the sleep mode is mov RO, #OgH;[email protected]