Introduction: 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.
Step 1: Needed Materials
For the base of this project we will use the following materials:
- Arduino Uno (or other compatible board)
- Fingerprint sensor
- Wireless shield
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
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
- connecting to a WPA wireless network
- checking if the fingerpring sensor is attached
- wait for a fingerprint
- 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.