-
-
01 Draw a circuit in Chrome, and the board builds itself
-
02 Plain code checks every circuit before you touch a part
-
03 Fix it for me, and plain code fixes the circuit
-
04 Photograph any circuit, and Gemini in the cloud reads it whole
-
05 Chips and boards too, laid out on the breadboard step by step
-
06 The iPhone app, with Apple's on-device model
-
07 One Firebase AI Logic call, on the device or in the cloud
Inspiration
You have a circuit on paper: a sketch in a notebook, a diagram left on the whiteboard at the end of a lesson, a figure in a textbook. Between that drawing and a working breadboard sit the questions every beginner asks and every teacher answers forty times a term. Which resistor? Which way round does the LED go? Where does each leg go? Will it even light when the battery goes on? And a few lessons later: does this transistor need a base resistor, can a Raspberry Pi pin drive a servo, why does my button read random values?
The answers are arithmetic, convention and a handful of rules. What makes them slow is that nobody is standing beside you to say "that one is backwards" before you connect the power. Paper to Board stands beside you.
What it does
You draw a circuit on ruled paper in Chrome or in the iPhone app, or photograph one that already exists. After every pause of the pen, the model on your own device reads the sketch, in a few seconds and for free, and the board rebuilds itself. When you stop drawing, Gemini in the cloud checks the finished drawing. A photo of paper, and any circuit with a branch, a chip, a transistor or a board, is read whole by Gemini in the cloud as a netlist: every part, its pins, and which pins are wired together.
Plain code does everything that has a right answer:
- The safety check. A circuit solver (nodal analysis, the method circuit simulators use) works out every current it can stand behind: through each resistor, each LED and each board pin. Rules catch the mistakes numbers cannot: 5 V on a 3.3 V Raspberry Pi pin, a motor or servo powered from a pin, a transistor with no base resistor, a coil with no flyback diode, an input pin left floating, grounds not joined, a capacitor backwards or under-rated, two LEDs sharing one resistor. The verdict is GO, CHECK or STOP, each finding in plain words, with a list of what it cannot check from a drawing.
- Fix it for me. When the check stops a circuit, one tap makes every change it asked for, in plain code: a 1 kΩ resistor on a transistor's base, a 1N4007 across a motor, an LED turned round, a resistor in front of an LED that had none, a pull-down on a floating pin, grounds joined. Your drawing stays on the left and the fixed circuit is drawn beside it, the new parts in green, and the board is built from the fixed version. Nobody has to redraw a whole circuit for one missing resistor. What code cannot fix safely, such as a short, stays listed for you.
- The board. Every part is laid out on a breadboard: the supply on the rails, chips across the centre gap, transistors on three columns, a Raspberry Pi, an Arduino or a servo off the board on its leads.
- The steps. One at a time, each with the hole it names highlighted, power last, plus the parts list (with leg order for common transistors), a printable handout and a share link that holds the whole circuit inside itself, so nothing is stored.
- An explanation of the circuit for a beginner, in any of eleven languages. A 555 flasher's timing is worked out from its resistors and capacitor.
It is for students who can draw a circuit for an exam but freeze in front of a breadboard (Leaving Certificate, A-level, IB, first-year engineering labs), for teachers who can photograph the whiteboard and send the class one link, and for hobbyists following a schematic from a book or a forum, all the way to an Arduino or a Raspberry Pi. It is free and needs no account.
How it uses Firebase AI Logic

On the web, one getGenerativeModel call in PREFER_ON_DEVICE mode, with a JSON schema for the answer, reads your sketch after every pause. When Chrome's built-in Gemini Nano is present, the sketch goes to it and never leaves the computer; it works with no connection at all. When it is not, the same call goes to Gemini 3.5 Flash-Lite in the cloud. A photo of paper, a finished sketch (once you stop drawing, at most one check every 15 seconds) and a sketch the device says is beyond one loop go to Gemini 3.8 Flash with ONLY_IN_CLOUD and a netlist schema, at low thinking. Every reading says where it came from, and a tally counts the reads that stayed on the device.
On the iPhone, Apple's on-device model reads the sketch: from iOS 27 it can take an image. Firebase AI Logic's GeminiLanguageModel plugs into the same Apple LanguageModelSession, so the phone and the cloud answer the same typed questions, the one-loop reading and the whole netlist. iOS has no PREFER_ON_DEVICE switch, so the app applies the web page's rules in its own code.
Why the work is split this way, measured. The sketch is read after every pause. In a lesson of thirty people that would be thousands of reads an hour, which only makes sense when a read is free, quick and needs no connection: true of the model on the device. Photos are different. I drew twenty circuits in biro on real paper and photographed each with the iPhone: Apple's model read 5 of the 12 one-loop photos fully right, passed a backwards LED as safe, and never once said a drawing was beyond it, while Gemini 3.8 Flash read all 21 photos right at a median of 2.9 s. So photos and whole circuits go to the cloud, and the device keeps the live sketch, where its speed and price matter and the cloud checks its work once you stop. With no connection, the device reads a photo too, and says to check it. A circuit drawing holds nothing private, so the cloud is safe to use.

What the model may do. It reads: it turns a picture into parts and wires as structured data. It never says whether a circuit is safe. The solver, the rules, the breadboard layout and the steps are plain code that gives the same answer every time, with 155 tests on the web and 76 in Swift. One test rebuilds what each breadboard layout joins and proves it matches the drawing, with no hole used twice.
Trust. Firebase App Check is enforced: reCAPTCHA Enterprise on the web, App Attest on the iPhone. No key sits in the page or the app. On the web, the two cloud model names come from Firebase Remote Config, so a model that is retired or renamed can be swapped from the console without a new deploy; the names in the code are the defaults. The site is on Firebase Hosting.
How I built it
The web app is Vite and TypeScript with no framework, and the engine is a set of plain functions with tests: the netlist and a library of 28 kinds of part (with the Raspberry Pi's 40-pin header and the pins of Arduino, ESP32, Pico and micro:bit boards), the solver, the rules, the pin names and the breadboard layout. The iPhone app is SwiftUI with PencilKit for drawing, and its engine is a line-for-line port of the web's, with the web's tests ported too. The fixed circuit in Fix it for me is drawn by code: elkjs, the Eclipse Layout Kernel, places the parts and routes the wires, and the iPhone shows the very same diagram from the same code in a small web view. The cloud models run on the Gemini API in Google Cloud, at about a hundredth of a cent a read, with a monthly budget alert; a read on the device costs nothing.
I built it with Claude Code as the coding agent, with Firebase's own agent skills for AI Logic, Hosting and Remote Config loaded in the repository (.claude/skills). The AI Logic skill was used to review the finished integration against Firebase's guidance (App Check, debug tokens kept out of the code, current Gemini 3 models, structured output, streaming), and its one recommendation I had not followed, Remote Config for the model names, is now in. The Hosting and Remote Config skills guided the deploys.
Challenges I ran into
- One loop was not enough. The first version read a single series loop. That covers a first lesson, and a learner's next questions are about transistors, 555 timers and boards. Reading any circuit meant a netlist, a solver, rules and a breadboard layout for any shape, built and tested on both platforms in two days.
- Which model reads what. On five test circuits, Gemini 3.5 Flash-Lite read four netlists right in under 3 seconds and got the transistor circuit wrong; Gemini 3.8 Flash read all five right. A safety check cannot rest on one wrong reading in five, so whole circuits go to 3.8 Flash.
- Numbers I cannot stand behind. The solver does not model transistors or chips, so any current that depends on one is marked uncertain and left out: no number on the page is a guess.
- The device was worse on real paper than on clean drawings. It read 4 of 5 clean test drawings right, then 5 of 12 photos of real biro drawings, with values ten times too big and a Raspberry Pi read as a battery. Measuring that on twenty drawings is what moved photos to the cloud, and added the cloud check of a finished sketch.
- Speed on the device. Live reads first took 6 to 9 seconds. A compact answer shape with one-letter keys, and no worked example in the prompt, brought a read down to 3 to 4 seconds in Chrome.
Accomplishments that I'm proud of
- The board builds itself as you draw, with every one-loop read on the device: 3 to 4 seconds a read in Chrome on a MacBook.
- The twenty-drawing test on real paper: Gemini 3.8 Flash read all 21 photos right (twelve loops, the messy one, and eight whole circuits with a Raspberry Pi, an Arduino, a 555 and a regulator), at a median of 2.9 s. It even warned that my own 555 drawing had left pin 4 unconnected.
- Any circuit: a Raspberry Pi driving an LED and a servo, an Arduino switching a motor through a transistor, a 555 flasher. Each is read whole, checked (3.9 mA from the Pi's pin, the 555 at about 6.9 flashes a second) and laid out on a breadboard that a test proves is wired as drawn.
- Fix it for me: drawing 18, an Arduino switching a motor through a transistor, goes from STOP to GO in one tap. Code adds the 1 kΩ base resistor and the 1N4007 across the motor, draws the fixed circuit beside the photo and builds the board from it, with nothing redrawn.
- Two platforms, both installable today: the live site, and the iPhone app on a public TestFlight link.
What I learned
A small model on the device is a good reader and a poor judge. Given a narrow job and a typed answer, it reads drawings quickly and for free; the bigger model earns its cost on the drawings the small one cannot read. Everything that needs to be right every time belongs in plain code, and plain code can say honestly what it cannot check.
What's next for Paper to Board
Transistors and op-amps in the solver as simple models, so more currents can be shown; Chrome's Gemini Nano measured on the same twenty photos; a second round of real drawings by other people's hands.
Built during the submission period
All of Paper to Board, the web app and the iPhone app, was built from 15 November 2026, inside the submission period. No earlier app or code is reused.
Built With
- app-attest
- apple-foundation-models
- chrome-prompt-api
- claude-code
- elkjs
- firebase
- firebase-agent-skills
- firebase-ai-logic
- firebase-app-check
- firebase-hosting
- firebase-remote-config
- gemini
- gemini-nano
- google-cloud
- pencilkit
- recaptcha-enterprise
- swift
- swiftui
- typescript
- vite
- vitest