Major Project Report Format
Major Project Report Format
MAJOR PROJECT – II
Report
Submitted in partial fulfillment of the requirement for the award of
Degree of
BACHELOR OF TECHNOLOGY
In
ELECTRONICS AND COMMUNICATION ENGINEERING
JAN-JUNE 2025
Submitted to
Session:Jan-June-2025
Recommendation
The Project report entitled “Digital lock using Arduino Uno” submitted by ‘Omprakash Mishra
(0829EC211018), Mohd Ezaz (0829EC211017), Vikas Jha (0829EC201030) and Sachin Rathore
(0829EC211023), towards the partial fulfilment of degree of Bachelor of Engineering in Electronics
and Communication Engineering of Rajiv Gandhi Proudyogiki Vishwavidyalaya, Bhopal is
satisfactory account of the progress made by them in project work.
I
Sushila Devi Bansal College of Technology, Indore
Certificate
This is to certify that Major Project-II entitled “Digital lock using Arduino Uno” is submitted to
Rajiv Gandhi Proudyogiki Vishwavidhyalaya, Bhopal (M.P.), to the faculty of Engineering by
Omprakash Mishra (0829EC211018), Mohd Ezaz (0829EC211017), Vikas Jha (0829EC201030)
and Sachin Rathore (0829EC211023) Session: Jan-June-2025 in the partial fulfillment of the
requirement of the award of the Degree of Bachelor of Technology in Electronics and
Communication Engineering. The matter embodied is the actual work by Omprakash Mishra,
Mohd Ezaz, Vikas Jha and Sachin Rahore.
II
Declaration
III
Acknowledgement
First of all, we are thankful to almighty God who has given me the strength and courage to work on
my project. Our special thanks to Dr. P.S. Chauhan, Director, Sushila Devi Bansal College of
Technology, Indore (M.P.) for his Support and guidance. We would like thank to Dr. Neelam
Sharma, Head of Department for support in the development of the project. It has been a pleasure to
work with them. We would like to thank our supervisor Deepak Sharma for their continuos
technical support. We would like to thank Mr. Yogesh Gupta for their guidance. Presence of all of
them has provided an invaluable influence on our career and outlook for the future.
IV
Table of contents
1 Recommendation I
2 Certificate II
3 Declaration III
4 Acknowledgement IV
6 Abstract VII
8 List of tables IX
9 Chapter 1. Introduction 11
1.1 11
1.2 12
1.3 13
10 Chapter 2. System Model 15
2.1 Block diagram 16
2.2 Circuit diagram 17
2.2.1 17
2.2.2 18
2.3 PCB Layout 20
2.3.1 20
2.3.2 21
2.3.3 21
17 DATA Sheets 89
VI
Abstract
Every individual needs to feel secure in their daily lives. In our security pattern,
access control for doors plays an essential role. Password-based door lock systems
allow authorized persons to access restricted areas. Conventional locks are not as
secure as they once were; anyone can break in if they break these locks. We need
a framework that provides 24/7 benefit. It is controlled by an Arduino. The
password is entered using a keypad. The entered password is compared with the
known password when setting a combination password and by using 1-6 digits. A
correct password opens the door and displays the status on the LCD. If the
password is wrong, the door remains closed and states "WRONG PASSWORD"
on LCD. The buzzer will also activate when password is entered incorrectly an
indefinite number of times. By replacing mechanical door locks with electronic
door locks, the security door locking system promises to make a bold step for the
future. Security is a major concern in both residential and commercial spaces.
Traditional key-based locks are susceptible to theft, duplication, and loss. To
enhance security, this project presents a door locking system using a keypad and
Arduino Uno, which allows access through a password-based authentication
mechanism. The system primarily consists of an Arduino Uno microcontroller, a
4x4 matrix keypad, a servo motor, and an LCD display. When a user enters a
predefined password on the keypad, the Arduino verifies it. If the input matches
the stored password, the system activates the servo motor, which unlocks the
door. If the wrong password is entered multiple times, the system can trigger an
alert, such as an LED indicator or a buzzer, to notify unauthorized access
attempts. The Arduino Uno acts as the central processing unit, handling input
from the keypad and controlling the locking mechanism. The 4x4 matrix keypad
allows users to input the password, while the LCD display provides real-time
feedback, such as "Enter Password," "Access Granted," or "Access Denied."
The servo motor is used as an electromechanical lock that rotates to open or lock
the door. This system offers several advantages over traditional locks, including
enhanced security, ease of use, and the ability to change passwords without the
need for physical key replacement. The implementation is cost-effective and can
be integrated with other security features, such as RFID or biometric scanners,
for additional protection. Potential applications include homes, offices, and
restricted areas where controlled access is required. Additionally, the system can
be extended by adding IoT functionality for remote access and monitoring. In
conclusion, this Arduino-based keypad door locking system provides a reliable
and user-friendly solution to security challenges. It eliminates the risks associated
with physical keys and offers a simple yet effective way to control access to secure
areas.
VII
List of figures
VIII
List of tables
1.1 Introduction
Security is a means of defending against threats and assuring one's safety. Security has always been
a big concern in areas like homes, businesses, institutions, laboratories, and so on, to keep our
resources secure and prevent illegal access to them. In the past, there were fewer security
procedures in place to prevent unwanted access. For such sites and apps, a variety of security
methods have been implemented in recent years. Password-protected systems, RFID card
technologies, biometric-protected systems, OTP-based, cryptography-based, and other security
solutions are currently available. Each system has its own set of applications. As the number of
thieves rises every day, security becomes a risk. As a result, a digital code lock can easily safeguard
your home or locker. It will only unlock your door if you input the correct password. The ARDUINO
UNO is used to create a password-based door lock system, in which the door is unlocked, and the
concerned individual is granted entry to the secured area after the correct code or password is
entered. The Password Based Door Lock System with Arduino UNO is a simple project that uses a
secure password to unlock the door. The door is unlocked, and the concerned individual is permitted
entrance to the secured area once the correct code or password is entered using an Arduino UNO. It
will prompt you to input the password again if another person arrives.
11
If the password is incorrect, the door will remain locked, preventing the individual from entering.
The main concept behind this project is to open a door using a keypad and a password. When the
passcode is entered incorrectly multiple times, the Buzzer will get trigger. Using a keypad, the user
can customize this password at any moment. The Arduino UNO is the main component in the circuit,
and it is utilized to send a text message to the home's owner informing them of the security breach.
Passwords are inputted by using a 4*4 keypad. The entered password is compared to the password
that has already been input. If the password is right, the system uses a servo motor to open the door
and displays the door's status on the LCD. If the password is incorrect, the door will remain shut, and
the LCD will read "Incorrect Password" and “Door is close” Security is a means of defending against
threats and assuring one's safety. Security has always been a big concern in areas like homes,
businesses, institutions, laboratories, and so on, to keep our resources secure and prevent illegal
access to them. In the past, there were fewer security procedures in place to prevent unwanted access.
For such sites and apps, a variety of security methods have been implemented in recent years.
Password-protected systems, RFID card technologies, biometric-protected systems, OTP-based,
cryptography-based, and other security solutions are currently available. Each system has its own set
of applications. As the number of thieves rises every day, security becomes a risk. As a result, a
digital code lock can easily safeguard your home or locker. It will only unlock your door if you input
the correct password.
12
The ARDUINO UNO is used to create a password-based door lock system, in which the door is
unlocked, and the concerned individual is granted entry to the secured area after the correct code or
password is entered. The Password Based Door Lock System with Arduino UNO is a simple project
that uses a secure password to unlock the door. The door is unlocked, and the concerned individual is
permitted entrance to the secured area once the correct code or password is entered using an Arduino
UNO. It will prompt you to input the password again if another person arrives. If the password is
incorrect, the door will remain locked, preventing the individual from entering. The main concept
behind this project is to The Arduino UNO is the main component in the circuit, and it is utilized to
send a text message to the home's owner informing them of the security breach. Passwords are
inputted by using a 4*4 keypad. The entered password is compared to the password that has already
been input. If the password is right, the system uses a servo motor to open the door and displays the
door's status on the LCD. If the password is incorrect, the door will remain shut, and the LCD will
read "Incorrect Password" and “Door is close”.
The aim of this project is to provide the security. Now a days security system is must for every
organization. Access control system is one system that is used for security purpose in many
organizations. The main aim of this project is to provide access only if the password of particular
user is matched. So, that access is denied to unauthorized persons.These kinds of doors with secret
code locking systems are quite useful for the security purposes. Many departments like Defense,
military areas, Research centers, bank security and security for important documents Industries, go-
downs, etc, can adopt this type where high level security is essential. The same system can be used
even at domestic side also; the main advantage of this system is that only authorized persons can
operate this door. This system has intelligence of allowing only valid password.
A digital lock using an Arduino Uno, especially with a keypad or fingerprint sensor, offers a
secure and convenient alternative to traditional keys, allowing for password or biometric
authentication for door access.
Here's a breakdown of the benefits and considerations:
Security:
Password-based: Keypad-based locks allow users to enter a PIN code for access, offering a
level of security against lost or stolen keys.
Biometric (Fingerprint): Fingerprint sensors provide a more unique and secure method of
authentication, making it harder for unauthorized individuals to gain access.
Convenience:
No Keys Required: Eliminates the need for carrying and potentially losing keys.
Customizable Access: Allows for multiple users with different access permissions, or
temporary access codes.
13
Figure: 1.3. Preference of Digital Lock using Arduino Uno
Versatility:
Expandability: The Arduino platform allows for easy integration of other sensors and modules
for added features, such as remote control, alerts, or integration with other smart home systems.
Cost-Effective: Arduino Uno and related components are relatively affordable, making this a
budget-friendly option for building a digital lock system.
Implementation Considerations:
Components:
Arduino Uno: The microcontroller that controls the entire system.
Keypad: For password entry.
Fingerprint Sensor: For biometric authentication.
Servo Motor or Solenoid: To physically lock and unlock the door.
Power Supply: To power the Arduino and other components.
Buzzer or LED: For feedback to the user (e.g., successful or unsuccessful authentication).
Software:
Arduino IDE: Used to write the code that controls the lock's functionality.
Password Storage: Passwords can be stored in the Arduino's EEPROM or a more secure
method, depending on the desired security level.
14
Chapter 2
System Model
A system model of a digital lock using an Arduino Uno typically includes the following
components:
1. System Components
Microcontroller: Arduino Uno
Input Devices: Keypad (4x4 or 4x3), RFID module, or biometric sensor
Processing Unit: Arduino Uno processes the input and verifies the password
Output Devices: LCD display (16x2) for user feedback, LEDs, or buzzer
Lock Mechanism: Servo motor, solenoid lock, or relay module to control the door lock
Power Supply: USB or external power adapter
2. Functional Model
Step 1: Input Stage
The user enters a passcode via the keypad or scans an RFID tag.
The input is read by Arduino and stored in a variable.
15
2.1 Block diagram
3. LCD Display (16x2) → Displays status messages like "Enter Password" or "Access Denied".
4. Decision Logic:
16
2.2 Circuit Digram
Here’s a circuit diagram for a door lock system using a keypad and Arduino Uno:
Components Required:
17
3. 16x2 LCD Display (optional) – For displaying messages
2. LCD Connection: Connect the 16x2 LCD display to the Arduino board. Connect the LCD pins to
3. Servo Motor Connection: Connect the servo motor to digital pin 9 of the Arduino board. Also,
4. Buzzer Connection: Connect the buzzer to digital pin 20 of the Arduino board ².
5. LED Connection: Connect the red and green LEDs to digital pins 9 and 8 of the Arduino board
respectively [2).
18
Circuit Diagram:
19
2.3 PCB Layout
Designing a PCB layout for a digital lock keypad using an Arduino Uno involves integrating
components like a 4x4 matrix keypad, an Arduino Uno, and a relay or solenoid lock. Below is a
general approach:
Components Required:
1. Arduino Uno
20
4. Solenoid Lock
5. Buzzer (optional)
6. LEDs (optional)
Keypad Connection: The 4x4 keypad has 8 pins (4 for rows, 4 for columns). These connect to digital
input pins on the Arduino.
Relay Module: The relay controls the solenoid lock. The control pin connects to an Arduino digital
output.
Power Traces: Ensure sufficient copper thickness for power lines, especially for the solenoid.
Ground Planes: Use a solid ground plane to reduce noise and improve stability.
Component Placement: Keep Arduino and relay module close to minimize signal interference.
If using an Arduino Uno directly, you can create a shield-style PCB that stacks on top of the Uno.
If embedding the ATmega328P (Arduino’s microcontroller), you can make a compact, standalone
PCB.
21
b) Layer Selection
A double-layer PCB is better for a more compact layout with better power distribution.
Use a solid ground plane to reduce interference and improve circuit stability.
22
Chapter 3
Description and working of Circuit
A lock door keypad using an Arduino Uno is an electronic security system that enables access
control through a numeric keypad. The user must enter a predefined password, and if the entry is
correct, the system unlocks the door via a relay-controlled solenoid lock.
---
1. Overview
The system consists of an Arduino Uno, a 4x4 or 3x4 keypad, a relay module, and a solenoid lock.
If the password is correct, the relay activates the lock, allowing access.
If the password is incorrect, the system denies access and may trigger a buzzer.
2. Key Components
1. Keypad to Arduino
23
2. Relay Module to Arduino
4. Optional Components
24
3.2.1 Working Principle
When powered on, the Arduino initializes the keypad, relay, and optional buzzer/LEDs.
25
Step 4: Auto-Locking
After 5 seconds, Arduino turns off the relay, locking the door again.
1. Features
2. Applications
26
Chapter 4
Hardware Description
2. Servo Motor
3. 4x4 Keypad
4. I2C Module
6. Jumper Wires
7. Piezo Buzzer
# Key Features:
1. Microcontroller: ATmega328P, 8-bit, 16 MHz.
2. Memory: 32 KB Flash, 2 KB SRAM, 1 KB EEPROM.
3. Digital I/O Pins: 14 (6 PWM outputs).
4. Analog Input Pins: 6.
5. Communication: USB, Serial, SPI, I2C.
6. Power: 5V, 3.3V, and 9V input options.
27
# Characteristics:
1. Open-Source: Arduino Uno is an open-source hardware and software platform.
2. Easy to Use: Designed for beginners and experts alike, with a simple and intuitive interface.
3. Versatile: Can be used for a wide range of applications, from simple projects to complex
robotics and automation.
4. Community Support: Large and active community, with many resources and libraries
available.
# Applications:
1. Robotics: Arduino Uno is widely used in robotics, from simple line followers to complex
autonomous robots.
2. Automation: Used in automation projects, such as home automation, industrial automation,
and more.
3. IoT: Used in Internet of Things (IoT) projects, such as sensor networks and smart devices.
4. Education: Popular teaching platform for programming and electronics.
5. Prototyping: Used for rapid prototyping and proof-of-concept development.
# Advantages:
1. Low Cost: Arduino Uno is an affordable board, making it accessible to hobbyists and students.
2. Easy to Learn: Simple and intuitive interface makes it easy to learn and use.
3. Large Community: Active community provides many resources, libraries, and support.
# Disadvantages:
1. Limited Processing Power: ATmega328P microcontroller has limited processing power
compared to more modern microcontrollers.
2. Limited Memory: 32 KB Flash and 2 KB SRAM may be limiting for complex projects.
3. No Built-in Wi-Fi or Bluetooth: Requires additional modules for wireless connectivity.
28
Figure: 4.1(1) Arduino Uno Board
29
Pins and Function of Ardino Uno:-
30
Specification of Arduino uno
2. Servo Motor:
A servo motor is a type of motor that uses a control circuit to precisely control its rotation
or position. Servo motors are widely used in robotics, automation, and other
applications where precise control is required.
# Key Characteristics:
1. Precise Control: Servo motors can be controlled to rotate to a specific position or speed.
2. Feedback Mechanism: Servo motors use a feedback mechanism, such as an encoder or
potentiometer, to monitor their position and adjust their rotation accordingly.
3. High Torque: Servo motors can produce high torque, making them suitable for applications
that require precise control and high power.
31
# Types of Servo Motors:
1. DC Servo Motors: Use a DC power source and are commonly used in robotics and automation.
2. AC Servo Motors: Use an AC power source and are commonly used in industrial applications.
3. Stepper Servo Motors: Use a stepper motor and are commonly used in applications that require
precise positioning.
# Applications:
1. Robotics: Servo motors are widely used in robotics to control the movement of robots.
2. Automation: Servo motors are used in automation to control the movement of machines and
equipment.
3. CNC Machines: Servo motors are used in CNC machines to control the movement of cutting
tools.
4. Camera Systems: Servo motors are used in camera systems to control the movement of
cameras.
# Advantages:
# Disadvantages:
1. Complexity: Servo motors can be complex and require sophisticated control systems.
2. Cost: Servo motors can be more expensive than other types of motors.
32
Figure: 4.1(2) Servo Motor
3. 4x4 Keypad
keypad door lock system using Arduino Uno, 3.1, 3.2, or 3.3 versions involves a microcontroller
(Arduino), a keypad for password input, a servo motor or solenoid to control the lock, and
optionally an LCD display for feedback.
33
2. Keypad:
Servo Motor:
Solenoid:
Function: Provides visual feedback to the user, such as "Access Granted" or "Access Denied".
5. Other Components:
Power Supply: Typically 5V DC for the Arduino Uno and servo motor.
34
Figure: 4.1(3) Keypad 4x4
4. I2C Module
# Key Features:
1. Master-Slave Architecture: I2C uses a master-slave architecture, where one device (the master)
controls the bus and other devices (slaves) respond to the master's commands.
2. Shared Bus: I2C uses a shared bus, which allows multiple devices to be connected to the same
bus.
3. Addressing: Each device on the bus has a unique address, which is used to identify the device
and send data to it.
4. Data Transfer: I2C uses a serial data transfer protocol, where data is transferred one bit at a
time.
35
# Applications:
1. Microcontrollers: I2C is commonly used in microcontrollers to connect peripherals, such as
sensors, actuators, and memory devices.
2. Sensors: I2C is used in sensors, such as temperature, humidity, and pressure sensors, to
communicate with microcontrollers.
3. Actuators: I2C is used in actuators, such as motors and LEDs, to control their operation.
4. Memory Devices: I2C is used in memory devices, such as EEPROMs and FRAMs, to store
and retrieve data.
# Advantages:
1. Low Power Consumption: I2C is a low-power protocol, making it suitable for battery-powered
devices.
2. Simple Implementation: I2C is a relatively simple protocol to implement, making it easy to use
in a wide range of applications.
3. Flexible: I2C is a flexible protocol, allowing devices to be connected and disconnected from
the bus as needed.
# Disadvantages:
1. Limited Speed: I2C is a relatively slow protocol, with a maximum speed of 400 kHz.
3. Noise Susceptibility: I2C is susceptible to noise, which can cause errors and data corruption.
2. I2C Temperature Sensor: A type of temperature sensor that uses the I2C protocol to
communicate with microcontrollers.
3. I2C LCD Display: A type of LCD display that uses the I2C protocol to communicate with
microcontrollers.
4. I2C Motor Driver: A type of motor driver that uses the I2C protocol to control motors.
36
36
# Key Features:
1. Microcontroller: ATmega328P, 8-bit, 16 MHz.
# Characteristics:
1. Open-Source: Arduino Uno is an open-source hardware and software platform.
2. Easy to Use: Designed for beginners and experts alike, with a simple and intuitive interface.
3. Versatile: Can be used for a wide range of applications, from simple projects to complex
robotics and automation.
4. Community Support: Large and active community, with many resources and libraries
available.
37
# Applications:
1. Robotics: Arduino Uno is widely used in robotics, from simple line followers to complex
autonomous robots.
3. IoT: Used in Internet of Things (IoT) projects, such as sensor networks and smart devices.
# Advantages:
1. Low Cost: Arduino Uno is an affordable board, making it accessible to hobbyists and students.
2. Easy to Learn: Simple and intuitive interface makes it easy to learn and use.
3. Large Community: Active community provides many resources, libraries, and support.
# Disadvantages:
1. Limited Processing Power: ATmega328P microcontroller has limited processing power
compared to more modern microcontrollers.
2. Limited Memory: 32 KB Flash and 2 KB SRAM may be limiting for complex projects.
38
Figure: 4.1(5) LCD Display 16X2
6. Jumper Wires
A jumper wire is a type of electrical wire used to connect two or more points on a circuit board,
breadboard, or other electronic device. Jumper wires are typically used to:
# Characteristics:
1. Insulated: Jumper wires are typically insulated with a plastic or rubber coating to prevent electrical
shock or short circuits.
2. Flexible: Jumper wires are often flexible, making them easy to bend and route around other
components.
3. Color-Coded: Jumper wires may be color-coded to indicate their purpose or function.
# Uses:
1. Prototyping: Jumper wires are often used in prototyping to quickly connect and disconnect
39
components.
2. Debugging: Jumper wires can be used to debug circuits by temporarily connecting or
disconnecting components.
3. Repair: Jumper wires can be used to repair damaged or broken circuits.
4. Education: Jumper wires are often used in educational settings to teach electronics and circuit
design.
# Advantages:
1. Convenient: Jumper wires provide a convenient way to connect and disconnect components.
2. Flexible: Jumper wires can be easily bent and routed around other components.
3. Cost-Effective: Jumper wires are often less expensive than other types of connectors or cables.
# Disadvantages:
1. Limited Current Capacity: Jumper wires may have limited current capacity, making them
unsuitable for high-power applications.
2. Noise Susceptibility: Jumper wires can be susceptible to electrical noise, which can cause errors or
malfunctions.
3. Security: Jumper wires can be easily disconnected or tampered with, which can compromise the
security of a circuit or system.
A piezo buzzer is a type of electronic device that produces sound waves using a piezoelectric
material. It is commonly used in various applications, including:
# How it Works:
1. Piezoelectric Material: The piezo buzzer contains a piezoelectric material, such as ceramic
or crystal, that generates an electric charge when subjected to mechanical stress.
2. Voltage Application: When a voltage is applied to the piezoelectric material, it vibrates,
producing sound waves.
3. Sound Production: The vibrating piezoelectric material produces sound waves, which are
amplified by a resonator or horn.
# Characteristics:
1. Low Power Consumption: Piezo buzzers consume low power, making them suitable for
battery-powered devices.
2. High Sound Pressure: Piezo buzzers can produce high sound pressure levels, making them
suitable for applications where loud sounds are required.
3. Compact Size: Piezo buzzers are often compact and lightweight, making them suitable for
use in small devices.
# Applications:
1. Alarm Systems: Piezo buzzers are used in alarm systems to produce loud sounds.
2. Timers and Clocks: Piezo buzzers are used in timers and clocks to produce audible signals.
3. Toys and Games: Piezo buzzers are used in toys and games to produce sound effects.
4. Medical Devices: Piezo buzzers are used in medical devices, such as blood pressure
monitors and insulin pumps.
5. Industrial Applications: Piezo buzzers are used in industrial applications, such as
machinery and equipment.
# Advantages:
1. Low Cost: Piezo buzzers are relatively inexpensive compared to other types of sound-
producing devices.
2. High Reliability: Piezo buzzers are highly reliable and have a long lifespan.
3. Easy to Use: Piezo buzzers are easy to use and require minimal circuitry.
# Disadvantages:
1. Limited Frequency Range: Piezo buzzers have a limited frequency range, which can limit
their use in certain applications.
41
2. Sensitivity to Temperature: Piezo buzzers can be sensitive to temperature changes, which
can affect their performance.
3. Limited Sound Quality: Piezo buzzers can produce a limited sound quality, which can be a
disadvantage in certain applications.
Connect the first 6 pins of the keypad to the six analog pins of Arduino Uno. Connect the last two
pins to digital pins 2 and 3 on the Arduino board.
Connect pin 1 (VSS) on the LCD, to GND on the Arduino.
Connect pin 2 (VDD), to the 5V pin on the Arduino.
Connect pin 3 (V0), to the middle of the 10k potentiometer and connect the other two pins on the
potentiometer to 5V and GND on the Arduino.
Connect pin 4 (RS), to pin 7 on the Arduino.
Connect pin 5 (R/W), to the GND pin on the Arduino.
Connect pin 6 (ENABLE), to pin 6 on the Arduino.
Connect pins 11, 12, 13, and 14 (data pins) to pins 5, 4, 3, and 2 on the Arduino.
Connect pin 15, which is the LCD’s backlight pin, to 5V on the Arduino through the 220-ohm
resistor.
Connect pin 16 on the Arduino, which is the negative pin of the backlight, to GND on the Arduino.
42
Now we will connect the DC lock directly to the Arduino. But the lock requires more than 5 volts so
we will need to connect a relay in between the lock and the Arduino.
Connect the signal pin of the relay to Arduino pin 10. connect the VCC and GND to 5V and GND to
Arduino.
Connect the positive terminal of the battery to the positive terminal of the door lock and the negative
terminal.
43
4.2.1 Flow Chart
Flowchart Steps:
1. Start
If Code is Correct:
Lock Again
If Code is Incorrect:
Clear Input
44
Figure: 4.2.1 Flowchart
45
4.2.2 Pin Connection
Here's an explanation of the pin connections for a digital lock door using Arduino
Uno:
- Keypad:
- LCD Display:
- Servo Motor:
- VCC: 5V
- GND: GND
- Signal: Digital Pin A5
- Buzzer:
- VCC: 5V
46
- GND: GND
- Signal: Digital Pin A4
- LEDs:
Notes:
- Make sure to connect the keypad, LCD display, servo motor, buzzer, and
- LEDs to the correct digital and analog pins on the Arduino Uno.
- Use a breadboard to connect the components and make it
47
Chapter 5
Software Description
The digital keypad lock software with audio functionality is designed to provide an additional layer
of security and convenience. The software utilizes the Arduino platform IDE, Making the circuit
digram on kikad software and integrates audio features using a speaker or buzzer.
Main Features:
1. Code Editor:
2. Verify/Compile Button:
3. Upload Button:
4. Serial Monitor:
Lets you see data coming from the Arduino (useful for debugging or reading sensor data).
Allows you to select the type of Arduino board and the correct USB port for communication.
How it Works:
48
1. You connect your Arduino to your computer via USB.
49
2. Ki-Cad Software:
What is KiCad?
KiCad is a free, open-source software used for electronic design automation (EDA). It helps
you design schematics and Printed Circuit Boards (PCBs).
1. Schematic Editor:
Access thousands of electronic components with accurate symbols and physical footprints.
Convert your schematic into a real PCB layout, placing and routing components on a
board.
4. 3D Viewer:
50
1. Create a new project.
51
Figure: 5.1(2) Ki Cad Software
1. Arduino IDE
Development environment where you write and upload code to the Arduino Uno.
2. Libraries
#include <Keypad.h>
#include <LiquidCrystal.h>
52
#include <EEPROM.h>
Debounces keypresses.
b. Password Verification
c. Lock Control
d. Feedback Display
#include <Keypad.h>
#include <LiquidCrystal.h>
#include <EEPROM.h>
// Setup keypad
// Setup LCD
// Define password and input buffer
// Setup lock output pin
void setup() {
// Initialize LCD, keypad, and lock
}
void loop() {
// Read keypad input
// Update input buffer
// Compare to password
// Provide feedback and control lock
1. Start
2. Initialize System
Once the number of entered digits matches the length of the stored password:
If not:
The input buffer is compared to the correct password (stored in the code or EEPROM).
8. Is Password Correct?
If YES:
55
Activate the lock mechanism (e.g., open the door using a servo or turn off the relay).
If NO:
Optionally:
9. Loop Back
It continuously returns to the passcode entry step, waiting for the next user input.
#include <Servo.h>
#include <LiquidCrystal_I2C.h>
#include <Keypad.h>
#ifndef PASSWORD_H
#define PASSWORD_H
56
#define MAX_PASSWORD_LENGTH (20)
class Password {
public:
/**
* @param pass
*/
Password(char* pass);
/**
57
* @param pass
*/
/**
* @param pass
* @return true
* @return false
*/
/**
* @param character
* @return true
* @return false
*/
58
bool append(char character);
/**
*/
void reset();
/**
* @return true
* @return false
*/
bool evaluate();
//char* getPassword();
//char* getGuess();
//operators
59
/**
*/
/**
*/
/**
*/
/**
*/
private:
60
char* target;
byte currentIndex;
};
#endif
Password::Password(char* pass) {
set(pass);
reset();
byte i = 0;
i++;
return evaluate();
if (currentIndex + 1 == MAX_PASSWORD_LENGTH) {
return false;
} else {
guess[currentIndex++] = character;
return true;
void Password::reset() {
62
currentIndex = 0;
guess[currentIndex] = STRING_TERMINATOR;
bool Password::evaluate() {
return true; // both strings ended and all previous characters are
equal
(STRING_TERMINATOR == guessed)) {
63
pass = target[i];
guessed = guess[i];
set(pass);
return *this;
append(character);
return *this;
64
}
#define buzzer 11
Servo servo;
byte a = 5;
byte maxPasswordLength = 6;
65
byte currentPasswordLength = 0;
char keys[ROWS][COLS] = {
};
66
void setup() {
Serial.begin(9600);
pinMode(buzzer, OUTPUT);
servo.attach(10);
servo.write(40);
lcd.init();
lcd.backlight();
lcd.setCursor(3, 0);
lcd.print("WELCOME TO");
lcd.setCursor(0, 1);
delay(3000);
lcd.clear();
void loop() {
67
lcd.setCursor(1, 0);
lcd.print("ENTER PASSWORD");
if (key != NO_KEY) {
delay(60);
if (key == 'C') {
resetPassword();
if (value == true) {
doorlocked();
value = false;
dooropen();
value = true;
} else {
processNumberKey(key);
68
}
lcd.setCursor(a, 1);
lcd.print("*");
a++;
if (a == 11) {
a = 5;
currentPasswordLength++;
password.append(key);
if (currentPasswordLength == maxPasswordLength) {
doorlocked();
dooropen();
69
}
void dooropen() {
if (password.evaluate()) {
digitalWrite(buzzer, HIGH);
delay(300);
digitalWrite(buzzer, LOW);
servo.write(40);
delay(100);
lcd.setCursor(0, 0);
lcd.print("CORRECT PASSWORD");
lcd.setCursor(0, 1);
lcd.print("DOOR OPENED");
delay(2000);
lcd.clear();
a = 5;
} else {
70
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);
delay(2000);
lcd.clear();
71
a = 5;
resetPassword();
void resetPassword() {
password.reset();
currentPasswordLength = 0;
lcd.clear();
a = 5;
void doorlocked() {
if (password.evaluate()) {
digitalWrite(buzzer, HIGH);
delay(300);
digitalWrite(buzzer, LOW);
72
servo.write(170);
delay(100);
lcd.setCursor(0, 0);
lcd.print("CORRECT PASSWORD");
lcd.setCursor(2, 1);
lcd.print("DOOR LOCKED");
delay(2000);
lcd.clear();
a = 5;
}
else {
digitalWrite(buzzer, HIGH);
delay(200);
digitalWrite(buzzer, LOW);
delay(200);
digitalWrite(buzzer, HIGH);
delay(200);
digitalWrite(buzzer, LOW);
delay(200);
73
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);
delay(2000);
lcd.clear();
a = 5;
}
resetPassword();
}
74
75
Chapter 6
Applications
Overview
A digital keypad lock replaces traditional keys with a secure passcode system, managed by an
Arduino Uno. It enhances home safety by allowing only authorized access.
Main Components
4. LCD Display (optional) – Shows messages like “Enter Code” or “Access Denied”.
How It Works:-
1. Initialization:
2. User Input:
The user types a 4-digit (or more) passcode using the keypad.
3. Password Verification:
The Arduino compares the entered code with the stored one.
76
4. Access Control:
If correct:
If incorrect:
After 3 wrong attempts, the system may lock out for a few seconds.
Advantages
Expandable: Can be connected with IoT modules for remote control or notifications.
77
6.2 Office or Lab Access Control:
A digital lock keypad system using Arduino Uno can be implemented to control access to offices,
laboratories, or restricted areas. This system ensures that only authorized personnel can enter by
entering a valid passcode on a keypad.
1. System Components
Hardware:
4. LCD Display (16x2) (Optional) – Displays instructions and messages like “Enter Code” or
“Access Granted.”
6. EEPROM (Optional) – Stores the passcodes permanently, even after power loss.
3. How It Works
The system compares the entered code with the stored passcodes.
The door unlocks (servo motor rotates or relay activates the electric lock).
78
The LCD displays "Access Granted".
After a few seconds, the system automatically locks the door again.
If multiple incorrect attempts are made, the system locks out temporarily to prevent unauthorized
access.
Multiple User Support: Each employee or lab personnel can have a unique passcode stored in
EEPROM.
Logging and Monitoring: The system can be connected to an IoT module (ESP8266/NodeMCU) to
track access logs remotely.
RFID Compatibility: RFID cards can be used along with keypads for enhanced security.
3. Real-Life Applications
School/University Labs: Prevents unauthorized students from accessing science or computer labs.
4. Advantages
79
6.3 Personal Safe:
A personal safe using a digital lock keypad and Arduino Uno provides a secure way to store valuable
items. The system ensures that only individuals with the correct passcode can unlock the safe,
replacing traditional keys with a digital solution.
1. System Components
Hardware Components:
1. Arduino Uno – The brain of the safe, processing input and controlling the lock.
4. LCD Display (Optional) – Shows messages like "Enter Code" or "Access Granted."
5. Buzzer (Optional) – Alerts when incorrect passcodes are entered multiple times.
2. How It Works
The Arduino powers up, and the LCD (if used) displays: "Enter Passcode."
The system compares the entered code with the stored passcode.
The servo motor rotates to unlock the safe OR the solenoid lock releases.
80
The safe remains open for a few seconds before automatically locking again.
If multiple incorrect attempts are made, the system may enter a lockout mode (temporary disabling
for a few minutes).
Alarm System: If too many incorrect attempts occur, a buzzer sounds or an alert is sent via an IoT
module (Wi-Fi/GSM).
Battery Backup: Ensures the system works even if the power is lost.
4. Real-Life Applications
Portable Security Box: Can be placed in vehicles or bags for secure transportation of valuables.
5. Advantages
81
Chapter 7
Conclusion and Future Scope
7.1 Conclusion
The digital lock keypad system developed using the Arduino Uno has proven to be an
effective and practical solution for basic security needs. Through this project, we
implemented a password-protected system that allows access only when the correct
passcode is entered via a 4x4 keypad. When the user inputs the right password, the
Arduino processes the signal and triggers an action—such as unlocking a door (simulated
by an LED or servo motor). If the wrong password is entered, the system denies access
and may display a warning message or activate a buzzer. Using Arduino Uno
successfully demonstrates a low-cost, efficient, and reliable method for securing access to
restricted areas. By integrating a keypad, LCD display, and basic electronic components,
we were able to develop a user-friendly interface that allows users to input a passcode and
control access with ease. The project showcases the practical application of Arduino
programming, digital input/output handling, and security logic implementation. This
system can be further enhanced with features such as EEPROM password storage, a
buzzer for wrong attempts, or even biometric integration for added security. Overall, this
project reflects the potential of microcontrollers in real-world security systems and offers
a strong foundation for further development in embedded systems and IoT-based access
control solutions.
This project allowed us to explore and understand several important concepts in electronics
and embedded systems:
1. Microcontroller Programming: We used the Arduino Uno to control the entire system. This
involved writing code to read keypad input, compare it with a predefined password, and
respond accordingly.
2. Input Handling: The 4x4 keypad required proper scanning and reading logic, teaching us
how matrix keypads work and how to manage user input effectively.
3. Output Display: An LCD module (usually 16x2) was used to give real-time feedback to the
user, like prompting for a password or confirming access, which improved user
interaction.
4. Security Logic: The project highlighted the importance of conditional checks and logic
82
implementation in creating secure systems. Features like password matching, limited
attempts, and feedback on errors were important learning points.
4. Practical Application: This project simulates a real-world digital lock system and can be used
in places like lockers, doors, safes, or any access-controlled environment. It can easily be
upgraded with additional features like EEPROM storage (for saving the password), GSM
modules (for remote alerts), or biometric sensors.
5. Key Takeaways:
The Arduino Uno serves as the main controller, processing user input and controlling the lock
mechanism. A 4x4 or 4x3 keypad enables PIN input, ensuring access control. A servo motor or
solenoid lock acts as the locking mechanism. Additional features such as an LCD display,
buzzer, and LED indicators can enhance usability.
The system can be improved by adding EEPROM storage, RFID, fingerprint sensors, or IoT
connectivity for remote access.
This project demonstrates how microcontrollers can be used for real-world security applications.
It can be further customized for different security needs, making it a practical solution for homes,
offices, or restricted areas.
Overall, this project demonstrated the capabilities of the Arduino Uno in building simple yet
functional security systems. It also served as a hands-on learning experience in hardware
interfacing, coding, and system design. With further enhancements, the system can be made more
robust, scalable, and suitable for real-world deployment.
83
7.2 Future Scope
The digital lock keypad using Arduino Uno is a basic prototype that showcases how
microcontroller-based security systems can be implemented. While the current system is
functional and demonstrates the core concept of password-protected access, there is
significant potential to enhance this project with advanced features and make it more
applicable for real-world use. Below is a detailed explanation of the possible future
developments:
Current Limitation: The password is stored in the program memory, and it resets if the
Arduino is restarted.
Benefit: Biometric verification increases security as it is unique for each user. This can be
used in high-security areas like lockers, offices, or data centers.
Upgrade Idea: Use modules like HC-05 (Bluetooth), ESP8266 or NodeMCU (Wi-Fi).
Benefit: Enables remote access through mobile apps, and can be connected to cloud
platforms for real-time monitoring, control, and data logging. Useful for home automation
and smart security systems.
84
4. GSM Module for Real-Time Alerts
Upgrade Idea: Integrate a GSM module (like SIM800L) to send SMS alerts.
Benefit: In case of multiple wrong password attempts or unauthorized access, the system
can send alert messages to the owner’s mobile number. This is useful for remote or
unattended locations.
Upgrade Idea: Add an RTC module (like DS3231) to implement time-based access
control.
Benefit: Access can be restricted to certain time windows (e.g., 9 AM to 5 PM), and
entries can be time-stamped. This is helpful in offices and shared workspaces.
6. Touchscreen Interface
Upgrade Idea: Replace the physical keypad with a touchscreen display (like a TFT or
OLED).
Benefit: Improves the user interface and enables on-screen password input, password
changes, and menu navigation.
Benefit: Ensures the lock functions even during power outages. Power management
features can be added to optimize battery usage.
Upgrade Idea: Store access records (who accessed and when) using SD card module
or cloud-based logging.
85
Upgrade Idea: Assign unique passcodes or ID cards to different users.
Benefit: Enables role-based access where certain users get different levels of control.
Useful in workplaces and shared accommodations.
Upgrade Idea: Make the digital lock a part of a home automation system.
Benefit: The lock can work with other smart devices like surveillance cameras, lights, and
alarms. Unlocking the door could trigger lights, disable the alarm, or send a notification.
These future improvements make the digital lock keypad system more secure, flexible,
and user-friendly. They also align with modern trends in IoT, home automation, and
smart security. With these upgrades, the simple Arduino-based project can evolve into a
full-featured commercial product suitable for homes, offices, and industries.
86
7.1.1 References
The digital lock keypad project using Arduino Uno was developed using a combination of
practical experimentation, online learning resources, datasheets, and Arduino libraries.
Below is a detailed list of references categorized by type:
Datasheets, example codes, and documentation for the Arduino Uno board and related
libraries.
Used for scanning and reading key presses from the 4x4 matrix keypad.
87
Used to interface the 16x2 LCD display with the Arduino Uno.
Can be used for saving the password permanently across resets (if implemented).
Explained the logic behind comparing entered values with stored passwords and
triggering output actions like unlocking a door.
URL: https://circuitdigest.com
Provided a circuit diagram and source code for a basic keypad lock system.
URL: https://www.instructables.com
Offered step-by-step guidance for beginners, including component lists and sample codes.
88
Understanding how matrix keypads work and how to wire them properly.
Used to clarify bugs in code and get suggestions on improving security logic.
Helpful for understanding errors and optimizing code for better performance.
Conclusion on References
These resources collectively supported the design, coding, and implementation of the
digital lock keypad system. They provided both theoretical understanding and practical
examples, making it easier to troubleshoot issues and enhance the project with additional
features.
89
7.2.2 Data Sheets
1. Arduino Uno – Datasheet Overview
Microcontroller: ATmega328P
Operating Voltage: 5V
Flash Memory: 32 KB
SRAM: 2 KB
EEPROM: 1 KB
Controls all operations of the lock system (input from keypad, processing password, output to LCD
or servo motor).
Output Type: Matrix format (each key press connects a unique row and column)
The Keypad library scans each row and column to detect which key is pressed.
90
3. 16x2 LCD Display (HD44780 or compatible) – Datasheet Overview
Operating Voltage: 5V
Usage in the Project: Simulates door unlocking when the correct password is entered.
The Servo library is used to send the PWM signal from the Arduino.
91
Current Consumption: Low (20–30 mA)
Size: 1 KB
Used to store passwords permanently so they’re not lost when the Arduino restarts.
Conclusion
Datasheets provide critical specifications like voltage levels, current limits, pin configurations, and
communication protocols. Proper understanding of these ensures safe connections, avoids component
damage, and enables effective programming. Every major component in your digital lock project has
a datasheet that acts like its technical manual.
92
THANK
YOU
93