First, doesn’t an ordinary lock have a copper core? After disassembling, you can see that the upper side is the groove-the direction of the back of the key, and the other side is a row of small holes. In the small holes, there are copper columns and springs of different lengths (the copper columns are on the side close to the key) and the outside is sealed with aluminum. Usually, the copper column pops up half because it is not stressed, which blocks the rotation of the big copper core. When the corresponding key is inserted, the copper column contacts with the teeth on the key to form a regular curve, and the gap in the big copper core is dodged, so that it can rotate. The principle of turning to open the lock is relatively simple.
Second, in the field of security technology, the electronic password lock with anti-theft alarm function replaces the traditional mechanical password lock, which overcomes the shortcomings of mechanical password lock, such as small password quantity and poor security performance, and greatly improves the technology and performance of password lock. With the development of large-scale integrated circuit technology, especially the advent of single-chip microcomputer, intelligent password lock with microprocessor has appeared, which has not only the functions of electronic password lock, but also the functions of intelligent management and expert analysis system, so that password lock has high security and reliability and is widely used. This paper introduces the intelligent password lock with 51 series single chip microcomputer as the core, and expounds its working principle, basic function block diagram, key design technology and software workflow in detail.
1 basic principle and hardware composition
The system of intelligent password lock consists of intelligent monitor and electronic lock. The two are placed in different places, and the intelligent monitor supplies the power needed by the electronic lock and receives the alarm information and status information sent by it. The line multiplexing technology is adopted here, so that the power supply and information transmission share a two-core cable, which improves the reliability and security of the system.
1.1 the basic principle of intelligent monitor
The composition block diagram of intelligent monitor is composed of single chip microcomputer, clock, keyboard, LCD display, memory, demodulator, line multiplexing and monitoring, A/D conversion, buzzer and other units. It mainly completes the functions of communication with electronic locks, intelligent analysis and safety monitoring of communication lines.
The intelligent monitor is always in the receiving state and receives the alarm information and status information sent by the electronic lock in a fixed format. For alarm information, sound and light alarm will be given immediately through LCD display and buzzer; For the state information, it is stored in the memory, and compared with the historical state of the electronic lock before this moment, the change trend is obtained, and the future state change is predicted, and the corresponding information is provided to the personnel on duty through the LCD display for decision-making. When the intelligent monitor establishes communication with the electronic lock, it monitors the change of power supply current flowing through the communication line in real time through the A/D converter, which effectively prevents the damage caused by human factors and ensures the smooth communication line.
1.2 Basic principles of electronic locks
The composition block diagram of the electronic lock is also based on the 51 series single chip microcomputer (AT89051), with corresponding hardware circuits, to complete the functions of password setting, storage, identification and display, driving the electromagnetic actuator, detecting its driving current value, receiving alarm signals from sensors, sending data and so on.
The MCU receives the typed code and compares it with the password stored in EEPROM. If the password is correct, it drives the electromagnetic actuator to unlock it. If the password is incorrect, the operator is allowed to re-enter the password for up to three times; If it is not correct for three times, the single chip microcomputer will give an alarm to the intelligent monitor through the communication line. The single chip microcomputer sends the driving current value of the electromagnetic actuator and each unlocking operation as state information to the intelligent monitor, and also sends the alarm information received from the sensor interface to the intelligent monitor as the basis for intelligent analysis.
2 Key technologies
In order to improve the security and reliability of the intelligent password lock, this paper not only takes measures in device selection (such as using devices with low power consumption and wide temperature range), but also adopts some key technologies in the design.
2.1 Line multiplexing technology
The intelligent monitor and the electronic lock are placed in different places, and the intelligent monitor supplies the power needed by the electronic lock and receives the alarm information and status information sent by it. If the communication line and power supply line are separated, it is bound to increase the number of cable cores and increase the security risks. In this paper, line multiplexing technology is adopted, and only one two-core cable is used to realize power supply and information transmission.
At the sending end, the electronic lock boosts the modulated data signal through the pulse transformer T and sends it out; At the receiving end, the pulse transformer T reduces the voltage of the received data signal and sends it to the demodulator to reduce the loss of the carrier signal in the transmission process. In order to reduce the mutual interference between communication and power supply, the choice of choke L and coupling capacitor C should be considered comprehensively.
Let the carrier frequency fo = 400 kHz, and let L = 33.7 μ HC1 = 0.047 μ F to ensure that most of the signal energy is transmitted to the receiving end.
2.2 Current monitoring technology
In order to prevent the artificial destruction of communication lines and the electromagnetic actuator from burning the coil due to excessive current flowing through the electromagnetic coil for some reason, this paper adopts current monitoring technology in the design of intelligent password lock. The current monitor adopts the current/voltage conversion chip MAX471 produced by MAXIM Company. The chip can convert the measured current I into the ground output voltage U, and has the characteristics of large measurement range, high precision, and the output voltage U is proportional to the measured current I. The output voltage of the current monitor is sent to the A/D converter. By reading the A/D conversion result, the single chip microcomputer can know the change of the current in the line, find the abnormality in time through analysis, and send out an alarm signal.