Using Fingerprint Sensor for Time Attendance in Combination With XAMP Solution




For a school project, we were looking for a solution on how to track students' attendance. A lot of our students come in late. It's a tedious job checking their presence. On the other hand, there's a lot of discussion because students often will say they are present while in reality they are looking for excuses.

Using a fingerprint reader can be the best way to avoid obstacles such as fraudulent behaviour for students trying to cheat the system. RFID could work just as well, but allows the students to hand out their card, also making it possible to say they forgot their card, either loosing it, thus bringing extra costs to the school.

Teacher Notes

Teachers! Did you use this instructable in your classroom?
Add a Teacher Note to share how you incorporated it into your lesson.

Step 1: Needed Materials

For the base of this project we will use the following materials:

You could go for an ethernet board or Arduino Yun, but this project's description is based on the hardware of the list above.

Step 2: Enrolling Fingerprints Using Windows Software

Although the GitHUB library has code for enrolling fingerprints, I found it much easier to use the Windows software which is visually more appealing. The result is the same.

Instead of copying it, I would like to refer to step 2 of another instructable for more information on this step.

Step 3: The Software

Before you can build this project, you'll need some software:

  • the Arduino IDE: I used version 1.0.3, because up until now, I was not able to find the firmware upgrade needed to operate the WIFI shield in a version from 1.0.5 upwards
  • the fingerprint library: needed to compile the code. Copy the contents to the libraries folder of your Arduino IDE
  • xAMP: the server environment for storing the information to a database. You can use any version on any platform. If you are a fan of development boards, you can run it on a Raspberry Pi, just like I do.

Step 4: The Hardware Installation

Fair and simple enough: plug in the network board on your Arduino. For making it easier to connect the fingerprint reader, I extended the leads soldering some jumper wires to them. With the exception of the white lead, which was soldered to a yellow wire, the others have the same colours.

Just plug in the green wire in Pin2 and the white (or yellow in my case) in Pin3 for the fingerprint data communication. Power is provided plugging the red wire in the 5V and the black wire in the ground connections.

Step 5: The Arduino Script

It's fairly basic Q&D code. For now, it still lacks checking. For better functioning, two LEDs should be added to the design, allowing the user to see whether his fingerprint was accepted and his information was sent to the server or not. (Green LED = OK, Red LED = an error occurred).

Basically, what the code does, is

  1. connecting to a WPA wireless network
  2. checking if the fingerpring sensor is attached
  3. wait for a fingerprint
    1. If found: send a HTTP request to the server with the fingerprint found

Step 6: The XAMP Files

For the purpose of demonstration, the code is reduced to a strict minimum. You get the MySQL table description, which contains a column for the ID and a TimeStamp field, which is automatically filled in when a new row is inserted in the database.

The PHP script is called from the HTTP request in the Arduino script and processes the ID which is passed to the script. The answer received from the server can be verified with the Serial Monitor of the Arduino IDE.

Be the First to Share


    • Made with Math Contest

      Made with Math Contest
    • Multi-Discipline Contest

      Multi-Discipline Contest
    • Robotics Contest

      Robotics Contest

    17 Discussions

    Daniel Leviathan

    Question 6 months ago on Step 1

    Hello brother! Can you help me with the program for using Ethernet shield instead of using WiFi Shield 65198 or is it available to use with ESP-8266 WiFi shield. please help me! because i can't afford to buy WiFi Shield 65198 but this project is so interesting so i am very excited to try out this project. And also, i am your big fan. Thanks for reading my comment. I will very appreciated if you help me!

    1 answer
    yves.vanhalDaniel Leviathan

    Reply 6 months ago

    Hi there. I modified the Arduino script, so that it is in English (was in Dutch). I'm sorry to say that I don't have any experience with the ESP-8266 board or another ethernet board.
    Basically, there should not be to much of a problem, if you use another board. Throw out the code for the Wifi and replace it with code for the ethernet shield. It should be relatively easy to find the right code for making a network connection. Have a look at
    Use the explanation found there to replace the Wifi code.


    8 months ago

    Sir...can I use esp8266 module to post my fingerprint sensor data to website? Buadrate for esp8266 is 115200 and for sensor is can I use both in my circuit?...plzz give your suggestions


    Question 8 months ago

    Sir, can i use an esp8266 module to replace the wifi shield???


    2 years ago


    i'm making this project at present. i did step 2 that you linked here and managed to successfully enroll my fingerprint. but when i tried to continue to step 5, my sfgdemo couldn;t open the device, giving "open device fail, check the password and device address" error. i'm doing this project using arduino mega 2560 and my shield is cytron wifi shield. do you know why this error occur?

    2 replies

    Reply 2 years ago

    Hi there

    It's cool you're trying out this project I did before. As far as I remember, I had some issues with my Wifi shield. This was mainly due to the fact that the firmware was quite old and the arduino version I used had newer libraries which did not work with my shield. At that time, the current version of the Arduino software was already 1.0.5, but when I reverted to 1.0.3, the problems were solved. Maybe you are experiencing the same kind of problems. The current version of Arduino is 1.6. So, I would suggest you lookup whether your shield and sensor are suited for use with the software version.

    Try out the base (or demo) code that comes with your different components before trying combining it all.

    Good luck with your project!


    Reply 2 years ago

    thanks for the reply. i will try to do this.


    Reply 2 years ago

    Hi there. I'm not sure if this shield is compatible, but in case it is not, it would only require another library for the arduino and adjusting some code depending on that library. If it is an Arduino compatible shield, you should easily find the appropriate library and the necessary code or some examples.


    4 years ago on Introduction

    Hey Author! Thanks For Posting this wonderful instructable. I was thinking to make such a thing for my Science Exhitbition. And i want some help from you because i'ma beginner. I had the idea to make a board alongwith the fingerprint sensor that will be connected to a common arduino.(UNO/MEGA). The board will display the total students, present and absent, that will change real time. Is there a way. Can u help me plzzzzz... Plz help me with the code.

    And all file you provided work well except for the registreer.php. PLZ reUpload it.

    4 replies


    The Wifi shield I'm using can be found at
    Google for it using "WiFi-Shield 65198"
    The fingerprint module you are showing looks similar to the one I used. But I can't garantuee it is the same.
    I uploaded the PHP file with a .txt extension so it is usable now. This site apparently prohibits the use of PHP files for security reasons, which looks totally reasonable.

    I think your idea of displaying the number of present and absent students will become complicated using the Arduino. I'm in favorite of using the right technology for the right purpose. Arduino is great for use with sensors and other electronic equipment. However, it lacks the capabilities of a relational database as such. Consider this:
    * which rules would be used for saying when a student is present or absent?
    * what happens if a student (conveniently) forgets to scan his finger when leaving the building? What is his status the next day?

    This kind of questions are easier to process in a xAMP environment. 

    By connecting your arduino to the PC and communicating with it, you might be able to achieve your goal.
    I don't know all the possibilities of the processing programming environment, but you can look into that. Another way to go is look at one of the possible ways to communicate with your pc on

    Good luck with your project


    Reply 4 years ago

    Thanks for such a quick reply. By the way I have practice with wamp. Can u tell how to use the files in it. Thanks. Also I read the page u gave the link to, for communicating with the arduino. Can u help me make the code capable to be used via serial communication cuz it is going out of budget if we buy the WiFi shield. Thanks a lot again.


    3 years ago


    is it possible to use the intel edison chip instead of the arduino uno?



    3 years ago


    how can i increase fingerprint database to store unlimetid no of fingers ?

    or how can i save these fingers to excel or any database ?