Biometric Door Lock Security System Using Arduino & Fingerprint Sensor
by Technoesolution2020 in Circuits > Arduino
10337 Views, 8 Favorites, 0 Comments
Biometric Door Lock Security System Using Arduino & Fingerprint Sensor
Hey Friends welcome to “Techno-E-solution” In this tutorial, I’ll show you how to make “Biometric Door Lock Security System Using Arduino Uno & Fingerprint Sensor R307.” The Biometric security system is designed using Arduino uno & fingerprint sensor R307 where once the correct finger ID is placed, the door will get open and concerned person is allow access to enter.
Biometric security system use Arduino Uno as a microcontroller where a finger ID will act as a door unlocking system or a key. we made a Biometric locks system using Arduino Uno, which provides control to the door locking system which is servomotor. It is a simple system with take input from finger print sensor and the output give command to servo motor to lock/unlock. The system provides you to delete the finger id using setting buttons. There are 4 setting buttons which gives you full control to customize the system.
1. Enroll & Back
2. Delete & Ok
3. Up & Match
4. Down & Match
Add following libraries in your Arduino IDE :-
2. Servo.h
3. SoftwareSerial.h
Follow Me On :-
| YOUTUBE | INSTAGRAM | FACEBOOK | INSTRUCTABLES | DAILYMOTION | HACKSTER |
If you like this project subscribe us on Youtube, So without wasting time Let's get started..............
MATERIAL REQUIRED
To make this project we need Following components :-
- Arduino Uno x 1
- Fingerprint Sensor x 1
- Servomotor sg-90 x 1
- LCD Display (16×2) x 1
- Green led x 1
- Red led x 2
- Resistor (1K) x 3
- Potentiometer (10K) x 1
- Male-Female berge strips x 1nos
- Capacitor (220uf) x 1
- 12V DC jack socket x 1
- 1-Sides PCB Board x 1
- Push Buttons x 4
- PCB etching kit x 1
- Soldering kit x 1
- Adapter x 1
CIRCUIT DIAGRAM
Follow the circuit diagram for making connection. I make this circuit in Easy EDA software.
Next PCB
NextPCB is a high-quality PCB Manufacturer. With professional PCB manufacturing capabilities, our PCB engineers with more than 10 years of experience will double-check your engineering files.
NextPCB is certified by IATF16949, ISO9001, ISO14001, UL, CQC, RoHS and REACH; more importantly, we handle the whole process including the PCB prototype, PCB manufacturing, PCB assembly, testing, and final shipment. We are capable of assembling BGA, Micro-BGA, QFN, and other leadless package parts. We also have an online parts shop, you can choose any parts you need.
If you want a Printed circuit board go through the NEXT PCB
ARDUINO CODE
Simply Copy the following code & upload in your Arduino IDE software.
/*
* Hello Friends Welcome To Techno-E-Solution
* Here Is Code For Bio-Metric Security System
*/#includeLiquidCrystal lcd(13,12,11,10,9,8);
#include
SoftwareSerial fingerPrint(2, 3);
#include
Servo myServo;
#include
uint8_t id;
Adafruit_Fingerprint finger = Adafruit_Fingerprint(&fingerPrint);
#define enroll 14
#define del 15
#define up 16
#define down 17
#define openLight 6
#define closeLight 7
#define servoPin 5
void setup()
{
delay(1000);
myServo.attach(servoPin);
myServo.write(180);
pinMode(enroll, INPUT_PULLUP);
pinMode(up, INPUT_PULLUP);
pinMode(down, INPUT_PULLUP);
pinMode(del, INPUT_PULLUP);
pinMode(openLight, OUTPUT);
pinMode(closeLight, OUTPUT);
lcd.begin(16,2);
lcd.print(” BIOMETRIC “);
lcd.setCursor(0,1);
lcd.print(“SECURITY SYSTEM”);
delay(2000);
lcd.clear();
lcd.print(“TechnoEsolution”);
delay(2000);
finger.begin(57600);
Serial.begin(9600);
lcd.clear();
lcd.print(“Finding Module”);
lcd.setCursor(0,1);
delay(1000);
if (finger.verifyPassword())
{
Serial.println(“Found fingerprint sensor!”);
lcd.clear();
lcd.print(“Found Module “);
delay(1000);
}
else
{
Serial.println(“Did not find fingerprint sensor :(“);
lcd.clear();
lcd.print(“Module not Found”);
lcd.setCursor(0,1);
lcd.print(“Check Connections”);
while (1);
}
}
void loop()
{
lcd.setCursor(0,0);
lcd.print(“Press UP/Down “);
lcd.setCursor(0,1);
lcd.print(“to start System”);
digitalWrite(closeLight, HIGH);
if(digitalRead(up)==0 || digitalRead(down)==0)
{
for(int i=0;i<5;i++)
{
lcd.clear();
lcd.print(“Place Finger”);
delay(2000);
int result=getFingerprintIDez();
if(result>=0)
{
digitalWrite(openLight, HIGH);
digitalWrite(closeLight, LOW);
lcd.clear();
lcd.print(“Allowed”);
lcd.setCursor(0,1);
lcd.print(“Gete Opened “);
myServo.write(0);
delay(5000);
myServo.write(180);
digitalWrite(closeLight, HIGH);
digitalWrite(openLight, LOW);
lcd.setCursor(0,1);
lcd.print(“Gate Closed “);
return;
}
}
}
checkKeys();
delay(1000);
}
void checkKeys()
{
if(digitalRead(enroll) == 0)
{
lcd.clear();
lcd.print(“Please Wait”);
delay(1000);
while(digitalRead(enroll) == 0);
Enroll();
}
else if(digitalRead(del) == 0)
{
lcd.clear();
lcd.print(“Please Wait”);
delay(1000);
delet();
}
}
void Enroll()
{
int count=0;
lcd.clear();
lcd.print(“Enroll Finger “);
lcd.setCursor(0,1);
lcd.print(“Location:”);
while(1)
{
lcd.setCursor(9,1);
lcd.print(count);
if(digitalRead(up) == 0)
{
count++;
if(count>25)
count=0;
delay(500);
}
else if(digitalRead(down) == 0)
{
count–;
if(count<0)
count=25;
delay(500);
}
else if(digitalRead(del) == 0)
{
id=count;
getFingerprintEnroll();
return;
}
else if(digitalRead(enroll) == 0)
{
return;
}
}
}
void delet()
{
int count=0;
lcd.clear();
lcd.print(“Delete Finger “);
lcd.setCursor(0,1);
lcd.print(“Location:”);
while(1)
{
lcd.setCursor(9,1);
lcd.print(count);
if(digitalRead(up) == 0)
{
count++;
if(count>25)
count=0;
delay(500);
}
else if(digitalRead(down) == 0)
{
count–;
if(count<0)
count=25;
delay(500);
}
else if(digitalRead(del) == 0)
{
id=count;
deleteFingerprint(id);
return;
}
else if(digitalRead(enroll) == 0)
{
return;
}
}
}
uint8_t getFingerprintEnroll()
{
int p = -1;
lcd.clear();
lcd.print(“finger ID:”);
lcd.print(id);
lcd.setCursor(0,1);
lcd.print(“Place Finger”);
delay(2000);
while (p != FINGERPRINT_OK)
{
p = finger.getImage();
switch (p)
{
case FINGERPRINT_OK:
Serial.println(“Image taken”);
lcd.clear();
lcd.print(“Image taken”);
break;
case FINGERPRINT_NOFINGER:
Serial.println(“No Finger”);
lcd.clear();
lcd.print(“No Finger”);
break;
case FINGERPRINT_PACKETRECIEVEERR:
Serial.println(“Communication error”);
lcd.clear();
lcd.print(“Comm Error”);
break;
case FINGERPRINT_IMAGEFAIL:
Serial.println(“Imaging error”);
lcd.clear();
lcd.print(“Imaging Error”);
break;
default:
Serial.println(“Unknown error”);
lcd.clear();
lcd.print(“Unknown Error”);
break;
}
}
// OK success!
p = finger.image2Tz(1);
switch (p) {
case FINGERPRINT_OK:
Serial.println(“Image converted”);
lcd.clear();
lcd.print(“Image converted”);
break;
case FINGERPRINT_IMAGEMESS:
Serial.println(“Image too messy”);
lcd.clear();
lcd.print(“Image too messy”);
return p;
case FINGERPRINT_PACKETRECIEVEERR:
Serial.println(“Communication error”);
lcd.clear();
lcd.print(“Comm Error”);
return p;
case FINGERPRINT_FEATUREFAIL:
Serial.println(“Could not find fingerprint features”);
lcd.clear();
lcd.print(“Feature Not Found”);
return p;
case FINGERPRINT_INVALIDIMAGE:
Serial.println(“Could not find fingerprint features”);
lcd.clear();
lcd.print(“Feature Not Found”);
return p;
default:
Serial.println(“Unknown error”);
lcd.clear();
lcd.print(“Unknown Error”);
return p;
}
Downloads
SETTINGS
Enroll New Finger ID :-
1.Press Enroll button.
2.Use Up Button To Change Location from 1 to 127 to store finger ID.
3.Place Finger on sensor.
4.Again place same finger on sensor. (We need to place finger twice because R307 sensor works on 1:1 ratio) 5.LCD Shows Finger ID Stored !
Delete Finger ID :-
1.Press Delete Button. 2.Use Up or Down button to locate finger ID Location. 3.Then press OK Button. 4.LCD print Finger ID delete successfully.
Open Door Lock :- 1.Press Match button. 2.Place Finger On Sensor. 3.Servomotor rotate & wait for 3-4 seconds & it’ll get automatically lock.
DEMONSTRATION
If you Like this project do subscribe for latest projects :-
NextDFM Software From NextPCB
A PCB Design Problems Detector, An Engineering Solution Provider Import the Gerber file with one click. No need for complicated file reading steps to review easily and improve efficiency.
Download Software Help you quickly familiarize DFM design specifications and production needs to determine whether there are any manufacturing constraints
Features
Make PCB design more standard Prevent the quality flaw Impedance calculation function and lamination automation Automatically generate the best puzzle CAM350 free alternative version Check Gerber files anytime, anywhere and parse it with one click Instate Quote and evaluate delivery time Reduce cost and improve benefit these are advantage comparing to Eagle and Altium