Security Box or trimmed with Arduino-based fingerprint security system. Brangkas can be opened only with the fingerprint of the person listed on the fingerprint sensor.
Hardware Requirement
- Arduino Uno Board
- Fingerprint Sensor (Unknown Type)
- Buzzer
- Relay Module
- Power supply +5 Volt
- Jumper
Fingerprint Sensor | Source
Schematic
Arduino - Fingerprint Sensor Wiring
Arduino - Relay Wiring
Arduino - Buzzer Wiring
Source Code/Sketch
#include <Adafruit_Fingerprint.h>
#include <SoftwareSerial.h>
int getFingerprintIDez();
boolean sidik_benar=false;
// pin #2 is IN from sensor (GREEN wire)
// pin #3 is OUT from arduino (WHITE wire)
SoftwareSerial mySerial(2, 3);
Adafruit_Fingerprint finger = Adafruit_Fingerprint(&mySerial);
char kode,i;
void setup()
{
pinMode(8,OUTPUT);
pinMode(9,OUTPUT);
digitalWrite(8,LOW);
digitalWrite(9,LOW);
kode=10; //kode sidik jari (ID sidik jari)
finger.begin(57600);
//-----------------BUZZER BUNYI TIT 2X
digitalWrite(9, HIGH);
delay(100);
digitalWrite(9, LOW);
delay(100);
digitalWrite(9, HIGH);
delay(100);
digitalWrite(9, LOW);
delay(100);
}
//=======================prog utama
void loop(){
i=1;
while(i){
getFingerprintID();
delay(50);
}
}
//===================================
// returns p if failed, otherwise returns ID #
uint8_t getFingerprintID() {
uint8_t p = finger.getImage();
if (p != FINGERPRINT_OK) return p;
p = finger.image2Tz();
if (p != FINGERPRINT_OK) return p;
p = finger.fingerFastSearch();
//jika sidik jari salah kembali baca sensor
if (p == FINGERPRINT_NOTFOUND && sidik_benar==false){
for(char i; i<50; i++){
digitalWrite(9, HIGH);
delay(100);
digitalWrite(9, LOW);
delay(100);
}
return p;
}
//jika sidik jari benar kerjakan kontrol relay
if (p != FINGERPRINT_OK ) return p;
kontrol_relay();
return finger.fingerID;
}
void kontrol_relay(){
if(finger.fingerID==kode){
//============pembacaan sidik jari pertama saat buka box
if(sidik_benar==false){
// RELAY ON
digitalWrite(8, HIGH);
digitalWrite(9, HIGH);
delay(300);
digitalWrite(9, LOW);
sidik_benar=true;
}
//==========pembacaan sidik jari ke dua saat tutup box
else{
digitalWrite(8, LOW);
digitalWrite(9, HIGH);
delay(300);
digitalWrite(9, LOW);
i=0;
sidik_benar=false;
}
}
}
#include <SoftwareSerial.h>
int getFingerprintIDez();
boolean sidik_benar=false;
// pin #2 is IN from sensor (GREEN wire)
// pin #3 is OUT from arduino (WHITE wire)
SoftwareSerial mySerial(2, 3);
Adafruit_Fingerprint finger = Adafruit_Fingerprint(&mySerial);
char kode,i;
void setup()
{
pinMode(8,OUTPUT);
pinMode(9,OUTPUT);
digitalWrite(8,LOW);
digitalWrite(9,LOW);
kode=10; //kode sidik jari (ID sidik jari)
finger.begin(57600);
//-----------------BUZZER BUNYI TIT 2X
digitalWrite(9, HIGH);
delay(100);
digitalWrite(9, LOW);
delay(100);
digitalWrite(9, HIGH);
delay(100);
digitalWrite(9, LOW);
delay(100);
}
//=======================prog utama
void loop(){
i=1;
while(i){
getFingerprintID();
delay(50);
}
}
//===================================
// returns p if failed, otherwise returns ID #
uint8_t getFingerprintID() {
uint8_t p = finger.getImage();
if (p != FINGERPRINT_OK) return p;
p = finger.image2Tz();
if (p != FINGERPRINT_OK) return p;
p = finger.fingerFastSearch();
//jika sidik jari salah kembali baca sensor
if (p == FINGERPRINT_NOTFOUND && sidik_benar==false){
for(char i; i<50; i++){
digitalWrite(9, HIGH);
delay(100);
digitalWrite(9, LOW);
delay(100);
}
return p;
}
//jika sidik jari benar kerjakan kontrol relay
if (p != FINGERPRINT_OK ) return p;
kontrol_relay();
return finger.fingerID;
}
void kontrol_relay(){
if(finger.fingerID==kode){
//============pembacaan sidik jari pertama saat buka box
if(sidik_benar==false){
// RELAY ON
digitalWrite(8, HIGH);
digitalWrite(9, HIGH);
delay(300);
digitalWrite(9, LOW);
sidik_benar=true;
}
//==========pembacaan sidik jari ke dua saat tutup box
else{
digitalWrite(8, LOW);
digitalWrite(9, HIGH);
delay(300);
digitalWrite(9, LOW);
i=0;
sidik_benar=false;
}
}
}
How it Works
1. Connect the Arduino with Peripherals needed
2. Plug in the Power Source on the device
3. Compile and upload the script program above to your arduino
1. Connect the Arduino with Peripherals needed
2. Plug in the Power Source on the device
3. Compile and upload the script program above to your arduino
4. Before you use it, you must register your fingerprint on the fingerprint sensor using enroll
program
5. Put the finger on the fingerprint key sensor will open automatically so that the opening can be
opened. As for locking back place finger on fingerprint.
Video for Project V - 35. Security Box with Fingerprint Sensor (Arduino Based)
Required File
No comments:
Post a Comment