Face Recognition Based on Auto-Switching Magnetic ... - IEEE Xplore

49 downloads 104405 Views 630KB Size Report
EMAIL: [email protected]. EMAIL: [email protected]. EMAIL: [email protected]. Abstract—Face recognition system is widely used ...
2012 International Conference on System Engineering and Technology September 11-12, 2012, Bandung, Indonesia

Face Recognition Based on Auto-Switching Magnetic Door Lock System Using Microcontroller Harnani Hassan*1 Raudah Abu Bakar*2 Ahmad Thaqib Fawwaz Mokhtar*3 *Faculty of Electrical Engineering Universiti Teknologi MARA 40450 Shah Alam, Selangor EMAIL: [email protected] EMAIL: [email protected] EMAIL: [email protected]

Abstract—Face recognition system is widely used for human identification due to its capability to measure and subsequently identifies human identification especially for security purposes. This paper presents the development of Graphical User Interface (GUI) based on face recognition system and Peripheral Interface Controller (PIC) as an input/output carrier to switch on/off magnetic lock for door lock security system. The development is implemented by interfacing GUI built in MATLABR2009a with microcontroller to auto-switching magnetic lock for door lock security system. USB serial communication is used to interface between GUI and PIC microcontroller that allows input data transmission from GUI to microcontroller. The developed system shows that the auto-switching mode transmission being implemented via PIC microcontroller and USB serial communication cable. It was also found that GUI can successfully switch on and off the magnetic lock when an authorized image from GUI database is identified. Keywords — Peripheral Interface Controller (PIC); microcontroller; Graphical User Interface (GUI); MATLAB;

I.

INTRODUCTION

The securities currently become a very important issue and this is why a lot of security systems have been purpose using an important process such as recognition especially for building access controls [1]. Face recognition is one example of process that improves the security application for building access control. The advantage of using face recognition instead of other identification process such as iris or fingerprint identification is because it least intrusive and more secure [2]. The development of GUI-based face recognition system for door lock control using microcontroller is an example of security system for building access control. The process start by creating a new template based on user face information. This template is compared to the template exist in database, and if the template match within a set tolerance, access to the desire resource is granted the signal being send 978-1-4673-2376-5/12/$31.00 ©2012 IEEE

through communication port to microcontroller[3]. Nowadays, building security has become one of the important issues to deal with [2]. Many identification processes have been introduced to improve security system for building access control such as face recognition, iris and finger identifications. Compared to others, face recognition is less intrusive and more secure [4]. Initially a new template will be created based on user’s face information. The created template will be compared with the existed template in the database. Access will only be granted if the matching features between both templates are within the set of tolerance. Many methods can be applied in face recognition system. One of them is Eigenfaces. This method works when the face images are projected onto a face space (feature space) which best defines as the variation of the known test images. The face space is defined by the eigenfaces which are the eigenvectors of the set of faces. Then the person identification is obtained by comparing the projection of new image in feature space with the available projection of training set image [4]. The use of GUI can greatly simplify the process. It can speed up the user’s work, so that users no need to look up the command line to run the program or the system. All the algorithms for GUI and eigenfaces recognition method are build using MATLABR2009a. Microcontrollers are used in this project because of its high speed performance, low-cost and programming flexibility. As a standard computer, the microcontroller also consists of CPU, ROM, I/O ports and timer. However, they are designed to execute only single specific task to control a single system. Furthermore, PIC16F877A microcontroller has a built in universal synchronous asynchronous receiver transmitter (USART) hardware that allows direct communication with personal computer [5]. The USART module has two modes of operations: synchronous (requires a synchronized clock

between the transmitter and receiver) and asynchronous (no synchronization clock required). The USART is most commonly use in asynchronous mode. This paper is divided into several sections. Section 2 briefly explains the system development method. Section 3 explains about minimum circuitry used in hardware implementation. Section 4 presents the development of door lock system circuitry using microcontroller. Section 5 describes the microcontroller programming development. Section 6 explains the development of graphical user interface (GUI) using MATLAB software. Section 7 provides the results and discussion and finally Section 8 concludes the overall work done.

II.

III.

PIC 16F877A MICROCONTROLLER

The PIC16F877A microcontroller with up to 8k x 14 words of flash memory is used in this system. It has 368 x 8 bytes of Data Memory and 256 x 8 bytes of EEPROM Data memory. It is powered by 5V DC power supply and it also consists of 33 I/O pins [4]. The minimum circuitry for PIC16F877A is presented in Figure 2. As shown in Figure 2, Port 1 is the Master Clear input which can reset the PIC while 20 MHz crystal oscillator and 2 units of 22 pF capacitor are used to make the IC works.

METHODOLOGY

The developed system is divided into two parts. As shown in Figure 1 the first part of the system is GUI based face recognition system and the second part is microcontroller hardware implementation. The GUI based face recognition system functions as the master control slave unit for microcontroller PIC16F877A. In this system, a recognized image is transformed into 8 bit signal as an ASCII code through serial communication port to microcontroller circuit. Then, the serial signal is converted into CMOS level signals using MAX232. The received signal will be analyzed by the microcontroller to lock or unlock the magnetic lock. Figure 2. PIC 16F877A minimum circuitry

MAX232 is a serial RS232 to TTL/CMOS level converter which converts +/-10 V serial RS232 signal to TTL/CMOS level 0 to 5V. This connection is important to allow the communication between laptop and PIC microcontroller [6]. Since most laptop nowadays does not have serial communication port therefore, USB to DB9 converter is suitable for the proposed design. Figure 3 below shows the circuit diagram and connection of USB serial communication to MAX232 circuit.

Figure 3. USB serial communication to MAX232 circuit Figure 1. Flow chart of proposed Door Lock System

IV.

DOOR LOCK SYSTEM

The magnetic lock unit is controlled by PIC16F877A as shown in Figure 4. The microcontroller enables various functions of ports such as digital I/O. Additionally analog input and USART port for serial communication are regulated by the microcontroller.

Figure 4. Schematic diagram of door lock system

To fulfill the requirement for this system, a prototype circuit is developed to control the magnetic lock. The designed circuit received serial signal from MAX232 circuit at RC6. Then, the switching transistor 2N2222 is turned ‘ON’ whenever face is being identified at output pin RD2. Pin RD1 is set to turn on the LED whenever image is identified. This system only used transmitter at pin (RD6) instead of using transmitter and receiver. This is because the system only received a transmitted data from GUI. This circuit is designed with 20MHz external crystal oscillator for faster execution time.

V.

MICROCONTROLLER PROGRAMMING

PIC16F877A is a programmable microcontroller, a serial programming and reprogramming with a flash memory capability [7]. The whole process of controlling input and output of the system is developed in C programming language. The developed programming consists of desired delay, input original state setting with provided interchangeable serial data transmission technique using an embedded USART. The developed programming used a Mikroelectronika (mikroC) as a compiler. It provides supporting tools for testing and debugging with helpful software libraries [8]. The flow chart of the programming is shown as in Figure 5.

Figure 5. Flow chart of PIC microcontroller algorithm.

VI.

GUI DEVELOPMENT

A Graphical User Interface (GUI) is a pictorial interface to a program. The implementation of GUI is important as it allows user to choose what action should be taken and performed by the system. Figure 6 shows the layout of GUI. The developed GUI consists of 4 push buttons which are Training Image, Testing Image, Delete Database and Exit buttons. Each button perform different task. The GUI also comes with two image boxes for image display and two text boxes for text display.

VII.

RESULT & DISCUSSION

Figure 8 shows the Testing image is matched with the Training image that will turn OFF the magnetic lock at door and subsequently allows user to enter the room. The matched picture is the image chosen by user. The input picture is the image traced by the system. In Figure 9, the LED turned ‘ON’ as an indicator the door is opened after the image is identified by the system.

Figure 6. Layout of Graphical User Interface (GUI).

Figure 7 shows the GUI development flow chart using MATLABR2009a. In the flow chart, GUI is used as window platforms for image recognition process.

Figure 8. Training Image and Testing Image are matched.

Figure 7. GUI Development Flowchart

GUI window platform requires four push buttons for interfacing process. The platform allows user to select image in training image folder as a database. Then, the user is allowed to choose image in testing image folder. The system will either identify or match both images. After the identification process, the information will be sent to the microcontroller to switch the magnetic lock ON/OF.

Figure 9. LED is turned ‘ON’ as an indicator the magnetic lock turns ‘OFF’.

Figure 10 shows the cases when the access is denied. This is because the Testing image did not match with training image in the database. The magnetic door remains close or in ‘ON’ condition until the recognition system identify a recognize image. The LED turned ‘OFF’ as an

indicator the door remains close after the image is failed to be recognized by the system as shown in Figure 11.

Figure 12. Serial signal of ASCII ‘A’ character transmitter form GUI.

Figure 10. Training Image and Testing Image doesn’t match.

Transmitted data from GUI are transformed into an asynchronous form. Then, the data are divided into frames in byte size. The transmitted data from GUI only used 7 bits of data frame with the 8th bit of data frame referred as the parity bit for error checking purpose. Figure 12 shows the serial signal before it being converted into CMOS level therefore the voltage level is +/- 6.24V and -6.24V represent logic ‘1’ while +6.24V represent ‘0’. Figure 13 shows an overall system where the magnetic lock automatically turns ‘OFF’ when it identify an authorized image from GUI database. Users were given 4seconds to access the door before the magnetic lock turn ‘ON’ and lock the door.

Figure 11. LED is turned ‘OFF’ as an indicator the magnetic lock remains to turn ‘ON’.

Figure 13. Overall system of GUI based face recognition system for door lock control using microcontroller. VIII.

Figure 12 shows the ASCII ‘A’ character transmitted from GUI to the Microcontroller. Microcontroller turned off the magnetic lock when it received character ‘A’ from GUI. The microcontroller compares its reference ASCII code character with the data received from the GUI and switched off the switching transistor when the character received matched with the character saved in microcontroller.

CONCLUSION

The GUI based face recognition system for door lock control using microcontroller has been developed in this study. All related work lead to the completion of the study, including the development of GUI based face recognition system and auto-switching magnetic lock mechanism with microcontroller.

The performance and functionality of the designed system showed that the transmission of data from GUI to microcontroller is successfully done after the image is recognized. The system can be improved to become fully automatic face recognition system by adding another feature that automatically capture image with a sensor when there is human presence at the entrance area. REFERENCES

[1]

[2] [3] [4] [5] [6] [7] [8]

Jawad Nagi, Syed Khaleel Ahmed, “A MATLAB based Face Recognition System using Image Processing and Neural Networks, ” 4th International Colloquium on Signal Processing and its Application, March 7-9,2008. Michal Coras, “Perspective Methods of Biometric Human Identification,” Inst. of Telecommun., Univ. of Technol. & Life Sci., Bydgoszcz, Poland, 25-27 Sept. 2008. Robert C. Schultz, Robert W. Ives, “Biometric Data Acquisition using MATLAB GUIs,” 35th ASEE/IEEE Frontiers in Education Conference, Oct 19-22,2005. Wan Mohd Nor Izudeen bin Wan Ahmad, “Face Recognition System Based on Eigenfaces using Matlab”, Thesis, Faculty of Electrical Engineering, Univertisti Teknologi Mara, 2007. Mohd Suhaimi B. Sulaiman, “GUI Based Remote ON/OFF Control and Monitoring Single Phase Lamp Using Microcontroller,” International Journal on Computer Science and Engineering, Vol. 02, No. 04, 2010. “MAX232Datasheet”, www.datasheetcatalog.org/datasheet/texasinstruments/max232.pdf,9am, 18Oct2011. “Mikroelectronika development tools and compiler”, http://www.mikroe.com/, time, 2pm, 25 Oct 2011. “Microchip PIC16F87XA Datasheet”, http://www.microchip.com/ParamChartSearch/chart.aspx?branchID=100 2&mid=10&lang=en&pageId=74, 9am, 18 Oct 2011.

Suggest Documents