Frontiers in Computing and Intelligent Systems ISSN: 2832-6024 | Vol. 5, No. 3, 2023 65 The Electronic Lock of Fingerprint Identification Zhiren Zhu * College of Electrical Engineering, Tianjin University of Technology and Education, Tianjin, China * Corresponding author Email: 710203401@qq.com Abstract: Biometrics is more and more widely used in the security system, with the current realistic needs as a starting point, a microcontroller-based fingerprint identification electronic lock design method is proposed to realize the transformation from the traditional security system door locks to the new fingerprint identification electronic locks. This design uses the matrix keyboard to enter the password and fingerprint to unlock the door in two ways: Through the fingerprint module to collect fingerprints; stm32 microcontroller as the main control module of the fingerprint identification electronic lock, the fingerprints collected by the AS608 fingerprint module and the fingerprints in the memory of the microcontroller will be compared, and the results will be displayed on the screen, the comparison is successful to open the lock, and vice versa does not open the lock. Through the 4x4 matrix keyboard to realize the password unlocking; stm32 microcontroller as the main control module of the fingerprint identification electronic lock, the password entered on the matrix keyboard and the password in the memory of the microcontroller will be compared, and the unlocking result will be displayed on the screen. This design has the advantages of small size, high cost-effectiveness and reliable safety factor. The overall test results of the system show that the fingerprint identification electronic lock functions normally, and the functional modules work stably, realizing the basic functions that the fingerprint identification electronic lock has, which can be used for door locks and other various devices that need security locks. Keywords: Fingerprint Lock; stm32 Microcontroller; Fingerprint Recognition; Biometrics. 1. Introduction With the continuous improvement of modern science and technology, in order to meet the basic human needs of clothing, food, housing, transportation, people's lives are undergoing unprecedented changes, began to pay more attention to the quality of life, security awareness has also increased, especially in the field of smart home, the traditional security system is threatened, the rapid development of biometrics [1], so that the fingerprints of the people to produce new design concepts, each person's fingerprints is the only one, biometrics and electronic locks, fingerprint identification electronic locks on the use of the birth of. Fingerprint identification electronic lock [2] is a kind of locks with more functions compared with traditional electronic locks. The traditional door locks use the verification method of things and things, such as keys, IC door magnetic cards, passwords and other verification methods, as long as you have the "key" can open the "door", do not need to confirm that the person who owns the "key" is who, these methods now seem to have gradually reduced security, easy to lose, and vulnerable to forgery and theft. Who is the person who owns this "key", these methods now seem to have gradually reduced security, easy to lose, and very easy to be forged and stolen. The emergence of biometrics has greatly reduced this possibility. Therefore, a lock with fingerprint recognition function has been occupying an increasingly important role, and has been commonly used by human beings. 2. Fingerprint Identification Electronic Lock Overall Design 2.1. Fingerprint Identification Electronic Lock Overall Architecture This design uses STM32 [3] as the control chip and fingerprint collector, display module, and matrix keyboard as the basic external devices to design a fingerprint identification electronic lock based on microcontroller [4]. The main execution process is as follows, the fingerprint image is captured on the fingerprint module, then sent to the main control chip, compared with the fingerprint information stored in the main control chip, and the result is displayed on the display module; or enter the password through the matrix keyboard, and compared with the password stored in the main control chip; in case of authentication error, the buzzer emits an alarm sound and locks the combination lock from any operation, which completes the fingerprint identification This completes the function of fingerprint identification electronic lock system. 2.2. Fingerprint Recognition Electronic Lock Design Solution The design solution of this paper will be developed in two aspects, hardware design and software design. The important components of the hardware part are microcontroller development board [5], diode display, physical press keypad, fingerprint identification device, and lock body. The software part is written using Keil 5 [6] and downloaded using STLINK, this design is low cost and high security, the information is processed through STM32, which avoids the complexity of the program as well as the hardware circuitry in the design, which is the main point to be considered in the design of this program. According to the existing level of development of fingerprint electronic locks, there are often the following two options: Program 1: fingerprint identification electronic lock based on STC89C51 microcontroller [7] Compatible with Intel 8051 integrated circuit chip [8] is the most common entry is a microcontroller, compared to other microcontrollers, its operating system is simple and complete, and has multiplication and division instructions, easy 66 programming, but 51 microcontroller I / O pin high level when no output capacity, running the program is too slow, it is easy to burn the chip. Therefore, the system of using 51 microcontroller to control the fingerprint identification electronic lock has been obsolete. Program 2: Fingerprint identification electronic lock based on STM32 microcontroller STM32 series microcontroller is a high-performance ultra- low-power microcontroller introduced by ARM, selected STM32 enhanced series, which can realize complex functions at the lowest cost, with the largest integration, first-class peripherals, and processing information at a fast speed, simple structure, easy to operate, powerful, more internal resources than the STC89C51 microcontroller, equivalent to the computer's CPU, applicable to a wide range of. By comparing the above two solutions in terms of safety factor, workload, operation difficulty, information processing speed of the main control chip and cost, this system adopts the second solution, that is, it adopts the STM32 microcontroller, which is powerful, fast in processing information and low in cost, as the main control chip of the fingerprint identification electronic lock. The structure diagram of the overall control system program is shown in Figure 1. Figure 1. Structure of the overall scheme of the control system 2.3. Hardware Architecture According to the design requirements of fingerprint identification and the internal structure and characteristics of STM32 series microcontroller, the overall design idea of the hardware of fingerprint identification electronic lock is proposed. Taking STM32 microcontroller as the central core controller, the fingerprint module transfers the received fingerprint information to the central core controller or the input information from the matrix keyboard to the central core controller, and after arithmetic and processing, it then transfers the control signals to the lock cylinder driving circuit to complete the function of whether to unlock the door and show it on the display. The hardware part of the fingerprint identification electronic lock mainly includes the STM32F103C8T6 core main control system, fingerprint module, and display module and other components. Each module is described as follows: 1. STM32F103C8T6 core master control system STM32F103C8T6 microcontroller development board minimum system board as the core control unit of the whole system, will be the upper computer to pass over the information received and processed, transformed into the core lock drive control signals, so that the fingerprint identification electronic locks to carry out accurate unlocking. 2. Fingerprint module Fingerprint module [9] plays a role in connecting the upper computer and the lower computer, the signals transmitted to the microcontroller, after the fingerprint module for processing, the fingerprint acquisition and results reported to the upper computer, the upper computer locking program and effective information sent to the lower computer controller in real time, the STM32F103C8T6 microcontroller automatically realize highly accurate fingerprint identification processing, so that the locking process can be carried out smoothly. The process of unlocking can be carried out smoothly. 3. Display Module The display module plays a role in connecting the device and the user. The microcontroller displays the next operation on the screen, and the user performs the next operation according to the displayed information, so that the unlocking process can be carried out smoothly. 2.4. Software Architecture The design of fingerprint identification electronic lock based on STM32 microcontroller, in order to higher precision fingerprint identification, the fingerprints are recorded in the ATK-AS608 fingerprint module and stored and numbered, and then swipe the fingerprints, scanning the fingerprints to obtain fingerprint information, and the stored fingerprints for comparison, judgment, and to decide whether to unlock the door or not; or through the matrix keypad enter the 6-digit password to unlock the door. When we want to delete the fingerprint, we enter the administrator mode through the matrix keyboard, input the 6-digit password, and after passing it, we can delete it with the number of the fingerprint. System software as the most important part of the whole software system, especially in the method of processing fingerprint information and password information, will determine whether the fingerprint identification electronic lock can be stable, fast and accurate operation. 3. Fingerprint Identification Electronic Lock Hardware Design 3.1. Hardware System Overall Design The fingerprint identification electronic lock is designed based on STM32 microcontroller, the hardware part of the design schematic to start the design, only the correct schematic can make the fingerprint identification electronic lock normal operation, in the design process, the software part can be debugged, but the hardware part of the design can not be modified once the welding is completed, therefore, the design of the hardware circuit must be checked several times. The hardware circuit is designed using Altium Designer 6.9 [10]. 3.1.1. System Block Diagram Design Hardware circuits are designed using Altium Designer 6.9 according to the functions that need to be realized, and the unit circuits and peripheral circuits are independently designed, debugged, and connected to other modules, and finally nested logically to achieve the overall design, the specific hardware block diagram design is shown in Figure 2. Figure 2. Block diagram of the overall hardware design 67 3.1.2. Schematic Design of the System In the design process, although each module is separated, it is only necessary to place the same network markers on the pins that need to be connected. Through this method of placing network labels, on the one hand, to avoid a large number of wires connected to the problem of error, making the overall circuit diagram looks clear, on the other hand, it is easy to troubleshoot the possible errors after welding. The overall circuit diagram of the fingerprint lock is shown in Figure 3. Figure 3. Fingerprint Recognition Electronic Lock Schematic Diagram 4. Software Design of the System In this design of fingerprint identification electronic lock, the microcontroller is the main controller, mainly sends commands to the matrix keypad, fingerprint module and display, and accepts the commands and data returned from these three modules, so the software part of the program is mainly developed for the matrix keypad and display. This design uses flowchart to sort out the relationship, which can make the whole programming idea clearer and has strong logic. The software development environment is the microcontroller software keil 5, due to the many functions to be accomplished in this design, the use of a single source file will bring great difficulty to programming, so we will create multiple source files and header files to add to a project, and then downloaded to the microcontroller to execute. 4.1. Software Development Environment As the fingerprint identification electronic lock is a piece of equipment through the upper computer to control the lower computer to achieve the function of unlocking, so it is necessary to use the relevant software for the development of the system, for the upper part of the computer needs to display the relevant information on the screen; the lower part of the computer is based on the MCU control system for the control of the peripheral modules for the design. The whole fingerprint identification electronic lock needs to achieve the function of program writing using Keil 5. After the program part is written, use STLINK to download the written program to the microcontroller. 4.2. Main Program Flow Chart The overall execution process of the fingerprint lock is as follows: first initialize all parts of the hardware module, including the display module, matrix keyboard module, fingerprint identification module. Then it is divided into directly inputting the password or judging whether there is a finger pressing on the fingerprint collector module; the background management mode has four parts: modifying the administrator password and unlocking password, adding fingerprints, deleting individual fingerprints, and deleting all fingerprints. The "#" indicates the confirmation function, and the "*" indicates the function of returning to the previous step. The main program flow chart is shown in Figure 4. Figure 4. Main flow chart of the program 4.3. Keyboard Detection Scanning Program Design The main function of the matrix keyboard in the peripheral circuit is to interact with the user and control the whole process by pressing the keys. The main function of the microcontroller is to determine whether a key is pressed or not, as well as to determine the key value based on the pressed key and to perform the function expected by that key. The keypad detection scanning flowchart is shown in Figure 5. Figure 5. Keyboard Scanning Flowchart 4.4. OLED Display Design The main role of the display module is to display the execution results of the system on the screen, which serves as a medium between the electronic lock and the user, and based on the information displayed on the screen, the user selects the next operation to be executed according to his personal needs. The OLED display flowchart is shown in Figure 6. 68 Figure 6. OLED Display Flowchart 4.5. Fingerprint Module Programming Figure 7 . Flowchart for entering fingerprints Figure 8. Flowchart of fingerprint swiping The role of the fingerprint module is mainly to realize the collection of fingerprints, and the collected fingerprints will be sent to the host computer, by the host computer to determine the need to perform the operation, enter the fingerprint flowchart shown in Figure 7. The fingerprint swipe flowchart is shown in Figure 8. 5. Summarize In the future, I believe that the fingerprint identification of the electronic lock will be applied in more fields. In order to improve the market competitiveness of products, the development trend of fingerprint identification electronic lock in the future should be: improve the identification rate of fingerprint identification module, optimize the software algorithm to improve the response speed of the system, enhance the stability of the communication module, and add more security protection mechanisms. In addition, it can also plan to link the system with more smart home devices to achieve a more convenient and intelligent lifestyle. References [1] Wang Xiao,and Wang Peng." Design of intelligent access control system based on biometric technology." Information and Computer (Theoretical Edition) 34.22(2022):157-159. [2] Su-Wen Chang, Shi-Shi Hsu, and Wen-Hao Gui." Design and realization of fingerprint electronic lock." Journal of Wuhan University of Technology (Information and Management Engineering Edition) 35.01(2013):4-7+22. [3] Luo Ruping, et al. "STM32-based fingerprint password lock control system." Information Technology and Informatization . 07 (2021):179-182. [4] Lv Yunfei, et al. "A microcontroller-based access control system for dormitory security management." Electronic Production 31.15(2023):35-39. doi:10.16589/j.cnki.cn11- 3571/tn. 2023.15.012. [5] Sun Lanlan, et al. "Multifunctional microcontroller development board based on STC15 series." Gansu Science and Technology 50.12(2021):1-3. [6] Yang Xucun, and Liu Fei." Proteus+Keil5-based "from virtual to real" concept in embedded system teaching." Electronic Testing .16(2020):120-122. doi:10.16520/j.cnki.1000-8519. 2020. 16.050. [7] Li, P. L., et al. "Design of electronic combination lock based on STC89C51 microcontroller." Software 41.09(2020):23-25. [8] Gao Yanfei." Zhao Xiaohui bravely broke into the new road of integrated circuit chip development." Contemporary Guizhou . Z4 (2023):41. [9] Xu Benyu,and Yu Su." Electronic lock design based on fingerprint image recognition." Electronic Fabrication 31.12 (2023):89-92. doi:10.16589/j.cnki.cn11-3571/tn. 2023. 12. 024. [10] Yangwei Cui,and Hongwei Li." An Exploration of Circuit Design in Altium Designer." Electronics World .08(2021):41- 42. doi:10.19353/j.cnki.dzsj.2021.08.020.