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.

Arduino UNO Based Keypad Lock Device

keypad door lock using arduino uno
keypad door lock using 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.