Design of electronic password lock system
Abstract: With the continuous development of electronic products to intelligence and miniaturization, single-chip microcomputer has become the first choice controller in electronic product research and development.
This paper introduces an anti-theft automatic alarm electronic password lock system designed by AT89C205 1 single chip microcomputer. Experiments show that the hardware and software design of the system is simple.
Simple, easy to develop, low cost, safe and reliable, convenient to operate, etc. , which can be developed as a product and applied to safes and filing cabinets in homes and offices.
As well as other places needing anti-theft, and has strong practicability.
Keywords: electronic password lock; Infrared monitor; Automatic alarm; single chip microcomputer
Classification number of China Library: TP368 1 1 Document ID: A document number:16722612x (2007) 05201/2204.
Introduction to 0
In daily life and modern office, the safety precautions of residence and office, the documents and archives of the unit, financial statements and some personal data.
Saving is mostly solved by locking. If you use mechanical keys to unlock the lock, people often need to carry multiple keys, which is extremely inconvenient to use, and the keys
Once lost, the security is greatly reduced. In order to meet people's requirements for the use of door locks and increase their safety, traditional mechanical locks are replaced by password electronic locks.
Came into being. At present, there are many kinds of password locks in use, each with its own characteristics. In this paper, AT89C205 1 single-chip microcomputer is adopted from the point of view of economy and practicality.
Machine, developed an electronic password lock with anti-theft automatic alarm function. The design method of password lock is reasonable, simple and low cost.
It has certain promotion value for the requirements of locks used in houses and offices.
1 system function
(1) The system sets an 8-digit password and inputs it through the keyboard. If the password is correct, the lock will be opened.
(2) The password is set by the user. In the unlocked state, users can modify their own passwords.
(3) It has automatic alarm function. Automatic alarm can be divided into field alarm and remote alarm. The on-site alarm is issued by a dual-frequency alarm sound speaker;
Remote alarm connects the system with the telephone, and at the same time, it dials the telephone number pre-stored in the telephone to inform the outside world.
It can only be achieved if it is out of the owner.
(4) You can call the police in two cases: first, you will call the police if you enter the password incorrectly for three times; Second, abnormal door opening, such as breaking into houses, can be passed.
The infrared monitoring device of the system monitors the alarm at the same time, which ensures the safety of the system.
2 system working principle
The system uses single chip microcomputer as controller, and uses infrared monitoring device to monitor whether there is an abnormal door opening, and the infrared monitoring device emits.
The receiver and receiver are installed on both sides of the door respectively. When the system is working, the user presses the key to input the 8-digit password, and after pressing the "confirm" key, the single chip microcomputer will
Compare the entered password with the set password. If the password is correct, it will send an unlock signal to open the door and close the infrared monitoring device at the same time. The system does not
1994-2009 China Academic Journals Electronic Publishing House. Copyright ki.net.
Alarm; If the password is incorrect, the corresponding indicator light flashes, requiring re-entering the password, and the number of re-entering the password cannot exceed 3 times. if
If the password is entered incorrectly for three times, an alarm signal will be sent out. The infrared monitoring device still works when abnormal unlocking conditions such as entering the room occur.
Figure 1 Schematic Diagram of Shrapnel Machine System
When the door was opened, the signal was blocked and the receiver could not receive the letter.
Number, the system alarm at this time.
After the lock is opened, you can also press the Modify/Reset function.
Key to reset the new password. The host can go out and close the door.
"Modify/Reset" function key to restore infrared monitoring device.
Work.
3 system design
Hardware design of 3 1 1 system
The principle structure of system hardware design is shown in figure 1.
The hardware of the system is controlled by single chip microcomputer, including
Keyboard control circuit, unlocking control circuit and infrared monitoring device
Control circuit, alarm control circuit and indicator control circuit, etc
Part.
3111/controller selection and functional characteristics of AT89C205 1.
This system chooses AT89C205 1 as the main controller.
Its features are as follows: 2kB flash memory, 128BRAM and 15 I/O ports.
Line, two 16-bit timers/counters and five vector auxiliary interrupts.
Structure, 1 full duplex serial port with 4. 25 ~ 5.50 volts
The voltage working range and frequency are 12MHz/24MHz,
At the same time, it also has a secondary program memory locking, power-off and clock circuit with an encrypted array, which can save the contents of ram when the power is off, so when the system is powered off,
There is no need to add a power-off protection circuit. Therefore, the system hardware design is very simple.
3 1 1 12 keyboard interface circuit design
The function of the keyboard in the system is mainly used for users to input and modify passwords. Keyboard needs to be designed with 12 key, in which 0 ~ 9 number keys are used for encryption.
Input and modification of code. There are two function keys, one is the "Confirm" key, which is used to confirm after entering the password, and the other is the "Modify/Reset" key, which is used to
Change the password after going out and closing the door, and restore the control of the infrared monitoring device. The keyboard adopts determinant design, and 12 keys are arranged in a 3 ×4 matrix.
In the design, the single-chip computer P 1.0 ~ P 1.3 is used to connect four rows of the keyboard, and P 1.4 ~ P 1.6 is used to connect three columns.
Fig. 2 Infrared transmitting circuit
Design of 3113 unlocking control circuit
The function of the unlocking control circuit is to unlock when the correct password is input. department
P3。 The 2-port line of single-chip microcomputer is used to send signals, which are amplified by two-stage triodes and then transmitted by the following.
The electric appliance drives the solenoid valve to open the lock.
Circuit design of 3 1 1 14 infrared monitoring device
In order to enhance the anti-theft function of the system, an infrared monitoring device is designed in this system.
The device includes two parts: infrared emission and infrared reception, which are installed on both sides of the door respectively.
The basic circuit of the transmitting part is shown in Figure 2. Carbon emission of se 303 plastic packaging.
A diode with a wavelength of 940 nm. The LED is controlled by P3. 0-port line of single chip microcomputer.
Turn it on or off to generate a transmission signal with a specific frequency. The frequency chosen here is
38 kHz and 38 kHz square waves are generated by the timer T 1 of single chip microcomputer.
The basic circuit of the infrared receiver is shown in Figure 3. The receiving tube is made of P IC- 12034 from Japan Optoelectronic Company, and the receiving frequency is 37.
Week 3115th: Design of anti-theft automatic alarm electronic password lock system based on AT89C205 1 single chip microcomputer.
1994-2009 China Academic Journals Electronic Publishing House. Copyright ki.net.
Fig. 3 Infrared receiving circuit
9kHz, the chip has high receiving sensitivity and stable performance. Its basic working process is as follows: when receiving
37. When the signal is 9KHz, output low level, otherwise output high level. The system uses a single-chip computer P3.
1 port line receives the signal, and the system can judge whether there is any abnormality in opening the door by querying P3. 1 port line.
Conditions. The NOT gate here shapes the received signal.
3 1 1 15 automatic alarm control circuit
The function of automatic alarm control circuit is to control the intelligent alarm device of the system. Password for this system.
When there are three input errors or abnormal door opening, start the alarm device. Automatic alarm includes
There are two kinds of on-site alarm and remote alarm. P3 is used for on-site alarm. Single chip microcomputer 3-port line output dual frequency.
After the square wave signal is amplified by the triode, the relay controls the speaker to give an alarm sound. Remote police
That is, in the case of unmanned operation, the phone is controlled by a single chip microcomputer to store the number in the phone in advance.
The code for dialing a landline or mobile phone, so as to inform the owner. According to the requirements of telephone service, this design makes
P3。 4、P3。 Five and P3. 7, each of which is amplified by two transistors and then controlled by a relay.
Fig. 4 system program flow chart
Three functions: number storage, number extraction and hands-free.
Keys, single-chip microcomputer for the operation of the three function keys are very smooth.
This sequence completely simulates the completion of manual operation.
3 1 1 16 operating indicator control circuit
The indicator light is used to enter the wrong password.
Give me a hint. In the design, LED is used as the finger.
Display the light and use P 1. The 7-port line of single chip microcomputer gives signals.
Control operation instruction amplified by the first stage transistor.
Lights.
Software design of 3 12 system
The system software includes main program module and keys.
Disk scanning module, password comparison and judgment module, modification
Password module, intelligent alarm module and delay program.
Waiting module. The system program flow is shown in Figure 4.
3 12 1 1 main program module
The function of this module includes timer and data.
Buffer initialization, local initial password setting, red
Externally receive signal query and keyboard scanning module call
And other functions.
3 12 12 keyboard scanning module
This module has the function of judging whether there are keys on the keyboard.
Down, remove the jitter effect and scan the keyboard column by column to determine.
The position number of the pressed key, namely the line number and the column number, constitutes the key value.
And stores the key values in the specified data buffer,
Judge whether the closed button is released.
3 12 13 password modification module
The function of this module is to modify the password. The password modification program requires you to enter the password twice, and the program will compare the passwords entered twice.
At that time, the original password will be replaced by this password. If the passwords entered twice are inconsistent, the operation will be repeated. This can avoid changing the password.
randomness
3 12 14 password comparison judgment module
4 Journal of Mianyang Normal University (Natural Science Edition) Volume 26
1994-2009 China Academic Journals Electronic Publishing House. Copyright ki.net.
The function of this module is to compare the password entered by the keyboard with the set password, and unlock it if the password is correct; If it is not correct, enter the password.
If the counting unit counts less than 3 times, returning to the keyboard scanning module; If the count reaches 3 times, the automatic alarm module is called.
3 12 15 automatic alarm module
The module uses software delay method to make P3 13 port line output dual-frequency square wave and control the speaker to sound, so as to achieve the purpose of on-site alarm; the same
At the same time, control the "hands-free" key of P3 17 port line, the "extract" key of P3 17 port line and the "store number" key of P3 14 port line for simulation.
Manually operate the telephone, and output the control signal in the control order of "hands-free"-"extraction"-"stored number"-"hands-free", which is completed at one time.
Dialing operation, the time of each key action is controlled by the delay program, so that the mobile phone can dial automatically without operation and realize remote intelligence.
The purpose of the alarm. In order to ensure reliability, the above control process is repeated three times.
4 conclusion
The system has the characteristics of simple software and hardware design, easy development, low cost, safety, reliability and convenient operation, and can be applied to homes and offices.
Safe deposit boxes, filing cabinets and other places that need anti-theft are very practical.
References:
[1] Zhang Qi. Design technology of single chip microcomputer application system-programming based on C language [M]. Beijing: Electronic Industry Press, 2006. 3.
Ding. Principle and application of single chip microcomputer [M]. Beijing: Machinery Industry Press, 200 1. 1.
Zhao Changde. Principle and application of MCS-5 1 /98 single chip microcomputer [M]. Beijing: Machinery Industry Press, 1997.
Cao Qiaoyuan. Principle and application of single chip microcomputer [M]. Beijing: Electronic Industry Press, 1998.
Yu Youwen, Chang Jian. Sensor principle and engineering application [M]. Xi An: xidian university Publishing House, 2000.
Han Fang Sun, Xu Aiqing. Principle and application of MCS-5 1 series single chip microcomputer [M]. Beijing: Beihang Press, 1998.
Design of automatic alarm electronic chip
Lock the system with AT89C205 1
Zhou Gongming
(Department of Physics and Electronic Information Engineering,
Mianyang Normal University, Mianyang, Sichuan 62 1000)
Abstract: With the continuous development of electronic products to intelligence and miniaturization.
Miniaturization, single chip microcomputer has become the first choice for controller development.
Electronic product manufacturing. This paper introduces an automatic alarm electronic password lock system de2.
Signed with AT89C205 1 single chip microcomputer. Experiments verify the superiority of the system.
The software and hardware design is simple, easy to develop, low in cost, safe and reliable.
Ble, and easy to operate. It can be used in residential, office safes and
File cabinets, etc. Therefore, it has certain practicability.
Keywords: electronic password lock; Infrared monitoring device; Automatic alarm; monolithic integrated circuit