This solution is to help companies minimise physical contact to reduce spread of Coronavirus. This will replace existing biometric and swipe based attendance systems with RFID based attendance
RequirementsIntegration of hardware can be done with companies' existing attendance database or separate one can be created. Those who want to use existing system they need to update the database access credetials in arduino code otherwise one can create its own database in any tool (I prefer Xampp) to create database and a simple php page to update that database
Solution LogicThe solution uses a very simple logic of updating the database once the staff scans his/her RFID badge and this update in database is done only when it receives a valid employee id and employee name otherwise the database will be filled with invalid entries. This will act as authentication to update the database, no authentication required on hardware level.
Creating DatabaseThe first step is to create a MySQL database using xampp. One can follow this link to understand how a database is created. Once you understand this, create a database and table containing below fields as minimum:
- Employee ID (varchar)
- Employee Name (text)
- Time in (datetime)
- Time Out (datetime)
Next step is to create a php page that updates the database. You can learn how to create php page via link. One you learn this, use the link to understand how to update database using php. This page will update database table based on data received from RFID reader. You need to add below checks before making update:
- RFID tag (employee id) coming from arduino exists in the database
- if there is no time in record then add new record and put current time
- if there is a time in record, it means that the staff is leaving and we should do update to the same record
You can follow the link to understand how to write to RFID tags. Follow this and build cards for your employees containing employee id etc.
Build HardwareBelow wiring for Arduino to RFID reader:
PinWiring to Arduino
SDA------------------------Digital 10
SCK------------------------Digital 13
MOSI----------------------Digital 11
MISO----------------------Digital 12
IRQ------------------------unconnected
GND-----------------------GND
RST------------------------Digital 9
3.3V------------------------3.3V (DO NOT CONNECT TO 5V)
you can connect LEDs to arduino to show you status if system running (say using red LED) and status if RFID is read (using green LED as blink for successful reading).
Comments