Professional Documents
Culture Documents
Design and Construction of Electronic Door Access Key
Design and Construction of Electronic Door Access Key
Design and Construction of Electronic Door Access Key
net/publication/338690665
CITATIONS READS
0 860
1 author:
Mina Tamunowari
Rivers State University of Science and Technology
2 PUBLICATIONS 0 CITATIONS
SEE PROFILE
Some of the authors of this publication are also working on these related projects:
All content following this page was uploaded by Mina Tamunowari on 20 January 2020.
by
TAMUNOWARI MINA
ENGR. M. O. NWOKU
SUPERVISOR
SEPTEMBER, 2018
TABLE OF CONTENTS
TITLE PAGE…………………………………………………………………………..1
DECLARATION.……………………………………………………………………...2
APPROVAL PAGE……………………………………………………………………3
DEDICATION…………………………………………………………………………4
ACKNOWLEDGEMENT………………………………………………………..…….5
LIST OF ABBREVIATIONS……………………………………………………..……7
ABSTRACT….…………………………………………………………………………8
BACKGROUND OF STUDY
1.1 INTRODUCTION
Many years ago, when security was less of a concern in the society, our forefathers comfortably
used simple sleeping mats to cover the doors of their huts. They were not bothered at all by any
event of a burglary attack because they had a system that wouldn‟t allow that to happen.
Everyone knew their neighbours and virtually everyone else in the village.
Nowadays it has become almost impossible to achieve that kind of sanity and therefore various
tools have been employed over the years to safeguard the lives and properties of its owners.
The present electronic security system we now enjoy have unequivocally been around for a very
long time, although it has gone through a series of evolutionary changes to cater for the needs
From using sticks to wedge doors to using mechanical locks, security systems have
metamorphosed into using electronic equipment such as the microcontrollers which is intended
1.2 AIM
Unlike the traditional door lock system, keypad door locks do not have any need for physical
keys. They are basically keyless; that is, anyone can lock or unlock them even without keys.
Technically, they work like the ATMs. People only need to punch in their secret combination
numbers in order to lock or unlock their doors. With this kind of entry system, people no longer
have to worry about lost or stolen keys and they never have to bring keys with them everywhere
they go or hide them in secret places to keep them away from the hands of unauthorized
individuals.
The secret numbers of the keypad door locks can be easily changed into another combination.
When people feel that their current number combinations have been divulged to unauthorized
individuals, they can always change the codes anytime. In addition, if the current owners of the
house decide to sell the property or have the house rented to others, they can always just let the
new people living there know about the access codes to the locks. There is no need to change
locks at all.
The aim of this project therefore, is to design and construct a keypad/password based electronic
One could attest to the fact that the metallic keys used to access mechanical door locks are very
susceptible to getting lost, which would mean breaking the locks over and over again if there are
more occurrences of such scenarios, moreover, such access keys can be duplicated by
unauthorized users.
Using an electronic door lock as said earlier would counteract the damning consequences of such
repugnant occurrences.
1.4 OBJECTIVES
The objective of this project in its simplest terms is to replace metallic keys by building a fully
1. Review of similar works on electronic door access key was carried out.
1.5 SIGNIFICANCE
1. Pick-proof: Because there is no place for metallic keys with the electronic lock, it
prevents break-ins because burglars are unable to pick or “bump” the lock. The methods
used by criminals for breaking and entering are improving and the majority of criminals
2. No more keys: One wouldn‟t have to carry around a large set of keys and they will be
the building. Additionally, residents and landlords of apartments and flats can control
who can enter their room with one PIN code and it reduces the risk of anything getting
stolen. It is incredibly easy to change the PIN code whenever you like.
4. Perfect for the elderly or disabled: The extra investment into a door lock could bring
massive advantages to those who are unable to get to the door quickly and/or who
This project would only feature a password-based electronic door access system. In other words,
Other more advanced security features such as a fingerprint sensor, an iris scanner or a facial
2.1 INTRODUCTION
The literatures related to the use of microcontrollers to achieve a keyless security system over the
years have been reviewed by various researchers in other to find the system that best suits the
present needs of the society. An exhaustive compilation of the researches would be expatiated
Many systems have been developed for securing our homes and offices, aiming to reduce the
cost of security and at the same time tackle the menace of increasing burglary with high
efficiency. It is observed that most of the research carried out belongs to the following
categories:
e. Use of the GSM and the IOT for alerting the owner of an intruder.
Other categories worthy of mention are the different types of locks used for achieving a secure
home or office.
The 8051 microcontroller, having been invented by Gary Boone of Texas Instruments in 1971
(John, 2013), has seen a lot of monumental uses in the course of history.
(Sanket, Z. et al., 2017) sees the 8051 as the brain of the circuit, also calling it the CPU of the
circuit. The 8051 which has a Program Memory of 2Kbytes (EEPROM) is used to store the
predetermined password during the time of installation, which is taken into consideration during
the operation to compare the input password with the predetermined password. It is also used to
show the input numbers from the input device through an LCD screen. To complete the system,
two relays are used, one of them to drive the motor in such direction with which the door can be
opened, this operates when the correct password is entered, whereas the second relay is used to
block the direction of D.C motor drive or to rotate the drive in opposite direction to keep the
door in a closed state, and this is done when the wrong password is entered.
(Raj Mehta, 2017) similarly designed a password-based door lock system using an 8051
microcontroller to store a user defined password which can be set up during startup/booting. The
password is set using push buttons which represent numbers from 0 to 9. A 16×2 LCD is used
for the interface and displays the entered password. When anyone tries to enter the password, it
is compared with the initially set password. If it matches, the LCD displays „system unlocked‟
else it displays „wrong password‟. A lock button is used to reset the system so that password can
be locked again. You can use a relay or a solenoid valve as actuator to any system you would
lock system wherein once the correct code or password is entered, the door is opened and the
concerned person is allowed access to the secured area. Again, if another person arrives it will
ask to enter the password. If the password is wrong then door would remain closed, thus denying
access to the person. The main component in the circuit is the 8051 microcontroller. A 4×3
keypad is used to enter the password. The password which is entered is compared with the
predefined password. If the entered password is correct then the system opens the door by
rotating door motor and displays the status of door on LCD. If the password is wrong then door
keypad & GSM/CDMA network. The microcontroller based digital door lock security system is
an access control system that allows only authorized persons to access restricted areas. The
password is stored in a PROM so that it can be changed at any time. The system has a matrix
keypad. When anyone enters the code in the matrix keypad, the microcontroller verifies the
codes. If that code is correct the device will operate and the door will be opened.
(Gyanendra K. et al., 2010) designed a digital door locking system which is implemented and
governed by an RFID reader which authenticates and validates the user and then open the door
automatically. It also keeps the record of check-in and check-out of the user. The system enables
a user to check-in and check-out under fast, secure and convenient conditions. New user would
first be registered with the system and the corresponding information is burnt into an RFID tag.
This RFID tag will be accessible through the system. When a registered user comes to the entry
point, and put the tag into reader, the system checks whether it is a registered user or an
imposter. If the user is registered, the tab information is matched with the user information stored
in system. The door only opens after the user has been successfully authenticated and closes
(Jeffrey S. et al., 1990) invented the power-on password security function for a digital computer
system which allows the system software to distinguish between authorized and unauthorized
users. Safeguards are made against corruption of password data which could lead to locking-out
authorized users, and redundant checks allow the security function to operate even when first-
level checks fail. The battery-powered RAM storage area used to hold the password when the
system is turned "off" is protected against being accessible by unauthorized users when the
Security system to detect the intruder using diffused in-line Infrared (IR) and Shock sensors as
well as the lock system itself which is used to automatically lock the intruder if he/she tries to get
into the room. A GSM module is also used to send text messages to the house owner about the
System which is password protected, and the door lock uses an LED-based resistive screen input
panel which operates by detecting difference in light intensity captured by the photo diode which
is emitted by surrounding red LEDs and reflected by the finger. IR Laser sensors are used to
(Sadeque Reza Khan et al., 2015) presented an Android based control system to maintain the
security of home main entrance and also the car door lock. The system can also control the
overall appliances in a room. The mobile to security system or home automation system interface
is established through Bluetooth. The hardware part is designed with the PIC microcontroller.
(Lia Kamelia et al., 2014) presented a part of a smart home technology using the Bluetooth of a
mobile device. A system named door locks automation system using Bluetooth-based Android
Smartphone was proposed and prototyped. The hardware design for door-lock system is the
combination of an android smart phone as the task master, Bluetooth module as command agent,
Arduino microcontroller as controller center/data processing center, and solenoid as door lock
output.
(Raqibull Hasan et.al., 2015) presented and analyzed the design and implementation of a
microcontroller-based home security system using GSM technology. Two microcontrollers with
other peripheral devices which include an LED, LCD, Buzzer and a GSM Module are
(Vijay P. Jadhao, 2013) developed two remote monitoring systems using cell phone with a focus
on wider utilization. The first system is designed with ARM LPC 2148 microcontroller based on
commands received from the user‟s cell phone and present sensor conditions to the LPC 2148
microcontroller system which sends signals through its ports to switch on/off appliances like
lights, fan, T.V. etc. The second system incorporates additional features like capturing and
(Arpita Mishra et al., 2014) worked on a project on an automatic password-based door lock
system by utilizing the electronic technology to build an integrated and fully customized home
security system at a reasonable cost. The project is useful in keeping thieves and other sort of
dangers at bay.
(Ankit Jain, et al., 2016) designed a password protected home automation system with an
automatic door lock using the Arduino Uno board which is controlled by the ATmega-328. First,
the user combination will be compared with pre-decided password stored in the system memory.
If the user‟s combination matches with the password, the door, light and fan will be unlocked.
The system was also built in a way that it could be locked by just pressing one key. In this
system Arduino UNO microcontroller board is used for interfacing the various hardware
peripherals. If the password is matched with pre-decided password then the Arduino simply
operates the relay to open the lights and fan. The Arduino simultaneously operates a DC motor
(Ricky M. 1977) invented an electronic combination door lock with dead bolt sensing means.
The electronic combination door lock uses a push button keyboard in combination with a door
provided with a dead bolt manually operable by an outer turning knob. The electronic circuitry
for the keyboard compares an input code with a stored code and generates an enabling signal
only if the input code is the same as the stored code. The outer turning knob is restrained from
being manually moved to retract the dead bolt when the door is in its locked condition. This
restraining of the outer knob is removed by the enabling signal which requires very little energy
(Christian Doucet, 1999) invented an electronically activated door lock assembly which includes
an electronic card reader whereby when the clutch assembly is in the activated position,
rotational movement of the outside handle is transmitted by way of a spindle through the mortise
and through the clutch assembly to a clutch disk disposed between the mortise and clutch
assemblies and the inside housing. The clutch disk is disposed inside the door. Rotational
movement of the clutch disk is then imparted back towards the door through a drive disk and hub
drive to the mortise latch hub which is disposed in the mortise housing disposed inside the door
structure. As a result, the clutch disk and clutch assembly can be disposed between the inside
housing and the inside door surface and the electronic components of the card reader and clutch
assembly can be conveniently housed in the inside housing assembly. An additional spacer hub
is disposed between the outside housing and the mortise latch hub which makes it difficult to
tamper with the mortise latch hub from the outside of the door.
(Arthur V. G., et al., 1985) invented an electromagnetic door lock device consisting of an
electromagnet, a bracket for holding the electromagnet in a door frame to force the opening
therein, an electrical conduit for connecting the electromagnet to a power source, an armature
magnetically attracted to the electromagnet when the latter is energized, a connector for holding
the armature on a door edge in the frame for adjustable movement towards the electromagnet and
a lock component for the device. The lock component comprises of one or more ledges at the
periphery of the electromagnet and/or armature pair projecting towards and engageable with the
other(s) of the pair when the armature is magnetically attracted to the energized electromagnet.
This occurs when the armature and electromagnetic are in line with each other, the armature
being free to move toward the electromagnet. Unlocking is effected by deenergizing the
electromagnet and allowing the armature to retract by gravity or spring action, so that the lock
component also moves out of the described engagement. The device is simple, durable and
effective.
(Charles E. Bond, 1977) invented a solenoid enabled draw lock for securing a cabinet door to a
vending machine cabinet and the like to prevent pilferage of the cabinet's contents. A door-
mounted solenoid actuated dead bolt extends through coaxial apertures in the lock housing, lock
cylinder and handle to permit extension of the lock handle only when the solenoid is retractably
(Larry O. Peterson, 1985) invented a solenoid activated locking system primarily for hood and
trunk manual release systems for vehicles. The solenoid is connected to a cable tied to the latch
of a conventional hood or trunk release system. Unless activated, the solenoid prevents manual
release of the trunk or hood lids to prevent access to the truck or engine compartment to someone
who has obtained unauthorized access to the vehicle interior. The solenoid is automatically
actuated for a preselected period of time whenever the ignition is turned on or off or when a reset
switch is closed for more than a minimum and less than a maximum period of time. In addition,
the solenoid is activated automatically during closure of the hood or trunk lid to permit secure
obscure location external of the vehicle, is provided for enabling manual release of the solenoid
The major strengths and weaknesses drawn from the conclusions laid by various researchers are
as follows:
1. Exhaustive research has been carried out on microcontroller-based security systems with
various protocols and systems providing detailed description of the process which states
2. Some systems where designed in such a way that one doesn‟t even need to touch the
physical keypads, the GSM could also be used to unlock the door.
3. Because of the absence of physical/mechanical keys and locks, breaking into the house
becomes extremely difficult for the non-tech savvy buglers, thus raising the bar in home
1. Most of systems based on Internet monitoring require higher operational cost based on
applications in developing countries. These systems generally do not have alert facilities
suitable software support. Security vulnerability is the most striking alert point of
Internet. No malicious party should ever gain control of system. Web usage requires
resources like flawless Internet connections and hosting servers, which may not always
2. The development and deployment cost of wireless sensor networks is very high due to
need for various sensors, radio transceivers, etc. spreading over a large area.
3. It could become a little more expensive when upgrading from the old mechanical locks to
4. The long term operational cost of Internet and cellular security systems is relatively high
3.1 INTRODUCTION
The electronic door access key consists of three main parts – the INPUT, CONTROL and
OUTPUT. Materials explored for the input are essentially authentication necessary for granting
Similarly, the components of the control system handle the overall organization of all the
hardware components. Microcontrollers which serve as the brain of the system could be said to
The output likewise consists of components like the lock system, the alarm system and display
system. They are necessary for the execution of the results of input and control systems.
As mentioned earlier, possible materials which could be used for authentication such as the
The Hexadecimal keypad (hex for short) consists of all the numbers from 1 - 9. It is connected
directly to the control system which compares any typed password with the predefined one,
Any programmable electronic code lock device (Oke, A.O. et. al., 2013) is usually programmed
in such a way that it operates only when the predefined password matches exactly with the
punched digits. It is also called an integrated combinational type lock. Based on the
programmable electronic code lock, the reprogrammable digital door locks (Mohammad A.
2013) were made in such a way that the password can be changed at any time as it is stored in a
PROM. For operating the device, a GSM/CDMA module can be used also.
When any person calls up from his phone, the call will be received by the system. And the door
A cellphone-controlled password protected door lock system (Ashish J. et. al. 2013) was
proposed to open the door with the help of cell phone device by entering a specific code. The
user can make a call to a systems number. This call is responsible for opening or closing of the
In latest password-based system, a more advanced system (Gaikwad, P.K., 2013) was developed
to communicate the owner of the office or house when any unauthorized person tries to open the
lock with the wrong password. While closing the door of the entry point, the owner has to press
the “0” key available on the hex keypad and leave the system. The system developed by (Annie
P.O. et. al., 2014) allows for changing the password. To open the lock, the entered password
must match with the changed one. In some systems the security dial-up is enabled through the
GSM modem (Arpita, M. 2014) when the unauthorized person enters an invalid password, the
security system informs to the owner through a GSM modem. Another security system (Supraja
E. et. al., 2014) was designed in such a way that the locking security system can be enhanced
with the help of Radio Frequency and GSM wireless technology by using a four-digit password
The palmtop recognition is the next step for fingerprint recognition. It (Kawser, W.N. et.al.,
2012) operates using the image on the palmtop. First, the system takes an image of the palmtop
then it works on that image by partitioning and processing it. In the end, the right person is
verified. Hence, it reduces the chances of error in other human recognition methods and clarifies
the problems which were faced in the fingerprint recognition. The biometric technique is very
useful in bank lockers. Aside the fingerprint recognition the vein detector and iris scanner gives
one of the best and accurate result also. In the bank security system (Ramesh, S. et.al, 2012), a
microcontroller continuously monitors the Vein Detector and Iris Scanner through keypad
authenticated codes. During night hours the wireless motion detector will be active. If any
variation occurs in its output, it will be sensed by the controller and the alert system would be
triggered.
Recently, the face analysis approach was proposed in which the modification of principal
component analysis approach for the face recognition and face detection process is done
(Yugashini, I. et.al., 2013). The image is captured by the web camera and it gets matched with
the image stored in the database. New advanced door lock security systems are available based
on the pattern of the human iris for providing a high level of security. And to make the system
more efficient and reliable the simulation is done in MATLAB (Gowsalya, M. et.al., 2014).
3.2.3 GSM based system
In many door lock security systems, GSM is used mainly for communication purposes. The
purpose of a work cultivated by utilization of circuits like the GSM module which gets activated
by a controller (Sadeque, R.K. et.al., 2012) for sending SMS in emergency to the proprietor and
for sending corresponding services of security at the time of break in. For detecting obstacles, the
system requires various sensors. It gathers data from the sensors and settles on a choice. With the
help of the GSM module, a text message is sent to the respective number. A recently created
model for door security (Ushie, J.O. et.al., 2013) which is easily controlled like remote control
operations by a mobile phone acting as the transmitter and the other mobile phone with the
DTMF (Dual-tone multi-frequency signaling) attached to door via a motor with the use of the
Nowadays people want their homes to be secure even when they are away from home, and thus,
the work proposed by (Jayashri, B. et. al., 2013). When the owner is not at his home, the security
of home and important things is usually a cause for concern. Two frameworks were created
which depends on a GSM based technology. For detection of gate-crashes, images are captured
with a security camera. The system immediately sends notification in form of a text message to a
certain number. An administrator-based system (Rabail. S.S. et.al., 2015) can login without any
stretch to the system and can see guests record and listen to their recorded messages and also
These types of security systems used for digital door lock (Gyanendra, K.V. et.al., 2015) are
utilizes inactive RFID tags (passive). With the help of this, it ensures that only valid persons can
get entry. Such systems are working in real time basic for opening the door in which the user has
to place the tag in contact with RFID detector, then the entryway gets opened and in the central
server the registration data is stored with necessary data of the users. Attendance and “person
tracking” is possible by using this type of system. RFID Based Gate Access Security System
which points out authorized peoples and permits only them was effectively created by (Srinivasa,
K. et. al., 2013). This system is designed to minimize the trained or specialized human error
Latest RFID based door lock security system are based on the Arduino platform (Yashi, M. et.al.,
2015) with audio acknowledgement at the point when card is placed close to the RFID module, it
peruses the card data and when it matches with the data stored in the program memory, it shows
The control system consists of all the components responsible for the computational functions of
the entire system. It is organized in such a way that it accepts the input from the authentication
The control system is made up of two distinct parts - the hardware and software. While the
hardware consists of the microcontroller and the boards with which it is soldered on, the software
is mainly made up of the source code responsible for the functioning of the microcontroller.
One of the most vital component of the control system which could be inferred from above is the
There are a lot of microcontrollers available in the market place, therefore two of the most
widely used microcontrollers (8051 and the ATmega-328) would be analyzed for this project.
Intel's 8048 micro controller is the first 8-bit microcontroller and was established in 1976. It was
families such as the MCS51 and the MCS96, were developed because it featured with HMOS
(High speed Metallic Oxide Semiconductor) technology within it. The MCS51 family included
the 8031, 8051, 8751 while the MCS96 family consisted of the 8096, 8097, 8098.
The 8051 is the newest 8-bit microcontroller from the MCS51 family. It possesses a wide range
application. 8051 microcontrollers possess two types of memories; the “program memory” and
the “data memory”. The program memory has a capacity of 128 bytes. While the data memory
1. The EA' (External Access) pin is used to control the internal or external memory access.
The signal 0 is for external memory access and signal 1 for internal memory access.
2. The PSEN' (Program Store Enable) is for reading external code memory when it is low
3. The ALE (Address Latch Enable) activates the port 0 joined with port 2 to provide 16-bit
external address bus to access the external memory. The ALE multiplexes the P0: 1 for
latching address on P0 as A0-A7 in the 16-bit address buss, 0 for latching P0 as data I/O.
4. P0.x is named ADx because P0 is multiplexed for Address bus and Data bus at different
clock time. WR' provides the signal to write external data memory RD' provides the
The ATmega-328 microcontroller is from the ATmega line of IC‟s from the ATMEL company.
The EEPROM is capable of storing data even when the power supply to the microcontroller is
removed, thus, making it perfect for the storage of passwords. Moreover, the ATmega-328 has
for each bit). The Port B output buffers have symmetrical drive characteristics with both
high sink and source capability. As inputs, Port B pins that are externally pulled low will
source current if the pull-up resistors are activated. The Port B pins are tri-stated when a
reset condition becomes active, even if the clock is not running. Depending on the clock
selection fuse settings, PB6 can be used as input to the inverting Oscillator amplifier and
4. Port C: Port C is a 7-bit bi-directional I/O port with internal pull-up resistors (selected
for each bit and labeled from 0 to 7). Its output buffers have symmetrical drive
characteristics with both high sink and source capability. As inputs, Port C pins that are
externally pulled low will source current if the pull-up resistors are activated. The Port C
pins are tri-stated when a reset condition becomes active, even if the clock is not running.
I/O pin. The electrical characteristics of PC6 differ from those of the other pins of Port C.
If the RSTDISBL Fuse is unprogrammed, PC6 is used as a Reset input. A low level on
this pin for longer than the minimum pulse length will generate a Reset, even if the clock
6. Port D: Port D is an 8-bit bi-directional I/O port with internal pull-up resistors (selected
for each bit). The Port D output buffers have symmetrical drive characteristics with both
high sink and source capability. As inputs, Port D pins that are externally pulled low will
source current if the pull-up resistors are activated. The Port D pins are tri-stated when a
7. AVCC: AVCC is the supply voltage pin for the analog to digital converter.
8. AREF: AREF is the analog reference pin for the A/D Converter.
The output system is mainly made up of output devices. They are usually results of the input and
the output system. Output components which consist of components such as the LCD, buzzer,
The LCD displays everything that goes on in the system, it shows a welcome message when the
system is switched on, then displays a “type password” message afterwards. Correct and
incorrect passwords are also displayed after the system checks if the input password is correct or
not.
Out of all available LCD modules in market, the most commonly used one is 16×2 LCD
Module which can display 32 ASCII characters in 2 lines (16 characters in 1 line).
JHD162A is the LCD module used here. JHD162A is a 16×2 LCD module based on
the HD44780 driver from Hitachi. The JHD162A has 16 pins and can be operated in 4-bit mode
(using only 4 data lines) or 8-bit mode (using all 8 data lines). Here the LCD module is used in
4-bit mode.
The name and functions of each pin of the 16×2 LCD module is given below.
3. Pin3(VEE): Contrast adjustment pin. This is done by connecting the ends of a 10K
potentiometer to +5V and ground and then connecting the slider pin to the VEE pin. The
voltage at the VEE pin defines the contrast. The normal setting is between 0.4 and 0.9V.
4. Pin4(RS): Register select pin. The JHD162A has two registers namely command register
and data register. Logic HIGH at RS pin selects data register and logic LOW at RS pin
selects command register. If we make the RS pin HIGH and feed an input to the data
lines (DB0 to DB7), this input will be treated as data to display on LCD screen. If we
make the RS pin LOW and feed an input to the data lines, then this will be treated as a
screen or scroll).
5. Pin5(R/W): Read/Write modes. This pin is used for selecting between read and write
modes. Logic HIGH at this pin activates read mode and logic LOW at this pin activates
write mode.
6. Pin6(E): This pin is meant for enabling the LCD module. A HIGH to LOW signal at this
7. Pin7(DB0) to Pin14(DB7): These are data pins. The commands and data are fed to the
8. Pin15(LED+): Anode of the backlight LED. When operated on 5V, the 560ohm resistor
is usually connected in series to this pin. In other Arduino based projects the backlight
LED can be powered from the 3.3V source on the Arduino board.
Other types of displays are the TFT (Thin Film Transistor) LCD displays, the 8x8 dot matrix
The buzzer is always activated in conjunction with an “incorrect password” message when the
The buzzer is connected to an NPN transistor (BC547) which is used to amplify the audio signal.
In turn, the BC547 transistor is then connected to a 220k ohms resistor through the base of the
transistor which then connected to the Arduino via the analog input/port as shown in Fig. 3.7.
An alarm could also be used instead which requires the use of an external power.
The motor is the mechanism used to lock and unlock the sliding door and it is powered by direct
causes it to move clockwise to open the door. It moves anti-clockwise to close the door also.
The motor driver is used to interface with the Arduino because the load of the motor would be
too much for the Arduino to carry. The main purpose of the L293D motor driver is to setup the
motor in such a way that positive and negative voltage signals can be sent to the motor which
A security system without the lock is more or less a joke. Mechanical locks can work without
electronic parts but that cannot be said if turned the other way round.
Locks are mainly divided into three distinct groups which are the mechanical locks,
Mechanical locks are mechanical devices which secure an opening by keeping a door closed
2. Cylindrical Locks: a bored lockset whose latch or bolt locking mechanism is contained in
As the name implies, electromechanical locks are made up of electrical and mechanical parts.
They are usually controlled by electricity which and is designed to cause the mechanical part to
Electromechanical locks can be operated by a simple push button from a remote point or locally
by any electrical or electronically coded switching device or reader. Integral key override can be
introduced at the outside of the door if required. Examples of electromagnetic locks are the
An electromagnetic lock, also known as a magnetic lock, or maglock is a locking device that
consists an electromagnet and an armature plate. There are two main types of electric locking
devices. Locking devices can be either "fail safe" or "fail secure". A fail-secure locking device
remains locked when power is lost. Fail-safe locking devices are unlocked when de-energized.
Direct pull electromagnetic locks are inherently fail-safe. Typically, the electromagnet portion of
the lock is attached to the door frame and a mating armature plate is attached to the door. The
two components are in contact when the door is closed. When the electromagnet is energized,
a current passing through the electromagnet creates a magnetic flux that causes the armature
plate to attract to the electromagnet, creating a locking action. Because the mating area of the
electromagnet and armature is relatively large, the force created by the magnetic flux is strong
3.5 METHODOLOGY
After reviewing the all the materials possible, a few of them have been selected for various
I. GND (3): Short for „Ground‟. There are several GND pins on the Arduino, any of which
can be used to ground the circuit.
II. 5V (4) & 3.3V (5): The 5V pin supplies 5 volts of power, and the 3.3V pin supplies 3.3
volts of power. Most of the simple components used with the Arduino usually run with 5
or 3.3 volts.
III. Analog (6): The area of pins under the „Analog In‟ label (A0 through A5 on the UNO)
are Analog In pins. These pins can read the signal from an analog sensor like
a temperature-sensor and convert it into a digital value that can be read.
IV. Digital (7): Across the analog pins are the digital pins (0 through 13 on the UNO). These
pins can be used for both digital input (like telling if a button is pushed) and digital
output (like powering an LED).
V. PWM (8): The tilde (~) next to some of the digital pins (3, 5, 6, 9, 10, and 11 on the
UNO) act as normal digital pins but can also be used for Pulse-Width Modulation (PWM)
i.e. the pins are able to simulate analog output (like fading an LED in and out).
VI. AREF (9): Stands for Analog Reference. Most of the time this pin is not used since it is
sometimes used to set an external reference voltage (between 0 and 5 Volts) as the upper
limit for the analog input pins.
3. Reset Button
The Arduino has a reset button (10). Pushing it will temporarily connect the reset pin to ground
and restart any loaded program on the Arduino. This can be very useful if some loaded codes are
not explicitly required to be repeated but want to test it multiple times.
5. TX RX LEDs
TX is short for transmit, RX is short for receive. These markings appear quite a bit in electronics
to indicate the pins responsible for serial communication. In this case, there are two places on the
Arduino UNO where TX and RX appear – once by digital pins 0 and 1, and a second time next
to the TX and RX indicator LEDs (12). These LEDs give some form of visual indications
whenever the Arduino is receiving or transmitting data (like when a new program is loaded onto
the board).
6. Voltage Regulator
The voltage regulator (14) controls the amount of voltage that is let into the Arduino board
although anything above 20 volts would likely blow up the Arduino.
7. ATmega-328
The main IC (13) could also be seen as the brain of the Arduino.
3.5.1.3 The OUTPUT
The Output would consist of:
1. The LCD: which would be used as the display
2. The Buzzer: which is activated when the wrong password is entered.
3. The Lock: the lock would be activated only after the entered password matches with the
predefined password.
All the above components that has so far been talked about have been organized into a complete
and full-fledged security system. It not just includes the hardware components, it also includes
3.5.2.1 Hardware
First of all, the 4x4 keypad is connected to pin 0 ~ 7, taking note of the rows and columns of the
keypad. The keypad shown above consists of mathematical symbols but were reprogrammed to
operate just like fig. 3.9. This is because the software used for the simulation (proteus) does not
pins (RS and E) are connected to pin 12 and 13 of the Arduino, while VDD is connected to the
positive of the battery, VEE to a resistor of 1k ohms before it is connected to ground along with
RW.
Next up is the motor and motor driver, which are similarly connected to pins A3 and A4 of the
Arduino. The buzzer setup which includes the BC547 NPN transistor which is used to amplify
the signal to the buzzer, the 220 ohms resistor are connected to pin A0 for signal and the 9v
Once the simulation is started, the LCD comes up with a welcome message, and then displays
EEPROM, the Arduino sends signals to pin A3 where one leg of the motor/motor driver is
connected, this signal is translated as positive voltage by the motor driver which it sends to the
motor, after 10 seconds, another signal is sent to pin A4 which is translated by the driver as
As said earlier, the buzzer goes off after the wrong password has been typed. This is achieved by
3.5.2.2 Software
Before heading straight to the software design, a flow chart is designed to highlight the main
purpose of each section of the code and how it should work together to make everything work.
For this project, the flow chart includes a section which is responsible for accepting the inputted
password. It then checks and compares the entered password with the one stored in the
EEPROM. If the password is correct, the message “Access Granted” is displayed on the LCD
display, the door opens and is shut after ten (10) seconds.
In the event that the wrong password is entered, the message “Access Denied” and the door
After designing a flow chart, the next step is to write the actual code. Below is a brief excerpt
The first thing that is done is to include the libraries for the Keypad, EEPROM, and the LCD.
The default password in the EEPROM is usually “1234”. After initializing the libraries, the pins
of the Arduino in which the pins of the LCD are connected are defined accordingly.
#include <Keypad.h>
#include<LiquidCrystal.h>
#include<EEPROM.h>
LiquidCrystal lcd(13,12,11,10,9,8);
Next is defining pins for connecting 4×4 hexa-decimal keypad. We are using 4×4 keypad therefore
we will define 4 pins for rows and 4 pins for columns. If you are using 4×3 keypad then you
After that, a command is given to start the LCD i.e. make the LCD begin to show that it is
working, set the buzzer and also set the cursor in the LCD.
lcd.begin(16,2);
pinMode(buzzer, OUTPUT);
lcd.print(" Electronic ");
lcd.setCursor(0,1);
lcd.print(" Keypad Lock ");
delay(2000);
The next section of code will read any key pressed from the keypad and shows it on LCD as
well. The Arduino will read the keys one by one and make a beep sound whenever a key
is pressed.
customKey = customKeypad.getKey();
if(customKey=='#')
change();
if (customKey){
password[i++]=customKey;
lcd.print(customKey);
//Serial.print(customKey);
beep();
}
The next section provides the code which will compare the entered key with the password stored
in the EEPROM. If the password is correct, then it will show “Access Granted” otherwise it will
show “Access Denied”. Aside showing “Access Granted”, it also opens the door and shuts it
if(i==4)
{
delay(200);
for(int j=0;j<4;j++)
pass[j]=EEPROM.read(j);
if(!(strncmp(password, pass,4)))
{
beep();
lcd.clear();
lcd.print("Access Granted");
//This code will turn Motor clockwise for 2 sec.
digitalWrite(motorPin1, HIGH);
digitalWrite(motorPin2, LOW);
delay(2000);
// stops Motor after opening the door for 10 sec.
digitalWrite(motorPin1, LOW);
digitalWrite(motorPin2, LOW);
delay(10000);
//This code will turn Motor anti-clockwise for 2 sec.
digitalWrite(motorPin1, LOW);
digitalWrite(motorPin2, HIGH);
delay(2000);
// stops Motor after opening the door for 5 sec.
digitalWrite(motorPin1, LOW);
digitalWrite(motorPin2, LOW);
//motor code ends here
lcd.setCursor(0,1);
lcd.clear();
lcd.print("Enter Password:");
lcd.setCursor(0,1);
i=0;
}
else{
digitalWrite(buzzer, HIGH);
lcd.clear();
lcd.print("Access Denied!");
lcd.setCursor(0,1);
delay(2000);
lcd.clear();
lcd.print("Enter Password:");
lcd.setCursor(0,1);
i=0;
digitalWrite(buzzer, LOW);
}
}
}
The code below changes the password stored in the EEPROM when the key “#” is pressed The
int j=0;
lcd.clear();
lcd.print("Current Password");
lcd.setCursor(0,1);
while(j<4)
{
char key=customKeypad.getKey();
if(key)
{
pass1[j++]=key;
lcd.print(key);
//Serial.print(key);
beep();
}
key=0;
}
delay(500);
After the design and construction of the project, two tests were carried out, simulation and
physical tests. They would be discussed below.
4.1 SIMULATION OF THE DESIGN
Simulation of the project was carried out using proteus 8 professional.
5.1 CONCLUSION
Irrespective of the challenges encountered during the course of the entire process of the project,
it can only be deduced that electronic door access can also be achieved at minimal cost. This
project has also exposed the fact that metallic keys can possibly be fazed out with zero to
minimal effect on the old and/or sick people. One needs only to be able to remember just four
digits which has the same digits as the ATM card codes.
5.2 RECOMMENDATION
1. The sections of the project should be tested before assembling them together.
2. The components should be sourced early since they are not readily available.
3. A motion detector should be used in unison with the time-based automatic lock
4. Great care should be taken when attaching any component to the Arduino otherwise the
5. A system should be created where the security system would use an alternative power
6. A make-and-break system can also be employed to save power when the security system
is not used.
7. The source code can be modified to prevent brute force attacks such that when the wrong
password is typed a number of times, an alarm is set off similar to an intruder alert
system.
Chinaraja, B. (April 2015). Password based door lock system using 8051 microcontroller.
Slideshare. Retrieved from https://www.slideshare.net
Mohammad, A. (Mar. – Apr. 2013) Microcontroller Based Reprogrammable Digital Door Lock
Security System by Using Keypad & GSM/CDMA Technology. IOSR Journal of Electrical and
Electronics Engineering (IOSR-JEEE), Vol. 4, Issue 6, pp. 38-42.
Gyanendra, V., Pawan, T. (Aug. 2010). A Digital Security System with Door Lock System Using
RFID Technology. International Journal of Computer Applications Vol. 5, No.11, pp 0975 –
8887.
Jeffrey, S., Norman, P., & James, H. (1989). Power-on password functions for computer system.
Texas, TX: Google Patents.
Ajay, M., Shelja, D., & Swati, S. (Sept. 2014). Design and development of sensor-based home
automation and security system using GSM module and locking system. International Journal of
Advanced Engineering Research and Science (IJAERS), Vol. 1, Issue-4, pp. 37-39.
Nikhil, A., & G.Subramanya N. (2012) Microcontroller based Home Security System with Remote
Monitoring. International Conference on Electronic Design and Signal Processing (ICEDSP),
pp. 38-41.
Sadeque, R. Khan, & Farzana, S. Dristy. (March 2015) Android Based Security and Home
Automation System. International Journal of Ambient Systems and Applications (IJASA), Vol. 3,
No. 1, pp. 15-24.
Lia, K., Alfin, Noorhassan S.R., Mada, S., & Edi, M. (Oct. 2014) Door-Automation System Using
Bluetooth-Based Android for Mobile Phone. ARPN Journal of Engineering and Applied
Sciences, Vol. 9, No. 10, pp. 1759-1762.
Raqibull, H., Mohammad, M. Khan, Asaduzzaman, A., & Israt, J. Rumpa. (2015) Microcontroller
Based Home Security System with GSM Technology. Open Journal of Safety Science and
Technology, Vol. 5, pp. 55-62.
Vijay, P. Jadhao. (2013) ARM based Smart Home Automation. International Journal of Science
and Engineering, Vol. 1, No. 2, pp. 53-56.
Arpita, M., Siddharth, S., Sachin, D., & S.K. Dubey. (May 2014). Password Based Security Lock
System. International Journal of Advanced Technology in Engineering and Science, Vol., No. 2,
Issue No. 05, pp. 100-103.
Ankit, J., Anita, S., & Ritu, R. (Jan. 2016) Password Protected Home Automation System with
Automatic Door Lock. MIT International Journal of Electrical and Instrumentation Engineering,
Vol. 6, Issue 1, pp. 28-31.
Ricky, M. (Aug. 1977) Electronic combination door lock with dead bolt sensing means. Google
Patents. Retrieved from https://patents.google.com/patent
Christian, Doucet. (Feb. 1999) Electronically activated door lock assembly. Google Patents.
Retrieved from https://patents.google.com/patent
Arthur V. G., Richard G. G., David A. G. (Feb. 1985) Electromagnetic door lock device. Google
Patents. Retrieved from https://patents.google.com/patent.
Charles E. B. (Nov. 1977) Solenoid enabled lock for vending machines and the like. Google
Patents. Retrieved from https://patents.google.com/patent.
Larry O. P. (Nov. 1985) Electric solenoid operation vehicle hood lock. Google Patents. Retrieved
from https://patents.google.com/patent.
David, Kushner. (Oct. 2011). The Making of Arduino. Institute of Electrical and Electronics
Engineers (IEEE) Spectrum. Retrieved from https://spectrum.ieee.org.
Hernando, Barragán (Jan. 2016). The Untold History of Arduino. Github. Retrieved from
https://arduinohistory.github.io.
Thorin, Klosowski. (Dec. 2015). Top Ten Kickass Arduino Projects. Lifehacker. Retrieved from
https://lifehacker.com.
William, S., Farhan, R. (Aug. 2016). Design and Implementation of Smart Home Security System
with Arduino Based Password Protection. East West University (EWU) Institutional Repository.
Retrieved from http://dspace.ewubd.edu.
Oke, A.O., Adigun, A. A., Falohun, A. S., and Alamu, F. O. (Jan. 2013) Development of a
Programmable Electronic Digital Code Lock System. International Journal of Computer and
Information Technology (ISSN: 2279 – 0764) Volume 02– Issue 01.
Gaikwad, P. K. (Sep. 2013). Development of FPGA And GSM Based Advanced Digital Locker
System. International Journal of Computer Science and Mobile Applications, Vol.1 Issue. 3.
Annie, P. O., Rahul, A. P., Pranav, V. P., Renjith, N. (Feb, 2014) Design and Implementation of a
Digital Code Lock, International Journal of Advanced Research in Electrical, Electronics and
Instrumentation Engineering. Vol. 3, Issue 2.
Arpita, M., Siddharth, S., Sachin, D., Dubey, S.K. (May 2014) Password Based Security Lock
System. International Journal of Advanced Technology in Engineering and Science. Volume
No.02, Issue No. 05.
Supraja, E., Goutham, K.V., Subramanyam, N., Dasthagiraiah, A., Prasad, H.K.P. (July, 2014)
Enhanced Wireless Security System With Digital Code Lock Using RF & GSM Technology,
International Journal of Computational Engineering Research. Vol 04, Issue 7.
Kawser, W.N., Tonny, S.K, Sayed, A.H. (Oct. 2012) An Advanced Door Lock Security System
Using Palmtop Recognition System. International Journal of Computer Applications. Volume
56– No.17, pp. 0975 – 8887.
Ramesh, S., Soundarya, H., Shruti, A. (October 2012) Monitoring and Controlling of Bank Security
System. International Journal of Advanced Research in Computer Science and Software
Engineering. Volume 2, Issue 10.
Yugashini, Vidhyasri, S., Gayathri, K. D. (Nov. 2013) Design and Implementation of Automated
Door Accessing System with Face Recognition”, International Journal of Science and Modern
Engineering (IJISME). Volume-1, Issue12.
Gowsalya, M., Sangeetha, M., Sri, K. D., Divya, N., Devika, T. (Feb. 2014) A Novel Approach
Automatic Digital Door Opening and Closing Security System, International Journal of
Innovative Research in Electrical, Electronics, Instrumentation and Control Engineering, Vol. 2
Issue 2, Feb 2014.
Sadeque, R. K., Ahmed, A. M., Alvir, K., Shahid J., Nahian, C. (March, 2014) Design and
Implementation of Low Cost Home Security System Using GSM Network. International
Journal of Scientific & Engineering Research. Volume 3, Issue 3.
Ushie, J. O., Donatus, E., Bassey, O., Akaiso, E. (July, 2013) Design and Construction of Door
Locking Security System Using GSM. International Journal of Engineering and Computer
Science ISSN:2319-7242, Volume 2 Issue 7.
Jayashri, B., Arvind, S. (2013) Design and Implementation of Security Systems for Smart Home
Based on GSM Technology. International Journal of Smart Home. Vol.7, No.6.
Rabail, S.S., Sidra, E., Madiha, A. (Feb. 2015) A Smart Visitors Notification System with
Automatic Secure Door Lock Using Mobile Communication Technology. International Journal
of Computer and Communication System Engineering. Vol. 02 No.01.
Gyanendra, K. V., Pawan, T. (Aug. 2010). A Digital Security System with Door Lock System
Using RFID Technology. International Journal of Computer Applications (0975 – 8887),
Volume 5– No.11.
Srinivasa, K.R., Varun, G.H., Vamsi, T., Pratyusha. (April 2013). RFID Based Security System.
International Journal of Innovative Technology and Exploring Engineering (IJITEE), Volume-2,
Issue-5.
Yashi, M., Gaganpreet., Kaur, M., Shekhar, V. (Jan. 2015) Arduino Based Smart RFID Security
and Attendance System with Audio Acknowledgement. International Journal of Engineering
Research & Technology (IJERT). Vol. 4 Issue 01.
APPENDIX I
Source code used for the project
Written using C/C++ language
Written and compiled in arduino ide
#include <Keypad.h>
#include<LiquidCrystal.h>
#include<EEPROM.h>
LiquidCrystal lcd(13,12,11,10,9,8);
char password[4];
char pass[4],pass1[4];
int i=0;
char customKey=0;
const byte ROWS = 4; //four rows
const byte COLS = 4; //four columns
char hexaKeys[ROWS][COLS] = {
{'7','8','9','A'},
{'4','5','6','B'},
{'1','2','3','C'},
{'*','0','#','D'}
};
byte rowPins[ROWS] = {3,2,1,0}; //connect to the row pinouts of the
keypad
byte colPins[COLS] = {4,5,6,7}; //connect to the column pinouts of
the keypad
//initialize an instance of class NewKeypad
Keypad customKeypad = Keypad( makeKeymap(hexaKeys), rowPins, colPins,
ROWS, COLS);
//buzzer and motor pin definitions
int buzzer = 14;
const int motorPin1 = 17; // Pin 3 of L293
const int motorPin2 = 18; // Pin 4 of L293
void setup()
{
lcd.begin(16,2);
pinMode(buzzer, OUTPUT);
lcd.print(" Electronic ");
lcd.setCursor(0,1);
lcd.print(" Keypad Lock ");
delay(2000);
lcd.clear();
lcd.print("Enter Password:");
lcd.setCursor(0,1);
for(int j=0;j<4;j++)
EEPROM.write(j, j+49);
for(int j=0;j<4;j++)
pass[j]=EEPROM.read(j);
void loop()
{
customKey = customKeypad.getKey();
if(customKey=='#')
change();
if (customKey)
{
password[i++]=customKey;
lcd.print(customKey);
//Serial.print(customKey);
beep();
}
if(i==4)
{
delay(200);
for(int j=0;j<4;j++)
pass[j]=EEPROM.read(j);
if(!(strncmp(password, pass,4)))
{
beep();
lcd.clear();
lcd.print("Access Granted");
//Motor Control - Motor A: motorPin1,motorpin2
lcd.setCursor(0,1);
i=0;
}
else
{
lcd.clear();
lcd.print("Access Denied!");
lcd.setCursor(0,1);
// lcd.print("#.Change Password");
digitalWrite(buzzer, HIGH);
delay(2000);
lcd.clear();
lcd.print("Enter Password:");
lcd.setCursor(0,1);
i=0;
digitalWrite(buzzer, LOW);
}
}
}
void change()
{
int j=0;
lcd.clear();
lcd.print("Current Password");
lcd.setCursor(0,1);
while(j<4)
{
char key=customKeypad.getKey();
if(key)
{
pass1[j++]=key;
lcd.print(key);
//Serial.print(key);
beep();
}
key=0;
}
delay(500);