Introduction: Automated Door Lock

About: Hey There! I am a student, i have keen intrest in science and technology. also I Love to do DIY projects, electronics and I like to make things.

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.

Step 1: Interfacing 16*2 LCD Display With Arduino

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.

Step 2: Making and Interfacing Keypad

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.

Step 3: Latch Setup

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.

Step 4: Adding Buzzer and Finding Enclosure for the Components.

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.

Step 5: Code

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.

Arduino Contest 2020

Participated in the
Arduino Contest 2020