Skip to main content

Digital Keypad Security Door Lock

Digital Keypad Security Door Lock using Arduino

Hi everyone, welcome to another blog tutorial,in this tutorial I will teach you how tomake this password enabled entry.


Components:

  • 4X4 matrix keypad
  • membrane keypad
  • 16X2 LCD
  • Arduino
  • Servo Motor
  • Connecting Wires
  • Potentiometer

Circuit Diagram:


Description:

I'm using as an improvised enclosure and this is the door, this is a 4X4 matrix keypad, membrane keypad, this is a 16X2 LCD.So, what this system does is this, like I said it’s a password enabled entry, so, I programmed the system with Arduino, so,when you enter the wrong password using this 4 by 4 matrix keypad the door will not open and the password you entered will be displayed on this LCD, but once you enter the right password, the door will open, then it will remain open for 5 and then close. So, the components or for the parts I usedin the design you can see here I have a motor driver this is a motor driver to drive the motor that opens and closes the door, this is a potentiometer to vary the brightness of the LCD. Here I have an Arduino Uno and I have an I2 CLCD module, I2C module, and here I have a DVD tray, so this tray is serving as the electronic door, it has a motor DC motor, It’s already closed, so, when it is working, this tray will move in this direction and open and when it is to be closed, it will go back to its previous position. I have the 4 by 4 matrix membrane keypad and a liquid crystal display. I have connected it; everything is fine all need to do now is to upload the Arduino code and we will test how the system works so to keep Reading. Alright, I have uploaded the code to the Arduino board and it's good to go, so all I will do now is to enter the password.
Now I programmed it with the password 3142,3142, so, once I enter the right password, I expect this door to open and once I enterthe wrong password, I don't expect it to open. So, let me start by entering the right password first 3-1-4-2, open, you can see it’s open, access granted and then after 5 seconds it closes then, if I enter it again, 3-1-4-2, open,access granted, and then it closes, but if I enter the wrong password, let’s say3-2-5-4 access denied, enter password, 1-4-7-8, access denied, A-B-C-D, access denied, #-*-0-*,access denied, 3-6-9-8, access denied, 4-5-2-1, access denied, 7-8-0-8, anything you entered that is not that right password it will not open, but once you enter the right password,which is 3-1-4-2, Access granted So, it is working perfectly.

Code:

#include <Wire.h> 
#include <LiquidCrystal_I2C.h>
#include <Keypad.h>
#define Password_Length 5 
int signalPin1 = 10;
int signalPin2= 11; 

char Data[Password_Length]; 
char Master[Password_Length] = "3142"; 
byte data_count = 0, master_count = 0;
bool Pass_is_good;
char customKey;

const byte ROWS = 4;
const byte COLS = 4;

char hexaKeys[ROWS][COLS] = {
  {'1', '2', '3', 'A'},
  {'4', '5', '6', 'B'},
  {'7', '8', '9', 'C'},
  {'*', '0', '#', 'D'}
};
byte rowPins[ROWS] = {9, 8, 7, 6};
byte colPins[COLS] = {5, 4, 3, 2};
Keypad customKeypad = Keypad(makeKeymap(hexaKeys), rowPins, colPins, ROWS, COLS);
LiquidCrystal_I2C lcd(0x27, 16, 2);  
void setup(){
  lcd.init(); 
  lcd.backlight();
  pinMode(signalPin1, OUTPUT);
  pinMode (signalPin2, OUTPUT);
}
void loop(){
  lcd.setCursor(0,0);
  lcd.print("Enter Password:");
   customKey = customKeypad.getKey();
  if (customKey){
    Data[data_count] = customKey; 
    lcd.setCursor(data_count,1); 
    lcd.print(Data[data_count]); 
    data_count++; 
    }
   if(data_count == Password_Length-1){
    lcd.clear();

    if(!strcmp(Data, Master)){
      lcd.print("Access Granted");
      digitalWrite(signalPin1,  LOW);
      digitalWrite(signalPin2,HIGH); 
      delay(5000);
      digitalWrite(signalPin1, HIGH);
      digitalWrite(signalPin2,LOW); 
      }
    else{
      lcd.print("Access Denied");
      delay(1000);
      }
    
    lcd.clear();
    clearData();  
  }
}
void clearData(){
  while(data_count !=0){
    Data[data_count--] = 0; 
  }
  return;
}
Now this is to tell you that it is very easy to deign this project, this gives you a basic understanding of how all those smart doors work, all those smart doors that use password enabled entry technology, this is basically how they work. I can scale up this design to control a normal door or a safe box, or anything I want to enable with a password I can do that withthis setup. So, this is how the system works, everythingis fine,the code is given below, visit our website you will find other projects we’ve designed that are Very Wonderful and are very educating .Someone who saw when I was designing the project asked me to incorporate a sensor here so that the sensor will monitor when there is an obstructionas the door is closing, because the door opens very fast and closes fast as well, so, if someone is caught at this end when the door is closing it might be a problem, so, the person asked me to incorporate a sensor that will monitor if there is an obstruction on the way as door is closing , and then if such is the case, then the Arduino should pick the information and tell the door to go back and then wait for another 5 seconds and then closes again, so, I’m thinking of incorporating that very part to this design, so, if you like this project share it with your friends and leave a comment. Thanks for watching and see you in the next tutorial. 

Stay Home Stay Safe!!!

Comments

Post a Comment

If you have any doubts ,Please let me know.

amazon banner

Popular posts from this blog

Motion Detector Camera

Motion Detector With Photo Capture Camera   Hello friends!! Welcome to This Blog. In this Blog, we will make a motion sensor detector with photo capture using ESP32CAM and the PIR module. The logic behind is when the PIR sensor detects any motion, the ESP32CAM will start taking the pictures. So you can use this project as a security camera. In thisblog, I will share the circuitdiagram, Arduino sketch, and the component list, so after reading the complete article you can easily make this project. Now ESP32 CAM is a small camera module that has ESP32S chip on the back and some GPIO pins to connect peripherals and it also has a micro-SD card slot, where you can insert the micro-SD card and store the pictures. Now before going to the circuit diagram and Arduino sketch, let me give you a quick overview of this project.  Components Required ESP32-CAM  PIR Motion Sensor Module BC547 NPN Transistor 220ohm, 1k, 10k Resistor. LED 5-mm FTDI 232 USB to Serial Interface board 5 volt DC supply  The

Bidirectional Visitor Counter

Bidirectional Visitor Counter using Arduino A bidirectional visitor counter using Arduino may be a reliable circuit that takes over the task of counting variety of Persons/Visitors within the Room very accurately. if somebody enters into the space then the Counter is incremented by one and also leaves it might be incremented. MATERIALS REQUIRED: Arduino IR Module 16*2 LED 5V Relay Resistor(1K,220 ohm) Breadboard Jumper Wires The total number of persons inside the space is Shows on the 16X2 LCD module. The microcontroller does the work it receives the signals from the sensors, and this signals operated under the control of software which is stored in EPROM of Arduino. There are two IR Modules are used. first, one are often wont to count the amount of persons entering a hall within the up mode at the doorway gate. and therefore the other can count the amount of persons leaving the hall by decrementing the count at the exit gate. In this Project will helps to Wastage of electricity. In ou