Professional Documents
Culture Documents
BACHELOR OF TECHNOLOGY
1
Declaration
We hereby proclaim that the work that is being presented in this report entitled “Password
Based Door Lock System” is our own original work and has not been re- ported by
anyone else or submitted in any form for another degree or diploma to any other
institution. Information derived from the other sources has been accredited in thetext and
a list of references has been given.
Ananya Rana
Roll no.1704331014
Certificate
This is to certify that the project report entitled “Password Based Door Lock
System” submitted by Ananya Rana for the award of the degree of B. Tech., is
carried out by them under my guidance.
Verification
This is to verify that the project entitled “Password Based Door Lock System”
submitted in department of Electronics and communication engineering department of
Bundelkhand Institute of Engineering and Technology, Jhansi.
ii
DEDICATION
iii
Project Outcomes (Ps)
KL: Bloom’s knowledge level, KL1: remember, KL2: Understand, KL3: Apply,
KL4: Analyze, KL5: Evaluate, KL6: Create/Design
iv
Acknowledgment
It is my great pleasure to acknowledge the support and encouragements I have received
from the people along the way of the research work. First and foremost, I would like
to express my heartiest Above all, with all humility; I offer my deepest feelings of grat-
itude to the blessings and mercy of the Supreme Person for providing me everything I
need. We would like to express our sincere thanks and deep sense of gratitude towards
Dr. Mahendra Kumar, Department of Electronics and communication engineering,
who has not only helped us in enhancement of my technical knowledge regarding sub-
ject topic but also taken us to zenith where we could reset our views and exhibit our
talent in front of others. The enthusiastic crystal-clear view on the format and layout
and presentation helped us immensely.
Ananya Rana
Roll no.1704331014
v
ABSTRACT
As technology advances and expands on a daily basis, safety becomes increasingly essential in all
disciplines. Everyone desires a private place where no one can enter without their permission, thus
we need to secure our room, office, locker, etc. that preserve our valuable accessories, documents,
data, and jewelry, and for that purpose, the proposed work has developed a "Password based door
lock system by using Arduino.". This device is a digital door lock with a password or pin code,
which prevents the user from opening the door unless they input the correct password or pin code.
In this day and age, security has become of an utmost importance, be it one’s house, car or their
digital accounts. The solutions currently available in the market are satisfactory but high security
solutions come at an expensive price. Hence, an economically feasible security system has become
the need of the hour.
In this paper, we present an electronically controlled door locking system that employs Arduino,
an open source microcontroller board that can sense, monitor, store and control applications. This
system also employs an IoT based log that monitors the entry and exit of the users.
vi
TABLE OF CONTENTS
Page
ABSTRACT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Vi
LIST OF FIGURES . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . iX
ABBREVIATIONS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Xi
CHAPTER 1: Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . 14
3.1 Introduction. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
3.2 Working Principle . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
3.2.1 Process of work. . . . . . . . . . . . . . . . . . . . . . . . . 20
3.3 Important components. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
3.4 Implementation. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
vii
Table of Contents (continued) Page
3.5 Test experimental setup. . . . . . . . . . . . . . . . . . . . . . . . . . . 27
4.1 Simulation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31
CHAPTER 5: Conclusion . . . . . . . . . . . . . . . . . . . . . . . . . . 33
viii
List of Figures
3.5 PCB 23
3.6 LCD 23
3.7 Resistor 24
3.9 ULN2003A 25
3.10 Relay 5V 25
viii
Major contributions
The main objective of this project is to provide a:-
This simple circuit can be used at residential places to ensure better safety.
It can be used at organizations to ensure authorized access to highly secured places.
With a slight modification this Project can be used to control the switching of loads through
password.
ix
ABBREVIATIONS
ix
ix
CHAPTER 1
INTRODUCTION
Security has become a major concern in the twenty first century; everybody wants to feel safe
at his or her own home, workplace and a safe environment as a whole. Smart door security
system using Arduino and Bluetooth application is a project aimed at increasing and
advancing the safety and security of lives and property of the people. The project deals
primarily with the protection of doors and making it more secured within our houses, office
or public related buildings. With the help of smart door, when indoors or while you are away
from your home and workplace, the doors are protected primarily to grant access to only
authorized persons using their smartphone and Bluetooth application. With the advancement
of technology smartphone has become a household requirement. As of 2007 smartphones
were not more than two percent of phone industries, but in 2009 the smartphone world has
taken more than fifty percent of phone market. With this it is quite logical to say that there is
at least a Smartphone owner in every house. With this smartphone we can simply interface it
with an arduino (microcontroller) to keep our houses and offices safer and more secure with a
single click to lock or unlock the resulting door.
The term "door lock" refers to a device that prohibits a door from being opened and that can
only be opened with a key, fingerprint, retina scanner, smartcard, or other similar device.
Door locks have played a vital role in human life for a long time. As the rate of theft rises,
security has become a top priority in recent years. Door locks are intended to keep us and our
belongings safe and secure from thieves. People used to lock home doors with physical keys,
and they required the key to unlock doors. If they lost the key, it was unlikely to repair, and it
was expensive. Now, those door lock systems may be replaced with new locking
technologies. The Arduino Uno, Servo motor, 4*4 keypad module, and jumper wires
comprise the password-based door lock system. In this project, we will use the keypad to
enter a password and then use the servo motor to open the door lock. The Arduino is the
program's brain, controlling the entire system. The password or pin code is entered using the
4*4 keypad module. The servo motor pushes (locks) or pulls (unlocks) the door's latch.
Password Based Door Lock System is designed using ARDUINO UNO where in once the
correct code or password is entered, the door is opened and the concerned person is allowed
access to the secured area. The idea came to bring some security after the incident of loot
came in vast number.
In normal locks it is easy to make the keys (duplicate keys) with which a person can easily
enter into someone’s house.
14
1.2 Project Outcomes
The PO of this project is to research and analyze a suitable collection of components for
developing a smart lock using Arduino that provides excellent security and quick access. The
following are the specific project goals:
Familiarity with a smart door locking system based on a microcontroller.
Using Arduino to create a simple and smart door locking system.
15
1.6 Scope of the project
The project is about interacting with component and devices with the help of AT Mega
(Arduino Uno). The project is limited to performing the task of opening and closing of 3
doors precisely main entrance doors of a building. It is not designed for the purpose of
surveillance in a home or any building nor is it a burglar alarm that alarms you in any case of
perimeter bridging it’s only limited to performing the task of opening and closing.
16
Chapter 02
Literature Review
There are just a few digital approaches for door security locks in the current system. This
contemporary smart locking system takes the place of the classic lock and key locking
method. Modern living is largely reliant on technological advancements, such as opening
doors, managing the air conditioning, and regulating the curtains. People want to feel safe in
their own homes, offices, and stores. The primary motivation for the development of smart
locks is to meet the needs of people. Some of these systems will be discussed in this section.
Internet of Things
The internet of things, or IoT, is a wireless links that works in a door lock. With the help of
IoT-enabled applications, the user may unlock the door with his smartphone. The servo
library is introduced after the application is developed by creating a string variable that
contains the unique device ID for the lock. The essential concept underlying the door lock's
operation is the ID supplied by the Android phone via the created app.
17
RFID Based Access Control System
A magnetic door lock is administered through an RFID reader in the suggested system, which
begins the authentication and validation of the user or regulates access in short. In addition,
the systems keep track of each user's access and exit records in the form of a log report for
each access. To avoid unforeseen circumstances, the administrator of the central subsystem
can terminate the validity of any user at any moment.
Passwords aren't a novel concept when it comes to locking doors. However, as technology
advances, these systems have become more sophisticated.
Akshaya Krishnadas Bhat: - This article illustrates how a password-protected door
lock can be used in a variety of settings, including the home, office, and desk. The
system will check the user's entered password for validity before unlocking it for the
authorized user. This method could be a less expensive alternative to expensive door
lock systems that use retina scans, iris scans, or fingerprints, among several other
technologies.
Prof.A.Y. Prabhakar: - This article shows how an ARDUINO UNO-based password-
based door lock system is created, where the door is unlocked and the user who input
the right code is authorized to enter the zone. And the common individual can bid on
such a locking system for a low price in order to ensure the protection of their
valuables.
Dr. Manish Kumar: - This study states how we may use an Android-based smart door
lock system to address the issues of unwanted access, trespassing, and instruction.
Also included in this concept is a bluetooth module that serves as a communication
channel between the Arduino Uno and a mobile phone. This application is simple to
set up and maintain.
Shruti Jalpur: - This paper depicts a secure and protected door lock system, with
network security supplied by the use of cryptographic algorithms such as SHA-128
and SHA-512. The technology also allows the authorized user to access the
information remotely. The user input is encrypted and hashed using the algorithms
AES-128 and SHA-512. If the sensor detects unauthorized access, it will send a
notification to the smart phone application placed on the authorized user's
smartphone.
Aleksander IBRO: - This article depicts a door lock system that allows users to unlock
the door using face recognition and data stored on the cloud via a camera installed on
the door. This work will be quite costly, and it will necessitate the installation and
employment of qualified experts.
Shuhad Natashab Bint Mohd Zainot: - "The door entry system utilizing Arduino is
created to overcome cannot be replaced," according to this research. It also saves time
and provides a high level of security.
2.2 Justification
In general terms my project is a more user friendly project with easy access to users. People that have
problems physically like cripples or half paralysis can have access to doors without the help of
anybody not even an assistant, as long as they are in position of smartphone. The physically
challenged persons can open or lock any door they have permission to, or even lock or unlock a door
while sitting on their wheel chairs, resting sofas or sleeping bed.
18
2.3 Objective of the project
The objective of this project is to provide such a security system which is highly secure for
Commercial, Residential, Industrial areas, etc. By using an input device an individual user
enters a Password if the entered Password is matched with the predetermined Password
stored in the data memory of the micro-controller, then the microcontroller sends the input
signal for actuating the dc motor drive in a specific direction required for opening of the door.
If the entered Password doesn’t matched with the predetermined Password then no input
signal generates from the micro-controller to activate the dc motor drive. Hence the door
remains unlock.
19
CHAPTER 3
3.1 Introduction
In this project, we implemented a Password-Based Security System Using Arduino &
Keypad. As thefts are increasing day by day security is becoming a major concern nowadays.
So a digital code lock can secure our home or locker easily. It will open your door only when
the right password is entered. Only authorized people are allowed access to the restricted
sections due to a password-based door lock mechanism. The Arduino is responsible for the
entire project's operation. The desired password can be entered using a 4×3 keypad.
Hardware:
1. Arduino UNO
2. 4×3 Matrix Keypad
3. PWM Powered Servo Motor
4. 16×2 LCD Display
5. PCB
6. LED
7. Resister
8. Jumper wire
9. ULN2003
10. Relay 5V
20
Software:
1. Proteus
2. Arduino IDE
Arduino UNO:
Arduino is an open-source platform used for building electronics projects. Arduino consists
of both a physical programmable circuit board (often referred to as a microcontroller) and a
piece of software, or IDE (Integrated Development Environment) that runs on your computer,
used to write and upload computer code to the physical board. The Arduino platform has
become quite popular with people just starting with electronics, and for good reason. Unlike
most previous programmable circuit boards, the Arduino does not need a separate piece of
hardware (called a programmer) to load new code onto the board -- you can simply use a
USB cable. Additionally, the Arduino IDE uses a simplified version of C++, making it easier
to learn to program. Finally, Arduino provides a standard form factor that breaks out the
functions of the micro-controller into a more accessible package.
21
PWM Powered Servo Motor:
This servo motor is a rotational or translational motor that receives power from a servo
amplifier and is used to impart torque or force to a mechanical device like an actuator or a
brake. Servo motors provide exact angular position, acceleration, and velocity control. A
closed-loop control system is used with this type of motor. A closed-loop control system
takes the current output into account and adjusts it to the desired state. The output of the
motor drives the control action in these systems. The velocity and final position of the shaft is
controlled by a positive feedback mechanism.In these motors, there are two forms of current
flow: AC and DC. AC servo motors are more typically found in heavy industrial machines
because they can sustain higher current surges. DC Servo Motors from ISL are best suited for
compact applications and provide great control and feedback. The frequency of the applied
voltage and the number of magnetic poles affect the speed of a servo motor.
22
PCB:
A printed circuit board (PCB) is a laminated sandwich structure of conductive and insulating
layers. PCBs have two complementary functions. The first is to affix electronic
components in designated locations on the outer layers by means of soldering. The second is
to provide reliable electrical connections (and also reliable open circuits) between the
component's terminals in a controlled manner often referred to as PCB design. Each of the
conductive layers is designed with an artwork pattern of conductors (similar to wires on a flat
surface) that provides electrical connections on that conductive layer. Another manufacturing
process adds vies, plated-through holes that allow interconnections between layers.
LED:
A light-emitting diode (LED) is a semiconductor light source that emits light when current
flows through it. Electrons in the semiconductor recombine with electron holes, releasing
energy in the form of photons. The color of the light (corresponding to the energy of the
photons) is determined by the energy required for electrons to cross the band gap of the
semiconductor. White light is obtained by using multiple semiconductors or a layer of light-
emitting phosphor on the semiconductor device.
23
Resistor:
A resistor is a passive two-terminal electrical component that implements electrical resistance
as a circuit element. In electronic circuits, resistors are used to reduce current flow, adjust
signal levels, to divide voltages, bias active elements, and terminate transmission lines,
among other uses. High-power resistors that can dissipate many watts of electrical power as
heat may be used as part of motor controls, in power distribution systems, or as test loads for
generators. Fixed resistors have resistances that only change slightly with temperature, time
or operating voltage. Variable resistors can be used to adjust circuit elements (such as a
volume control or a lamp dimmer), or as sensing devices for heat, light, humidity, force, or
chemical activity.
Jumper wire:
A jump wire (also known as jumper, jumper wire, DuPont wire) is an electrical wire, or
group of them in a cable, with a connector or pin at each end (or sometimes without them –
simply "tinned"), which is normally used to interconnect the components of a breadboard or
other prototype or test circuit, internally or with other equipment or components, without
soldering. Individual jump wires are fitted by inserting their "end connectors" into the slots
provided in a breadboard, the header connector of a circuit board, or a piece of test
equipment.
24
ULN2003A:
The ULN2003A is an array of seven NPN Darlington transistors capable of 500 mA, 50 V
output. It features common-cathode fly back diodes for switching inductive loads. It can
come in PDIP, SOIC, SOP or TSSOP packaging.[1][2] In the same family are ULN2002A,
ULN2004A, as well as ULQ2003A and ULQ2004A, designed for different logic input levels.
The ULN2003A is also similar to the ULN2001A (4 inputs) and the ULN2801A,
ULN2802A, ULN2803A, ULN2804A and ULN2805A, only differing in logic input levels
(TTL, CMOS, PMOS) and number of in/outputs (4/7/8).
Relay 5V:
Relay is one kind of electro-mechanical component that functions as a switch. The relay coil
is energized by DC so that contact switches can be opened or closed. A single channel 5V
relay module generally includes a coil, and two contacts like normally open (NO) and
normally closed (NC). This article discusses an overview of the 5V relay module & its
working but before going to discuss what is relay module is, first we have to know what is
relay and its pin configuration.
3.4 Implementation
At first, the Keypad-Phone component was connected with the Arduino UNO R3. We
connected all the necessary pins of the Keypad to the Arduino board. All 7 pins were
connected using connecting wires.
25
Figure 3.11 Phone-Keypad connected with Arduino Board
Then we connected the 16x2 Alphanumerical Display to the Arduino Board. This allowed us
to view the inserted values and messages. All the pins were connected using connecting
wires.
Finally, we connected the PWM Powered Servo Motor with the Arduino Board. The motor is
used to open and close the locking mechanism of the door. If the Motor rotates 90°, then the
lock will open. If it stays in the same position, the lock will stay closed. LED Bulbs were also
to further differentiate if the locking mechanism is open or closed.
Figure 3.13 PWM Powered Servo Motor connected with Arduino Boards along with
LED
26
3.5 Test Experimental Setup
We implement our Test Experimental Setup on Proteus Design Suite; A virtual electronic
design automation software. For generating the source code for Arduino UNO official IDE of
Arduino is used. We export .hex file from the IDE after successful code compilation and
import it in proteus to start the simulation.
27
3.7 Source code:
#include <LiquidCrystal.h>
#include <Servo.h>
#include <Keypad.h>
Servo myservo;
int pos = 0;
LiquidCrystal lcd(A4, A5, A3, A2, A1, A0);
const byte rows = 4;
const byte cols = 3;
char key[rows][cols] = {
{'1', '2', '3'},
{'4', '5', '6'},
{'7', '8', '9'},
{'*', '0', '#'}};
byte rowPins[rows] = {0, 1, 2, 3};
byte colPins[cols] = {4, 5, 6};
void setup()
{
lcd.begin(16, 2);
myservo.attach(9);
}
void loop()
{
if (currentposition == 0)
{
displayscreen();
}
int l;
char code = keypad.getKey();
if (code != NO_KEY)
{
lcd.clear();
lcd.setCursor(0, 0);
lcd.print("PASSWORD:");
lcd.setCursor(7, 1);
for (l = 0; l <= currentposition; ++l)
{
lcd.print("*");
}
if (code == password[currentposition])
{
++currentposition;
if (currentposition == 4)
{
unlockdoor();
currentposition = 0;
}
}
Else
{
incorrect();
currentposition = 0;
28
}
}
}
void unlockdoor()
{
delay(900);
lcd.clear();
lcd.setCursor(1, 0);
lcd.print("Access Granted");
lcd.setCursor(4, 1);
lcd.println("WELCOME!!");
delay(500);
ClosingCountDown();
delay(1000);
for (pos = 0; pos <= 180; pos += 5)
{
myservo.write(pos);
delay(15);
currentposition = 0;
lcd.clear();
}
lcd.clear();
lcd.setCursor(4, 0);
lcd.print("LOCKED!");
delay(1000);
displayscreen();
}
void incorrect()
{
delay(500);
lcd.clear();
lcd.setCursor(0, 0);
lcd.print("CODE INCORRECT!!");
delay(500);
lcd.setCursor(3, 1);
lcd.println("GET AWAY!!!");
delay(2000);
lcd.clear();
displayscreen();
}
void displayscreen()
{
lcd.setCursor(0, 0);
lcd.println(" # ENTER CODE #");
lcd.setCursor(1, 1);
lcd.println("TO OPEN DOOR!!");
}
void ClosingCountDown()
{
29
lcd.clear();
lcd.setCursor(0, 0);
lcd.println("GET IN WITHIN:");
lcd.setCursor(6, 1);lcd.print("5");
delay(1000);
lcd.setCursor(6, 1);
lcd.print("4");
delay(1000);
lcd.setCursor(6, 1);
lcd.print("3");
delay(1000);
lcd.setCursor(6, 1);
lcd.print("2");
delay(1000);
lcd.setCursor(6, 1);
lcd.print("1");
delay(1000);
lcd.clear();
lcd.setCursor(2, 0);
lcd.print("RE-LOCKING");
delay(500);
30
Chapter 4
4.1 Simulation
31
Figure 4.4 Timeout after entering
32
Chapter 5
Conclusion
Thus “Smart Door Locking System using Arduino” is a modern successor of the conventional
door locking system. The conclusion of the discussion of smart Lock using Arduino is the
innovation created from the lock system with no more direct contact between the user and the
lock. This system is very cost-effective and easy to install. In conclusion, it was discovered
that the project performed according to specification and can be implemented. The use of the
Arduino UNO microcontroller in this project allows for design simplicity, hence, the project
can be achieved in lesser time compared to other techniques previously employed. This work
proposes a secure locking/unlocking system based on a keypad and Arduino. Adding
password to the Arduino side increase the system security. The system also has a feature for
locking itself after some delayed time. This system could be used to prevent houses,
companies, institutions from steal ingot losing the ordinary key.
33
Chapter 6
Reference
34