1 Introduction
With the development of information technology and the enhancement of people's security awareness, electronic lock technology has developed rapidly. The electronic lock system has long gone beyond simple doorway and key management, and has gradually developed into a complete access management system. The development of electronic lock systems has gone through single password keyboard electronic lock systems, IC card electronic lock systems, non-contact IC card electronic lock systems, and now the latest biometric identification system. Among them, the non-contact IC card electronic lock system has been widely used due to its mature technology, low price, easy to use and other superior properties. Based on the research on RS485 and TCP/IP communication protocols, this paper proposes a non-contact IC card electronic password lock system based on radio frequency identification technology.
2. System structure
The system adopts a hierarchical distributed centralized control scheme to form a distributed network of all electronic code locks. Its overall structure is shown in Figure 1. The entire system includes a three-layer structure of the management center server, user building PCs, and electronic password locks.
Figure 1 System structure diagram
The management center server is the management and control center of the entire electronic password lock system, and also runs the electronic password lock management system program and database. The database adopts a database structure that supports network communication to facilitate function expansion. In order to achieve unified security management of all electronic code locks, users open the electronic code lock by using a non-contact IC card and entering the password, and the user's IC card information, security time, etc. are stored in the database. Administrators can clearly query the usage status, entry and exit records, etc. of each electronic code lock through the electronic code lock management system program.
The user building PC uses an RS485-TCP/IP communication converter, which is responsible for the information interaction between the electronic password lock and the management center server, realizes the function of data forwarding, and realizes the conversion of RS485 and TCP/IP communication protocols. It does not directly control the electronic password itself. lock action. Its main function is to convert the RS485 signal of the electronic code lock into a TCP/IP signal, thereby directly connecting to the LAN and realizing communication between the management center server and the electronic code lock.
3. Electronic code lock design
3.1 Working principle
The non-contact IC card electronic password lock system is based on radio frequency identification technology and mainly uses a Mifare card-specific read and write processing chip MFRC530. It is a small Mifare card radio frequency base station with a maximum operating distance of 10 cm. Its functions include modulation, demodulation, radio frequency signal generation, security management and anti-collision mechanism. It is the core module for wireless communication with non-contact IC cards. , is also a key interface for reading and writing contactless IC cards. In this system, when a card enters the radio frequency antenna induction area, the electronic password lock reads the card number of the contactless IC card, stores the read card number and user password in the memory, and at the same time sends the user card number and card swiping time to the user building. build the PC and display the user information on the LCD display. When no card enters the RF antenna sensing area, the MCU reads the time in the real-time clock chip and displays the current time and date on the LCD display.
3.2 Hardware composition
Each electronic code lock can independently complete a series of operations such as monitoring the door status and lock status, identifying whether the card is valid, monitoring card swiping actions in real time, controlling the electronic code lock and alarm, and reading keyboard information. The hardware part of the electronic password lock system mainly includes RF base station MFRC530, keyboard input module, LCD liquid crystal display, monitoring control module, RS485 communication interface, clock DS1305, information storage unit and buzzer alarm. The hardware block diagram of the circuit is shown in Figure 2:
(1) The system uses the microcontroller STC89C58RD+ as the control chip, which is the control core of the electronic code lock system and is used to control and coordinate the processing of data information of the electronic code lock system. STC89C58RD+ has built-in 32K Flash memory and 1280 bytes of RAM, has three 16-bit counters and a standard serial communication port, and has a P4 port, strong encryption, super anti-interference, ultra-low power consumption, and online system. Programmable and remotely upgradeable.
(2) The radio frequency base station module uses Philips' MFRC530 chip. MFRC530 is the core module for wireless communication with the radio frequency card. It modulates the data in the sending buffer according to the setting of the register to obtain the sent signal, which is sent out in the form of electromagnetic waves through the antenna driven by the TX1 and TX2 pins. The non-contact IC card responds using load modulation of the RF field. The antenna picks up the response signal of the non-contact IC card and sends it to the RX pin through the antenna matching circuit. The MFRC530 internal receiving buffer detects and demodulates the signal and processes it according to the register settings. The processed data is sent to the data bus and waits for MCU to read. MCU and MFRC530 use SPI bus to communicate, which can realize wireless transmission of data with non-contact IC cards.
(3) The information storage unit is mainly used to store user interaction information and prevent network failures from affecting the normal use of the electronic code lock, thereby achieving the isolation of the electronic code lock. The user information of the storage unit must be consistent with the server database information. The information storage unit uses a ferroelectric memory (FRAM) FM38081 produced by Ramtrom Company. The new FRAM has a storage capacity of 32k×8bits. It has the characteristics of high-speed reading and writing, ultra-low power consumption and unlimited reading and writing. It is especially suitable for those who Occasions that have high requirements on data collection and writing time. Since the MCU does not have an IIC bus interface, FM38081 needs to use the industrial standard IIC bus for external interfaces, so this system uses P2.3 and P2.4 port lines to simulate the IIC bus.
(4) The system needs to record the time when the card is swiped, and provides an accurate and reliable clock by using the low-power serial communication interface dedicated chip DS1305 launched by the American DALLAS company. DS1305 supports time correction and data reading through the SPI serial data port or standard three-wire interface, and can perform single-byte continuous reading byte beam access. In this system, SERMODE is grounded and three-wire serial mode is used for data communication with the microcontroller: SCLK is used as the clock input, SDA is used as the serial data input and output, and RST is used as the communication permission signal.
(5) The detection control module mainly monitors door, lock status and communication status in real time, and executes various control information of the controller, such as executing commands, executing alarms, etc.; the LCD display part uses 128× with ST7920 as the controller. 64 LCD module with Chinese character library, used to display time, date and various status information, as an interface for human-computer interaction; the keyboard input module uses 4*4 keyboard input, mainly providing user input information for the MCU; buzzer alarm part It will sound an alarm for the error status of the electronic code lock.
4.Software design
The programs of the electronic password lock system include: MFRC530 operation program for non-contact IC cards, MCU and MFRC530 communication interruption processing program, read and write clock chip DS1305 and LCD liquid crystal display program, door and lock status detection program and memory read and write program, etc. . The main program flow chart of the electronic password lock is shown in Figure 3.
Figure 3 Main program flow chart of electronic password lock
5.Existing problems and solutions
5.1 Combination of distributed structure and centralized unified management
A key technology for establishing a distributed electronic code lock management system is the data transmission method between electronic code locks distributed in different places and the management center server. If the electronic lock directly exchanges information with the server through RS485 signals, it will lead to problems such as short transmission distance, slow information exchange speed, and poor anti-interference ability. The TCP/IP protocol has the advantages of fast transmission speed, infinite transmission distance, stable communication quality, and is not susceptible to external interference. Therefore, during the implementation process, the RS485-TCP/IP communication converter is used to realize the conversion of RS485 and TCP/IP communication protocols and realize the forwarding of information.
5.2 Isolation of electronic code lock
In the electronic code lock system, the user information (such as card number and password) of each electronic code lock is stored in the information storage unit of the corresponding electronic lock. The electronic lock controller reads the corresponding user information in the information storage unit and passes Compare with the user input information to determine the legitimacy of the current user, ensuring that when the management center server or communication network fails, it will not affect the use of the electronic lock and achieve the isolation of the electronic password lock.
Previous article:Control the buzzer through a microcontroller
Next article:Comparative analysis of two methods of CAN bus and Ethernet embedded gateway circuit design
- Popular Resources
- Popular amplifiers
- Learn ARM development(16)
- Learn ARM development(17)
- Learn ARM development(18)
- Embedded system debugging simulation tool
- A small question that has been bothering me recently has finally been solved~~
- Learn ARM development (1)
- Learn ARM development (2)
- Learn ARM development (4)
- Learn ARM development (6)
Professor at Beihang University, dedicated to promoting microcontrollers and embedded systems for over 20 years.
- LED chemical incompatibility test to see which chemicals LEDs can be used with
- Application of ARM9 hardware coprocessor on WinCE embedded motherboard
- What are the key points for selecting rotor flowmeter?
- LM317 high power charger circuit
- A brief analysis of Embest's application and development of embedded medical devices
- Single-phase RC protection circuit
- stm32 PVD programmable voltage monitor
- Introduction and measurement of edge trigger and level trigger of 51 single chip microcomputer
- Improved design of Linux system software shell protection technology
- What to do if the ABB robot protection device stops
- Wi-Fi 8 specification is on the way: 2.4/5/6GHz triple-band operation
- Wi-Fi 8 specification is on the way: 2.4/5/6GHz triple-band operation
- Vietnam's chip packaging and testing business is growing, and supply-side fragmentation is splitting the market
- Vietnam's chip packaging and testing business is growing, and supply-side fragmentation is splitting the market
- Three steps to govern hybrid multicloud environments
- Three steps to govern hybrid multicloud environments
- Microchip Accelerates Real-Time Edge AI Deployment with NVIDIA Holoscan Platform
- Microchip Accelerates Real-Time Edge AI Deployment with NVIDIA Holoscan Platform
- Melexis launches ultra-low power automotive contactless micro-power switch chip
- Melexis launches ultra-low power automotive contactless micro-power switch chip
- Selling Raspberry Pi 3b+ with 7-inch display and camera, beaglebone black, nrf52840 original development board
- How to design amplifier circuits with different frequencies?
- Download the LTpowerPlanner System-Level Design Tool Quick Start Guide for free
- Loop-Powered 4mA to 20mA RTD Temperature Transmitter Reference Design with MSP430 Smart Analog Combo
- Can you guys answer my question about 74HC04?
- OFDR for short-range high-precision measurements
- FPGA instantiation issues
- EEWORLD University ---- MSP430 capacitive touch technology - waterproof Demo
- Study for the rise of China! Hainan student with full score chooses to enter Tsinghua University to make chips
- MSP430F5529 RCT official routine