Would you like to add finger print to your project? Here is a simple tutorial to help you achieve that!
Things used in this project
Hardware components
Hand tools and fabrication machines
Soldering iron (generic)
Solder Wire, Lead Free
Story
Hello guys, welcome back to another Arduino tutorial. In today’s tutorial, we will learn to use a fingerprint sensor with any Arduino board, and we will possibly make a simple practical example of this sensor, so let’s learn together!
Supplies
Components:
2. Arduino UNO
3. Male header
4. LED
Tools:
( Optional )
Step 1: Watch the Video!
Step 2: Understanding the Working Principle
the fingerprint sensor we are using is an Optical Type, there exists two more types of sensor like capacitive which can be found in smart phones and ultrasonic ones, which are yet in testing phase, and both these options are expensive, so we will focus on this optical type for this hobby electronics and similar projects.
The way this optical fingerprint sensor works is that it captures a photo of our finger ridges, and then it uses certain algorithm to match it with stored data and displays result of the same.
few features of this sensor are as following:
-Power supply: DC 3.8V-7.0V
-Operating current: 65mA (Typical)
-Interface: UART (TTL logical level)
-Average searching time: <1s (1:500, average)
-Security level: 5(1, 2, 3, 4, 5(highest))
-Working environment:Temp: -20°C to +60°
-Touch area dimension: 14.5*19.4 mm
-Outline dimension: 54*20*20.5 mm
Step 3: Solder Male Headers to Sensor
Since the wires that come along with sensor are flexible and the ends of this wire are quite wiggly so we would add male headers ( or female headers in case if you use arduino nano) to connect those wires to female headers on arduino board.
You can use a helping hand or something to make your soldering task a lot easier since our header pins are small and we really don't want to risk burning our hands with solder iron.
Step 4: Connect the Sensor With Arduino
The connections part is very very simple, this fingerprint sensor has 6 wires, out of which we only 4 wires are useful, for arduino interfacing, out of which 2 wires will be used for power and 2 for data.
Connections:
-Red to 5v,
-Black to GND,
-Green to pin D2
-White to pin D3
(You can also refer to connection diagram above)
Step 5: Include the Adafruits Finerprint Library
To complete this project or tutorial, we will need "Adafruit's Fingerprint" library, which you can find attached in this step or Google it.
To install that library, follow these steps:
Add the library by selecting Add ZIP under SKETCH menu, INCLUDE Library options.
Open arduino IDE
Now, select the .zip file from the location where we downloaded the file!
Step 6: Enroll the Finger Prints
first we need to enroll the fingers into the EPROM of our Sensor module, so we will follow these steps to enroll our fingerprints.
select the enroll example.
-Open Arduino IDE
-Under the FILE menu, and Examples, find the Adafruit's fingerprint library.
-Upload the enroll example.
-Open the Serial Monitor.
-Select the baud rate to be 9600.
-Enter the Finger Print ID number when the serial monitor prompts to enter the fingerprint id number.
-Place the finger you need to enroll on the sensor.
-Place the finger again on the sensor once prompted by serial monitor.
Step 7: Upload the Main Code
Since we enrolled the fingerprints in the last step, now we can test if this sensor works or may be check for match using this following code and steps.
-Open arduino IDE
-Under the FILE menu, and Examples, find the adafruits finger print library.
-Select the fingerprint example.
-Upload the fingerprint example.
-Open the Serial Monitor.
-Select the baud rate to be 9600.
-Place the finger you need to test on the sensor.
-Check for fingerprint id number for OUTPUT.
Step 8: Modify the Main Code to Interface LED ( or Solenoid)
Now let’s add a led to indicate our Fingerprint match, to do so follow these steps:
use "digitalWrite(13, HIGH); delay(1000); digitalWrite(13, LOW); "on line 144 to turn on and off the LED
-Define the LED on pin 13 as output in void setup part
-Find then on line 135 we see a fingerprint id match loop, where in we use if statements along with library definitions to find our fingerprint id.
-We will give a high pulse for 1 second and turn the LED off.
-After this line and our code will turn on the LED every time sensor finds a match.
You can add a solenoid instead of this LED, and make a fingerprint door lock, which could be a brief tutorial for future, but for this tutorial, LED indication is our Eureka!
Step 9: Conclusion
In this tutorial post, we learnt how to set up a fingerprint sensor and how to use it with our Arduino, you can use this knowledge to control a door lock, and LED or any apparatus that you want to control.
So if you made similar project, do let us know by posting your work under "i made it" section!
Step 10: Support Us!
We spend a lot of time making videos and tutorials for you guys! and you guys seem to like it, we really would appreciate your support by following us on social media or by supporting us via Patreon!
Patreon - https://www.patreon.com/missioncritical
Twitter @ akshaymomaya1
Instagram @officialmissioncritical
Schematics
Adafruits Fingerprint Library
The article was first published in hackster, September 15, 2019
cr: https://www.hackster.io/MissionCritical/how-to-set-up-fingerprint-sensor-with-arduino-ebd543
author: Mission Critical