Door Lock
This is a instructable on how to create a door lock using ardunio products such as an LCD, keypad and a servo. This simple instructable can help you make a door lock of your own to keep your belongings safe.
Materials
- Arduino x 1
- i2c LCD x 1
- Servo Motor x 1
- Keypad x 1
- Wires x 14
Other stuff Required:
- keypad library
- lcd library
- servo library
Schematic and Wiring
Above is a schematic that will help you understand what and where to plug in the wires. To explain in the words, all the pings on the keypad need to be connected to the arduino on the side shown in the image. The LCD's vcc connects with the 5 volt on the arduino. The GND (ground) on the LCD connects with the GND on the LCD and the other two pins connect as shown in the image above. As for the servo the GND from the servo goes to the arduino and the VCC goes to the 3.3 volts and the last pin connects to the arduino as shown in the schematic.
Code
Here I have attached the code that I used. You can make the necessary changes you want depending on your circumstances. Or use it as is.
Downloads
How It Works
Press k14 and the lcd will ask you to input the code, the code right now is 123456. To enter the code press k16. If entered correctly the servo should move and open the door. If entered incorrectly the lcd will display that the password was entered wrong.