Home » Arduino » Fingerprint sensor

Fingerprint sensor

Using Optical Fingerprint Sensor With Arduino

Use an optical fingerprint sensor to add biometrics to your projects .This module has a high powered DSP chip AS608 that does the image rendering, calculation, feature-finding and searching. Connect to any microcontroller or system with TTL serial, and send packets of data to take photos, detect prints, hash and search. You can also enroll new fingers directly – up to 300 finger prints can be stored in the onboard FLASH memory. This sensor can be used with the SFGDemo  software on Windows – it makes testing the module simple, you can also use the software to enroll fingerprints and see them on your computer screen.
It also works with the Adafruit-Fingerprint-Sensor-Library.


Fingerprint Scanner Arduino


Buy components used in this project:

Fingerprint Scanner

12V Electric Solenoid Lock

1.8″ TFT Display

 Enrolling and Searching

Enrolling New Users with Windows


The easiest way to enroll a new fingerprint is to use the SFGDemo  software on Windows.

First up, you’ll want to connect the sensor to the computer via a USB-serial converter. You can do this by connecting it directly to the USB/Serial converter in the Arduino. Upload a blank sketch to the Arduino.

This sketch will allow you to bypass the Atmega chip and connect the fingerprint sensor directly to the USB/Serial chip converter.

void setup() {}
void loop() {}


If you’re using a Leonardo, Micro, Yun, or other ATmega32U4-based controller, use this sketch instead of the blank sketch – it allows Leonardo to pass serial data between fingerprint reader and Windows.

void setup() {

void loop()
while (Serial.available())
while (Serial1.available())


Hardware Connection

Connect to the Arduino TX, Rx, 5V and GND as shown in the picture below.

Connecting fingerprint sensor


Download the SFGDemoV2.0 software

Start up the SFGDemo software and click Open Device from the bottom left corner. Select the COM port used by the Arduino and press OK when done.

Connect fingerprint sensor to windows

You should see the following screen, with a “Open Device Success!” message and some device hardware information. You can change the baud rate in the bottom left hand corner, as well as the security level. They should default to 57600 baud and security level 3 so set them if they’re wrong .

Connect fingerprint sensor to Windows.

To enroll a new fingerprint click the Preview checkbox and press the Enroll button next to it (Con Enroll means continuous enroll, use it if you want to add many fingerprints). When the box comes up, enter in the Address ID  you want to use. You can use up to 300 ID numbers. Let’s start with Address 1 first.

Enrol fingerprint to Sensor.

The software will ask you to press the finger to the sensor.


Enroll finger

You can then see a preview of the fingerprint if you clicked the preview checkbox.

Enroll fingerprint success

You will then have to repeat the process, to get a second clean print.
On success you will get a “Success to enroll!”.

Enroll fingerprint success message

Searching with the Software

Click on the Search button on the right hand side.

Search fingerprint

When prompted, press a finger to the sensor. If it is the same finger, you should get a match with the ID number. If it is not a finger in the database, you will get a failure notice.

Search fingerprint success


Searching with Arduino

Connect the fingerprint scanner as shown in the image below.

Arduino fingerprint sensor

Download the Fingerprint Sensor library

Select the File-Examples-Adafruit_Fingerprint-fingerprint example sketch. Upload the code to your Arduino as usual. Open up the serial monitor at 9600 baud and when asked place your finger that was already enrolled against the sensor.
You should see the following:

Test fingerprint sensor with arduino

Enrolling with Arduino

For enrolling a new finger via Arduino run the File-Examples-Adafruit_Fingerprint-enroll sketch and upload it to the Arduino, use the same wiring as above. Open up the serial monitor, it will ask you to type in the ID to enroll – use the box up top to type in a number and click Send.

Enroll fingerprint with Arduino

Then go through the enrollment process. When it has successfully enrolled a finger, it will print Stored!

enroll fingerprint with Arduino success


You can edit the sketch to use it in many applications for example with solenoid lock or with a display instead of using the serial monitor.

Simple sketch using 1.8″ display 




0 Flares Twitter 0 Facebook 0 Filament.io 0 Flares ×

Leave a comment

Your email address will not be published. Required fields are marked *

0 Flares Twitter 0 Facebook 0 Filament.io 0 Flares ×