introduction
The access control system is a modern security method used to protect the property and personal safety of the people. With the development of society and the advancement of science and technology, the access control system has developed from mechanical locks to electronic access control, from a separate access control system to alarm integration, and from a single access control to network interconnection. At present, the market is still dominated by wired access control systems, but according to market demand analysis and prospect forecasts, wireless access control systems are undoubtedly more suitable for the security industry with increasingly higher requirements. Compared with wired access control systems, wireless access control systems have the characteristics of simple installation, convenient maintenance and low cost.
The wireless access control system designed in this paper based on STC15 microcontroller and nRF2401 can detect and identify the identity of visitors in real time through the face recognition host system. If the database contains the visitor information, the access control execution terminal will open the door lock and display the visitor information on the LCD; otherwise, the alarm will sound.
1 Overall design of wireless access control system
The system structure is mainly composed of PC software system, access control master terminal and access control execution terminal. The overall structure of the system is shown in Figure 1. The PC host software is mainly responsible for identifying the visitor's identity information, converting the information into the corresponding data frame format, and sending it to the access control master terminal through the serial port. The access control master terminal is mainly responsible for data encryption, initialization of the RF module and information transmission. The access control execution terminal is mainly responsible for data decryption, and performs corresponding operations based on the decrypted information, thereby achieving the function of controlling the access control system.
2 System Hardware Design
2.1 Introduction to STC15L2K61S2
STC15L2K61S2 is a single clock/machine cycle (1T) microcontroller produced by STC. It is a new generation of 8051 microcontroller with high speed/high reliability/low power consumption/super interference. It adopts the 8th generation encryption technology, has strong encryption, and the instruction code is fully compatible with the traditional 8051 microcontroller, but the speed is 8 to 12 times faster than the traditional 8051 microcontroller. The STC15 series microcontroller has an internal integrated high-precision R/C clock, and the configurable clock range is 5 to 35 MHz. At the same time, the STC15 series microcontroller has an internal integrated high-reliability reset circuit, so the STC15L2K61S2 minimum system does not require an external crystal oscillator and clock circuit.
STC15L2K61S2 has 3-channel CCP/PWM/PCA, 8-channel 10-bit high-speed A/D converter, built-in 2K large-capacity SRAM, 2 sets of ultra-high-speed asynchronous serial communication ports and 1 set of high-speed synchronous serial communication port SPI. In addition, for the 5TC15L2K61S2 microcontroller, its power supply voltage only needs 3.3V, so its power consumption is much lower than that of the traditional 8051 microcontroller.
2.2 Power Module
The operating voltage of nRF2401 is between 1.9 and 3.6 V, and the power supply voltage of the microcontroller is 3.3 V. In order for nRF2401 to work normally and stably, a DC power supply module must be connected to nRF2401. After testing, nRF2401 works relatively stably at 3.3 V, and the power supply voltage of the STC15L2K61S2 microcontroller is also 3.3 V. The system is powered by USB, and the voltage is about 5 V, so the 5 V voltage needs to be converted into 3.3 V. The power module uses a linear regulated power supply to form an analog power supply, and adjusts the sliding rheostat to make the output voltage 3.3 V. The schematic diagram of the 3.3 V power module is shown in Figure 2.
2.3 nRF2401 RF module interface circuit design
nRF2401 is a single-chip wireless transceiver chip produced by Nordic Corporation, which operates at the 2.4-2.5 GHz global ISM frequency. The chip has built-in address decoder, first-in-last-out stack area, demodulation processor, clock processor, GFSK filter, low noise amplifier, frequency synthesizer, power amplifier and other functional modules, and requires very few peripheral components, so it is very convenient to use.
There are four working modes of nRF2401: transceiver mode, configuration mode, idle mode and shutdown mode. The working mode of nRF2401 is determined by three pins: PWR_UP, CE and TX_EN. The transceiver mode of nRF2401 includes Enhanced ShocKBurstTM transceiver mode, ShocKBurstTM transceiver mode and direct transceiver mode. In order to save energy, this system chooses to use Enhanced Shock BurstTM transceiver mode for wireless transmission. The connection circuit between nRF2401 RF module and STC15L2K61S2 is shown in Figure 3. CSN is the chip select line of the chip. When CSN is low, the chip works. SCK is the clock line (SPI clock) controlled by the chip. MISO and MOSI are the chip control data lines. IRQ is an interrupt signal. During wireless communication, MCU mainly communicates with nRF24L01 through IRQ. CE is the mode control line of the chip. When CSN is low, CE and the CONFIG register of nRF24L01 jointly determine the state of nRF24L01.
2.4 LCD display module interface circuit design
Nokia5110 is a liquid crystal display produced by Nokia. It can display both characters and graphics. When powered by low voltage, the normal display current is below 200 μA, and the price is cheap. A Nokia5110 module with a driver chip costs only 15 yuan, while a 1602 liquid crystal display costs 20 yuan, and a 12864 liquid crystal display costs 50 to 70 yuan. In addition, the interface of Nokia5110 has only 8 pins including backlight, which is much less than 1602 and 12864, and is more convenient in hardware design. The 8 pins of Nokia5110 are RST, CE, D/C, SDIN, SCLK, VCC, BL and GND, among which RST is the reset pin, CE is the chip enable pin, D/C is the mode selection pin, SDIN is the serial data line, SCLK is the serial clock, VCC is the 3.3 V working voltage, BL is the backlight pin, and GND is the power ground. The Nokia5110 interface circuit is shown in Figure 4.
2.5 Stepper Motor Drive Circuit Design
This article uses L298N to form a motor drive circuit. L298N is a high-voltage, high-current motor driver chip produced by ST. The chip uses a 15-pin package. The main features are: high operating voltage, the maximum operating voltage can reach 46V; large output current, instantaneous peak current can reach 3A, continuous working current is 2A; rated power is 25W. Use L298N chip to drive the motor. This chip can drive a two-phase stepper motor or a four-phase stepper motor, which just meets the design needs of this system. The stepper motor drive circuit is shown in Figure 5.
3 System Software Design
3.1 nRF2401 Software Design
The nRF24L01 data transmission or reception is mainly realized through the SPI interface. The STC15L2K61S2 microcontroller I/O port is used to simulate the working timing of the SPI interface. The SPI read and write timing is shown in Figures 6 and 7.
After completing the basic functions of the chip, the chip needs to be initialized to ensure that the address width, channel operating frequency, transmission and reception rate and power of the transmitter and receiver are consistent. The RF initialization function is as follows:
3.2 Stepper Motor Software Design
Four-phase stepper motors can be divided into three working modes according to the power-on sequence: single 4-beat, double 4-beat, and 8-beat. The step angles of single 4-beat and double 4-beat are equal, but the torque of single 4-beat is small. The step angle of 8-beat working mode is half of that of single 4-beat and double 4-beat. Because the 8-beat working mode can maintain a high torque and improve control accuracy, this article adopts the 4-phase 8-beat working mode.
The power-on timing and waveform of the single 4-beat, double 4-beat and 8-beat working modes are shown in Figure 8 respectively.
Conclusion
Through many experimental tests, the wireless access control system designed in this paper has good real-time performance and accuracy. In the presence of obstacles, data transmission can also meet practical requirements and achieve the expected design goals.
Previous article:Fingerprint recognition access control system based on Linux system
Next article:Using the inverter PSPICE simulation model to simulate transient dynamic response
- MathWorks and NXP Collaborate to Launch Model-Based Design Toolbox for Battery Management Systems
- STMicroelectronics' advanced galvanically isolated gate driver STGAP3S provides flexible protection for IGBTs and SiC MOSFETs
- New diaphragm-free solid-state lithium battery technology is launched: the distance between the positive and negative electrodes is less than 0.000001 meters
- [“Source” Observe the Autumn Series] Application and testing of the next generation of semiconductor gallium oxide device photodetectors
- 采用自主设计封装,绝缘电阻显著提高!ROHM开发出更高电压xEV系统的SiC肖特基势垒二极管
- Will GaN replace SiC? PI's disruptive 1700V InnoMux2 is here to demonstrate
- From Isolation to the Third and a Half Generation: Understanding Naxinwei's Gate Driver IC in One Article
- The appeal of 48 V technology: importance, benefits and key factors in system-level applications
- Important breakthrough in recycling of used lithium-ion batteries
- Innolux's intelligent steer-by-wire solution makes cars smarter and safer
- 8051 MCU - Parity Check
- How to efficiently balance the sensitivity of tactile sensing interfaces
- What should I do if the servo motor shakes? What causes the servo motor to shake quickly?
- 【Brushless Motor】Analysis of three-phase BLDC motor and sharing of two popular development boards
- Midea Industrial Technology's subsidiaries Clou Electronics and Hekang New Energy jointly appeared at the Munich Battery Energy Storage Exhibition and Solar Energy Exhibition
- Guoxin Sichen | Application of ferroelectric memory PB85RS2MC in power battery management, with a capacity of 2M
- Analysis of common faults of frequency converter
- In a head-on competition with Qualcomm, what kind of cockpit products has Intel come up with?
- Dalian Rongke's all-vanadium liquid flow battery energy storage equipment industrialization project has entered the sprint stage before production
- Allegro MicroSystems Introduces Advanced Magnetic and Inductive Position Sensing Solutions at Electronica 2024
- Car key in the left hand, liveness detection radar in the right hand, UWB is imperative for cars!
- After a decade of rapid development, domestic CIS has entered the market
- Aegis Dagger Battery + Thor EM-i Super Hybrid, Geely New Energy has thrown out two "king bombs"
- A brief discussion on functional safety - fault, error, and failure
- In the smart car 2.0 cycle, these core industry chains are facing major opportunities!
- The United States and Japan are developing new batteries. CATL faces challenges? How should China's new energy battery industry respond?
- Murata launches high-precision 6-axis inertial sensor for automobiles
- Ford patents pre-charge alarm to help save costs and respond to emergencies
- New real-time microcontroller system from Texas Instruments enables smarter processing in automotive and industrial applications