Simulator

A fingerprint sensor simulator: a door lock on an Arduino

Mokxi is a free online fingerprint sensor simulator that runs in your browser, with nothing to install and no account needed. An optical fingerprint sensor on an Arduino Uno, with a servo for the latch and a traffic light module for locked, checking and open. Two fingers are enrolled and a third is a stranger: present each and see who gets in.

  • 505parts on the bench
  • 45boards running now
  • 1.00xreal time, on every board
Arduino Uno: a fingerprint door locklive0.000 s 0.00x
Click to open it in the editor
Click the circuit to open it in the editor, then pick a finger on the sensor. Fingers 1 and 2 open the latch for three seconds; finger 3 is refused.

What you can do here

In the circuit above, or in the editor it opens.

  • Match a finger with the Adafruit Fingerprint library
  • Present an enrolled finger and a stranger’s, and handle both
  • Open a servo latch for three seconds, then lock it again
  • Show locked, checking and open on three lamps
  • Read each result on the serial monitor
  • Wire the sensor’s serial port to pins 2 and 3 with SoftwareSerial

What the running circuit shows

Two friends and a stranger.

The sensor is a small computer with a camera. It stores the prints itself and does the matching itself; the Arduino only asks, over a serial port at 57600 baud, whether the finger on the glass is one it knows, and gets back a number. On start the sketch prints “Sensor ready, 2 fingers enrolled” and the red lamp is on.

Present finger 1 and the monitor prints “Welcome, finger #1”, the lamp goes green and the servo swings the latch to 90 degrees. Three seconds later it prints “Locked”, the servo returns to 0 and the lamp is red again. Finger 2 does the same. Finger 3 was never enrolled, so the sensor finds no match and the sketch prints “Access denied”, with the latch where it was.

How the sensor is modeled

The serial protocol, without the optics.

The model speaks the packet protocol of the common optical modules, so the Adafruit library’s calls work as they do on hardware: take an image, convert it, search the library, which holds up to 162 prints. The wiring matters the same way too: the sensor’s TX has to reach the pin the sketch listens on.

There is no image here. A finger is a number you pick, an enrolled finger always matches and always with the top score, and a stranger never does. A real sensor sometimes rejects the right finger when it is dry, wet or placed off center, so a real lock needs a retry and a way in that does not depend on the sensor.

How it works

Three steps from a blank tab to a running circuit.

  1. Open the editor

    It runs in your browser tab. Nothing to install, and you need no account to start.

    Your first project
  2. Wire it and write the code

    Drag parts onto a breadboard, run each wire from pin to pin, and write the sketch beside it.

    Wiring
  3. Press Run

    Your sketch compiles in the tab and runs on a model of the chip, with the Serial Monitor beside it.

    Run and serial
Reviews

What makers say about Mokxi.

“The AI checker helps check and correct my circuits, and it has way more components than Tinkercad. As a student I really appreciate the tool.”

ChloeEngineering student

“I’d been looking for a real online electronic simulator that was intuitive and complete when I found Mokxi. I was able to quickly import a Fritzing file and my Arduino sketch and start testing. Mokxi has all of the makings for the best online Arduino simulator I have been able to find!”

JayModel builderFeatured in his DioramaOS post

“I’m using Mokxi to develop and simulate an STM32-based four-wheel-drive robot car before building the actual hardware. It allows me to experiment with DC motor control, PWM, RPM measurement using photointerrupters, and different acceleration, braking, and reversing strategies, helping me understand and refine the system before implementing it in real life.”

NusretRobot car builder, Hamburg

Share your story

FAQ

Questions, answered.

Is it free?

Yes. The circuit on this page, every part in it and the editor it opens in are on the free plan, with no card.

Do I need an account?

No. The circuit runs the moment the page does, and the editor opens without one. A free account is only for saving a project to the cloud and sharing it by link.

Can I simulate a fingerprint sensor on an Arduino?

Yes. The sensor here answers the same serial commands as the common optical modules, so a sketch written with the Adafruit Fingerprint library runs unchanged. You choose which finger is on the glass; no real fingerprint is read.

Which pins does a fingerprint sensor use on an Arduino Uno?

Two digital pins with SoftwareSerial, crossed: the sensor’s TX to the pin the sketch receives on and its RX to the pin it sends on. This circuit uses pins 2 and 3, at 57600 baud.

How many fingerprints can the sensor store?

The module modeled here holds 162, the usual figure for the small optical sensors. The prints stay in the sensor’s own memory, not in the Arduino’s.

More simulators

Each one opens on a circuit that is already running.

Open the door

Open the circuit, present a finger and watch the latch. Nothing to install, and no account needed.