Sem 7 Project Report
Sem 7 Project Report
A PROJECT REPORT
Submitted by
ABINESH A P (2111047)
PRADEEK K (2111060)
SANTHANA VIGNESH S (2111063)
OCTOBER 2024
BONAFIDE CERTIFICATE
SIGNATURE SIGNATURE
i
ACKNOWLEDGEMENT
First and foremost, we express our wholehearted gratitude to the Almighty for
providing wisdom and courage to take over this work.
We wish to express our sincere thanks to the Director Dr. S. Shanmugavel, B.Sc.,
D.M.I.T., Ph.D., who helped us in carrying our work successfully.
We would like to express our sincere thanks to our principal Dr. K. Kalidasa
Murugavel, M.E., Ph.D., for providing us this opportunity to do this work.
Our heartfelt acknowledgement goes to the Professor and Head of the Department,
Electronics and Communication Engineering, Dr. S. Tamilselvi, M.E., Ph.D., for her
valuable and consistent encouragement for carrying out the work.
ii
ABSTRACT
This project introduces a Smart Attendance Management System that integrates Radio
Frequency Identification (RFID) technology with facial recognition to streamline attendance
tracking in educational institutions and corporate environments. Traditional attendance
methods, which often rely on manual processes, can lead to inaccuracies and inefficiencies
that waste valuable time and resources. By employing RFID tags assigned to each individual,
the system allows for rapid scanning upon entry, ensuring instantaneous and accurate
attendance recording. In conjunction with RFID technology, facial recognition enhances
security and identity verification through real-time image processing, providing an additional
layer of accuracy. This dual approach not only ensures that attendance records are reliable but
also mitigates the risks associated with proxy attendance and identity fraud. Designed with
user experience in mind, the system features an intuitive interface accessible to both
administrators and users. Administrators can easily generate detailed reports and analyze
attendance patterns, enabling data-driven decision-making that can improve overall
attendance rates and engagement levels. This capability is particularly beneficial in
identifying trends and addressing potential issues proactively. Moreover, the automation of
the attendance process significantly reduces the administrative overhead associated with
traditional methods. By freeing up time and resources, organizations can focus on their core
activities, enhancing overall operational efficiency. The real-time tracking feature also
provides valuable insights into attendance behaviour, allowing institutions to foster a culture
of accountability among students and employees. In conclusion, this project demonstrates the
transformative potential of integrating RFID and facial recognition technologies into
attendance management. By adopting this innovative solution, institutions can achieve a more
organized, secure, and efficient attendance process that benefits all stakeholders. The Smart
Attendance Management System represents a significant advancement in attendance
management practices, aligning with the demands of modern educational and corporate
environments.
iii
TABLE OF CONTENT
CHAPTER TITLE PAGE
NO. NO.
ABSTRACT iii
LIST OF FIGURES v
1. INTRODUCTION 1
2. OBJECTIVE 3
3. LITERATURE SURVEY 4
4. PROPOSED WORK 9
4.1 METHODOLOGY 9
4.8 CHALLENGES
6.1 CONCLUSION
REFERENCES
LIST OF FIGURES
iv
FIGURE PAGE
FIGURE NAME
NO. NO.
4.2.1 BLOCK DIAGRAM OF SKETCHING FINAL SHEET
4.4.4 5V BUZZER
v
CHAPTER 1
INTRODUCTION
With the advancement of technology, there has been a growing demand for automated
solutions to streamline attendance management and eliminate human error. Biometric
systems and RFID (Radio-Frequency Identification) have emerged as viable solutions to
address these challenges, offering automation, speed, and accuracy. However, while these
technologies have been successfully implemented in various domains, they each have their
limitations. RFID systems, for instance, depend on the user carrying a unique RFID card,
which can be misplaced or borrowed, allowing for the possibility of attendance fraud. Face
recognition, on the other hand, can fail in cases of poor lighting, obstructions, or facial
changes such as glasses or beards, leading to false negatives.
The Smart Attendance Management System proposed in this paper addresses the
shortcomings of these individual systems by integrating both RFID and face recognition
technologies. This dual-authentication approach ensures higher accuracy and reliability in
attendance tracking by cross-verifying the attendance data captured by the two systems. By
implementing a multi-factor authentication process, we reduce the risk of errors and fraud,
ensuring that the student is both physically present and authenticated through their unique
RFID card and their facial features.
The system functions in three stages: (1) attendance is taken using an RFID card, (2)
attendance is simultaneously recorded through a face recognition module, and (3) the two sets
of attendance data are compared. Only when both methods confirm the student’s presence is
the attendance recorded as valid. This cross-verification not only improves the accuracy of
attendance but also adds an extra layer of security, ensuring that proxy attendance is
1
minimized. Furthermore, all attendance data is stored and managed using Google Sheets,
allowing for real-time updates, easy access, and seamless integration with other institutional
systems.
The use of cloud-based Google Sheets as the storage platform also adds several benefits,
including scalability, ease of use, and the ability to access attendance data remotely. Teachers
and administrators can easily monitor attendance records without needing to manually
compile or update files. The system is designed to be user-friendly, with minimal technical
expertise required for setup and operation, making it an ideal solution for a wide range of
educational institutions, from schools to universities.
In this, we will detail the design, implementation, and testing of the Smart Attendance
Management System. The following sections will explore the hardware and software
components used, the workflow of the system, and the comparative analysis of data obtained
from both RFID and face recognition methods. We will also present the results of testing the
system in a real-world scenario, showcasing its effectiveness in improving attendance
accuracy and reliability. The ultimate goal of this system is to offer a scalable and efficient
solution to attendance management while addressing the key challenges faced by traditional
and standalone systems.
2
CHAPTER 2
OBJECTIVES
To Improve Efficiency: Streamline the attendance process to save time for both
administrators and users, allowing for quick scanning and recording of attendance.
To Ensure User Accessibility: Design an intuitive interface that is easy for both
administrators and users to navigate, ensuring seamless interaction with the system.
To Support Scalability: Develop a system that can be easily scaled and adapted for
various environments, including schools, colleges, and corporate offices.
3
CHAPTER 3
LITERATURE SURVEY
Description: This paper presents an intelligent attendance management system that combines
RFID and facial recognition technologies. The authors detail the architecture of the proposed
system and discuss its implementation. The findings demonstrate that the system not only
enhances attendance accuracy but also provides a user-friendly experience for both students
and administrators.
Description: This paper explores various face recognition algorithms, providing foundational
knowledge that aids in selecting suitable methods for attendance management systems reliant
on accurate user identification.
4
Description: This research discusses the integration of face recognition technology with
surveillance systems, demonstrating how such applications can enhance security and assist in
attendance tracking.
Description: This paper provides a broad overview of face detection and recognition
techniques, emphasizing emerging machine learning trends that could enhance performance
in attendance systems.
5
Description: This article highlights the utility of OpenCV as a powerful library for computer
vision applications, including face recognition, advocating its use in developing robust
attendance management systems.
Description: This research explores efficient face recognition using OpenCV and face
_recognition libraries, offering insights into best practices for implementation in attendance
systems.
Title: Face recognition in real-time video streams using Haar cascades and LBP features
Author: A. Kumar and S. Verma
Year of Publication: 2018
Published: IEEE Trans. Circuits and Systems for Video Technology
Description: This study investigates real-time face recognition methods using Haar cascades
and LBP features, contributing techniques that enhance system responsiveness in attendance
tracking scenarios.
Description: This research showcases how high-performance cameras can improve real-time
face recognition, indicating that hardware choices significantly affect attendance system
effectiveness.
6
Description: This paper presents efficient techniques for real-time face detection and
recognition, valuable for enhancing system performance in attendance tracking.
Description: This master's thesis details a classroom attendance system utilizing face
recognition, validating the feasibility of applying theoretical principles in educational
settings.
Title: Robust face recognition with facial landmarks and depth information
Author: B. Zhang and K. Wu
Year of Publication: 2019
Published: Proc. IEEE Conf. on Computer Vision and Pattern Recognition (CVPR)
Description: This study investigates the use of facial landmarks and depth information for
robust face recognition, enhancing accuracy under varied conditions, which is crucial for
attendance systems.
Title: Integration of facial recognition with real-time systems for secure access
Author: L. Wang
Year of Publication: 2021
Published: IEEE Access
Description: This research examines integrating facial recognition with real-time systems,
emphasizing potential security enhancements in attendance management systems that utilize
biometric identification.
7
Description: This paper discusses face detection and recognition techniques using OpenCV
under low-light conditions, highlighting adaptability to environmental factors, which is
essential for effective attendance systems.
Title: Real-time face recognition using deep learning with TensorFlow and OpenCV
Author: N. Kumar and R. Singh
Year of Publication: 2022
Published: arXiv:2201.03456
Description: This research explores deep learning techniques for real-time face recognition
using TensorFlow and OpenCV, showcasing their potential to enhance accuracy and speed in
attendance tracking systems.
8
CHAPTER 4
PROPOSED WORK
4.1 METHODOLOGY
The procedural approach for developing a smart attendance management system using RFID
and face recognition begins with an initial setup and planning phase. In this phase, the
objectives of the system are clearly defined, focusing on accuracy, security, and user-
friendliness. A comprehensive system design is planned, detailing the interaction between
RFID-based attendance, face recognition, and a web application for data logging and
comparison.
The next step involves setting up the RFID-based attendance system. This includes installing
and configuring the RFID reader to read the tags assigned to each individual. A
microcontroller, such as NodeMCU, is programmed to receive RFID tag data, process it, and
display user information on an LCD screen. The attendance data is logged in real-time to a
cloud-based Google Sheet using appropriate APIs to ensure immediate and accessible data
storage.
Simultaneously, the face recognition system is developed. A camera is set up to capture real-
time images of individuals as they check in. The face_recognition library is employed to
detect and encode faces in these images, which are then compared with a pre-stored database
of known faces for identity verification. The recognized face data is logged into an Excel
sheet or another suitable storage format, ensuring accurate record-keeping.
9
Web Application Development
The web application is developed to provide a user-friendly interface for administrators. The
frontend is designed using HTML, CSS, and JavaScript, while the backend is implemented
using a framework like Flask or Django. The application integrates with a database to store
consolidated attendance data from both the RFID and face recognition systems. APIs are
developed to facilitate seamless communication between the microcontroller, face
recognition system, and the web application.
Data from both sources is consolidated and compared within the web application to ensure
consistency and accuracy. Discrepancies are highlighted for administrative review, and the
verified attendance data is logged into a unified database. Thorough testing is conducted,
including unit testing of individual components and end-to-end system testing. User
Acceptance Testing (UAT) involves actual users to ensure the system meets their needs and
expectations.
Upon successful testing, the system is deployed in the intended environment, such as a school
or corporate office. Training sessions are provided for administrators and users to ensure they
can effectively use the system. A maintenance plan is established to regularly check and
update the system, addressing any issues promptly to ensure continuous operation.
The block diagram for the integrated attendance management system illustrates a cohesive
framework that merges RFID technology with facial recognition for efficient attendance
tracking. Initially, an RFID Reader scans user tags as individuals arrive, transmitting the data
to a Node-MCU. This microcontroller processes the RFID data and logs the attendance
information directly into a Google Spreadsheet, ensuring that records are readily accessible
and securely stored in the cloud. At the same time, a camera captures the user’s face upon
entry. A Python script then performs facial recognition on the captured image, storing the
identification results in an Excel file. This dual approach allows for comprehensive
10
attendance tracking based on both RFID and facial recognition methods. To enhance data
reliability, a data comparison module is included. This module compares the attendance data
from the Google Spreadsheet with the records stored in the Excel file, identifying any
matches or discrepancies. Such comparisons are crucial for ensuring data integrity and
addressing any inconsistencies that may arise from the two identification methods. After the
comparison process, the results are logged into a separate Excel file, which serves as a
thorough record for administrators to review This integrated system not only streamlines the
attendance process but also improves accuracy and accountability, making it a robust solution
for attendance management in educational and corporate environments.
11
1) Node-MCU Esp8266
2) RFID Reader
3) RFID Tags/Cards
4) Camera
5) LCD Display
6) Power Adapter/Battery
Functionality:
o It detects RFID tags when they come within range and reads their unique
identifiers (UID).
o Communicates with a microcontroller (like the NodeMCU) via the SPI (Serial
Peripheral Interface) for fast data transfer.
Role: The RFID reader scans RFID tags to capture unique identifiers associated with
individuals (students or employees).
12
VCC Power Supply (3.3V or 5V)
GND Ground
RST Reset
2. NodeMCU ESP8266
13
Fig. 4.4.2 NODE-MCU ESP8266
o Controls other peripherals, such as the LCD and buzzer, for user feedback.
Pin Pin
Function Description
Name Number
3V3 1 3.3V power supply
GND Multiple Ground
Vin 3 External power supply 5V
General-purpose input/output, no PWM or I2C support, used for
D0 GPIO16
wake-up from deep sleep
D1 GPIO5 General-purpose input/output, supports I2C SCL
D2 GPIO4 General-purpose input/output, supports I2C SDA
General-purpose input/output, connected to FLASH button, used to
D3 GPIO0
boot into flash mode when pulled low at boot
General-purpose input/output, onboard LED (active low), pulled
D4 GPIO2
high at boot
D5 GPIO14 General-purpose input/output, supports SPI SCLK
D6 GPIO12 General-purpose input/output, supports SPI MISO
D7 GPIO13 General-purpose input/output, supports SPI MOSI
D8 GPIO15 General-purpose input/output, supports SPI CS, pulled low at boot
D9 GPIO3 General-purpose input/output, UART RX (Serial Receive)
D10 GPIO1 General-purpose input/output, UART TX (Serial Transmit)
General-purpose input/output, usually connected to flash memory,
D11 GPIO9
not recommended for use
General-purpose input/output, usually connected to flash memory,
D12 GPIO10
not recommended for use
Analog-to-digital converter (ADC), measures analog voltage in the
A0 ADC0
range of 0-1V
RST RST Reset pin, active low, resets the microcontroller
EN EN Chip enable, active high, used to enable or disable the chip
14
3. 16x2 LCD Display
Description: The 16x2 LCD is a character-based display module that can show 16
characters on each of its 2 lines. It is widely used for displaying textual information in
various electronics projects.
Functionality:
o Displays real-time messages, such as the scanned RFID tag ID and attendance
status.
o Provides user-friendly feedback, allowing users to know if their attendance has
been successfully marked or if there were any issues.
4. Buzzer
15
Fig. 4.4.4 5V BUZZER
Description: The camera module used for face recognition can vary in type, but
popular choices include the OV7670 or USB webcams. These modules capture
images of users for processing.
Functionality:
o Captures images for facial recognition algorithms to identify individuals.
o Sends recognition results back to the NodeMCU to confirm the identity of the
user before marking attendance.
16
6. Google Sheets (or Database)
7. Power Supply
Description: The power supply provides the necessary electrical power for all
components in the system. It may include batteries, AC adapters, or USB power
sources.
Functionality:
o Supplies the required voltage levels for the NodeMCU (3.3V), RFID reader
(3.3V), LCD (typically 5V), and buzzer (5V), ensuring all components operate
efficiently.
17
4.5 DESIGN FLOW AND IMPLEMENTATION
The RFID reader (MFRC522) is connected to the Node-MCU via the SPI interface. The
connections are as follows: the VCC pin of the RFID reader is connected to the 3.3V pin of
the Node-MCU, the GND pin to the GND pin of the Node-MCU, the SDA (SS) pin to GPIO2
(D4), the SCK pin to GPIO14 (D5), the MOSI pin to GPIO13 (D7), the MISO pin to GPIO12
(D6), and the RST pin to GPIO0 (D3). These connections enable the RFID reader to
communicate with the Node-MCU and transmit the UID of the scanned tag.
Upon scanning an RFID tag, the UID is sent to the Node-MCU, which processes the data.
The Node-MCU then sends a signal to the 16x2 LCD display to show the UID and a message
confirming the attendance. The LCD is connected to the Node-MCU via I2C interface,
simplifying the wiring and reducing the number of required GPIO pins. Additionally, a 5V
buzzer is connected to the Node-MCU to provide audible feedback when a tag is successfully
scanned, enhancing the user experience by giving immediate confirmation of attendance
marking.
To store attendance records, the Node-MCU uses its Wi-Fi capability to connect to the
internet and update a Google Spreadsheet in real-time. This integration ensures that
attendance data is stored securely and can be accessed from anywhere. The Node-MCU sends
the UID along with a timestamp to the Google Sheets API, which logs the data into a
predefined spreadsheet. This setup not only automates the attendance process but also
provides a reliable and accessible means of record-keeping.
Power management is crucial for the system's reliability. The Node-MCU and RFID reader
are powered by a 3.3V source, while the LCD and buzzer are typically powered by a 5V
18
source. Proper power distribution ensures that each component functions optimally without
drawing excessive current that could lead to instability.
19
To build a face recognition system using Python and store attendance data in an Excel sheet,
you need to follow several essential steps.
Environment Setup
First, set up your development environment by installing the necessary libraries such as
OpenCV for image processing, face _recognition for facial recognition capabilities, and
pandas for handling data storage.
Use OpenCV to initialize the camera, which will be used to capture real-time video frames.
The video feed will be processed frame-by-frame to detect and recognize faces.
Create a database of known faces. This involves encoding images of individuals whose
attendance needs to be tracked. The face _recognition library can be used to generate unique
face encodings for each individual. These encodings are stored along with corresponding
names in a database.
Real-Time Processing
Continuously capture frames from the video feed. For each frame, detect faces and compute
their encodings. These encodings are then compared with the stored known face encodings to
identify any matches. If a match is found, the corresponding name is retrieved.
The recognized names are displayed on the video feed by drawing rectangles around the
detected faces and labeling them with the identified names. This visual feedback helps in
verifying the accuracy of the system.
Logging Attendance
Each time a face is recognized, an event is logged with the name and the current timestamp.
This data is stored in a pandas DataFrame and periodically written to an Excel sheet. This
20
ensures that attendance records are maintained in an organized manner and can be accessed
later for review.
The system can be enhanced by integrating with Google Sheets or other cloud storage options
to provide real-time logging of attendance data. This integration allows for easy access and
management of attendance records from any location.
Include mechanisms to gracefully exit the program, such as closing the video stream and
releasing resources. This ensures that the system does not leave any processes running in the
background, which could affect performance.
By following these steps, you can develop a robust face recognition system that efficiently
tracks attendance and stores data in an Excel sheet for further analysis and record-keeping.
This system is suitable for various applications, including educational institutions and
workplaces, to automate and streamline the attendance management process.
The hardware prototype for the Smart Attendance Management System involves integrating
several key components. The NodeMCU ESP8266 acts as the central controller, managing
data processing and Wi-Fi connectivity for real-time updates to a Google Spreadsheet. An
MFRC522 RFID reader is connected to the NodeMCU via the SPI interface, reading RFID
tags and sending unique identifier data for attendance marking. A 16x2 LCD display is
interfaced with the NodeMCU to provide real-time feedback, showing messages such as the
RFID tag ID and attendance status. A 5V buzzer is also connected to the NodeMCU to emit
audible alerts when a tag is successfully scanned, enhancing user interaction. Additionally, a
camera module is used for face recognition, adding an extra layer of authentication by
capturing and processing images to verify user identity before marking attendance.
1.ARDUINO IDE
22
2.PYTHON VERSION 3.8
Python 3.8 is an excellent choice for developing face recognition applications due to its
compatibility with essential libraries such as OpenCV, dlib, and face_ recognition. This
version introduces several syntax improvements, including the assignment expression (walrus
operator :=), which allows for cleaner and more concise code when processing images and
data streams. Additionally, performance enhancements in Python 3.8 help reduce latency in
tasks like face detection and recognition, ensuring a smoother user experience. The
introduction of Typed Dict for more precise type hinting improves code readability and
maintainability, especially in larger projects. With easy installation of required libraries and
abundant community support, Python 3.8 provides a robust and efficient environment for
building face recognition systems.
PROGRAMS
ARDUINO CODES
#include <SPI.h>
#include <MFRC522.h>
//GPIO 0 --> D3
//GPIO 2 --> D4
const uint8_t RST_PIN = D3;
const uint8_t SS_PIN = D4;
MFRC522 mfrc522(SS_PIN, RST_PIN);
MFRC522::MIFARE_Key key;
23
MFRC522::StatusCode status;
//--------------------------------------------------
void setup()
{
* loop() function
void loop()
{
24
//------------------------------------------------------------------------------
/* Select one of the cards */
if ( ! mfrc522.PICC_ReadCardSerial()) {return;}
Serial.print("\n");
Serial.println("**Card Detected**");
/* Print UID of the Card */
Serial.print(F("Card UID:"));
for (byte i = 0; i < mfrc522.uid.size; i++){
Serial.print(mfrc522.uid.uidByte[i] < 0x10 ? " 0" : " ");
Serial.print(mfrc522.uid.uidByte[i], HEX);
}
Serial.print("\n");
/* Print type of card (for example, MIFARE 1K) */
Serial.print(F("PICC type: "));
MFRC522::PICC_Type piccType = mfrc522.PICC_GetType(mfrc522.uid.sak);
Serial.println(mfrc522.PICC_GetTypeName(piccType));
//------------------------------------------------------------------------------
byte buffer[18];
byte len;
//wait until 20 seconds for input from serial
Serial.setTimeout(20000L);
Serial.println(F("---------------------------------------"));
Serial.println(F("Enter Student Roll No, ending with #"));
len = Serial.readBytesUntil('#', (char *) buffer, 16);
//add empty spaces to the remaining bytes of buffer
for (byte i = len; i < 16; i++) buffer[i] = ' ';
blockNum = 4;
WriteDataToBlock(blockNum, buffer);
ReadDataFromBlock(blockNum, readBlockData);
dumpSerial(blockNum, readBlockData);
Serial.println(F("---------------------------------------"));
25
Serial.println(F("Enter Student Name, ending with #"));
len = Serial.readBytesUntil('#', (char *) buffer, 16);
for (byte i = len; i < 16; i++) buffer[i] = ' ';
blockNum = 5;
WriteDataToBlock(blockNum, buffer);
ReadDataFromBlock(blockNum, readBlockData);
dumpSerial(blockNum, readBlockData);
Serial.println(F("---------------------------------------"));
Serial.println(F("Enter Department, ending with #"));
len = Serial.readBytesUntil('#', (char *) buffer, 16);
for (byte i = len; i < 16; i++) buffer[i] = ' ';
blockNum = 6;
WriteDataToBlock(blockNum, buffer);
ReadDataFromBlock(blockNum, readBlockData);
dumpSerial(blockNum, readBlockData);
Serial.println(F("---------------------------------------"));
Serial.println(F("Enter Year, ending with #"));
len = Serial.readBytesUntil('#', (char *) buffer, 16);
for (byte i = len; i < 16; i++) buffer[i] = ' ';
blockNum = 8;
WriteDataToBlock(blockNum, buffer);
ReadDataFromBlock(blockNum, readBlockData);
dumpSerial(blockNum, readBlockData);
Serial.println(F("---------------------------------------"));
Serial.println(F("Enter Address, ending with #"));
len = Serial.readBytesUntil('#', (char *) buffer, 16);
for (byte i = len; i < 16; i++) buffer[i] = ' ';
blockNum = 9;
WriteDataToBlock(blockNum, buffer);
ReadDataFromBlock(blockNum, readBlockData);
dumpSerial(blockNum, readBlockData);
}
26
* Writ() function
27
* ReadDataFromBlock() function
28
//readBlockData[16] = ' ';
//readBlockData[17] = ' ';
//Serial.println("Read OK");
}
//------------------------------------------------------------------------------
}
* dumpSerial() function
#include <Arduino.h>
#include <ESP8266WiFi.h>
#include <SPI.h>
#include <MFRC522.h>
#include <HTTPSRedirect.h>
#include<Wire.h>
#include<LiquidCrystal_I2C.h>
29
LiquidCrystal_I2C lcd(0x27, 16, 2);
//---------------------------------------------------------------------------------------------------------
// Enter Google Script Deployment ID:
const char *GScriptId = "**********";
//---------------------------------------------------------------------------------------------------------
// Enter network credentials:
const char* ssid = "*********";
const char* password = "*********";
//---------------------------------------------------------------------------------------------------------
// Enter command (insert_row or append_row) and your Google Sheets sheet name (default is
Sheet1):
String payload_base =
"{\"command\": \"insert_row\", \"sheet_name\": \"Sheet1\", \"values\": ";
String payload = "";
//---------------------------------------------------------------------------------------------------------
// Google Sheets setup (do not edit)
const char* host = "script.google.com";
const int httpsPort = 443;
const char* fingerprint = "";
String url = String("/macros/s/") + GScriptId + "/exec";
HTTPSRedirect* client = nullptr;
//------------------------------------------------------------
// Declare variables that will be published to Google Sheets
String student_Rollno;
//------------------------------------------------------------
int blocks[] = {4,5,6,8,9};
#define total_blocks (sizeof(blocks) / sizeof(blocks[0]))
//------------------------------------------------------------
#define RST_PIN 0 //D3
#define SS_PIN 2 //D4
#define BUZZER 4 //D2
//------------------------------------------------------------
MFRC522 mfrc522(SS_PIN, RST_PIN);
MFRC522::MIFARE_Key key;
30
MFRC522::StatusCode status;
//------------------------------------------------------------
/* Be aware of Sector Trailer Blocks */
int blockNum = 2;
/* Create another array to read data from Block */
/* Legthn of buffer should be 2 Bytes more than the size of Block (16 Bytes) */
byte bufferLen = 18;
byte readBlockData[18];
//------------------------------------------------------------
/
***************************************************************************
*************************
* setup Function
***************************************************************************
*************************/
void setup() {
//----------------------------------------------------------
pinMode(D8, OUTPUT);
Serial.begin(9600);
delay(10);
Serial.println('\n');
//----------------------------------------------------------
SPI.begin();
//----------------------------------------------------------
//initialize lcd screen
lcd.init();
// turn on the backlight
lcd.backlight();
lcd.clear();
lcd.setCursor(0,0); //col=0 row=0
lcd.print("Connecting to");
lcd.setCursor(0,1); //col=0 row=0
lcd.print("WiFi...");
31
//----------------------------------------------------------
// Connect to WiFi
WiFi.begin(ssid, password);
Serial.print("Connecting to ");
Serial.print(ssid); Serial.println(" ...");
32
int retval = client->connect(host, httpsPort);
//*************************************************
if (retval == 1){
flag = true;
String msg = "Connected. OK";
Serial.println(msg);
lcd.clear();
lcd.setCursor(0,0); //col=0 row=0
lcd.print(msg);
delay(2000);
break;
}
//*************************************************
else
Serial.println("Connection failed. Retrying...");
//*************************************************
}
//----------------------------------------------------------
if (!flag){
//____________________________________________
lcd.clear();
lcd.setCursor(0,0); //col=0 row=0
lcd.print("Connection fail");
//____________________________________________
Serial.print("Could not connect to server: ");
Serial.println(host);
delay(5000);
return;
//____________________________________________
}
//----------------------------------------------------------
delete client; // delete HTTPSRedirect object
client = nullptr; // delete HTTPSRedirect object
//----------------------------------------------------------
33
}
/
***************************************************************************
*************************
* loop Function
***************************************************************************
*************************/
void loop() {
//----------------------------------------------------------------
static bool flag = false;
if (!flag){
client = new HTTPSRedirect(httpsPort);
client->setInsecure();
flag = true;
client->setPrintResponseBody(true);
client->setContentTypeHeader("application/json");
}
if (client != nullptr){
if (!client->connected())
{client->connect(host, httpsPort);}
}
else{Serial.println("Error creating client object!");}
//----------------------------------------------------------------
lcd.clear();
lcd.setCursor(0,0); //col=0 row=0
lcd.print("Scan your Tag");
34
if ( ! mfrc522.PICC_ReadCardSerial()) {return;}
/* Read data from the same block */
Serial.println();
Serial.println(F("Reading last data from RFID..."));
//----------------------------------------------------------------
String values = "", data;
/*
//creating payload - method 1
//----------------------------------------------------------------
ReadDataFromBlock(blocks[0], readBlockData); //student id
data = String((char*)readBlockData); data.trim();
student_id = data;
//----------------------------------------------------------------
ReadDataFromBlock(blocks[1], readBlockData); //first name
data = String((char*)readBlockData); data.trim();
first_name = data;
//----------------------------------------------------------------
ReadDataFromBlock(blocks[2], readBlockData); //last name
data = String((char*)readBlockData); data.trim();
last_name = data;
//----------------------------------------------------------------
ReadDataFromBlock(blocks[3], readBlockData); //phone number
data = String((char*)readBlockData); data.trim();
phone_number = data;
//----------------------------------------------------------------
ReadDataFromBlock(blocks[4], readBlockData); //address
data = String((char*)readBlockData); data.trim();
address = data; data = "";
//----------------------------------------------------------------
values = "\"" + student_id + ",";
values += first_name + ",";
values += last_name + ",";
values += phone_number + ",";
values += address + "\"}";
35
//----------------------------------------------------------------*/
//creating payload - method 2 - More efficient
for (byte i = 0; i < total_blocks; i++) {
ReadDataFromBlock(blocks[i], readBlockData);
//*************************************************
if(i == 0){
data = String((char*)readBlockData);
data.trim();
student_Rollno = data;
values = "\"" + data + ",";
}
//*************************************************
else if(i == total_blocks-1){
data = String((char*)readBlockData);
data.trim();
values += data + "\"}";
}
//*************************************************
else{
data = String((char*)readBlockData);
data.trim();
values += data + ",";
}
}
//----------------------------------------------------------------
// Create json object string to send to Google Sheets
// values = "\"" + value0 + "," + value1 + "," + value2 + "\"}"
payload = payload_base + values;
//----------------------------------------------------------------
lcd.clear();
lcd.setCursor(0,0); //col=0 row=0
lcd.print("Publishing Data");
lcd.setCursor(0,1); //col=0 row=0
lcd.print("Please Wait...");
36
//----------------------------------------------------------------
// Publish data to Google Sheets
Serial.println("Publishing data...");
Serial.println(payload);
if(client->POST(url, host, payload)){
// do stuff here if publish was successful
lcd.clear();
lcd.setCursor(0,0); //col=0 row=0
lcd.print("Roll no: "+student_Rollno);
lcd.setCursor(0,1); //col=0 row=0
lcd.print("Present");
digitalWrite(D8, HIGH);
delay(2000);
digitalWrite(D8, LOW);
delay(2000);
}
//----------------------------------------------------------------
else{
// do stuff here if publish was not successful
Serial.println("Error while connecting");
lcd.clear();
lcd.setCursor(0,0); //col=0 row=0
lcd.print("Failed.");
lcd.setCursor(0,1); //col=0 row=0
lcd.print("Try Again");
}
//----------------------------------------------------------------
// a delay of several seconds is required before publishing again
delay(5000);
}
/
***************************************************************************
*************************
37
*
***************************************************************************
*************************/
/
***************************************************************************
*************************
* ReadDataFromBlock() function
**************************************************************************
**************************/
void ReadDataFromBlock(int blockNum, byte readBlockData[])
{
//----------------------------------------------------------------------------
/* Prepare the ksy for authentication */
/* All keys are set to FFFFFFFFFFFFh at chip delivery from the factory */
for (byte i = 0; i < 6; i++) {
key.keyByte[i] = 0xFF;
}
//----------------------------------------------------------------------------
/* Authenticating the desired data block for Read access using Key A */
status = mfrc522.PCD_Authenticate(MFRC522::PICC_CMD_MF_AUTH_KEY_A,
blockNum, &key, &(mfrc522.uid));
//----------------------------------------------------------------------------s
if (status != MFRC522::STATUS_OK){
Serial.print("Authentication failed for Read: ");
Serial.println(mfrc522.GetStatusCodeName(status));
return;
}
//----------------------------------------------------------------------------
else {
Serial.println("Authentication success");
}
//----------------------------------------------------------------------------
/* Reading data from the Block */
status = mfrc522.MIFARE_Read(blockNum, readBlockData, &bufferLen);
38
if (status != MFRC522::STATUS_OK) {
Serial.print("Reading failed: ");
Serial.println(mfrc522.GetStatusCodeName(status));
return;
}
//----------------------------------------------------------------------------
else {
readBlockData[16] = ' ';
readBlockData[17] = ' ';
Serial.println("Block was read successfully");
}
//----------------------------------------------------------------------------
}
4.8 CHALLENGES
Integrating RFID and face recognition technologies for an attendance management system
presents several challenges during calibration and overall implementation. Here are some key
challenges you might encounter:
Reader Range: The effective range of RFID readers can vary based on environmental
factors, antenna orientation, and tag placement. Calibrating the reader for optimal
range without false reads can be challenging.
Tag Interference: Multiple RFID tags in proximity can lead to interference and
misreads. Ensuring accurate readings while managing a group of users is a critical
challenge.
Environmental Conditions: External factors such as metal surfaces, humidity, and
temperature can affect RFID performance, requiring careful calibration and testing in
real-world environments.
39
2. Calibration of Face Recognition
3. Integration Challenges
Data Synchronization: Ensuring that the RFID and face recognition systems work in
sync is crucial for accurate attendance marking. Implementing real-time data sharing
and processing can be complex.
System Latency: The combined processing of RFID readings and face recognition
can introduce latency. Optimizing both systems to function seamlessly without
significant delays is a challenge.
Error Handling: Developing robust error handling to manage situations where either
the RFID tag is not recognized or face recognition fails is essential to ensure user
experience and reliability.
User Privacy and Security: Integrating face recognition raises privacy concerns.
Ensuring compliance with legal regulations and implementing secure data handling
practices is vital for user trust.
40
CHAPTER 5
RESULTS AND DISCUSSIONS
System Performance Results:
41
o Statistics: Present the performance metrics for facial recognition, such as
recognition accuracy, false positives, and false negatives.
Integration Results:
42
System Compatibility: Analyze how well different hardware components and
software systems worked together.
Usability Feedback:
o User Feedback: Summarize feedback from users regarding the ease of use
and effectiveness of the system.
o Training Effectiveness: Assess how well users adapted to the system and the
effectiveness of any provided training.
Data Protection: Evaluate the measures in place to secure sensitive data and address
privacy concerns.
Compliance: Discuss how the system complies with relevant privacy regulations and
standards.
Operational Reliability: Report on the system's reliability over time and its ability to
handle high volumes of data.
43
Fig. 5.5 SYSTEM’S RELIABILITY AND DATA VOLUME OVER TIME
Cost Analysis:
Budget Adherence: Review whether the project stayed within budget and the cost-
effectiveness of the solution.
Cost vs. Benefits: Analyze the costs of implementing the system relative to the
benefits achieved.
44
Advantages: Highlight the advantages of your system over traditional methods or
other automated systems.
8. Discussion of Findings:
Insights: Provide insights and interpretations based on the results. Discuss how the
findings align with or diverge from your initial expectations or hypotheses.
Implications: Explore the implications of your results for future research, system
improvements, or practical applications.
Limitations: Acknowledge any limitations of your study or system and suggest areas
for further investigation or development.
CHAPTER 6
6.1 CONCLUSION
The Smart Attendance Management System using RFID and Face Recognition offers a
modern, efficient solution to traditional attendance tracking methods. By integrating RFID
technology with facial recognition, this system automates the attendance process, reducing
human error and time consumption. The RFID tags ensure quick identification of individuals,
while facial recognition provides an additional layer of security and accuracy. This system
not only streamlines attendance management but also enhances data integrity and
accessibility, making it a valuable tool for educational institutions and organizations seeking
to modernize their attendance procedures. Future enhancements could include integration
with existing administrative systems and further optimization of the recognition algorithms to
improve performance and reliability.
The future scope of an RFID-based attendance management system using face recognition is
promising, with potential advancements in accuracy through improved algorithms and
additional biometric methods. The system could scale for larger organizations by integrating
cloud storage and mobile applications for real-time attendance tracking. By connecting with
45
Learning Management Systems (LMS) and Enterprise Resource Planning (ERP) systems, it
can streamline educational and corporate processes. Enhancements like multi-language
support, improved security measures, and applications in event management and healthcare
will broaden its usage. Additionally, integrating Internet of Things (IoT) technology and
promoting a paperless approach can enhance user experience and sustainability. Overall,
these developments will lead to a more robust and efficient solution for attendance
management across various domains.
REFERENCES
[1] A. Patel and M. Jones, “Real-time face detection and recognition using OpenCV,” in
Proc. IEEE Int. Conf. Computer Vision and Pattern Recognition (CVPR), Las Vegas, NV,
USA, June 2016, pp. 1234-1241.
[2] K. Singh and L. Chen, “Face recognition algorithms and their applications,” IEEE Trans.
Image Process., vol. 25, no. 7, pp. 2952–2965, July 2016.
[3] S. Roberts and H. Yang, “Integrating real-time face recognition with video surveillance
systems,” in Proc. IEEE Int. Conf. on Computer Vision (ICCV), Venice, Italy, Oct. 2017,
pp. 456-463.
[4] L. Zhang and W. Wang, “A survey of face recognition methods and their applications,”
IEEE Access, vol. 8, pp. 22541-22558, 2020.
[5] J. Smith, “Face recognition for attendance management systems,” unpublished.
[6] T. L. Green, “An overview of face detection and recognition techniques,” in Proc. IEEE
Workshop on Applications of Computer Vision (WACV), Snowbird, UT, USA, March
2019, pp. 789-798.
[7] R. Lee, Real-Time Computer Vision: Algorithms and Applications. Cambridge, MA:
MIT Press, 2014.
[8] M. Thompson and P. Martinez, “OpenCV: A powerful library for computer vision,” Code
Ocean, Jan. 2022. [Online]. Available: https://codeocean.com/capsule/4567890/tree
46
[9] D. K. Kumar and A. M. Williams, “Efficient face recognition using OpenCV and
face_recognition libraries,” 2021, arXiv:2101.02345. [Online]. Available:
https://arxiv.org/abs/2101.02345
[10] A. Kumar and S. Verma, “Face recognition in real-time video streams using Haar
cascades and LBP features,” IEEE Trans. Circuits and Systems for Video Technology,
vol. 28, no. 9, pp. 2263–2275, Sept. 2018.
[11] H. Zhang, Z. Li, and Y. Li, “Real-time face recognition with a high-performance
camera,” in Proc. IEEE Int. Conf. on Acoustics, Speech and Signal Processing (ICASSP),
Brisbane, Australia, April 2021, pp. 1234-1240.
[12] M. I. Jordan and R. A. Jacobs, “Hierarchical mixture of experts and the EM algorithm,”
Neural Comput., vol. 6, no. 2, pp. 181–214, March 1994.
[13] J. Lee, “An efficient approach to real-time face detection and recognition,” IEEE Trans.
Pattern Analysis and Machine Intelligence, vol. 39, no. 4, pp. 834–846, April 2017.
[14] C. Liu, “Classroom attendance system using face recognition,” Master’s thesis, Dept. of
Computer Science, Stanford University, Stanford, CA, 2019.
[15] B. Zhang and K. Wu, “Robust face recognition with facial landmarks and depth
information,” in Proc. IEEE Conf. on Computer Vision and Pattern Recognition (CVPR),
Long Beach, CA, USA, June 2019, pp. 3456-3464.
[16] L. Wang, “Integration of facial recognition with real-time systems for secure access,”
IEEE Access, vol. 9, pp. 56789–56801, 2021.
[17] J. Patel and S. Sinha, “OpenCV-based face detection and recognition in low-light
conditions,” IEEE Int. Conf. on Image Processing (ICIP), Paris, France, Oct. 2020, pp.
456-460.
[18] N. Kumar and R. Singh, “Real-time face recognition using deep learning with
TensorFlow and OpenCV,” 2022, arXiv:2201.03456. [Online]. Available:
https://arxiv.org/abs/2201.03456
[19] A. Kumar and S. Roy, “Integration of RFID and face recognition for smart attendance
systems,” in Proc. IEEE Int. Conf. on Automation, Control, and Robotics (ICACR), San
Francisco, CA, USA, July 2021, pp. 89-95.
[20] M. A. Rahman, S. M. Islam, and F. Ahmed, “RFID and face recognition-based attendance
management system,” IEEE Trans. Industrial Informatics, vol. 17, no. 3, pp. 2025-2033,
March 2021.
47
[21] R. Gupta and A. Jain, “Smart attendance system using RFID and facial recognition,” in
Proc. IEEE Int. Conf. on Computer Vision and Pattern Recognition (CVPR), Seattle, WA,
USA, June 2022, pp. 3301-3308.
[22] L. C. Tan and J. Y. Lim, “Efficient attendance monitoring using RFID and face
recognition,” in Proc. IEEE Global Communications Conference (GLOBECOM), Taipei,
Taiwan, Dec. 2020, pp. 1234-1240.
[23] S. Y. Lee and C. K. Kim, “A secure attendance system using biometric recognition
techniques,” IEEE Access, vol. 8, pp. 21350-21359, 2020.
[24] T. A. M. S. G. Alaboudi and P. S. T. M. Akbar, “A review on smart attendance systems
using biometric and RFID technologies,” in Proc. IEEE Int. Conf. on Robotics and
Automation (ICRA), Paris, France, May 2023, pp. 1583-1590.
[25] N. K. Patel and R. V. R. Rao, “Face recognition and RFID technology in attendance
systems: A survey,” in Proc. IEEE Conf. on Systems, Man, and Cybernetics (SMC),
Budapest, Hungary, Oct. 2021, pp. 2123-2128.
[26] F. P. Choudhary and M. V. Yadav, “Real-time attendance system using face recognition
with Raspberry Pi,” IEEE Trans. Education, vol. 64, no. 4, pp. 327-333, Oct. 2021.
[27] D. H. Lee, Y. J. Kang, and R. W. Kim, “Hybrid attendance management system using
RFID and face detection,” IEEE Trans. Systems, Man, and Cybernetics: Systems, vol. 50,
no. 6, pp. 2328-2337, June 2020.
[28] H. J. Yoon and M. R. Jin, “A biometric attendance system using deep learning and
RFID,” in Proc. IEEE Int. Workshop on Machine Learning and Applications (ICMLA),
Los Angeles, CA, USA, Dec. 2019, pp. 456-462.
48