0% found this document useful (0 votes)
17 views8 pages

YASH Mini Project

This document describes a password-based door locking system mini-project created using Arduino. The system uses a keypad to enter a password, which is checked against a predefined password. If correct, a servo motor unlocks the door and a green LED turns on. If incorrect after 3 tries, a buzzer sounds and access is denied. The project aims to provide basic electronic security to a door using a microcontroller.

Uploaded by

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

YASH Mini Project

This document describes a password-based door locking system mini-project created using Arduino. The system uses a keypad to enter a password, which is checked against a predefined password. If correct, a servo motor unlocks the door and a green LED turns on. If incorrect after 3 tries, a buzzer sounds and access is denied. The project aims to provide basic electronic security to a door using a microcontroller.

Uploaded by

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

Control Systems mini

projects

Control System
BACHELORS OF TECHNOLOGY
(Electronics and Communication)

NSUT EAST CAMPUS


Formerly(AIACTR)

Submitted To-:Dr. Richa Bhatia


Submitted by-: Yash
ENROLL NO-:08310102819
SEMESTER-: FIFTH
CLASS-:ECE-2
---------------------------------------------------------------------------
Mini-Project
---------------------------------------------------------------------------
AIM: Password Based Door Locking System using Arduino
---------------------------------------------------------------------------
Software Used : Proteus 8 Professional and Arduino 1.8.13

---------------------------------------------------------------------------
1. MATERIALS USED

1 Arduino UNO
2 LCD
3 Membrane Keypad
4 Servo Motor
5 Buzzer
6 Potentiometer
7 GSM Module

---------------------------------------------------------------------------
2. INTRODUCTION

Password Based Door Lock System is designed using ARDUINO UNO


where in once the correct code or password is entered, the door is opened and the
concerned person is allowed access to the secured area.
Password Based Door Lock System using Arduino UNO is a simple project where a secure
password will act as a door unlocking system.
Old fashioned lock systems use mechanical locking and these can be replaced by new
advanced techniques of locking systems. These methods are a combination of mechanical
and electronic devices and are highly intelligent.

One of the distinct features of these intelligent lock systems is their simplicity and high
efficiency. Such an automated lock system consists of electronic control assembly, which
controls the output load through a password.
The example of this output load can be a motor or a lamp or any other
mechanical/electrical load. Here, we made an electronic code lock system using Arduino
UNO, which provides control to the actuating the load. It is a simple embedded system with
takes input from the keyboard and the output being actuated accordingly.

This system demonstrates a Password based Door Lock System using Arduino UNO, wherein
once the correct code or password is entered, the door is opened and the concerned person
is allowed access to the secured area.
If another person arrives, it will ask to enter the password again. If the password is wrong,
then door would remain locked, denying access to the person.

Main idea behind this project is of a door-latch opening using a password entered through
keypad. As well as turning on the Buzzer when passcode is entered wrong for multiple times.
User can modify this password anytime he/she wishes using a keypad.

The main component in the circuit is Arduino UNO which is basically used to send a text
message to owner of the house about the breach of security.4*4 keypad is used to enter the
password. The entered password is compared with the known password. If it is correct
password, the system opens the door by servo motor and displays the status of door on LCD.
If the password is wrong then door remains closed and displays “WRONG PASSWORD” on
LCD.

---------------------------------------------------------------------------
3. METHODOLOGY

Initially the password is known. When the device is turned on, it resets the servo angle to
lock the door. Now the user is prompted to enter the password. The user enters the
passcode through a keypad which is read by the Arduino. Now the entered password is
checked with the known password. If the password matches, then the servo motor deflects
and the door unlocks for 10 seconds else the buzzer beeps indicating the invalidity of the
password. Owner do gets the information too about the locking and unlocking of door
through SMS sent to his smart phone by GSM modem. After 3 wrong attempts, the system
automatically gets locked showing “NO MORE TRIALS ACCESS DENIED”. Now, the password
won’t be entered through keypad but only the owner who knows some pre-defined code
will be able to unlock or lock the door through SMS sent by his phone to the sim which is
connected in GSM modem.

---------------------------------------------------------------------------
4. Arduino Code

#include<Keypad.h>
#include <Wire.h>
#include <LiquidCrystal_I2C.h>

LiquidCrystal_I2C lcd(0x3F,20,4);

char keys[4][3]={
{'1','2','3'},
{'4','5','6'},
{'7','8','9'},
{'*','0','#'}};

byte rowPin[4]={6,7,8,9};
byte colPin[3]={3,4,5};

String password = "123";


int position = 0;

int wrong = 0;

int redPin = 10;


int greenPin = 11;
int buzzer = 12;

Keypad keypad=Keypad(makeKeymap(keys),rowPin,colPin,4,3);

int total = 0;

void setup()
{

pinMode(redPin,OUTPUT);
pinMode(greenPin,OUTPUT);
pinMode(buzzer, OUTPUT);

lcd.init(); //lcd startup


lcd.init();
lcd.backlight();
lcd.print(" 4x3 Keypad ");
lcd.setCursor(0,1);
lcd.print(" Locking System ");
lcd.setCursor(0,2);
lcd.print(" By: ");
lcd.setCursor(0,3);
lcd.print(" YASH(083) ");
delay(3000);
lcd.clear();
setLocked(true);
delay(20);
}

void loop()
{

lcd.clear();
lcd.print(" Enter Unlock Code: ");
delay(100);

char pressed=keypad.getKey();
String key[3];

if(pressed)
{
lcd.clear();
lcd.print(" Enter Unlock Code: ");
lcd.setCursor(position,2);
lcd.print(pressed);
delay(500);
if(pressed == '*' || pressed == '#')
{
position = 0;
setLocked(true);
lcd.clear();
}

else if(pressed == password[position])


{
key[position]=pressed;
position++;
}

else if (pressed != password[position] )


{
wrong++;
position ++;
}

if(position == 3){
if( wrong >0)
{
total++;
wrong = 0;
position = 0;
lcd.clear();
lcd.setCursor(0,2);
lcd.print(" Wrong Code! ");
delay(1000);
setLocked(true);
}

else if(position == 3 && wrong == 0)


{
position = 0;
wrong = 0;
lcd.clear();
lcd.setCursor(0,1);
lcd.print(" Welcome! ");
lcd.setCursor(5,2);
lcd.print(" Door Open");
setLocked(false);
delay(2000);
}

if(total ==3)
{
total=0;
buzzer_beep();
delay(500);
}

void setLocked(int locked)


{
if (locked)
{
digitalWrite(redPin, HIGH);
digitalWrite(greenPin, LOW);
delay(1000);
}
else
{
digitalWrite(redPin, LOW);
digitalWrite(greenPin, HIGH);
delay(1000);
}
}
void buzzer_beep()
{
lcd.clear();
lcd.setCursor(0,1);
lcd.print(" WARNING !!!! ");
lcd.setCursor(0,2);
lcd.print(" Access Denied");
while(1)
{
digitalWrite(buzzer,HIGH);
delay(1000);
digitalWrite(buzzer,LOW);
delay(1000);
}
}

---------------------------------------------------------------------------
RESULTS:
 The LCD displays the user “ENTER PASSWORD”. The entered password is displayed
as characters on the LCD.
 The user has entered the correct password and the LCD shows “ACCESS GRANTED”
on the LCD

---------------------------------------------------------------------------

You might also like