Cirkit Designer Logo
Cirkit Designer
Your all-in-one circuit design IDE
Home / 
Project Documentation

Arduino 101 Fingerprint Authentication System

Image of Arduino 101 Fingerprint Authentication System

Circuit Documentation

Summary

This circuit integrates an Arduino 101 microcontroller with an R307 Fingerprint Sensor, powered by a 5V DC source. The Arduino 101 communicates with the fingerprint sensor via serial communication to enroll and verify fingerprints. The DC source provides power to both the Arduino and the sensor. The circuit is designed for applications requiring biometric authentication.

Component List

Arduino 101

  • Description: A microcontroller board based on the Intel Curie module, featuring Bluetooth Low Energy (BLE) and built-in sensors.
  • Pins: A5/SCL, A4/SDA, AREF, GND, D13/SCK, D12/MISO, D11 PWM/MOSI, D10 PWM/SS, D9 PWM, D8, D7, D6 PWM, D5 PWM, D4, D3 PWM, D2, D1/TX, D0/RX, AIN, ioref, RESET, 3V3, 5V, VIN, A0, A1, A2, A3, ICSP MISO, ICSP SCK, ICSP MOSI.

DC Source 5V

  • Description: A power supply module that provides a regulated 5V output.
  • Pins: VCC, GND.

R307 Fingerprint Sensor

  • Description: A fingerprint sensor module capable of fingerprint detection, enrollment, and verification.
  • Pins: VCC, GND, TX, RX, Touch, 3.3V.

Wiring Details

Arduino 101

  • D1/TX connected to R307 Fingerprint Sensor RX
  • D0/RX connected to R307 Fingerprint Sensor TX
  • 5V connected to DC Source 5V VCC
  • GND connected to DC Source 5V GND and R307 Fingerprint Sensor GND

DC Source 5V

  • VCC connected to Arduino 101 5V and R307 Fingerprint Sensor VCC
  • GND connected to Arduino 101 GND

R307 Fingerprint Sensor

  • VCC connected to DC Source 5V VCC
  • GND connected to Arduino 101 GND
  • TX connected to Arduino 101 D0/RX
  • RX connected to Arduino 101 D1/TX

Documented Code

/*
 * Arduino Sketch for interfacing with an R307 Fingerprint Sensor
 * using an Arduino 101. The Arduino will communicate with the
 * fingerprint sensor to enroll and verify fingerprints.
 */

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

// Define the pins for the fingerprint sensor
#define rxPin 0
#define txPin 1

// Create a software serial port
SoftwareSerial mySerial(rxPin, txPin);

// Create a fingerprint sensor object
Adafruit_Fingerprint finger = Adafruit_Fingerprint(&mySerial);

void setup() {
  // Initialize serial communication
  Serial.begin(9600);
  while (!Serial);
  Serial.println("Adafruit Fingerprint sensor enrollment");

  // Initialize the fingerprint sensor
  finger.begin(57600);
  if (finger.verifyPassword()) {
    Serial.println("Found fingerprint sensor!");
  } else {
    Serial.println("Did not find fingerprint sensor :(");
    while (1) { delay(1); }
  }
}

void loop() {
  // Check if a finger is placed on the sensor
  if (finger.getImage() == FINGERPRINT_OK) {
    Serial.println("Image taken");
    // Convert the image to a template
    if (finger.image2Tz() == FINGERPRINT_OK) {
      Serial.println("Image converted");
      // Search for a match
      if (finger.fingerFastSearch() == FINGERPRINT_OK) {
        Serial.print("Found ID #");
        Serial.print(finger.fingerID);
        Serial.print(" with confidence ");
        Serial.println(finger.confidence);
      } else {
        Serial.println("Did not find a match");
      }
    } else {
      Serial.println("Image conversion failed");
    }
  } else {
    Serial.println("No finger detected");
  }
  delay(1000); // Wait for a second before next check
}

This code is designed to run on the Arduino 101 and interfaces with the R307 Fingerprint Sensor. It initializes the sensor and continuously checks for a finger placement. When a finger is detected, it attempts to convert the image to a template and search for a match in the enrolled fingerprints. The results, along with any relevant messages, are output to the serial monitor.