PRATHYUSHAENGI
NEERING COLLEGE
(An Autonomous Institution)
DEPARTMENT OF COMPUTER SCIENCE AND
ENGINEERING
ACADEMIC YEAR: 2024-2025
YEAR/SEM: III/VI
COURSE CODE/NAME: CS3691/EMBEDDED SYSTEMS AND IOT
MINI PROJECT REPORT
ON
IOT-BASED SMART DOOR LOCK SYSTEM
SUBMITTED
BY
111422104026-DEEPA P
111422104027-DEVIPRASAD O
111422104028-DHARANI S
111422104029-DHEEPPTHASHREE S
PRATHYUSHA
ENGINEERING COLLEGE
(An Autonomous Institution)
DEPARTMENT OF COMPUTER SCIENCE AND
ENGINEERING
BONAFIDE CERTIFICATE
Certified that this project report entitled “Iot-based Smart door lock system” is the
bonafied work of
111422104026-DEEPA P,111422104027-DEVIPRASAD O,
111422104028-DHARANI S,111422104029-DHEEPPTHASHREE S
who carried out the project work as part of the course CS3691/EMBEDDED SYSTEMS
AND IOT.
TABLE OF CONTENT
[Link] Content Page No
1 ABSTRACT
2 OBJECTIVE & SCOPE
3 INTRODUCTION
SYSTEM REQUIREMENTS
4 • HARDWAREREQUIREMENT
• SOFTWARAE REQUIREMENT
5 CIRCUIT DIAGRAM
CODE
6 • PROGRAM
• OUTPUT
7 CONCLUSION
8 REFERENCES
ABSTRACT:
The Smart Door Lock System using IoT is designed to enhance home security by
allowing access through password authentication. This system utilizes an Arduino
microcontroller, a 4x4 keypad for input, and an LCD display to provide user feedback. It
ensures that only authorized users can unlock the door by entering a valid password.
This low-cost, effective system can be implemented in homes, offices, and restricted
areas.
OBJECTIVE & SCOPE:
The primary scope of this project is to provide a secure, accessible, and user-friendly
locking mechanism. This system prevents unauthorized access and can be integrated
with IoT features such as remote control or alerts. The current version focuses on local
access using a keypad but can be expanded with Wi-Fi or GSM modules for remote
functionalities.
INTRODUCTION:
Security is one of the top priorities in today’s smart world. Traditional lock and key
mechanisms are prone to being lost, copied, or tampered with. A Smart Door Lock
System based on IoT technologies provides improved security and ease of use. This
project implements a digital password-protected lock system using Arduino, which acts
as the brain of the system, taking input from the keypad and displaying results on an
LCD.
SYSTEM REQUIREMENTS:
• HARDWARE REQUIREMENT
Arduino Uno
16x2 LCD Display
4x4 Matrix Keypad
Servo motor (for lock mechanism)
Power supply (USB or battery)
• SOFTWARE REQUIREMENTS:
Arduino IDE
Embedded C for Arduino
CIRCUIT DIAGRAM :
The circuit connects the following:
Keypad: Connects to Arduino digital pins (e.g., 2–9)
LCD Display: Uses digital pins (e.g., 10–13 and A0–A1) with potentiometer for contrast
control
Servo Motor: Connected to pin 3 for lock actuation
Power Supply: 5V supply from USB or adapter
CODE AND OUTPUT
#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;
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() {
[Link](9600);
pinMode(buzzer, OUTPUT);
[Link](10);
[Link](50);
[Link]();
[Link]();
[Link](3, 0);
[Link]("WELCOME TO");
[Link](0, 1);
[Link]("DOOR LOCK SYSTEM");
delay(3000);
[Link]();
}
void loop() {
[Link](1, 0);
[Link]("ENTER PASSWORD");
char key = [Link]();
if (key != NO_KEY) {
delay(60);
if (key == 'C') {
resetPassword();
} else if (key == 'D') {
if (value == true) {
doorlocked();
value = false;
} else if (value == false) {
dooropen();
value = true;
} else {
processNumberKey(key);
}
}
void processNumberKey(char key) {
[Link](a, 1);
[Link]("*");
a++;
if (a == 11) {
a = 5;
currentPasswordLength++;
[Link](key);
if (currentPasswordLength == maxPasswordLength) {
doorlocked();
dooropen();
void dooropen() {
if ([Link]()) {
digitalWrite(buzzer, HIGH);
delay(300);
digitalWrite(buzzer, LOW);
[Link](50);
delay(100);
[Link](0, 0);
[Link]("CORRECT PASSWORD");
[Link](0, 1);
[Link]("DOOR OPENED");
delay(2000);
[Link]();
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);
[Link](0, 0);
[Link]("WRONG PASSWORD!");
[Link](0, 1);
[Link]("PLEASE TRY AGAIN");
delay(2000);
[Link]();
a = 5;
resetPassword();
void resetPassword() {
[Link]();
currentPasswordLength = 0;
[Link]();
a = 5;
}
void doorlocked() {
if ([Link]()) {
digitalWrite(buzzer, HIGH);
delay(300);
digitalWrite(buzzer, LOW);
[Link](110);
delay(100);
[Link](0, 0);
[Link]("CORRECT PASSWORD");
[Link](2, 1);
[Link]("DOOR LOCKED");
delay(2000);
[Link]();
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);
[Link](0, 0);
[Link]("WRONG PASSWORD!");
[Link](0, 1);
[Link]("PLEASE TRY AGAIN");
delay(2000);
[Link]();
a = 5;
resetPassword();
}
OUTPUT
LCD displays “Enter Password”
If correct password is entered, “Access Granted” is shown and lock opens
If wrong password, “Wrong Password” is displayed and lock remains closed
CONCLUSION:
This Smart Door Lock System provides a secure and cost-effective solution for access
control using a password mechanism. It demonstrates the integration of embedded
systems and IoT fundamentals, with further scope for internet-based remote access,
SMS alerts, or mobile app integration for enhanced functionality.
REFERENCES:
Arduino Official Documentation
[Link]
LiquidCrystal Library – Arduino Reference
[Link]
Keypad Library for Arduino
[Link]
Servo Motor Control with Arduino
[Link]
Smart Door Lock System using Arduino (Project Inspiration)
[Link]