Available online at www.sciencedirect.
com
Available online at www.sciencedirect.com
Procedia
Engineering
Procedia Engineering
Procedia 00 (2011)
Engineering 000–000
29 (2012) 325 – 328
www.elsevier.com/locate/procedia
2012 International Workshop on Information and Electronics Engineering (IWIEE 2012)
Design of RFID Card Reading System
Junhao Niua,b,*, Chuanpei Xua, Peng Chena, Mengxiang Lianga
a
School of Electronic Engineering and Automation, Guilin University of Electronic Technology, Guilin, Guangxi, 541004, China
b
School of Electronical & Machanical Engineering,Xidian University,Xi’an 710071,China
Abstract
In this paper, a designing method of RFID (Radio Frequency Identification) card reading instrument is introduced
in detail, and the hardware structure and principle are expounded. By using HY-502 which is a RFID module and
LPC2368 which is an ARM core controller, the RFID card information is received and translated to computer by
RS232 or USB interface. With the corresponding computer application and database, the card information could be
achieved and displayed. The instrument has good prospects in schools, transport, supermarkets, logistics and other
fields.
© 2011 Published by Elsevier Ltd.
Keywords: RFID; Reading Instrument; LPC2368; HY-502
1. Introduction
Radio frequency identification is a new technology developed in recent years. Radio frequency
identification technology and IC card technology are combined together to solve the problem of passive
and avoid contact successfully [1]. The radio frequency card, with no special power supply and no
mechanical contact with the reader, could avoid contact failure. It is no exposed silicon surface, and has
the feature of waterproof, easy use, no different of negative and positive. In short, non-contact RF card
has the advantages of high reliability, using easily, and high operating speed.
The reading system with RFID technology is designed for a supermarket to manage the shopping cards,
loyalty cards, VIP cards. The RFID reader instrument reads encoded information of RF card via radio
frequency technology, sends to computer by the serial communication interface or USB interface. And the
* Corresponding author. Tel.: +86-0773-2191029; fax: +86-0773-2191029.
E-mail address: junhao@guet.edu.cn.
1877-7058 © 2011 Published by Elsevier Ltd.
doi:10.1016/j.proeng.2011.12.716
326
2 Junhao Niu, Chuanpei Xu,Junhao Niu et
Peng Chen andal.Mengxiang
/ Procedia Engineering 29 (2012)
Liang / Procedia 325 – 328
Engineering 00 (2011) 000–000
application software queries the user database to determine the level of the card owner, balance and the
state of integration. The RFID reader instrument is one of the important parts to provide rapid, convenient
method of identification for management system. With the corresponding computer control software, can
be easily applied to public transport system, supermarket, schools, companies, cinemas, restaurants and
other fields where personnel is relatively concentrated, and the identity of staff need to confirmed quickly
or consumption occasions with high frequency. With the listed advantages the RFID reading system will
have good prospects in the future.
2. System Block Diagram
The RFID reading system is mainly combined by LPC2368 core control circuit, HY-502A reader
circuit, the local real-time clock circuit, RS232 serial communications interface circuits, slave USB
interface circuit, and LCD display circuit as shown in Fig. 1. The control core of hardware is LPC2368, a
controller with ARM core. LPC2368 query the HY-502A to get the card information, if one or more card
is found, LPC2368 will read the series number of the card and upload to computer for advanced process
by RS232 interface or slave USB interface. The application software installed in computer queries the
user database to get the information of the card owner, such as owner identity, balance of the shopping
card. Then the information is sent to display via LCD. The real-time clock is used to provide the time
information for operation when the computer is absent.
LCD Displayer
SPI USB
LPC2368 Computer
UART1
MAX563
UART2
IIC
HY-502A Module
Fig. 1. System block diagram
3. Hardware Design
3.1. Design of Controller Circuit
LPC2368, which is the 32-bit ARM7 processor produced by NXP Company, is selected as the core
controller in this paper. A unique accelerator architecture enable 32-bit code execution at the maximum
clock rate of 72 MHz. Advanced Vectored Interrupt Controller (VIC), supporting up to 32 vectored
interrupts. It incorporate a 10/100 Ethernet Media Access Controller (MAC), USB full speed device with
4 KB of endpoint RAM, four UARTs, two CAN channels, an SPI interface, two Synchronous Serial Ports
(SSP), three IIC interfaces, and an I2S interface [2,4]. It is ideal for multi-purpose serial communication
applications, industrial control, medical systems, protocol converter, and communications.
Junhao
NiuNiu et al./ /Procedia
Junhao ProcediaEngineering
Engineering00
29(2011)
(2012)000–000
325 – 328 327
3
In this paper, LPC2368 can be used effectively with USB, UART, SPI, GPIO and other bus interfaces
[2], to implement the communication with computer, LCD monitors, HY-502 RFID card reader module
and other peripherals circuit. Either USB interface or RS-232 interface will be used to communicate with
the host computer. The entire system is powered with the 5V voltage source from USB port or regulator
voltage source. The working voltage of LPC2368 is 3.3V, and is supplied by L1117-3.3.
The logic level of master LPC2368 does not match the voltage level of RS-232 serial port of computer.
In this paper Dallas’s MAX563, a +3.3V-Powered dual transceiver with receivers active in shutdown [3],
is used for voltage level conversion between LPC2368 and computer. Controller is the core of the card
reading system.
3.2. Design of RFID Card Reading Circuit
The HY-502A reader module is designed to read and write Mifare1 S50 series RF card. The module
circuit is shown in Fig. 2. SCL and SDA is the data bus of IIC interface of HY-502A, respectively,
connected to P0.28 (SCL0) and P0.27 (SDA0) of the microcontroller for the card information
transmission. Pin3, pin 4, pin 6 of the module are sated to determine the reader's address. According to
the address formula, the module address can be calculated as 0xA0 when A0, A1, A2 are all be polled to
ground. Pin 5 is the reset port of the card reader module and be active at low level. SIG is connected to
INT1. When a card move into the readable range of the antenna, the card reader module will make the low
level output to drive the host controller into the external interrupt response.
SW-PB
VCC S2
R6
10K
10UF
U?
SCL
1-SCL
SDA
2-SDA 15-GND
3-MOSI 14
4-NSS 13-GND
5-RST 12
6-M1 11-GND
SIG
7-SIG 10
VCC 8-VCC
9-GND
HY502-A
Fig. 2. Circuit of HY502A
HY-502 Series RFID reader module is a highly integrated with ISO14443A. Users need not care about
the complex control methods of radio base station, but simply send commands by selecting interface.
HY-502 series supports Mifare-One S50, S70, Ultra-Light & Mifare-Pro, FM11RF08 and other
compatible cards. The automatically looking for card is set by default, but PC can turn off automatically
looking for to increase the efficiency of read and write cards when needed.
3.3. Design of LCD Display Circuit
In this paper, a 128 * 64 graphic LCD module is used to display the working status and user messages.
The LCD module could be controlled with ether 4/8 bit parallel bus or 2/3 wire serial interface. Using the
flexible control bus and the simple operation command, the graphical display interface could be built
easily.
328
4 Junhao Niu, Chuanpei Xu,Junhao Niu et
Peng Chen andal.Mengxiang
/ Procedia Engineering 29 (2012)
Liang / Procedia 325 – 328
Engineering 00 (2011) 000–000
4. Software Design
The control software running on computer is designed with Visual C++6.0 building platform. Both
USB interface and RS232 interface could be used to transfer command and data, to realize the
initialization, query, read, write and other operations of RFID reader. By querying the database to obtain
information about the RF card holders, and to calculate, display the information. The operation flow of
computer control software is shown in Fig. 3.
Start
Query Database
Connect Instrument
Display User Message
Send Query Command
Send User Message to
No LPC2368 for Display
Find Card?
Yes Change User Message
Query Card Number No
Operate Finash?
Recieve Card Number Yes
Clear Message
Fig. 3. Operation flow of computer control software
5. Conclusion
Based on the feasibility study of RF IC card technology, computer technology, database technology,
the RS232, USB interface are proposed to achieve the control of products and a non-contact IC card
management system is designed and implemented. A common hardware and software-specific system
structure is realized. And by modifying the software without changing the hardware, the system could be
easily used in highway toll collection systems, parking fare collection system, subway non-contact type IC
card systems and other applications on different occasions. The system could avoid duplication designing
of hardware, and provides convenience for future upgrades.
References
[1] Pavel Vrba, Filip Macůrek, Vladimír Mařík. Using Radio Frequency Identification in Agent -Based Manufacturing Control
Systems. Holonic and Multi-Agent Systems for Manufacturing, 2005, p. 176-187.
[2] NXP Company. LPC2364/65/66/67/68 product datasheet. 2008, p. 1-5.
[3] Maxim Integrated Products. MAX563 product datasheet. 1993, p. 1-8.
[4] DongFa Chen, NingXi Zhu. Design and Implement of an Ethernet Interface Based on LPC2368. Microcomputer Information.
2008, vol. 24(5-2), p. 119-120.
[5] BenZheng Fan, ZhongShen Li. Design of multi-channel temperature measuring and controlling system based on ARM.
Electronic Test, 2008, vol. 10(10), p. 28-32.