NodeMCU based clocking system


Introduction:

The main purpose of this system to count the working hours of the students / workers and count the sum of remaining working hours. Once the workers arrive, they touch the card to the RFID sensor, the system stores the time of arrival. After the shift they do it again and the departure time is also stored. On the website, every data is displayed.

Hardware:

This system is made by three main parts:

Hardware components

Hardware components

Operation:

In this section I am going to describe the operation of this system. After the controller is powered on it enters the SETUP state to initialize and start services.

If the SETUP state completed successfully the controller begins LOOP state and stays in it for good while the controller is powered on. It checks for cards in proximity constantly, if succeeded, the controller reads card ID and connects to MySQL database to look for a registered user who has a matching card ID. If exists, it retrieves user ID, first name, last name and the is_clocked_in flag.

Users table

Users table

Events table

Events table

Testing

Testing

Github Link