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
S.No 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() {
Serial.begin(9600);
pinMode(buzzer, OUTPUT);
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') {
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);
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;
} 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();
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();
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);
lcd.setCursor(0, 0);
lcd.print("WRONG PASSWORD!");
lcd.setCursor(0, 1);
lcd.print("PLEASE TRY AGAIN");
delay(2000);
lcd.clear();
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
https://www.arduino.cc/en/Guide
LiquidCrystal Library – Arduino Reference
https://www.arduino.cc/en/Reference/LiquidCrystal
Keypad Library for Arduino
https://playground.arduino.cc/Code/Keypad/
Servo Motor Control with Arduino
https://www.arduino.cc/en/Reference/Servo
Smart Door Lock System using Arduino (Project Inspiration)
https://circuitdigest.com/microcontroller-projects/arduino-based-digital-lock-system