Introduction: DIY Arduino-Fingerprint Garage Door Opener

Picture of DIY Arduino-Fingerprint Garage Door Opener

comment or message if you have questions, this is my first instructable and im not done with the project yet, but yes it does work. more pics soon

Step 1: How It Works

so how the entire project works.
1. The wires from the garage button mounted on the wall should be 15V, if not message me and ill help you(may need to change wiring and the program a bit). these wires should remain in the terminals of the garage door.
2. The diodes keep the high voltage from damaging the arduino board
3. When the fingerprint scanner detects a match it turns the red LED green and the applies 5V to the left prong of the transistor which switches and applies 0v to the positive terminal on the garage door(bridges the connections) for one second and then transistor "turns back off"

WIRES FROM GARAGE DOOR BUTTON ARE NOT REMOVED, THEY SHOULD EITHER BE SPLICED OR YOU CAN PUT THE REQUIRED CONNECTIONS IN THE TEMINALS WITH THE OPENER WIRES

WARNING!!!!

DONT FORGET THE DIODES!! THEY WILL PREVENT THE 15V-22V FROM BEING FED INTO THE TRANSISTOR AND THE BOARD!!

Step 2: What You Need

TIP120 transistor(might want to get 2 incase you blow one)

http://www.radioshack.com/tip120-npn-d-transistor/...

1N914/4148-Type Diode

http://www.radioshack.com/1n914-4148-type-diode/2761122.html

1K Ohm 1/4-Watt Carbon Film Resistor

http://www.radioshack.com/1k-ohm-1-4-watt-carbon-f...

perfboard or other type of circuit board

Arduino Uno SMD Edition(without ATmega Chip) is used

Fingerprint sensor

http://www.adafruit.com/products/751?gclid=CjwKEAj...

RGB LED

Step 3: Fingerprint Sensor

Picture of Fingerprint Sensor

before using sensor(assuming you just bought it) you may have to "bypass" the atmega chip(blank sketch). heres a link on how, also you will need software.(SFG)

software

http://www.adafruit.com/datasheets/SFGDemoV2.0.rar

Bypass

https://learn.adafruit.com/adafruit-optical-finger...

I forgot to add the sensor in the diagram but..

Black wire - Ground

Red Wire - 3.2V or 5V( I am using 3.2V to keep the sensor from burning up, use resistor if you use 5V)

White or Yellow Wire - Pin3

Green Wire - Pin2

ENROLLING WITH SGF

White or Yellow Wire - Pin0

Green Wire - Pin1

Step 4: Code

/***************************************************
Designed specifically to work with the Adafruit BMP085 Breakout
----> http://www.adafruit.com/products/751
These displays use TTL Serial to communicate, 2 pins are required to
interface
Adafruit invests time and resources providing this open source code,
please support Adafruit and open-source hardware by purchasing
products from Adafruit!
Written by Limor Fried/Ladyada for Adafruit Industries.
BSD license, all text above must be included in any redistribution
Code modified and Project Built By Carrigan Luneke
****************************************************/

#include
#include
int getFingerprintIDez();
// 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);
void setup()
{
Serial.begin(9600);
Serial.println("fingertest");
pinMode(11, OUTPUT); //Red LED
pinMode(12, OUTPUT); //Green LED
pinMode(9, OUTPUT); //Garage Bridge
// set the data rate for the sensor serial port
finger.begin(57600);

if (finger.verifyPassword()) {
Serial.println("Found fingerprint sensor!");
} else {
Serial.println("Did not find fingerprint sensor :(");
while (1);
}
Serial.println("Waiting for valid finger...");
}
void loop() // run over and over again
{
getFingerprintIDez();
digitalWrite(11, HIGH); // Red LED ON
digitalWrite(12, LOW); // Green LED OFF
digitalWrite(9, LOW); //Garage opener not Active
}
uint8_t getFingerprintID() {
uint8_t p = finger.getImage();
switch (p) {
case FINGERPRINT_OK:
Serial.println("Image taken");
break;
case FINGERPRINT_NOFINGER:
Serial.println("No finger detected");
return p;
case FINGERPRINT_PACKETRECIEVEERR:
Serial.println("Communication error");
return p;
case FINGERPRINT_IMAGEFAIL:
Serial.println("Imaging error");
return p;
default:
Serial.println("Unknown error");
return p;
}
// OK success!
p = finger.image2Tz();
switch (p) {
case FINGERPRINT_OK:
Serial.println("Image converted");
break;
case FINGERPRINT_IMAGEMESS:
Serial.println("Image too messy");
return p;
case FINGERPRINT_PACKETRECIEVEERR:
Serial.println("Communication error");
return p;
case FINGERPRINT_FEATUREFAIL:
Serial.println("Could not find fingerprint features");
return p;
case FINGERPRINT_INVALIDIMAGE:
Serial.println("Could not find fingerprint features");
return p;
default:
Serial.println("Unknown error");
return p;
}

// OK converted!
p = finger.fingerFastSearch();
if (p == FINGERPRINT_OK) {
Serial.println("Found a print match!");
} else if (p == FINGERPRINT_PACKETRECIEVEERR) {
Serial.println("Communication error");
return p;
} else if (p == FINGERPRINT_NOTFOUND) {
Serial.println("Did not find a match");
return p;
} else {
Serial.println("Unknown error");
return p;
}

// found a match!
Serial.print("Found ID #"); Serial.print(finger.fingerID);
Serial.print(" with confidence of "); Serial.println(finger.confidence);
}
// returns -1 if failed, otherwise returns ID #
int getFingerprintIDez() {
uint8_t 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!
digitalWrite(11, LOW); //Red LED OFF
digitalWrite(12, HIGH); //Green LED ON
digitalWrite(9, HIGH); //Garage Opener Active
delay(1000); //Applyes 15v for one second, may be different for each opener
Serial.print("Found ID #"); Serial.print(finger.fingerID);
Serial.print(" with confidence of "); Serial.println(finger.confidence);
return finger.fingerID;
}

Step 5: In the Works.... Future Easy Program Feature and Onboard Power(no Usb)

What you need for this...

switch(3) I went with weatherproof push button

I think you can also find them at RadioShack

http://www.adafruit.com/products/915?gclid=CjwKEAjw3_ypBRCwoKqKw5P9wgsSJAAbi2K9F3Q0izRLNp3n54gI55FGFesM2pN55amyGFZyTv3dmxoCkq_w_wcB

12V fixed Voltage Regulator

http://www.radioshack.com/radioshack-12v-fixed-vol...

Step 6: Future Features

Picture of Future Features

I remembered to add in the fingerprint sensor this time!!

so how the entire project works.

1. The wires from the garage button mounted on the wall should be 15V, if not message me and ill help you(may need to change wiring and the program a bit). these wires should remain in the terminals of the garage door.

2. The diodes keep the high voltage from damaging the arduino board

3. When the fingerprint scanner detects a match it turns the red LED green and the applies 5V to the middle prong of the transistor which switches and applies 15v to the positive terminal on the garage door(bridges the connections) for one second and then transistor "turns back off"

EXTRA

POWER:

instead of using the usb or the external jack lets just use what we already have.

1. The positive and Negative leads for the garage door opener are spliced and connected to a 12V Voltage regulator.(negative also goes to GND on arduino board....i think, check voltage of 15V GND from garage door opener and 12V + from Regulator and make sure its 12V not 15V)

2. The Regulator applies 12V to the Vin port of the arduino to power the board

SWITCHES

the switches are used to switch between usb and onboard power for programing

and since you need to use pins 0 and 1 to enroll new fingerprints I added two mores switches to switch from pin 2 to pin 1 and switch from pin 3 to pin 0.

WARNING!!!!!

TURN OFF THE "ONBOARD POWER" BEFORE CONNECTING THE USB

SECURITY ALARM

for someone renting a house like me you might not be able to hide the wires going from the arduino to the garage door, meaning that anyone can cut those wires and touch them together to open and close your garage.

in this case an alarm would be needed.

my idea is to hookup a 90db piezo pulsing buzzer to arduino with a 5v voltage regulator in series with the transistor outputs.

the arduino would be measuring the 5v from the regulator and whenever that goes below 5v(someone cut the wires to the garage door) it will sound the alarm.

Step 7: Problems and Possible Solutions

1. ORIGINAL GARAGE OPENER( ON WALL ) DOES NOT WORK

CAUSES:

1. DIODE IS BACKWARDS

2. TRANSISTOR IS WIRED INCORRECTLY(SEE UPDATED PICTURE SCHEMATIC)

3. POSITIVE AND NEGATIVE WIRES ARE SWITCHED

2. FINGERPRINT SENSOR DOES NOT ACTIVATE OPENER

CAUSES:

1. DIODE IS BACKWARDS

2. CHECK TRANSISTOR WIRING

HOW TO TEST TRANSISTOR WIRING

1. USE ANY DC POWER SOURCE( PREFERABLY 12V )

2. USE A VOLTAGE METER TO CHECK VOLTAGE( SHOULD BE THE SAME AS POWER SOURCE V )

3. CONTINUE USING VOLTMETER....PUT YOUR FINGER ON THE SCANNER AND WAIT FOR THE LED( IF YOU INSTALLED ONE) TO CHANGE TO GREEN.

4. WHEN THE LED CHANGES COLOR(FINGERPRINT IS FOUND) THE VOLTAGE METER SHOULD DROP TO 0V FOR ONE SECOND AND THEN GO BACK TO 12V.

Step 8:

after your done put it inside a weatherproof box, you can find them on adafruit.com

comment or message if you have any questions, I will add more pics of my actual project and what it looks like when im done with it soon

Step 9: My Project

Picture of My Project

Step 10: The Current Board Im Using

Picture of The Current Board Im Using

this is a working board that I made. this board is currently being used in my project.

TRANSISTOR

1. left leg = to 1k ohm resistor + resistor to pwm pin

2. middle leg = to diode(black bar facing transistor) + diode to positive garage terminal

3. right leg = to negative pin and negative garage teminal

Step 11: ALARM(NOT YET TESTED)

whenever the voltage drops below 4v or "618"(if someone cuts the wires going to garage opener) it will sound the piezo buzzer

PARTS

5v piezo buzzer

http://www.radioshack.com/90db-piezo-pulse/2730066.html#.VUJq3MvwuP8

5v fixed voltage regulator

http://www.radioshack.com/-5v-fixed-voltage-regulator-7805/2761770.html#.VUJrGcvwuP8

CODE

/***************************************************
This is an example sketch for our optical Fingerprint sensor
Designed specifically to work with the Adafruit BMP085 Breakout
----> http://www.adafruit.com/products/751
These displays use TTL Serial to communicate, 2 pins are required to
interface
Adafruit invests time and resources providing this open source code,
please support Adafruit and open-source hardware by purchasing
products from Adafruit!
Written by Limor Fried/Ladyada for Adafruit Industries.
BSD license, all text above must be included in any redistribution
Code modified and Project Built By Carrigan Luneke
****************************************************/

#include
#include
int getFingerprintIDez();
// These constants won't change:
const int analogPin = A0; // pin that the sensor is attached to
const int piezoPin = 8; // pin that the piezo is attached to
const int threshold = 618; // input voltage of 5v regulator threshold
// 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);
void setup()
{
Serial.begin(9600);
Serial.println("fingertest");
pinMode(11, OUTPUT); //Red LED
pinMode(12, OUTPUT); //Green LED
pinMode(10, OUTPUT); //Garage Bridge
pinMode(piezoPin, OUTPUT);
// set the data rate for the sensor serial port
finger.begin(57600);

if (finger.verifyPassword()) {
Serial.println("Found fingerprint sensor!");
} else {
Serial.println("Did not find fingerprint sensor :(");
while (1);
}
Serial.println("Waiting for valid finger...");
}
void loop() // run over and over again
{
getFingerprintIDez();
digitalWrite(11, HIGH); // Red LED ON
digitalWrite(12, LOW); // Green LED OFF
digitalWrite(10, LOW); //Garage opener not Active
// read the value of the 5v regulator:
int analogValue = analogRead(analogPin);
// if the analog value is high enough, turn on the piezo:
if (analogValue < threshold) {
digitalWrite(piezoPin, HIGH);
}
else {
digitalWrite(piezoPin,LOW);
}
// print the analog value:
Serial.println(analogValue);
delay(1); // delay in between reads for stability
}
uint8_t getFingerprintID() {
uint8_t p = finger.getImage();
switch (p) {
case FINGERPRINT_OK:
Serial.println("Image taken");
break;
case FINGERPRINT_NOFINGER:
Serial.println("No finger detected");
return p;
case FINGERPRINT_PACKETRECIEVEERR:
Serial.println("Communication error");
return p;
case FINGERPRINT_IMAGEFAIL:
Serial.println("Imaging error");
return p;
default:
Serial.println("Unknown error");
return p;
}
// OK success!
p = finger.image2Tz();
switch (p) {
case FINGERPRINT_OK:
Serial.println("Image converted");
break;
case FINGERPRINT_IMAGEMESS:
Serial.println("Image too messy");
return p;
case FINGERPRINT_PACKETRECIEVEERR:
Serial.println("Communication error");
return p;
case FINGERPRINT_FEATUREFAIL:
Serial.println("Could not find fingerprint features");
return p;
case FINGERPRINT_INVALIDIMAGE:
Serial.println("Could not find fingerprint features");
return p;
default:
Serial.println("Unknown error");
return p;
}

// OK converted!
p = finger.fingerFastSearch();
if (p == FINGERPRINT_OK) {
Serial.println("Found a print match!");
} else if (p == FINGERPRINT_PACKETRECIEVEERR) {
Serial.println("Communication error");
return p;
} else if (p == FINGERPRINT_NOTFOUND) {
Serial.println("Did not find a match");
return p;
} else {
Serial.println("Unknown error");
return p;
}

// found a match!
Serial.print("Found ID #"); Serial.print(finger.fingerID);
Serial.print(" with confidence of "); Serial.println(finger.confidence);
}
// returns -1 if failed, otherwise returns ID #
int getFingerprintIDez() {
uint8_t 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!
digitalWrite(11, LOW); //Red LED OFF
digitalWrite(12, HIGH); //Green LED ON
digitalWrite(10, HIGH); //Garage Opener Active
delay(1000); //Applies 0v for one second, may be different for each opener
Serial.print("Found ID #"); Serial.print(finger.fingerID);
Serial.print(" with confidence of "); Serial.println(finger.confidence);
return finger.fingerID;
}

Comments

Cluneke (author)2015-06-21

Finger print car starter coming soon!

tomatoskins (author)2015-04-28

Such a cool idea! Have you had any issues with it not accepting your fingerprint?

Cluneke (author)tomatoskins2015-04-28

and it doesn't cost too much either

Cluneke (author)tomatoskins2015-04-28

no I have not had any problems with it, for some reason I cant enroll fingerprints using the arduino program so I use the SFG software to enroll, delete, search, and view fingerprints. I haven't used it much yet, im still working on mounting it on the outside of my garage

About This Instructable

2,091views

39favorites

License:

More by Cluneke:Keurig water under pressure fixDIY Arduino-Fingerprint Garage Door Opener
Add instructable to: