Design and Construction of Smart Door Security System Using Arduino Uno and Security Passcode
Design and Construction of Smart Door Security System Using Arduino Uno and Security Passcode
OCTOBER, 2023
1
DESIGN AND CONSTRUCTION OF SMART DOOR SECURITY SYSTEM
USING ARDUINO UNO AND SECURITY PASSCODE
By
2
A Project Report submitted to the department of Computer Science, Maryam Abacha
American University of Niger (MAAUN) in partial fulfillment of the requirement for the
2023
3
APPROVAL
This project has been approved for acceptance by the Computer Science department, Maryam
Abacha American University of Niger (MAAUN), and meets the regulations governing the
4
ABSTRACT
The Smart Security Door Lock System is an innovative solution designed to enhance
developing a secure and convenient door lock system that incorporates smart features
for remote access, user authentication, and real-time monitoring. The system employs
passcode entry to ensure smooth user experience and tightened security. The
protocols to safeguard user data and prevent unauthorized access. Through rigorous
testing and evaluation, the Smart Security Door Lock System demonstrates its
world.
5
TABLE OF CONTENTS
Page
Approval ----------------------------------------------------------------------------------------------- 4
Abstract -------------------------------------------------------------------------------------------------5
6
CHAPTER ONE
CHAPTER TWO
CHAPTER THREE
7
3.1 Introduction -------------------------------------------------------------------------------
25
CHAPTER FOUR
8
4.5 Discussion -------------------------------------------------------------------------------- 36
CHAPTER FIVE
Reference ------------------------------------------------------------------------------------44
LIST OF FIGURES
LIST OF PLATES
LIST OF APPENDICES
9
CHAPTER ONE
1.0 Introduction
keyless entry with modern digital security measures. Here’s some background information
Key Features:
Passcode Entry: Users can unlock the door by entering a predetermined passcode
on a keypad or touchscreen. This eliminates the need for physical keys and
provides a quick and easy way to gain access.
Customizable Passcodes: Many smart door lock systems allow users to create and
manage multiple passcodes. This is useful for granting access to different
individuals, such as family members, guests, or service providers.
Temporary Passcodes: Users can generate temporary passcodes that are valid for a
specific period. This is particularly handy for granting access to guests or
contractors for a limited time, after which the code becomes invalid.
10
Security Alerts: The system can notify users when incorrect passcodes are entered
multiple times or when a door is unlocked. This helps enhance security by alerting
users to potential unauthorized access attempts.
Backup Entry: In case the passcode is forgotten or the technology fails, many smart
lock systems offer a backup entry method, such as a physical key.
o Advantages:
Convenience: Passcode-based smart locks eliminate the need to carry physical keys
and prevent the hassle of lost or misplaced keys.
Enhanced Security: Passcodes are more resistant to physical theft than traditional
keys. Additionally, smart locks often implement encryption and other security
measures to protect against hacking attempts.
Customization: Users can easily manage and tailor access permissions according to
their needs, granting different levels of access to different individuals.
Remote Access: Users can grant access to guests even when they’re not physically
present at the property, which is particularly useful for Airbnb hosts or property
managers.
Audit Trails: Some systems log entry times and passcode usage, providing an audit
trail that can be reviewed for security or record-keeping purposes.
o Considerations:
Passcode Security: Users should choose strong and unique passcodes to prevent
unauthorized access. Avoid using easily guessable codes like birthdates or
sequential numbers.
Regular Updates: Smart lock manufacturers often release firmware updates to
address security vulnerabilities. Regularly updating the system’s software is
important to maintain its security.
Battery Life: Smart locks are typically battery-powered. Users should monitor
battery levels and be prepared for replacements or recharging.
11
Integration: Check if the smart lock system can integrate with other smart home
devices or platforms if desired.
Passcode-based smart door lock systems offer a modern and convenient way to
secure properties while providing customizable access control and remote
management capabilities.
(www.iot.lifesmart.com/homesecurity) With this it is logical to say the emergence of smart
door lock systems utilizing passcodes as the primary method of authentication represents a
systems introduce the concept of keyless entry through digital passcodes. This innovation
offers an array of features and benefits that redefine access control for residential and
commercial properties. The key features of such passcode-based smart door lock systems
include passcode entry, where users input alphanumeric codes through keypads to swiftly
unlock doors. This negates the need for physical keys and simplifies the process of gaining
entry.
Issues of theft and burglary increases with high rate as such door security is a necessity,
Door safety is now of upmost importance which triggers the need for project such as
“smart door security system” to provide a safe and secure environment in generally.
12
1.3 Problem Statement
Despite advancements in home security, traditional lock systems are increasingly prone to
security breaches, lost keys, and the inconvenience of physical key management. As a
result, there is a pressing need for an innovative and reliable solution that enhances smart
smart security door lock system that addresses these challenges by exploiting cutting-edge
Aim:
The aim of the smart door lock system is to provide an advanced and secure access control
solution that exposes modern technology to enhance convenience and security for property
owners.
Objectives:
• Integration: Ensure compatibility with other smart home devices, ensuring smooth
13
• Durability and Reliability: Design a dependable lock mechanism that withstands
The project is about interacting with component and devices with the help of
Arduino Uno R3 Board (Microprocessor). The project is limited to performing the task of
locking and unlocking of 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 is only limited to performing the task
of opening and closing. The project aims to develop a smart door lock system that employs
passcode entry. The scope includes hardware design, software development for the lock,
encryption implementation, and user-friendly interfaces. The system will enhance security
14
CHAPTER TWO
2.1 Introduction
This chapter encompasses of the literature review and theoretical background of the
project. The literature review deals with related project written by other researchers, the
Theoretical background explains in details some of the most important component used in
the project.
Smart doors have been implemented using different methods such as Radio
frequency identification (RFID) and Biometric lock to unlock and lock door. Both the
RFID and biometric lock are real ideal and smart ways to make a door smart, due to
necessity and limitations such as cloning of biometric prints or card. The use of Passcode
Entry is much simpler and easier to adapt and use. It gives you more access to
communicate with the door and it also give access to physically challenged persons that
might not have a finger to use for biometric lock or is crippled to use RFID but with
15
respect to this project physically challenged can simply open their door by simply entering
their passcodes. Adarsh V Patil et al (2008) did a similar project Android based smart door
locking system which employed the use of android phone which is also a smartphone and
also a GSM module to access the door. Also Agbo David et al (2017) did a somewhat
similar project based on door locking system using android application. Shafarana A.R.F et
al (2017) did android based automation and security system for smart homes. There are
many other projects done on smart door using various ways of access such as Fingerprint,
Passcode Entry, Mobile Apps etc. in different countries. They are all different from each
other in terms of designs, features, devices, and algorithm. They are mostly designed
according to specific needs and availability of components in the respective areas. Some of
them are cheap, some of them are very expensive. Availability of both hardware and
software is necessary to work. After a long searching, I have found a lot of articles.
Searching for security purpose articles, also found some projects done for door security.
These are mainly done in western countries. Many projects are done only for security
purpose with Arduino or Raspberry Pi. Again, the projects are done only for controlling
home Appliances using Arduino or Raspberry Pi. Most of the previous researches
encountered problems in their design especially in terms of cloning by other third party
2.3 Justification
A passcode smart security door lock system project is justified due to its potential
to enhance home security, offer convenience, and integrate with modern technology. It
addresses the need for advanced security measures, reduces the risk of unauthorized
access, and provides users with remote control and monitoring capabilities. Moreover, as
smart home technology gains popularity, this project aligns with the trend toward
16
interconnected and intelligent living spaces, offering a valuable solution for both
homeowners and renters seeking to enhance their safety and peace of mind.
dictionary has given a clear and precise definition of both words smart meaning intelligent
while a door is any metal, glass, wood etc, that is opened and closed so that people can
gain access in and out of a room, building, car etc, by definition of smart and door smart
door can easily be referred to as doors that can be accessed easily without having to touch
it physically
2.4.2 Keypad
Implementing a 4x4 passcode keypad in a smart security door lock system provides
a secure and user-friendly way to access a property. This keypad can offer thousands of
entry. Additionally, the compact design of a 4x4 keypad makes it easy to install and
integrate into various entry points, ensuring a seamless user experience while maintaining
17
PLATE 1: KEYPAD
The Arduino Uno R3 board is a popular microcontroller board used for various
electronics projects. It's based on the ATmega328P microcontroller and offers a range of
features that make it suitable for both beginners and experienced makers:
Digital and Analog I/O Pins: The board has a variety of digital and analog pins that
18
USB Connection: The board can be connected to a computer via USB, allowing
the board.
Shields: Arduino Uno is compatible with various "shields," which are expansion
boards that provide additional functionalities like WiFi, Bluetooth, motor control,
etc.
Analog-to-Digital Converter (ADC): The ADC allows analog sensor readings and
Power Options: The board can be powered via USB, an external power supply, or
The Arduino Uno R3 is suitable for a wide range of projects, from basic LED blinking and
sensor interfacing to more advanced robotics, automation, and Internet of Things (IoT)
applications. Its simplicity and versatility make it an excellent choice for beginners and
19
PLATE 2: ARDUINO UNO R3 BOARD
20
Specification of Arduino Uno
Microcontroller ATmega328p
Operating Voltage 5V
SRAM 2 KB (ATmega328P)
EEPROM 1 KB (ATmega328P)
Length 68.6 mm
Width 53.4 mm
Weight 25 g
An RGB LCD display, also known as a color LCD, is a vibrant screen that employs
a combination of red, green, and blue light to generate a wide spectrum of colors. The
display is made up of pixels, each consisting of three sub-pixels for the primary colors. By
21
varying the intensity of these sub-pixels, the display can reproduce countless colors and
shades. These displays commonly feature a backlight that illuminates the pixels from
behind, making the content visible. They find application in devices where visual output is
essential, such as smartphones, tablets, computer monitors, digital cameras, and more. To
work with an RGB LCD display, you'd typically use software libraries or code to control
individual pixels' colors and brightness levels. This allows you to display images, graphics,
and text on the screen. Moreover, some displays come with touch-sensitive capabilities,
Factors like resolution, refresh rate, viewing angles, and power consumption
influence the display's performance and user experience. The ability to render dynamic
content with rich color makes RGB LCD displays a cornerstone of modern visual
technology.
A servo motor is an electrical device that can be used to push or rotate an object
with great precision. If you want to rotate an object at some specific angle or distance, then
22
servo motor can be used easily for that purpose. Servo motor can rotate ninety degrees in
both directions. They can be used to move many equipment that require moving at any
angle
Servo mechanism;
• Controlled device
• Output sensor
• Feedback system
It is a closed loop system where it uses positive feedback system to control motion and
final position of the shaft. Here the device is controlled by a feedback signal generated by
comparing output signal and reference input signal. The reference input signal is compared
to reference output signal and the third signal is produced by feedback system. And the
third signal acts as input signal to control device. This signal is present as long as feedback
signal is generated or there is difference between reference input signal and reference
desired value.
All motors have three wires coming out of them. Out of which two will be used for supply
(positive and negative) and one will be used for signal that is sent from the
provided by control wires. There is a maximum pulse and a repetition rate. Servo motor
can turn 90 degrees from either direction from its neutral position. The servo motor expects
23
to see a pulse every 20 milliseconds (ms) and the length of the pulse will determine how
• Weight: 9g
• Temperature range: 0 ºC – 55
24
CHAPTER THREE
3.1 Introduction
This chapter explains in details the various stages involved in this research, the
stages are explaining in form of units such as input unit, receiver unit, processor unit and
output unit. According to the proposed system, I designed a system structure shown in
the block diagram in this chapter. The model was designed in such a way that it can be
kept at a safe place within. This is done in the easiest and lowest cost possible. However,
the system is flexible and can be customized for future enhancement. Changing one of
the components setup has to be compatible with the right software available. Every
component used in this system was Programmed and tested separately for safety
measures and matching with the right driver. Each component was programmed
separately with Arduino UNO using different Arduino IDE. Also they were run in
25
26
3.2 Methodology
Power supply
Smart door
27
3.2.1 Input Unit
This is the unit in which command is given to start the execution of a program and
in this project the Keypad is the component that serves the purpose of sending command as
input. The Keypad sends signal when connection is established between the Servo motor
and the smart Lock. The Keypad sends the input command through a series of unique
numbers which can either send lock (which is close) or unlock (which is to open) the
respective door. The input command can only be executed when and only when the
input. The command sent by the Keypad is received in this unit with the help of the RGB
LCD module. The module also serves as a link to establish connection between the Keypad
access control functions. It processes the entered passcodes, verifies them, and controls
the locking and unlocking mechanisms of the door. This unit is the brains and work of
this project. This unit determines the output of the project, it determines what command
to execute, how to execute, when to execute and where to execute it. The Arduino
microcontroller serves the purpose of processing the command of this project. The
Arduino receives the command from the Keypad on what command to execute RGB
LCD module and then the microcontroller determines what function to perform and how
28
to perform the particular task and give the required output of the given task. The
Arduino that serves as the main processing unit has two units the hardware (which is the
Arduino board) and the IDE (integrated development environment) which comprises of
software program that runs the whole operation and how the circuit basically works.
microcontroller. The task to be performed could either be to open or close the door. Servo
motor is the device used in this unit to perform the task. When the servo motor receives the
command from the microcontroller to open it moves its position to ninety degrees which
moves up and opens the slider while when the command is to close the servo motor moves
to one hundred and eighty degrees which moves the slider to lock position which locks the
door in turn. All this action is performing and written in form of a computer code in the
Arduino integrated development environment (IDE) and how the task will be performed.
29
START
ENTER PASSCODE ON
KEYPAD
NO
IS PASSCODE
CORRECT?
YES
OPEN DOOR
NO
IS DOOR
OPEN?
YES
CLOSE DOOR
YES NO
IS DOOR
CLOSED?
Figure 2: Flowchart
30
3.4 Power Supply Unit
The power supply unit consists of a 240v/12v step down transformer, rectifiers, filters and
a voltage regulator
31
3.4.1 Transformer Section
The 240v ac is stepped down to 12v ac using a transformer. The resultant output is given
by
= (2/π) × 16.97
Hence, due to standard and transformer size, the final transformer specification chosen was
transformer.
32
3.4.3 Voltage Regulation Section
LM317T Rating
• Current rating
33
3.4.4 Voltage Regulation Test
No.
34
3.5 Soldering Process
Soldering is a method to join metals by melting a filler metal (solder) that cools and solidifies in
the joint. It's widely used in electronics, plumbing, and metalwork. Soldering typically involves
metals like copper, brass, or electronic components, using solder made of alloys like tin and lead
or lead-free alternatives. Essential tools for soldering include a soldering iron, solder wire or
paste, flux, and a heat-resistant surface. The process involves cleaning the surfaces, applying
flux, heating with a soldering iron, and letting the solder melt to create a secure connection.
Soldering is used in electronics, plumbing, and jewelry making, among other applications. Safety
precautions include proper ventilation, eye protection, and choosing lead-free solder for health
and environmental concerns. Common soldering issues include cold joints, solder bridges, and
component overheating, which can be avoided with practice and proper technique.
35
CHAPTER FOUR
4.1 Introduction
This chapter discusses mainly about the tests carried out in the process of bringing about
this project. There has been a series of tests conducted from which various results were
obtained. And there is also a brief discussion about the project itself and the processes
The output of the LM317T Voltage regulator was connected to a 5W 7.5Ω chalk resistor as
load. The output of Voltage Regulator before (no load) and after connection (on load) was
4.3 Result
Below is the description of all the tests conducted during this project. The tests were
carried out in various sections of the project. The tests were carried out to determine the
amount of load that can be carried and the detection of the load.The program for the
Arduino Uno microcontroller was written in C language and was then compiled into an
executable file using the Arduino IDE. The process began by importing the executable file
into the Proteus Design Suite, which was used to create and simulate the hardware circuit
portrayed. After successfully simulating the software, the physical hardware was
assembled on a breadboard, and the Arduino microcontroller was programmed using the
Arduino IDE.
36
DESCRIPTION INPUT VOLTAGE WITH WOLTAGE
4.4 Discussion
This project solely aims at controlling doors. Locking and unlocking of doors without
using the traditional tangible key method. This project employs the use of passcodes to
unlock and lock doors. It also provides a safe and secure environment for those who
employ this project, you no longer have to worry about lost keys and the possible threat of
someone finding your key and potentially using it to gain access to your home or building.
This project was made using Arduino Uno and passcode keypad which are both open to the
person. Accomplishment of RGB LCD display with microcontroller permits the system
installation in more easy way. The system has been successfully designed to control the
37
CHAPTER FIVE
5.1 Summary
This research project is centered around a door locking system that operates on a
controlled, and RFID technologies. It relies on the Arduino Uno board and a Servo
motor for door access control. This approach provides a practical and economical
security solution, as users simply input a password to gain entry. The integration of the
Arduino Uno and Servo motor ensures an effective and reliable door locking system for
5.2 Conclusion
based door locking system, integrating the Arduino Uno board and a Servo motor. By
and RFID technologies. The implemented system demonstrated its feasibility and
reliability, showcasing its potential for effectively guarding various environments. This
approach aligns with the evolving landscape of security needs, offering a practical
the enduring significance of simplicity and efficiency in the realm of security. Its
38
5.3 Recommendation
During this research some of the problems I came across were the malfunction that occurs
when you input the unlock password twice. The Smart-door lock system then fails to
recognize any command given to it until the Arduino Uno board is manually reset. And
another problem I encountered was the non-stop rotation of the servo motor, that was then
reprogrammed and worked perfectly. I strongly recommend that future research to be made
on this project takes very cautious measures in trying to avoid iteration of such problems.
39
APPENDIX A
Circuit Diagram
40
APPENDIX B
Program Code
Servo servo;
char keys[ROWS][COLS] = {
41
String unlock = "1234"; //PASSCODE TO UNLOCK
void setup()
Serial.begin(9600);
lcd.setCursor(1, 0);
lcd.print("Input Passcode");
void loop()
password += key;
checkPassword();
password = "";
42
password = "";
password = "";
void checkPassword(){
isLocked = false;
Serial.println(password);
delay(365);
servo.write(90);
lcd.setCursor(1, 0);
lcd.print("Door Unlocked!");
lcd.setCursor(2, 1);
lcd.print("WELCOME!");
delay(3000);
lcd.clear();
lcd.setCursor(1, 0);
43
lcd.print("ENTER PASSCODE");
lcd.setCursor(2, 4);
lcd.print("TO LOCK");
isLocked = true;
servo.write(140);
delay(365);
servo.write(90);
lcd.begin();
lcd.backlight();
lcd.setCursor(1, 0);
lcd.print("Door Locked!");
delay(3000);
lcd.clear();
44
REFERENCE
Automated Intelligent relay coupled door control system using technology. By A. Rajesh
Based on Arduino Uno Single-Board Microcontroller”, Vol. 3, No. 3, pp 11-15, July 2014.
http://www.creativeworld9.com/2011/04/ahttps://en.wikipedia.org/wiki/androiddevelopers
https:// www.bluetooth.com/whatisbluetooth
Information Technology Research ISSN 2348-120X (online) Vol. 5, Issue 3, pp: (26-30),
45