Full text
1. Introduction
With the development of science and technology, people on the safety lock of the increasingly high demand. The traditional mechanical lock because of its simple structure, prizing events. Now the it is often seen. electronic password lock locks in life than traditional security has improved[1]. But still can not meet people's requirements of the use of locks to solve. The lock many security problems, the design of a new password lock solution, the security and reliability of lock can be greatly improved. The key issue of using different combinations of light to achieve the purpose of the password to open the door.
At present, due to the use of people's daily life lock mostly traditional mechanical lock, it has been well known for this lock structure, and the other simple ways you can open the lock. It led to the safety performance is greatly reduced. The demand for new security lock is also growing[2]. In order to meet the needs of the people and we design a new password lock. The research project by setting different color light combinations as the password, making an electronic key can emit light. Using keys emit different colors of different permutation and combination of light open the door to achieve purpose.
Only a correct password, or not it is difficult to unlock, and the password can be changed at any time, safe and reliable.
2. Overall Design of System
The design of the door system is divided into two parts. One part is the key system, the other part is a key system for sending lock system. The circuit design of the system, mainly by the LED lamps of different colors, 1602 LCD display, matrix keyboard, 51 single chip microcomputer.
It through the matrix keyboard input unlock password. At the same time it can be displayed in the 1602 LCD, microcontroller matrix keyboard input signal, the control of LED lights of different colors light out, as the input optical signal emitted[3.4]. Lock system first accepted by the TCS3200 sensor signal, TCS3200 sensor is obtained by processing the corresponding R, G, B value. It can be set the single-chip numerical sensor to get the R, G, B values. If the sensor from R, G, B value R, the microcomputer G, the B value range, enter the correct password, get the instruction for the microcontroller, by control relay, open the electromagnetic lock( Figure 1).
3. Hardware Design
3.1. Minimum system design of single chip
microcomputer The smallest single-chip system controller in the graduation design, all functions to be completed are done by SCM system programming. In order to complete a good performance of the works, we will need to design a SCM system performance[5]. The control of the controller will better than other devices. SCM is based on this design works( Figure 2).
Figure 1. Overall system design.
Figure 2. Internal structure diagram of single chip microcomputer.
3.2 Clock circuit design
The clock circuit is the core part of SCM, the clock circuit controls the working frequency of the MCU, MCU function in different directions through the complex sequential circuits, and timing circuits have a very important role in the clock signal.51 microcontroller can be produced by the same way, decided to use internal or external can according to the this design needs demand. With the internal clock to design the timing circuit (see Figure 3).
. Figure 3. click circuit.
3.3. System reset circuit design
When power on, the capacitor C diagram start charging current circuit is formed, from the pressure drop across the resistor R1, RST pin electric high. When the capacitor C1 is fully charged, the equivalent circuit is disconnected, the RST potential is zero, reset end[6].
Thus reset time is determined by the time of charging, charging time and reset time. The size of the capacitor and resistor can determine the reset time. Increase the capacitance and resistance size, can increase the reset time. The reset circuit can be realized by manual reset button, press the button, the circuit to form the road, this will produce a high level reset end chip Reset operation.
Similarly, the longer the key, the longer the reset time(see Figure 4).
Figure 4. reset circuit.
3.4. Photosensitive sensor
TCS3200 sensor is a color recognition module, to identify the various color module together, and then through the silicon photodiode and the current frequency converter integrated together[7]. At the same time the sensor integrated in the red green blue (RGB) three kinds of filter, the TCS3200 input signal is analog, the output signal is digital, all light can be identified and recognized directly after the output digital logic, so TCS3200 sensor and micro processor or other digital logic circuit is connected with the sensor can directly convert analog to digital conversion, do not need to build other analog digital conversion circuit, Single chip microcomputer can be directly controlled, so that the circuit becomes more convenient and simple(see Figure 5).
Figure 5. Sensor wiring diagram.
Figure 6. Program flow diagram.
4. The Software Design and Test
4.1. software design In the program design, the core part is the program design of the two modules: part is the program design of the sending module, and the other part is the program design of the receiving module The main program module process is mainly LCD1602 initialization, keyboard matrix initialization, timer initialization; start the matrix keyboard, MCU for testing, when a signal is detected, the corresponding LED light to light out, the corresponding number in the LDC1602 display, so as to realize the transmitted signal.(see Figure 6).
The main program module of the receiving process is mainly TCS3200 sensor signal, after processing, the corresponding R, G, to the microcontroller, the value of B if R, G, B value is in the range of set value, so long through the relay to high level electromagnetic lock, electromagnetic lock is opened[8].
4.2. Hardware debug
First of all to the single-chip control devices of the system physical connection, should pay attention to the accuracy of line and fixed line, the crystal must choose suitable, otherwise it will cause the inaccurate.1602 LCD must be connected by adjusting the adjustable resistance, can be in the backlight resistor so that the display screen is connected with the singlechip.LED clear to choose suitable resistance, prevent LED in high current in the case of burn out. The matrix keyboard, TCS3200 sensor can ensure the accurate connection. 12V single-chip microcomputer to control the electromagnetic lock must be controlled by the relay[9].
Figure 7. relay circuit. Start RGBvalues werecompared Y N Send order Microcomputer receive order Electromagnetic lock got electricity
4.3. Software Debugging
During the preparation process, we must pay attention to the initialization and delay. The main program is calling the subroutine. Should pay attention to the relation between sub program, matrix keyboard scanning and LED lights and 1602 display at the same time.TCS3200 must be white balance before use. The software debugging process, to initialize each subroutine write, different subroutines should pay attention to the format, the main program in the process of subroutine calls.
5. Summary
Through the design process of the code lock, we can know the function of each chip, sensor, and the composition of the system composition, understand the basic knowledge of optical communication, and lay the foundation for future professional research.
The password lock compared to other traditional locks, relatively new, so most people do not grasp the technology, it is difficult to unlock, relatively safe. In addition, can also according to the purpose, the function is improved, the development of space technology.
This design has prominent advantages, can obtain the practice and development in the lock. The utility and cost-effective, good durability, the product material cost is low, the production cost is low, the market development space is very large, the practice of visible light communication development will make the lock more. From the safety, energy saving, environmental protection and visible point of view. Communication password lock has broad prospects.
Acknowledgement
This research was financially supported by the College Science and technology project of Shandong Province The Design of Internet of things remote identification and information collection system based on 4G(J15LN59) and the design of cloud platform for internet of thins environment based on B/S.
Figures





