How to Make Password Lock System | Simple Arduino Project | Easy to Make Smart Door Lock

by KMTECH in Circuits > Arduino

1026 Views, 1 Favorites, 0 Comments

How to Make Password Lock System | Simple Arduino Project | Easy to Make Smart Door Lock

How To Make Password Lock System | Simple Arduino Project | Easy To Make Smart Door Lock

In this blog I will show you how you can make your very own Password Enabled Smart Door Locking System using Arduino.

You don’t need to have much of programming knowledge to make this project. Simple, Easy & Effective.

All Things You Need for This Project :

arduino.png
4x4-keypad-matrix.jpg
jumper wires.jpeg
servo motor.jpg

All Things You Need For This Project :

1. Arduino Uno - https://amzn.to/3ez28wN

2. Servo Motor - https://amzn.to/3bAJqD5

3. Keypad - https://amzn.to/2PNzT2N

4. PVC Board - https://amzn.to/3byH6MA

5. Iron Wire

6. Iron Lock

Circuit Diagram

image_2021-03-11_114851_4x.png

Programming : JUST COPY & PASTE

/*Do not forget to subscribe our channel - https://www.youtube.com/channel/UCoLbkkHaqJPFbWU0NxZjkYQ
Also watch our previous video -How to make arduino radar - https://www.youtube.com/watch?v=zP_y0rMx7Kg&ab_channel=KrishnaMahajan

*/

#include

#include

Servo ServoMotor;

char* password = "888"; // change the password here, just pick any 3 numbers

int position = 0;

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;

void setup()

{

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 == 3)

{

LockedPosition(false);

}

delay(100);

}

void LockedPosition(int locked)

{

if (locked)

{

digitalWrite(RedpinLock, HIGH);

digitalWrite(GreenpinUnlock, LOW);

ServoMotor.write(11);

}

else

{

digitalWrite(RedpinLock, LOW);

digitalWrite(GreenpinUnlock, HIGH);

ServoMotor.write(90);

}

}

Arduino Related Videos

Easiest Home Automation Ever | Make Your Home "Smart" | Arduino Uno FULL Setup | Easy & Cheap
How to make Automatic Smart Car Barrier System Using Arduino | Arduino Project | Easy To Make | DIY
How to Make a Radar System with Arduino | Ultrasonic Radar | Arduino Project