MAKER:CodersCafe/Translated by: Qu Wujin
With a “beep”, just like starting a car, the fingerprint door lock at home opens with a light touch of the fingertip. Biometric door locks are also very common in daily life, as they can enhance home security and protect the lock itself. However, two factors hinder the use of biometric locks: the cost of the lock and the lack of remote access features.
This project will tackle these challenges by using IoT technology to solve the issue, which will be very interesting.
Project Concept
Using a mobile phone as a unlocking device ensures both security and convenience for remote access. They can implement MQTT and other available protocols to control smart door locks. Therefore, we can also add a biometric firewall based on this.
Almost all smartphones now come with fingerprint sensor functionality, which can verify the biometric characteristics of the authorized person. This can overcome the shortcomings of smart door locks and enhance security levels.
Using an app to compare the data read from the fingerprint sensor with the real fingerprint stored in the device to determine if it is authorized. The verification data is sent from the mobile device to the appropriate cloud database, and the smart lock system retrieves the data from the database. If the fingerprint is determined to be authorized, it automatically unlocks…
Compared to the previous introduction of “DIY a Smart Lock with Arduino”, isn’t this network-enabled biometric lock more interesting?
Materials List
NodeMCU ×1, Electronic Lock Module ×1, Relay ×1, 12V Power Adapter ×1, Power Socket ×1, Wires ×1
Introduction to NodeMCU
NodeMCU is an open-source IoT platform. It is a Wi-Fi SOC based on the ESP8266 module. In this project, NodeMCU is the main control for the smart lock. NodeMCU retrieves data from the cloud database and switches the relay based on the data.
Electronic Lock Module
The electronic lock module requires a 12V power supply. The lock is closed when the power is off and opened when the power is on. It is the physical part of the smart lock.
Relay
The relay acts as a switch to control the on/off of the lock circuit. Based on the data provided by NodeMCU, the relay will decide whether to power the electronic lock module.
Hardware Assembly
Assemble all the hardware. Solder them as shown in the images. I used a mini soldering station to control the temperature to avoid damaging the NodeMCU while soldering. Be careful that high temperatures can damage IC chips.
3D Printed Shell
The 3D design was made using Fusion 360. Print all the 3D parts and download the code. Then install the hardware into the shell. You can download the 3D printing files from the project library: https://make.quwj.com/project/125
Startup
Use a 12V 1A power supply to power the NodeMCU and electronic lock module. However, NodeMCU cannot withstand 12V DC power for long periods; it may damage the MCU. So I only used the 12V power supply for prototyping. When building your project, please use a 5V power supply to ensure the circuit works correctly.
Software Part
1. Mobile Application
The mobile application is used to scan fingerprints, verify fingerprints, and authorize user access. After verifying the fingerprint, the unlock key will be sent to the Firebase real-time database. The application uses Kodular.
Here are screenshots of the application design and code blocks. This software part brings the project to life. You can download it from the project library: https://make.quwj.com/project/125
2. Firebase Real-Time Database
Firebase is a development platform for mobile and web applications. It allows developers to focus on developing user experiences without managing servers and writing APIs.
Firebase serves as a repository for servers, APIs, and data, which you can modify according to your needs.
In this project, we use Firebase real-time database to publish and retrieve data instantly with no time delay. When designing the mobile application, you need to fill in the Firebase URL.
To find the Firebase URL: 1) Visit Firebase, and you’ll need a VPN. 2) Open your project. 3) Go to the real-time database in the database section. 4) Select the Firebase URL as shown.
To find Firebase authentication: 1) Visit Firebase. 2) Click on Settings > Project Settings. 3) Then go to Service Accounts. 4) Find the Firebase authentication key in the Database secrets option. For more information on setting up Firebase, click here for a detailed guide.
3. NodeMCU Code
The NodeMCU code is developed in C language and uploaded using Arduino IDE. Click here to download the Firebase extension library for NodeMCU and add it to Arduino IDE.
Download the NodeMCU code from the project library: https://make.quwj.com/project/125
Replace the Firebase URL and Firebase authentication with your own in the code. Then use Arduino IDE to upload the code and verify that it works correctly.
Start Operation
Now it can operate normally. Please open the mobile application, press the unlock button, verify your identity, and unlock the door.
Advantages of the Project
1. Low Cost: All components used in this project are very cheap, resulting in a low cost. 2. Fast Unlocking: The fingerprint sensor on the phone responds very quickly, and the Firebase real-time database operates at high speed, so the locking and unlocking process will take less than 0.5 seconds. 3. Advanced Security: The Android application provides encryption algorithms to ensure the security of transmitted data, achieving multi-layer security for the lock. 4. Shareable: By sharing the Android application and Firebase credentials, multiple people can access the same smart door. 5. Portability: This biometric door lock can replace any lock; just replace a set of devices to turn it into a smart door.
Project Library Address:
http://make.quwj.com/project/125
via instructables.com/id/OneTouch-DIY-Smart-Lock/
Links in the text can be clicked to read the original text at the end
More Exciting Content
Make a percussion band with Raspberry Pi
Make a colorful clock with 128 ping pong balls
DIY NES handheld console with ESP32 development board
Cat, go away! Computer vision water-spraying cat deterrent equipment
Dormitory internet outage device: DIY wireless router UPS
Raspberry Pi Video Monitoring Solution motionEyeOS
Funny black technology: Charming eyes that support motion tracking
Play with micro:bit MicroPython on Raspberry Pi
How cool is it to combine your Raspberry Pi with a night vision camera?