Keypad Door Lock: Security Locks for Doors with Code

In this article I’m going to explain the detailed about the keypad door lock using arduino UNO. You can only access the door by entering the exact password. The microcontroller on the board is ATmega328p.

keypad door lock using arduino uno
keypad door lock using arduino uno

Arduino UNO

The Arduino – is a hardware and software company. Arduino UNO is a microcontroller-based electronics board. this microcontroller working based on the code we are going to install.

How to make a keypad door lock

To make the keypad based door lock you need some electronic components and board. the items you need.

  • Arduino UNO board
  • 16*2 LCD display
  • 4*3 keypad
  • Piezo buzzer
  • wires
  • Servo motor

Connection and Code Explanation

Connect the 16*2 display on analog pins from ( A0, A1, A2, A3, A4, A5, ) on Arduino. ( I just giving the code for the better understanding full code will available at the bottom of this post )

Arduino analog pins
Arduino uno analog pins

Next, you need to connect the 4*3 keypad to the Arduino. 4*3 means 4 rows and 3 columns. so connect the keypad row pins to Arduino pin (1,2,3,4) and connect the columns pin to Arduino ( 5,6,7 )

arduino uno digital pins
Arduino uno digital pins

then the last connect the piezo buzzer and servo motor to the Arduino. Connect servo pin on Arduino pin 9 and piezo buzzer pin on Arduino pin 8

connections of arduino password based door lock
connections of arduino password based door lock
16*2 display
16 2 display

The complete code of Arduino based Door lock

Connect your Arduino UNO to computer or laptop and copy the code and paste it on the Arduino software and burn it on the Arduino board then you are done. The default passcode is 1234, you can change it as your convenience.

connect the power to the board and ( check all the connections are proper ) then the display gets on and it shows enter the password. then press the right password you are( given on your code). now its shows door open.

suppose the code you entered is wrong you get an error message along with beep sound. 4 invalid entry of password will give you long time beep sound.

Akhil Satheesh

Akhil Satheesh

Akhil Satheesh is an electronics expert and the Founder and CEO of Soldering Mind. He specializes in designing innovative electronic circuits and custom, high-performance PCB layouts. Every project he shares on solderingmind.com is rigorously bench-tested to ensure accuracy for makers and hobbyists alike.

One comment

Leave a Reply

  1. Good work indeed. Am a consistent reader of your articles.
    I was asking wether you can design a code and circuit diagram of an egg incubator based on Arduino uno. (Microcontroller being 328p)