0% found this document useful (0 votes)
5 views

Capstone

This microproject report details the design and implementation of an Arduino-based door lock system that enhances security through customizable electronic access control. The system utilizes an Arduino microcontroller, a keypad for user input, and a servo motor for locking and unlocking, with optional RFID or Bluetooth integration for additional authentication. The project aims to provide a flexible, secure solution for modern access control, replacing traditional mechanical locks with an electronic alternative while addressing challenges such as security vulnerabilities and reliability concerns.

Uploaded by

swordragon72
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
5 views

Capstone

This microproject report details the design and implementation of an Arduino-based door lock system that enhances security through customizable electronic access control. The system utilizes an Arduino microcontroller, a keypad for user input, and a servo motor for locking and unlocking, with optional RFID or Bluetooth integration for additional authentication. The project aims to provide a flexible, secure solution for modern access control, replacing traditional mechanical locks with an electronic alternative while addressing challenges such as security vulnerabilities and reliability concerns.

Uploaded by

swordragon72
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 32

S.H.

JONDHALE POLYTECHNIC
DOMBIVLI (W)

A Microproject Report on
“Prepare a door lock system using
Arduino.”

1721 – Gaurav Thakare


1722 – Devesh Phanse
1739 – Kunal Raut
1740 – Chirantan Ahirrao

Under Guidance: -
Ms. Shraddha Tayade

1
MAHARASHTRA STATE BOARD OF
TECHNICAL EDUCATION

CERTIFICATE

This is to certify that Mr. Gaurav Thakare, Mr.


Chirantan Ahirrao, Mr. Devesh Phanse and Mr.
Kunal Raut of the Fifth Semester of Diploma in
Electronics and Telecommunication Engineering
of Institute S.H.J.P(code 0044) has completed
Micro Project satisfactorily in course for the
academic year 2024-25 as prescribed in the
curriculum.

Place: Dombivli Date:

Subject Teacher Head of Department Principal

2
ACKNOWLEDGEMENT

We have taken efforts in this project. However,


it is not possible without the kind support and
help of our teachers and college staff. We
would like to extend my sincere thanks to all of
them. We are highly thankful to S.H.J.P for
their guidance and constant supervision as
well as for providing necessary information
regarding the project. We would like to express
my gratitude towards our parents for their kind
cooperation and encouragement which helped
us in completion of this project.

3
Index

SR NO. Topic Page No.


1 Abstract 5
2 Introduction 6
3 Circuit diagram 7
4 Working of door lock system using 8
arduino
5 Methodology/Components 12
6 Flow chart 18
7 Programming language used 19
8 Advantages & Disadvantages 28
9 Future scope 30
10 Applications 31
11 Conclusion 32

4
ABSTRACT
This project presents the design and implementation of an
Arduino-based door lock system aimed at enhancing security
through customizable, electronic access control. The system
utilizes an Arduino microcontroller, a 4x4 matrix keypad, a
servo motor for locking/unlocking, and optionally, an RFID or
Bluetooth module for additional authentication methods. The
core objective of this project is to replace traditional
mechanical locks with a more flexible, secure, and easily
customizable electronic solution that is suitable for residential,
office, or personal use. The door lock system is designed to
authenticate users through a passcode, which is entered via
the keypad. When the correct code is entered, the Arduino
microcontroller triggers the servo motor to unlock the door,
providing access to the user. The system also allows for remote
control and monitoring through Bluetooth or RFID, giving users
additional flexibility in managing access. This setup can be
enhanced with features like automatic door locking, logging of
access events, or integration with a mobile app for real-time
notifications and remote control.The Arduino-based design
offers advantages in terms of cost, customization, and
expandability, as users can easily modify the software and
hardware to meet specific security needs. However, it also
faces challenges such as security vulnerabilities, reliability
concerns, and limited scalability in larger installations.
Nevertheless, with careful design and appropriate
precautions, this system offers a robust and accessible solution
for modern access control needs.

5
I. INTRODUCTION

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.

6
Circuit Diagram

Figure 1. Circuit diagram of door lock system using Arduino

7
How this door lock system works ?

When powering this door lock, the servo motor activates and
pushes the door lock forward. Also displayed as “Welcome, put
your card” on the LCD. When the RFID tag is moved closer to
the RFID reader, it is scanned. In that case, it is displayed as
“scanning” on the LCD. Then, if the RFID tag is correct, the
servo motor is activated and the door lock is pulled back. The
LCD shows “Door is Open”. When the RFID tag is moved closer
to the RFID reader again, if it gets the correct tag, the servo
motor will push the lock forward. Displays “Door is locked” on
LCD. If a wrong RFID tag is used according to the program, it
will be displayed as “Wrong card” on the LCD.
The Arduino door lock system operates based on a simple
user authentication process where the user enters a passcode
through a keypad. The Arduino verifies the entered passcode,
and if it matches the predefined correct passcode, it activates
a servo motor (or solenoid lock) to unlock the door. If the
passcode is incorrect, the system provides feedback through
a buzzer or an LED indicator.

8
Step-by-Step Working Process
1. Initialization:
o The system starts when power is supplied to the
Arduino board.
o The system is in a locked state, and the door is
secured by the servo motor or electric lock.
2. User Input:
o Keypad Input: The user is prompted to enter a
passcode using the 4x4 matrix keypad. The
passcode is typically hard-coded in the Arduino
program or stored in EEPROM.
o RFID Input: If an RFID system is used, the user
scans an RFID tag (card or fob), and the system
reads the unique ID of the tag.
o Bluetooth Input: If Bluetooth is integrated, the user
can use their smartphone to send an unlock signal
via an app or Bluetooth interface.
3. Authentication:
o The Arduino processes the input from the keypad,
RFID, or Bluetooth.
o The system compares the entered passcode or
scanned RFID ID with the stored passcode or RFID
credentials.

9
o Correct Passcode: If the input matches the stored
credentials, the system proceeds to unlock the
door.
o Incorrect Passcode: If the input does not match,
the system may activate a buzzer to alert the user
of an invalid entry, and the door remains locked.
4. Unlocking the Door:
o Upon successful authentication, the Arduino sends
a signal to the servo motor or electronic lock to
unlock the door.
o If using a servo motor, it physically rotates to move
the locking mechanism, thus allowing the door to
open.
o If using an electric lock, the system sends a signal to
disengage the lock (often by energizing or de-
energizing the lock mechanism).
5. Feedback to User:
o LCD Display (if included): It can display messages
such as "Access Granted" or "Incorrect Code."
o Buzzer or LED: The system may emit a short beep
or flash a green LED to indicate that access has
been granted, or a red LED with a long beep for an
incorrect passcode.
6. Re-locking the Door:
o After a certain time, the system can automatically
re-lock the door. This could be based on a timer or
10
when the door is closed. For added security, the
system could be programmed to lock after a certain
delay, ensuring that the door is not left open
unintentionally.
7. Security and Logging:
o In some systems, the Arduino can maintain a log of
successful or failed attempts. For example, every
time the door is unlocked, the system could store
the time and date, or the RFID tag used, in the
Arduino’s memory or an external storage medium
(like an SD card).
o Mobile App (if integrated): With Bluetooth or Wi-Fi
integration, users can check the status of the door
(locked/unlocked) and control the door remotely
via a smartphone application.

11
METHODOLOGY

1. ARDUINO-UNO: The Arduino Uno is a low-cost, flexible, and


simple-to-use programmable open-source microcontroller
board that may be used in a wide range of electronic
applications. This board can operate relays, LEDs, Servos, and
motors as an output and can be interfaced with other Arduino
boards, Arduino shields, and Raspberry Pi boards.

Key Features of Arduino:


Open-source: Both the hardware (the Arduino board) and the
software (the Arduino IDE) are open-source.
Easy to Use: Arduino's simple, easy-to-learn programming
language, based on C/C++, makes it accessible for beginners
Cross-platform: Arduino software is available for Windows,
macOS, and Linux, making it easy to use across different
operating systems.
Versatile and Flexible: Arduino can be used for a wide variety
of applications, from simple projects like controlling LEDs or
sensors to more complex systems like robots
12
2. 4x4 Keypad Module
The polymer material used in these Keypad Modules is thin
and flexible. The 16 keys in the 4*4 Keypad module are
grouped in a matrix of rows and columns. An electrical wire
connects all of these switches together. In most cases, there is
no link between rows and columns. When we push the key, a
row and a column fall into touch.

Pinout and Connections


A typical 4x4 keypad module has 8 pins in total,
corresponding to the 4 rows and 4 columns.
Pinout:
• Pins R1, R2, R3, R4: These correspond to the 4 rows of
the keypad.
• Pins C1, C2, C3, C4: These correspond to the 4 columns
of the keypad.

13
Example Circuit
Here’s an example of how to wire a 4x4 keypad to an
Arduino:
Keypad Pin Arduino Pin
R1 Pin 9
R2 Pin 8
R3 Pin 7
R4 Pin 6
C1 Pin 5
C2 Pin 4
C3 Pin 3
C4 Pin 2

Wiring the Keypad to Arduino


1. Connect the keypad to the Arduino using jumper wires:
o Rows (R1-R4) are connected to digital pins on the
Arduino (for example, pins 9, 8, 7, and 6).
o Columns (C1-C4) are connected to other digital pins
on the Arduino (for example, pins 5, 4, 3, and 2).
2. The Keypad Library: To simplify the process of working
with a 4x4 keypad, Arduino uses the Keypad library.

14
3. SERVO MOTOR
A servo motor is a simple electric motor which is controlled
by servomechanism. When a DC motor is used as a controlled
device in conjunction with a servo mechanism, it is referred
to as a DC Servo Motor. AC Servo-Motor refers to a controlled
motor that is powered by AC

Key Features of Servo Motors


1. Precise Control:
Servo motors can rotate to a specific angle (usually between
0° and 180°, but some can go beyond 180°), with high
accuracy.
2. Feedback Mechanism:
Servo motors are equipped with a position feedback
mechanism (usually a potentiometer or an encoder), which
continuously updates the motor’s position.
3. Compact and Lightweight: Servo motors are typically
compact, lightweight, and efficient, which makes them ideal
for use in small mechanical systems like robots, camera
gimbals, and drones.
15
How Servo Motors Work
A servo motor is driven by a PWM (Pulse Width Modulation)
signal, where the position of the servo is determined by the
width of the pulse. The servo reads the pulse width and
adjusts its position accordingly.
Control Signal: A PWM signal typically ranges from 1 ms to 2
ms pulse width:
A 1 ms pulse corresponds to 0° (fully one side of the range).
A 1.5 ms pulse corresponds to 90° (the middle of the range).
A 2 ms pulse corresponds to 180° (fully the other side of the
range).

How to Use a Servo Motor with Arduino


To control a servo motor with Arduino, you can use the Servo
library. The library makes it easy to control the position of the
servo using simple commands.
Wiring a Servo Motor to Arduino
• VCC: Connect to 5V on the Arduino (or external power
supply).
• GND: Connect to GND on the Arduino.
• Signal (PWM): Connect to a digital I/O pin on the
Arduino (for example, pin 9).

16
4. Jumper Wires
Simple terms, jumper wires are wires with connection pins on
both ends. A jumper wire is sometimes referred to as a jumper,
a jumper cable, a DuPont, or a cable. Without soldering,
jumper wires are used to connect electronic components or a
test circuit. Jumper wires come in a variety of colours, and the
fact that they all work the same colors doesn't mean anything.

Jumper wires typically come in three different versions


• Male-to male jumper wire
• Male-to-female jumper wire

• Female-to-female jumper wire

The end points of male jumper wires have a pin that is used to
connect to other components, whereas female jumper wires
do not. Female jumper wires do not have pins on their ends
and are used to plug into items. The most common type of
jumper wire used to connect components is male-to-male
jumper wires.

17
FLOW CHART

The flow chart above depicts the entire step by step


procedure. Here, users must first enter the predefined
password, which will be read by the keypad, and if the
password is correct, the servo motor will turn on and turn the
door lock; if the password is incorrect, the servo motor will not
turn on, and we must retype the password which have been
predefined in the programme. Passwords can be updated as
needed by the user.

18
Programming code for working of door lock
system

#include <Servo.h>
#include <LiquidCrystal_I2C.h>
#include <Keypad.h>
#include <Password.h>

#define buzzer 11

Servo servo;
LiquidCrystal_I2C lcd(0x27, 16, 2);

String newPasswordString; //hold the new password


char newPassword[6]; //charater string of newPasswordString
byte a = 5;
bool value = true;

Password password = Password("0123"); //Enter your


password

byte maxPasswordLength = 6;
19
byte currentPasswordLength = 0;
const byte ROWS = 4; // Four rows
const byte COLS = 4; // Four columns
char keys[ROWS][COLS] = {
{'D', 'C', 'B', 'A'},
{'#', '9', '6', '3'},
{'0', '8', '5', '2'},
{'*', '7', '4', '1'},
};

byte rowPins[ROWS] = {2, 3, 4, 5};


byte colPins[COLS] = {6, 7, 8, 9};

Keypad keypad = Keypad( makeKeymap(keys), rowPins,


colPins, ROWS, COLS );

void setup() {

Serial.begin(9600);
pinMode(buzzer, OUTPUT);

20
servo.attach(10);
servo.write(50);
lcd.init();
lcd.backlight();
lcd.setCursor(3, 0);
lcd.print("WELCOME TO");
lcd.setCursor(0, 1);
lcd.print("DOOR LOCK SYSTEM");
delay(3000);
lcd.clear();
}

void loop() {
lcd.setCursor(1, 0);
lcd.print("ENTER PASSWORD");

char key = keypad.getKey();


if (key != NO_KEY) {
delay(60);
if (key == 'C') {
resetPassword();
} else if (key == 'D') {
21
if (value == true) {
doorlocked();
value = false;
} else if (value == false) {
dooropen();
value = true;
}
} else {
processNumberKey(key);
}
}
}

void processNumberKey(char key) {


lcd.setCursor(a, 1);
lcd.print("*");
a++;
if (a == 11) {
a = 5;
}
currentPasswordLength++;
password.append(key);
22
if (currentPasswordLength == maxPasswordLength) {
doorlocked();
dooropen();

}
}

void dooropen() {
if (password.evaluate()) {
digitalWrite(buzzer, HIGH);
delay(300);
digitalWrite(buzzer, LOW);
servo.write(50);
delay(100);
lcd.setCursor(0, 0);
lcd.print("CORRECT PASSWORD");
lcd.setCursor(0, 1);
lcd.print("DOOR OPENED");
delay(2000);
lcd.clear();
a = 5;
23
} else {
digitalWrite(buzzer, HIGH);
delay(200);
digitalWrite(buzzer, LOW);
delay(200);
digitalWrite(buzzer, HIGH);
delay(200);
digitalWrite(buzzer, LOW);
delay(200);
digitalWrite(buzzer, HIGH);
delay(200);
digitalWrite(buzzer, LOW);
delay(200);
lcd.setCursor(0, 0);
lcd.print("WRONG PASSWORD!");
lcd.setCursor(0, 1);
lcd.print("PLEASE TRY AGAIN");
delay(2000);
lcd.clear();
a = 5;
}
resetPassword();
24
}

void resetPassword() {
password.reset();
currentPasswordLength = 0;
lcd.clear();
a = 5;
}

void doorlocked() {
if (password.evaluate()) {
digitalWrite(buzzer, HIGH);
delay(300);
digitalWrite(buzzer, LOW);
servo.write(110);
delay(100);
lcd.setCursor(0, 0);
lcd.print("CORRECT PASSWORD");
lcd.setCursor(2, 1);
lcd.print("DOOR LOCKED");
delay(2000);
lcd.clear();
25
a = 5;
} else {
digitalWrite(buzzer, HIGH);
delay(200);
digitalWrite(buzzer, LOW);
delay(200);
digitalWrite(buzzer, HIGH);
delay(200);
digitalWrite(buzzer, LOW);
delay(200);
digitalWrite(buzzer, HIGH);
delay(200);
digitalWrite(buzzer, LOW);
delay(200);
digitalWrite(buzzer, HIGH);
delay(200);
digitalWrite(buzzer, LOW);
delay(200);
lcd.setCursor(0, 0);
lcd.print("WRONG PASSWORD!");
lcd.setCursor(0, 1);
lcd.print("PLEASE TRY AGAIN");
26
delay(2000);
lcd.clear();
a = 5;
}
resetPassword();
}

27
Advantages of Using an Arduino-Based Door
Lock System
1. Cost-Effective
Affordable Hardware: Arduino boards, keypads, motors (like
servos), and other components are relatively inexpensive
compared to proprietary electronic or biometric lock systems.
2. Customizable and Flexible
Easily Adjustable: The software is open-source, which allows
you to modify it according to your needs.
3. Enhanced Security
Passcode Protection: The most basic Arduino door lock system
can be secured with a passcode.
4 .Remote Access (IoT Capabilities)
Mobile App Integration: You can create a mobile application
that interfaces with the Arduino lock system, allowing you to
control the lock from anywhere with an internet connection.
5. Control via Multiple Inputs
Fingerprint Scanners: Adding a fingerprint scanner makes the
system even more secure and personal, ensuring that only
authorized users can unlock the door.
6. Easy to Maintain and Repair
Replaceable Parts: Since Arduino-based systems use
commonly available components (keypad, servo, sensors,
etc.), any faulty parts are easy to replace and inexpensive.

28
Disadvantages of Using an Arduino-Based
Door Lock System
1. Security Vulnerabilities
Susceptibility to Hacking: If the Arduino-based system is
connected to the internet (e.g., via Wi-Fi or Bluetooth), it could
be vulnerable to cyberattacks.
2. Reliability Concerns
Power Loss : If the power is cut off (e.g., due to a power failure,
battery depletion, or wiring issue), the system may stop
functioning.
3. Limited User Support
Technical Support: Unlike commercial systems, Arduino-based
door lock systems do not come with professional customer
support. If something goes wrong, you’ll need to rely on your
own troubleshooting skills or community support.
4. Complexity for Non-Technical Users
Requires Technical Knowledge: While Arduino is great for
hobbyists and developers, it may not be the best solution for
someone without technical skills.
5. Limited Power Options and Backup
Power Dependency: Arduino-based systems typically require
an external power source. If you're using a battery, you'll need
to ensure it is adequately charged and that the system has low
power consumption.

29
Future Scope of Door Lock Systems Using
Arduino

1. Integration with Smart Home Ecosystems: Full smart


home integration, automation etc.
2. Advanced Security Features: Biometric authentication,
Facial recognition, Voice recognition.
3. Internet of Things (IoT) Capabilities: Cloud access and
backup logs.
4. Machine Learning and AI Integration : Smart security with
AI, Intruder detection etc.
5. Voice-Controlled and Gesture-Based Access : Voice
activated looks for ex. Alexa, Google Assistant, Siri etc
6. Integration with Blockchain for Enhanced Security :
Blockchain for sure access logs
7. Wireless Power and Low-Power Solutions : Wireless
charging, Low power harvesting, Energy harvesting.
8. Smartphone Integration and Mobile App Control :
Geofencing , Bluetooth mesh networks etc.
9. Integration with Smart Cities and Public Infrastructure :
Urban security systems , public access control.
10. Sustainability and Eco-friendly Solutions : Eco-friendly
components , Solar-Powered systems.

30
Applications of Arduino :
Arduino-based door lock systems have a wide range of
applications across various fields due to their flexibility,
affordability, and ease of customization. Below are several
key applications of door lock systems using Arduino:
1. Home Security System : Smart Home Integration, Keypad
Entry
2. Industrial/Commercial Access Control : Employee Access
Control, Time-Based Locking
3. Student Dormitories or Hostels : Remote Access
Management, RFID or Card-Based System
4. Office Buildings : Multi-User Access, Logging and Audit
Trail:
5. Hotel Room Access : Electronic Room Keys, Personalized
Access Control
6. Smart Lock Systems : Bluetooth and Smartphone
Integration, Geofencing
7. Emergency or Safety Doors : Fail-Safe Mechanisms,
Manual Override
8. Garage Doors and Gates : Automatic Garage Door
Systems, Automated Gate Systems
9. Access Control for Vehicles : Car Security
10. Hospital or Healthcare Settings : Sensitive Area Access,
Patient Privacy

31
Conclusion

The future of Arduino-based door lock systems is bright, with


endless opportunities for innovation and integration. From
advanced security features like biometric authentication and
AI-powered monitoring to seamless integration with smart
homes, IoT devices, and even blockchain technology, the
potential for growth in this area is vast. As technology
advances, we can expect Arduino-based systems to become
more secure, efficient, user-friendly, and integrated into the
broader ecosystem of smart homes, cities, and personal
security solutions. Whether for DIY enthusiasts, hobbyists, or
commercial applications, the Arduino platform will continue to
be a versatile and adaptable solution for modern security
needs. Since there are many other security systems available,
such as fingerprint, retina scanner, RFID card, pattern, and so
on. However, the "Password based door lock system using
Arduino" is very inexpensive. It is cost effective because we are
using affordable component costs. Also, with the help of the
library, it is extremely simple to develop code, and anyone may
use this model for security purposes. Because the existing door
lock system has an issue with expensive and irreplaceable
components, one may use an Arduino-based door lock system
to solve this problem because it is simple to install and remove.
Therefore, the "Password-based door lock system using
Arduino" is a time-saving programmable module that will
assist us in providing excellent security.

32

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy