Arduino 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.

 

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() {
Serial1.begin(57600);
Serial.begin(57600);
}

void loop()
{
while (Serial.available())
Serial1.write(Serial.read());
while (Serial1.available())
Serial.write(Serial1.read());
}

Hardware Connection

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

fingerprint-sensor-connection-windows-768x734

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-com

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-init

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.

connect-fingerprint-sensor-to-windows-enrol

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

biometric_enroll

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.

fingerprint-sensor-connection-arduino-768x734

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-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-with-arduino

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

enroll-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 

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

Blog at WordPress.com.

Up ↑

Create your website at WordPress.com
Get started
%d bloggers like this: