Fingerprints are not enough and reliable to make your own security system, you always require a secondary option to unlock the door incase of any failure. So in this article I made a complete home security system using which you can unlock the door with fingerprints or Keypad. So let’s see how to make it.
- ESP32 board
- Fingerprint Sensor
- Solenoid Door lock
- Hex Keypad
- OLED Display
- 5V Relay
- BC547 transistor
- 330 ohm Resistor
- 1n4007 diode
- 12V/1A Power Adapter
This project was made to add security level at my studio. This project has a lot of features so let’s discuss all the features separately
Fingerprint Unlock Mode
This is the default mode of this system. As soon as you turn on the device, It will first try to get connected to the router with the provided WiFi Credentials. If the router is nearby, it will get connected to it otherwise it will jump out of that loop after 10 sec. Then the device lands up in this fingerprint mode.
In this mode we can unlock the door by placing the registered fingerprints on the sensor. A small fingerprint Icon on the display reveals that the system is in fingerprint unlock mode and it’s waiting for the valid fingerprints.
If the valid fingerprint is detected, it will unlock the door for 3 sec and will lock the door again. Now there are two conditions, if this device has a proper internet connection, then it will register the attendance of that person to the google sheets with the help of IFTTT and you’ll see “Registered” on the screen. And if the device don’t have proper connection, it won’t registered the attendance and will go back to the initial stage after printing “Not Registered” on the screen.
Maze Lock Mode
I programmed this mode specially for the guests visiting the studio. Now I can’t fit everyone’s fingerprint in the system and for that I designed this mode in which a person can unlock the door by entering the secret password.
To go to the maze lock mode, you need to press and hold the button ‘A’ on the keypad.
After that, you can enter the secret code ‘1234’, which you can change according to your choice in the code and press the hash button to enter the code. The system will recognise the code and will unlock the door.
Here also the attendance will be marked if the device has active internet connection but for this mode, the attendance will be marked with a fixed ID 200. As the fingerprint sensor can store only 128 unique fingerprints, it can mark the attendance for ID 1 to ID 127.
Hence I used a different and unique ID for this Maze lock mode. With this we can easily recognise that wether the attendance is marked with fingerprints or with the maze lock mode.
Initially the fingerprint sensor don’t have any fingerprint data in it. So we have to register our fingerprints for the first time and then the system will start recognising it. And togo to the enrolment mode, you just need to press and hold the button ‘C’ on the keypad.
Pressing the C button don’t directly take you to the enrolment mode, infact you need to give enter the password before that. This security level was necessary to add otherwise anyone can enrol the fingerprints and can open the door.
So after entering the correct password here, the system will take you to the enrolment mode. Here you need to enter the ID on which you want to register the fingerprints. You can enter any number ranging from 1 to 127 as this sensor can store upto 128 fingerprints in it. So in my case I entered the ID number as 55.
After that, you need to follow the steps shown in the screen and with this you can easily enrol your fingerprint in the system.
I have also added a feature of ‘Back Button’ in which you can come back to fingerprint mode from any other mode by just pressing the button ‘B’ on the keypad.
I have uploaded the code used for this project on my GitHub Repository whose link is mentioned below.
I have designed the PCB of this project on EasyEDA.com You can download the Gerber file of this PCB file from the Link mentioned below.
I have made a full tutorial video for this project in which you’ll get all the details regarding this project.