Biometric attendance system using fingerprint scanner and NodeMCU with a database & 3D printed case

Biometric attendance system using fingerprint scanner and NodeMCU with a database & 3D printed case

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.

Danny Hutson

26 thoughts on “Biometric attendance system using fingerprint scanner and NodeMCU with a database & 3D printed case

  1. Hi everyone.
    you can download everything from here:
    If you faced any problem you can contact me:
    through my email("[email protected]")
    or to my facebook page:
    if want that or leave a comment and I will try to help you.
    You're welcome.

  2. Hello Sir, how are you 🙂. I have a question regarding this project. My question is…

    Sir, how to send SMS (free of cost) to the parents of the students those are not attending the class.

    (Sir please reply)
    Thank you.

  3. Hello sir! I copied the program and threw it into the arduino.I downloaded the necessary libraries from your site.

    Then I chose NodeMCU 1.0 (ESP-12E Module).When I say compile.NodeMCU 1.0 (ESP-12E Module) returns an assembly error.

    Why do you think he did it? Help me please…

  4. Hello sir, nice video with great explanation!
    I'm stuck at the oled image of finger with image lock beside, and I've tried downgrading the version to 2.4.2 and also 2.4.1. But sadly, the problem has not been solved.
    Please advise!

  5. Good day sir, I got a question: What voltage is the recharchable battery you use for the VIN Pin in this project?

  6. Hi, I'm having a problem. When all the server is installed and all processes are done, at the time of registration does not register. And on the debug screen (in chrome) I identified some error messages. Please help me, I am implementing in a work for school.

  7. Excellent work! Everything work perfectly as shown in the video, but only on XAMPP Server. When I install in WAMP Server and click on 'Add Fingerprint ID' in 'Manage Users' Window, nothing appears in the right side window. But in XAMPP a click on 'Add Fingerprint ID' create a row in the right window and everything else works perfectly. I have uploaded everything into my paid web server that runs MySQL, behaves the same way as WAMPP server (does not respond). Please help me to find a solution.

    The error I get from WAMP server (shown in serial Arduino monitor window) is –
    <br />
    <font size='1'><table class='xdebug-error xe-warning' dir='ltr' border='1' cellspacing='0' cellpadding='1'>
    <tr><th align='left' bgcolor='#f57900' colspan="5"><span style='background-color: #cc0000; color: #fce94f; font-size: x-large;'>( ! )</span> Warning: mysqli_stmt_bind_param(): Number of variables doesn't match number of parameters in prepared statement in C:wamp64wwwbiometricattendancegetdata.php on line <i>178</i></th></tr>
    <tr><th align='left' bgcolor='#e9b96e' colspan='5'>Call Stack</th></tr>
    <tr><th align='center' bgcolor='#eeeeec'>#</th><th align='left' bgcolor='#eeeeec'>Time</th><th align='left' bgcolor='#eeeeec'>Memory</th><th align='left' bgcolor='#eeeeec'>Function</th><th align='left' bgcolor='#eeeeec'>Location</th></tr>
    <tr><td bgcolor='#eeeeec' align='center'>1</td><td bgcolor='#eeeeec' align='center'>0.0029</td><td bgcolor='#eeeeec' align='right'>280752</td><td bgcolor='#eeeeec'>{main}( )</td><td title='C:wamp64wwwbiometricattendancegetdata.php' bgcolor='#eeeeec'>…getdata.php<b>:</b>0</td></tr>
    <tr><td bgcolor='#eeeeec' align='center'>2</td><td bgcolor='#eeeeec' align='center'>0.0137</td><td bgcolor='#eeeeec' align='right'>300408</td><td bgcolor='#eeeeec'><a href='' target='_new'>mysqli_stmt_bind_param</a>
    ( )</td><td title='C:wamp64wwwbiometricattendancegetdata.php' bgcolor='#eeeeec'>…getdata.php<b>:</b>178</td></tr>

  8. Thanks a lot for the Biometric attendance system using fingerprint scanner and NodeMcu with a database. Awesome project. I have compiled the whole project as you have mentioned works perfectly, except that the blue led keeps blinking randomly. So the users will not be able to register. It is not keeping the led light stable. Please help

  9. Thank you very very much for replying so prompt.Before your video publishing is it possible to send me the code and circuit diagram. My Email:
    [email protected]

    Thank you once again for your efforts to help me.

  10. I was trying last few days to run the code on WAMP Server and few of my web servers, but unfortunately it does not work. On XAMPP server installed on a local computer it works like a charm. But this awesome project should work on every server! So far I understand, it is failing to work due to some restrictions in MySQL on WAMP and other web servers. Last week you uploaded the modified the getdata.php but that did not solve the problem. I sincerely believe that a little more attention from you will solve the problem and make the project really useful.
    Adding 'Wifi Manager' would make it even more useful.

    Once again my heartfelt thank to you for this nice project

  11. Sorry for the late reply.Your link may help me more.
    Is it possible to incorporate more fingerprint attendance system unit using one DB.
    Different ID provide for each unit.
    Thank you once again for your efforts to help me.

  12. I have tried in on 'infinityfree'. A little better, clicking on add finger creates a new field but the lcd display does not show 'scanning mode picture' and new finger can not be scanned. On WAMP Server I can access from my mobile phone after a little modification on 'httpd-vhosts.conf' (Require all granted). But the system doesn't work on wamp server as I mentioned in my previous post. Today I uploaded everything on 'infinityfree' Server. I get the following message on Arduino serial monitor.

    <html><body><script type="text/javascript" src="/aes.js" ></script><script>function toNumbers(d){var e=[];d.replace(/(..)/g,function(d){e.push(parseInt(d,16))});return e}function toHex(){for(var d=[],d=1==arguments.length&&arguments[0].constructor==Array?arguments[0]:arguments,e="",f=0;f<d.length;f++)e+=(16>d[f]?"0":"")+d[f].toString(16);return e.toLowerCase()}var a=toNumbers("f655ba9d09a112d4968c63579db590b4"),b=toNumbers("98344c2eee86c3994890592585b49f80"),c=toNumbers("9e1fb8c3875ae3b571f8ed6c0f5f9aab");document.cookie="__test="+toHex(slowAES.decrypt(c,2,a,b))+"; expires=Thu, 31-Dec-37 23:55:55 GMT; path=/"; location.href="";</script><noscript>This site requires Javascript to work, please enable Javascript in your browser or use a browser with Javascript support</noscript></body></html>

    Please, Please, Please help me in solving the problem. I need the solution desperately.

    Sincere regards

  13. Thank you very very much for replying so prompt.I am not as good as you are in web related cording ( PHP, SQL, JS etc). So a little hint would be very helpful for me.

  14. Cant wait for your next video and I did this project but I had a lot of problems on the way that took time to solve them. Finally I have a working fingerprint Attendance System. Thank you electronics tech. Waiting for you to hit 1K!!!

  15. Thank once again.In last comment "Is it possible to incorporate more fingerprint attendance system unit using one DB.Different ID provide for each unit."
    1,What is the change in some modifications in data_get.php
    2.IN NodeMCU_Fingerprint code what to change.

    Thank you once again for your efforts to help me.

  16. Hi sir, firstly thank you so much for the video.

    Sir, could you please send me the link of the fingerprint sensor that you used in this video.

    And is it ok to use any fingerprint sensor?

  17. Please upload Rfid Rc522 and Fingerprint based attendance system Double security using nodemcu php mysql and send sms alert to parents

  18. Thank you for the great video!😍i want to ask,can i assign the fingerprints automatically?they still can be detected,right?

Leave a Reply

Your email address will not be published. Required fields are marked *