Intro
Walk into any school, office or hostel in Pakistan and you will see the same scene: someone presses a finger on a small black window, a screen lights up with a message, and the door opens. Behind that screen is a simple idea — every fingertip carries a pattern nobody else has, and a sensor that can read the pattern can decide who gets in.
In this tutorial you will build exactly that box: an R307 fingerprint sensor, an Arduino Uno and a 16×2 LCD display. The LCD asks you to place your finger, then shows a clear ACCESS GRANTED message with your finger’s ID number — or NOT REGISTERED for a finger it has never seen — with no computer attached once it is running. A green LED and a short beep back up a registered finger, and a red LED with two beeps answers an unknown one. You will learn how an optical fingerprint sensor works, why it needs 5 V and not 3.3 V, how UART wiring differs from the SPI wiring of a card reader, how the Adafruit Fingerprint library enrols and searches, and how to write access code that never blocks with delay().
A ready-made version of this project is also available on order, and all the components below are available in our store.
What You Need
| Part | Quantity | Purpose | Price |
|---|---|---|---|
| R307 Fingerprint Sensor Module (optical, UART) | 1 | Scans fingerprints and stores templates | Rs 3,430 |
| Arduino UNO R3 DIP ATmega328P with USB Cable | 1 | Runs the Adafruit Fingerprint library, drives the LCD and the access code | Rs 1,176 |
| LCD1602 16×2 Display with I2C Module | 1 | Shows “Place your finger”, the verdict and the finger ID | Rs 646 |
| MB102 Breadboard 830 Points | 1 | Holds the LEDs, resistors and buzzer without soldering | Rs 245 |
| Active Piezo Buzzer 3V–12V for Arduino | 1 | Beeps for access granted and denied | Rs 34 |
| 5mm Diffused LED (green) | 1 | Lights up when a registered finger is scanned | Rs 5 |
| 5mm Diffused LED (red) | 1 | Lights up when an unknown finger is scanned | Rs 5 |
| 220 Ω resistor | 2 | Protect the two LEDs from too much current | Available on order — WhatsApp |
| 40-Pin Dupont Jumper Wires 30cm (M-M, F-F, M-F) | 10 | Connects the sensor, LCD, LEDs and buzzer to the Uno | Rs 180 |
The parts come to about Rs 5,721, including the R307 module at Rs 3,430. The 220 Ω resistors are available on order — message us on WhatsApp for the current price. The sensor’s six-wire cable is usually included in the box.
How the Sensor Reads a Fingerprint
An optical fingerprint sensor is a tiny camera system. Under the glass window sits a light and an image sensor. When you press your finger on the window, the light shines on your skin and the image sensor photographs the pattern of ridges and valleys on your fingertip. The module’s own processor then studies that picture and picks out the distinctive features — ridge endings and splits, called minutiae — and turns them into a compact digital description.
That description is called a character file, and it is 256 bytes. It is not a photograph: you cannot rebuild a fingerprint image from it, and the Arduino never sees the picture at all. When you enrol a finger, the module scans it twice and combines the two character files into one template of 512 bytes, which it stores in its own flash memory under an ID number you choose. The templates survive unplugging the Arduino and even uploading new code, because they live inside the sensor, not in the Arduino.
Matching works in two ways. In 1:1 mode (verify), the module compares a fresh scan with one stored template you name. In 1:N mode (search), it compares the fresh scan with every template in its library and reports the best match — this is what an access system uses, because the box does not know in advance whose finger is on the window. The search takes under a second even with 1,000 templates stored.
The 5 V rule: the one thing you must not get wrong
The R307 runs on 4.2 V to 6 V, so it takes its power from the Arduino Uno’s 5V pin — and only from that pin. The Uno’s 3.3V pin is below the module’s minimum voltage: the sensor may light up, but it will fail to answer commands. The LCD, on the other hand, runs on 5 V as well, so both parts share the Uno’s 5V pin in this build — the sensor on its own wire, the LCD through the power rail. Power is the part where a mistake is expensive: sensor on 5 V, never 3.3 V, always.
Key specifications of the R307 module (GROW R307 User Manual, Ver. 1.20):
| Specification | Value |
|---|---|
| Sensor type | Optical |
| Supply voltage | DC 4.2 V to 6 V (5 V typical) |
| Working current | About 50 mA typical, 80 mA peak |
| Interface | UART (TTL), 9,600 to 115,200 baud, 57,600 default |
| Image size | 256 × 288 pixels |
| Sensing window | 19 × 21 mm |
| Image acquiring time | Under 0.5 seconds |
| Character file | 256 bytes |
| Template file | 512 bytes |
| Storage capacity | 1,000 templates |
| Security levels | 1 to 5 (level 3 is the default) |
| False acceptance rate (FAR) | Under 0.001% |
| False rejection rate (FRR) | Under 0.1% |
| Search time | Under 1 second (1:1,000) |
| Matching modes | 1:1 verify and 1:N search |
| Module size | About 44.1 × 20 × 23.5 mm |
The closely related AS608 module speaks the same protocol and works with the same library and the same code in this tutorial. Its differences are a 3.3 V to 5 V supply, about 120 mA current, and 162 stored templates instead of 1,000. If your module says AS608 on it, follow this tutorial exactly — only the capacity number changes.
R307 and LCD Wiring with Arduino Uno
The module has six pins on its cable. Wire colours can vary by seller, so always go by the pin name printed on the module or its cable, not by colour alone. The two pins you will not use in this build are Touch, a finger-detection output, and 3.3V, which powers that detection circuit — the module works without them, and this tutorial leaves them unconnected. The LCD1602 with I2C module has four pins and needs only two data wires, because the small I2C backpack on its back handles the rest. Connect everything while the Uno is unplugged from USB.
| R307 sensor pin | Meaning | Arduino Uno pin |
|---|---|---|
| 5V | Power — 4.2 V to 6 V, NEVER 3.3V | 5V |
| GND | Ground | GND |
| TXD | Sensor transmits — Arduino receives | D2 |
| RXD | Sensor receives — Arduino transmits | D3 |
| Touch | Finger-detection output — not used here | — (leave unconnected) |
| 3.3V | Finger-detection power — not used here | — (leave unconnected) |
The TX and RX wires cross over: the sensor’s TX goes to the Arduino’s D2, and the sensor’s RX goes to the Arduino’s D3. That is not a mistake — a transmitter must talk to a receiver, so TX always meets RX on the other side. If you wire TX to TX, the sensor never answers and the code reports “Sensor not found”. This crossover is the most common wiring error with UART modules, so check it first whenever the sensor does not respond.
The sensor talks over a second serial port made in software. The Uno’s hardware serial port on D0 and D1 is busy talking to your computer through the USB cable — that is how the Serial Monitor works — so the sensor cannot use those pins. The code below creates a SoftwareSerial port on D2 and D3 instead, at the sensor’s default speed of 57,600 baud. The Serial Monitor itself runs at 9,600 baud; the two speeds are different and that is normal.
| LCD1602 I2C pin | Arduino Uno pin |
|---|---|
| VCC | 5V |
| GND | GND |
| SDA | A4 |
| SCL | A5 |
On the Uno, pins A4 and A5 are the I2C bus — that is why the LCD connects there and nowhere else. The backpack lets several I2C devices share those two wires, each with its own address.
| Lock part | Connection |
|---|---|
| Green LED anode (+) | D7, through a 220 Ω resistor |
| Green LED cathode (−) | GND |
| Red LED anode (+) | D8, through a 220 Ω resistor |
| Red LED cathode (−) | GND |
| Active buzzer + | D6 |
| Active buzzer − | GND |
Each resistor goes between its Arduino pin and its LED anode. The buzzer here is the active type, which sounds when its pin is HIGH — a passive buzzer looks the same but needs a tone() signal, so check which type you have first.
Two things to check before powering on. First, the LCD’s contrast screw on the I2C backpack: if the display lights up but shows only solid blocks or nothing at all, turn it slowly until the text appears. Second, double-check that the sensor’s VCC pin is on the Uno’s 5V pin and not on 3.3V before you plug the USB in.

Library Installation
- In the Arduino IDE, open Sketch > Include Library > Manage Libraries.
- Search for “Adafruit Fingerprint Sensor Library” and install the one by Adafruit (version 2.1.4 was used for this tutorial).
- Search for “LiquidCrystal I2C” and install the one by Frank de Brabander.
- Restart the IDE if the examples do not appear.
Wire.h is built into the Arduino IDE, so you do not need to install anything for the I2C bus itself.
Complete Arduino Code
/*
Fingerprint Access System with LCD Display - Arduino Uno
Place a registered finger on the R307 / AS608 sensor and the
16x2 LCD answers without any computer attached:
- Registered finger: "ACCESS GRANTED" with the finger's ID
number, green LED, one short beep.
- Unknown finger: "NOT REGISTERED", red LED, two short beeps.
The LCD also guides enrolment step by step, and the Serial
Monitor prints the same story with the confidence score.
HOW TO ENROL A FINGER:
1. Upload this sketch and open the Serial Monitor at 9600 baud.
2. Type a number from 1 to 127 and press Enter. That number is
the ID this finger will be stored under.
3. Follow the LCD prompts: place the finger, lift it, place the
same finger again. Two scans are needed to build one template.
4. Repeat for every finger you want the system to know.
Enrolled templates live inside the sensor's own flash memory,
so they survive unplugging the Arduino.
The access check itself never blocks: the LED and buzzer timing
all runs on millis(). Enrolment is the only part that waits for
you, because you are standing at the Serial Monitor giving it
instructions.
Needs two libraries: "Adafruit Fingerprint Sensor Library" by
Adafruit and "LiquidCrystal I2C" by Frank de Brabander. Install
both from Sketch > Include Library > Manage Libraries. Wire and
SoftwareSerial are built into the Arduino IDE.
Most I2C LCD backpacks use address 0x27; some use 0x3F.
Wiring:
Sensor TX (green wire) -> D2 (SoftwareSerial RX)
Sensor RX (white wire) -> D3 (SoftwareSerial TX)
Sensor VCC (red wire) -> 5V (R307 needs 4.2-6 V - NEVER 3.3V)
Sensor GND (black wire)-> GND
Sensor Touch + 3.3V pins: leave unconnected in this build
LCD VCC -> 5V (red)
LCD GND -> GND (black)
LCD SDA -> A4 (green)
LCD SCL -> A5 (blue)
Green LED anode (+) -> D7 through a 220 ohm resistor
Red LED anode (+) -> D8 through a 220 ohm resistor
LED cathodes (-) -> GND
Active buzzer + -> D6, buzzer - -> GND
*/
#include <SoftwareSerial.h>
#include <Wire.h>
#include <LiquidCrystal_I2C.h>
#include <Adafruit_Fingerprint.h>
// D2 receives from the sensor, D3 transmits to it.
SoftwareSerial mySerial(2, 3);
Adafruit_Fingerprint finger = Adafruit_Fingerprint(&mySerial);
// Most I2C LCD backpacks use address 0x27, 16 columns, 2 rows.
LiquidCrystal_I2C lcd(0x27, 16, 2);
#define GREEN_LED_PIN 7 // Green LED anode through a 220 ohm resistor
#define RED_LED_PIN 8 // Red LED anode through a 220 ohm resistor
#define BUZZER_PIN 6 // Active buzzer + (sounds on HIGH)
const unsigned long SIGNAL_MS = 2000; // LEDs and verdict stay on for 2 seconds
const unsigned long BEEP_MS = 150; // Length of one beep
unsigned long signalEnd = 0;
unsigned long lastBeepToggle = 0;
bool buzzerOn = false;
int beepsLeft = 0;
bool waitingForRemoval = false;
// Print two lines on the LCD, padded to 16 characters so no
// stale letters from a longer line are left behind.
void lcdShow(const char *line0, const char *line1) {
lcd.setCursor(0, 0);
lcd.print(line0);
for (int i = strlen(line0); i < 16; i++) {
lcd.print(' ');
}
lcd.setCursor(0, 1);
lcd.print(line1);
for (int i = strlen(line1); i < 16; i++) {
lcd.print(' ');
}
}
void setup() {
Serial.begin(9600);
while (!Serial) {
; // Wait for the Serial Monitor on boards that need it.
}
pinMode(GREEN_LED_PIN, OUTPUT);
pinMode(RED_LED_PIN, OUTPUT);
pinMode(BUZZER_PIN, OUTPUT);
digitalWrite(GREEN_LED_PIN, LOW);
digitalWrite(RED_LED_PIN, LOW);
digitalWrite(BUZZER_PIN, LOW);
lcd.init();
lcd.backlight();
lcdShow("Fingerprint Lock", "Place your finger");
finger.begin(57600);
if (finger.verifyPassword()) {
Serial.println("Fingerprint sensor found");
} else {
Serial.println("Sensor not found - check wiring and power");
Serial.println("Sensor TX -> D2, sensor RX -> D3, VCC -> 5V, GND -> GND");
lcdShow("Sensor not found", "Check the wiring");
while (1) {
delay(1); // Nothing else can work without the sensor.
}
}
if (finger.getParameters() == FINGERPRINT_OK) {
Serial.print("Sensor capacity: ");
Serial.print(finger.capacity);
Serial.println(" fingerprints");
}
if (finger.getTemplateCount() == FINGERPRINT_OK) {
Serial.print("Fingerprints stored: ");
Serial.println(finger.templateCount);
}
Serial.println("Fingerprint Access ready");
Serial.println("Type a number 1-127 and press Enter to enrol a finger");
Serial.println("Or place a registered finger on the sensor");
}
// Returns 0 = no finger, 1 = granted, 2 = denied, 3 = scan error.
uint8_t checkFinger() {
uint8_t p = finger.getImage();
if (p == FINGERPRINT_NOFINGER) {
return 0;
}
if (p != FINGERPRINT_OK) {
Serial.println("Imaging error");
return 3;
}
p = finger.image2Tz();
if (p != FINGERPRINT_OK) {
Serial.println("Messy image - lift and place the finger again");
return 3;
}
p = finger.fingerFastSearch();
if (p == FINGERPRINT_OK) {
Serial.print("Found ID #");
Serial.print(finger.fingerID);
Serial.print(" with confidence ");
Serial.println(finger.confidence);
return 1;
}
if (p == FINGERPRINT_NOTFOUND) {
Serial.println("Finger not registered");
return 2;
}
Serial.println("Search error");
return 3;
}
void loop() {
unsigned long now = millis();
// After 2 seconds, switch the signal LEDs off and put the
// welcome message back on the LCD.
if (signalEnd != 0 && now >= signalEnd) {
digitalWrite(GREEN_LED_PIN, LOW);
digitalWrite(RED_LED_PIN, LOW);
lcdShow("Fingerprint Lock", "Place your finger");
signalEnd = 0;
}
// Beep pattern, also non-blocking: while beeps remain, the
// buzzer toggles every 150 ms. One beep for granted, two for denied.
if (beepsLeft > 0) {
if (now - lastBeepToggle >= BEEP_MS) {
lastBeepToggle = now;
if (buzzerOn) {
digitalWrite(BUZZER_PIN, LOW);
buzzerOn = false;
beepsLeft--;
} else {
digitalWrite(BUZZER_PIN, HIGH);
buzzerOn = true;
}
}
} else if (buzzerOn) {
digitalWrite(BUZZER_PIN, LOW);
buzzerOn = false;
}
// After a verdict, wait until the finger is lifted before
// scanning again, so one touch is never read twice.
if (waitingForRemoval) {
if (finger.getImage() == FINGERPRINT_NOFINGER) {
waitingForRemoval = false;
}
return;
}
// Enrolment: type an ID number 1-127 in the Serial Monitor.
if (Serial.available() > 0) {
String line = Serial.readStringUntil('\n');
line.trim();
int id = line.toInt();
if (id >= 1 && id <= 127) {
enrollFingerprint((uint8_t)id);
} else {
Serial.println("Type a number from 1 to 127 to enrol a finger");
}
return;
}
uint8_t result = checkFinger();
if (result == 1) {
Serial.println("ACCESS GRANTED");
char line0[17];
char line1[17];
snprintf(line0, sizeof(line0), "ACCESS GRANTED");
snprintf(line1, sizeof(line1), "ID #%u", finger.fingerID);
lcdShow(line0, line1);
digitalWrite(GREEN_LED_PIN, HIGH);
digitalWrite(RED_LED_PIN, LOW);
beepsLeft = 1;
signalEnd = now + SIGNAL_MS;
lastBeepToggle = now;
waitingForRemoval = true;
} else if (result == 2) {
Serial.println("ACCESS DENIED");
lcdShow("NOT REGISTERED", "Access denied");
digitalWrite(RED_LED_PIN, HIGH);
digitalWrite(GREEN_LED_PIN, LOW);
beepsLeft = 2;
signalEnd = now + SIGNAL_MS;
lastBeepToggle = now;
waitingForRemoval = true;
}
// result 0 (no finger) and 3 (scan error): keep waiting.
}
// Enrol one finger under the given ID. Two scans of the same
// finger are combined into one template and stored in the
// sensor's flash memory. The LCD mirrors every step. This is
// an interactive setup step, so it waits for you at the
// Serial Monitor.
uint8_t enrollFingerprint(uint8_t id) {
int p = -1;
char idLine[17];
snprintf(idLine, sizeof(idLine), "Enrolling ID #%u", id);
Serial.print("Enrolling ID #");
Serial.println(id);
Serial.println("Place finger on sensor...");
lcdShow(idLine, "Place finger...");
while (p != FINGERPRINT_OK) {
p = finger.getImage();
switch (p) {
case FINGERPRINT_OK:
Serial.println("Image taken");
break;
case FINGERPRINT_NOFINGER:
Serial.print(".");
break;
case FINGERPRINT_PACKETRECIEVEERR:
Serial.println("Communication error");
break;
case FINGERPRINT_IMAGEFAIL:
Serial.println("Imaging error");
break;
default:
Serial.println("Unknown error");
break;
}
}
p = finger.image2Tz(1);
if (p != FINGERPRINT_OK) {
Serial.println("Could not read the print - try again");
lcdShow("Read failed", "Try again");
return p;
}
Serial.println("Remove finger");
lcdShow("Remove finger", "");
delay(2000);
p = 0;
while (p != FINGERPRINT_NOFINGER) {
p = finger.getImage();
}
Serial.println("Place the same finger again...");
lcdShow(idLine, "Place again...");
p = -1;
while (p != FINGERPRINT_OK) {
p = finger.getImage();
switch (p) {
case FINGERPRINT_OK:
Serial.println("Image taken");
break;
case FINGERPRINT_NOFINGER:
Serial.print(".");
break;
case FINGERPRINT_PACKETRECIEVEERR:
Serial.println("Communication error");
break;
case FINGERPRINT_IMAGEFAIL:
Serial.println("Imaging error");
break;
default:
Serial.println("Unknown error");
break;
}
}
p = finger.image2Tz(2);
if (p != FINGERPRINT_OK) {
Serial.println("Could not read the print - try again");
lcdShow("Read failed", "Try again");
return p;
}
p = finger.createModel();
if (p != FINGERPRINT_OK) {
Serial.println("The two scans did not match - enrol again");
lcdShow("Scans did not", "match - retry");
return p;
}
Serial.println("Prints matched!");
p = finger.storeModel(id);
if (p == FINGERPRINT_OK) {
Serial.print("Stored as ID #");
Serial.println(id);
snprintf(idLine, sizeof(idLine), "Stored ID #%u", id);
lcdShow(idLine, "Enrol complete");
} else {
Serial.println("Could not store the fingerprint");
lcdShow("Store failed", "Try again");
}
return p;
}
Code Explanation
Includes at the top. SoftwareSerial.h makes the sensor’s port on D2 and D3, Wire.h runs the LCD’s I2C bus, LiquidCrystal_I2C.h drives the LCD backpack, and Adafruit_Fingerprint.h talks to the sensor. All four must be present, or the code will not compile.
Constants. GREEN_LED_PIN is 7, RED_LED_PIN is 8 and BUZZER_PIN is 6. SIGNAL_MS is 2000 and BEEP_MS is 150. LiquidCrystal_I2C lcd(0x27, 16, 2) creates the display object: 0x27 is the I2C address most backpacks use, and 16, 2 is the screen size. If your LCD stays blank, try 0x3F instead of 0x27. lcd.init() and lcd.backlight() in setup() start the display and switch its backlight on, then setup() prints the welcome message, starts the sensor at 57,600 baud with finger.begin(57600), and checks it with verifyPassword(). If the sensor does not answer, the LCD says so too — “Sensor not found / Check the wiring” — so you can see the problem without a computer. getParameters() reads the sensor’s capacity, and getTemplateCount() reports how many fingers are already stored.
lcdShow() prints two lines and pads each one with spaces out to 16 characters. That padding matters: without it, a long line like “ACCESS GRANTED” leaves stale letters behind when a shorter line like “ID #5” replaces it on the same row.
loop() does four jobs, all on millis() timing except enrolment. First, after 2 seconds it switches the signal LEDs off and puts the welcome message back on the LCD. Second, it runs the beep pattern: while beeps remain, the buzzer toggles every 150 ms — one beep for a granted finger, two for a denied one — and it is forced silent when the pattern ends. Third, after a verdict it waits until the finger is lifted before scanning again, so one touch is never read twice.
Fourth, it checks the two inputs. If you typed a number in the Serial Monitor, loop() reads the line and, for a number from 1 to 127, runs enrolment. Otherwise it calls checkFinger(): getImage() takes a picture, returning immediately when no finger is present; image2Tz() turns the picture into a character file; fingerFastSearch() searches the whole library and, on a match, fills in finger.fingerID and finger.confidence. A higher confidence number means a closer match. When a finger is found, the LCD shows “ACCESS GRANTED” on the first line and the ID number on the second — “ID #5” — for exactly 16 characters of text, so nothing wraps. A search that finds nothing returns FINGERPRINT_NOTFOUND, which the code treats as denied and shows as “NOT REGISTERED” on the LCD.
enrollFingerprint() is the only part that waits for you, because enrolment is a setup step done at the Serial Monitor. It takes a first scan into slot 1, asks you to lift the finger, takes a second scan into slot 2, and calls createModel() to combine the two character files into one template. Two scans of the same finger are needed because one scan alone cannot be stored — the module insists on confirming the print before it keeps it. storeModel(id) then writes the template into the sensor’s flash under your ID number. The LCD mirrors every step — “Place finger…”, “Remove finger”, “Place again…”, “Stored ID #5” — so you can enrol a finger without watching the Serial Monitor at all.
The one thing you will definitely change is the ID numbers. Enrol each finger under its own number — ID 1 for your thumb, ID 2 for your index finger, and so on — and the LCD will show which ID was recognised.
Demonstration: Expected LCD and Serial Monitor Output
Upload the code. The LCD first shows the welcome screen:
Fingerprint Lock
Place your finger
Type 5 in the Serial Monitor and press Enter, then follow the LCD prompts:
Enrolling ID #5
Place finger…
Image taken, then:
Remove finger
Place the same finger again:
Enrolling ID #5
Place again…
Then:
Stored ID #5
Enrol complete
Now place the same finger on the sensor. The LCD shows the verdict and the ID, the green LED lights for 2 seconds, and the buzzer beeps once:
ACCESS GRANTED
ID #5
Place a finger you never enrolled, and the LCD answers:
NOT REGISTERED
Access denied
That is expected: the sensor does not know names, only ID numbers, and the Arduino decides by the match. The Serial Monitor at 9600 baud shows the same story, with the confidence score:
Fingerprint Access ready
Type a number 1-127 and press Enter to enrol a finger
Or place a registered finger on the sensor
Found ID #5 with confidence 102
ACCESS GRANTED
After 2 seconds the LCD goes back to the welcome screen, ready for the next finger. That is the whole system: it does not know names, only numbers, and the LCD tells you the number.
Need Help with the Build?
Troubleshooting
1. The LCD lights up but shows nothing, or only solid blocks.
The contrast is wrong. Turn the small blue potentiometer on the I2C backpack slowly until the text appears. If the screen stays blank, the I2C address may be different — change 0x27 to 0x3F in the code and upload again.
2. The LCD shows the welcome message and never changes.
Check that SDA is on A4 and SCL is on A5 — swapped, the LCD never answers. Also check the Serial Monitor: if it prints new matches but the LCD does not, the I2C wires are loose.
3. “Sensor not found” on the LCD and the Serial Monitor.
Check the crossover first: sensor TX goes to D2 and sensor RX goes to D3 — TX to TX never answers. Then check power: the sensor’s VCC must be on the Uno’s 5V pin, not 3.3V, and GND must be connected. Finally check the baud rate: the code uses finger.begin(57600), the sensor’s default.
4. Enrolment fails with “Scans did not match”.
Place the same finger both times, in the same position and with the same pressure. A finger rolled to a different angle between the two scans looks like a different finger to the module. Keep the finger still until the LCD tells you to lift it.
5. A finger that was enrolled is not recognised.
Placement matters more than anything: press the finger flat on the window, centred, and hold it still for a second. A quick tap or a finger half off the window gives a partial image. As a workaround, enrol the same finger a second time under a different ID, placed slightly differently — the system then accepts either version.
6. The code compiles with a “Low memory available, stability problems may occur” warning.
This warning is expected with the LCD, SoftwareSerial and fingerprint libraries together on the Uno, and the sketch runs fine — the deepest call in this sketch uses only a few dozen bytes of stack. Do not add more large libraries on top of it. If you see the same warning in another project, it means the same thing: the sketch fits, but there is little room left.
7. The code does not compile: “Adafruit_Fingerprint.h: No such file or directory” or “LiquidCrystal_I2C.h: No such file or directory”.
A library is missing. Install “Adafruit Fingerprint Sensor Library” by Adafruit and “LiquidCrystal I2C” by Frank de Brabander from the Library Manager — the error message names the missing file, so install the library that provides it.
8. A wet or very dry finger fails to scan.
An optical sensor photographs the skin surface: water on the window blurs the image, and very dry skin gives a faint one. Dry the finger and the window, and for dry skin, breathe on the fingertip once or rub it lightly before scanning.
Project Ideas and FYP Ideas Using the Fingerprint Sensor
- Classroom attendance register with names on screen. Give every student a finger ID and store their roll number with it. The LCD shows the roll number as each student scans in, and the Arduino logs the ID with the time over Serial — or to an SD card module for a proper register that survives a power cut.
- Hostel door lock with a display. Add a relay module and a solenoid lock so a registered finger actually opens the door, with the LCD showing the student’s ID and the red LED and buzzer for unknown fingers. Add a push button inside so the door opens from the inside without a finger.
- Fingerprint safe or locker with a display. Mount the sensor on a small box and drive a servo to release the latch only for registered fingers. The LCD shows who opened it, and the sketch already supports deleting a single ID with finger.deleteModel(id).
- Exam hall entry check. Each student’s finger is checked against the enrolled list before entry, with the LCD showing the ID or “NOT REGISTERED” and a buzzer for unregistered fingers. The list lives in the sensor, so the Arduino code stays short even for a whole class.
- Two-factor access: fingerprint plus RFID card. Combine this tutorial with our RFID card reader with LCD tutorial — the door opens only when the right card is tapped AND the right finger is scanned. Two independent checks make a much stronger final-year project.
- Biometric voting or token system with a count on screen. Each voter enrols one finger and the system allows exactly one vote per ID, with the LCD showing the running count. The sensor’s 1,000-template capacity covers a whole college.
Frequently Asked Questions
What is the fingerprint sensor price in Pakistan?
The R307 module is available from Smart Circuit Hub for Rs 3,430. The whole project costs about Rs 5,721 with the parts listed above.
What is the difference between the R307 and the AS608?
They speak the same protocol and run the same code and library. The R307 stores 1,000 fingerprints and needs 4.2 V to 6 V; the AS608 stores 162 and runs on 3.3 V to 5 V. If your module says AS608, follow this tutorial exactly — only the capacity number changes.
How many fingers can the sensor store?
The R307 stores up to 1,000 templates in its own flash memory. This tutorial enrols IDs 1 to 127, which covers a whole class; the sensor itself holds more, so change the range check in loop() if you need more IDs.
Does the fingerprint leave the sensor?
No. The sensor stores only a 512-byte template made from the fingerprint’s features, never a photograph, and the Arduino never receives the image. Templates stay in the sensor’s flash memory, so they survive unplugging the Arduino and uploading new code.
Why does enrolment need two scans of the same finger?
The module builds one template from two character files so it can confirm the print before storing it. One scan alone cannot be stored — createModel() combines the two and fails if they do not match, which is what stops a bad scan from becoming a permanent template.
Is a fingerprint system secure?
For a student project or a hostel room, yes — the rated false acceptance rate is under 0.001%, so a random finger almost never matches. It is not bank security: an optical sensor can be fooled by a good fake fingerprint in laboratory conditions, and real security systems add liveness detection. Treat it as strong identification, not as proof against a determined attacker.
Conclusion
You have built an access system that works as a standalone box: an R307 sensor, an Arduino Uno and a 16×2 LCD that asks for a finger, shows its ID, and answers with a clear verdict — no computer attached. You have also learned the three things that matter: the optical scan that turns a fingertip into a template stored inside the sensor, the UART link with its TX-to-RX crossover and its 5 V rule, and the honest limits, that a template is identification and not a photograph, and that placement matters more than anything. The LCD skills carry further than this one project: the same display can show distance, voltage, temperature or any number your next sensor produces. Try the attendance register next — it takes this exact build and adds a roll number for every finger.
Components for this project are available at Smart Circuit Hub with nationwide Cash on Delivery across Pakistan.
