Design of RFM001 RF module induction electric lock controller

Publisher:范隆Latest update time:2010-05-13 Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

In recent years, as the application of radio frequency IC card technology in various fields has become increasingly mature and widespread, radio frequency induction electric locks that use radio frequency cards as keys have occupied an important position in new electric control locks due to their unique characteristics of easy operation and high safety performance.

Radio frequency induction electric locks usually use radio frequency IC cards (radio frequency keys) with passwords to replace traditional metal keys. After reading the password, an electronic controller generates an electrical signal to open the door, which is then powered on to drive the electric lock to open and close the door. The benefits of this are firstly to prevent illegal key duplication, and secondly to create conditions for information management of personnel entry and exit. However, the structure of the lock becomes more complicated, unreliable factors increase, and the cost also rises significantly; and due to the addition of certain operations, the difficulty of use is also increased compared with mechanical locks. It can be seen that while the safety performance of radio frequency induction electric locks has been improved, a series of new problems such as reliability, cost, and operability have also been brought about. If you don't pay attention to it and take measures in the design, it will become a trouble.

It can be considered that overly complex controllers are often the source of "trouble". Based on the above considerations, for radio frequency induction electric lock controllers, no matter what technical design is used, one principle should be followed, that is, the controller should be as simple as possible under the premise of ensuring basic functions. Here, the basic function is very important. In other words, at the beginning of the design, the functions must be carefully defined and those dispensable things must be resolutely eliminated. Some electric locks, in addition to the door opening and closing functions, have added many uncommon or difficult-to-use functions. As a result, not only a lot of costs have been increased in vain, but also the reliability has been greatly reduced. This is an important factor leading to the failure of the product.

The induction lock controller introduced in this article strives to comply with practical and simple design principles, so that the electric lock can fully play its strengths and avoid its weaknesses, that is, to maintain a lower cost (without reducing performance) and improve reliability while being safer.

1 Design Specifications

1.1 Functional requirements

The basic functions of an induction lock controller should include:

◇ Open/close the door with induction key;

◇ Add and delete induction keys (RF IC cards);

◇ Drive of the electromagnetic clutch of the lock body;

◇ Sound and light prompts for controller working status;

◇ To save power, the system will operate for a limited time and enter sleep mode after the timeout.

◇ Low voltage alarm;

◇ Button wake-up function.

The human-machine interface required to realize the above functions: start key (wake-up key), clear master key key, add sub-key key, clear sub-key key, status indicator light, low voltage indicator light, and buzzer.

1.2 Operation requirements

Radio frequency keys are usually managed using an authorized card issuance system or a card classification system. In order to balance security and ease of use, a master key-subkey two-level mode is used to manage keys. The master key is equivalent to a system operation password, which restricts the addition and deletion of door opening keys (subkeys).

How to add keys simply and effectively is an important issue that determines the performance of induction locks. The main problem with the binary dial switch mode of adding and deleting sub-keys in the past is that the operation is cumbersome and inefficient. Using the add and delete keys and using adjacent sub-keys for single deletion is a natural and simple method. The following are the key addition and deletion operation requirements provided by this design.

① Clear the master key. First press and hold the master key delete key, then press the start key, and then release the start key. Keep pressing the master key delete key for 5 seconds. When you hear a long beep, it means that the master key is deleted. After that, the double lights flash and five short beeps sound at the same time, indicating that the master key is not set.

② Set the master key. After five short beeps while the double lights flash, the induction lock controller will preset the induction key as the master key. After hearing a short beep, press the add key and the buzzer will emit two long beeps, indicating that the master key has been set. Each lock can only have one master key, which can only be used to add or delete sub-keys, but cannot open the door.

③ Add subkey. After pressing the start button, sense the master key. After hearing a short beep, sense the subkey you want to add. After hearing a short beep, press the add button. After hearing three short beeps, the subkey setting is complete. If you hear a short beep after pressing the add button, it means that the subkey you want to add has already been set, which is a duplicate error. When using the master card to add this, it is also considered a duplicate error. For continuous addition, just repeatedly sense the new subkey you want to add, and then press the add button. Up to 29 subkeys can be added.

④ Open/close the door. Press the start button first, and the circuit switches from the sleep state to the key reading state. At this time, the key can be used for sensing. When it is correct, a short sound is heard, the status light flashes, the door lock clutch is energized, and the door is opened. After the open state lasts for 5 seconds, the status light goes out, the clutch is disconnected, and the door returns to the closed state.

⑤ Clear a single subkey. After pressing the start button, sense the master key. After hearing a short beep, press the clear key. Then sense the previous subkey of the subkey to be cleared. After hearing a short beep, press the clear key again. After hearing two short beeps, the clearing is complete. If the subkey to be cleared is the first one, the previous subkey is the master key. If the previous subkey of the subkey to be cleared has been cleared but a new subkey has not been added, clear it with the previous subkey, and so on. If you plan to clear other subkeys, repeat the above steps.

⑥ Clear all sub-keys. After pressing the start button, sense the master key. After hearing a short beep, sense it again with the master key. After hearing another short beep, press and hold the clear button for 5 seconds. After hearing two short beeps and one long beep, all sub-keys are cleared.

Several basic working states of the controller:

① Startup state. After the power is turned on, if the mother key has been set and the battery is not under-voltage, both lights will be off; if the battery is under-voltage, only the under-voltage indicator will be steadily lit. If the mother key has not been set, both lights will flash and five short beeps will sound at the same time.

② Sleep state: If no key reading operation occurs within 10 seconds, the circuit automatically enters the sleep state to save power.

③ Battery low voltage alarm state. When the battery voltage is ≤5 V, the low voltage indicator lights up. At this time, the battery should be replaced as soon as possible.

[page]

④ Fault status: If the status light remains on during addition or deletion operations, it indicates a circuit fault and the device should be discontinued.

For the above operations and related sound and light prompts, please refer to Table 1.

1.3 Technical parameters

The technical parameters of the induction lock controller are listed in Table 2.

2 Hardware Design of Induction Lock Controller

The control circuit consists of a single-chip microcomputer (U1), a key memory (U2), a radio frequency module (U3), a human-machine interface component, an electromagnetic clutch drive circuit, and a radio frequency antenna. It is powered by a 6 V DC (4 No. 5 batteries). Figure 1 is a schematic diagram of the induction lock controller circuit.

[page]

The RF module uses the RF module RFM01 based on Texas Instruments (TI). It has low power consumption, high card reading speed and simple wiring. It needs to be equipped with an antenna coil with an inductance of 430-460μH and a Q value greater than 15. You can also use the RF module based on the U2270B of ATMEL, but the performance is slightly worse.

The microcontroller is 89C2051 from ATMEL. Its port number and ROM can meet the functional requirements of this circuit. The operating frequency of the microcontroller is 11.059 2 MHz (it cannot be higher or lower than this value, because the software uses this frequency to match the RF module). If you want to expand other functions, such as using a 12- or 16-key keyboard, adding a calendar clock or external memory, you can choose a microcontroller with a larger port number and ROM. In order to obtain higher reliability, an OTP-compatible microcontroller should be used.

The key memory uses ATMEL's 24C02, which can store 30 keys. If you plan to store more keys, you should choose a larger capacity model in this series. For higher reliability, you can use a compatible model from the American XCOR company.

This circuit uses a medium-power PNP transistor as an electromagnetic clutch drive circuit, which can drive various electric lock-specific electromagnetic clutches or motors with a load current of less than 0.8 A. If you plan to drive a larger load, you can change to a relay drive mode, and connect the transistor output to the relay coil, but this will increase power consumption.

The human-machine interface consists of 4 buttons, 2 light-emitting diodes and 1 buzzer to complete necessary operations such as adding, deleting and starting.

The parameters of the antenna coil matched with the RF module must be accurate, otherwise the card reading performance will not meet the design requirements. When making the antenna, its parameters must be measured with an instrument. Here is a set of antenna parameters that match the RFM01, as listed in Table 3. The recognition distance of this coil for key-type inductors is 80 mm, and the recognition distance for card-type inductors is 120 mm.

This circuit uses the integrated comparator on the 89C2051 chip to form a battery undervoltage detection circuit. When undervoltage occurs, the light-emitting diode lights up.

In order to maximize the battery life, when no operation occurs for a few seconds, the circuit automatically enters a low power consumption state, the so-called "sleep state". This is achieved by software controlling the working state of the 89C2051 and the RF module.

3 Software Design of Electronic Lock Controller

The hardware needs to be coordinated with efficient software to realize the various functions of the induction electronic lock. The software source code is written in C language, and the final code is solidified in the Flash ROM of 89C2051. Figure 2 is a flow chart.

Reference address:Design of RFM001 RF module induction electric lock controller

Previous article:Analysis of infrared alarm system in enterprise security system
Next article:EDA Design and Implementation of Electronic Coded Lock

Latest Security Electronics 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号