Iot Based Biometric Attendance System Using Arduino
Iot Based Biometric Attendance System Using Arduino
Iot Based Biometric Attendance System Using Arduino
ARDUINO.
BACHELOR OF TECHNOLOGY
IN
ELECTRICAL ENGINEERING
By
AT
CERTIFICATE
This is to certify that the project work entitled, IOT based Biometric Attendance system
using Arduino is the bonafide work carried out by:
1. SANKHA SUDHA GHOSH. (11701617005)
2. SWAPNADIP MONI. (11701616016)
3. UPAL GANGOPADHYAY. (11701616012)
4. MONOJEET DAS. (11701617013)
a student of B.Tech in the Dept. of Electrical Engineering, RCC Institute of Information
Technology (RCCIIT), Canal South Road, Beliaghata, Kolkata-700015, affiliated to Maulana
Abul Kalam Azad University of Technology (MAKAUT), West Bengal, India, during the
academic year 2019-20, in partial fulfillment of the requirements for the degree of Bachelor
of Technology in Electrical Engineering and that this project has not submitted previously for
the award of any other degree, diploma and fellowship.
______________________________ ____________________________
___________________________
It is our great fortune that we have got opportunity to carry out this project work under the
supervision of Mr. Dipankar Santra in the Department of Electrical Engineering, RCC Institute
of Information Technology (RCCIIT), Canal South Road, Beliaghata, Kolkata-700015, affiliated
to Maulana Abul Kalam Azad University of Technology (MAKAUT), West Bengal, India. We
express our sincere thanks and deepest sense of gratitude to our guide for his constant support,
unparalleled guidance and limitless encouragement.
We wish to convey our gratitude to Prof. (Dr.) Debashish Mondal, HOD, Department of
Electrical Engineering, RCCIIT and to the authority of RCCIIT for providing all kinds of
infrastructural facility towards the research work.
Thanks to the fellow members of our group for working as a team.
Respected Sir,
We declare that the thesis submitted is our own, expected as acknowledge in the test and
reference and has not been previously submitted for a degree in any other Institution.
Yours Sincerely,
List of figures i
List of table ii
Abbreviations and acronyms iii
Abstract 1
Chapter 1 (Introduction)
1.1 Introduction. 4
1.2 R307/R305 Fingerprint sensor module. 7
1.3 Working principle of fingerprint sensor. 8
1.4 Preparing your Thingsboard account. 9
1.5 Preparing the ESP8266-01 Wi-fi Module. 11
1.6 Overview and benefits of the project. 12
1.7 Organization of thesis. 14
Chapter 3 (Theory)
3.1 R307 Fingerprint Sensor. 23
3.2 Operation Principle. 23
3.3 Technical Parameters. 24
3.4 Features. 25
3.5 Interface Description. 28
3.6 Working of fingerprint sensor and push buttons. 28
3.7 Implementation . 29
3.8 Pin Configuration. 31
3.9 R307 Memory and Registers. 33
3.10 R307 Communication Protocol. 35
6.1 Conclusion. 55
6.2 Results. 56
6.3 Future work & Scope. 56
6.3.1 Different ways of making and usage of biometric attendance system 57
Chapter 7 (References) 62
i
LIST OF TABLES:
ii
Abbreviations and Acronyms:
iii
ABSTRACT
In industrial and domestic applications attendance registering is important at each and every
moment. Many face a lot of problems due to lack of proper attendance monitoring system. In this
project we use Fingerprint Sensor (R307) which senses the Fingerprint of a particular person; a
buzzer and Led gets activated whenever a person places his finger on the sensor. Then the
fingerprint is stored in cloud with id no. Many people can store their fingerprints. Then next time
any person puts their finger on the sensor it checks there are any matching fingerprints or not. If
his fingerprint matches with any of the stored fingerprints then the LCD display shows which
person it is and the time & date of checking.
In this model, all the fingerprints are stored each and every time someone places his finger. User
can connect the system wirelessly with the cloud and monitor the process. When the app is
running on the computer, data sent by R307 fingerprint module is received and stored on the
cloud and displayed in serial monitor and 16*2 LCD display module.
This study has mainly focused to develop IOT based biometric attendance system, that is able to
keep record of attendance and count the data for daily purpose. In this project we are going to
design Fingerprint Sensor Based Biometric Attendance System using Arduino. Simply we will
be interfacing fingerprint sensor with Arduino, LCD Display & RTC Module to design the
desired project. In this project, we are using fingerprint Module and Arduino to take and keep
attendance data and records.
Attendance systems are commonly used systems to mark the presence in offices and schools.
From manually marking the attendance in attendance registers to using high-tech
applications and biometric systems, these systems have improved significantly. This project has
a wide application in school, college, business organization, offices where marking of attendance
is required accurately with time.
By using the fingerprint sensor, the system will become more secure for the users.
Biometric student attendance system increases the efficiency of the process of taking student
1
attendance. This presents a simple and portable approach to student attendance in the form of an
Internet of Things (IOT) based system that records the attendance using fingerprint based
biometric scanner and stores them securely over cloud. This system aims to automate the
cumbersome process of manually taking and storing student attendance records. It will also
prevent proxy attendance, thus increasing the reliability of attendance records. The records are
securely stored and can be reliably retrieved whenever required by the teacher.
Proper attendance recording and management has become important in today’s world as
attendance and achievement go hand in hand. Attendance is one of the work ethics valued by
employers. Most of the educational institutions and government organizations in developing
countries still use paper based attendance method for maintaining the attendance records. There
is a need to replace these traditional methods of attendance recording with biometric attendance
system. The unique nature of fingerprint makes it ideal for use in attendance management
systems. Besides being secure, Fingerprint based attendance system will also be environment
friendly. Fingerprint matching is widely used in forensics for a long time. It can also be used in
applications such as identity management and access control. This review incorporates the
problems of attendance systems presently in use, working of a typical fingerprint based
attendance system, study of different systems, their advantages, disadvantages and comparison
based upon important parameters.
2
Chapter 1
(Introduction)
3
INTRODUCTION
1.1 Introduction
In the World of Technology, Biometrics plays an effective role in identifying Human beings.
Through this project, you will develop a unique system that can identify students for attendance
purpose using their fingerprints.
In this project, we are going to design a Fingerprint Sensor Based Biometric Attendance System
using Arduino. Simply we will be interfacing fingerprint sensor with Arduino, LCD
Display & RTC Module to design the desired project. In this project, we used the fingerprint
Module and Arduino to take and keep attendance data and records.
Biometric Attendance systems are commonly used systems to mark the presence in offices and
schools. This project has a wide application in school, college, business organization, offices
where marking of attendance is required accurately with time. By using the fingerprint sensor,
the system will become more secure for the users.
You will need an Arduino Uno board for interfacing microcontroller with the Finger Print
Scanner R307/R305. So with the help of Finger Print Scanner R307/R305, we will store the
finger prints of all the students and once they are stored, the Finger Print Scanner will compare
the present finger print on the scanner and previously stored finger prints. If any finger print is
matched, the microcontroller will print the concern data stored for the particular finger print on
the LCD Display. In addition to this, we can add Wi-Fi module, to upload the data into remote
cloud, so as to access the entire unit from the sole system of it from anywhere in the world.
Attendance plays a major role in educational institutions. The most common means of taking
attendance in the classroom is by calling out the roll numbers of students or asking the students
to manually sign the attendance sheet, which is passed around during the lecture. The process of
manually taking and maintaining the attendance records becomes highly cumbersome.
Biometric systems have reached a sufficiently advanced stage wherein they can now be deployed
in systems without hampering portability. With the recent development of various cloud based
computing and storage systems, data can be securely stored and retrieved whenever required.
Primarily, fingerprints and iris images are considered to be the most reliable for use in biometric
4
systems.
A system that records the attendance making use of biometric scanners and stores them securely
over cloud in the form of Google Spreadsheet can help resolve issues. The system consists of a
fingerprint scanner which is used for ascertaining a student’s identity. If the fingerprint scanned
matches with records present in the database, attendance is granted to the student by updating to
the.Google.Spreadsheet.
IoT based Biometric Attendance system using Arduino and Thingsboard and Adafruit
Fingerprint Sensor Library.
Few years back if you were to tell someone that the Geyser and bedroom lights in your home are
connected to internet, they would be baffled and might even criticize it as over-engineered
products. But today with the advent of IoT, Smart cities etc the idea no longer sounds strange, we
have devices around us that have become smarter by being able to communicate with the
internet.
In this project our aim is to leverage this IoT into the boring attendance system to make it smart
and more effective. Most conventional attendance systems available today store the information
over a micro SD card and have to be connected to software via a computer to access the
information. Here, we will build a biometric attendance system using Arduino that scans for
finger print and on successful identification of the person it will log the information to a cloud
platform like ThingsBoard by using the ESP8266 Wi-Fi module. This information can then be
displayed in the dashboard of ThingsBoard making it available for the required authorities to
view and analysis information over the internet without having any direct physical access to the
hardware. However the conventional Attendance system without involving IoT can also be built
by following the link and Finger print sensor can be further used for many other biometric
applications like Voting Machine, Security system etc.
Presently, attendance of students in most institutes is taken by the teacher on paper based
attendance registers. There are various disadvantages to this approach such as data is not
available for analysis because paper based registers are not uploaded to a centralized system,
time taken for data collection reduces the effective lecture time and fake attendance by students.
Some universities also use wall mounted RFID swipe card systems. RFID (Radio Frequency
5
Identification) is a wireless technology which uses electromagnetic waves for communication
between RFID reader and RFID tag. Though better than paper based systems, RFID based
systems also have certain problems such as the system is complex, costly and absent student’s
card can be swiped by other students.
Biometric techniques can be used to solve these problems. Biometric is derived from two Greek
roots “bios” meaning life and “metrics” meaning measurement. Biometric technology identifies a
person uniquely based on his/her characteristics which can be physiological or behavioral.
Among the various biometric techniques, there are nine main biometric techniques which are
widely used. These include fingerprint, face, hand vein, hand geometry, iris, retinal pattern, voice
print, signature, and facial thermo grams. Comparison of different biometric techniques has
shown that fingerprint biometric is a reliable, mature and legally accepted biometric technique.
Therefore, Fingerprint based attendance system can be used for identification of large number of
students in universities and also for attendance monitoring of employees in organizations. There
are two stages of working of these systems 1) Enrolment of fingerprints. 2)
Matching.of.Fingerprints.
6
Pre-requisites
We will be writing two Arduino scripts for this program. One for the ESP8266-01 Module and
the other is for Arduino UNO. The reason is that Arduino was not able to handle both GT511C3
sensor and ESP8266 through AT commands via software serial. Hence we will write two codes,
one for Arduino in which it will communicate with the FPS and send the obtained values via
software serial to ESP8266. The other code will be written for ESP8266 which will enable the
module to be connected to the Thingsboard server and then will receive the values from Arduino
through serial communication to update them on Thingsboard Dashboard.
This is a fingerprint sensor module with TTL UART interface for direct connections to
microcontroller UART or to PC through MAX232 / USB-Serial adapter. The user can store the
fingerprint data in the module and can configure it in 1:1 or 1: N mode for identifying the person.
The Fingerprint module can be directly interfaced with any microcontroller as well as Arduino
Board. This optical biometric fingerprint reader with great features and can be embedded into a
variety of end products like access control system, attendance system, safety deposit box, car
door locking system.
Features:
1. Integrated image collecting and algorithm chip together, ALL-in-One
2. Fingerprint can conduct secondary development & embedded into a variety of end products
5. Good image processing capabilities can successfully capture image up to resolution 500 dpi
Fingerprints are one of the many unique biometric signatures which we can use to identify
people very accurately. But just by holding someone's hand and staring at their fingers can't be
practical [grins]; we're not good at it. But computers are good at recognizing and matching
7
patterns very fast and accurately. Before we can process a fingerprint pattern with a computer,
we must "capture" it.
R307 Fingerprint Module consists of optical fingerprint sensor, high-speed DSP processor, high-
performance fingerprint alignment algorithm, high-capacity FLASH chips and other hardware
and software composition, stable performance, simple structure, with fingerprint entry, image
processing, fingerprint matching, search and template storage and other functions.
Table:01
Difference Between R305 (Old) and R307 (New)
R305 R307
Storage Capacity(Fingerprints) 250 1000
3.3V Operation No Yes
USB Operation No Yes
Finger Detect Output No Yes
These are the reasons why we used the R307 module over the R305 module.
8
Figure 2: Fingerprint capture technique
An optical fingerprint scanner works based on the principle of Total Internal Reflection (TIR).
In an optical fingerprint scanner, a glass prism is used to facilitate TIR. Light from an LED
(usually blue color) is allowed to enter through one face of the prism at a certain angle for the
TIR to occur. The reflected light exits the prism through the other face where a lens and
an image sensor or the camera or reflector inside it (essentially camera) are placed.
When there's no finger on the prism, the light will be completely reflected off from the surface,
producing a plain image in the image sensor. When TIR occurs, a small amount of light leaked to
the external medium and it is called the Evanescent Wave. Materials with different refractive
indexes (RI) interact with the evanescent wave differently. When we touch a glass surface, only
the ridges make good contact with it. The valleys remain separated from the surface by air
packets. Our skin and air have different RIs and thus affect the evanescent field differently. This
effect is called Frustrated Total Internal Reflection (FTIR). This effect alters the intensities of
the internally reflected light and is detected by the image sensor. The image sensor data is
processed to produce a high contrast image which will be the digital version of the fingerprint.
In capacitive sensors, which are more accurate and less bulky, there's no light involved. Instead,
an array of capacitive sensors are arranged on the surface of the sensor and allowed to come in
contact with the finger. The ridges and air packets affect the capacitive sensors differently. The
data from the sensor array can be used to generate a digital image of the fingerprint.
On ThingsBoard we have two important terms, Assets and Devices. You can think of assets as
buildings, warehouses, industry, farmland etc and devices as the sensor or devices present in that
particular asset. So every asset will have one or more devices in it based on the project, here we
will have one asset and one device in our asset.
Once the details are entered just click on Add and our asset will be created. Note that I have
named by asset as “RCCIIT EE Department”. Once the asset is created we can notice it
appearing on the window.
10
After creating our asset and device, go back to our asset tab and click on the asset that we just
created. My asset is named as “RCCIIT EE Department”. This will slide in a pop-up from the
right, now select relations tab in the new pop-up and over outbound relations click on add (+)
symbol to get the following pop-up
Select entity type as Device and enter the name of the device that we created earlier. My device
name was “RCC FPS Main Gate” which I have entered above. Finally click on Add button to
add then the device relationship to asset to the network for the relation coordination.
11
Once the IDE is ready we can begin the program by adding the required libraries and providing
the Wifi credential and password with the Token value that we obtained earlier. Then create a
Wi-Fi client that connects to the Thingsboard demo page.
Important: Make sure you change the TOKEN and Wi-Fi credentials according to your device.
Inside the setup function we will begin the serial communication at 9600 baud rate and initialize
the Wi-Fi module to connect to the Wi-Fi router. Finally we will connect our Wi-Fi client to the
ThingsBoard server.
Inside the loop function we will constantly check if the connection to server is active, if not we
will try a reconnection using the reconnect function. If the client connection is successful the
program will check for incoming data from the Serial monitor, if data is received it will
converted to string and stored in the variable called Name. This variable will then be sent to the
ThingsBoard server in json format using the function Send_to_Thingsboard(). If there is no serial
data coming in then we will just maintain the client connection by using the line client.loop().
Thingsboard server accepts information in form of JSON, so we have to construct our payload
from ESP8266 in JSON format. We can do that by simply using string cascading function in
Arduino. We also name our payload as “Name”. The attributes has to mention the size of the
payload that we are sending to Thingsboard. Since the number of characters in each employee
name will vary our payload will not have a fixed attribute value so we set it to a maximum of
100. Then to send them over ESP8266 we have to convert the String to char using the
toCharArraymethod and finally send it using the client.publish option. Note the
v1/devices/me/telemetry should not be changed.
No legal issues
obtaining access to or traversing properties with hard lines is extremely difficult.
Extended range
Unlike much of the equipment on the market, Remote Control Technology’s wireless remote
equipment has long-range communication capabilities — up to 5 miles.
Higher profits
Wireless remote switching systems eliminate the costly, labor-intensive process of trenching and
laying wire. As a result, the contractor can enjoy an increased profitability of 200 percent or
more in this facet of the job.
Chapter 2 deals with the literature reviews. From this chapter we can see before our project who
else works on this topic and how our project is different and advance from those projects.
Chapter 3 deals with the theory required to do the project. The basic of operation of R307/R305
Fingerprint sensor and how to interface with ARDUINO and THINGSBOARD are described
there.
Chapter 4 deals with the hardware modeling of the projects. The main features, photographs,
step by step operation of the prototype, component listing and the hardware interfacing of the
required components are described here.
Chapter 5 describes the operation of the prototype circuit. A flow chart is presented on the
actions which describes the principle of R307 Fingerprint sensor detection. Once the temperature
is measured by the sensor the controller display it over a 16X2 LCD screen and send it to a
remote device through Bluetooth.
Chapter 6 concludes the work performed so far. The possible limitations in proceeding research
towards this work are discussed. The future work that can be done in improving the current
scenario is mentioned. The future potential along the lines of this work is also discussed.
Appendix A, B & C Hardware description, software coding and datasheets are listed here.
14
CHAPTER 2
(Literature Review)
15
M A Muchtar, Seniman, D Arisandi, S Hasanah “Attendance fingerprint identification system
using arduino and single board computer” 2nd International conference on computing and
applied informatics 2017
2nd International Conference on Computing and Applied Informatics 2017 IOP Publishing
IOP Conf. Series: Journal of Physics: Conf. Series 978 (2018) 012060 doi :10.1088/1742-
6596/978/1/012060
2nd International Conference on Computing and Applied Informatics 2017 IOP Publishing
IOP Conf. Series: Journal of Physics: Conf. Series 978 (2018) 012060 doi :10.1088/1742-
6596/978/1/012060
Abstract. Fingerprint is one of the most unique parts of the human body that distinguishes one
person from others and is easily accessed. This uniqueness is supported by technology that can
automatically identify or recognize a person called fingerprint sensor. Yet, the existing
Fingerprint Sensor can only do fingerprint identification on one machine. For the mentioned
reason, we need a method to be able to recognize each user in a different fingerprint sensor. The
purpose of this research is to build fingerprint sensor system for fingerprint data management to
be centralized so identification can be done in each Fingerprint Sensor. The result of this
research shows that by using Arduino and Raspberry Pi, data processing can be centralized
so that fingerprint identification can be done in each fingerprint sensor with 98.5 % success
rate of centralized server recording.
Nur Izzati Zainal, Khairul Azami Sidek, Teddy Surya Gunawan, Hasmah Mansor, and Mira
Kartiwi “Design and Development of portable classroom attendance system based on
Arduino and fingerprint biometric" Department of Electrical and computer
engineering,kulliyah of engineering, department of information systems , kulliyyah of
information and communications technology, international Islamic university Malaysia, Kuala
Lampur, Malaysia
In this paper, the design and development of a portable classroom attendance system based on
fingerprint biometric is presented. Among the salient aims of implementing a biometric feature
into a portable attendance system is security and portability. The circuit of this device is
strategically constructed to have an independent source of energy to be operated, as well as its
miniature design which made it more efficient in term of its portable capability. Rather than
16
recording the attendance in writing or queuing in front of class equipped with fixed fingerprint or
smart card reader. This paper introduces a portable fingerprint based biometric attendance
system which addresses the weaknesses of the existing paper based attendance method or long
time queuing. In addition, our biometric fingerprint based system is encrypted which preserves
data integrity.
Khin San Myint, Chan Mya Mya Nyein “Fingerprint Based Attendance System Using Arduino”
Department of Electronic Engineering, Technological University (Sagaing)
DOI: 10.29322/IJSRP.8.7.2018.p7967 http://dx.doi.org/10.29322/IJSRP.8.7.2018.p7967
Design and Development of Portable Classroom Attendance System
Based on Arduino and Fingerprint Biometric
Design and Development of Portable Classroom Attendance System
Based on Arduino and Fingerprint Biometric
Design and Development of Portable Classroom Attendance System
Based on Arduino and Fingerprint Biometri
Abstract- Attendance system is required in many different places such as offices, companies,
schools, organizations and institutions, etc. There are many attendance systems to take
attendance. But, every place need to have a good system. This paper describes one of the
attendance systems. The main objective of this paper is to study and construct the attendance
system using fingerprint module. In this system, Arduino UNO controller and PLX DAQ tool are
the main components to display the record on Excel.
In this paper, we proposed a system which maintains the attendance records of students
automatically. Manual entering of attendance in log books becomes a difficult task and it also
wastes the time. Reading out the names of each student, each hour destroys the precious time. So
we designed an efficient module that comprises of a fingerprint sensor to manage the attendance
records of students. Our module enrolls the student’s as well as staff’s fingerprints. This
17
enrolling is a onetime process and their fingerprints will be stored in the fingerprint sensor.
During enrolling of fingerprints alone we require a system since it is a onetime process. You can
have your own roll number as your fingerprint id which will be unique for each student and staff.
After enrolling process gets completed you can disconnect the module from the system and insert
a 9v battery into the module. This will provide power when the module is not connected with the
system. Then the module can be taken to the class and the presence of students can be get. The
presence of each students will be updated in a database and the data will be passed to the server
using Wi-Fi. If a student is absent for a particular class automatically a SMS will be sent to their
parents. If a student is absent continuously for more than three days a message intimating the
parents to meet the HOD will be sent automatically. So everything here gets automated. Also a
unique username and password for staff members are given in a website we create and the
website can display the student’s details, their attendance percentage which makes the work
simple. Also mails and messages can be sent by the staff members using that site to intimate any
urgent messages to the parents.
Lia Kamelia, Eki Ahmad Dzaki Hamidi, Wahvudin Darmalaksana, Afit Nugraha, “Real-Time
Online Attendance System Based on Fingerprint and GPS in the Smartphone” UIN Sunan
Gunung Djati, Department of Electrical Engineering, Bandung, Indonesia
Real-time online attendance method is helpful for workers who do a lot of activities outside the
office or workers with multi-schedule. The attendance system using online biometric fingerprint
system will reduce the problems caused by manual system usage such as lags in data
management. The purpose of the research is to constructs an online presence system that
combines fingerprint modules and GPS. The ZFM-20 fingerprint module is used as the system's
main input as well as a security tool as an entrance to get access to the entire system. GPS
module is applied to determine the user's location and sends it to the smartphone. Arduino
module in the system will send a text message to the parties concerned about the user's location
data automatically. Each module works well and testing the entire system showed the system
work reliable according to the initial scenario. The User can access the report using SMS,
website, and application on the Android smartphone. The fingerprint sensor can determine the
fingerprint stored in the database with an average response time of 1.39 seconds, and GPS can
determine latitude and longitude with an average error of 0.007352% and 0.0003% respectively.
18
A. Jain, L. Hong , S. Pankanti, and R. Bolle , “An Identity Authentication System Using
Fingerprints”, Proceedings of the IEEE, Vol. 85, Issue 9, 1997, pp. 1365-1388.
Abstract- Proper attendance recording and management has become important in today’s world
as attendance and achievement go hand in hand. Attendance is one of the work ethics valued by
employers. Most of the educational institutions and government organizations in developing
countries still use paper based attendance method for maintaining the attendance records. There
is a need to replace these traditional methods of attendance recording with biometric attendance
system. The unique nature of fingerprint makes it ideal for use in attendance management
systems. Besides being secure, Fingerprint based attendance system will also be environment
friendly. Fingerprint matching is widely used in forensics for a long time. It can also be used in
applications such as identity management and access control. This review incorporates the
problems of attendance systems presently in use, working of a typical fingerprint based
attendance system, study of different systems, their advantages, disadvantages and comparison
based upon important parameters.
Piyush Devikar, Ajit Krishnamoorthy, Aditya Bhanage, Mohit Singh Chauhan Department of
Electronics and Telecommunication Engineering, Vivekanand Education Society’s Institute of
Technology, Mumbai University, Mumbai, India.
Abstract: Biometric student attendance system increases the efficiency of the process of taking
student attendance. This paper presents a simple and portable approach to student attendance in
the form of an Internet of Things (IOT) based system that records the attendance using
fingerprint based biometric scanner and stores them securely over cloud. This system aims to
automate the cumbersome process of manually taking and storing student attendance records. It
will also prevent proxy attendance, thus increasing the reliability of attendance records. The
records are securely stored and can be reliably retrieved whenever required by the teacher.
19
Abstract - Authentication is one of the vital concern in this era of information system. . Inclusive
of the other techniques, Human Face Recognition (HFR)is one ofthe techniques which is used
for user authentication . HFR has been extensively used in many appliances asin , video
conferencing,military services and attendance systems . Maintaining attendance is difficult
process if it is done manually. The automated attendance system for administrating the
attendance can be put into effect using the several ways of biometrics. Usage of this system can
resolve the issue of fake attendance and proxies. Instead of recording the attendance in writing,
taking attendance through fingerprint and face recognition will make it a hassle free process.
Niharika Yadu(1) , K Uma(2) Research Scholar, Dept. of Electronics Engineering, BIT, Durg,
C.G., India(1) Associate Professor, Dept. of Electronics Engineering, BIT, Durg, C.G., India(2)
“A Review on Real Time IOT Based advanced E-attendance System.”
Abstract: If we talk about the current scenario of our education system then we found that we
have a lot of technologies to use but still we are following the traditional system. If we talk about
the attendance system in universities and schools, lecturers did that work manually. Lecturers
take the attendance and update it manually in the database. If we combine the fingerprint sensor
and RFID sensor with IOT (Internet of Things) than we can do it automatically and there is no
need to do it by lecturers. We can use IOT and finger print sensor for better performance. IOT
data is directly store on server in real time so we can access it from anywhere and anytime which
will provide us with better proficiency and flexibility.
”Biometric Student Attendance System using IoT”, Sameer Kanse , Monish Shaikh, Siddesh
Gadhari , Pravin Labde , Prof. Anuprita Gawande. Department of Electronics and
Telecommunication Engineering, Shivajirao S. Jondhle College of Engineering & Technology,
Asangaon, Mumbai University, India.
21
CHAPTER 3
(THEORY)
22
3.1 R307 Fingerprint Sensor
Fingerprints are one of the many unique biometric signatures which we can use to identify
people very accurately. But just by holding someone's hand and staring at their fingers can't be
practical [grins]; we're not good at it. But computers are good at recognizing and matching
patterns very fast and accurately. Before we can process a fingerprint pattern with a computer,
we.must."capture".it.
There exists many methods to digitize fingerprints; from forensic methods to ultrasound
scanning. In this tutorial, we will learn how an Optical Fingerprint Scanner works and how we
can interface the R307 fingerprint scanner module to Arduino. R307 is an optical fingerprint
scanner module from R30X series produced by a Chinese vendor called Hangzhou Grow
Technology Company Limited. Other sensors in the series
are R300, R301T, R302, R303, R303T, R305, R306, R308, and R311, some of which are
capacitive sensors. Despite having different sensing techniques and form-factors, they all share
the same interface and command set. Therefore it is easy to adapt the library that you find here
for other models as well.
R307 Fingerprint Module consists of optical fingerprint sensor, high-speed DSP processor, high-
performance fingerprint alignment algorithm, high-capacity FLASH chips and other hardware
and software composition, stable performance, simple structure, with fingerprint entry, image
processing, fingerprint matching, search and template storage and other functions.
Fingerprint processing includes two parts: fingerprint enrollment and fingerprint matching (the
matching can be 1:1 or 1:N).
When enrolling, user needs to enter the finger two times. The system will process the two time
finger images, generate a template of the finger based on processing results and store the
template. When matching, user enters the finger through optical sensor and system will generate
a template of the finger and compare it with templates of the finger library. For 1:1 matching,
system will compare the live finger with specific template designated in the Module; for 1:N
23
matching, or searching, system will search the whole finger library for the matching finger. In
both circumstances, system will return the matching result, success or failure.
24
3.4 Features
The skin on the palms of our hands have a special pattern called friction ridges that help us grab
things effectively without slipping. These patterns consist of ridges and valleys arranged in
25
certain configurations and is unique for each individual. Our finger tips also have them as you
can see from the above image. When a finger comes in contact with a surface, the ridges make
strong contact with the surface. When we strongly grab something, the moisture, oil, dirt and
dead skin cells on our finger can attach to the surface of the material, leaving an impression we
call a fingerprint. Various forensic methods involving the use chemicals are used to extract such
fingerprints from crime scenes and are called latent fingerprints. But an optical fingerprint
scanner works a bit differently.
An optical fingerprint scanner works based on the principle of Total Internal Reflection (TIR). In
an optical fingerprint scanner, a glass prism is used to facilitate TIR. Light from an LED (usually
blue color) is allowed to enter through one face of the prism at a certain angle for the TIR to
occur. The reflected light exits the prism through the other face where a lens and an image
sensor (essentially.camera).are.placed.
When there's no finger on the prism, the light will be completely reflected off from the surface,
producing a plain image in the image sensor. When TIR occurs, a small amount of light leaked to
the external medium and it is called the Evanescent Wave. Materials with different refractive
indexes (RI) interact with the evanescent wave differently. When we touch a glass surface, only
the ridges make good contact with it. The valleys remain separated from the surface by air
packets. Our skin and air have different RIs and thus affect the evanescent field differently. This
effect is called Frustrated Total Internal Reflection (FTIR). This effect alters the intensities of the
internally reflected light and is detected by the image sensor. The image sensor data is processed
26
to produce a high contrast image which will be the digital version of the fingerprint.
In capacitive sensors, which are more accurate and less bulky, there's no light involved. Instead,
an array of capacitive sensors are arranged on the surface of the sensor and allowed to come in
contact with the finger. The ridges and air packets affect the capacitive sensors differently. The
data from the sensor array can be used to generate a digital image of the fingerprint.
Above is a cross-sectional diagram that I made to better understand the construction (illustrative
only, not a physically exact one). Opening the module was easy; there are four Philips screws on
the back. Unscrew them and you can remove the PCB. There are two PCBs; one arranged
horizontally and one vertically (shown in washed green). These PCBs are connected by solder.
The four blue LEDs and the touch sense pad are on the horizontal PCB. The vertical PCB has the
image sensor, the processor and connector. When inserted, the touch sense pad comes in contact
with the glass block above. The image sensor is soldered and glued. Strangely, I couldn't find
any lens on it. May be it doesn't need one. The enclosure has an internal barrier to separate the
light from the LEDs and the light coming out of the prism. On the bottom side of the prism
27
a black epoxy is coated which gives a high-contrast background for the fingerprint image. To
access the prism, just remove the cap on the front.
The R307 fingerprint module has two interface TTL UART and USB2.0, USB2.0 interface can
be connected to the computer; RS232 interface is a TTL level, the default baud rate is 57600 ,
can be changed, refer to a communication protocol ; can And microcontroller, such as ARM,
DSP and other serial devices with a connection, 3.3V 5V microcontroller can be connected
directly. Needs to connect the computer level conversion, level conversion note , embodiments
such as a MAX232circuit.
We use Fingerprint Sensor module to authenticate a true person or employee by taking their
finger input in the system. Here we are using 4 push buttons to enroll, Delete, UP/Down.
ENROLL and DEL key has triple features. ENROLL key is used for enrollment of a new person
into the system. So when the user wants to enroll new finger then he/she need to press ENROLL
key then LCD asks for the ID, where user want to be store the finger print image. Now if at this
time user does not want to proceed further then he/she can press ENROLL key again to go back.
This time ENROLL key behave as Back key, i.e. ENROLL key has both enrollment and back
function. Besides enroll key is also used to download attendance data over serial monitor.
Similarly, DEL/OK key also has the same double function like when user enrolls new finger,
then he/she need to select finger ID by using another two key namely UP and DOWN. Now user
need to press DEL/OK key (this time this key behave like OK) to proceed with selected ID. And
Del key is used for reset or delete data from EEPROM of Arduino.
Fingerprint sensor module captures finger’s print image and then converts it into the equivalent
template and saves them into its memory as per selected ID by Arduino. All the process is
commanded by Arduino like taking an image of finger’s print, convert it into templates and
storing as ID etc. You can check some more projects using fingerprint module. Here we have
added a LED which indicates that fingerprint module is ready to take an image of the finger. A
buzzer is also used for various indications. Arduino is the main component of this system it is
responsible for control of the whole system.
28
First of all, the user needs to enroll fingerprints of the user with the help of push buttons. To do
this, user need to press ENROLL key and then LCD asks for entering ID for the fingerprint to
save it in memory by ID name. So now user needs to enter ID by using UP/DOWN keys. After
selecting ID, user needs to press OK key (DEL key). Now LCD will ask to place finger over the
fingerprint module. Now user needs to place his finger over finger print module and then the
module takes finger image. Now the LCD will say to remove finger from fingerprint module,
and again ask to place finger again. Now user needs to put his finger again and module takes an
image and convert it into templates and stores it by selected ID into the finger print module’s
memory. Now the user will be registered and he/she can feed attendance by putting their finger
over fingerprint module. By the same method, all the users will be registered into the system.
Now if the user wants to remove or delete any of the stored ID or fingerprint, then he/she need to
press DEL key. Once delete key is pressed LCD will ask to select ID that need to be deleted.
Now user needs to select ID and press OK key (same DEL key). Now LCD will let you know
that fingerprint has been deleted successfully.
Whenever user place his finger over fingerprint module then fingerprint module captures finger
image, and search if any ID is associated with this fingerprint in the system. If fingerprint ID is
detected then LCD will show Attendance registered and in the same time buzzer will beep once
and LED will turn off until the system is ready to take input again.
Along with the fingerprint module, we have also used an RTC module for Time and date.
Time and date are running continuously in the system. So Arduino take time and date whenever
a true user places his finger over fingerprint and save them in the EEPROM at the allotted slot of
memory.
Here we have created 5 user space in this system for 30 days. By pressing the RESET button in
Arduino and then immediately enroll key will be responsible for downloading attendance data
over serial monitor from the Arduino EEPROM Memory.
3.7 Implementation:
29
3. Once your finger is scanned, the scanner will generate template by Image Processing method
which will be stored for comparing
4. Like this we will store all the templates of different people
5. So when we place our finger, the scanner will scan the finger and it will generate template
and this template will be compared with previously stored templates
6. If both templates are matched, then certain people data stored will be shown on the LCD
The data regarding how many students were present on day to day basis can be updated in
remote cloud rather maintain ledgers and record books and can be retrieved whenever we want.
The working of the Fingerprint Sensor Based Biometric Attendance System. In this project, we
have used a DS3231 RTC Module for time & date display. We used 1 LED for power indication,
1 buzzer for different function indication. We have interfaced 16*2 LCD which displays
everything whenever the finger is placed or removed, or registering attendance or downloading
data.
We have used 4 push buttons which are used to control the entire system. The functions of each
button are:
1. Register/Back Button -- Used for enrolling new fingerprint as well as reversing the back
process or going back
2. Delete/OK Button -- This Button is used for deleting the earlier stored fingerprint system as
well as granting access as an OK selection.
3. Forward Button -- Used for moving forward while selecting the memory location for storing
or deleting fingerprints.
4. Reverse Button -- Used for moving backward while selecting memory location for storing or
deleting fingerprints.
30
To delete the fingerprint which is already clicked on DEL Button. Then select the memory
location where your fingerprint was stored earlier using the UP/DOWN button. Then click on
OK. So finally your fingerprint is deleted.
Downloading Data:
Simply click on Register/Back Button and reset the button together. At this movement, the serial
monitor should be opened.
1 5V Regulated 5v DC
31
6 3.3V Use this wire to give 3.3V to sensor instead of 5V
The scanner can be interfaced and powered from both 3.3V and 5V supplies. The working
voltage of the scanner controller is always 3.3V. There's a 3.3V regulator on the PCB. The 5V
supply you provide goes to the input of that regulator, and the 3.3V you supply bypasses the
regulator and goes directly to the fingerprint scanner controller.
When you want to power the scanner from 5V and interface with a 5V microcontroller, supply
the power to the pins 1 and 6, and disconnect the 3.3V jumper shown in the picture. If you want
to supply 3.3V and interface the scanner with a 3.3V microcontroller such as Arduino Due,
supply the power to pins 1 and 6 and short the 3.3V jumper. Improper voltages and
configurations might damage the controller. So be careful with it.
The pin 6 (Touch Sense Power) is the supply voltage for the finger detection circuit. When a
finger is present on the scanner, the output of pin 5 (Touch Sense) will be high. This signal can
be used to initiate the scanning of the finger manually. Otherwise the scanner will wait for some
time.to.detect.the.finger.
The R307 has both USB and UART interfaces. With the USB, you can directly connect the
scanner to a computer and communicate with it. A virtual COM port will be created when you
connect the scanner to a Windows PC. If you want to interface the scanner with a
microcontroller, you can use the UART interface which supports baud rates up to 115200 bps.
The R307 Manual is the only document to our rescue, and it is ambiguous at many places.
The R30X Series Manual has some more information. The below schematic is included in the
manual.
1. Notepad - This is a 512 bytes of the non-volatile flash memory. It is logically divided into 16
pages with 32 bytes each. Instructions GR_WriteNotepad and GR_ReadNotepad can be used to
access this memory. When writing a page, it is taken as a whole and the contents are replaced.
2. Image Buffer - Image buffer is used to store a BMP image of size 256 x 288, each pixel
occupying a byte. This buffer is part of the RAM and the contents are lost when power is lost.
3. Character File Buffer - A character file is a processed high contrast image of a fingerprint.
Two character files from two consecutive scans are combined to form a template file which is the
33
final version of the fingerprint that is stored in the fingerprint library (not to be confused with
the Arduino library. Fingerprint library is the memory used to store up to 1000 fingerprints). The
two character file buffers are CharBuffer1 and CharBuffer2 each with size of 512 bytes.
4. Fingerprint Library - This is a section of the flash memory where 1000 fingerprint templates
can be stored. Templates are arranged sequentially with numbering from 0 to N-1 (The manual
says 0-N) where N is the capacity of the library determined by the size of the flash memory.
There are instructions to store, process and delete templates from this memory. They will be
explained later.
5. System Configuration Register - This is a 16-bytes long register bank containing operating
parameters and status. Except the device address which takes up 4 bytes, rest of the parameters
are 2 bytes (a word) in length. The command ReadSysPara can be used to read, and
command SetSysPara can be used to write this register bank. (TABLE: 03)
The Status Register indicates the current operation status of the module, and comprises of the
following :
Bit Number 15-4 3 2 1 0
Description Reserved imgBufStat PWD Pass Busy
where Busy = 1: system is executing commands; 0: system is free, Pass = 1: found a matching
fingerprint; 0: fingerprint not found, PWD = 1: handshaking password verified; 0: password not
verified, ImgBufStatus = 1: image buffer contains valid image; 0: image buffer does not have a
valid image.
34
System Identifier Code is a fixed value that determines the type of module. Its value
is 0x0009 for.R307.
Library Size is the number of templates that can be stored in the module. The maximum value for
this.parameter.is.1000.for.R307.
Security Value determines the threshold for fingerprint searching and matching. Its value can be
from 1-5. When it is 1, the FAR (False Acceptance Rate) is the highest and FRR (False
Recognition Rate) is the lowest. FAR is simply the number that determines how likely the
module will identify a weakly matched fingerprint as positive. FRR is how likely the module will
identify a wrong fingerprint as negative. At level 5, the FAR is the lowest and FFR is the highest.
In this setting, it can be difficult to match your fingerprint.
Device Address is a 32-bit value that holds the address of the module. The correct address is
needed to communicate with the module. If you don't send the correct address, the module won't
execute any commands. Device address can be modified with the command SetAddr. The
factory programmed address is 0xFFFFFFFF. There's no methods specified in the manual to
reset the address to default, so keep the address safe if you ever change it.
Data Packet Size determines the maximum length of data content in a single packet. Its value can
be 0-3 where 0 = 32 bytes, 1 = 64 bytes, 2 = 128 bytes and 3 = 256 bytes.
Baud Multiplier sets the UART communication speed of the module. The minimum speed
is 9600bps and can be set to up to 12 times of that which is 115200bps. The multiplier value N
can be from 1-12 and the effective speed will be (9600*N) bps. The default baudrate is
57600bps.
Both UART and USB interfaces use a common serial communication protocol based on a packet
format (the manual refers packets as "packages"). All data and commands are to be sent as data
packets and all responses from the module will also be packets. So we need to frame data and
35
commands as packets before sending out, and must extract data from response packets. The
UART frame format is 10 bit with 1 start bit, 1 stop bit and 8 data bits.
If you feel confused, the UART frame is how a byte of data is transferred via the UART
interface. A packet is a group of many such bytes (or frames). Let's see the definitions of each
part.
1. Header : This indicates the start of a packet. It has to be the fixed value 0xEF01. It is 2
bytes long and the high byte is always transferred first.
2. Address : This is the 32-bit address of the scanner module. The module will accept
instructions only if the address we are sending matches the address stored in the module.
The default address is 0xFFFFFFFF and can be modified with SetAddr instruction.
3. Packet Identifier : This determines what type of packet we're sending or receiving. It is 1
byte long and depending on the value the packet types can be,
o 0x01 : The packet contains a command.
o 0x02 : Data packet. A data packet must be followed by a command packet or
acknowledge packet.
o 0x07 : Acknowledge packet. It is sent by the module in response to a command.
o 0x08 : End of data transfer packet. When we send large volume data such as an
image, the data transfer will be terminated by this packet.
36
4. Packet Length : This is the total length of Packet Content and Checksum in bytes.
Maximum length is 256 bytes and high byte is transferred first.
5. Packet Content : This can be data/command/parameters etc. of varying length. The
Packet Length is the value that specifies the length of the data here in bytes.
6. Checksum : This is the arithmetic sum of all bytes in Packet Identifier, Packet
Length and Packet Content. Overflowing bits are ignored. High byte is always transferred
first.
In order make the fingerprint scanner work, we must send instructions or commands in the form
of packets. Each instruction is simply a 1-byte code that we must include in the packet. The
module responds to each instruction with an acknowledgment packet that describes the result and
status of command execution. Each instruction has a set of expected response codes found in
the ACK packet that are called confirmation codes. Instructions and their byte codes are grouped
according to their functions as shown below,
37
Following is the list of confirmation codes.
The confirmation code 0x21 is not listed in the manual but I found when working with the
module. It will be sent when we try to execute commands without verifying the password first.
All the commands and their response codes are explained in detail in the manual. So it would be
redundant to do it here. But let's look at the VfyPwd instruction and its corresponding packet for
an example.
2 bytes 4 bytes 1 byte 2 bytes 1 byte 4 bytes 2 bytes
Header Address Packet Packet Instruction Data Checksum
Identifier Length Code (Password)
0*EF01 0*FFFFFFFF 0*01 0*07 0*13 0*6F6F6F6F 0*01D7
Above is the packet format for verifying password. Address is assumed to be default. We're
sending out a command, and so the Packet Identifier has to be 0x07. The Packet Length will be
always 7 for this instruction. The Packet Content is split into Instruction Code and Password.
Password is 0x6F6F6F6F for our example. If we calculate the Checksum of the bytes, it will
be 0x01D7 which is two bytes long of overall byte i.e., 2bytes long in size.
If the address and password are correct and the packet is correctly formatted, the module will
respond with the following acknowledgment packet
39
Chapter 4
(Hardware Modeling)
40
4.0 Prototype Modelling
In this Fingerprint Sensor Based Biometric Attendance System using Arduino, we used a
Fingerprint Sensor module to authenticate a true person or employee by taking their finger input
in the system. Here we are using 4 push buttons to register new fingerprint or delete stored
fingerprint or match stored fingerprint. The 4 push buttons are used as an input unit for these
tasks. Similarly, RTC Module DS3231 is used for registering scanning/entering/existing time of
the user.
The LCD displays the time record and every function happening via push button. Buzzer
indicates different functions and happening whenever an interrupt is detected. The LED is used
for.power.indication.
Working of this fingerprint attendance system project is fairly simple. First of all, the user
needs to enrol fingerprints of the user with the help of push buttons. To do this, user need to
press ENROLL key and then LCD asks for entering ID for the fingerprint to save it in memory
by ID name. So now user needs to enter ID by using UP/DOWN keys. After selecting ID, user
41
needs to press OK key (DEL key). Now LCD will ask to place finger over the fingerprint
module. Now user needs to place his finger over finger print module and then the module takes
finger image. Now the LCD will say to remove finger from fingerprint module, and again ask
to place finger again. Now user needs to put his finger again and module takes an image and
convert it into templates and stores it by selected ID into the finger print module’s memory.
Now the user will be registered and he/she can feed attendance by putting their finger over
fingerprint module. By the same method, all the users will be registered into the system.
Now if the user wants to remove or delete any of the stored ID or fingerprint, then he/she need to
press DEL key. Once delete key is pressed LCD will ask to select ID that need to be deleted.
Now user needs to select ID and press OK key (same DEL key). Now LCD will let you know
that fingerprint has been deleted successfully.
42
2. In this fingerprint attendance system circuit, we used Fingerprint Sensor module to
authenticate a true person or employee by taking their finger input in the system. Here we are
using 4 push buttons to enroll, Delete, UP/Down. ENROLL and DEL key has triple features.
3. ENROLL key is used for enrollment of a new person into the system. So when the user wants
to enroll new finger then he/she need to press ENROLL key then LCD asks for the ID, where
user want to be store the finger print image.
4. Now if at this time user does not want to proceed further then he/she can press ENROLL key
again to go back. This time ENROLL key behave as Back key, i.e. ENROLL key has both
enrollment and back function. Besides enroll key is also used to download attendance data over
serial monitor.
5. Similarly, DEL/OK key also has the same double function like when user enrolls new finger,
then he/she need to select finger ID by using another two key namely UP and DOWN. Now user
need to press DEL/OK key (this time this key behave like OK) to proceed with selected ID. And
Del key is used for reset or delete data from EEPROM of Arduino.
6. So next time when someone checks his fingerprint on the fingerprint sensor if any stored
fingerprint matches with any of the stored fingerprints then the LCD display shows the username
and time & date of the checking and register the data. Thus attendance is stored.
3 Push Button 4
4 LEDs 1
5 1k Resistor 2
6 2.2k Resistor 1
7 Power Supply
43
8 Connecting Wires 35
9 Box 1
10 Buzzer 1
11 16*2 LCD 1
12 Bread Board 1
13 RTC Module(DS3231) 1
List of Components
Sl No. Component Quantity Price(in rupees)
1 Arduino 1 380
3 Push Button 4 20
10 Buzzer 1 30 for 2 pc
44
4.7 Hardware Connection
HARDWARE IMPLEMENTATION:
• ARDUINO UNO: Arduino UNO is used here to control the operations involved in
taking attendance. The four operations that are to be performed are to enroll, verify,
delete and reset. Arduino is chosen here as it is easy to use, code, handle and has many
modules which add on features to Arduino board.
• 16X2 LCD DISPLAY: LCD Display is used here to provide messages to the user to
have a better interaction with the device. LCD Display has greenlight in background with
45
characters displayed on them in black. Characters are displayed in 7X5 matrix.
• Wi-Fi Module: ESP8266 Wi-Fi module is generally used to establish the wireless
communication between the devices. But this module is not capable of 5-3V logic
shifting and will require an external logic level converter.
• Push Button.
• LED Lights.
• 1K Resistor.
• 2.2K resistor.
• Power.
• Connecting wires.
• Box.
• Buzzer.
• Bread Board.
• RTC Module. (DS3231)
SOFTWARE IMPLEMENTATION:
1. Arduino IDE : You will be needing Arduino IDE software to write and upload the
programming logic onto the Arduino Uno board.
2. Thinkboard : Also, you need to create an account in the Thinkboad IoT platform to integrate
the system onto the cloud and store the data online. (WORKS AS A SERIAL MONITOR).
3. ADAFRUIT FINGERPRINT SENSOR LIBRARY is used for downloading the data to the
serial monitor of the Arduino IDE and for refined capture of the fingerprints.
47
CHAPTER 5
(Logic & Operation)
48
5.1 INTRODUCTION
After assembling the system, what remains is to observe its operation and efficiency of the
system. The total system is divided in several sub systems, like
● R 307 interfacing
● Serial Monitor interfacing
● connect to Thingsboard
● LCD interfacing
5.2.Flow Diagram
Few years back if you were to tell someone that the Geyser and bedroom lights in your home are
connected to internet, they would be baffled and might even criticize it as over-engineered
49
products. But today with the advent of IoT, Smart cities etc the idea no longer sounds strange, we
have devices around us that have become smarter by being able to communicate with the
internet.
In this project our aim is to leverage this IoT into the boring attendance system to make it smart
and more effective. Most conventional attendance systems available today store the information
over a micro SD card and have to be connected to software via a computer to access the
information. Here, we will build a biometric attendance system using Arduino that scans for
finger print and on successful identification of the person it will log the information to a cloud
platform like ThingsBoard by using the ESP8266 Wi-Fi module. This information can then be
displayed in the dashboard of ThingsBoard making it available for the required authorities to
view and analysis information over the internet without having any direct physical access to the
hardware. However the conventional Attendance system without involving IoT can also be built
by following the link and Finger print sensor can be further used for many other biometric
applications like Voting Machine, Security system etc.
50
5.6 Coding Logic
The fingerprint attendance system code for arduino is given in the subsequent sections.
Although the code is explained well with comments, we are discussing here few important parts
of the code. We used fingerprint library for interfacing finger print module with Arduino
board.
First of all, we include the header file and defines input and output pin and define the macro and
declared variables. After this, in setup function, we give direction to defined pin and initiate LCD
and finger print module
After that, we have to write code for clearing attendance data from EEPROM.
After it, we initiate finger print module, showing welcome message over LCD and also initiated
RTC module.
After it, in loop function, we have read RTC time and displayed it on LCD
After it, waiting for the finger print to take input and compare captured image ID with stored
IDs. If a match occurs then proceed with next step. And checking enrol/del keys as well
Given Function is used to taking finger print image and convert them into the template and save
as well by selected ID into the finger print module memory.
Given function is used for storing attendance time and date in the allotted slot of EEPROM
Given function is used to fetching data from EEPROM and send to serial monitor.
Using the Adafruit Fingerprint Sensor library, we add the library for the fingerprint sensor to
sense different patterns of fingerprint onto the arduino unit for checking and enrolment is done.
We use the serial monitor to check different patterns of fingerprint and different login and
biometric usage for different IDs and hence the serial monitor gives us the different login time
for different fingerprint patterns.
51
Table 06: Data sheet of collected data on Arduino Serial Monitor
52
5.9 Photograph of the Prototype:
53
CHAPTER 6
(Conclusion & Future Scope)
54
6.1 CONCLUSION
Here we have developed a Biometric fingerprint based attendance system using Arduino.
In this project we have used R307 fingerprint sensor which reads the Fingerprint and stores in the
form of digital data. A buzzer is activated and LED blinks then LCD panel shows that data is
stored along with username, date and time. Working of this fingerprint attendance system
project is fairly simple. First of all, the user needs to enroll fingerprints of the user with the help
of push buttons. To do this, user need to press ENROLL key and then LCD asks for entering ID
for the fingerprint to save it in memory by ID name. So now user needs to enter ID by using
UP/DOWN keys. After selecting ID, user needs to press OK key (DEL key). Now LCD will ask
to place finger over the fingerprint module. Now user needs to place his finger over finger print
module and then the module takes finger image. Now the LCD will say to remove finger from
fingerprint module, and again ask to place finger again. Now user needs to put his finger again
and module takes an image and convert it into templates and stores it by selected ID into the
finger print module’s memory. Now the user will be registered and he/she can feed attendance
by putting their finger over fingerprint module. By the same method, all the users will be
registered into the system.
Now if the user wants to remove or delete any of the stored ID or fingerprint, then he/she need to
press DEL key. Once delete key is pressed LCD will ask to select ID that need to be deleted.
Now user needs to select ID and press OK key (same DEL key). Now LCD will let you know
that fingerprint has been deleted successfully.
The traditional process of manually taking and maintaining student attendance is highly
inefficient and time consuming. The attendance monitoring system based on biometric
authentication has a potential to streamline the whole process. An Internet of Things (IoT) based
portable biometric attendance system can prove to be of great value to educational institutions in
this regard as it proves to be highly efficient and secure. The cost involved in making this system
is quite less, when compared to conventional biometric attendance system. The use of cloud
computing to store the attendance records makes all the data easy to access and retrieve as end
when required by the teachers. The use of fingerprint scanner ensures the reliability of the
attendance record. The system, due to its lack of complexity, proves to be easy to use and user
friendly.
55
The system can be improved by encasing it in a plastic covering. This would make it more
compact and easy to use in a classroom setting. The system can be configured to enable lecture-
wise attendance taking. It can further be improved to automatically calculate attendance
percentages of students and intimate the teachers if a student’s attendance is below a certain
percentage. It can also be modified to fit the corporate environment.
The traditional process of manually taking and maintaining student attendance is highly
inefficient and time consuming. The attendance monitoring system based on biometric
authentication has a potential to streamline the whole process. An Internet of Things (IoT) based
portable biometric attendance system can prove to be of great value to educational institutions in
this regard as it proves to be highly efficient and secure. The cost involved in making this system
is quite less, when compared to conventional biometric attendance system. The use of cloud
computing to store the attendance records makes all the data easy to access and retrieve as end
when required by the teachers. The use of fingerprint scanner ensures the reliability of the
attendance record. The system, due to its lack of complexity, proves to be easy to use and user
friendly.
6.2 RESULTS
The experimental model was made following the circuit diagram and the desired results were
obtained. Every time someone places his finger on the sensor the sensor reads the data and stores
it in the cloud. Next time someone wants to check the fingerprint he/she places the finger on the
sensor. The sensor reads the data and searches and cross-checks the data with stored fingerprints.
If it matches with any of them then it displays the username, date and time. If not then says
fingerprint doesn’t match .That’s how the whole system works.
Biometric attendance system using Arduino uno is very useful for many industries and offices.
It’s easy, cost effective and works very well.
Hence the future scope of this technology is wide spread and quite essential in both domestic and
industrial applications.
56
6.3.1 DIFFERENT WAYS OF MAKING AND USAGE OF BIOMETRIC ATTENDANCE
SYSTEM:
Advantages:
1. User friendly (LabVIEW graphical interface)
2. High speed
3. Efficient and low cost embedded platform
4. Low power consumption
5. Attendance report generation using LabVIEW
Disadvantages:
1. For small databases only
2. Limited Functionality
3. Two microcontrollers are used
Internet of things :
Advantages:
1. More secure (Additional Vein recognition)
2. Internet of things (Everything can be done online)
3. Information can be accessed anywhere
Disadvantages:
1. Complex software system architecture.
2. High cost
Advantages:
1. Easy to use.
2. Portable (Wireless)
57
3. Low power consumption
4. Additional functionality (due to GSM)
Disadvantages:
1. Less range of ZigBee (10-20 metres)
2. Low data rate of ZigBee.
3. High cost (both GSM and Zigbee)
Advantages:
1. More secure (RFID+ Biometrics)
2. More functionality
3. System can be accessed remotely (via android application)
4. Attendance performance graph will be generated
5. RFID cards can serve as library card, mess card
6. RFID cards are difficult to tamper
7. Free bulk SMS service used instead of GSM (Lower cost)
Disadvantages:
1. Complex software design
2. Android application development difficult.
Advantages:
1. Low power consumption
2. Good accuracy (Gabor image enhancement).
3. Flexible user modes
4. High resolution of fingerprint sensor
5. Wireless (portable)
6. Low cost
58
Disadvantages:
1. Three different supply voltages required (3.3V, 5V, 12V)
Cryptography
Advantages:
1. User friendly design
2. Portable
3. Small size
4. Security enhancement (encryption of data)
5. Faster than fixed fingerprint reader
Disadvantages:
1. Limited battery life
2. Limited Functionality
Advantages:
1. More Secure due to RFID and biometrics
2. Complete system is automated
3. Small size of RFID cards
4. Fast processing speed
5. No line of sight required for RFID
6. Many tags can be read simultaneously
7. .net framework simplifies debugging
Disadvantages:
1. Software design is difficult.
2. System should always be kept ON
3. Costly
59
COMPARATIVE ANALYSIS OF FINGERPRINT ATTENDANCE SYSTEMS:
60
CHAPTER 7
(References)
61
• https://ijarcce.com/wp-content/uploads/2016/11/IJARCCE-ICRITCSA-3.pdf
• www.irjet.net/uploads/2016/05/ IRJET-V3I5237.pdf
• https://www.skyfilabs.com/project-ideas/biometric-attendance-system-with-iot
• https://www.how2electronics.com/fingerprint-sensor-based-biometric-attendance-system/
• https://circuitdigest.com/microcontroller-projects/fingerprint-attendance-system-using-
arduino-uno
• Wang and Jingli , “The Design of Teaching Management System in Universities Based
on Biometrics Identification and the Internet of Things Technology”, IEEE 10th
International Conference on Computer Science & Education (ICCSE), Cambridge
University, UK July 22-24, 2015, pp. 979-982.
62
Appendix A
(Hardware Description)
63
ARDUINO UNO- Arduino Uno is a microcontroller board based on the ATmega328P
datasheet. It has 14 digital input/output pins (of which 6 can be used as PWM outputs),
6 analog inputs, a 16 MHz ceramic resonator (CSTCE16M0V53-R0), a USB
connection, a power jack, an ICSP header and a reset button. It contains everything
needed to support the microcontroller; simply connect it to a computer with a USB
cable or power it with a AC-to-DC adapter or battery to get started.. You can tinker
with your Uno without worrying too much about doing something wrong, worst case
scenario you can replace the chip for a few dollars and start over again.
"Uno" means one in Italian and was chosen to mark the release of Arduino Software
(IDE) 1.0. The Uno board and version 1.0 of Arduino Software (IDE) were the
reference versions of Arduino, now evolved to newer releases. The Uno board is the
first in a series of USB Arduino boards, and the reference model for the Arduino
platform; for an extensive list of current, past or outdated boards see the Arduino index
of boards.
TECHNICAL SPECIFICATIONS:
Microcontroller ATmega328P
Operating Voltage 5V
Input Voltage 7-12V
(recommended)
Input Voltage (limit) 6-20V
Digital I/O Pins 14 (of which 6 provide PWM output)
PWM Digital I/O Pins 6
Analog Input Pins 6
DC Current per I/O Pin 20 Ma
DC Current for 3.3V Pin 50 Ma
Flash Memory 32 KB (ATmega328P) of which 0.5 KB used by
bootloader
SRAM 2 KB (ATmega328P)
EEPROM 1 KB (ATmega328P)
Clock Speed 16 MHz
LED_BUILTIN 13
64
Length 68.6 mm
Width 53.4 mm
Weight 25 g
By executing powerful instructions in a single clock cycle, the device achieves throughputs
approaching 1 MIPS per MHz, balancing power consumption and processing speed.
Parameters:
65
CPU Speed (MIPS/DMIPS): 20
SRAM (B): 2,048
Data EEPROM/HEF (bytes): 1024
Digital Communication Peripherals: 1-UART, 2-SPI, 1-I2C
Capture/Compare/PWM Peripherals: 1 Input Capture, 1 CCP, 6PWM
Timers: 2 x 8-bit, 1 x 16-bit
Number of Comparators: 1
Temperature Range (°C): -40 to 85
Operating Voltage Range (V): 1.8 to 5.5
Pin Count: 32
Low Power: Yes
66
capacity FLASH chips and other hardware and software composition, stable performance, simple
structure, with fingerprint entry, image processing, fingerprint matching, search and template
storage and other functions.
Features:
Interface Description:
The R307 fingerprint module has two interface TTL UART and USB2.0, USB2.0 interface can
be connected to the computer; RS232 interface is a TTL level, the default baud rate is 57600 ,
can be changed, refer to a communication protocol ; can And microcontroller, such as ARM,
DSP and other serial devices with a connection, 3.3V 5V microcontroller can be connected
directly. Needs to connect the computer level conversion, level conversion note , embodiments
such as a MAX232 circuit.
Fingerprint module board marked with 3.3V - 2 contacts short circuit, you can use DC3.3V .
67
Technical Parameters:
68
16*2 LCD DISPLAY:
LCD modules are very commonly used in most embedded projects, the reason being its cheap
price, availability and programmer friendly. Most of us would have come across these displays in
our day to day life, either at PCO’s or calculators. The appearance and the pinouts have already
been visualized above now let us get a bit technical.
16×2 LCD is named so because; it has 16 Columns and 2 Rows. There are a lot of combinations
available like, 8×1, 8×2, 10×2, 16×1, etc. but the most used one is the 16×2 LCD. So, it will
have (16×2=32) 32 characters in total and each character will be made of 5×8 Pixel Dots.
69
Figure 22: 16*2 LCD panel
Now, we know that each character has (5×8=40) 40 Pixels and for 32 Characters we will have
(32×40) 1280 Pixels. Further, the LCD should also be instructed about the Position of the Pixels.
Hence it will be a hectic task to handle everything with the help of MCU, hence an Interface IC
like HD44780 is used, which is mounted on the backside of the LCD Module itself. The function
of this IC is to get the Commands and Data from the MCU and process them to display
meaningful information onto our LCD Screen.
70
WiFi Module - ESP8266: The ESP8266 WiFi Module is a self contained SOC with integrated
TCP/IP protocol stack that can give any microcontroller access to your WiFi network. The
ESP8266 is capable of either hosting an application or offloading all Wi-Fi networking functions
from another application processor. Each ESP8266 module comes pre-programmed with an AT
command set firmware, meaning, you can simply hook this up to your Arduino device and get
about as much WiFi-ability as a WiFi Shield offers (and that's just out of the box)! The ESP8266
module is an extremely cost effective board with a huge, and ever growing, community.
This module has a powerful enough on-board processing and storage capability that allows it to
be integrated with the sensors and other application specific devices through its GPIOs with
minimal development up-front and minimal loading during runtime. Its high degree of on-chip
integration allows for minimal external circuitry, including the front-end module, is designed to
occupy minimal PCB area. The ESP8266 supports APSD for VoIP applications and Bluetooth
co-existence interfaces, it contains a self-calibrated RF allowing it to work under all operating
conditions, and requires no external RF parts.
71
Figure 25:Push Button
Resistor:
72
Color Code of the resistor:
Piezo buzzer:
A buzzer or beeper is an audio signaling device, which may be mechanical, electromechanical,
or piezoelectric. Typical uses of buzzers and beepers include alarm devices, timers and
confirmation of user input such as a mouse click or keystroke. A piezoelectric element may be
driven by an oscillating electronic circuit or other audio signal source, driven with a piezoelectric
audio amplifier. Sounds commonly used to indicate that a button has been pressed are a click, a
ring or a beep.
73
BREADBOARD: A breadboard is a rectangular plastic board with a bunch of tiny holes in it.
These holes let you easily insert electronic components to prototype (meaning to build and test
an early version of) an electronic circuit, like this one with a battery, switch, resistor, and an
LED (light-emitting diode). Modern breadboards are made from plastic, and come in all shapes,
sizes, and even different colors. While larger and smaller sizes are available, the most common
sizes you will probably see are "full-size," "half-size," and "mini" breadboards. Most
breadboards also come with tabs and notches on the sides that allow you to snap multiple boards
together. However, a single half-sized breadboard is sufficient for many beginner-level projects.
The other cool feature of this board comes with SQW pin, which outputs a nice square wave at
either 1Hz, 4kHz, 8kHz or 32kHz and can be handled programmatically. This can further be used
as an interrupt due to alarm condition in many time-based applications.
33K pin outputs the stable(temperature compensated) and accurate reference clock.
SQW pin outputs a nice square wave at either 1Hz, 4kHz, 8kHz or 32kHz and can be handled
programmatically. This can further be used as an interrupt due to alarm condition in many time-
based applications.
SCL is a serial clock pin for I2C interface.
SDA is a serial data pin for I2C interface.
VCC pin supplies power for the module. It can be anywhere between 3.3V to 5.5V.
GND is a ground pin.
75
Appendix B
(Software coding)
76
CODE FOR THINGSBOARD SETUP: Name.trim(); //Remove /n or /r from the
incomind data
#include <PubSubClient.h>
Serial.println(Name);
//http://pubsubclient.knolleary.net/
Send_to_Thingsboard();
#include <ESP8266WiFi.h>
Name =""; //clear the string if new line is
//https://github.com/bportaluri/WiFiEsp
detected
#define WIFI_AP "RCCIIT"
}
#define WIFI_PASSWORD
}
"projectgroup6"
#define TOKEN "IFhm5ggJVsEpokiIoQ"
char thingsboardServer[] = client.loop();
"demo.thingsboard.io"; }
WiFiClient wifiClient;
void Send_to_Thingsboard()
{
void setup()
Serial.println("Collecting temperature
{
data.");
Serial.begin(9600);
delay(10);
String Employee_Name = Name;
InitWiFi();
client.setServer( thingsboardServer, 1883 );
String payload = "{";
lastSend = 0;
payload += "\"Name\":"; payload +=
}
Employee_Name;
void loop() payload += "}";
{
if ( !client.connected() ) { char attributes[100];
reconnect(); payload.toCharArray( attributes, 100 );
} client.publish( "v1/devices/me/telemetry",
if ( Serial.available() ) { // Update and send attributes );
only after 1 seconds Serial.println( attributes );
char a = Serial.read(); }
Name = Name + String(a);
if (a == 13) //check for new line
{
77
CODE FOR DS3231 LIBRARY SETUP: // rtc.adjust(DateTime(2020, 6, 20, 12, 56,
RTC MODULE. 0));
#include <Wire.h> }
#include "RTClib.h" }
78
Serial.print(future.hour(), DEC);
// calculate a date which is 7 days & 30 Serial.print(':');
seconds into the future
DateTime future (now + Serial.print(future.minute(), DEC);
TimeSpan(7,0,0,30)); Serial.print(':');
Serial.print(future.second(), DEC);
Serial.println("Future Date & Time (Now Serial.println();
+ 7days & 30s): ");
Serial.print(future.year(), DEC); Serial.println();
Serial.print('/'); delay(1000);
Serial.print(future.month(), DEC); }
Serial.print('/');
Serial.print(future.day(), DEC);
Serial.print(' ');
79
Wire.endTransmission();
delay(100); //add a small delay }
Serial.println("Memory written");
} void i2c_eeprom_write_page( int
deviceaddress, unsigned int eeaddresspage,
void loop() byte* data, byte length ) {
{ Wire.beginTransmission(deviceaddress);
Serial.print("Reading memory: "); Wire.write((int)(eeaddresspage >> 8)); //
int addr=0; //first address MSB
Wire.write((int)(eeaddresspage & 0xFF));
byte b = i2c_eeprom_read_byte(0x57, 0); // LSB
byte c;
while (b!=0) for ( c = 0; c < length; c++)
{ Wire.write(data[c]);
Serial.print((char)b); //print content to Wire.endTransmission();
serial port }
addr++; //increase address
b = i2c_eeprom_read_byte(0x57, addr); byte i2c_eeprom_read_byte( int
//access an address from the memory deviceaddress, unsigned int eeaddress ) {
} byte rdata = 0xFF;
Serial.println(" "); Wire.beginTransmission(deviceaddress);
delay(2000); Wire.write((int)(eeaddress >> 8)); // MSB
} Wire.write((int)(eeaddress & 0xFF)); //
LSB
void i2c_eeprom_write_byte( int Wire.endTransmission();
deviceaddress, unsigned int eeaddress, byte Wire.requestFrom(deviceaddress,1);
data ) { if (Wire.available()) rdata = Wire.read();
int rdata = data; return rdata;
Wire.beginTransmission(deviceaddress); }
Wire.write((int)(eeaddress >> 8)); // MSB
Wire.write((int)(eeaddress & 0xFF)); // void i2c_eeprom_read_buffer( int
LSB deviceaddress, unsigned int eeaddress, byte
Wire.write(rdata); *buffer, int length ) {
80
Wire.beginTransmission(deviceaddress); Adafruit_Fingerprint finger =
Wire.write((int)(eeaddress >> 8)); // MSB Adafruit_Fingerprint(&fingerPrint);
Wire.write((int)(eeaddress & 0xFF)); //
LSB #define register_back 14
Wire.endTransmission(); #define delete_ok 15
Wire.requestFrom(deviceaddress,length); #define forward 16
int c = 0; #define reverse 17
for ( c = 0; c < length; c++ ) #define match 5
if (Wire.available()) buffer[c] = #define indFinger 7
Wire.read(); #define buzzer 5
}
#define records 10 // 10 for 10 user
SOURCE CODE & ADAFRUIT
FINGERPRINT SENSOR LIB AND RTC int
LIB CODE: user1,user2,user3,user4,user5,user6,user7,us
er8,user9,user10;
#include "Adafruit_Fingerprint.h"
//fingerprint library header file DateTime now;
#include<EEPROM.h> //command for
storing data void setup()
#include<LiquidCrystal.h> //lcd header file {
LiquidCrystal lcd(8,9,10,11,12,13); delay(1000);
#include <SoftwareSerial.h> lcd.begin(16,2);
SoftwareSerial fingerPrint(2, 3); //for tx/rx Serial.begin(9600);
communication between arduino & r307 pinMode(register_back, INPUT_PULLUP);
fingerprint sensor pinMode(forward, INPUT_PULLUP);
pinMode(reverse, INPUT_PULLUP);
#include <Wire.h> pinMode(delete_ok, INPUT_PULLUP);
#include "RTClib.h" //library file for pinMode(match, INPUT_PULLUP);
DS3231 RTC Module pinMode(buzzer, OUTPUT);
RTC_DS3231 rtc; pinMode(indFinger, OUTPUT);
digitalWrite(buzzer, LOW);
uint8_t id; if(digitalRead(register_back) == 0)
81
{ eepIndex=(i*7)+210;
digitalWrite(buzzer, HIGH); download(eepIndex);
delay(500); eepIndex=(i*7)+420;
digitalWrite(buzzer, LOW); download(eepIndex);
lcd.clear(); eepIndex=(i*7)+630;
lcd.print("Please wait !"); download(eepIndex);
lcd.setCursor(0,1); eepIndex=(i*7)+840;
lcd.print("Downloding Data"); download(eepIndex);
eepIndex=(i*7)+1050;
Serial.println("Please wait"); download(eepIndex);
Serial.println("Downloding Data.."); eepIndex=(i*7)+1260;
Serial.println(); download(eepIndex);
eepIndex=(i*7)+1470;
Serial.print("S.No. "); download(eepIndex);
for(int i=0;i<records;i++) eepIndex=(i*7)+1680;
{ download(eepIndex);
digitalWrite(buzzer, HIGH); Serial.println();
delay(500); }
digitalWrite(buzzer, LOW); }
Serial.print(" User ID"); if(digitalRead(delete_ok) == 0)
Serial.print(i+1); {
Serial.print(" "); lcd.clear();
} lcd.print("Please Wait");
Serial.println(); lcd.setCursor(0,1);
int eepIndex=0; lcd.print("Reseting.....");
for(int i=0;i<30;i++) for(int i=1000;i<1005;i++)
{ EEPROM.write(i,0);
if(i+1<10) for(int i=0;i<841;i++)
Serial.print('0'); EEPROM.write(i, 0xff);
Serial.print(i+1); lcd.clear();
Serial.print(" "); lcd.print("System Reset");
eepIndex=(i*7); delay(1000);
download(eepIndex); }
82
Serial.println("Did not find fingerprint
lcd.clear(); sensor :(");
lcd.print(" Fingerprint "); lcd.clear();
lcd.setCursor(0,1); lcd.print("Module Not Found");
lcd.print("Attendance System"); lcd.setCursor(0,1);
delay(2000); lcd.print("Check Connections");
lcd.clear(); while (1);
}
digitalWrite(buzzer, HIGH);
delay(500); if (! rtc.begin())
digitalWrite(buzzer, LOW); Serial.println("Couldn't find RTC");
for(int i=1000;i<1000+records;i++)
{ // rtc.adjust(DateTime(F(__DATE__),
if(EEPROM.read(i) == 0xff) F(__TIME__)));
EEPROM.write(i,0);
} if (rtc.lostPower())
{
finger.begin(57600); Serial.println("RTC is NOT running!");
Serial.begin(9600); // following line sets the RTC to the date &
lcd.clear(); time this sketch was compiled
lcd.print("Finding Module.."); rtc.adjust(DateTime(2020, 6, 7, 11, 0, 0));
lcd.setCursor(0,1); // This line sets the RTC with an explicit
delay(2000); date & time, for example to set
if (finger.verifyPassword()) // June 7, 2020 at 11am you would call:
{ // rtc.adjust(DateTime(2020, 6, 7, 11, 0, 0));
Serial.println("Found fingerprint sensor!"); }
lcd.clear(); lcd.setCursor(0,0);
lcd.print(" Module Found"); lcd.print(" Press Match to ");
delay(2000); lcd.setCursor(0,1);
} lcd.print(" Start System");
else delay(3000);
{
user1=EEPROM.read(1000);
83
user2=EEPROM.read(1001); digitalWrite(buzzer, HIGH);
user3=EEPROM.read(1002); delay(100);
user4=EEPROM.read(1003); digitalWrite(buzzer, LOW);
user5=EEPROM.read(1004); lcd.clear();
lcd.clear(); lcd.print("ID:");
digitalWrite(indFinger, HIGH); lcd.print(result);
lcd.setCursor(0,1);
} lcd.print("Please Wait....");
delay(1000);
void loop() attendance(result);
{ lcd.clear();
now = rtc.now(); lcd.print("Attendance ");
lcd.setCursor(0,0); lcd.setCursor(0,1);
lcd.print("Time: "); lcd.print("Registered");
lcd.print(now.hour(), DEC); delay(1000);
lcd.print(':'); digitalWrite(indFinger, HIGH);
lcd.print(now.minute(), DEC); return;
lcd.print(':'); }
lcd.print(now.second(), DEC); checkKeys();
lcd.print(" "); delay(300);
lcd.setCursor(0,1); }
lcd.print("Date: ");
lcd.print(now.day(), DEC); // dmyyhms - 7 bytes
lcd.print('/'); void attendance(int id)
lcd.print(now.month(), DEC); {
lcd.print('/'); int user=0,eepLoc=0;
lcd.print(now.year(), DEC); if(id == 1)
lcd.print(" "); {
delay(500); eepLoc=0;
int result=getFingerprintIDez(); user=user1++;
if(result>0) }
{ else if(id == 2)
digitalWrite(indFinger, LOW); {
84
eepLoc=210; else if(id == 9)
user=user2++; {
} eepLoc=1470;
else if(id == 3) user=user9++;
{ }
eepLoc=420; else if(id == 10)
user=user3++; {
} eepLoc=1680;
else if(id == 4) user=user8++;
{ }
eepLoc=630; /*else if(id == 5) // fifth user
user=user4++; {
} eepLoc=840;
else if(id == 5) user=user5++;
{ }*/
eepLoc=0; else
user=user5++; return;
}
else if(id == 6) int eepIndex=(user*7)+eepLoc;
{ EEPROM.write(eepIndex++, now.hour());
eepLoc=840; EEPROM.write(eepIndex++,
user=user5++; now.minute());
} EEPROM.write(eepIndex++,
else if(id == 7) now.second());
{ EEPROM.write(eepIndex++, now.day());
eepLoc=1050; EEPROM.write(eepIndex++, now.month());
user=user7++; EEPROM.write(eepIndex++, now.year()>>8
} );
else if(id == 8) EEPROM.write(eepIndex++, now.year());
{
eepLoc=1260; EEPROM.write(1000,user1);
user=user8++; EEPROM.write(1001,user2);
} EEPROM.write(1002,user3);
85
EEPROM.write(1003,user4); lcd.print(count);
// EEPROM.write(4,user5); // figth user if(digitalRead(forward) == 0)
} {
count++;
void checkKeys() if(count>records)
{ count=1;
if(digitalRead(register_back) == 0) delay(500);
{ }
lcd.clear();
lcd.print("Please Wait"); else if(digitalRead(reverse) == 0)
delay(1000); {
while(digitalRead(register_back) == 0); count--;
Enroll(); if(count<1)
} count=records;
delay(500);
else if(digitalRead(delete_ok) == 0) }
{ else if(digitalRead(delete_ok) == 0)
lcd.clear(); {
lcd.print("Please Wait"); id=count;
delay(1000); getFingerprintEnroll();
delet(); for(int i=0;i<records;i++)
} {
} if(EEPROM.read(i) != 0xff)
{
void Enroll() EEPROM.write(i, id);
{ break;
int count=1; }
lcd.clear(); }
lcd.print("Enter Finger ID:"); return;
}
while(1)
{ else if(digitalRead(register_back) == 0)
lcd.setCursor(0,1); {
86
return; deleteFingerprint(id);
} for(int i=0;i<records;i++)
} {
} if(EEPROM.read(i) == id)
{
void delet() EEPROM.write(i, 0xff);
{ break;
int count=1; }
lcd.clear(); }
lcd.print("Enter Finger ID"); return;
}
while(1)
{ else if(digitalRead(register_back) == 0)
lcd.setCursor(0,1); {
lcd.print(count); return;
if(digitalRead(forward) == 0) }
{ }
count++; }
if(count>records)
count=1; uint8_t getFingerprintEnroll()
delay(500); {
} int p = -1;
lcd.clear();
else if(digitalRead(reverse) == 0) lcd.print("finger ID:");
{ lcd.print(id);
count--; lcd.setCursor(0,1);
if(count<1) lcd.print("Place Finger");
count=records; delay(2000);
delay(500); while (p != FINGERPRINT_OK)
} {
else if(digitalRead(delete_ok) == 0) p = finger.getImage();
{ switch (p)
id=count; {
87
case FINGERPRINT_OK: case FINGERPRINT_OK:
Serial.println("Image taken"); Serial.println("Image converted");
lcd.clear(); lcd.clear();
lcd.print("Image taken"); lcd.print("Image converted");
break; break;
case FINGERPRINT_NOFINGER: case FINGERPRINT_IMAGEMESS:
Serial.println("No Finger"); Serial.println("Image too messy");
lcd.clear(); lcd.clear();
lcd.print("No Finger Found"); lcd.print("Image too messy");
break; return p;
case case
FINGERPRINT_PACKETRECIEVEERR: FINGERPRINT_PACKETRECIEVEERR:
Serial.println("Communication error"); Serial.println("Communication error");
lcd.clear(); lcd.clear();
lcd.print("Comm Error"); lcd.print("Comm Error");
break; return p;
case FINGERPRINT_IMAGEFAIL: case FINGERPRINT_FEATUREFAIL:
Serial.println("Imaging error"); Serial.println("Could not find fingerprint
lcd.clear(); features");
lcd.print("Imaging Error"); lcd.clear();
break; lcd.print("Feature Not Found");
default: return p;
Serial.println("Unknown error"); case FINGERPRINT_INVALIDIMAGE:
lcd.clear(); Serial.println("Could not find fingerprint
lcd.print("Unknown Error"); features");
break; lcd.clear();
} lcd.print("Feature Not Found");
} return p;
default:
// OK success! Serial.println("Unknown error");
lcd.clear();
p = finger.image2Tz(1); lcd.print("Unknown Error");
switch (p) { return p;
88
} default:
Serial.println("Unknown error");
Serial.println("Remove finger"); return;
lcd.clear(); }
lcd.print("Remove Finger"); }
delay(2000);
p = 0; // OK success!
while (p != FINGERPRINT_NOFINGER) {
p = finger.getImage(); p = finger.image2Tz(2);
} switch (p) {
Serial.print("ID "); Serial.println(id); case FINGERPRINT_OK:
p = -1; Serial.println("Image converted");
Serial.println("Place same finger again"); break;
lcd.clear(); case FINGERPRINT_IMAGEMESS:
lcd.print("Place Finger"); Serial.println("Image too messy");
lcd.setCursor(0,1); return p;
lcd.print(" Again"); case
while (p != FINGERPRINT_OK) { FINGERPRINT_PACKETRECIEVEERR:
p = finger.getImage(); Serial.println("Communication error");
switch (p) { return p;
case FINGERPRINT_OK: case FINGERPRINT_FEATUREFAIL:
Serial.println("Image taken"); Serial.println("Could not find fingerprint
break; features");
case FINGERPRINT_NOFINGER: return p;
Serial.print("."); case FINGERPRINT_INVALIDIMAGE:
break; Serial.println("Could not find fingerprint
case features");
FINGERPRINT_PACKETRECIEVEERR: return p;
Serial.println("Communication error"); default:
break; Serial.println("Unknown error");
case FINGERPRINT_IMAGEFAIL: return p;
Serial.println("Imaging error"); }
break;
89
// OK converted! } else if (p ==
Serial.print("Creating model for #"); FINGERPRINT_BADLOCATION) {
Serial.println(id); Serial.println("Could not store in that
location");
p = finger.createModel(); return p;
if (p == FINGERPRINT_OK) { } else if (p ==
Serial.println("Prints matched!"); FINGERPRINT_FLASHERR) {
} else if (p == Serial.println("Error writing to flash");
FINGERPRINT_PACKETRECIEVEERR) return p;
{ }
Serial.println("Communication error"); else {
return p; Serial.println("Unknown error");
} else if (p == return p;
FINGERPRINT_ENROLLMISMATCH) { }
Serial.println("Fingerprints did not match"); }
return p;
} else { int getFingerprintIDez()
Serial.println("Unknown error"); {
return p; uint8_t p = finger.getImage();
}
if (p != FINGERPRINT_OK)
Serial.print("ID "); Serial.println(id); return -1;
p = finger.storeModel(id);
if (p == FINGERPRINT_OK) { p = finger.image2Tz();
Serial.println("Stored!"); if (p != FINGERPRINT_OK)
lcd.clear(); return -1;
lcd.print(" Finger Stored!");
delay(2000); p = finger.fingerFastSearch();
} else if (p == if (p != FINGERPRINT_OK)
FINGERPRINT_PACKETRECIEVEERR) {
{ lcd.clear();
Serial.println("Communication error"); lcd.print("Finger Not Found");
return p; lcd.setCursor(0,1);
90
lcd.print("Try Later"); delay(2000);
delay(2000); return p;
return -1; }
} }
// found a match!
Serial.print("Found ID #"); void download(int eepIndex)
Serial.print(finger.fingerID); {
return finger.fingerID;
} if(EEPROM.read(eepIndex) != 0xff)
{
uint8_t deleteFingerprint(uint8_t id) Serial.print("T->");
{ if(EEPROM.read(eepIndex)<10)
uint8_t p = -1; Serial.print('0');
lcd.clear(); Serial.print(EEPROM.read(eepIndex++));
lcd.print("Please wait"); Serial.print(':');
p = finger.deleteModel(id); if(EEPROM.read(eepIndex)<10)
if (p == FINGERPRINT_OK) Serial.print('0');
{ Serial.print(EEPROM.read(eepIndex++));
Serial.println("Deleted!"); Serial.print(':');
lcd.clear(); if(EEPROM.read(eepIndex)<10)
lcd.print("Finger Deleted"); Serial.print('0');
lcd.setCursor(0,1); Serial.print(EEPROM.read(eepIndex++));
lcd.print("Successfully"); Serial.print(" D->");
delay(1000); if(EEPROM.read(eepIndex)<10)
} Serial.print('0');
Serial.print(EEPROM.read(eepIndex++));
else Serial.print('/');
{ if(EEPROM.read(eepIndex)<10)
Serial.print("Something Wrong"); Serial.print('0');
lcd.clear(); Serial.print(EEPROM.read(eepIndex++));
lcd.print("Something Wrong"); Serial.print('/');
lcd.setCursor(0,1); Serial.print(EEPROM.read(eepIndex++)<<8
lcd.print("Try Again Later"); | EEPROM.read(eepIndex++));
91
} }
else
{ Serial.print(" ");
Serial.print("---------------------------"); }
92
Appendix C
(Data sheets)
93
Datasheet from Serial Monitor:
The Adafruit Fingerprint Sensor library is installed and whenever user places finger over
module then it captures finger image, and search if any ID is associated with the
fingerprint in the system. If fingerprint ID is detected then LCD will show Attendance
registered and in the same time buzzer will beep once and LED will turn off until the
system is ready to take input again.
Along with the module, we have also used an RTC module for Time and Date, so the
Arduino takes time and date whenever a user places his finger over module and save
them in the EEPROM at the allotted slot of memory.
We have created 10 user space in this system for 30 days. By pressing the RESET button
in Arduino and then immediately enroll key will be responsible for downloading
attendance data over serial monitor from the Arduino EEPROM Memory.
94
ATmega
328P
8-bit AVR Microcontroller with 32K Bytes
In-System
Programmable Flash
DATASHEET
Features
2 ATmega328P [DATASHEET]
7810D–AVR–01/15
96
1. PIN CONFIGURATION:
The AVR® core combines a rich instruction set with 32 general purpose working
registers. All the 32 registers are directly connected to the arithmetic logic unit (ALU),
allowing two independent registers to be accessed in one single instruction executed in
one clock cycle. The resulting architecture is more code efficient while achieving
throughputs up to ten times faster than conventional CISC microcontrollers.
The Atmel® ATmega328P provides the following features: 32K bytes of in-system
programmable flash with read-while-write capabilities, 1K bytes EEPROM, 2K bytes
98
SRAM, 23 general purpose I/O lines, 32 general purpose working registers, three
flexible Timer/Counters with compare modes, internal and external interrupts, a serial
programmable USART, a byte- oriented 2-wire serial interface, an SPI serial port, a 6-
channel 10-bit ADC (8 channels in TQFP and QFN/MLF packages), a programmable
watchdog timer with internal oscillator, and five software selectable power saving
modes. The idle mode stops the CPU while allowing the SRAM, Timer/Counters,
USART, 2-wire serial interface, SPI port, and interrupt system to continue
functioning. The power-down mode saves the register contents but freezes the
oscillator, disabling all other chip functions until the next interrupt or hardware reset.
In power-save mode, the asynchronous timer continues to run, allowing the user to
maintain a timer base while the rest of the device is sleeping. The ADC noise reduction
mode stops the CPU and all I/O modules except asynchronous timer and ADC, to
minimize switching noise during ADC conversions. In standby mode, the
crystal/resonator oscillator is running while the rest of the device is sleeping. This
allows very fast start-up combined with low power consumption.
The ATmega328P AVR is supported with a full suite of program and system
development tools including: C compilers, macro assemblers, program
debugger/simulators, in-circuit emulators, and evaluation kits.
99