we are going to make an nfc based smart employee in/out management system which keeps track of your employees working hours. We get the current-time information from the NTP (Network Time Protocol) servers by using the Wi-Fi module (Esp8266) of Slabs-32 and send it to Atmega328p on the I2C bus. The Atmega328p then uses this time information to make a record, whenever an employee swipes it's NFC tag to go outside or come inside of the office. It then calculates the time difference between the IN time and OUT time and displays it on the TFT screen of SLabs-32.
We can also send the information about the time spent by the employee in the office to the google spreadsheet using onboard Esp8266 but not in this instructable, I'll make another instructable to explain how that is done. To get your own SLabs-32 click on the link given below :
Step 1: List of Materials
We are using Nfc PN532 module which is a reader/writer NFC module.
In this project we require :
- NFC PN532
- Jumper Wires
Step 2: Hardware Connections
The Nfc module can be interfaced with our development board on I2C, SPI or High-speed UART bus, it's up to us to decide. In this project, we will be using SPI mode.
Make the connections as per the circuit diagram given above and you should have no problems.
- Vcc → 3.3 V
- GND → GND
- SCK → PD4
- MISO → PD3
- MOSI → PD2
- SS → PD7
Step 3: Programming SLabs-32
To get started with SLabs-32 click on the link given below :
Download the sketch files attached to step. After downloading the file, open the sketch and do the following things:
- Enter you Wifi credentials
- Set the UTC offset according to your location (In the Esp sketch).
In this sketch, we are comparing the UID of the Nfc tag to know the information about the employee. Each employee is given an nfc tag which has a unique UID. For demonstration purposed this sketch gives an example of how to manage a single employee's working hours. You can also add more employees in your sketch if you wish to.
Step 4: Start Timing
That's pretty much it. IoT projects made easy by SLabs-32. This project is not only for employee management but you can also use it for other application. I'll leave that up to your imagination.
Make sure to follow us for more easy and quick IoT projects using SLabs-32