Hi everyone. A while ago, I made an attendance system using
RFID tags, actually two videos, The first one using Excel to store
the data, and another one using NodeMCU with a web interface and database
to save all the needed data. But the RFID based attendance system uses
tags, which can be exchanged between employees, while a biometric attendance system uses organic
matter that cannot be exchanged. So, we're going to use the fingerprint instead
of using RFID, the process is a bit complicated than the
RFID, therefore, I'm going to explain it in this video. And we will build a 3D printed case to combine
all the parts together, also it will be pretty easy to use. just place your finger on the scanner then
the time that the print was scanned will automatically be entered in a database that is stored in
a server. So to build a biometric attendance system
based on the fingerprint scanner we need of course a fingerprint scanner with an ESP8266
chip you can also use ESP32 chip and an OLED display. The main component is the fingerprint scanner. the module that I have is JM-101B, I google
it and I found the exact datasheet of that module with all the information that I need. So as you can see my module capacity 150 fingerprints
but I will use just 127 fingerprints. The baud rate is 57600 you should check it
in order to make your module works properly. Be noticed on how much voltages your module
needs, Mine can handle up to 3.6v so it works just fine with the NodeMCU. These are the pins that you will use to connect
it to NodeMCU. The Vcc Tx Rx GND. As I said it will work with NodeMCU with no
problems. On the back of the module, there are the pins
that you saw in the datasheets. Now about the OLED 0.96 display, there are
two types, one uses I2C protocol and another one uses SPI protocol. So if you want to use this OLED, First you
need to download the Adafruit libraries and use this code also there are two options to
use it, first one using SPI and the second one using I2C by shorting the points as on
the back of the display. Anyway, we're going to use the I2C one to
communicate with the NodeMCU because it needs just two wires. You should use I2C_Scanner code to check the
correct address of your display The NodeMCU that we're going to use is the
one that uses CP2102 USB to UART, you can use the one with CH340 USB to UART, if you
want to use it you just need to install the CH34x driver, you can find it in the video
description. After downloading it install it and you're
ready to go. As I mentioned earlier, I'm going to use this
NodeMCU, With I2C OLED display, I
added a male header for the Vcc GND Tx and Rx pins of the scanner to make the connections
a bit easier. you can download the diagram from the video
description. Now we need to add the ESP8266 boards into
the Arduino IDE, From file go to preferences and paste these
two links from the description into Additional boards Manager,
the first link is for the ESP8266 boards and the second one is for ESP32 boards in case
you want to use it, then click OK, After that go to tool - boards - boards manger
and type ESP8266 into the search field, select it and click install, Wait for it to finish
the installing process, In case you want to use the ESP32 board you
should install it too. After the process completed, click close. Then, you need to include the Adafruit libraries
for the OLED display and the fingerprint scanner as well. Also, you can find these libraries in the
video description, After getting the ESP8266 boards installed
with the Adafruit libraries, Download NodeMCU_Fingerprint code from the
given link in the description. Now we need to select the right board in order
to upload the code into our board. As you can see we successfully installed the
Boards into our IDE, Scroll down and select nodeMCU board. To upload the code into the NodeMCU, we need
a micro USB cable to connect it to the computer. Now select your correct COM port. To make the NodeMCU connect to your WiFi network,
you need to put here your WiFi credentials. And here your Computer IP or your server domain, To check the computer IP go to network status, here's the computer IP you can increase the upload speed if you want
to, Check the COM port, then click Upload. After finishing the uploading, It will appear
the Adafruit logo on the OLED display. Then it will try to connect to your WiFi network. The fingerprint icon means that the scanner
is working. Now you need to install a local server on
the computer in order to receive the incoming data from the NodeMCU. I'm going to use xampp server, the link in
the video description very simple to install. then open the xampp control panel to start
Apache and MySQL services. After that, download the website files from
the link under below, then copy biometric attendance folder into xampp htdocs folder. then go to biometric attendance folder and
open connectDB.php in your editor, and put here your database user name with the password,
then redo those steps on the install.php page as well. Now we're ready to go, open your browser and
type localhost/biometircattendace/install.php to install the database into the server then
go to the index.php page to start. On mange user page you can add, update or
remove a user. Now for adding a new user, you have to select
a number for the ID to send it to the scanner in order to enroll a new fingerprint, because
of the fingerprint image will be saved into the scanner itself, not on the website database,
so the ID is the only thing that will be stored into the website database. That's why we're going to use the fingerprint
ID instead of the fingerprint itself. Place your finger on the scanner then wait
for a second to take a picture then remove your finger and wait a second then replace
the same finger on the scanner to take another picture to your finger, after that the scanner
will compare the two pictures to check if they match each other or not if so then it
should appear a check sign on the display and the enrollment process is completed. Also you can update the user information or
remove him. This page uses PHP with AJAX to make the page
faster and more dynamic. Each step you might make on this page there
an explanation message to show you what just happened. On the user log page, you can select any date
for the log, and export it into excel in case you want to send it to someone. let's try it by checking in and out. Here are the fingerprints while checking in
and out into the system, Also, the date and time of the record are
precise. If the fingerprint had already registered
into the scanner, then a check sign will be displayed on the OLED or a fault sign if the
fingerprint image was too messy or unregistered. Pretty easy to use, Right? After that, you can export the log as an excel
file After checking that everything as it should,
I designed a 3D module using freeCAD software. This program is simple to use. you can check it out from the link in the
video description. Here where the OLED will be inserted and this
part for the scanner. The module has spaces for a switch, a battery
charger and for an external relay in case you want to use one. The module will be available to download as
well. The 3D module is very simple, you can modify
it as you like. then I start printing the 3D module as two
pieces separately. After the printing was complete, I get all
the needed parts with an old laptop battery and TP4056 Lithium Battery Charger. I made the connections between all the components
like this using some wires with a female header and a shrink tube, you can also use a strip-board
instead. Then I connected all the components as I did
recently on the breadboard, The assembling process is pretty easy and fast. Finally, I connected the battery to the NodeMCU
board in order to check if everything still works as it should before putting all the
parts inside the 3D printed case. And everything was correct and working perfectly. after checking everything, I put all the part
into the case and fixed them using hot glue. Actually, The final result of the printing is pretty good
and the project looks very nice. After finishing the assembling process, let's
test it for the last time. I've made a few changes on the code to make
it a bit nicer. place your finger on the scanner and a welcome
message should appear on the display with your name. then a goodbye message as well when you scan
your finger for a second time. Now the code part, please consider checking
the comments for better understanding on how the system works, I tried to make it as simple as possible. All of these is for the OLED icons. the main loop has just three functions first
one to send the fingerprint ID when some scan his registered finger and the second function to check if there
any ID to add it into the scanner and the last function to check if there any ID to
remove from the scanner. At the end, I hope you find it useful or
at least interesting, If you have any questions please leave a comment and I will answer it. As always thanks for watching, see you in
next video.