R307 Optical Fingerprint Sensor Module
The GROW R307 is an optical fingerprint identification module that combines an image sensor with an onboard processing and matching engine. A microcontroller communicates with it over a TTL-level UART link; the module captures the fingerprint, extracts its features, creates templates and performs matching internally. Your Arduino or ESP32 receives command responses and a template ID or a no-match result rather than having to process raw fingerprint images itself.
The R307 workflow has two distinct stages:
- Enrollment: capture the same finger twice, convert both captures into feature data, combine them into a template and store that template in the module's non-volatile fingerprint library.
- Verification or identification: capture a new image and compare it either with one selected template (1:1 verification) or search the stored library (1:N identification).
The example sketches on this page demonstrate matching only. They do not enroll a new finger automatically. Enroll templates first with a dedicated enrollment sketch or application, then use the matching example to search the stored library.
R307 specifications (manufacturer manual)
- Technology: Optical fingerprint imaging with onboard processing and template matching
- Supply input: 4.2–6.0 V DC; 5 V is the usual supply
- Typical working current: 50 mA
- Interfaces: UART (TTL logic) and USB 2.0 on the documented module version
- UART default: 57,600 baud; configurable from 9,600 to 115,200 baud in 9,600-baud steps
- Matching modes: 1:1 verification and 1:N identification
- Template capacity: Up to 1,000 fingerprints in the documented R307 manual; confirm the exact model/revision because related R307S variants may differ
- Template size: 512 bytes; character file size: 256 bytes
- Image acquisition time: Less than 0.5 s (manufacturer specification)
- Average search time: Less than 1 s for a 1:1,000 search (manufacturer specification)
- Security setting: Five levels; higher levels reduce false acceptance at the cost of more false rejections
- Manufacturer-stated FAR / FRR: Less than 0.001% / less than 0.1%; these are laboratory/module specifications, not a guarantee of real-world access-control security
- Operating environment: −10 °C to +40 °C, 20–85% RH; keep the optical window clean and dry
- Module dimensions: 44.1 × 20 × 23.5 mm for the documented split-type module
Connector pinout and electrical notes
The six-pin UART connector on the documented R307 is:
- 5V / VCC: Main module supply, 4.2–6.0 V DC. Do not power it from a 3.3 V rail.
- GND: Supply and signal ground; connect to the controller ground.
- TXD: Module UART output; connect to the microcontroller UART RX.
- RXD: Module UART input; connect to the microcontroller UART TX.
- TOUCH: Finger-detection output. It can be used as a wake/interrupt signal; observe the module's stated maximum output current and verify polarity before connecting a load.
- 3.3V: Auxiliary supply input for the touch-detection circuit, not the main module supply. The manual specifies 3.3–5 V at approximately 5 µA for this pin.
GROW's R307 manual explicitly states that the TTL UART can connect to either 3.3 V or 5 V microcontrollers. Therefore, for the documented R307, TXD/RXD can be connected directly to a 3.3 V ESP32 UART or a 5 V Uno UART; do not add a divider by default. This guidance is specific to the documented R307 TTL interface. Recheck the exact breakout revision and its manual before wiring a visually similar fingerprint module.
The module requires a stable 4.2–6 V supply and draws about 50 mA typically. Allow adequate supply margin and avoid assuming a controller's 3.3 V output can power it. The module takes approximately 200 ms to initialize after power-up; wait before sending commands.
UART wiring and library setup
UART is crossed: sensor TXD → controller RX, and sensor RXD → controller TX. Join grounds. The examples use the Adafruit Fingerprint Sensor Library, installed through Arduino IDE Library Manager by searching for Adafruit Fingerprint Sensor Library.
- Arduino Uno: the example uses SoftwareSerial on D2 (RX) and D3 (TX). The sensor's default 57,600 baud is used; SoftwareSerial performance depends on timing and other interrupt-heavy code, so a hardware UART board may be preferable for demanding applications.
- ESP32: the example uses UART2 on GPIO16 (RX) and GPIO17 (TX), a common mapping on classic ESP32 DevKit boards. UART pin routing and pin availability vary by ESP32 family and board; select valid pins for your exact board.
Enrollment, matching and privacy
Run an enrollment procedure before expecting a match. Enrollment normally asks the user to place and lift the same finger, captures it twice, creates a model and stores it at a chosen template ID. Keep a record of assigned IDs if the application needs to map a match to a user. Do not expose an unrestricted database-clear command in a deployed product.
Fingerprint templates are biometric data. Obtain informed consent, restrict physical and software access to the device, protect any exported templates, provide a deletion process and avoid treating a successful match as the only security factor for high-risk access. The manufacturer's FAR/FRR figures do not establish that a DIY lock or attendance system is secure or compliant.
Troubleshooting
- Sensor not found: verify TX/RX crossover, common ground, 4.2–6 V supply, 200 ms startup wait and the configured baud rate.
- No finger detected: clean and dry the optical window; place the finger flat and consistently.
- Image conversion fails: try a clean, steady finger placement; check for a dirty window, poor contact or damaged sensor.
- No match: confirm enrollment completed and stored the template, use the same finger, and check the library count and security level.
- Intermittent UART errors: shorten wiring, improve the supply/ground connection, keep the selected baud rate consistent and test without other interrupt-heavy tasks.
- Unexpected behavior on a clone: identify the exact model/revision and verify its supply, connector pin order, UART logic and capacity from its own documentation; R307-family modules are not guaranteed identical.
A wiring simulator can illustrate the UART connections, but it cannot validate optical fingerprint capture, enrollment, matching accuracy or biometric security. Test those functions with the physical module.
Specifications
- Sensor type
- Optical fingerprint module with onboard image processing and template matching
- Host interface
- TTL UART; documented R307 commonly defaults to 57600 baud
- Supply
- Documented R307 manual specifies 4.2–6.0 V supply; verify exact model/revision
- Current
- Approximately 50 mA typical for the documented module; allow supply margin
- Functions
- Enrollment, template storage, 1:1 verification and 1:N search
- Capacity
- Up to 1000 templates on the documented R307 version; related variants may differ
- Security
- Biometric matching module is not, by itself, a certified secure access-control system
Pinout
| Pin | Name | Description |
|---|---|---|
| VCC / 5V | Main supply | Documented R307 supply input is 4.2–6.0 V; do not power from a 3.3 V rail. |
| GND | Ground | Supply and UART ground; connect to host ground. |
| TXD | UART transmit | Sensor-to-host serial output; connect to host RX. |
| RXD | UART receive | Host-to-sensor serial input; connect to host TX. Documented R307 TTL interface supports 3.3 V and 5 V hosts; verify clones. |
| TOUCH | Finger detection | Optional finger-detect output; check polarity and electrical limits before use. |
| 3.3V | Auxiliary touch supply | Documented connector pin for touch circuit supply, not the main sensor power input; verify exact manual. |
Wiring & code
Setting up Fingerprint Sensor (R307) with Arduino Uno
Library
Adafruit Fingerprint Sensor Library by Adafruit
Search "Adafruit Fingerprint" in Library Manager (Sketch > Include Library > Manage Libraries)
Wiring
| Component pin | Arduino Uno pin | Note |
|---|---|---|
| VCC | 5V | |
| GND | GND | |
| TX | D2 (Arduino RX via SoftwareSerial) | |
| RX | D3 (Arduino TX via SoftwareSerial) |
#include <SoftwareSerial.h>
#include <Adafruit_Fingerprint.h>
// SoftwareSerial constructor order is RX, TX.
SoftwareSerial fpSerial(2, 3);
Adafruit_Fingerprint finger(&fpSerial);
void setup() {
Serial.begin(9600);
fpSerial.begin(57600); // R307 factory default; change if reconfigured.
delay(250); // R307 needs about 200 ms to initialize after power-up.
Serial.println(F("R307 fingerprint match demo"));
Serial.println(F("Matching only: enroll templates separately first."));
if (!finger.verifyPassword()) {
Serial.println(F("R307 not detected. Check 5V supply, GND, crossed UART and baud rate."));
while (true) delay(100);
}
if (finger.getTemplateCount() == FINGERPRINT_OK) {
Serial.print(F("Stored templates: "));
Serial.println(finger.templateCount);
} else {
Serial.println(F("Could not read template count; check sensor communication."));
}
Serial.println(F("Place an already-enrolled finger on the sensor."));
}
void loop() {
uint8_t result = finger.getImage();
if (result == FINGERPRINT_NOFINGER) return;
if (result != FINGERPRINT_OK) {
Serial.print(F("Image capture failed, code: "));
Serial.println(result);
delay(300);
return;
}
result = finger.image2Tz();
if (result != FINGERPRINT_OK) {
Serial.print(F("Image conversion failed, code: "));
Serial.println(result);
delay(500);
return;
}
result = finger.fingerFastSearch();
if (result == FINGERPRINT_OK) {
Serial.print(F("Match found. Template ID: "));
Serial.print(finger.fingerID);
Serial.print(F(" Confidence: "));
Serial.println(finger.confidence);
} else if (result == FINGERPRINT_NOTFOUND) {
Serial.println(F("No enrolled template matched."));
} else {
Serial.print(F("Fingerprint search failed, code: "));
Serial.println(result);
}
delay(1000); // Avoid repeatedly processing the same finger.
}This example only searches templates already enrolled in the sensor. Run a separate enrollment sketch first. The documented R307 TTL UART is compatible with 3.3 V and 5 V microcontrollers; verify the exact module revision.








