Design of the hottest low power RF IC card reader

2022-09-23
  • Detail

Design of low-power RF IC card reader and writer

this paper introduces the design of a portable patrol machine (RF reader and writer). The reader is mainly composed of MCU, RF IC card reading and writing module, antenna and USB communication interface. In order to facilitate the real-time recording of patrol, the system adopts a clock chip with time reference function

with the rapid development of intelligent residential areas and intelligent buildings in recent years, the patrol system will have a wide application prospect. The main development indicators of handheld reader include miniaturization, low power consumption, portability and convenient data transmission interface

overall design scheme of reader writer

portable IC card reader writer is mainly powered by battery. Because the reader and writer constantly emit radio waves, the power consumption is large, so we must consider how to reduce the power consumption from every detail, so as to prolong the service time of the battery as much as possible. The hardware adopts low-power design, such as low-power devices, low-voltage, modular power supply, etc; The software adopts large-scale design to minimize the working time of the processor and make it in a low-power operation mode

the reader/writer shall be designed to meet the following requirements: it has self-test function, which can first check whether the equipment is faulty when starting up; It can accurately and quickly read the information in the contactless IC card; With audible and visual alarm circuit; The battery is directly powered, which can be powered by three AA nickel metal hydride batteries. The static starting current is not greater than 10mA, and the working current is not greater than 40mA; With USB communication interface; Small size, low cost, stable and reliable performance

overview of system functions

according to the requirements of patrol system in different occasions, it is necessary to timely understand the patrol situation of patrol personnel to ensure the safety of communities, shopping malls, railway lines and other occasions

therefore, the system should have the following functions: install a series of RF cards representing different points on the determined patrol line, and when arriving at each point, the patrol personnel use the handheld patrol machine to approach the patrol inspection point, and record the card number and time representing the point at the same time; After the patrol is completed, the patrol machine stores the collected information into the USB disk through the USB interface chip or directly transmits it to the computer software for processing

system hardware design

Figure 1 is the principle block diagram of portable RF reader/writer

Figure 1 Schematic diagram of card reading module system

the system takes MCU stc89le58 as the core and is responsible for the monitoring of the whole system. Fm1702n is a special chip for contactless card reader (compatible with MF RC500), which is connected with MCU in parallel communication mode. Under the control of MCU, the reader communicates with the card through RF module and its antenna. The system uses low-power real-time clock/calendar chip to record the time of data collection, and uses virtual I2C bus for data exchange; CH375 is connected with MCU through serial input, serial output and interrupt output. It supports various commonly used USB full speed devices. MCU communicates with USB devices through CH375 according to the corresponding USB protocol. When operating each module, the battery supplies power to it, and the voltage is 3.3 ~ 3.6V

1 design of main control module

the main control module of reader writer is composed of MCU and its peripheral circuits. Refer to the working voltage of MCU and the low power consumption mode provided, and select the MCU that integrates the required peripheral chips according to the design needs. Based on the above three principles, the MCU stc89le58 with super anti-interference, high speed and low power consumption is selected, which has a 16kb EEPROM inside. In addition, because of its wide working voltage range (2 ~ 3.8V) and low power consumption, it is especially suitable for battery power supply system

Figure 2 is the circuit schematic diagram of the main control module. The communication between USB interface chip CH375 and reader/writer chip fm1702n and MCU adopts parallel port communication mode, which is directly connected to the system bus of MCU

Figure 2 circuit schematic diagram of the main control module

2 RF module design

the read-write module is the medium for RF IC card to communicate with the outside world. The antenna connected to the read-write module resonates with the IC card coil, carries out data transmission, and completes the communication between the read-write module and the card. The fm1702n used in this design supports the type a contactless communication protocol at 13.56MHz frequency. It is the core module to realize wireless communication with contactless IC card, and it is also the key interface chip. According to the design of the register, it modulates the data in the transmission buffer to get the transmitted signal, which is sent out in the form of electromagnetic wave through the antenna driven by TX1 and TX2 pins, and the IC card responds with the load modulation of RF field. The response signal of the IC card picked up by the antenna is sent to the RX pin through the antenna matching circuit. The fm1702n internal receiving buffer detects and demodulates the signal and processes it according to the setting of the register. The processed data is sent to the parallel interface and read by MCU

3 antenna design

in order to communicate with the contactless IC card, the reader must have an antenna that can transmit and receive RF signals. Antennas of different sizes and shapes can be designed for different applications. The specific steps of antenna design are: setting the working environment of the reader writer, optimizing the coupling coefficient between the reader writer and the transponder, and determining the antenna coil and capacitance

the contactless IC card antenna uses inductive coupling to generate magnetic flux, which is used to provide power to the transponder and transmit data between them. Therefore, there are several basic requirements for the structure of the reader/writer antenna: maximize the current of the antenna coil to generate the maximum magnetic flux Φ; Power matching to maximize the use of available energy to generate magnetic flux; After storing the original data, there is enough bandwidth to transmit the data modulated carrier signal without distortion

4 buzzer drive circuit design

the buzzer sends out an alarm indicating sound when each card reading operation is unsuccessful. Due to the limited driving capacity of MCU i/o port, it is generally unable to directly drive the piezoelectric buzzer. Therefore, a PNP transistor is selected to form a transistor driving circuit, and the output of MCU i/o port (p3.4) can drive the buzzer after being amplified by the driving circuit. In this design, the working current of the buzzer is 10mA, and its driving circuit is shown in Figure 3

Figure 3 buzzer drive circuit

5 clock circuit design

as shown in Figure 4, the real-time clock is realized by the low-power CMOS real-time clock/calendar chip PCF8563, which provides a programmable clock output, an interrupt output and a power down detector, and all its addresses and data are transmitted serially through the I2C bus interface (the analog I2C serial port is composed of P1.6 and P1.7 of stc89le58r). The clock circuit mainly collects real-time time for real-time tracking and recording. At the same time, considering that PCF8563 is a real-time clock chip, it still requires continuous power supply when there is no external power supply to maintain the accuracy of the time. Therefore, this part of the circuit also adds the function of power failure protection

Figure 4 clock circuit

6 communication interface design

the system uses USB for communication, and the USB interface chip adopts CH375, which supports host mode and slave device mode. Under the USB host mode, CH375 provides two communication modes: parallel and serial. In this design, parallel port communication mode is adopted. D7 ~ d0, RD, WR, A0, CS of 8-bit passive parallel interface are directly connected to the system bus of MCU, and the circuit connection is simple. CH375 has built-in firmware for processing the special communication protocol of mass storage devices, so the MCU of the reader writer system can communicate with the USB device through CH375 according to the corresponding USB protocol, and the U disk can be used as a removable mass storage. Without detailed understanding of the USB communication protocol, it is possible to read and write data

system software design

system software design is mainly divided into three parts, namely, the application program design of fm1702n, USB interface program design and main program design

the reader writer wakes up from sleep to detect the card. If there is a card or a communication request, it will carry out the normal working process of card reading, writing records, communication, etc., and enter sleep after the work is completed. If there is no card, it will directly enter the sleep state. The wake-up pulse is fixed for 500ms once, and the shielding wake-up is interrupted in the normal working state. Therefore, when the terminal is in the card free state, it is awakened every 500ms to detect the card. The time of card detection is the main consumption time of current, so it is critical to shorten the time of card detection. The system card detection time of this design is 2ms, so that the terminal can realize card detection without external intervention, and the power consumption is very low. In the card free state, in each 500ms cycle, there are 2 ~ 3MS in the working state, the maximum transient current is 40mA, 497 ~ 498ms in the sleep state, the current is only a few microamps, and the overall average current is 50 μ A. So as to meet the requirements of low power consumption of handheld terminals

mcu adopts C51 language programming, and the system software flow chart is shown in Figure 5

Figure 5 system software flow chart

power consumption test results of reader writer

when the designed system is actually tested, it is often found that the power consumption is not as small as theoretically calculated. At this time, we must first distinguish whether the power is consumed by the MCU itself or by the peripheral circuit driven by the i/o pin. The simplest way to judge is to measure the current of MCU power input pin and MCU ground pin respectively. Only when the two values are basically equal, the power consumption of the whole system is the lowest, Li Ning said. It can be analyzed from the following aspects: all input pins cannot be suspended. If it is suspended, the digital input buffer is only needed to generate switching current, thus increasing power consumption. All unused pins are set as outputs and set to fixed high or low levels. If the current of MCU power input pin and the current of grounding pin are not equal, the i/o pin must output or absorb the current. You should carefully look for the i/o pin that outputs or absorbs the current and take measures to reduce power consumption. Check whether all the peripheral circuits on the chip are turned off, otherwise the peripheral circuits will consume additional current

the test results of this design are as follows: the standby current is 7ma, and the current is 38ma when reading and writing IC cards. The power consumption of the reader writer is closely related to the input voltage. With the increase of the input voltage, the power consumption of the reader writer will also increase accordingly, so it is very important to choose a reasonable input voltage. If three nickel metal hydride batteries are used for power supply, the reader and writer can work continuously for more than half a year. The test results of the designed reader and writer show that the IC card can be found in the range of 0 ~ 8cm in general environment; The reading and writing distance is 0 ~ 4cm, which can complete all work design functions normally, and the operation is stable. It basically meets the requirements of gb17428 (1) 998 BS EN 1366 (1): 1999, the fire resistance test method of technical air ventilation pipe

however, this design needs to be improved in many aspects. For example, LCD display and keyboard can be added to the reader writer; This design does not consider the software design of the upper computer; The application program can be further optimized to improve the execution efficiency of the program. (end)

Copyright © 2011 JIN SHI