Fingerprint door lock

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


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

Arduino Uno

 Buying Link - 

https://amzn.to/3xFpaNW

Fingerprint Sensor

 Buying Link - 

https://amzn.to/3W2Satk

Solenoid 

 Buying Link - 

https://amzn.to/4cXIQgd

Relay 

Buying Link - 

https://amzn.to/4cWTgg3

Jumper Wires 

 Buying Link - 

https://amzn.to/3xCXjOl

LCD Display with I2C