Password Based Digital Door Lock Security System Using Arduino and Keypad

Share This

Hello friends! Welcome back to ElectroDuino. This blog is based on Password Based Digital Door Lock Security System Using Arduino,  4×4 Keypad module, and Servo motor. Here we will discuss Introduction to Password-Based Digital Door Lock Security System, Project Concept, Block Diagram, components required, circuit diagram, working principle, and Arduino code.

Introduction

Always we want a personal room, where nobody can’t enter this room without our permission. Nowadays security is the most important thing. So, we need to secure a room at our home and office for protecting our important accessories and documents. For that reason, in this project, we design the Password-Based Digital Door Lock Security System Using Arduino,  4×4 Keypad module, and a Servo motor. This Device is a digital Password or Pin code based Door Lock Security System. Which does not allow the user to open the Dore without entering the correct Password or Pincode.

Project Concept

In this project, we will enter a password using the keypad to open the door lock using servo motor. Password-Based Digital Door Lock Security System is consists of Arduino, 4 x 4 keypad module, servo motor, LCD display, and two switches. The Arduino is the brain of the project, that controls the whole system. Here we will use Arduino nano but you can choose any other version of the Arduino board which is based on the ATmega328. The 4X4 Keypad module is used to type the password or pin. Open button and close buttons are used to open and close the door lock from inside the room. The servo motor is used to push (lock) or pull (unlock) the latch on the door. The LCD display is used to show the message to the user. The buzzer is used for indications.

Block diagram

Component Required

Components NameQuantity
Arduino Nano1
4 x 4 matrix keypad1
SG90 Servo motor1
16 x 2 LCD Display1
Buzzer1
Push Button Switch2
1k Resistor2
9 Volt Power Supply1
Connecting wiresAs per required in the circuit diagram

 We need to download the KeyPad library: CLICK

Circuit Diagram of Digital Door Lock Security System Using Arduino,  4×4 Keypad module, and Servo motor

Password Based Digital Door Lock Security System Using Arduino & Keypad Circuit Diagram
Password Based Digital Door Lock Security System Using Arduino & Keypad Circuit Diagram

Circuit Wiring

Components PinArduino pin

SG90 Servo motor  Vcc,

LCD  Display (Vdd, LED +),

Push Button 1 terminal-1 

Push Button 2 terminal-1

Arduino 5V Pin

SG90 Servo motor  GND,

LCD  Display (Vss, Rw, LED -) pin,

Buzzer terminal-2

GND (ground) Pin
Push Button 1 terminal-3 and Push Button 2 terminal-3Both are connected to GND (ground) Pin through 1k resistor
4 x 4 Keypad module R1, R2, R3, R4, C1, C2, C3, and C4 PinsRespectively  Digital Pin “D2”, “D3”, “D4”, “D5”, “D6”, “D7”, “D8” and “D9”.
LCD  Display RS, E, D4, D5, D6, D7Respectively  Analog Pin “A0”, “A1”, “A2”, “A3”, “A4”, “A5”
LCD  Display V0 pin  10k Potentiometer Signal pin, Potentiometer one pin is connected to 5V and another pin is connected to GND(ground)
SG90 Servo motor  PWM pin
Digital Pin “D10”
Push Button 1 and Push Button 2 data pins are the junction point of the both button’s terminal-2 and resistorRespectively  Digital Pin “D12”, and “D11”
Buzzer terminal-1Digital Pin “D13”
9v Power Supply positive (+) terminalConnected to VIN Pin through a Slide Switch for external DC Power supply to operating Arduino.
9v Power Supply negative (+) terminalGND (ground) Pin

Working of Password-Based Door Lock Security System

Password-Based Door Lock Security System’s working principle is very simple. First of all, we must need to have defined a Password or Pin code in the Arduino code. Here the predefined Pin code is ” 2306 “. Also, define two keypad letters button one is “Enter button” to submit the password or pin code and another one is the “Close button” to lock the Door. Here the “Enter button” is Keypad letters “D” and the “Close button” is Keypad letters “C”.

When we enter a password and submit it using the “Enter button” in the Keypad module. Then Arduino read this password or pin, and match it with the predefined password stored in the Arduino. If the password or pin is matched then the LCD display will show “WELCOME ELECTRODUINO” massage and buzzer make a sound for 1 second. Then Arduino sends a command to the Servo motor to move the shaft at the 180-degree position, now the door is unlocked. When we will press the button “C” then Arduino sends a command to Servo motor to move the shaft at the 90-degree position, now the door is again locked. The LCD display will show “DOOR CLOSE” massage and buzzer make a sound for 1 second.

This circuit is included two push button switches. These are used to open and close the door lock from inside the room. The Pushbutton 1 is used to open (unlock) the door lock and The Pushbutton 2 is used to close (lock) the door lock. Pushbutton 1 and Pushbutton 2 both switch’s terminal 3 are connected to ground through the 1k pulldown resistor for getting stable input. When we will press the “Pushbutton1 ” then Arduino reads the data and sends a command to Servo motor to move the shaft at the 180-degree position, now the door is unlocked. The buzzer makes the sound for 1 second. When we will press the “Pushbutton2 ” then Arduino reads the data and sends a command to Servo motor to move the shaft at the 90-degree position, now the door is again locked. The buzzer makes the sound for 1 second.

Arduino Code for Password-Based Door Lock Security System

 

Share This

Leave a Reply

Your email address will not be published. Required fields are marked *