0% found this document useful (0 votes)
1K views

Raspberry Pi Fingerprint Sensor Interfacing Project With Code and Circuit Diagram

This is a book about the usage of RPI in acess control system.
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
1K views

Raspberry Pi Fingerprint Sensor Interfacing Project With Code and Circuit Diagram

This is a book about the usage of RPI in acess control system.
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 21

05/11/2019 Raspberry Pi Fingerprint Sensor Interfacing Project with Code and Circuit diagram

RASPBERRY PI (HTTPS://CIRCUITDIGEST.COM/SIMPLE-RASPBERRY-PI-PROJECTS-FOR-BEGINNERS)

Fingerprint Sensor Interfacing with Raspberry Pi (/microcontroller-


projects/raspberry-pi-fingerprint-sensor-interfacing)
By (page_author.html)Saddam (/users/saddam)  Jan 18, 2018 21

Raspberry Pi Fingerprint Sensor Interfacing Tutorial

Finger Print Sensor, which we used to see in Sci-Fi moives few years back, is now become very common to verify the identity of a person for various purposes. In present time
we can see fingerprint-based systems everywhere in our daily life like for attendance in offices,  employee verification in banks, for cash withdrawal or deposits in ATMs, for
identity verification in government offices etc. We have already interfaced it with Arduino (https://circuitdigest.com/microcontroller-projects/fingerprint-attendance-system-
using-arduino-uno), today we are going to interface FingerPrint Sensor with Raspberry Pi. Using this Raspberry Pi FingerPrint System, we can enroll new finger prints in the
system and can delete the already fed finger prints. Complete working of the system has been shown in the Video given at the end of article.

Required Components:
1. Raspberry Pi
2. USB to Serial converter

3. Fingerprint Module 

https://circuitdigest.com/microcontroller-projects/raspberry-pi-fingerprint-sensor-interfacing 1/21
05/11/2019 Raspberry Pi Fingerprint Sensor Interfacing Project with Code and Circuit diagram
4. Push buttons
5. 16x2 LCD
6. 10k pot
7. Bread Board or PCB (ordered from JLCPCB)
8. Jumper wires
9. LED (optional)
10. Resistor 150 ohm -1 k ohm (optional)

Circuit Diagram and Explanation:


In this Raspberry Pi Finger Print sensor interfacing project, we have used a 4 push buttons: one for enrolling the new finger pring, one for deleting the already fed finger prints
and rest two for increment/decrement the position of already fed Finger prints. A LED is used for indication that fingerprint sensor is ready to take finger for matching. Here we
have used a fingerprint module which works on UART. So here we have interfaced this fingerprint module with Raspberry Pi using a USB to Serial converter.

So, first of all, we need to make the all the required connection as shown in Circuit Diagram below. Connections are simple, we have just connected fingerprint module to
Raspberry Pi USB port by using USB to Serial converter. A 16x2 LCD (https://circuitdigest.com/article/16x2-lcd-display-module-pinout-datasheet) is used for displaying all
messages. A 10k pot is also used with LCD for controlling the contrast of the same. 16x2 LCD pins RS, EN, d4, d5, d6, and d7 are connected with GPIO Pin 18, 23, 24, 25, 8 and
7 of Raspberry Pi respectively. Four push buttons are connected to GPIO Pin 5, 6, 13 and 19 of Raspberry Pi. LED is also connected at pin 26 of RPI.

(/fullimage?i=circuitdiagram_mic/Fingerprint-Sensor-Interfacing-

with-Raspberry-Pi-circuit-diagram.png)
SPONSORED SEARCHES

PCB Circuit

Circuit Board

 

https://circuitdigest.com/microcontroller-projects/raspberry-pi-fingerprint-sensor-interfacing 2/21
05/11/2019 Raspberry Pi Fingerprint Sensor Interfacing Project with Code and Circuit diagram

 
ADVERTISEMENT

Installing Library for Finger


Print Sensor:
After making all the connections we need to power up
Raspberry Pi and get it ready with   terminal open. Now
we need to install fingerprint library for Raspberry Pi in
python language by following the below steps.

Step 1: To install this library, root privileges are required. So first we enter in root by given command:

sudo bash

Step 2: Then download some required packages by using given commands:

wget –O – http://apt.pm-codeworks.de/pm-codeworks.de.gpg (http://apt.pm-codeworks.de/pm-codeworks.de.gpg) | apt-key add –


wget http://apt.pm-codeworks.de/pm-codeworks.list -P /etc/apt/sources.list.d/ (http://apt.pm-codeworks.de/pm-codeworks.list%20-P%20/etc/apt/sources.li

 

https://circuitdigest.com/microcontroller-projects/raspberry-pi-fingerprint-sensor-interfacing 3/21
05/11/2019 Raspberry Pi Fingerprint Sensor Interfacing Project with Code and Circuit diagram

Step 3: After this, we need to update the Raspberry pi and install the downloaded finger print sensor library:

sudo apt-get update


sudo apt-get install python-fingerprint –yes

Step 4: After installing library now we need to check USB port on which your finger print sensor is connected, by using given the command:

ls /dev/ttyUSB*

Now replace the USB port no., with the USB port you got over the screen and replace it in the python code. Complete Python code is given at the end of this project.

Operation of Fingerprint Sensor with Raspberry Pi:


Operation of this project is simple, just run the python code and there will be some intro messages over LCD and then user will be asked to Place Finger on Finger Print Sensor.
Now by putting a finger over fingerprint module, we can check whether our finger prints are already stored or not. If your fingerprint is stored then LCD will show the message
with the storing position of fingerprint like ‘Fount at Pos:2’ otherwise it will show ‘No Match Found’.

 

https://circuitdigest.com/microcontroller-projects/raspberry-pi-fingerprint-sensor-interfacing 4/21
05/11/2019 Raspberry Pi Fingerprint Sensor Interfacing Project with Code and Circuit diagram

Now to enroll a finger Print, user needs to press enroll button and follow the instructions messages on LCD screen.

If the user wants to delete any of fingerprints then the user needs to press delete button. After which, LCD will ask for the position of the fingerprint which is to be deleted.
Now by using another two push button for increment and decrement, user can select the position of saved Finger Print and press enroll button (at this time enroll button
behave as Ok button) to delete that fingerprint. For more understanding have a look at the video given at the end of the project.

Python Programming:
Python for interfacing Finger Print Sensor with RPi is easy with using fingerprint library functions. But if the user wants to interface it himself, then it will be little bit difficult for
the first time. In finger print sensor datasheets, everything is given that is required for interfacing the same module. A GitHub code
(https://github.com/bastianraschke/pyfingerprint) is available to test your Raspberry pi with Finger Print sensor.

Here we have used the library so we just need to call library function. In code, first we need to import libraries like fingerprint, GPIO and time, then we need to define pins for
LCD, LED and push buttons.

import time
from pyfingerprint.pyfingerprint import PyFingerprint
import RPi.GPIO as gpio

RS =18
EN =23
D4 =24
D5 =25
D6 =8
D7 =7

enrol=5
delet=6
inc=13
dec=19
led=26

HIGH=1
LOW=0

After this, 
we need to initialize and give direction to the selected pins 

https://circuitdigest.com/microcontroller-projects/raspberry-pi-fingerprint-sensor-interfacing 5/21
05/11/2019 Raspberry Pi Fingerprint Sensor Interfacing Project with Code and Circuit diagram

gpio.setwarnings(False)
gpio.setmode(gpio.BCM)
gpio.setup(RS, gpio.OUT)
gpio.setup(EN, gpio.OUT)
gpio.setup(D4, gpio.OUT)
gpio.setup(D5, gpio.OUT)
gpio.setup(D6, gpio.OUT)
gpio.setup(D7, gpio.OUT)

gpio.setup(enrol, gpio.IN, pull_up_down=gpio.PUD_UP)


gpio.setup(delet, gpio.IN, pull_up_down=gpio.PUD_UP)
gpio.setup(inc, gpio.IN, pull_up_down=gpio.PUD_UP)
gpio.setup(dec, gpio.IN, pull_up_down=gpio.PUD_UP)
gpio.setup(led, gpio.OUT)

Now we have initialized fingerprint Sensor

try:
f = PyFingerprint('/dev/ttyUSB0', 57600, 0xFFFFFFFF, 0x00000000)
if ( f.verifyPassword() == False ):
raise ValueError('The given fingerprint sensor password is wrong!')
except Exception as e:
print('Exception message: ' + str(e))
exit(1)

We have written some function to initialize and drive the LCD, check the complete code below in code section:

def begin(), def lcdcmd(ch), def lcdwrite(ch), def lcdprint(Str), def setCursor(x,y)

After writing all LCD driver functions, we have placed functions for fingerprint enrolling, searching and deleting.

def enrollFinger() function is used for enrol or save the new finger prints.
def searchFinger() function is used to searthc the already stored finger prints
def deleteFinger() functinos is used to deoted the already saved finger print by pressing the correspontind push button.

All above function’s Code is given the in python code given below.

After this, finally, we need to initialize system by in while 1 loop by asking to Place Finger on finger print sensor and then system will check whether this finger print it valid or
not and display the results accordingly.

begin()
lcdcmd(0x01)
lcdprint("FingerPrint ")
lcdcmd(0xc0)
lcdprint("Interfacing ")
time.sleep(3)
lcdcmd(0x01)
lcdprint("Circuit Digest")
lcdcmd(0xc0)
lcdprint("Welcomes You ")
time.sleep(3)
flag=0
lcdclear()

while 1:
gpio.output(led, HIGH)
lcdcmd(1)
lcdprint("Place Finger")
if gpio.input(enrol) == 0:
gpio.output(led, LOW)
enrollFinger()
elif gpio.input(delet) == 0:
gpio.output(led, LOW)
while gpio.input(delet) == 0:
time.sleep(0.1)
deleteFinger()
else:
searchFinger()
 

https://circuitdigest.com/microcontroller-projects/raspberry-pi-fingerprint-sensor-interfacing 6/21
05/11/2019 Raspberry Pi Fingerprint Sensor Interfacing Project with Code and Circuit diagram
 

Complete Python Code and a Working Video is given below.

Code
import time
from pyfingerprint.pyfingerprint import PyFingerprint

import RPi.GPIO as gpio

RS =18

EN =23

D4 =24
D5 =25

D6 =8

D7 =7

enrol=5

delet=6

inc=13
dec=19

led=26

HIGH=1

LOW=0

gpio.setwarnings(False)
gpio.setmode(gpio.BCM)

gpio.setup(RS, gpio.OUT)

gpio.setup(EN, gpio.OUT)

gpio.setup(D4, gpio.OUT)

gpio.setup(D5, gpio.OUT)
gpio.setup(D6, gpio.OUT)

gpio.setup(D7, gpio.OUT)

gpio.setup(enrol, gpio.IN, pull_up_down=gpio.PUD_UP)

gpio.setup(delet, gpio.IN, pull_up_down=gpio.PUD_UP)

gpio.setup(inc, gpio.IN, pull_up_down=gpio.PUD_UP)

gpio.setup(dec, gpio.IN, pull_up_down=gpio.PUD_UP)


gpio.setup(led, gpio.OUT)

try:

    f = PyFingerprint('/dev/ttyUSB0', 57600, 0xFFFFFFFF, 0x00000000)

    if ( f.verifyPassword() == False ):

        raise ValueError('The given fingerprint sensor password is wrong!')

except Exception as e:
    print('Exception message: ' + str(e))

    exit(1)

def begin():

  lcdcmd(0x33) 

  lcdcmd(0x32) 
  lcdcmd(0x06)

  lcdcmd(0x0C) 

  lcdcmd(0x28) 

  lcdcmd(0x01) 

  time.sleep(0.0005)
 

def lcdcmd(ch): 

  gpio.output(RS, 0)

  gpio.output(D4, 0)

  gpio.output(D5, 0)

  gpio.output(D6, 0) 

https://circuitdigest.com/microcontroller-projects/raspberry-pi-fingerprint-sensor-interfacing 7/21
05/11/2019 Raspberry Pi Fingerprint Sensor Interfacing Project with Code and Circuit diagram
  gpio.output(D7, 0)

  if ch&0x10==0x10:

    gpio.output(D4, 1)
  if ch&0x20==0x20:

    gpio.output(D5, 1)

  if ch&0x40==0x40:

    gpio.output(D6, 1)

  if ch&0x80==0x80:
    gpio.output(D7, 1)

  gpio.output(EN, 1)

  time.sleep(0.005)

  gpio.output(EN, 0)

  # Low bits
  gpio.output(D4, 0)

  gpio.output(D5, 0)

  gpio.output(D6, 0)

  gpio.output(D7, 0)

  if ch&0x01==0x01:
    gpio.output(D4, 1)

  if ch&0x02==0x02:

    gpio.output(D5, 1)

  if ch&0x04==0x04:

    gpio.output(D6, 1)
  if ch&0x08==0x08:

    gpio.output(D7, 1)

  gpio.output(EN, 1)

  time.sleep(0.005)

  gpio.output(EN, 0)
  

def lcdwrite(ch): 

  gpio.output(RS, 1)

  gpio.output(D4, 0)

  gpio.output(D5, 0)
  gpio.output(D6, 0)

  gpio.output(D7, 0)

  if ch&0x10==0x10:

    gpio.output(D4, 1)

  if ch&0x20==0x20:
    gpio.output(D5, 1)

  if ch&0x40==0x40:

    gpio.output(D6, 1)

  if ch&0x80==0x80:

    gpio.output(D7, 1)
  gpio.output(EN, 1)

  time.sleep(0.005)

  gpio.output(EN, 0)

  # Low bits

  gpio.output(D4, 0)
  gpio.output(D5, 0)

  gpio.output(D6, 0)

  gpio.output(D7, 0)

  if ch&0x01==0x01:
    gpio.output(D4, 1)

  if ch&0x02==0x02:

    gpio.output(D5, 1)

  if ch&0x04==0x04:

https://circuitdigest.com/microcontroller-projects/raspberry-pi-fingerprint-sensor-interfacing 8/21
05/11/2019 Raspberry Pi Fingerprint Sensor Interfacing Project with Code and Circuit diagram
    gpio.output(D6, 1)
  if ch&0x08==0x08:

    gpio.output(D7, 1)

  gpio.output(EN, 1)

  time.sleep(0.005)

  gpio.output(EN, 0)
def lcdclear():

  lcdcmd(0x01)

def lcdprint(Str):
  l=0;

  l=len(Str)

  for i in range(l):

    lcdwrite(ord(Str[i]))

    
def setCursor(x,y):

    if y == 0:

        n=128+x

    elif y == 1:

        n=192+x
    lcdcmd(n)

def enrollFinger():

    lcdcmd(1)

    lcdprint("Enrolling Finger")

    time.sleep(2)

    print('Waiting for finger...')


    lcdcmd(1)

    lcdprint("Place Finger")

    while ( f.readImage() == False ):

        pass

    f.convertImage(0x01)
    result = f.searchTemplate()

    positionNumber = result[0]

    if ( positionNumber >= 0 ):

        print('Template already exists at position #' + str(positionNumber))

        lcdcmd(1)
        lcdprint("Finger ALready")

        lcdcmd(192)

        lcdprint("   Exists     ")

        time.sleep(2)

        return
    print('Remove finger...')

    lcdcmd(1)

    lcdprint("Remove Finger")

    time.sleep(2)

    print('Waiting for same finger again...')


    lcdcmd(1)

    lcdprint("Place Finger")

    lcdcmd(192)

    lcdprint("   Again    ")

    while ( f.readImage() == False ):


        pass

    f.convertImage(0x02)

    if ( f.compareCharacteristics() == 0 ):

        print "Fingers do not match"


 
        lcdcmd(1)

https://circuitdigest.com/microcontroller-projects/raspberry-pi-fingerprint-sensor-interfacing 9/21
05/11/2019 Raspberry Pi Fingerprint Sensor Interfacing Project with Code and Circuit diagram
        lcdprint("Finger Did not")

        lcdcmd(192)

        lcdprint("   Mactched   ")


        time.sleep(2)

        return

    f.createTemplate()

    positionNumber = f.storeTemplate()

    print('Finger enrolled successfully!')


    lcdcmd(1)

    lcdprint("Stored at Pos:")

    lcdprint(str(positionNumber))

    lcdcmd(192)

    lcdprint("successfully")
    print('New template position #' + str(positionNumber))

    time.sleep(2)

def searchFinger():

    try:

        print('Waiting for finger...')

        while( f.readImage() == False ):


            #pass

            time.sleep(.5)

            return

        f.convertImage(0x01)

        result = f.searchTemplate()
        positionNumber = result[0]

        accuracyScore = result[1]

        if positionNumber == -1 :

            print('No match found!')

            lcdcmd(1)
            lcdprint("No Match Found")

            time.sleep(2)

            return

        else:

            print('Found template at position #' + str(positionNumber))


            lcdcmd(1)

            lcdprint("Found at Pos:")

            lcdprint(str(positionNumber))

            time.sleep(2)

    except Exception as e:
        print('Operation failed!')

        print('Exception message: ' + str(e))

        exit(1)

    

def deleteFinger():
    positionNumber = 0

    count=0

    lcdcmd(1)

    lcdprint("Delete Finger")

    lcdcmd(192)
    lcdprint("Position: ")

    lcdcmd(0xca)

    lcdprint(str(count))

    while gpio.input(enrol) == True:   # here enrol key means ok

        if gpio.input(inc) == False:
            count=count+1
 
            if count>1000:

https://circuitdigest.com/microcontroller-projects/raspberry-pi-fingerprint-sensor-interfacing 10/21
05/11/2019 Raspberry Pi Fingerprint Sensor Interfacing Project with Code and Circuit diagram
                count=1000
            lcdcmd(0xca)

            lcdprint(str(count))

            time.sleep(0.2)

        elif gpio.input(dec) == False:

            count=count-1
            if count<0:

                count=0

            lcdcmd(0xca)

            lcdprint(str(count))

            time.sleep(0.2)
    positionNumber=count

    if f.deleteTemplate(positionNumber) == True :

        print('Template deleted!')

        lcdcmd(1)

        lcdprint("Finger Deleted");
        time.sleep(2)

begin()

lcdcmd(0x01)

lcdprint("FingerPrint ")

lcdcmd(0xc0)
lcdprint("Interfacing ")

time.sleep(3)

lcdcmd(0x01)

lcdprint("Circuit Digest")

lcdcmd(0xc0)
lcdprint("Welcomes You  ")

time.sleep(3)

flag=0

lcdclear()

while 1:

    gpio.output(led, HIGH)
    lcdcmd(1)

    lcdprint("Place Finger")

    if gpio.input(enrol) == 0:

        gpio.output(led, LOW)

        enrollFinger()
    elif gpio.input(delet) == 0:

        gpio.output(led, LOW)

        while gpio.input(delet) == 0:

            time.sleep(0.1)

        deleteFinger()
    else:

        searchFinger()

Video

 

https://circuitdigest.com/microcontroller-projects/raspberry-pi-fingerprint-sensor-interfacing 11/21
05/11/2019 Raspberry Pi Fingerprint Sensor Interfacing Project with Code and Circuit diagram

Raspberry Pi with Fingerprint Module

TAGS FINGER PRINT SENSOR (/TAGS/FINGER-PRINT-SENSOR) RASPBERRY PI (/TAGS/RASPBERRY-PI) RASPBERRY PI 3 (/TAGS/RASPBERRY-PI-3)

INTERFACING (/TAGS/INTERFACING)

Get Our Weekly Newsletter!


Subscribe below to receive most popular news, articles and DIY projects from Circuit Digest

Email Address *

Name

Country
United States of America

Subscribe

RELATED CONTENT

(/article/in-display-fingerprint-sensors)

In-display Fingerprint Sensors: Types and Working (/article/in-display-fingerprint-sensors)

(/microcontroller-projects/iot-based-biometric-attendance-system-using-arduino-and-thingsboard)

IoT Based Biometric Attendance system using Arduino and Thingsboard (/microcontroller-projects/iot-based-biometric-attendance-system-using-arduino-and-
thingsboard)

(/microcontroller-projects/arduino-fingerprint-sensor-gt511c3-interfacing)

 
Interfacing GT511C3 Finger Print Sensor (FPS) with Arduino (/microcontroller-projects/arduino-fingerprint-sensor-gt511c3-interfacing)

https://circuitdigest.com/microcontroller-projects/raspberry-pi-fingerprint-sensor-interfacing 12/21
05/11/2019 Raspberry Pi Fingerprint Sensor Interfacing Project with Code and Circuit diagram

(/microcontroller-projects/fingerprint-sensor-interfacing-with-pic-microcontroller)

Interfacing Fingerprint Sensor with PIC Microcontroller (/microcontroller-projects/fingerprint-sensor-interfacing-with-pic-microcontroller)


 PREVIOUS POST
Smart Blind Stick using
Arduino
(/microcontroller-projects/fingerprint-based-biometric-voting-machine-arduino)

Fingerprint Based Biometric Voting Machine using Arduino (/microcontroller-projects/fingerprint-based-biometric-voting-machine-arduino)

(/project/diy-electronic-garage-door-opener-with-fingerprint-scanner)

DIY Garage Door Opener with Fingerprint Scanner (/project/diy-electronic-garage-door-opener-with-fingerprint-scanner)


(https://circuitdigest.com/microcontroller-projects/arduino-smart-blind-stick)

NEXT POST 
Arduino Calculator using 4x4 Keypad (https://circuitdigest.com/microcontroller-projects/arduino-calculator-using-4x4-keypad)

COMMENTS

magnim
Jan 18, 2018

waou this is a nice project


Log in (/user/login?destination=node/1547%23comment-form) or register (/user/register?destination=node/1547%23comment-form) to post comments

Aniket
Jan 22, 2018

can u plzz help me in connecting this fingerprint sensor to esp2866 module


Log in (/user/login?destination=node/1547%23comment-form) or register (/user/register?destination=node/1547%23comment-form) to post comments

Hassan Raza
Feb 17, 2018

Nice work bro


Log in (/user/login?destination=node/1547%23comment-form) or register (/user/register?destination=node/1547%23comment-form) to post comments

ravitheja
Mar 07, 2018

which software did you use


Log in (/user/login?destination=node/1547%23comment-form) or register (/user/register?destination=node/1547%23comment-form) to post comments
and i need lib files for proteus software

Vidisha Narang
Mar 08, 2018

I tried installing fingerprint library to my pi but couldn't complete the installation as, it showed me an error in the last command which was, unable
Log in (/user/login?destination=node/1547%23comment-form) or register (/user/register?destination=node/1547%23comment-form) to post comments
 to locate package -yes. Could you please help me to resolve this? 

https://circuitdigest.com/microcontroller-projects/raspberry-pi-fingerprint-sensor-interfacing 13/21
05/11/2019 Raspberry Pi Fingerprint Sensor Interfacing Project with Code and Circuit diagram
sv
Mar 12, 2018

Could u pls tell me the changes required...


Log in (/user/login?destination=node/1547%23comment-form) or register (/user/register?destination=node/1547%23comment-form) to post comments
if we want to send the result over internet

bhuvan
Apr 10, 2018

I tried installing fingerprint library. But it showed an error stating unable to locate package.Please help
Log in (/user/login?destination=node/1547%23comment-form) or register (/user/register?destination=node/1547%23comment-form) to post comments

Pradeep Tidke
Apr 13, 2018

Which fingerprint scanner you have used?


Log in (/user/login?destination=node/1547%23comment-form) or register (/user/register?destination=node/1547%23comment-form) to post comments

Danni
Apr 29, 2018

When I try to run this, it says that there is an ImportError in line 3:


Log in (/user/login?destination=node/1547%23comment-form) or register (/user/register?destination=node/1547%23comment-form) to post comments
ImportError: No module named 'pyfingerprint'

I can't figure out what the problem is. Please help!

Wingernew3
Jul 27, 2018

The Python library isn't installed or loaded. If you cant figure that out get a python book and do a little troubleshooting
Log in (/user/login?destination=node/1547%23comment-form) or register (/user/register?destination=node/1547%23comment-form) to post
comments

Stormlord
May 11, 2018

Hi there,
Log in (/user/login?destination=node/1547%23comment-form) or register (/user/register?destination=node/1547%23comment-form) to post comments
It's not necessary to use the rs232 to usb converter. You can also use the rs-232 port on the Pi.
In raspi-config go to 5 Interfacing Options, then go to P6 Serial and on the question "Would you like a login shell to be accessible over serial?" select
NO.
then select yes to the question "Would you like the serial port hardware to be enabled?" and reboot the Pi.
If you have a look at /dev you'll see that there is a device which is called "ttyAMA0"
This is your serial port on the Pi.
Replace "ttyUSB0" in the programs by "ttyAMA0"
That's all.
Keep in mind that the inputs and outputs on the Pi are 3.3V, but with a "Logic Level Converter Bi-Directional Module 5V to 3.3V" you can put it all safely
together

tushar
May 14, 2018

sir in python shell It's show "Exception message: The received packet do not begin with a valid header!" that type of error
Log in (/user/login?destination=node/1547%23comment-form) or register (/user/register?destination=node/1547%23comment-form) to post comments
and in terminal "Exception message: The fingerprint sensor port "/dev/ttyUSB0" was not found!"
please solve my problem..

venkat
Jun 05, 2018

hi all
Log in (/user/login?destination=node/1547%23comment-form) or register (/user/register?destination=node/1547%23comment-form) to post comments

is it possible to add fingerprints after setuping the divice with out display 

https://circuitdigest.com/microcontroller-projects/raspberry-pi-fingerprint-sensor-interfacing 14/21
05/11/2019 Raspberry Pi Fingerprint Sensor Interfacing Project with Code and Circuit diagram
Ashwini
Jul 26, 2018

can I interface fingerprint sensor r307 with raspberry pi without using TTL convertor?
Log in (/user/login?destination=node/1547%23comment-form) or register (/user/register?destination=node/1547%23comment-form) to post comments

Aswinth Raj (/users/aswinth-raj)


Jul 27, 2018
(/users/aswinth-raj)
you can use TTL, or usart or even usb 2.0 for r307 sensor

Log in (/user/login?destination=node/1547%23comment-form) or register (/user/register?destination=node/1547%23comment-form) to post


comments

Alex
Aug 01, 2018

I tried installing fingerprint library to my pi but couldn't complete the installation as, it showed me an error in the last command which was, unable
Log in (/user/login?destination=node/1547%23comment-form) or register (/user/register?destination=node/1547%23comment-form) to post comments
to locate package -yes. Could you please help me to resolve this?

Ryan
Aug 31, 2018

I have sparkfun GT-521F52 fingerprint device. will this code work on the device?
Log in (/user/login?destination=node/1547%23comment-form) or register (/user/register?destination=node/1547%23comment-form) to post comments

Aswinth Raj (/users/aswinth-raj)


Sep 02, 2018
(/users/aswinth-raj)
Yes Sparkfun GT-521F2 can be inerfaced with Raspberry pi

Log in (/user/login?destination=node/1547%23comment-form) or register (/user/register?destination=node/1547%23comment-form) to post


comments

Asirvad (/users/asirvad)
Oct 02, 2018
(/users/asirvad)
I tried to run the code but it gives error of no module found with name pyfingerprint in python 3 version . I have installed the
Log in (/user/login?destination=node/1547%23comment-form) or register (/user/register?destination=node/1547%23comment-form) to post comments
python fingerprint package also but still it gives the same error of no module found

Asirvad (/users/asirvad)
Oct 02, 2018
(/users/asirvad)
I tried to run the code but it gives error of no module found with name pyfingerprint in python 3 version . I have installed the
Log in (/user/login?destination=node/1547%23comment-form) or register (/user/register?destination=node/1547%23comment-form) to post comments
python fingerprint package also but still it gives the same error of no module found

naveen (/users/naveen-0)
Mar 23, 2019
(/users/naveen-0)
step 3 is not working properly could you please give the solution  i.e.
Log in (/user/login?destination=node/1547%23comment-form) or register (/user/register?destination=node/1547%23comment-form) to post comments
we need to update the Raspberry pi and install the downloaded finger print sensor library:

 this step is not working properly

LOG IN (/USER/LOGIN?DESTINATION=NODE/1547%23COMMENT-FORM) OR REGISTER (/USER/REGISTER?DESTINATION=NODE/1547%23COMMENT-FORM) TO


POST COMMENT

 

https://circuitdigest.com/microcontroller-projects/raspberry-pi-fingerprint-sensor-interfacing 15/21
05/11/2019 Raspberry Pi Fingerprint Sensor Interfacing Project with Code and Circuit diagram
Texas Instruments UCC28056 6-Pin PFC Controllers (http://bit.ly/335pGki )
Offer an innovative mixed-mode method derived from the devices’ PFC boost stages.

(http://bit.ly/335pGki
)
Texas Instruments OPA167x Audio Op Amps (http://bit.ly/2PFCNVv )
Achieve a low 4.5nV/√Hz noise density and low distortion of 0.0001% at 1kHz.

(http://bit.ly/2PFCNVv
)
TE Connectivity's ERFV Coax Connectors (http://bit.ly/31YiRPT )
Offer a one-piece design that enables board-to-board and board-to-filter applications.

(http://bit.ly/31YiRPT
)
ON Semiconductor Strata Developer Studio (http://bit.ly/2WtJxad )
Cloud-connected development platform for evaluation boards and reference designs.

(http://bit.ly/2WtJxad
)
Murata WMRAG 32.768kHz MEMs Resonators (http://bit.ly/2NwelmN )
Contribute to reducing the size and power consumption of IoT devices and wearable devices.

(http://bit.ly/2NwelmN
)
KEMET CAN 250VAC Non-Safety Rated AC Capacitors (http://bit.ly/2PyXRNb )
Qualified for continuous use under 250VAC and 50Hz/60Hz AC line conditions.

(http://bit.ly/2PyXRNb
)
EPCOS/TDK B40900 Aluminum Electrolytic Capacitors (http://bit.ly/2PJIIcb )
Offer very high ripple current with low ESR across the operating temperature range.

(http://bit.ly/2PJIIcb
)
Coilcraft Magnetics for PoE/PoE+ Applications (http://bit.ly/3341ezJ )
Flyback transformers with 36V-72V input range, 250kHz switching, and 1500Vrms isolation.

(http://bit.ly/3341ezJ
)

 

https://circuitdigest.com/microcontroller-projects/raspberry-pi-fingerprint-sensor-interfacing 16/21
05/11/2019 Raspberry Pi Fingerprint Sensor Interfacing Project with Code and Circuit diagram

NEWS ARTICLES PROJECTS

LoRa-Based Industrial Sensors for Connectivity in Difficult Environments (/news/lora-based-industrial-sensors-for-connectivity-in-difficult-environments)

(/news/lora-
based-
industrial-
sensors-for-
connectivity-
in-difficult-
environments)

LC79D – High Performance GNSS Positioning Module for Precise and Cost Effective Applications (/news/lc79d-high-performance-gnss-positioning-module-
for-precise-and-cost-effective-applications)

(/news/lc79d-
high-
performance-
gnss-
positioning-
module-for-
precise-and-
cost-effective-
applications)

New products in essential Analog portfolio deliver precision measurement and reliable protection (/news/new-products-in-essential-analog-portfolio-deliver-
precision-measurement-and-reliable-protection)

(/news/new-
products-in-
essential-
analog-
portfolio-
deliver-
precision-
measurement-
and-reliable-
protection)

Energy Harvesting Evaluation kit for Battery Maintenance Free IoT Equipments (/news/energy-harvesting-evaluation-kit-for-battery-maintenance-free-iot-
equipments)

(/news/energy-
harvesting-
evaluation-kit-
for-battery-
maintenance-
free-iot-
equipments)

STMicroelectronics and Audi AG Cooperate to Develop and Deliver Next-Generation Automotive Exterior Lighting Solutions (/news/stmicroelectronics-and-
audi-ag-cooperate-develop-and-deliver-next-generation-automotive-exterior-lighting-solutions)

(/news/stmicroelectronics-
and-audi-ag-
cooperate-
develop-and-
deliver-next-
generation-
automotive-
exterior-
lighting-
solutions)

REFERENCE
DESIGNS

 

https://circuitdigest.com/microcontroller-projects/raspberry-pi-fingerprint-sensor-interfacing 17/21
05/11/2019 Raspberry Pi Fingerprint Sensor Interfacing Project with Code and Circuit diagram
Isolated CAN Flexible Data (FD) Rate Repeater Reference Design (https://ad.doubleclick.net/ddm/clk/454731015;252144386;a?
http://www.ti.com/tool/TIDA-01487?HQS=sys-ind-fa-indcomms19-asset-rd-CircuitDigest-in&DCM=yes &https%3A%2F%2Ffanyv88.com%3A443%2Fhttp%2Fwww.ti.com%2Ftool%2FTIDA-
01487%3FHQS=sys-ind-fa-indcomms19-asset-rd-CircuitDigest-in&DCM=yes_)
(https://ad.doubleclick.net/ddm/clk/454731015;252144386;a?
The CAN transceiver and arbitration logic in this TI design support CAN FD speed up to 2Mbps.
http://www.ti.com/tool/TIDA-
01487?
HQS=sys-ind-
fa-
indcomms19-
asset-rd-
CircuitDigest-
in&DCM=yes
&https%3A%2F%2Ffanyv88.com%3A443%2Fhttp%2Fwww.ti.com%2Ftool%2FTIDA-
01487%3FHQS=sys-
ind-fa-
indcomms19-
asset-rd-
CircuitDigest-
in&DCM=yes_)
Ultra-Small IO-Link Sensor Transmitter with RTD Front End Reference Design (https://ad.doubleclick.net/ddm/clk/454773767;252144386;u?
http://www.ti.com/tool/TIDA-01335?HQS=sys-ind-fa-functionalsafety19-asset-rd-CircuitDigest-in&DCM=yes
&https%3A%2F%2Ffanyv88.com%3A443%2Fhttp%2Fwww.ti.com%2Ftool%2FTIDA-01335%3FHQS=sys-ind-fa-functionalsafety19-asset-rd-CircuitDigest-in&DCM=yes_)
(https://ad.doubleclick.net/ddm/clk/454773767;252144386;u?
Small 6mm form factor PCB width with integrated protection and resistance temperature detector.
http://www.ti.com/tool/TIDA-
01335?
HQS=sys-ind-
fa-
functionalsafety19-
asset-rd-
CircuitDigest-
in&DCM=yes
&https%3A%2F%2Ffanyv88.com%3A443%2Fhttp%2Fwww.ti.com%2Ftool%2FTIDA-
01335%3FHQS=sys-
ind-fa-
functionalsafety19-
asset-rd-
CircuitDigest-
in&DCM=yes_)
TUV-assessed digital input reference design for IEC 61508 (SIL-2) (https://ad.doubleclick.net/ddm/clk/454770317;252144386;i?
http://www.ti.com/tool/TIDA-010049?HQS=sys-ind-fa-functionalsafety19-asset-rd-CircuitDigest-in&DCM=yes
&https%3A%2F%2Ffanyv88.com%3A443%2Fhttp%2Fwww.ti.com%2Ftool%2FTIDA-010049%3FHQS=sys-ind-fa-functionalsafety19-asset-rd-CircuitDigest-in&DCM=yes_)
(https://ad.doubleclick.net/ddm/clk/454770317;252144386;i?
8-channel, group-isolated, digital input module design for industrial functional safety.
http://www.ti.com/tool/TIDA-
010049?
HQS=sys-ind-
fa-
functionalsafety19-
asset-rd-
CircuitDigest-
in&DCM=yes
&https%3A%2F%2Ffanyv88.com%3A443%2Fhttp%2Fwww.ti.com%2Ftool%2FTIDA-
010049%3FHQS=sys-
ind-fa-
functionalsafety19-
asset-rd-
CircuitDigest-
in&DCM=yes_)
Nanosecond Laser Driver Reference Design for LiDAR (https://ad.doubleclick.net/ddm/clk/454730208;252144386;d?http://www.ti.com/tool/TIDA-
01573?HQS=sys-ind-fa-robotics19-asset-rd-CircuitDigest-in&DCM=yes &https%3A%2F%2Ffanyv88.com%3A443%2Fhttp%2Fwww.ti.com%2Ftool%2FTIDA-01573%3FHQS=sys-ind-fa-
robotics19-asset-rd-CircuitDigest-in&DCM=yes_)
(https://ad.doubleclick.net/ddm/clk/454730208;252144386;d?
This design showcases the LMG1020, low-side nanosecond GaN gate driver capable of driving a FET.
http://www.ti.com/tool/TIDA-
01573?
HQS=sys-ind-
fa-robotics19-
asset-rd-
CircuitDigest-
in&DCM=yes
&https%3A%2F%2Ffanyv88.com%3A443%2Fhttp%2Fwww.ti.com%2Ftool%2FTIDA-

01573%3FHQS=sys- 

https://circuitdigest.com/microcontroller-projects/raspberry-pi-fingerprint-sensor-interfacing 18/21
05/11/2019 Raspberry Pi Fingerprint Sensor Interfacing Project with Code and Circuit diagram
ind-fa-
robotics19-
asset-rd-
CircuitDigest-
in&DCM=yes_)
Three-level, three-phase SiC AC-to-DC converter reference design (https://ad.doubleclick.net/ddm/clk/454731825;252144386;j?
http://www.ti.com/tool/TIDA-010039?HQS=sys-ind-gi-evcharging19-asset-rd-CircuitDigest-in&DCM=yes &https%3A%2F%2Ffanyv88.com%3A443%2Fhttp%2Fwww.ti.com%2Ftool%2FTIDA-
010039%3FHQS=sys-ind-gi-evcharging19-asset-rd-CircuitDigest-in&DCM=yes_)
(https://ad.doubleclick.net/ddm/clk/454731825;252144386;j?
This design features SiC MOSFETs with switching loss to enable higher DC bus voltages of up to 800V.
http://www.ti.com/tool/TIDA-
010039?
HQS=sys-ind-
gi-
evcharging19-
asset-rd-
CircuitDigest-
in&DCM=yes
&https%3A%2F%2Ffanyv88.com%3A443%2Fhttp%2Fwww.ti.com%2Ftool%2FTIDA-
010039%3FHQS=sys-
ind-gi-
evcharging19-
asset-rd-
CircuitDigest-
in&DCM=yes_)
Bidirectional CLLLC resonant DAB reference design for HEV/EV onboard charger (https://ad.doubleclick.net/ddm/clk/454766393;252144386;r?
http://www.ti.com/tool/TIDM-02002?HQS=sys-ind-gi-evcharging19-asset-rd-CircuitDigest-in&DCM=yes &https%3A%2F%2Ffanyv88.com%3A443%2Fhttp%2Fwww.ti.com%2Ftool%2FTIDM-
02002%3FHQS=sys-ind-gi-evcharging19-asset-rd-CircuitDigest-in&DCM=yes_)
(https://ad.doubleclick.net/ddm/clk/454766393;252144386;r?
Reference design from Texas Instruments for HEV/EV onboard charter and energy storage applications.
http://www.ti.com/tool/TIDM-
02002?
HQS=sys-ind-
gi-
evcharging19-
asset-rd-
CircuitDigest-
in&DCM=yes
&https%3A%2F%2Ffanyv88.com%3A443%2Fhttp%2Fwww.ti.com%2Ftool%2FTIDM-
02002%3FHQS=sys-
ind-gi-
evcharging19-
asset-rd-
CircuitDigest-
in&DCM=yes_)
Texas Instruments has many helpful resources to help in your EV Charging Design (https://ad.doubleclick.net/ddm/clk/454730991;252144386;m?
http://www.ti.com/solution/renewables_ev_charging?HQS=sys-ind-gi-evcharging19-asset-appd-CircuitDigest-in&DCM=yes
&https%3A%2F%2Ffanyv88.com%3A443%2Fhttp%2Fwww.ti.com%2Fsolution%2Frenewables_ev_charging%3FHQS=sys-ind-gi-evcharging19-asset-appd-CircuitDigest-in&DCM=yes_)
(https://ad.doubleclick.net/ddm/clk/454730991;252144386;m?
Our ICs & reference designs enable smarter and safer AC charging stations for electric vehicles.
http://www.ti.com/solution/renewables_ev_charging?
HQS=sys-ind-
gi-
evcharging19-
asset-appd-
CircuitDigest-
in&DCM=yes
&https%3A%2F%2Ffanyv88.com%3A443%2Fhttp%2Fwww.ti.com%2Fsolution%2Frenewables_ev_charging%3FHQS=sys-
ind-gi-
evcharging19-
asset-appd-
CircuitDigest-
in&DCM=yes_)
Bi-directional, dual active bridge reference design for level 3 EV charging (https://ad.doubleclick.net/ddm/clk/448478838;252144386;y?
http://www.ti.com/tool/TIDA-010054?HQS=sys-ind-gi-evcharging19-asset-rd-CircuitDigest-in&DCM=yes &https%3A%2F%2Ffanyv88.com%3A443%2Fhttp%2Fwww.ti.com%2Ftool%2FTIDA-
010054%3FHQS=sys-ind-gi-evcharging19-asset-rd-CircuitDigest-in&DCM=yes_)
(https://ad.doubleclick.net/ddm/clk/448478838;252144386;y?
Beneficial where power density, cost, weight and high voltage conversion ratio are critical factors.
http://www.ti.com/tool/TIDA-
010054?
HQS=sys-ind-
gi-
evcharging19-

asset-rd-

https://circuitdigest.com/microcontroller-projects/raspberry-pi-fingerprint-sensor-interfacing 19/21
05/11/2019 Raspberry Pi Fingerprint Sensor Interfacing Project with Code and Circuit diagram
CircuitDigest-
in&DCM=yes
&https%3A%2F%2Ffanyv88.com%3A443%2Fhttp%2Fwww.ti.com%2Ftool%2FTIDA-
010054%3FHQS=sys-
ind-gi-
evcharging19-
asset-rd-
CircuitDigest-
in&DCM=yes_)

Connect with us on social media and stay updated with latest news, articles and projects!

     (https://www.linkedin.com/company/circuit-
(https://www.facebook.com/circuitdigest/)
(https://twitter.com/CircuitDigest)
(https://www.youtube.com/channel/UCy3CUAIYgZdAOG9k3IPdLmw)
(https://www.instagram.com/circuit_digest/)
(https://www.pinterest.com/circuitdigest/)
digest/)

CATEGORIES

Embedded Electronics (https://circuitdigest.com/embedded)

Power Electronics (https://circuitdigest.com/power-electronics)

Analog Electronics (https://circuitdigest.com/analog-electronics)

Internet of Things (https://circuitdigest.com/internet-of-things)

Audio Electronics (https://circuitdigest.com/audio-electronics)

Electric Vehicles (https://circuitdigest.com/electric-vehicles)

Events (https://circuitdigest.com/events)

POPULAR

ROBOTICS (/ROBOTICS-PROJECTS) 555 CIRCUITS (/555-TIMER-CIRCUITS) ARDUINO PROJECTS (/ARDUINO-PROJECTS)

RASPBERRY PI PROJECTS (/SIMPLE-RASPBERRY-PI-PROJECTS-FOR-BEGINNERS) ELECTRONICS NEWS (HTTPS://CIRCUITDIGEST.COM/NEWS)

ELECTRONICS FORUM (HTTPS://CIRCUITDIGEST.COM/FORUMS) CALCULATORS (HTTPS://CIRCUITDIGEST.COM/CALCULATORS)

NEWSLETTER

Sign Up for Latest News

Enter your email

 

https://circuitdigest.com/microcontroller-projects/raspberry-pi-fingerprint-sensor-interfacing 20/21
05/11/2019 Raspberry Pi Fingerprint Sensor Interfacing Project with Code and Circuit diagram

Subscribe

Copyright © 2019 Circuit Digest (http://circuitdigest.com/). All rights reserved.

Privacy Policy (http://circuitdigest.com/privacy-policy) | Cookie Policy (https://circuitdigest.com/cookie-policy) | Terms of Use (https://circuitdigest.com/terms-of-use) | Contact Us
(http://circuitdigest.com/contact) | Advertise (http://circuitdigest.com/advertise)

https://circuitdigest.com/microcontroller-projects/raspberry-pi-fingerprint-sensor-interfacing 21/21

You might also like