Creating a fingerprint door lock with Arduino and a solenoid involves merging biometric technology with a physical locking mechanism. It utilizes a fingerprint sensor module to scan and store fingerprints, while an Arduino board processes this data and commands a solenoid to control the lock mechanism. When a recognized fingerprint is detected, the Arduino triggers the solenoid to unlock the door. Wiring the components as per a schematic and programming the Arduino to manage fingerprint authentication and solenoid control are essential steps in this project. By integrating hardware, biometrics, and programming, this project provides a practical example of using Arduino for security applications, offering a customizable and efficient solution for door access control.
Circuit Diagram :-
![](/web/image/555-40c7265d/Finger%20circuit.webp?access_token=eb74a30f-f3a6-4494-95e5-f25e5a833d84)
Code :-
// By Arduino Techy
//
#include <Adafruit_Fingerprint.h>
SoftwareSerial mySerial(2, 3);
Adafruit_Fingerprint finger = Adafruit_Fingerprint(&mySerial);
#define RELAY_PIN 4
#define ACCESS_DELAY 3000 // Keep lock unlocked for 3 seconds
void setup()
{
// set the data rate for the sensor serial port
finger.begin(57600);
delay(5);
if (finger.verifyPassword())
{
}
else
{
while (1) { delay(1); }
}
pinMode(RELAY_PIN, OUTPUT);
digitalWrite(RELAY_PIN, HIGH);
}
void loop()
{
if ( getFingerPrint() != -1)
{
digitalWrite(RELAY_PIN, LOW);
delay(ACCESS_DELAY);
digitalWrite(RELAY_PIN, HIGH);
}
delay(50); //Add some delay before next scan.
}
// returns -1 if failed, otherwise returns ID #
int getFingerPrint()
{
int 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!
return finger.fingerID;
}
Components :-
![blue and black circuit board](/unsplash/hz7EFrw06Qk/560/Arduino.jpg?unique=5dbbe613?access_token=af082543-d80a-472c-9ecd-78742c1356f4)
![](/web/image/556-f7bf67c4/r307.webp?access_token=adf2474a-e695-4048-b892-14cec2025705)
![](/web/image/557-2b320f32/Solenoid.webp?access_token=766d0370-9eb1-42c5-b695-d890acf1e713)
![](/web/image/558-389c1404/Relay.webp?access_token=2873b87d-6241-4024-b552-343819bd16a3)
![](/web/image/559-05e0132d/Jumper%20Wires.webp)