1. introduction
According to user requirements and needs, mainly in order to address the current market, no remote control code lock in order to improve access control system reliability and security, it is necessary to meet the market needs of the infrared infrared remote control password lock system.
The system has a regular e-mail password lock function, also adds remote control function. The lock uses the 6-digit password as the password for a total of 106 group, the Group has fully meet the user's password security. The system has the strong practical application of the value of the technology include: IR carrier data transmission technology and microcomputer control, infrared remote control system for encoding and decoding technology, circuit design and fabrication technology demonstration Board.2 system design and implementation of hardware (the cell circuit design)
2.1 hardware chart:
The system to single-chip AT89C51RC at its core.
System architecture diagram shown in Figure 1. This system features design objectives should include the following: infrared emission function modules, infrared receiving conversion modules, MCU Module, buzzer alarm function module, LED digital display module, press the function module, unlock function module. The following details about the unit hardware circuit and the implementation of the function.
Figure 1 infrared remote control password lock hardware chart
2.1.1 power supply design
Part of this system of power supply chips using LM7805 offer single-chip voltage regulator 5V after.
Its power supply circuit design as shown in Figure 2.
Figure 2 infrared remote control password power part of the circuit schematics
The power supply circuit, using four 1N4004 diode constitute rectifier bridge, you can enter the DC or AC 9V power supply, and then through the 7805 5V stabilized to work for SCM.
Fixed three-terminal regulator 7805 is determined by the output pin Vo, input pin GND Vi and earthing pin, its voltage value is + 5V, it belongs to the regulator LM78XX series, input termination capacitance can further filter the output to add capacitor can improve the load moment affects the stability of the circuit is also quite good.2.1.2 infrared receiving head section and led display design
Infrared signal reception is partly use KS38BL infrared receive head, the electric circuit as shown in Figure 3.
Figure 3 is an infrared remote control signal receiving head of simple circuit, it can receive carrier frequency from 33 ~ 57KHz remote control signal. 100 Ω resistor to current limiting, 470uF capacitor filter to reduce interference. To a logical pen contact infrared receiver module signal output (OUT), you can detect when you press a key on the remote control, infrared, infrared digital signal transmission. If it has infra-red signal is emitted by infrared receiver module out of the digital signal data, logical pen LED will be flashing pulse. This can be detected by current have infrared signals from the most simple way.
Figure 3 infrared receiving part
As shown in Figure 4, the system's display is to use the MAX7219 implementation of 8-bit stable static display, a total of cathode MAX7219 is serial digital tube dynamic scanning display driver IC, using only 3-wire serial interface data transfer, can be directly and MCU interface, users can easily modify their internal parameters for many LED display, so you can easily use the microcontroller serial send data displayed, and it takes less time to facilitate the programming and on signal detection.
Figure 4 shows part of the design using MAX7219
2.1.5 password storage section of the circuit design
In order to save the user settings for password, the system uses AT24C04 used to save the password for the user settings, the SCM AT89C51RC P3.6 received the SCLK mouth AT24C04 as its serial shift clock, AT24C04 AT89C51RC P3.7 received of the SDA mouth as its serial data or address input and output.
The circuit is SCLK, SDA must be coupled with a continued resistance, resistance is 10 k. User set password stored in AT24C04, when you want to change, or read the user password, you only need to change the data in AT24C04 or read. Since the main chip AT89C51RC no I2C bus, so the system uses software programs to simulate I2C bus timing to complete AT89S51 connection with AT24C04.2.1.6 alarm circuit design
This system is designed to take into account the burglar alarm circuit designed, carried out by the buzzer alarm sound, buzzer received in CPU pin P0.4 by PNP-transistor do current amplifier, so you can control the frequency and beep buzzer.
When you enter the wrong password to unlock the system alarm output by P0.4 mouth PNP low level makes, buzzer-transistor breakover, ends by a 1-second buzzer alarm, when a password three times in a row, the system error is a long time alarm, this to prevent someone else an illegal trial unlock.2.1.7 native processing and remote handling features select circuit design
The system design of a self-locking press use to select the native handle or remote control handle, set a password must be in native processing state, and lock you can select remote control lock or unlock, when this computer keys is pressed, the red light indicates that the selected native processing, you can set the password to modify
Password, or native unlock, not remote control lock; when this switch is opened not pressed, the red light off select Remote unlocking, you can use the remote control to enter a password to unlock, unlock the remote control is not native to unlock, and set a password.3 system software design
This system remote control processing and native handle two active status, the status of two work independent of each other.
By self-locking switch K you can select the current state, when K closed select native processing, select remote control handle while disconnected. Remote processing part only unlock function, so the design is relatively simple, but native processing part can implement lock, set and modify passwords for all functions.To complete this system function, you first need to be addressed on an infrared signal decoding, and storage-oscillographic instrument on its specific requirements for waveform, this will understand its encoding rules.
General coding launches a frame code contains a boot code, user code and key data codes. Boot code from a longer carrier wave and a turn-off time constitute, as the subsequent launch of the code of the boot. User codes and key data code is logical "0" and logic "1" with the provisions of the length of a string.Logic "0" and logic "1" is low and high level of different combinations to represent, then you can use the two-chip timer counter, it counts with high and low level, is this: when the microcontroller detects the first low level, the timing counter counting T0 immediately, wait until there are detected high levels, T0, T1 and stopped counting immediately began counting, in T1 count, count on T0, recurrence of low-level, T1 stop count, T0 began to count, count at T0 saving T1 count, this is a combination of low and high, by determining the scope of this group belong to which can decode "0" or "1", this loop until all of the bits translated.
So we can decode the value command SCM system to complete the appropriate action. Note: only the key to decode the data codes, customer code in advance (by a company or individual) provides better.Software part of the design based on Assembly language, has a modular design concept.
To the main program as the core versatile module set is, is significant of a subroutine in a subprogram in the implementation of the primary process, as shown in Figure 5.
Figure 5 main flowchart
Software workflow consists of six parts: System initialization, AT24C04 reads and writes an error, review the lock, alarm handling, on receiving the signal decoding.
Initialization includes: MAX7219 chip, interrupt and timer initialization, as well as system initialization parameters, and so on; on AT24C04 reads or writes mainly completed on the original password change or related set of objectives, and then send the updated passwords saved to it. Proofing unlock is to enter a password and saved in the memory of the password, the same through, otherwise an error to enter the alarm time. Error alarm main processing input password and the password saved in while not in AT24C04 for alarm 1 seconds, if the alarm after password again after the alarm to 3 times the time entered the wrong password, the system will be long beep and self-locking an hour. Decoding part mainly completed in remote processing mode on the remote control signal is decoded to obtain appropriate to complete the corresponding function in code value.4 conclusions
This innovation is the system in addition to the traditional fixed keyboard electronic locks systems function, that is, actions keyboard fixed in locks of the Panel, also adds remote remote control functionality, so bring a lot of convenience, this also is the author's development and design of the system's root cause.
In this system, and past use of 74LS164 chip-driven digital tube display, the system uses the more powerful multifunction serial LED display drive MAX7219 for 8-bit stable static display, only need a single-chip three pins, you can more easily use the microcontroller serial send data displayed, and it takes less time to facilitate the programming and on signal detection, at the same time this system designed for the power part and decoding decoding part after repeated testing proved that the circuit has a very high stability and decoding accuracy, efficiency.Reference summary
[1] Lin Shin Mao, the 8051 microcontroller thorough research foundation ", people's press, 2003.7, 24-153.
[2] Zhao Kuang Protel 99SE circuit, the design and manufacture of electronics industry press, 2005.8, 15-342.
[3] von yaohui etc, the introduction and improvement of PowerPCB 5.0 ", people's press, 2004.6, 17-48.
[4], the Hong Guang electronic technology law, 2nd Edition, higher education press, 2004.7, 10-156.
[5] Hu Kay, Jeff Chiu. biochemical Analyzer of design and communication with PC [J]. a micro-computer information .2006, 22 (4-1): 208-209
[6] Ma hongwen AT89C52 MCU based automatic access cabinet design and implementation [J]. a micro-computer information, 2006, 22 (1-2): 101-103.
No comments:
Post a Comment