Password Protected Electronic Lock System for Smart Home Security

— The proposed system implements a password protected electronic lock that provides a great benefit over a traditional lock, as well as great security. The system comprises of a keypad and 16x2 LCD along with a PIC18F452 microcontroller. The present state is notified by the LCD to the user. User can perform operations such as opening and closing the lock, changing the current password through keypad instruction. The aim of this project is to make such type of lock which will ensure security as well as cost efficient implementation. Password protected electronic lock comprises of keypad as input, LCD display as output device and microcontroller as controlling unit. The lock system is protected by a password which is set by the user. The lock is opened only when the correct password is inserted. On the other hand, Password changing option is somehow more secured, that only authorized person can do it. While changing password a fixed security code (known to authorized person) along with the old password is needed. Thus the enhanced security of the system is ensured.


INTRODUCTION
Science and technology have advanced our life in many ways. It facilitates the process of industrialization as well as modernization of the world. It has blessed us with many sophisticated devices by facilitating our life. Password based locking system is one of the modern electronic lock system. To ensure security many electronic lock have been introduced. Electric locks use magnets, solenoids, or motors to actuate the lock by either supplying or removing power. Operating the lock can be as simple as using a switch. The actuating mechanism of electronic lock is carried out by the application or by the removing of power. Some research works on electronic lock have been focused that will reveal the significance of the proposed system. In paper [1] and [2] RFID based electronic lock has been proposed where authentication process was carried out by RFID based card. Biometric lock has been proposed in [3], [4] and [5] where authentication process was carried out by the verification of face recognition, fingerprint recognition, voice recognition. Encryption based lock has been described in [6], [7] and [8] where the user get opportunity to generate new code. In this project an electronic embedded lock has been designed that provides a great benefit over a traditional lock that uses only a manual key. This proposed lock comprises of a keypad and an LCD along with a microcontroller. This lock can be used in many fields of practical life. For example, in door locking at homes, banks, offices, industries and other restricted areas for security purpose.

A. Theoritical overview
An electronic lock allows activation of an electric appliance only on entering the correct password. Here we have presented such an electronic locking system in which a PIC18F452 microcontroller plays the role of the processing unit. The MCU is interfaced with a 4×4 matrix keypad and a 16×2 LCD to the user interface [6]. Using this circuit, one can make any electrical appliance password protected. It can be used as an electronic door lock by interfacing the output of the circuit with an electrically actuated door lock. The system turns on the appliance on entering a three digit's password. Entire Block diagram of the system is given in Fig. 1.

A. Keypad
A 4×4 matrix keypad is used to give commands and the password to the MCU. It consists of 16 keys (S2-S17 arranged in the form of a square matrix of four rows and four columns).
Each key in the matrix is labeled according to the operation assigned to it. The connections from the pin-outs of the keypad to the MCU pins are shown in Fig. 3. Rows 1 through 4 are connected to pins RB3, RB2, RB1 and RB0 of Port B of the MCU, respectively. Columns 1 through 4 are connected to pins RB4 through RB7 of Port B respectively. Fig. 2 shows the diagram of the keypad we have used.

B. Hardware design
Hardware implementation includes interfacing a PIC (Peripheral Interface Controller) microcontroller 18F4552 [7] with a matrix (4×4) keypad, a servo motor (which actuates the lock) and a (16×2 or 20×2) LCD, also incorporates a power supply unit. Software implementation means loading instructions into the microcontroller, which enables the microcontroller to verify the input from keypad with the stored password, to interface with peripheral devices and to change the current password. The complete project work is divided into several parts. The design of the electronic lock system was first simulated in PROTEUS as given in Fig. 3. Then the lock system is applied to a wood made box to verify it is working or not. The design is shown in Fig 4 and Fig. 5.

C. Working software
MicroC PRO is a powerful and enriched tool for Micros. it has been designed to provide easiest possible solutions for developing applications for embedded system in this project we have used it to develop the software and perform the operations [8]. Our working window in MicroC PRO is given in Fig. 6. IV. RESULT As we can see the practical implementation of this paper is given in Fig. 5 and Fig. 6. Now let us discuss about the results or how the system behaves when we are using it. When the power button is switched ON; microcontroller, servo motor, LCD gets power. Now to OPEN the lock enter password when LCD displays "Enter code" as shown in Fig. 7. If password is correct, "Correct Password" will be displayed in the LCD as shown in Fig. 8 and the lock will be opened which is showed in Fig. 9.  On the other hand, if password is wrong, "Wrong password" will be displayed, the buzzer will give an alarm and the lock will remain closed which is showed in Fig. 10. Fig. 10: Lock is closed. Now this system also gives us an extra benefit to change its password. To go to password change option press "A". Enter old password, when LCD displays "Enter old code" as shown in Fig. 11 and then enter the Security Code, as LCD displays "Security code" which is given in Fig. 12.  Now enter the new Password that is to be set which is given in Fig. 13 and thus the password change operation will be terminated.

V. CONCLUSION & FUTURE WORK
Every innovative work is started with a view to attaining a specific motto. Our main goal was to make such a type of lock which will provide highest security with the sacrifice of little cost. In this regard our project is an attempt to design and implement password protected electronic lock using PIC18F452 microcontroller. PIC monitors the entered password and unlocks the lock when the correct password is inserted. The security system available in present market is too costly to use. Especially in third world country like Bangladesh it is quite impossible for us to use something so costly in general purposes. Our project is a prototype which enables one how to make a password protected lock, which ensures highest security that can be made at a very low cost. This prototype is also reliable and user friendly. If available financial and technical support from the concerned Govt. section and organizations is found, then it will be possible to commercialize the proposed lock for the benefit of the people of our country.
Various novelty and modification can be performed in our project. We can make the locking system more secured by adding more stage .We can use card authorization system in which card will be scanned first then password will be checked later.
We can use another technique called biometrics. Biometrics may be a more prominent and a recognized means of positive identification. Their use may enhance security. Some new technologies such as fingerprint scanning, retinal scanning and iris scanning, and voiceprint identification also can be inserted. We can interface GSM modem which will send sms if invalid attempt is made to open the lock.