IoT Based Smart and Secure Lock V20
IoT Based Smart and Secure Lock V20
IoT Based Smart and Secure Lock V20
by make2explore
In this project we've built IoT based smart lock which have 4 layers of access. RFID + PIN + Fingerprint + OTP. We have
slightly upgraded our previous version of the project. In this version we are going to add one more accessibility layer.
That is biometric, means, we've added ngerprint based authentication.
Also we are going to use di erent MCU development Board. In version 1 we have used Particle Photon
Board, but in this project we will use ESP32 development board.
So now, if user want to unlock this lock, then he or she should have Valid RFID, Fingerprint, PIN and OTP,
means one time password.
Also we have programmed this lock system to keep record data of user entries with user name and
timestamp. This data will recorded on our dedicated mySQL database which is hosted on our
webserver, hence the system Administrator can login to that web portal and, keep track of how many
time this lock got opened.
NextionTouchscreen HMI Display is used for interacting with this door lock.
Supplies:
Parts Required
1. NodeMCU ESP32 Development Board
2. RC522 RFID Reader Module
3. FPM10A Fingerprint Sensor
4. 3.5" Nextion Touchscreen HMI Display
5. MB102 Breadboard Power Supply module
6. 12V Solenoid Lock
7. 2 Channel Relay Board 5V
8. Batteries - 7.4V LiPo, 11.1V LiPo and Power Bank.
Using this example ( Dumpinfo), get the UID's of RFID cards/Tags. Note them down. We'll require those to add authorized
users in nal code.
-- You can use method of adding zip library -- Sketch > Include Library > Add .ZIP Library
Before using Nextion library, we need to con gure the Nextion Library for use with the ESP32. It is
precon gured for the ATMega 2560. We need to do some changes.
ESP32 have 3 Hardware serial ports.
In this project(in nal circuit), we have connected Nextion display to Serial1 and Fingerprint sensor to
Serial2
So we'll use as as following
locate the nexInit() function, here we con gure the baud rate for Serial Monitor and Nextion. as shown
dbSerial.begin(115200);
nexSerial.begin(9600);
Finally, Arduino's AVR Software serial is not compatible with Nextion, It throws errors. So we have to
comment out following line from ‘Nexupload.cpp’ le of nextion library.
#include<softwareserial.h>
Or you can just renamenexupload.cppand nexupload.h les from Nextion library folder itself with any
other extensions like e.g nexupload.txt
Among above two workarounds any one will bypass the nexupload error of nextion library.
To know more about how to get started with with Nextion display, refer this video, there we have explained how use
Nextion IDE and how to upload GUI to Nextion HMI Touchscreen Display etc.
Step 5: Demonstration
In this video we've given detailed step wise explanation to build and implement this project.
https://youtu.be/X8uOJ63XOb8
Step 6: Documentation
Project Source code, Schematics and all Nextion Display design les are available on following GitHub Repo
https://github.com/make2explore/IoTbasedLockV2.0
Project's improvement suggestions, Bugs, Queries and solutions are most welcomed.