Automated Door Lock

by Rahul guglani in Circuits > Arduino

1064 Views, 6 Favorites, 0 Comments

Automated Door Lock

Automated Door Lock
IMG_20200615_174643.jpg
IMG_20200614_124029.png
automated lock (1).png
IMG_20200610_141117.jpg
IMG_20200612_120941.jpg
IMG_20200614_101947 (1).jpg
IMG_20200612_121426.jpg

Hey THERE!!

This is my first Instructable! Hope you all will like it.

In this project we are going to build an Automated (password protected) Door lock. The classical lock and key is literally 100's of year old invention, and as we know "change is law of Nature" so its time for a change.So today we are going to build a simple and cheap Electronic door lock.

The lock we are going to make is an electronic one, its brain will be Arduino Uno (Arduino nano or pro mini will also work fine), and will have a 16*2 lcd screen for display and DIY keypad for inputting password, it will be embedded with a buzzer. In this tutorial I am going to use dc hobby motor for lock mechanism, but you can use a servo instead.

Now let's get started!!

Supplies

Components required to build the lock are easily avilable online as well as offline, I am going to provide you links for the same.

~ Arduino Uno :you can purchase from here

~16*2 lcd display:you can purchase from here

~l293D IC:you can purchase from here

~DC hobby motor / Servo motor: you can purchase from here

~push switch x 18: you can purchase from here

~perf board

~1Kohm resistor x 16

~10Kohm potentiometer

~1Mohm resistor

~buzzer

~enclosure for placing the components

some wires , headers, solder and soldering iron will be enough to make automated door lock.

Interfacing 16*2 LCD Display With Arduino

IMG_20200611_232156.jpg
IMG_20200612_121111_1.jpg
interfacing LCD.png
IMG_20200611_232223.jpg
IMG_20200612_120950.jpg
IMG_20200612_120941.jpg
IMG_20200612_121003_1.jpg
IMG_20200612_121016.jpg

It's very easy to interface LCD with arduino.

Here I have provided you circuit diagram for the same, i have made DIY shield for this display to connect Lcd more easily. We are doing to use 4 data pins (namely D4,D5,D6,D7) of display for interfacing it with arduino.

I suggest you to use ribbon wire for keeping connections neat or you can use jumpers with a breadboard.

To check everything is properly working or not you can upload Hello World example sketch of LIQUID CRYSTAL library which I have also provided.

Downloads

Making and Interfacing Keypad

IMG_20200614_101947 (1).jpg
IMG_20200614_101957.jpg
IMG_20200615_005358.jpg
IMG_20200614_234448.jpg
SharedScreenshot.jpg
IMG_20200614_234549.jpg

I have made my simple keypad instead of using keypad module available in market, because it uses 8 i/o pins and if we use this module. We will be lacking in I/O pins for other components.

So, I decided to make own keypad module which uses only one analog pin of arduino!!

we can make it easily with the help of some push buttons and resistors. working principle of this is Voltage Divider, you can see the wiring and working from the above images. I have made it over a perf board, you can also do the same and now it"s super easy to connect through Arduino.

NOTE:bigger resistance in place of 1 M ohm resistance will make the keypad more accurate.

Latch Setup

IMG_20200615_160138.jpg
IMG_20200615_114547.jpg
IMG_20200615_114602.jpg
IMG_20200612_121440.jpg
IMG_20200612_121426.jpg
IMG_20200612_121453.jpg

there are two ways to make door latch setup

1. DIY

you will need a regular door latch(Kundi), a dc motor, two push button ,threaded rod( i have used a bolt), a nut and some kind of epoxy to join things together( i have used M seal).

just join threaded rod with motor shaft and nut with latch handle, glue two push button on latch in such a way that whenever latch handle is in its extreme position either of push button should be pressed.

Do the wiring as indicated in picture.

connect motor with a motor driver , here I am using L293D ic for controlling Dc hobby motor.

2.Get a solenoid lock

You can purchase a solenoid lock aviliable online. I am also providing you a link sor the same here.

Adding Buzzer and Finding Enclosure for the Components.

IMG_20200615_114458.jpg
IMG_20200615_180428.jpg
IMG_20200615_165354_1.jpg
IMG_20200615_170034.jpg

Now everything is almost setup, You can add a buzzer for making your lock more interactive

attach one wire of buzzer to gnd and other to pin 10 of arduino.

Now find an appropiate enclosure for placing the components in to make your project look Cool.

I have used a wooden frame for securing Lcd and keypad which I have mounted over a plastic case containing arduino, buzzer and motor driver.

Code

code.jpg
Welcome.jpg

There is not much to say about code, I made it myself and it works fine.

there are two keys through which gate can be opened. one is master key which is pre declared in code and can not be changed and other key is updatable and stored in eeprom and can be changed by pressing C key If by mistake you have entered wrong key you can erase it by pressing A key of keypad.

you can change the welcome message my altering message[] in welcome() function.

That's all for this project Now you will be good to go.

This project is a part of arduino contest 2020 consider voting it,Thankyou.