Objective: To install the Fingerprint Door lock system -for ladies hostel

I have completed same project as my Fab academy project but for different application .

PROBLEM STATEMENT-To secure the ladies hostel entrance gate with entry of authorized user.

The main part of project includes

Laser cutted box + Automation(i.e. Electronic boards)

Electronic Components required are:

  • Fingerprint Sensor:Sparkfun Fingerprint scanner-TTL(GT-511C3) is used in this project which can take up to 200 valid fingerprint images. Uses Simple UART protocol.
  • Door lock solenoid :It is a electromechanical device can be controlled by Arduino signals.
  • I2c(Inter integrated circuit):For serial communication
  • 16×2 LCD display  :LCD is an electronic display module. It can display 16 characters per line and there are 2 such lines.
  • Push Button: for enrollment of new user

Block diagram

Circuit Diagram:

The program uploaded is,

include “FPS_GT511C3.h”

include “SoftwareSerial.h”

FPS_GT511C3 fps(4, 5); // (Arduino SS_RX = pin 2, Arduino SS_TX = pin 3)

const int pushButton = 2;
int doorlock = 8; //solenoid valve as a door lock
const int gndPin = 12; // ground pin
//LCD

include

include “LiquidCrystal_I2C.h”

byte x = 1;
LiquidCrystal_I2C lcd(0x27, 16, 2); // set the LCD address to 0x27 for a 16 chars and 2 line display

// these constants won’t change. But you can change the size of
// your LCD using them:

const int numRows = 2;
const int numCols = 16;

void setup() {

lcd.init();
//lcd.begin(numCols, numRows);
lcd.backlight();

Serial.begin(9600); //set up Arduino’s hardware serial UART
pinMode(pushButton, INPUT_PULLUP); // make the pushbutton’s pin an input:
// attachInterrupt(digitalPinToInterrupt(pushButton),setup,FALLING);
pinMode(doorlock, OUTPUT);
pinMode(gndPin, OUTPUT);
digitalWrite(gndPin, LOW);

lcd.print(“HOLDKEY2ENROLL”);
delay(2000);
int buttonState = digitalRead(pushButton);
if(buttonState == 0)
{
Enroll();
}

fps.Open(); //send serial command to initialize fps
fps.SetLED(true);//turn on LED so fps can see fingerprint

}

void Enroll()
{
lcd.print(“Enroll start”);//begin enrolling fingerprint
//
delay(1000);
// Enroll test
//###########################################################################################
// find open enroll id
int enrollid = 0;
bool usedid = true;
while (usedid == true)
{
usedid = fps.CheckEnrolled(enrollid);
if (usedid == true) enrollid++;
}
fps.EnrollStart(enrollid);
//###########################################################################################

// enroll
lcd.clear();
lcd.setCursor(0, 0); //cursur position
lcd.print(“Enroll New”);// Print a message to the LCD.

lcd.setCursor(0, 1); //cursur position
lcd.print(“Finger:”);// Print a message to the LCD.

lcd.setCursor(8, 1); //cursur position
lcd.print(enrollid);// Print a message to the LCD.

//############################################################################################

while (fps.IsPressFinger() == false); //delay(100);

bool bret = fps.CaptureFinger(true);
int iret = 0;
if (bret != false)
{
lcd.clear();
lcd.setCursor(0, 0); //cursur position
lcd.print(“Remove finger”);// Print a message to the LCD.
fps.Enroll1();
while (fps.IsPressFinger() == true); //delay(100);

lcd.clear();
lcd.setCursor(0, 0); //cursur position
lcd.print("Press finger");// Print a message to the LCD.
lcd.setCursor(0, 1); //cursur position
lcd.print("Again");// Print a message to the LCD.

while (fps.IsPressFinger() == false); //delay(100);
bret = fps.CaptureFinger(true);
if (bret != false)
{
  lcd.clear();
  lcd.setCursor(0, 0); //cursur position
  lcd.print("Remove finger");// Print a message to the LCD.

  fps.Enroll2();
  while (fps.IsPressFinger() == true); //delay(100);

  lcd.clear();
  lcd.setCursor(0, 0); //cursur position
  lcd.print("Press finger");// Print a message to the LCD.
  lcd.setCursor(0, 1); //cursur position
  lcd.print("Again");// Print a message to the LCD.

  while (fps.IsPressFinger() == false); //delay(100);
  bret = fps.CaptureFinger(true);
  if (bret != false)
  {
    lcd.clear();
    lcd.setCursor(0, 0); //cursur position
    lcd.print("Remove finger");// Print a message to the LCD.
    iret = fps.Enroll3();
    if (iret == 0)
    {
      lcd.clear();
      lcd.setCursor(0, 0); //cursur position
      lcd.print("Enrolling Done");// Print a message to the LCD.
     // delay(1000);
    }
    else
    {
      lcd.clear();
      lcd.setCursor(0, 0); //cursur position
      lcd.print("Enrolling Failed");// Print a message to the LCD.

      lcd.setCursor(0, 1); //cursur position
      lcd.print(iret);// Print a message to the LCD.
    }
  }
  else
    lcd.clear();
  lcd.setCursor(0, 0); //cursur position
  lcd.print("Failed 3rd Time");// Print a message to the LCD
}

else
  lcd.clear();
lcd.setCursor(0, 0); //cursur position
lcd.print("Failed 2nd Time");// Print a message to the LCD.

}
else
lcd.clear();
lcd.setCursor(0, 0); //cursur position
lcd.print(“Failed 1st Time”);// Print a message to the LCD.

//#############################################################################################
//delay(1000);
}

void loop()
{
// Identify fingerprint test
if (fps.IsPressFinger())
{
fps.CaptureFinger(false);
int id = fps.Identify1_N();

/*Note:  GT-521F52 can hold 3000 fingerprint templates
         GT-521F32 can hold 200 fingerprint templates
          GT-511C3 can hold 200 fingerprint templates.
         GT-511C1R can hold 20 fingerprint templates.
  Make sure to change the id depending on what
  model you are using */

if (id < 200) //<- change id value depending model you are using
{ //if the fingerprint matches, provide the matching template ID

  lcd.clear();
  lcd.setCursor(0, 0); //cursur position
  lcd.print("Verified ID:");// Print a message to the LCD.

  lcd.setCursor(0, 1); //cursur position
  lcd.print(id);// Print a message to the LCD.
  Wire.begin();
  Wire.beginTransmission(9);
  Wire.write(x);
  Wire.endTransmission();
  digitalWrite(doorlock, HIGH);
  delay(2000);
  digitalWrite(doorlock, LOW);

}
else
{ //if unable to recognize
  lcd.clear();
  lcd.setCursor(0, 0); //cursur position
  lcd.print("Finger not found");// Print a message to the LCD.
}

}
else
{
lcd.clear();
lcd.setCursor(0, 0); //cursur position
lcd.print(“Press finger”);// Print a message to the LCD.
}
delay(1000);
digitalWrite(doorlock, LOW);
}

Same project deatails I have uploaded on instructable link- https://www.instructables.com/id/DIY-Fingerprint-Key-Security-System