Share this

Design and Implementation of a High-Frequency RFID Reader Based on a USB Interface

2026-04-06 06:01:43 · · #1

Abstract: This paper introduces the high-frequency RFID reader/writer chip MFRC530 and the USB interface chip CH374T, presenting a design method for a 13.56MHz reader. The specific development scheme and circuit schematic for controlling the MFRC530 with a microcontroller are analyzed. Data transmission between the host computer and the reader is achieved through the USB interface, and the implementation of the lower-level software is described in detail.


Keywords: Radio Frequency Identification, MF RC530, USB

The design and realization of RFID reader based on USB
Lu Yinju, Li Zhichao, Su Yu

(School of Information Engineering, Zhongzhou University, Zhengzhou 450044)
Abstract: The high frequency RFID chip MF RC530 and USB interface chip CH374T are introduced in this paper and the design method of 13.56MHZ reader is presented. The concrete design scheme and circuit principle chart of MCU controlling MF RC530 are described. Data transform is achieved between host computer and reader by USB interface. The software realization is illuminated in detail.
Keywords: RFID, MF RC530, USB
Radio Frequency Identification (RFID) is an automatic identification technology that emerged in the 1990s. It utilizes radio frequency for non-contact, two-way communication to achieve identification without human intervention. It offers advantages such as non-contact identification (identification distances ranging from 10 cm to tens of meters), the ability to identify high-speed moving objects, operability in various harsh environments, strong security, and the ability to identify multiple objects simultaneously. Compared to other automatic identification technologies, it successfully solves the technical challenges of requiring accurate identification, interactivity, high speed, anti-counterfeiting, security, reliability, and strong networking capabilities in automatic identification systems. Therefore, RFID technology has been widely used in military, transportation, production, electronic anti-counterfeiting, logistics monitoring, and automated control fields.
An RFID system consists of three parts: a tag, an antenna, and a reader. When a tag approaches the reader, it is excited by the electromagnetic waves emitted by the reader. The resonant circuit inside the tag resonates and receives electromagnetic energy. When the tag receives enough energy, it transmits the identification information and data stored in the card to the reader via radio waves and allows the reader to perform further operations on the data.
This paper designs a high-frequency RFID reader using MFRC530. The reader uses STC89C52 microcontroller to control Mifare cards, supports ISO14443 and ISO15693 communication protocols [1], and transmits the card data picked up by the reader to the host computer via USB interface. The reader has the advantages of simple hardware implementation and easy software secondary development. At the same time, due to good electromagnetic compatibility, the system is relatively stable and the communication reliability is guaranteed.


1 System Solution
This system mainly consists of four parts: radio frequency antenna, MF RC530, microprocessor and USB interface. The specific overall structure is shown in Figure 1.
The microprocessor uses an STC89C52 as the main controller. The microcontroller controls the MF RC530 to drive the antenna and perform read and write operations on the RFID card. The USB interface is used for data transfer between the lower-level machine and the upper-level machine.
The system's working process is described as follows:
The host computer connects to the reader's main control module via a USB interface, sending commands such as reading and writing cards, and receiving data and operations from the main control module. The reader communicates with the card through its radio frequency module and auxiliary antenna to exchange data with the card.



Figure 1 System Structure

2 Hardware Design
2.1 RFID Interface Circuit Design
The RF base station chip we selected is MFRC530[2]. MFRC530 is a member of PHILIPS' highly integrated card reader IC series used in 13.56MHz contactless communication. This chip highly integrates the modulation and demodulation of the RF card response signal, supports Mifare dual-interface cards and typical Mifare protocols, and fully integrates all layers of communication methods and protocols under 13.56MHz. It is suitable for various contactless communication applications based on ISO/IEC 14443A standards that require low cost, small size, high performance and single power supply. The internal transmitter part can directly drive the short-range antenna (distance up to 10CM) without adding active circuitry. The chip has both parallel port and SPI interfaces, which can be directly connected to any 8-bit microprocessor, thus providing great flexibility for the design of the reader. The MCU controls the MFRC530 by reading and writing to the special memory registers of the MFRC530 core of the contactless IC card reader/writer chip. All data on any RF card is transmitted through the MFRC530. By using different control commands to the MFRC530, the reading operation of the RF card can be realized.
The RFID interface circuit uses the SPI interface communication method, and the microcontroller selected is the STC89C52. The interface operates in a master-slave mode, with the microcontroller as the master device and the MF RC530 as the slave device. The specific circuit connection of the master device is shown in Figure 2.
The radio frequency interface is described as follows:
MOSI: Master device data output, slave device data input, connected to the P1.4 port of the microcontroller.
MISO: Master device data input, slave device data output, connected to the P1.7 port of the microcontroller.
CLK: Clock signal, generated by the master device and connected to the P1.3 port of the microcontroller.
NSS: Slave enable signal, controlled by the master device, connected to the P1.5 port of the microcontroller.
E500: Chip select signal, connected to the P1.6 port of the microcontroller.
R500: Reset signal, connected to the P1.2 port of the microcontroller.



Figure 2 Schematic diagram of RF interface circuit

2.2 Antenna Design
The schematic diagram of the antenna section is shown in Figure 2. The coils on the right side of the diagram serve as the reader's antenna. The antenna coil has a grounded center tap to improve antenna performance. The signal picked up by the antenna is sent to the RX pin via the antenna matching circuit. The MF RC500's internal receiver detects and demodulates the signal, processes it according to the register settings, and then sends the data to the microcontroller. The MF RC500 provides a 13.56 MHz energy carrier to drive the antenna via TX1 and TX2. The transmitted signal is obtained by modulating the transmitted data according to the register settings.
A crucial parameter in antenna design is its inductance. The following are the basic requirements for the construction of a card reader antenna:
1. Maximize the current in the antenna coil to generate the maximum magnetic flux Φ;
2. Power matching to maximize the use of available energy to generate magnetic flux;
3. Sufficient bandwidth to transmit the data modulated carrier signal without distortion.
2.3 USB Interface Design
The purpose of the USB interface is to transmit the acquired card data information to the host computer. We chose the CH374T [3] as the interface chip. This chip is a general-purpose interface chip for the USB bus, supporting USB-HOST mode and USB-DEVICE/SLAVE mode. It supports low-speed and full-speed control transmission, batch transmission, interrupt transmission and synchronous/isochronous transmission, supports low-speed and full-speed USB communication, and is compatible with USB V2.0. The CH374T has two optional microcontroller interfaces: an 8-bit passive parallel interface with a speed of 6MB and an SPI serial interface with a speed of 28MHz. In this design, we chose the 8-bit parallel interface. The specific interface circuit schematic is shown in Figure 3.
The CH374T's parallel port signal lines include: an 8-bit bidirectional data bus (D7-D0), read strobe input pin RD#, write strobe input pin WR#, chip select input pin CS#, and address input pin A0. The pin connections are described below:
The 8-bit data bus is connected to the P0 port;
RD#: Read strobe input, active low;
CS#: Chip select input, active low;
A0: Address/Data Input. When A0=1, the index address can be written; when A0=0, data can be read and written.



Figure 3. Schematic diagram of USB interface circuit.

3 Software Design
3.1 Card Programming
The transaction process between the RFID card and the reader is actually the process of data exchange between the card and the reader and the processing of data in the card's internal memory. During the data exchange process, in order to ensure the synchronization of data between the card and the reader and that the data can be correctly received and identified, it is necessary to establish a system communication protocol [4]. During the transaction process, the contactless card follows the communication protocol and executes a working process under the control of a finite state machine according to the received instructions, thereby completing the required function. The specific flowchart of the card operation is shown in Figure 4.
When a Mifare card enters the 10cm range of the RF antenna, the microcontroller sends a card query request through the MFRC530. The Mifare card returns information such as card status, communication protocol, and communication rate to establish the first step of communication between the card and the reader, thus completing the card query process.
After the card and reader complete the above two steps, a card selection operation must be performed to ensure the electronic tag is actually selected. The selected card returns its type code, and the password set on the card is authenticated. The authentication process involves three password verification operations. Only after successful authentication is the next step of reading and writing allowed. After correctly processing the above authentication, it is confirmed that a card has been selected. After selecting a card, the data on the card can be manipulated via commands from the host computer. These operations mainly include incrementing and decrementing values.
3.2 USB Driver Design
The CH374T has two operating modes: host mode and device mode, and supports seven endpoints. Based on the requirements of this design, the CH374T is set to device mode, and endpoint 0 is selected as the data upload and download endpoint. Since the CH374T has a built-in USB driver, only initialization, device enumeration, and definition of data transfer functions are required. The specific data transfer process is shown in Figure 5.

.

The initialization process involves setting the device address, clearing the interrupt flag, setting the polarity of the USB interface, setting the device to high-speed mode, enabling interrupt data transmission and USB device detection interrupts. After the device is correctly connected, it prepares for data transmission after a delay.
Device enumeration is a mandatory step for all devices. It performs necessary initializations and each enumeration is a standard device request process, primarily involving obtaining the device descriptor. Since this design selects endpoint 0, the device descriptor information should be sufficient for transmitting an 8-byte data packet on endpoint 0. Obtaining the configuration descriptor involves two processes: first, obtaining the total length of the configuration descriptor; second, retrieving the configuration descriptor to obtain all descriptor data.

4. Summary
Experiments show that the circuit designed using this method operates stably, has good anti-interference capabilities, accurate and reliable data reading and writing, and high security, meeting the needs of various applications in automatic identification systems. This design has already been used in on-site inspections of the Yellow River root stone displacement detection system. The results demonstrate that the reader is reliable, achieves its intended design objectives, and can be promoted and used in other locations.
References
[1]ISO/IEC144433: Identification cards Contactless integrated circuit cards Proximity card Part2.3: Radio frequency Power and signal interface. Initialization and anti-collision.
[2] Shan Chenggan, Chai Bin, Yao Lei. High-integration TYPE A reader chip MFRC500 and its application [J]. Foreign Electronic Components, 2004(8):34-37.
[3]http://www.winchiphead.com/product/ch375detail.htm
[4]Philips Semiconductors. Mifare MF -RC500 Highly Integrated ISO14443A Reader IC Data Sheet. Philips corporation.
About the author: Lu Yinju (1976-), from Xinyi, Jiangsu Province, holds a master's degree and is a lecturer. His research interests include electronic measurement and control technology and intelligent instruments.
Contact information: School of Information Engineering, Zhongzhou University, No. 6 Yingcai Street, North University Town, Zhengzhou, Henan Province
Postal code: 450044
Contact number: 13526867795
E-MAIL: [email protected]

Read next

CATDOLL 146CM Laura TPE

Height: 146cm A-cup Weight: 26kg Shoulder Width: 32cm Bust/Waist/Hip: 64/54/74cm Oral Depth: 3-5cm Vaginal Depth: 3-15c...

Articles 2026-02-22
CATDOLL Maria Hard Silicone Head

CATDOLL Maria Hard Silicone Head

Articles
2026-02-22
CATDOLL Q Soft Silicone Head

CATDOLL Q Soft Silicone Head

Articles
2026-02-22
CATDOLL Maruko Soft Silicone Head

CATDOLL Maruko Soft Silicone Head

Articles
2026-02-22