Wu Jianying Microcontroller Development Board Store Address
Store: 【Wu Jianying’s Shop】
Address: 【https://item.taobao.com/item.htm?_u=ukgdp5a7629&id=524088004171】
[Guide] With the acceleration of modernization and urbanization in our country, as well as the continuous emergence of new technologies and materials, anti-theft doors, as a new type of building material and structural form, have entered thousands of households. However, existing anti-theft doors still rely on traditional keys to unlock the door, which not only makes opening cumbersome and lacks an alarm function, but also exposes the most critical and vulnerable part of the lock, the lock cylinder, making it evident and providing opportunities for criminals.
Abstract: The new access control system, under the control of the microcontroller, can realize anti-theft alarms and multiple ways to open the door. Using the 51 microcontroller as the main control element, by extending the RC522 RFID module, LD3320 voice recognition module, “one-button open” module, it can achieve card swiping, voice opening, “one-button open”, and “remote opening”; using door magnetic sensors as the main component of the anti-theft alarm module, combined with the GSM module to achieve SMS alarms.
Keywords: Information processing technology; access control system; RC522 RFID module; LD3320 voice recognition module; GSM module
With the acceleration of modernization and urbanization in our country, as well as the continuous emergence of new technologies and materials, anti-theft doors, as a new type of building material and structural form, have entered thousands of households. However, existing anti-theft doors still rely on traditional keys to unlock the door, which not only makes opening cumbersome and lacks an alarm function, but also exposes the most critical and vulnerable part of the lock, the lock cylinder, making it evident and providing opportunities for criminals.
The purpose of this project is to, under the control of the microcontroller, realize the action of opening the door for non-strangers through RF cards or voice recognition or sending SMS to the GSM module, and to enable communication between the homeowner inside and the visiting personnel outside through the intercom module, and it can also be opened with one button, thus breaking the fixed mode of relying solely on keys to open the door. In terms of security, since the “key” of this access control system communicates with the lock through electrical signals, it can be isolated, making it impossible to know the lock’s position from the outside, thereby reducing the possibility of the lock being violently damaged from outside. Additionally, we have door magnetic sensors to monitor the opening and closing of the door. In the case of illegal opening or forgetting to close the door, the homeowner is notified via SMS and the alarm device is activated, significantly enhancing the security factor of the lock. As living standards improve, people are increasingly concerned about quality of life and property safety. The significance of this project lies in liberating people’s hands to a certain extent through multiple automatic opening methods; by breaking away from the mechanical communication method between “keys” and “locks” and enhancing the alarm system, the safety performance of the lock is improved.
1 Overall System Introduction
The newly designed anti-theft door in this text can be divided into seven major modules according to the functions realized: microcontroller module, RFID module, voice recognition module, “one-button open” module, anti-theft alarm module, GSM module, and relay control module, which can realize the following several opening methods:
1) Card swiping to open the door. The RF card module transmits information to the microcontroller through the RF card, which determines and identifies the card before sending instructions to the relay control module to command it to drive the door lock to open.
2) Voice recognition to open the door. First, some individuals’ voice characteristics need to be recorded and digitally processed and saved into a database. When someone visits, the voice recognition module processes the visitor’s voice and compares it with the information in the voice database. The comparison result is sent to the microcontroller, which determines whether to issue an open door command to the relay control module based on the comparison result, thus achieving the action of opening the door.
3) One-button opening. When the visitor cannot open the door through RF card or voice recognition, they can communicate with the homeowner via the intercom module. The homeowner can send an open door command to the microcontroller by pressing a button, which then sends the open door command to the relay control module to achieve “one-button open”.
4) Remote opening. When the conditions for the above opening methods cannot be met for special reasons, such as the homeowner being on a business trip and someone needing to enter with the homeowner’s permission, the homeowner can send the open door command to the GSM module via SMS to achieve “remote opening”.
When visitors use methods other than the above to open the door, the anti-theft alarm module is triggered, the buzzer sounds, and the GSM module sends an alarm SMS to the homeowner. The overall system design block diagram is shown in Figure 1.
2 Hardware Design
2.1 Microcontroller Minimum System Design
This module serves as the main control unit of the entire system, coordinating the work of each module. The 89C51 is used as the core chip of the microcontroller module. This chip is an 8-bit CPU that uses a 12M crystal oscillator as a clock, has 32 I/O lines, two external interrupts, two 16-bit timers/counters, and a full-duplex serial port. This chip is small in size, high in speed, reliable, low in power consumption, cost-effective, and easy to develop and implement functions.
The minimum system includes power circuit, crystal oscillator circuit, and reset circuit. Its hardware design is shown in Figure 2.
2.2 RFID Module
The main function of this module is to recognize RF cards and send the card-related information to the microcontroller module, which determines whether the card is valid and whether to issue an open door command.
This module uses the MF RC522 as the core chip of the RF card module. The RC522 is a high-integrated read/write card chip used in 13.56 MHz non-contact communication. Its internal transmitter can drive the reader antenna to communicate with ISO14443A/MIFARE cards and responders without additional circuits. The receiver part provides a robust and effective demodulation and decoding circuit for processing ISO14443A compatible responder signals, ensuring three mutual authentication for security. Its hardware design diagram is shown in Figure 3.
2.3 Voice Recognition Module
The main function of this module is to recognize and analyze the voice information of visitors and send this information to the microcontroller module, which determines whether to issue an open door command based on the voice information.
This module uses the LD3320 as the core chip of the voice recognition module. This chip integrates a voice recognition processor and some external circuits, including AD, DA converters, microphone interfaces, sound output interfaces, etc. This chip does not require any external auxiliary chips and can be directly integrated into existing products to achieve voice recognition and human-machine dialogue functions. It supports both parallel and serial interfaces, and the serial mode can simplify connections with other modules. Its hardware design diagram is shown in Figure 4.
2.4 “One-button Open” Module
This module mainly controls the door lock through an independent button. When the button is pressed, the microcontroller module issues an open door command.
Additionally, this module is equipped with an intercom module to enable communication between the indoor personnel and the visitors. The SDA1845 is used as the core chip of the intercom module. It has a built-in high-speed microcontroller, high-performance RF transceiver chip, and RF power amplifier, providing a standard RS232 serial port. Its hardware design diagram is shown in Figure 5.
2.5 Anti-theft Alarm Module
The main function of this module is to trigger alarms in two situations:
1) When the door is opened but not closed properly for various reasons, it sends an alarm signal to the microcontroller, which processes the alarm accordingly.
2) When a visitor opens the door in an illegal manner, such as breaking in, it sends an alarm signal to the microcontroller, which then sends an SMS notification to the homeowner via the GSM module and activates the sound and light alarm.
This module uses a door magnetic sensor as the main component. When the door is opened, the door magnetic sensor outputs a high level; when the door is closed, it outputs a low level. Its hardware design diagram is shown in Figure 6.
2.6 GSM Module
The main function of this module is to send alarm SMS to a specified phone number when the microcontroller module issues an SMS alarm command. This module uses the TC35 as the core GSM alarm module. The TC35 supports both RS232 and TTL adaptive interfaces, operates in EGSM900 and GSM1800 dual frequency bands, supports voice and data signal transmission, and can transmit commands and data bi-directionally using AT commands, supporting TEXT and PDU formats for SMS. Its hardware design diagram is shown in Figure 7.
2.7 Relay Control Module
The main function of this module is to control the door lock. When the microcontroller module issues an open door command, this module opens the lock; when it issues a close door command, this module closes the lock.
This module uses a signal relay as its main component. The signal relay is used to connect and disconnect the circuit to issue control commands and reflect the device status, forming an automatic control circuit.
3 Software Design
The program is written in C programming language, compiled and debugged in the Keil4 environment, using techniques such as interrupts and digital filtering. The main flowchart is shown in Figure 8.
4 Conclusion
This article presents the software and hardware design solutions for the access control system, detailing the implementation methods for various opening methods and sending alarm information via GSM. Since anti-theft alarm systems are not yet very common in the country, and smart homes are gradually entering ordinary households, the new intelligent anti-theft door has a good development prospect in the near future. Therefore, this project has certain practical application significance.
Source: 21IC
If you like this article, please give it a thumbs up!
| Micro | Controller | 精 | Talk | Wu | Jian | Eagle |
WeChat’s first microcontroller sharing, the most popular graphic public account
WeChat ID: wujianying_danpianji
“2016.5.30” ● Technology Comes from Accumulation, Becomes |