Pro Maker_101
Published

Fingerprint Bike Starter

This project we have made a fingerprint Scanner for Bike Ignition. We can start our bike with a fingerprint or a key

AdvancedFull instructions provided3,175
Fingerprint Bike Starter

Things used in this project

Hardware components

R307 Fingerprint Sensor Module
×1
Arduino Nano
×1
12-24v To 5v converter (You can use the car charger)
×1
5v Relay module
×1
LED
×1
DP-DT Switch
×1

Software apps and online services

Arduino IDE
Arduino IDE

Hand tools and fabrication machines

Soldering iron (generic)
Soldering iron (generic)

Story

Read more

Schematics

Schematic Diagram

Therefore, case you want your own PCB, you can obtain through this link on PCBWay.com. You can also order good quality PCBS from PCBWay.com at low cost. In addition to the standard pcbs, we could also support advanced pcbs, FPC/rigid -flex pcbs, rapid-rpototyping and other related services that could meet your needs to the most extent.

PCB order steps on PCBWay:

1)Visit the website: www.pcbway.com
2)Click PCB Instant Quote
3)Click quick-order PCB Upload the gerber file by clicking "+Add Gerber 4)File" and wait until the gerber file is finished
5)uploading Set the PCB specifications as you wish, starting from the number of PCBs, the number of layers, thickness, color and others. After that, look at the left, it will display the estimated cost,
6)processing time and delivery service selected.
7)Click Save to cart

Circuit Diagram

Code

Code For Fingerprint Bike Starter

C/C++
First you need to install Adafruit Fingerprint library on Arduino Software. Once installed go to ( File > Examples > Adafruit Fingerprint Librery > enroll ) Then you can add your fingerprint...

Then upload this code
#define RELAY1 9
#define RELAY_OFF LOW
#define RELAY_ON HIGH

#include <Adafruit_Fingerprint.h>
#include <SoftwareSerial.h>

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);

// On Leonardo/Micro or others with hardware serial, use those! #0 is green wire, #1 is white
//Adafruit_Fingerprint finger = Adafruit_Fingerprint(&Serial1);
boolean lastButton = LOW;
boolean relayOn = false;
void setup()
{
  pinMode(RELAY1, OUTPUT);
  digitalWrite(RELAY1, RELAY_ON);
  pinMode(5, OUTPUT);
  digitalWrite(5, LOW);

  while (!Serial);  // For Yun/Leo/Micro/Zero/...

  Serial.begin(9600);
  Serial.println("Adafruit finger detect test");

  // 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();
  delay(50);            //don't ned to run this at full speed.
}

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!
  Serial.print("Found ID #"); Serial.print(finger.fingerID);
  Serial.print(" with confidence of "); Serial.println(finger.confidence);
  if (finger.confidence > 70) {

    digitalWrite(RELAY1, RELAY_OFF);
    

    Serial.println("Opening door for 4 seconds");
    digitalWrite(5, HIGH);
    Serial.println("Stop that door, mate");
  }
return finger.fingerID;
}

Credits

Pro Maker_101

Pro Maker_101

11 projects • 10 followers
Electrical,Electronics,DIY

Comments