What We Are Going to Build?
So to ensure the security and remote access we want to think of a new way to connect our door lock to our personal devices. Let's think about our mobile phones, they have the capability to control our smart door locks through MQTT and available protocols. Then why don't we add an additional bio-metric firewall to that? Yeah, that's what we are gonna do.
Nowadays almost all mobile phones are equipped with fingerprint sensors. We use them to verify the bio-metric of the authorized person. So it can overcome the disadvantages of now existing smart door locks with an increased security level. In essence, we are going to build a smart remote door lock with additional bio-metric security.
How We Are Going to Build It?
As almost all smartphones are equipped with fingerprint sensors and we are using those sensors to verify the identity. The data read from the fingerprint sensor is compared with the authentic fingerprints stored in the device using a mobile application and determines whether the person is authorized or not. The data after verification is sent from mobile to a suitable cloud database, from where the smart door lock system retrieves the data. If the person authorized the smart door lock will unlock and if the person is not authorized it doesn't unlock.
These are the hardware components we used in building our project,
- Electric door lock module
- 12v 1A adapter
- Power jack
- Connection Wires
NodeMCU is an open source IoT platform. It includes firmware which runs on the ESP8266 Wi-Fi SoC from Espressif Systems, and hardware which is based on the ESP-12 module. In this project, NodeMCU forms the brain of the smart door lock. The NodeMCU retrieves data from the cloud database and makes the relay ON/OFF according to the data.
Or we can use an ESP8266 with the same code. Then use Arduino Uno to upload the code to ESP8266.
The Electric Lock Module
The electric door lock module operates at 12V which locks when the power is OFF and unlocks when the power is ON. It forms the physical part of the smart door lock.
A relay is a switching device as it works to isolate or change the state of an electric circuit from one state to another. The 12V supply is given to the electric lock module using the Relay according to the data given by the NodeMCU.
Gather all the necessary components. Then solder them properly according to the given connection schema. I used a micro soldering station to control the temperature to avoid damage of NodeMCU while soldering. Be careful not to damage the MCU while soldering as high temperatures may damage the ICs.
We have gathered all the components, connected them properly, and attached code with them. Now it's time to put them all together in an enclosure. The 3D design is made using Fusion 360 and printed at EazyFab. The design files are attached here.
We use the 12V 1A power supply to power up the NodeMCU as well the electric lock module. NodeMCU can't afford a direct 12V supply for a long time as it may damage the MCU. I used the 12V power supply just for a prototype. While building the product be sure to use a 5V power supply for the flawless working of the circuit.
The software components comprise of
- A mobile application
- Firebase real-time database
- NodeMCU code
The Mobile Application
A mobile application is used to scan the fingerprint and to verify the fingerprint and authorize the person. Once the fingerprint is verified the key for unlocking is posted to Firebase real-time database. The application is made using Android Studio.
Firebase is a mobile and web application development platform. Firebase frees developers to focus on crafting fantastic user experiences. You don’t need to manage servers. You don’t need to write APIs. Firebase is your...Read more »