Source: https://mokxi.com/parts/fingerprint
Updated: 2026-11-16

Part

# Fingerprint sensor, R30x / AS608

An optical sensor with its own template library on serial at 57600 baud: image, search, enroll.

See every part

- 4 pins
- 4 settings
- In 1 project
- In 1 lesson

Drawn live by the editor's own code, at the size you see it.

At a glance

## The Fingerprint sensor, R30x / AS608 in brief

What it is, and every setting the properties panel gives it.

The optical fingerprint sensor here is the R30x and AS608 family (R307, ZFM-20, Adafruit’s), with a glass window that glows red. It does all the work itself: it images the finger, turns the image into a character file, combines two into a template and searches its own flash library, while the board only sends packets. Its pins are VCC, GND, TX and RX, at 57600 baud with 3.3 V logic. On an Uno it goes on SoftwareSerial, the sensor’s TX into pin 2 and its RX from pin 3; on an ESP32, on a hardware port such as Serial2. Mokxi models the ZhianTec packet format (EF 01, the address, identifier, length, contents and checksum) and the commands Adafruit_Fingerprint uses, from getImage, image2Tz and fingerFastSearch to createModel, storeModel and getTemplateCount, each answered after 5 ms. A finger is a number: hold a fingertip under the glass. Fingers 1 and 2 are enrolled from the start (the enrolled property), the library holds 162 (capacity), and verifyPassword checks the password property. The classic mistake is swapping TX and RX. Real prints, image upload, the LED, security levels and search time are not modeled, and every match scores 100.

Family

Inputs

Pins

4

baud

57600

enrolled

2

capacity

162

password

0

A circuit built around it, running and explained: the Fingerprint sensor simulator.

Pins

## 4 pins

Named as the editor names them, so a wire lands where you expect it.

Pin

What it does

VCC

Supply.

GND

Ground.

TX

Out of the sensor: wire it to the board's receive pin.

RX

Into the sensor: wire it to the board's transmit pin.

How to use it

## How to use an optical fingerprint sensor with an Arduino

The sensor is a serial device at 57600 baud. On an Uno it goes on SoftwareSerial: the sensor’s TX into pin 2, its RX from pin 3, VCC to 5 V and GND to GND, and Adafruit_Fingerprint finger(&sensorSerial) talks to it. finger.begin(57600) then finger.verifyPassword() proves the wiring before anything else.

A check is three calls: getImage() takes a picture of the finger on the glass, image2Tz() turns it into a character file, and fingerFastSearch() looks it up, leaving the match in finger.fingerID. In this door lock fingers 1 and 2 are enrolled and finger 3 is a stranger: hold finger 1 under the sensor and the servo latch opens for three seconds, hold finger 3 and the red light blinks. If verifyPassword() fails, the usual cause is TX and RX swapped.

Part pin

Board pin

TX

Pin 2

RX

Pin 3

VCC

5 V

GND

GND

On an ESP32, pass a hardware port such as &Serial2 to Adafruit_Fingerprint instead of SoftwareSerial.

Click to open it in the editor

This is the simulator itself, running here. Click anything to open it in the editor.

Open this project in the editor Read the full tutorial

One check, from the door lock sketch

How it is modeled

## What is true about the Fingerprint sensor, R30x / AS608, here

In its help article’s own words: what the simulation gets right, and where it stops.

### Modeled

The packets. EF 01, the address, a packet identifier, a length, the contents and
a checksum, both ways, as the module's manual lays them out. A packet with a wrong
checksum is answered with an error.

The commands. Take an image (no finger answers 0x02), image to character file,
compare, search, combine two files into a template (two different fingers will not
combine), store, load, delete, empty the library, read the system parameters, verify
the password and count the templates.

Enrolling. Two images of the same finger, combined and stored at a page, are found
by a search afterwards; the template count goes up.

### Not modeled

Real prints: a finger is a number, and two images match when they are the same finger.
The match score is a fixed 100, a placeholder. The image upload commands, the LED, the
security levels and the time a real search takes are not modeled; the answers come
after a fixed 5 ms.

From Fingerprint sensor, in full.

Projects

## See the Fingerprint sensor, R30x / AS608 in a project

One built-in project uses it. It opens in the editor, already wired.

Lessons

## Where it turns up in a lesson

One lesson places it in its own circuit.

### Learn articles

1 lesson

- Arduino Fingerprint Sensor: Door Lock Code

Boards

## The boards it is shown on

This board has a built-in project with the Fingerprint sensor, R30x / AS608 in it.

- Arduino Uno R3

Libraries

## Arduino libraries for the Fingerprint sensor, R30x / AS608

Built in, so the sketch compiles with nothing to install. Each page has the calls, the wiring and an example to run.

- Adafruit Fingerprint Sensor Library

More parts

## The rest of the bench

Every one of these is drawn and simulated the same way.

Full-size breadboard

A real 0.1 inch grid with the rails and the center channel, 63 columns wide.

Jumper wires

Drag from any pin or hole to any other. Corners snap, and you can drag them.

Power

A supply rail at the voltage you choose.

Ground

The other end of every circuit.

LED

Lights when current flows. Five colors, and the brightness is what your eye would see.

Filament lamp

A tungsten bulb in a holder: an inrush when it is switched on cold, tens of milliseconds to warm up, and dim on half its voltage.

Resistor

Any value you like, with the color bands drawn to match.

ESP32-C3-DevKitM-1

A RISC-V board that runs your firmware at 160 MHz on the real memory map.

Pushbutton

A 12 mm tactile switch. Hold it while the simulation runs.

Raspberry Pi Pico

The RP2040 board on our own Cortex-M0+ core. Pick a program and press Run.

Raspberry Pi Pico W

Raspberry Pi Pico W (RP2040). The same board and the same pinout as a Pico, with the CYW43439 on it. The WiFi is simulated (no radio; real internet through the Cloud panel’s switch), and the on-board LED, which hangs off that chip rather than off GP25, is driven through the same path. Everything else is the Pico.

Raspberry Pi 4 Model B

Raspberry Pi 4 Model B: the 40-pin header, driven by main.py with RPi.GPIO or gpiozero.

See every part

## Wire up the Fingerprint sensor, R30x / AS608

Open the editor and push it into the breadboard. It is free, and it runs on your own machine.

Start building free Open the editor
