You are on page 1of 58

See discussions, stats, and author profiles for this publication at: https://www.researchgate.

net/publication/338690665

Design and Construction of an Electronic Door access key

Technical Report · September 2018

CITATIONS READS
0 3,157

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:

Keypad Authentication Security System View project

All content following this page was uploaded by Mina Tamunowari on 20 January 2020.

The user has requested enhancement of the downloaded file.


DESIGN AND CONSTRUCTION OF AN ELECTRONIC
DOOR ACCESS KEY

by

TAMUNOWARI MINA

A PROJECT SUBMITTED TO THE DEPARTMENT OF


ELECTRICAL, FACULTY OF ENGINEERING IN
PARTIAL FULFILMENT OF THE REQUIREMENT FOR
THE AWARD OF BACHELOR OF TECHNOLOGY (B.
TECH) IN ELECTRICAL ENGINEERING.

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

CHAPTER ONE: BACKGROUND OF THE STUDY


1.1 INTRODUCTION………………………………………………………………9
1.2 AIM………………………………………………………………………………9
1.3 PROBLEM STATEMENT…………..………………………………………….10
1.4 OBJECTIVES OF THE PROJECT……………………………………………..10
1.5 SIGNIFICANCE OF THE PROJECT……………………………..……………10
1.6 LIMITATION AND SCOPE OF THE PROJECT………….…………………..11

CHAPTER TWO: LITERATURE REVIEW


2.1 INTRODUCTION………………………………………………………………12
2.2 REVIEW ON MICROCONTROLLERS AND AUTHENTICATION METHODS ……….. …12

2.3 REVIEW OF LOCKS …………………………………………………………..16


2.4 STRENGTHS AND WEAKNESSES………… ………………………………..17

CHAPTER THREE: MATERIALS AND METHODOLOGY


3.1 INTRODUCTION ……………………………………………………………..19
3.2 THE INPUT SYSTEM ………………………………..……………………….19
3.3 THE CONTROL SYSTEM………………….…………………………………21
3.4 THE OUTPUT SYSTEM………………………………………………………21
REFERENCES………………..……………………………………………………………28
CHAPTER 1

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

and security concerns of the present generation.

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

to be used for this project to achieve a satisfactory security system.

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

door access key that will be able to:

1. Eliminate the use of mechanical/metallic keys.

2. Prevent events of key misplacements.

3. Avoid excessive key duplication for everyone in the house.

4. Make the apartment where it is installed more difficult to break into.

1.3 PROBLEM STATEMENT

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

featured password enabled electronic security system prototype.

Below are steps taken to achieve this purpose, thus;

1. Review of similar works on electronic door access key was carried out.

2. Determination/Selection of materials relevant to the project.

3. Hardware and Software design.

4. Construction/Packaging of the various components of the system.

5. Testing of the final project to ascertain its authenticity.

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

can pick an ordinary key lock.

2. No more keys: One wouldn‟t have to carry around a large set of keys and they will be

less likely to be lost or stolen.


3. Control: In a company building, one can control and restrict who goes into what part of

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

struggle with keys.

1.6 LIMITATIONS AND SCOPE

This project would only feature a password-based electronic door access system. In other words,

it only incorporates the hexadecimal keypad only for authentication.

Other more advanced security features such as a fingerprint sensor, an iris scanner or a facial

recognition camera would not be incorporated.


CHAPTER 2
LITERATURE REVIEW

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

during the cause of this chapter.

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:

a. Use of 8051 microcontrollers.

b. Use of ATmega-328 and Arduino Uno board.

c. Use of passwords, RFIDs or smart cards for authentication.

d. Use of Bluetooth technology for authentication.

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.

Much of this would be covered during the cause of this review.


2.2 REVIEW ON MICROCONTROLLERS AND AUTHENTICATION METHODS

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

like to control using password.


(Chinaraja Baratam, 2015) also developed a system that demonstrates a password based door

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

is remains closed and displays “pwd is wrong” on the LCD.

(Mohammad Amanullah, 2013) designed a microcontroller-based security system using a matrix

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

automatically after a specified time interval.

(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

system is turned "on".

(Ajay Mudgiil et.al., 2014) developed the (MCUAT89S52), a microcontroller-based Home

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

intruder in the room.

(Nikhil Agarwal et al., 2012) proposed a micro-controller-based automated Home Security

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

detect any obstacle.

(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

responsible for reliable operation of the proposed security system.

(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

storage of an intruder‟s images unknown to the intruder.

(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

through a motor driver for operating the door.

2.3 REVIEW ON LOCKS

(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

so that the dead bolt can then be manually retracted.

(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

energized and otherwise restrains the handle in its retracted position.

(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

engagement of the corresponding latch mechanism. An emergency release cable, hidden in an

obscure location external of the vehicle, is provided for enabling manual release of the solenoid

in the event of vehicle battery failure or other otherwise disabling event.

2.4 STRENGTHS AND WEAKNESSES

The major strengths and weaknesses drawn from the conclusions laid by various researchers are

as follows:

2.4.1 Major strengths:

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

how the user is authorized.

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

and office security.

2.4.2 Major Weaknesses:

1. Most of systems based on Internet monitoring require higher operational cost based on

bandwidth/data speed requirements and hence is justified only in industrial or biomedical

applications in developing countries. These systems generally do not have alert facilities

against occurrence of abnormal conditions. User needs to have PC/smartphone/PDA with

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

fit to the concept of remote controlling.

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

the microcontroller-based systems.

4. The long term operational cost of Internet and cellular security systems is relatively high

due to usage charges incurred in each message transaction.


CHAPTER 3
MATERIALS AND METHODOLOGY

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

access into the secured apartment.

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

be one of the most vital electronic components in a security system.

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.

Fig. 3.1 Holistic block diagram

3.2 THE INPUT SYSTEM

As mentioned earlier, possible materials which could be used for authentication such as the

hexadecimal keypad, RFID, GSM and biometric scanners would be analyzed.


3.2.1 Hexadecimal keypad

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,

thereby authenticating the user.

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

will open only if the call is from specified user.

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

entry point by typing the correct password.

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

which provides the authentication.

3.2.2 Biometric Based System

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

DTMF decoder, a stepper motor and microcontroller unit.

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

automatically lock the door using the GSM technology.

3.2.4 RFID Based Systems

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

during secured door access.

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

“authorized entry”, otherwise it shows “unauthorized entry”.

3.3 THE CONTROL SYSTEM

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

system, processes it and produces the output.

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

microcontroller. A microcontroller is a device which incorporates or is built upon a


microprocessor. The microprocessor itself is made up of billions of miniaturized transistors

which are fabricated onto a single chip.

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.

3.3.1 The 8051 microcontroller

Intel's 8048 micro controller is the first 8-bit microcontroller and was established in 1976. It was

able to perform or control basic automated operations. The high-performance microcontroller

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

of versatile application from a simple house hold application to a complicated industrial

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

has a memory capacity of 4000 bytes (Sanket, Z. et al., 2017).


Fig. 3.2 8051 microcontroller (source: mmumullana.org)

A brief description of the pins of the 8051 is as follows:

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

(0) and EA is also 0.

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

signal to read external data and code memory.


3.3.2 The ATmega-328

The ATmega-328 microcontroller is from the ATmega line of IC‟s from the ATMEL company.

It has a 1KB(Kilobyte) Electrically Erasable Programmable Read Only Memory (EEPROM).

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

2KB Static Random Access Memory (SRAM).

Fig. 3.3 Pinout diagram of ATmega-328 (source: theengineeringprojects.com)

The description of the pins on the ATmega-328 is given below:

1. VCC: Digital supply voltage.

2. GND: Ground. It has a voltage of 0v.


3. Port B: Port B is an 8-bit bi-directional I/O port with internal pull-up resistors (selected

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

input to the internal clock operating circuit.

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.

5. PC6/RESET: If the RSTDISBL (Reset/Disable) Fuse is programmed, PC6 is used as an

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

is not running. Shorter pulses are not guaranteed to generate a Reset.

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

reset condition becomes active, even if the clock is not running.

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.

3.4 THE OUTPUT SYSTEM

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,

and the locks would be explored below.

3.4.1 The Jhd123a Liquid Crystal Display (LCD)

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.

Fig. 3.4 LCD (source: robomart.com)

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 schematic of a JHD162A LCD pin diagram is given below.

Fig. 3.5 Schematic of JHD162A LCD (source: circuitstoday.com)

The name and functions of each pin of the 16×2 LCD module is given below.

1. Pin1(Vss): Ground pin of the LCD module.

2. Pin2(Vcc): Power to LCD module (+5V supply is given to this pin)

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

command (a command to be written to LCD controller – like positioning cursor or clear

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

pin will enable the module.

7. Pin7(DB0) to Pin14(DB7): These are data pins. The commands and data are fed to the

LCD module though these pins.

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.

9. Pin16(LED-): Cathode of the backlight LED.

Other types of displays are the TFT (Thin Film Transistor) LCD displays, the 8x8 dot matrix

display and the 4-bit digital tube display.

3.4.2 The Buzzer

The buzzer is always activated in conjunction with an “incorrect password” message when the

password typed does not match with the programmed password.


Fig 3.6 Buzzer (source: marketlab-electronics.com)

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.

The buzzer is activated if a wrong password is typed.

An alarm could also be used instead which requires the use of an external power.

3.4.3 The Motor and Motor driver

The motor is the mechanism used to lock and unlock the sliding door and it is powered by direct

current produced externally, while it is controlled by the Arduino.

Fig. 3.7a Animated picture of a DC motor


When the correct password is inputted, a signal is sent to the motor via the motor driver which

causes it to move clockwise to open the door. It moves anti-clockwise to close the door also.

Fig. 3.7b The L293D motor driver

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

translates to opening and closing of the door.

3.4.4 THE LOCKS

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,

electromechanical locks and the electromagnetic locks.

3.4.4.1 Mechanical Locks

Mechanical locks are mechanical devices which secure an opening by keeping a door closed

until a release mechanism is activated; usually a lever, knob, key, or thumbturn.


1. Tubular Locks: a bored lockset whose latch or bolt locking mechanism is contained in the

component installed into the edge bore.

2. Cylindrical Locks: a bored lockset whose latch or bolt locking mechanism is contained in

the portion installed through the cross-bore.

3. Interconnected Locks: a lockset whose trim provides a means of simultaneous retraction

of two or more bolts which may also be operated independently.

3.4.4.2 Electromechanical Locks

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

move into a lock or unlock position.

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

“Solenoid” and the “Electrified Mortise” locks.

3.4.4.3 Electromagnetic Locks

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

enough to keep the door locked even under stress.

3.5 METHODOLOGY
After reviewing the all the materials possible, a few of them have been selected for various

reasons. Below is a run-down of such.

3.5.1 BLOCK DIAGRAM


Fig. 3.8 Block Diagram

3.5.1.1 The INPUT


For the input, a 4x4 hexadecimal keypad would be used. In order to open the lock to gain access
to the apartment, the correct password would have to be pressed otherwise the door remains shut.
If the password is typed wrongly, the buzzer would be activated.

Fig. 3.9 Keypad (source: circuittoday.com)

3.5.1.2 The CONTROL


The ATmega-328 would be used for the control system. The microcontroller itself would be
housed by the Arduino Uno board.
Below, is a rundown of these components as well as an image of the labeled parts of the Arduino
Uno preceding it.

Fig. 3.10 Arduino Uno parts (source: sparkfun.com)

1. Power (USB / Barrel Jack)


Every Arduino board needs a way to be connected to a power source. The Arduino UNO can be
powered from a USB cable coming from a computer or a wall power supply that is terminated in
a barrel jack. In the picture above the USB connection is labeled (1) and the barrel jack is
labeled (2).
The USB connection is also used to load the source code onto the Arduino board.
The recommended voltage for most Arduino models is between 6 and 12 Volts.

2. Pins (5V, 3.3V, GND, Analog, Digital, PWM, AREF)


The pins are used to connect other peripherals to the board. They usually have black plastic
„headers‟ that allow you to plug a wire right into the board. The Arduino has several different
kinds of pins, each of which is labeled on the board and used for different functions-below is a
brief description.

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.

4. Power LED Indicator


Just beneath and to the right of the word “UNO” on the circuit board lies a tiny LED next to the
word „ON‟ (11). This LED lights up whenever a power source is plugged into the Arduino. If
this light doesn‟t turn on, there‟s a good chance something is wrong.

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.

3.5.2 DESCRIPTION OF THE FINAL SET-UP

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

the software/program that makes everything work as proposed.

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

include the exact replica of the keypad required.


Fig. 3.11 Schematic diagram
Secondly, pins D4 ~ D7 of the LCD are connected to pin 8 ~ 11 of the Arduino. The rest of the

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

external battery for power.

Once the simulation is started, the LCD comes up with a welcome message, and then displays

“Enter Password” to indicate that the system is ready to accept commands.


If the entered password is correct, i.e. after the password is compared with the one stored in the

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

negative voltage, thus causing the motor to rotate anti-clockwise.

As said earlier, the buzzer goes off after the wrong password has been typed. This is achieved by

sending a HIGH signal to pin A0 where the buzzer setup is situated.

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

would refuse to open.


Fig. 3.12 Flow diagram

After designing a flow chart, the next step is to write the actual code. Below is a brief excerpt

and explanation of the sections of the code.

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

need only 4 pins for rows and 3 pins for columns.

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);

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

again after ten (10) seconds.

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

new password is also stored in the EEPROM.

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);

3.5.3 SIMULATION AND CODING


Simulation of the entire project was done using proteus 8 professional while the source code was
written in C/C++ using the Arduino IDE.

Fig 3.13 Interface of Arduino IDE


CHAPTER 4
RESULTS AND DISCUSSION

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.

Fig. 4.1 Interface of proteus


Fig 4.2 Schematic diagram in proteus

Fig 4.3 Simulation: when the system is turned on

Fig 4.4 Simulation: Request to input password


Fig 4.5 Simulation: Access granted

Fig 4.6 Simulation: Access Denied


4.2 DISCUSSION
Fig 4.1 shows the user interface of proteus 8 professional, it includes that tab bar (up), the
terminal bar (left) and the schematic capture (center) where the components are connected.
Fig 4.2 shows the complete schematic diagram of the project. As mentioned in chapter 3, a 4x4
calculator keypad was used due to the unavailability of the standard 4x4 keypad although it was
reprogrammed to work like the standard keypad.
Fig 4.3 shows when the system is turned on as indicated by the LCD screen which reads
“Electronic Keypad Lock”.
Fig 4.4 shows after two seconds of switching on the system prompting the user to input the
correct password in order to be granted access to the house.
Fig 4.5 shows the LCD displaying “Access Granted” when the correct password is inputted.
Simultaneously, a signal is sent to the motor and the door is opened.
Fig 4.6 shows the LCD displaying “Access Denied” when the incorrect password is inputted.
Simultaneously, a signal is also sent to the buzzer to indicate an unauthorized access.
Looking at the sequence of events in the simulation, it could be deduced that the system is fully
operational. All these are made possible by the source code which was written in C/C++ using
the Arduinoo IDE.
CHAPTER 5
CONCLUSION AND RECOMMENDATIONS

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

From the foregoing thus, I strongly recommend the following:

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

board could be damaged.

5. A system should be created where the security system would use an alternative power

supply when there is power failure.

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.

5.3 PROBLEMS ENCOUNTERED

1. Getting the Arduino board and other components.

2. Learning the language and code used in the project.

3. Getting the right casing for packaging.

4. Getting the components in proteus for simulation.


REFERENCES
John, (Oct. 2013). Microcontroller – Invention History and Story Behind the Scenes. Circuit Today.
Retrieved from http://www.circuitstoday.com
Sanket, Z., Al Atta, M., Khan, S., & Siddique, S. (2017). Password based door lock system using
8051 microcontroller. Open Access International Journal of Science and Engineering, Vol. 2,
Issue 10, pp. 2456-3293. Retrieved from http://www.oaijse.com
Raj, M. (2017). 8051 based password lock system. Think Electronics. Retrieved from
https://thinkelectronics.org

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.

Mohammad, A. Microcontroller Based Reprogrammable Digital Door Lock Security System by


Using Keypad & GSM/CDMA Technology (Mar. - Apr. 2013). IOSR Journal of Electrical and
Electronics Engineering (IOSR - JEEE), Volume 4, Issue 6.
Ashish, J., Mahesh, K., Mahesh, W. (Aug. 2013). Feasibility Study of Implementation of Cell
Phone Controlled, Password Protected Door Locking System. International Journal of
Innovative Research in Computer and Communication Engineering. Vol. 1, Issue 6.

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

B.tech degree project: Design and construction of an electronic door


access key
Matric Number: DE.2013/0624
Supervisor: ENGR. M. O. NWOKU
Dept: Electrical Engineering

#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);

//Set motor pins as outputs


pinMode(motorPin1, OUTPUT);
pinMode(motorPin2, OUTPUT);

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

//This code will turn the Motor A clockwise for 2 sec.


digitalWrite(motorPin1, HIGH);
digitalWrite(motorPin2, LOW);
delay(2000);
//stops Motor A after opening the door for 5 sec.
digitalWrite(motorPin1, LOW);
digitalWrite(motorPin2, LOW);
delay(10000);

//This code will turn Motor A anti-clockwise for 2 sec.


digitalWrite(motorPin1, LOW);
digitalWrite(motorPin2, HIGH);
delay(2000);
//stops Motor A after opening the door for 5 sec.
digitalWrite(motorPin1, LOW);
digitalWrite(motorPin2, LOW);
//motor code ends here
lcd.setCursor(0,1);
// lcd.print("#.Change Password");
// delay(5000);
lcd.clear();
lcd.print("Enter Password:");

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);

if((strncmp(pass1, pass, 4)))


{
lcd.clear();
lcd.print("Wrong Password");
lcd.setCursor(0,1);
lcd.print("Try Again");
delay(1000);
}
else
{
j=0;
lcd.clear();
lcd.print("New Password");
lcd.setCursor(0,1);
while(j<4)
{
char key=customKeypad.getKey();
if(key)
{
pass[j]=key;
lcd.print(key);
EEPROM.write(j,key);
j++;
beep();
}
}
lcd.print(" Done......");
delay(1000);
}
lcd.clear();
lcd.print("Enter Password");
lcd.setCursor(0,1);
customKey=0;
}
void beep()
{
digitalWrite(buzzer, HIGH);
delay(20);
digitalWrite(buzzer, LOW);
}

View publication stats

You might also like