Password Protected Electronic Lock System for Smart Home Security

Download Full-Text PDF Cite this Publication

Text Only Version

Password Protected Electronic Lock System for Smart Home Security

Md. Maksudur Rahman1, Dr. Mohammed Sowket Ali2 & Md. Shoaib Akther1

1Lecturer, Department of Electrical and Electronic Engineering, Bangladesh Army University of Science and Technology (BAUST), Saidpur Cantonment, Saidpur-5310, Bangladesh.

2Assistant Professor, Department of Computer Science and Engineering, Bangladesh Army University of Science and Technology (BAUST), Saidpur Cantonment, Saidpur-5310, Bangladesh.

Abstract 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 16×2 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.

Keywords RIFD, PIC18F452 microcontroller, LCD, Servomotor.


    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 digits password. Entire Block diagram of the system is given in Fig. 1.

    Fig. 1: Block diagram of Password protected lock System.


    1. 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.

      Fig. 3: 4×4 matrix keypad

      Fig. 2: Keypad of the electronic lock system

    2. 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.

      Fig. 3: Circuit diagram of the entire system in PROTEUS.

      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.

      Fig. 4: Hardware implementation of the smart lock system (front view)

      Fig. 5: Hardware implementation of the smart lock system (backside/ inside view)

    3. 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.

    Fig. 6: Working window in MicroC PRO.


    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.

    Fig. 7: Enter code in the LCD display.

    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.

    Fig. 8: Correct Password in the LCD display.

    Fig. 9: Lock is opened.

    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.

    Fig. 11: Enter old code in the LCD display.

    Fig. 12: Security code in the LCD display.

    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.

    Fig. 12: Enter new code in the LCD display.


Every innovative work is started with a view to attaining a secific 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.


  1. Gyanendra K Verma and Pawan Tripathi, A digital security system with door lock system using RFID technology, International Journal of Computer Application,Volume 5No.11, pp. 6-8, August 2010.

  2. M. K. Shafin, K. L. Kabir, N. Hasan, Development of an RFID based access control system in the context of Bangladesh, IEEE Sponsored 2nd International Conference on Innovations in Information Embedded and Communication Systems, pp. 1-5, 2015.

  3. H. Hassan, R. A. Bakar, A. T. F. Mokhtar, Face recognition based on auto switching magnetic door lock system using micro-controller, International Conference on System Engineering and Technology, pp. 1- 6, 2012.

  4. Madhusudhan M. and Shankaraiah,Implementation of automated door unlocking and security system, International Journal of Computer Applications, pp. 5-8, 2015.

  5. Arundhuti Chowdhury, Revolution in authentication process by using biometrics, International Conference on Recent Trends in Information Systems, pp. 36-41, 2011.

  6. R. Jagdale, S. Koli, S. Kadam and S. Gurav, Review on intelligent locker system based on cryptography, wireless & embedded technology, International Journal of Technical Research and Applications, pp. 75-77, March 2016.

  7. H. Chen, J. Liu and C. F.Yang, Design of intelligent locks based on the triple KeeLoq algorithm,Advances in Mechanical Engineering, vol. 8, no. 4, pp. 1-7, 2016.

  8. Jason Johnson and Christopher Dow, Intelligent door lock system with encryption, US Patent Application Publication Johnson et al., pp. 1-92, June 2016.

Leave a Reply

Your email address will not be published. Required fields are marked *