Password protected Door Locking System

Manju S
2 min readSep 29, 2020

--

AIM: Design and Coding for Password protected Door Locking System.

Design Tool : Tinkercad

Abstract: Security is a main concern in our everyday life. Each and every individual needs to feel secure. An access control for doors forms an essential part in our security pattern. Doors locked using conventional locks are not as safe as they used to be, anyone can break in by breaking these locks. We n to make a framework that will give 24/7 benefit. Password based door lock system allows only approved persons to access restricted areas. This system is fully controlled by Arduino. The password can be entered via a keypad. If the password is matched with the stored password in Arduino the door gets open. The security door lock automation system promises a bold step to the future where mechanical door locks will be substituted by electronic door locks.

Components Used:

  1. Arduino Uno R3
  2. Keypad 4x4
  3. 280Ω Resistor (2 no’s)
  4. LED (2 no’s i.e., Red and Green)
  5. Micro Servo

WORKING

  1. The user can enter a password which is suitable to their needs.( I entered password here as BD980)
  2. When the user enter a password, the password is checked.
  3. If the password entered by user matches then the servo motor deflects and the door gets unlocked by blinking Green LED.
  4. If the password entered by user is not matched the door will be in locked state with Red LED blinked.

CIRCUIT DIAGRAM:

CODE:

#include <Servo.h>
#include <Keypad.h>

Servo ServoMotor;
char* password = “BD980”;

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

char keys[ROWS][COLS] ={
{‘1’,’2',’3',’A’},
{‘4’,’5',’6',’B’},
{‘7’,’8',’9',’C’},
{‘*’,’0',’#’,’D’}
};

byte rowPins[ROWS] = {8,7,6,9};
byte colPins[COLS] = {5,4,3,2};

Keypad keypad = Keypad( makeKeymap(keys), rowPins, colPins, ROWS, COLS );

int RedpinLock = 12;
int GreenpinUnLock = 13;
int position = 0;

void setup()
{
pinMode (RedpinLock, OUTPUT);
pinMode (GreenpinUnLock, OUTPUT);
ServoMotor.attach(11);
LockedPosition(true);



}

void loop()
{
char key = keypad.getKey();

if (key == ‘*’ || key == ‘#’)
{
position = 0;
LockedPosition(true);
}

if (key == password[position])
{
position ++;
}

if (position == 5)
{
LockedPosition(false);
}

delay(100);
}

void LockedPosition(int locked)
{

if (locked)
{
digitalWrite(RedpinLock, HIGH);
digitalWrite(GreenpinUnLock, LOW);
ServoMotor.write(110);
}
else
{
digitalWrite(RedpinLock, LOW);
digitalWrite(GreenpinUnLock, HIGH);
ServoMotor.write(11);
}

}

LINK:https://www.tinkercad.com/things/a2GrghWGl50-password-protected-door-locking-system/editel?sharecode=Doq9qJeMg0inu_Se0oamQVGUyBxk_rU9ak8236OhAK0

CONCLUSION:

The main purpose is to design a security system which is beneficial to each and every individual. The system is cheap and affordable to everyone.

I would like to Thank INMOVIDU TECH for giving me this wonderful opportunity to explore regarding IOT concepts and also i would like to Thank my instructor who helped me to understand the concepts very efficiently.

THANK YOU

--

--

Manju S
Manju S

No responses yet