🔒 Fingerprint Door Lock
Secure your room with biometrics. Actuate a servo mechanism with an optical scanner.
Overview
The AS608 fingerprint scanner handles the complex image processing and template matching on-board. It simply tells the Arduino if a match was found and what ID it corresponds to.
What you'll learn: SoftwareSerial communication, biometric module interfacing, and securing physical mechanisms.
Estimated time: 2-3 hours. Difficulty: ⭐⭐⭐ Intermediate.
Components Needed
| Component | Specification | Qty | Notes |
|---|---|---|---|
| Arduino Uno R3 | 5V | 1 | |
| AS608 Fingerprint Sensor | Optical | 1 | |
| Servo Motor | MG996R | 1 | Heavy duty for lock |
| Relay/External Power | 5V 2A | 1 | Servos draw heavy current |
Step-by-Step Tutorial
1
Enroll Fingerprints
First, run the "Enroll" example sketch from the Adafruit Fingerprint library to save your fingerprints to the sensors memory.
2
Wiring Scanner
Sensor VCC to 5V (or 3.3V depending on module), TX to Pin 2, RX to Pin 3.
3
Wiring Servo
Connect the servo signal to Pin 9. Power it externally if using a heavy-duty servo.
4
Upload the Lock Code
The lock sketch checks for matches and sweeps the servo if ID is validated.
Optical fingerprint scanners are sensitive to dirt and moisture. Keep the glass clean for reliable matches.
Code / Configuration
fingerprint_lock.ino
INO
// Fingerprint Lock
#include <Adafruit_Fingerprint.h>
#include <Servo.h>
#include <SoftwareSerial.h>
SoftwareSerial mySerial(2, 3);
Adafruit_Fingerprint finger = Adafruit_Fingerprint(&mySerial);
Servo lockServo;
void setup() {
Serial.begin(9600);
finger.begin(57600);
lockServo.attach(9);
lockServo.write(0); // Locked position
}
void loop() {
int p = finger.getImage();
if (p != FINGERPRINT_OK) return;
p = finger.image2Tz();
if (p != FINGERPRINT_OK) return;
p = finger.fingerFastSearch();
if (p == FINGERPRINT_OK) {Reviews & Ratings
—0 reviews
Sign in to leave a review
Loading reviews...