Intelligent electronic door lock system using TEMIC proximity card technology

Publisher:sjjawx831Latest update time:2016-12-28 Source: eechinaKeywords:TEMIC Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

1 Overview

Early intelligent electronic door locks were magnetic card locks that used magnetic cards as door keys, and were mainly used in hotel rooms. With the development of semiconductor technology, more powerful and reliable contact IC card intelligent electronic door locks have become mainstream. The main advantages of contact IC card electronic locks are large card storage capacity and a relatively complete mechanism. With intelligent electronic door locks, multiple door opening permissions can be flexibly set to prevent illegal copying and achieve hierarchical management and regional management. Its time control function and door opening record storage function have completely changed the single function of mechanical door locks, making door locks part of the management system, greatly improving the management level and service level, and thus gradually becoming one of the basic facilities of star-rated hotels.

Entering the 21st century, inductive IC card (also known as contactless IC card) technology has developed rapidly, and a new generation of intelligent electronic door locks based on inductive IC card technology has also emerged. Since inductive intelligent electronic door locks have no mechanical contact and do not generate friction, they reduce wear and man-made damage and greatly reduce the failure rate. At present, the application field of inductive electronic locks is constantly expanding, from the traditional hotel industry to high-end office spaces, high-end apartments, and even into homes.

This article focuses on the inductive smart electronic door lock system suitable for high-end hotels.

2 System composition and function

The inductive smart electronic door lock system usually consists of five parts: smart electronic door lock, inductive card, card issuance management software, handheld POS machine and card issuer. The main functions of each part are introduced below.

(1) The smart electronic door lock

is installed on the customer's door. When an inductive card approaches the antenna on the lock body, the microcontroller ( MCU ) in the lock automatically starts the card reading program. If the card read is a valid card, the micro motor is driven to drive the clutch mechanism. At this time, the handle is pressed and the lock is opened; if the card read is not a valid card, an invalid card prompt is issued. At this time, the handle can still be pressed, but the lock cannot be opened.

The main functions of the smart electronic door lock:
* Zoning management function - supports zoning management, and the service card is only valid in the service area;
* Hierarchical management function - supports four-level management of service area, floor, building, and hotel;
* Time control function - both guest cards and staff cards have time limits, and they will automatically expire;
* Schedule function - you can specify valid days and invalid days in 7 days a week;
* Time window function - you can specify valid time periods and invalid time periods in 24 hours a day;
* New card replaces old card function - the newly issued card can automatically terminate the old card;
* Termination/resumption function - you can use the termination card to suspend the use of the designated guest room door lock, and you can use the recovery card to resume the use of the suspended guest room door lock;
* Unlock record function - when swiping the card, the door lock will record the card number and door opening time in the lock for query at any time, with a maximum number of records of 240;
* Low voltage reminder function - when the battery voltage is lower than 5.1V, the green light and yellow light will light up at the same time to remind the user to change the battery (after the low voltage reminder, the lock can still be unlocked more than 100 times);
* Anti-lock function - the door card can be set to allow or not allow anti-lock;
* Normally open function - office type locks have a normally open function, while hotel type locks do not have this function.
(2) The types and functions of induction

cards are listed in Table 1.

Table 1 

NamecardholderScope of applicationFunction
Guest CardAccommodation GuestsRoom door lockOpen the designated guest room door lock within a given time domain
Service CardwaiterService area guest room door lockOpen the guest room door locks in this service area within a given time domain
Floor CardFloor SupervisorFloor room door lockOpen the guest room door lock on this floor within a given time domain
Floor CardFloor ManagerDoor locks for all guest roomsOpen the guest room door locks in this building within a given time domain
Master CardGeneral managerEntire hotelOpen the door locks of all guest rooms in the entire hotel within a given time domain
Emergency CardSenior ManagementEntire hotelOpen the door locks of all guest rooms in the entire hotel within a given time domain
Termination CardmanagerEntire hotelDisable the designated guest room door lock, even if the guest card is temporarily invalid
Recovery CardmanagerEntire hotelRestore the guest room door lock that is in a suspended state


(3) Card issuance management software

The main functions of the card issuance management software are:
* System management - operation log, password change, operator setting, system pause;
* Function management - user information, management area, room setting; default parameter setting;
* Communication management - door lock data communication, basic information query/inquiry, unlocking record query;
* Room management - making guest cards, guest card return, changing validity period, vacancy query, check-in status, card return query;
* Employee management - making employee cards, returning employee cards, changing employee cards, employee card query, making processing cards.

(4) Handheld POS machine

The handheld POS machine is used for information communication between the card issuance management software and the smart door lock. The card issuance management software downloads the hotel identification number, room number, card reading password and other information to the POS machine through the RS232 serial port, and then the POS machine downloads the hotel identification number, room number, card reading password and other information to the smart door lock through the RS232 serial port, and can also calibrate the time. Similarly, the unlocking records stored in the lock are also uploaded by the POS machine to the card issuance management software for statistical analysis.

(5) Card issuer

In fact, the card issuer is a TEMIC card reader and writer, which is used in conjunction with the card issuance management software to complete functions such as card issuance, card locking, and card query.

3 Design of smart electronic door locks

Smart electronic door locks are the key equipment of the entire system. The main design goals of smart door locks are: to design a reasonable card data structure to ensure that the system function expansion is supported under the premise of realizing the function, that is, to support the "one card" function; the system static power consumption must be low enough; it has high reliability and sufficient security.

(1) TEMIC induction card technology

German TEMIC (now acquired by American Atmel ) has developed a series of contactless IC card products, including e5530, e5550 , e5551, e5560, e5561 transponder chips and U2270B read-write base station chips. Transponders are usually packaged in card form or in glass tubes.

1.gif 

The following is a brief introduction to the transponder e5550. The e5550 is a TEMIC standard read-write transponder chip with 264-bit EEPROM. Its storage area is divided into 8 areas, each with 33 bits. Bit 0 is the lock bit of the area. Once locked (set to 1), the area is "write-protected" to prevent any rewriting. Area 0 stores the mode word, and its read and write operations depend on the settings of the mode word, such as baud rate, transmission data modulation mode, maximum allowable transmission data area, password and AOR function, and lock bit settings. Areas 1 to 6 are user data areas, which can be read and written by area. Area 7 is the password area when working in password mode. If password protection is not required, area 7 can also be used as a user data area like areas 1 to 6. The

read-write base station chip U2270B is equipped with a small number of peripheral devices and a coupling antenna, and constitutes a reader like an MCU. It can also be said that the U2270B read-write base station chip is the communication interface between the MCU and the transponder. The transponder enters the RF magnetic field, receives electrical energy through the coil induction and automatically powers on and resets. After waiting for 256 RF field clock cycles, it begins to repeatedly read and send the data in the corresponding area of ​​the memory according to the bit rate and modulation method set by the mode word. The base station chip demodulates the received signal and sends it to the MCU in Manchester code. The Manchester code decoding work is completed by the MCU program. The MCU controls the CFE of the base station chip and writes the data to the transponder by interrupting the RF

field with short gaps. (2) Hardware Design

The principle of the intelligent electronic door lock is shown in Figure 1. The microcontroller (MCU) uses an 8-bit microcontroller ( PIC 16F73) from Microchip of the United States . The function of the infrared detection circuit is to detect whether there is an induction card approaching. At a certain interval, the transmitting circuit will automatically emit an infrared signal. If an object approaches, the receiving circuit will receive the reflected infrared signal and immediately notify the MCU to perform the card reading operation. Driven by MCU, the induction card reader IC reads the induction card, and then returns the data in Manchester code to MCU, which is decoded by MCU through program; the decoded card data is verified with the parameters in the lock stored in the memory, and whether it is a valid card is determined according to the current time; if it is a valid card, the motor drive circuit is started to unlock, and the relevant information (unlock record) is stored in the memory. MCU communicates with the handheld POS machine through RS232 interface, receives various setting data, proofreading time, etc. from the POS machine; when necessary, the unlocking record stored in the lock can be transmitted to the POS machine, and then transferred to the computer for statistical analysis. The low voltage detection circuit automatically monitors the battery voltage. Once the battery voltage drops to the specified value, it immediately notifies MCU, and MCU starts the yellow low voltage prompt LED to remind customers to change the battery as soon as possible. The power supply circuit plays an important role in controlling power consumption. It provides power to various circuits including MCU under the control of MCU, and can change the voltage value according to actual needs in different states, so as to keep the overall power consumption to the minimum and extend the battery life. (3) Microcontroller software design MCU control software is the most important environment in the entire system. We use assembly language programming, adopt a top-down programming method, and follow the principles of structured programming to make the software more efficient and maintainable. The software is mainly divided into the following five functional modules: initialization and self-test module, decoding and card reading module, data verification module, communication module, and serial memory reading and writing module. The main function of the serial memory reading and writing module is to provide other modules with access to the serial memory reading and writing module subroutines. Therefore, except for the serial memory reading and writing module, the other four modules are relatively independent. In this way, the complexity of program compilation and debugging is reduced, and the reliability and maintainability of the software are improved. The function of the initialization and self-test module is to restore the system to the initial state and test each hardware circuit. The detection range includes: whether the induction card reading and writing IC is normal, whether the real-time clock is working properly, whether the serial memory reading and writing is correct, whether the infrared detection circuit is working properly, the motor drive circuit, the buzzer and the LED display, etc. The LED on/off combination is used to indicate the fault circuit, and the self-test coverage rate is more than 90%, which greatly improves the efficiency of production and maintenance work. The decoding and card reading module is mainly responsible for driving the induction card reading and writing IC and decoding the Manchester code data returned by it. Improving the decoding speed and success rate is the difficulty of compiling this module. After successful decoding, the decoding and card reading module transmits the data on the card in binary code to the data verification module for processing. The latter verifies based on the current time and the setting data stored in the serial memory to confirm whether it is a valid card, thereby deciding whether to unlock the door, and completing operations such as writing unlocking records and replacing old cards with new cards. The communication module is responsible for controlling the communication with the hand-held POS machine, using the POS machine to set the room number, start time, end time, card reading password, current time and other important parameters of the door lock, and uploading the unlocking records stored in the lock so that they can be transferred to the computer for statistical analysis. To prevent illegal operations, password verification is required during communication. (4) Low power consumption technology Since it is battery-powered, the low power consumption problem must be well solved when designing smart electronic door locks. In static state, the average current should be kept at around 25μA, so that the service life of 4 No. 5 alkaline batteries can generally reach more than 1 year. To this end, we have taken the following measures:

















①Select PIC16F73. In sleep mode, if the I/O port status is set properly, the battery can be controlled at about 1μA.
②Reduce the crystal frequency as much as possible. Since PIC16F73 adopts advanced RISC structure, it can work stably and provide sufficient processing power even when the crystal frequency is low.
③Prolong the sleep time and shorten the working time as much as possible. To this end, infrared detection technology is used. The MCU is in a sleep state with extremely low power consumption for more than 99% of the time, and 
most also stop working. Only the infrared detection circuit regularly transmits infrared signals. If there is no object approaching, the receiving circuit will not receive the infrared signal, and the MCU will continue to sleep; if there is an object approaching, the receiving circuit will receive the reflected infrared signal and immediately notify the MCU to perform the card reading operation. It is very important to handle the relationship between the sensitivity and anti-interference ability of the infrared detection circuit. If the sensitivity is too low, the card reading response will be slow; if the anti-interference ability is not enough, the infrared in various lights or sunlight may cause false triggering, so that the system is often in a working state, which will seriously affect the system performance.
④Use a power supply circuit that can be controlled by the MCU. When some circuits are not working, the power supply is stopped and the power supply is restored when they are needed. For some circuits, the power supply voltage can be reduced to save power.

(5) Security and reliability

The security issues that need to be addressed in the door lock system are: preventing the door card from being illegally copied; preventing the lock from being opened by abnormal means (such as tools, prying, strong magnets, etc.); and the lock body has a certain degree of resistance to external force damage.

In order to prevent the door card from being illegally copied, each card is encrypted before leaving the factory, and different customers use different passwords. The card issuance management software is also password protected to prevent unauthorized personnel from using the card issuance management software to illegally make cards. Due to the use of a three-lock anti-pry lock core, when the door is closed, the anti-pry lock is pressed by the door frame and automatically locks the main lock, which cannot be opened or pried open by tools; the clutch mechanism driven by the motor has the function of preventing strong magnets from being attracted; there are no exposed screws on the lock body before locking, which prevents bending and smashing.

The reliability of the door lock system is also very important. We improve the comprehensive reliability of the system from both hardware design and software design. In terms of hardware, the main processor PIC16F73 we selected has high anti-interference ability. It contains a " watchdog (WDT)" circuit with an independent RC oscillator . When the program runs away, it can automatically reset the CPU and resume normal operation. For the EEPROM that stores important data, hardware write protection measures are adopted to avoid data loss when it is disturbed. Try to use surface mount components, strictly perform aging screening, and ensure the quality of components . In terms of PCB wiring, a series of measures are taken to improve the anti-interference ability. In terms of software design, we refresh each register and SRAM unit to ensure that even if these registers or SRAM units are disturbed and modified, they can be restored immediately. In the program, avoiding dangerous program structures is also an important measure to improve reliability. There are several loop structures that are prone to "dead loop" hidden. For example, when executing a certain function, you must loop and wait for a condition generated by an interrupt or timer. Since the waiting time may be long, the clear WDT instruction will be included in the loop, which will not cause problems in the normal process. However, if the PC content is disturbed and changed, the program will run away and fall into this loop. At this time, the interrupt or timer may not be turned on, so the program will loop and wait for an impossible condition, that is, a "dead loop". Although the probability of this situation is small, it must be prevented. In addition, as mentioned earlier, in order to reduce power consumption, the MCU is in a very low power sleep state for more than 99% of the time, and the power supply of most circuits is turned off. In this state, the anti-interference ability is also strong. Conclusion The above-mentioned inductive intelligent electronic door lock has been fully tested and used for nearly 1 year. The results show that the system has met the design requirements in terms of software and hardware functions, completeness, reliability, and low power consumption. Since the "one-card" application was considered at the beginning of the design, the system has good scalability. At present, based on the hotel-type intelligent electronic door lock, a product series of 7 products has been developed, including office-type electronic door locks and home-type electronic door lock systems that do not require card issuance management software, users can issue cards by themselves, and can be used independently, convenient, safe and reliable safe systems, smart consumer terminals connected to the RS485 bus , and access control/attendance systems. Each product in this product series not only realizes the "one card" function, but also uses many of the same components. Some products can even interchange circuit boards, reducing production complexity and product costs.  References    1. Lu Yongning IC Card Application System 2000    2. Wang Xingzhi. Wang Lei  Single Chip Microcomputer Application System Anti-interference Technology 2001













Keywords:TEMIC Reference address:Intelligent electronic door lock system using TEMIC proximity card technology

Previous article:ARM Linux.2.6.34 kernel porting
Next article:PIC microcontroller counting

Latest Microcontroller Articles
Change More Related Popular Components

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

About Us Customer Service Contact Information Datasheet Sitemap LatestNews


Room 1530, 15th Floor, Building B, No.18 Zhongguancun Street, Haidian District, Beijing, Postal Code: 100190 China Telephone: 008610 8235 0740

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京ICP证060456号 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号