• shrey mittal

Fingerprint Sensor-based Attendance System

Updated: Aug 23, 2020

In today's world, our identity is very important and our identity is now being represented by our #fingerprint or our retina and even our voice. Most of our government documents are being identified using our fingerprint. Many companies and colleges use fingerprint #attendancesystem since they cannot be deceived.

A fingerprint biometric seems to be a very complex thing but if we study and read about it, it's pretty easy to make and a little cheaper than what's available in the market. In this, we will use the R305/R307 Fingerprint Sensor and connect it with #raspberrypi.

Hardware required:

  • Raspberry pi 3 Model B: It is the first design in the third generation. They are a single-board computer to provide the processing at a very low cost. It comes with a Quad-Core 1.2GHz Broadcom BCM2837 64bit CPU and a 1GB RAM and can be controlled wirelessly through WIFI and has 40 GPIO pins and is easy to set up.

  • R307 FingerprintSensor Module: R307 is the newer and upgraded version of R305 with an up-gradation of storing fingerprints up to 1000 and USB operation. it consists of an optical fingerprint sensor, high-speed DSP processor, the high-performance fingerprint alignment algorithm.

  • LCD: It is also called JHD162A 16x2 LCD Display it is a 16x2 display to show the appropriate information.

  • I2C module: It has an inbuilt PCF8574 I2C chip that converts serial data to parallel data for the LCD. It is soldered to the pins of the LCD.

  • CP2102 USB to TTL converter module: The board can simply attach to a USB bus and will appear as a standard COM port.

  • 4x4 Keypad: It contains 16 buttons which can be connected to Arduino.

  • Breadboard and Jumper Wire: They are necessitated to make a prototype easily.

  • A Memory Card: This is to be connected to raspberry pi to save data efficiently.


Raspberry PI is the main processing unit and controls all the data. We are using the TTL to USB converter module to connect to the R307 fingerprint module since it has a USB #interface inbuilt and uses its functionality.

The pins of the raspberry are also connected to 4x4 keypad and to the I2C module which is in turn soldered to the LCD.


The code is written in python since the raspberry pi allows its pins directly being programmed by python.

This is the main code which has all the working of an attendance system.

Main Code file
TXT • 19KB

The beginning of the code contains all the variable and constants like a password:

pressed_keys =''
fun = ''
yer = ''
branch = ''
last = ''
roll_id = ''
r = ''

After this, the function finger() tries to find the fingerprint and try to and has the schedule of the whole day programmed and will mark your attendance only if u enter at the correct timing

and it will connect to the database using sqlite3 which contains all the information of the students.

Function enroll() is used to enroll a new student into the database and set up the profile. It includes roll number, id number fingerprints.

The last function is startChoice() which runs at the beginning which asks for registration or attendance.

pyfingerprint (driver file)
TXT • 45KB

This is the fingerprint module driver file which needs to be kept in the same folder as the other code.

These are in text form so you have to copy and paste it.

Working: -

This is the working model when I was enrolling in a sample input.

You just have to connect the circuit according to the diagram and upload the code and run it.

This is the output of the terminal and showing the data of the database.

It looks complex but when you get to it, you will realize it's easier than it looks.


Learn Electronics. (July 3, 2020 ). "Fingerprint Sensor-based attendance system using Raspberry Pi". https://www.youtube.com/watch?v=OwJsfvI89vo.


  1. What is Image processing?

  2. Smart Lighting System