Introduction: ARDUINO FINGERPRINT SCANNER WITH 16X2 LCD

this instructable is based and inspired by Arduino LCD tutorial and fingerprint scanner from Adafruit (http://www.adafruit.com/product/751). I have added 16x2 LCD into the fingerprint to be able to see the status of the process of fingerprint scanning.

this is my first instructable, you are very welcome to comment and share.

materials:

Arduino Uno

16x2 LCD

fingerprint sensor

10k potentionmeter

220ohms resistor = 3pcs

red LED

green LED

jumper wires

breadboard

future improvements to be carried out:

1. auto shutdown when no input is detected within specified time to save power.

2. wake up function

3. integrate more sensor or inputs to activate finger scanning within predetermined scenario

4. use actuator to use for an application

Step 1: Enrolling the Fingerprint and Connecting the FPS Sensor and LCD

please follow the instructions given from adafruit tutorial http://www.adafruit.com/product/751 on how to connect the fingerprint sensor to the arduino during enrollment process. download the software for windows and install in your computer. enrolling the fingerprint using the software makes the process a lot easier.

make sure to add the adafruit library to your arduino library.

go to http://arduino.cc/en/Tutorial/LiquidCrystalSerial for tutorial of the LCD and the instructions on how to connect the components.

Step 2: Load the Fingerprint Sketch With LCD Sketch

copy and paste the codes below which i had modified in order to accommodate fingerprint scanning and display the results on LCD.

/***************************************************
This is an example sketch for our optical Fingerprint sensor

Designed specifically to work with the Adafruit BMP085 Breakout ----> http://www.adafruit.com/products/751

These displays use TTL Serial to communicate, 2 pins are required to interface Adafruit invests time and resources providing this open source code, please support Adafruit and open-source hardware by purchasing products from Adafruit!

Written by Limor Fried/Ladyada for Adafruit Industries. BSD license, all text above must be included in any redistribution ****************************************************/

/**********************MODIFIED BY PELEGREN of bedRoonics Labs**********************************/

/********************** ARDUINO FINGERPRINT SCANNER with 16x2 LCD monitor***************/

#include

#include

#include

#include

int getFingerprintIDez();

// pin #2 is IN from sensor (GREEN wire)

// pin #3 is OUT from arduino (WHITE wire)

SoftwareSerial mySerial(2, 3);

LiquidCrystal lcd(9, 8, 7, 6, 5, 4); // initialize the library with the numbers of the interface pins

Adafruit_Fingerprint finger = Adafruit_Fingerprint(&mySerial);

void setup()

{ Serial.begin(9600); // initialize the serial communications:

lcd.begin(16,2); lcd.setCursor(0,0); lcd.print("Scan your finger");

pinMode(13,OUTPUT);

pinMode(12,OUTPUT);

pinMode(11, OUTPUT);

pinMode(A0, INPUT);

finger.begin(57600); // set the data rate for the sensor serial port }

void loop() // run over and over again

{

getFingerprintID();

delay(100);

digitalWrite (13,HIGH);

}

uint8_t getFingerprintID()

{ uint8_t p = finger.getImage();

switch (p)

{

case FINGERPRINT_OK:

lcd.clear();

lcd.print(" Image taken... ");

delay(1000);

break;

case FINGERPRINT_NOFINGER:

return p;

case FINGERPRINT_PACKETRECIEVEERR:

return p;

case FINGERPRINT_IMAGEFAIL:

return p;

default:

return p; }

// OK success!

p = finger.image2Tz();

switch (p) {

case FINGERPRINT_OK:

break;

case FINGERPRINT_IMAGEMESS:

return p;

case FINGERPRINT_PACKETRECIEVEERR:

return p;

case FINGERPRINT_FEATUREFAIL:

return p;

case FINGERPRINT_INVALIDIMAGE:

return p;

default:

return p; }

// OK converted!

p = finger.fingerFastSearch();

if (p == FINGERPRINT_OK)

{

lcd.clear();

lcd.print(" Found match! ");

digitalWrite(11, HIGH);

delay(1000);

digitalWrite(11,LOW); // turn on green LED to indicate match

}

else if(p == FINGERPRINT_NOTFOUND)

{

lcd.clear();

lcd.setCursor(0,0);

lcd.print(" Did not match! ");

delay(1000);

lcd.clear();

lcd.setCursor(0,0);

lcd.print(" scan finger! ");

return p;

}

else

{ return p; }

// IF FOUND A MATCH............

lcd.clear();

lcd.setCursor(0,0);

lcd.print("Found ID #");

lcd.print(finger.fingerID);

lcd.setCursor(0,1);

lcd.print("confidence ");

lcd.print(finger.confidence); }

// returns -1 if failed, otherwise returns ID #

int getFingerprintIDez() {

uint8_t p = finger.getImage();

if (p != FINGERPRINT_OK) return -1;

p = finger.image2Tz();

if (p != FINGERPRINT_OK) return -1;

p = finger.fingerFastSearch();

if (p != FINGERPRINT_OK) return -1;

// found a match!

digitalWrite(13, LOW);

delay(10);

digitalWrite(13, HIGH);

delay(10);

lcd.clear();

lcd.setCursor(0, 0);

lcd.print("Found ID # ");

lcd.print(finger.fingerID);

lcd.setCursor(0, 1);

lcd.print("confidence ");

lcd.print(finger.confidence);

return finger.fingerID;

}

Comments

author
ibenkos made it!(author)2014-12-06

I realy want to build this!!! :) but do you have a picture of the schematics , I don't know how to build it

author
pelegren made it!(author)2014-12-06

this is the connection when enrolling the fingerprint. please follow the instructions given by adafruit.. https://learn.adafruit.com/adafruit-optical-finger...

enrolling FPS.jpg
author
snreddy715 made it!(author)2016-01-29

i am getting error while enrolling finger print..i am getting following error.

Arduino: 1.5.5 (Windows 7), Board: "Arduino Duemilanove or Diecimila, ATmega328"

enroll:26: error: 'Adafruit_Fingerprint' does not name a type
enroll.ino: In function 'void setup()':
enroll:34: error: 'finger' was not declared in this scope
enroll.ino: In function 'uint8_t getFingerprintEnroll(uint8_t)':
enroll:64: error: 'FINGERPRINT_OK' was not declared in this scope
enroll:65: error: 'finger' was not declared in this scope
enroll:67: error: 'FINGERPRINT_OK' cannot appear in a constant-expression
enroll:70: error: 'FINGERPRINT_NOFINGER' was not declared in this scope
enroll:73: error: 'FINGERPRINT_PACKETRECIEVEERR' was not declared in this scope
enroll:76: error: 'FINGERPRINT_IMAGEFAIL' was not declared in this scope
enroll:87: error: 'finger' was not declared in this scope
enroll:89: error: 'FINGERPRINT_OK' was not declared in this scope
enroll:92: error: 'FINGERPRINT_IMAGEMESS' was not declared in this scope
enroll:95: error: 'FINGERPRINT_PACKETRECIEVEERR' was not declared in this scope
enroll:98: error: 'FINGERPRINT_FEATUREFAIL' was not declared in this scope
enroll:101: error: 'FINGERPRINT_INVALIDIMAGE' was not declared in this scope
enroll:112: error: 'FINGERPRINT_NOFINGER' was not declared in this scope
enroll:118: error: 'FINGERPRINT_OK' was not declared in this scope
enroll:121: error: 'FINGERPRINT_OK' cannot appear in a constant-expression
enroll:124: error: 'FINGERPRINT_NOFINGER' was not declared in this scope
enroll:127: error: 'FINGERPRINT_PACKETRECIEVEERR' was not declared in this scope
enroll:130: error: 'FINGERPRINT_IMAGEFAIL' was not declared in this scope
enroll:143: error: 'FINGERPRINT_OK' was not declared in this scope
enroll:146: error: 'FINGERPRINT_IMAGEMESS' was not declared in this scope
enroll:149: error: 'FINGERPRINT_PACKETRECIEVEERR' was not declared in this scope
enroll:152: error: 'FINGERPRINT_FEATUREFAIL' was not declared in this scope
enroll:155: error: 'FINGERPRINT_INVALIDIMAGE' was not declared in this scope
enroll:166: error: 'FINGERPRINT_OK' was not declared in this scope
enroll:168: error: 'FINGERPRINT_PACKETRECIEVEERR' was not declared in this scope
enroll:171: error: 'FINGERPRINT_ENROLLMISMATCH' was not declared in this scope
enroll:180: error: 'FINGERPRINT_OK' was not declared in this scope
enroll:182: error: 'FINGERPRINT_PACKETRECIEVEERR' was not declared in this scope
enroll:185: error: 'FINGERPRINT_BADLOCATION' was not declared in this scope
enroll:188: error: 'FINGERPRINT_FLASHERR' was not declared in this scope

This report would have more information with
"Show verbose output during compilation"
enabled in File > Preferences.

how to rectify this error?

author
aidenv made it!(author)2017-01-01

Go to Sketch in the menu bar, Include Library, Library Manager, and search Adafruit Fingerprint

author
Jamie+Toeg made it!(author)2016-07-29

You should try downloading the fingerprint scanner library from git hub otherwise the arduino cant make sense of the code. Instructions can be found here https://www.arduino.cc/en/Guide/Libraries

Best regards, Jamie

author
pelegren made it!(author)2014-12-06

follow this diagram to connect LCD

LCD_bb.png
author
pelegren made it!(author)2014-12-06

follow this diagram to connect fingerprint sensor for loading of main program

using FPS.jpg
author
pelegren made it!(author)2014-12-06

i am happy you are inspired by this. i will add the schematics which i missed to do. thank you.

author
ibenkos made it!(author)2014-12-15

thank you :)

author
TheRealRocketBurns made it!(author)2014-12-06

This is really cool, but maybe you should upload the code in a file and give s little explanation of it in the actual instructable, so others can modify it.

author
pelegren made it!(author)2014-12-06

great. thanks for the suggestion. i will work on it and make sure it happens.

author
bulgaru777 made it!(author)2017-06-30

Arduino: 1.8.1 (Windows 10), Плата:"Arduino/Genuino Uno"

Недопустимое имя скетча. Имя может содержать

символы ASCII и цифры (и не должно начинаться с цифры).

Длина имени не должна превышать 64 символов.

C:\Users\Andrei\Desktop\_111\_111.ino: In function 'void setup()':

_111:35: error: a function-definition is not allowed here before '{' token

{

^

_111:47: error: a function-definition is not allowed here before '{' token

{ uint8_t p = finger.getImage();

^

_111:213: error: expected '}' at end of input

}

^

Несколько библиотек найдено для "Adafruit_Fingerprint.h"

Используется: C:\Users\Andrei\Documents\Arduino\libraries\Adafruit-Fingerprint-Sensor-Library-master

Не используется: C:\Program Files\Arduino\libraries\Adafruit-Fingerprint-Sensor-Library-master

Не используется: C:\Program Files\Arduino\libraries\Adafruit-Fingerprint-Sensor-Library-master

Не используется: C:\Program Files\Arduino\libraries\Adafruit-Fingerprint-Sensor-Library-master

Не используется: C:\Program Files\Arduino\libraries\Adafruit-Fingerprint-Sensor-Library-master

exit status 1

a function-definition is not allowed here before '{' token

Этот отчёт будет иметь больше информации с

включенной опцией Файл -> Настройки ->

"Показать подробный вывод во время компиляции"

author
bulgaru777 made it!(author)2017-06-29

all the compenents are identical like in your tutorial but i have some problmes with code can you help me

Arduino: 1.8.1 (Windows 10), Плата:"Arduino/Genuino Uno"

C:\Users\Andrei\Desktop\pro\pro.ino: In function 'void setup()':

pro:41: error: a function-definition is not allowed here before '{' token

{

^

pro:53: error: a function-definition is not allowed here before '{' token

{ uint8_t p = finger.getImage();

^

pro:219: error: expected '}' at end of input

}

^

Несколько библиотек найдено для "Adafruit_Fingerprint.h"

Используется: C:\Users\Andrei\Documents\Arduino\libraries\Adafruit-Fingerprint-Sensor-Library-master

Не используется: C:\Program Files\Arduino\libraries\Adafruit-Fingerprint-Sensor-Library-master

Не используется: C:\Program Files\Arduino\libraries\Adafruit-Fingerprint-Sensor-Library-master

Не используется: C:\Program Files\Arduino\libraries\Adafruit-Fingerprint-Sensor-Library-master

Не используется: C:\Program Files\Arduino\libraries\Adafruit-Fingerprint-Sensor-Library-master

exit status 1

a function-definition is not allowed here before '{' token

Этот отчёт будет иметь больше информации с

включенной опцией Файл -> Настройки ->

"Показать подробный вывод во время компиляции"

author
Samipendu made it!(author)2017-05-23

Sir, with due respect, I beg to state that I want to make a biometric system with database of students in my class. It should work like this-

1) First, I have to take the fingerprints of students( let the count be 20).

2)Then I will put the fingerprint sensor on the door

3) Everytime a student enters by pressing the fps on the door, his/her name with roll number will be displayed.

Sir, will you please tell me how to do this, step by step?

I know nothing about arduino programming. Please help me by providing the code. Please

author
RaphaelT2 made it!(author)2017-01-12

Hi Pelegren have you discovered how to turn off the LED while the sensor is not scanning any finger? I would like to disable the led and just blink on reading.

Thankyou =D

author
OndrejV2 made it!(author)2017-03-14

Please tell me tooo.

author
yash_Jiv made it!(author)2017-02-19

how to make the same thing in raspberry pi and load it in sqlite??

author
RobertT243 made it!(author)2016-11-17

is it possible to add a clock with alarm after the fingerprint scanner is completed scanning.

author
IvanL41 made it!(author)2016-10-03

i copied the codes but some error occurred ... help me please

Screenshot (151).png
author
MohammadH14 made it!(author)2016-09-08

hi

what is the finger print model?
i have a sm630
does it work on it ?

author
VisakhVasudevan made it!(author)2016-07-27

hi ,

Can i get the code to direct reading of the finger value, now the controller is converting the code , i need the real cod of the finger,like when we shows the rfid card , the reader will send the hex or ascii code,.

Please help

visakh

author
BijithT made it!(author)2016-05-19

Hi! I'm trying to build this using Arduino Mega. But when I use a hardware serial port for it doesn't receive any data. It only sends data. what change should be made in the code or the library file? If i use a software serial port, it works fine.

Please help!

author
kavish+laxkar made it!(author)2016-05-10

i have module SM630 will it work?

author
kavish+laxkar made it!(author)2016-05-10

i have module SM630 will it work?

author
JosaphatA made it!(author)2016-05-09

Hi,

what software do you used to draw the Fingerprint part? TQ.

author
AnkitB38 made it!(author)2016-04-24

Hi, i have a fingerprint sensor but it has 16pin output instead of 4 as shown by you.
http://m.alibaba.com/product/1653424648/KO-K420-16PIN-Biometric-Fingerprint-Sensor.html

Is there anyway i can use it with arduino uno board??

Kindly comment.

Thank you

author
JiteshL made it!(author)2016-04-12

Can I use these codes for another fingerprint sensor other than what you have uses...???

author
JiteshL made it!(author)2016-04-12

Can I use this codes for different fingerprint scanner other than what you have used...???

author
LordArduino made it!(author)2016-02-08

Is is possible to add a servo in with this to unlock a door?

author
flanker22 made it!(author)2016-02-02

where can i get the code

email me hrthflanker22@gmail.com

author
PJA7 made it!(author)2016-01-26

hello, the fingerprint module i bought has different specs than this, can you help with the program. this is the model (ADST11SD300&310)

author
NobleBrutus. made it!(author)2015-11-11

Hi Pelegren, your code above seems to have 4 blank '#include' s. Should there be libraries there? If so can you specify which ones? I assume there will be one for the LCD (I guess #include <LiquidCrystal.h>), the fingerprint scanner will use #include <Adafruit_Fingerprint.h> and #include <SoftwareSerial.h> but what about the 4th? Thanks, Noble.

author
sanathh made it!(author)2015-10-01

How much it cost
Cn u plzz send items for me i will pay fr the items my email sanathhm4@gmail.com

author
Shayan+Das made it!(author)2015-09-16

Dear friend,

Can you post a code for controlling a servo with the fingerprint lock so as to use it as a fingerprint door lock. If possible then please mail me at sanu.bullet@gmail.com
I am attaching a code for a keypad controlled servo. Could you combine this code with yours?

Thanking You,
Shayan Das

temp_-251373263.jpg
author
CharlaineP made it!(author)2015-09-03

Do you have codes for the LCD using matlab or NI labview?.. Pls response thankyou in advance

author
pelegren made it!(author)2015-09-03

no sorry.

author
CharlaineP made it!(author)2015-09-02

do you have NI labview codes or matlab codes for this project?

author
finalyearkhec made it!(author)2015-06-29

if possible mail me at amgain05@gmail.com or amgain04@gmail.com

author
finalyearkhec made it!(author)2015-06-29

this project is only about identification and detection of finger print but i need detail report about student attendance system (with use of data based) plez help me i am preparing my final year project so i am at trouble!!!!!!!!

author
ShubhamEric made it!(author)2015-06-09

I want to do this...but i need ckt diagram of project and all ..how to store data of ardino to pc after taking all firgerprint scan...plz e-mail ckt diagram...shubhamsuni@gmail.com

author
intany made it!(author)2015-05-11

can i get the full coding of the lcd display? Thank you.

author
Umberto+De+Bortoli made it!(author)2015-04-27

Hi, Please can you help me ?
I bought the same sensor !
I should set a pin high if i put a finger known and the pin must remain high until only when I remove the finger!
How can i do this ?

Thank you very much !!!!

author
vivek.venkatram made it!(author)2015-04-20

How did you get the fingerprint scanner on Fritzing? Help!

author
faysalsunny made it!(author)2015-04-13

i have faced fingerprint sensor problems.It takes the fingerprints correctly with arduino mega2560 but during verifying, it always returns id#0 with only last fingerprint that i entered.Rest of fingerprints are not counted.i did it in serial monitor according to the tutorial given byAdafruit.Can u plz help me how to fix the problems.

author
nidhip made it!(author)2015-01-30

How can I load the program and create the hex file....there is many of arduino environment software are available , among them which is more suitable????And for finger print I did not get where to write coding???please replay as fast as possible....

author
pelegren made it!(author)2015-03-03

get the latest arduino ide but any version should work fine for this fingerprint.

author
pelegren made it!(author)2015-03-03

get the latest arduino ide but any version should work fine for this fingerprint.

author
pelegren made it!(author)2015-01-30

http://arduino.cc/en/Main/Software here's the link of the software for you to download and install. let me know if you need more help. thanks.

author
amnamrza901 made it!(author)2015-02-21

can u plz help me as if the library of the fingerprint sensor can work on pcb not arduino i mean i want to use it separatly and i did it i used the adafruit library but sensor is not detecting can u plz help me as is it because of newsoftserial library or something else

author
pelegren made it!(author)2015-03-03

this is hardware problem. if the error is no sensor found.

About This Instructable

91,930views

99favorites

License:

Bio: Cars. Electronics. Mechatronics. I'm a thinker and maker by blood....
More by pelegren:Arduino ClonesWiring Hack: Female Terminal as Splice Point JoinerVehicle Anti-Get-Away Device
Add instructable to: