The radio frequency card is a combination of wireless radio frequency technology and smart card technology. It has the characteristics of simple use and convenient maintenance.
In order to improve the modern management and remote monitoring capabilities of the access control system, an access control system based on Web technology is introduced. The system uses wireless radio frequency technology. When a non-contact IC card appears in the radio frequency range of the reader, the card is read and the information is transmitted to the server through serial communication for related data processing, and a management platform based on the C / S mode is built. , The administrator can query and control the access controller through the Web page, thereby effectively real-time monitoring of information in any location on the Internet.
I. System Architecture
The system uses a non-contact IC card and uses radio frequency identification technology RFID (RadioFrequencyIdentification) to detect the IC card. When the IC card is close to the reader, the reader can accurately identify it and send its serial number to the main controller With the PC, connect to the background database through the application to obtain user information corresponding to the card number.
If the card has been registered, it will pass the verification and notify the controller to open the door, and record the card number and the door opening time; otherwise, it is forbidden to pass and notify the cardholder to leave.
The system consists of five parts: electronic tag, reader, serial communication, server and user terminal. As shown in Figure 1. The reader is the core of the system. It communicates with the IC card (electronic tag) through radio frequency signals to complete the work of reading, storing and sending data. It can work independently or on the Internet. RS232 serial communication is used to connect to the server. .
The C / S structure is used between the server and the client. The connection between the application software and the database SQLSERVER2000 is realized through the ADO object, and the two are interconnected through the local area network. With the authority granted by the system administrator, users can query, count, and print all relevant records of the management system.
Second, the hardware design
(I) Overall hardware design
The radio frequency reader is the core of the system. It consists of the main control circuit, radio frequency reading and writing circuit, antenna coupling circuit, and antenna. It is responsible for radio frequency signal processing and data transmission, and completes the task of reading the IC card serial number.
The electronic tag, namely the radio frequency card, is composed of an IC card and an inductive antenna, and is packaged in a standard PVC card without any exposed parts of the chip and its antenna. The card does not need a power source. When it is close to the reader within a certain range, the data is read and written through the antenna. This article chooses Philips Mifare1 card, which is based on the ISO14443TYPEA international standard. Each card has a globally unique serial number and has anti-collision functions.
The function of the antenna is to generate magnetic flux, provide power to the card, and transmit information between the reader and the card. The effective electromagnetic field range of the antenna is the effective working area of the system.
The read-write chip is a special chip MFR500 produced by Philips for reading and writing Mifare1 cards. The working frequency is 13.56MHz.
The main controller is composed of AT89S52 single-chip microcomputer and its peripheral circuits, and is responsible for controlling the read-write module, serial communication with the PC and control operations on external equipment. Among them, the operation of the read-write module by the one-chip computer is to realize the operation of the Mifare1 card by controlling the MFRC500.
It is a bridge for data transmission between the microcontroller and the IC card.
(B) RF circuit design
The core of the RF circuit is the read-write chip MFRC500, which is the bridge for data transmission between the microcontroller and the IC card. Its connection to the microcontroller.
The single-chip microcomputer adopts interrupt control mode for the read-write chip, and the interrupt control port INT0 is connected to the IRQ pin of the MFRC500. There are 64 registers in MFRC500. The single-chip microcomputer configures and operates them by writing control commands to the registers. The power-down detection pin RSTPD is connected to the P2.0 pin of the microcontroller, the NCS pin is connected to P2.7 pin, and NWR and NRD are Connected to the MCU read and write ports WR and RD pins. The data ports D0 ~ D7 are connected to the microcontroller P0 port. The quartz crystal oscillator generates a working frequency of 13.56MHz. Generated higher harmonics. The receiving circuit is composed of R1, R2, C3, and C4. The VNID potential generated inside the MFRC500 is used as the input potential of the RX pin. In order to reduce interference, the VIND pin is connected to a capacitor C3 to ground. The voltage transformer (R1) is preferably a capacitor (C4) connected in series between the antenna coil and the inverter. In order to obtain better performance, these components should be close to the antenna pins RX, TX1, TX2 of the MFRC500 chip when wiring the circuit board.
(Three) antenna circuit design
In order to obtain stable and reliable RF signals, the performance of the antenna is very important, which directly affects the working distance and sensitivity of the reader. The performance of an antenna is related to its quality factor Q, which is related to the antenna's geometry, size, and number of turns.
The system design is a close-coupled IC card. The antenna is made by using a PCB antenna, that is, the antenna circuit board is directly made on the PCB. This method has good stability.
When the antenna is connected to a read-write chip, an external matching circuit is required. The system roughly estimates the antenna, and changes the capacitance value of the matching circuit to achieve a better reading and writing distance.
The system software includes two parts, the lower computer and the upper computer management system. Among them, the lower computer uses the AT89S52 single-chip microcomputer as the core to realize reading of the reader, access control and serial communication. The programming language used is C and the compiler is KeilC51. The host computer management software runs on the server and uses Visual C ++ 6.0 and SQLSever2000 for system management and database development, including three parts of serial communication, monitoring management and information release. The monitoring and management software is used to implement tasks such as user registration, record query, and deletion, and information release is used by administrators to view log records of access control through web pages.
(A) software design of the lower computer
The software runs on the single-chip microcomputer, completes the reading of the card number, the control of the door lock and the auxiliary circuit, and the serial communication. As shown in the flowchart in Figure 5. The core of the software is to realize the communication between the MFRC500 and the Mifare1 card. The communication must follow the ISO14443TYPEA standard transmission protocol. The card reading process must be performed in strict accordance with a fixed order, that is, resetting and responding to the anti-collision card authentication and reading and writing card. Because the card is readable, you only need to read the card's serial number, and you don't need to write to the corresponding sector, so you can ignore the authentication step. The main code is as follows:
(Two) software design of host computer
In the VC ++ 6.0 programming environment, the CSerialPort class is used to implement serial communication, receive the serial number of the IC card sent, and then access the database through ADO technology to obtain the user information corresponding to the card for verification processing.
The system is based on SQLSERVER2000 for database development. The administrator must enter the account and password to enter the system to prevent non-system administrators from illegally logging in to the system. After that, the administrator can complete the registration, query, modification and deletion of the card number information, and record the visiting information (user and travel time) in the database for data statistics and query. Functional modules for monitoring and management software.
The information publishing module is implemented based on ASP.net. The implementation process is mainly through ado.net to read the monitoring and management information table of the SQLServer database. View system information and access records.
Fourth, the program runs
Taking the access control management of the laboratory of Guilin University of Electronic Technology as an example, the software and hardware design of the system is realized. After entering the account and password, the administrator enters the main interface of the monitoring management software as shown in Figure 7.
Monitoring management software main interface
After testing, the effective working distance of the IC card is 6cm. When the IC card responds, the system automatically displays the card number, card user information, and entry time, and automatically saves it into the background database. Because the Mifare1 card has a globally unique serial number, member information can be bundled with the IC card serial number and stored in the database during member registration. In this way, you can look up information accurately by time or directly by name.
The proposed access control management system based on RFID and Web services provides intelligent control and remote management mechanism for access of important departments. It adopts radio frequency technology RFID to realize keyless access, which is not easy to lose and can be reused. It uses SQL database and Web services to realize remote monitoring of access control. It is convenient, flexible and safe to operate. Application prospects.