EMPLOYEE PRESENCE SYSTEM USING NODEMCU FOR FINGERPRINT AND FACE ID INTERNET OF THINGS (IOT)

ABSTRACT


Introduction
One measure of productivity in an organization is the attendance rate of everyone who participates in it.Attendance recording can be done manually or using an attendance recording machine.Recording with an attendance recording machine can be done by requiring physical or without physical presence.
Single-board computer technology and microcontrollers such as Arduino (Arduino, 2015) and ESP8266 MCU nodes (Schwartz, 2016) encourage the development of low-cost automation in all fields, including attendance recording.Single-board computer technology offers performance close to computer performance at a lower cost and much smaller power usage and size dimensions.Microcontroller technology, although not in the same class as the Raspberry Pi in terms of performance, offers the possibility of interfacing with other devices.In addition, some microcontrollers, such as the Node MCU 8266, provide the facility to connect to the internet, supporting the development of IoT-based applications at a meager cost (<US$10).
On the software side, developing artificial intelligence-based programming libraries, such as Open CV (Kaehler & Bradski, 2016) and Tensorflow (Dillon et al., 2017), led to the developing of pattern recognition-based automation systems.Biometric recognition-based applications (Lami et al., 2019), such as attendance and people search and object recognition-based applications, can be easily implemented on small processors and memory devices.
Previous studies have designed automatic attendance recording systems using RFID, fingerprints, and facial recognition (Muttaqin & Rahman, 2019).
This research integrates a presence system with facial recognition using Open CV, a presence system with fingerprint recognition using ESP 8266, and an AS608 Fingerprint scanner with a web server.The system is designed based on IoT so that attendance recording can be done through multiple machines to provide flexibility to employees of an organization with office locations in recording attendance data.Attendance data attendance is stored on a centralized server and can be accessed through a website.
The structure of this article is as follows.The second section discusses research methods and system design.The third section discusses system implementation and system testing.The conclusion is in the fourth section.

Fig. 1. Block Diagram of Attendance System
The design of a face recognition attendance system begins with a training phase using a training image.In this phase, feature extraction of the training image is carried out, and a model is produced, which is then used in the face recognition phase.In the face recognition phase, the image captured by the camera goes through a feature extraction process, which is then compared with the model trained using a cascade classifier If the recognition phase results in an identification, then the ID associated with the successfully identified face will be sent to the web server for attendance recording.They were recording attendance.On the web server, there is a PHP script to handle attendance data sent by the attendance machine and record data in the database.

Research Methods
The Internet of Things (IoT)-based attendance system is a combination of 3 systems, namely (1) attendance system with face recognition using OpenCV, (2) attendance system with fingerprint recognition using MCU ESP 8266 node, and (3) website and database for reporting with Apache web server, PHP programming language and MySQL database engine.Each pre-attendance machine has an internet connection for sending attendance data to the server.
The design of a face recognition attendance system begins with a training phase using a training image.In this phase, feature extraction of the training image is carried out, and a model is produced, which is then used in the face recognition phase.In the face recognition phase, the image captured by the camera goes through a feature extraction process, which is then compared with the model trained using a cascade classifier If the recognition phase results in an identification, then the ID associated with the successfully identified face will be sent to the web server for attendance recording.They were recording attendance.On the web server, there is a PHP script to handle attendance data sent by the attendance machine and record data in the database.

Fig. 2. Working Diagram of Presence System with Face Recognition
As in the face recognition attendance system, the design of the fingerprint recognition attendance system also includes three phases: the fingerprint enrolment phase that generates a template model, the recognition phase that generates the ID associated with the recognized template, and the database recording phase.Fingerprint recognition uses the Adafruit Fingerprint library, and network access and data transmission uses the ESP8266Wifi and ESP8266HTTPClient libraries.The working diagram of the pre-attendance system with fingerprint recognition is shown in Figure 3.

Fig3.Working Diagram of Attendance System with Fingerprint Recognition
The website design focuses on two main functions: handling attendance data records from attendance machines and frequency data reports.The working diagram of the attendance system website is shown in Fig 4.

Results and Discussion Image Collection
The first stage is collecting image data.Face image data is taken using a Lenovo ideaped320 laptop webcam camera with a specification of 0.3 MP camera with a single mic.Image capture uses the OpenCV library and the haar cascade classifier algorithm to produce grayscale image data with a pixel size of 140x140.The facial images obtained are divided into two classes: training data and testing data.This data is taken from a dataset that has been obtained previously and then divided into two classes: 80% for testing data and 20% for training data (Hartika & Ahmad, 2021).

Image Pre-Processing
Next, perform image preprocessing in the form of cropping.Image cropping is done to determine the objects processed and analyzed by the computer, namely facial images, so that with the cropping of the background, the computer does not need to analyze objects other than facial images.The face image cropping process in this research uses the haar cascade classifier algorithm to detect faces in the image and perform cropping (Albattat, Pitra, Mahendran, & Azmi, 2018).
The way haar works in detecting faces is by using a sliding window technique with a base of 24 x 24 on the entire image and looking for whether there are parts of the image that are shaped like a face or not.Then, scaling is done to detect faces larger or smaller than the image in the classifier.
Facial and non-face objects are classified with the haar algorithm in the cascade classifier process in image processing.This research uses three features to detect objects in haar: edge.Features, line features, and four-rectangle type features assisted by the OpenCV library in object detection.

Table 1 Database Table institution
institutions that reside in a unit units a unit within a business and the institution in which it is located Staff employees who work in a business and unit where employees MACHINE business and unit location attendance machine Id finger id mapping on fingerprint machine and staff id attendance id mapping on fingerprint machine and staff id

Implementation of Presence with Face Recognition Face
Implementing a presence system with face recognition using Pycharm includes the Python IDE section, an HD1080P camera connected via a USB port, and a monitor connected via a port (Kumaran, Shivani, Roshini, & Akash, 2021).

Fig 6 Implementation of face recognition
As shown in Figure 6, the software used to process face recognition is Python, openCV library, dlib library, numoy, and make library.Implementing the face recognition attendance system includes three main parts: the training phase, the recognition phase, and the attendance reporting.

Training Phase
The training phase begins with preparing a training image dataset containing images of people's faces to be recognized.The next stage is implementing a Python program to encode the features of the training image into a model that will be used in the recognition phase.The process sequence in the coding stage consists of an image format change to the OpenCV RGB model (Rena, 2019).

Recognition Phase
The first step in the face recognition phase is invoking the coding model (with the extension pickle) and the opencv cascade file (with the extension .xml).Both files will compare the camera-captured face image with the training image.The next step is to compare the encoding model with the camera-captured face image.If the system recognizes a face, the system will display the ID of the recognized face (Budi & Maulana, 2018).

Presence Data Recording with Face Recognition Face Recognition
Reporting to the server is done by sending attendance data using the HTTP_GET method.The urllib library in Python3 supports this function.On the server, a PHP file receives the sent attendance data and saves it to the database (Danti et al., 2019).

Implementation of an Attendance System with Fingerprint Recognition
Implementing the presence system with fingerprint recognition uses Arduino, connected to the AS608 Fingerprint Sensor through the GPIO pin.The hardware configuration of the system can be seen in Figure 10.The wiring of sensors and MCU nodes in the system implementation The software used for fingerprint recognition is a C programming language for Arduino with Adafruit Fingerprint Library.The connection between the MCU Node and the sensor uses the SoftwareSerial library.To connect to the network, the Adafruit fingerprint library is used (Bachtiar, 2022).The system implementation includes 3 phases: enrolment, fingerprint recognition, and attendance data recording.
In the enrolment phase, the system records fingerprint features, which are then associated with a unique identifier.Feature capture can be done several times to ensure recognition accuracy (Ananta, Noprianto, & Wijayaningrum, 2020).A model is formed from the captured fingerprint features in the fingerprint recognition phase.As in the enrolment phase, fingerprint recognition begins with taking the fingerprint image to be recognized and performing feature extraction.The results of fingerprint feature extraction are then searched for matches with the model built in the enrolment phase.If a match is found, the ID associated with the matching fingerprint model will be displayed (Hardi & Sundari, 2023).
The fingerprint-matching results are then sent to the server for recording attendance data.The library used for network connection and data transmission is the Arduino library; PHP script functions to handle sending attendance data and recording data in the database.The script functions to map the id_ finger sent by the machine and id_staff in the attendance system database.
Figure 11 shows the results of the MCU node connectivity test.The test results show that the MCU Node is connected to the fingerprint sensor and successfully reads the training model template on the sensor.The results also show that the Node MCU berhasil terhubung ke jaringan WIFI dan mendapat IP address.

Figure 10 Testing Fingerprint Recognition Presence Recording
The test results show that the system successfully recognizes the tested fingerprints and successfully records attendance.The attendance recording status is then displayed as user information.

Implementation of Reporting with Excel
The reporting website displays an employee's attendance data in the requested month as a monitoring function.The report is built with Plx-dax to read and process data from the database.

Fig 11 Reporting attendance through fingerprint
The test results show that Excel can display employee attendance data for a particular month according to the user query.

Conclusion
Based on the research results, conclusions can be drawn: An IoT-based attendance system consists of 3 significant parts: an attendance system with face recognition, an attendance system with fingerprint recognition, and an Excel-based reporting system.The design of the attendance system with face recognition uses Pycharm and Python3 programming language along with OpenCV, Idlib, and face recognition libraries.Secure online attendance data using HTTP protocol.Design a fingerprint recognition attendance system using Arduino and AS656 fingerprint sensor for hardware and C programming language with Adafruit fingerprint library-online attendance data recording using HTTP protocol.
Design a website report using plex-dax and Microsoft Excel.IoT-based attendance system consists of 3 significant parts: an attendance system with face recognition, an attendance system with fingerprint recognition, and an Excel-based reporting system.The design of the attendance system with face recognition uses Pycharm and Python3 programming language along with OpenCV, Idlib, and face recognition libraries.Secure online attendance data using HTTP protocol.Design a fingerprint recognition attendance system using Arduino and AS656 fingerprint sensor for hardware and C programming language with Adafruit fingerprint library-online attendance data recording using HTTP protocol.Design a website report using plex-dax and Microsoft Excel.

Fig 4
Fig 4 Presence System Website Work Diagram

Fig
Fig 8 Hardware Configuration of Sense System with Fingerprint Recognition Using Nodemcu for Fingerprint and Face ID Internet of Things (IoT)

Fig 9
Fig 9 MCU Node Connectivity Test with Sen-sor and network.