Via

Open source · MIT license

Circuit Boards
From
AI

Via is our dream for lowering the difficulty to getting into electronics design. It's a package of tools, skills and gates an agent needs to make production-ready PCBs. Designed by EE's in Florida.

Via is in early development and has no release yet. See the current status.

Install on Ubuntu 24.04

$ git clone https://github.com/ThyFriendlyFox/via.git && cd via && sudo ./install.sh

Works with any agent

  • Claude Code
  • Codex
  • Cursor
  • Gemini
  • Grok
  • GitHub Copilot
  • Windsurf
  • Cline
  • AMP
  • Antigravity
  • OpenClaw
  • Droid
  • Goose
  • Kilo
  • Kiro CLI
  • Hermes
  • OpenCode
  • Roo
  • Trae
  • VS Code
  • Zed

Example project

A fire alarm communicator, designed end to end with Via

Herald connects a fire alarm control panel to a monitoring station over LTE-M, with Wi-Fi as a backup. Via took it from a written brief to a routed four-layer board, 84.4 × 64 mm with 127 parts on one side, and the files a fabricator needs. Every part on the board below is labelled with the information Via gathered for it.

Herald v0.1 from the front: its outline, its copper on 3 signal layers and the 127 parts on it, each labelled in turn POWER CELL WI-FI ALARM TROUBLE TEST RESET +24V 0V TIP RING TAMP 0V TROUBLE OUT ALM SUP TBL 0V NC C NO LTE NANO SIM WI-FI USB HERALD FIRE ALARM COMMUNICATOR LTE-M + WI-FI v0.1 J1 24V IN F1 0.75A 30V D1 SMAJ28A D2 SS34 C1 47u 50V C2 4.7u 50V U1 LMR33630A C3 100n C4 1u R1 100k R2 35.7k L1 10u 3A C5 22u C6 22u R3 100k R4 10k U2 TLV75733P C7 1u C8 10u U3 BG95-M1 C9 100u 6.3V polymer C10 100n C11 33p C12 10p C13 4.7u C14 100n J4 LTE Q1 MMBT3904 R5 4.7k R6 47k Q2 MMBT3904 R7 4.7k R8 47k U4 TXS0104E C15 100n C16 100n J5 nano SIM R9 22 R10 22 R11 22 R12 10k C17 100n U6 ESDA6V1-5SC6 C18 33p C19 33p C20 33p U5 ESP32-S3-MINI-1U C21 10u C22 100n R13 10k C23 1u R14 10k R17 10k J6 USB-C R15 5.1k R16 5.1k U7 USBLC6-2SC6 D3 B5819W J2 PHONE F2 0.1A 60V R22 47 D4 SMAJ30CA R23 10k C24 10n R24 620 C25 2.2u 50V Q3 BCP53 R18 27 Q4 MMBT3906 R42 47k R19 10k Q5 MMBT3904 R20 4.7k R21 100k R25 1k C26 68n R26 1k C27 68n C28 1u 50V R27 470 C29 100n 50V R28 22k R29 100k R30 100k D5 BAV99 J3 INPUTS U8 ESDA6V1-5SC6 R31 100 R32 4.7k R33 10k C30 10n R35 100 R36 4.7k R37 10k C31 10n R39 100 R40 4.7k R41 10k C32 10n J8 TAMPER R43 1k R44 10k J7 TROUBLE K1 G6K-2F-Y 3V Q6 2N7002 R45 100 R46 100k D6 1N4148W D7 green R47 1k D8 green R48 1k D9 green R49 1k D10 red R50 1k D11 yellow R51 1k SW1 TEST SW2 RESET H1 M3 H2 M3 H3 M3 H4 M3 FID1 Fiducial FID2 Fiducial FID3 Fiducial

This view is generated from Herald's design file and routed board. Each label shows what Via recorded for that part: its value, footprint and connections; the manufacturer's description and datasheet; why it was chosen; and every simulation that tests it, with the results across temperature and tolerance. Select any part on the board to see its label.

J2 · Q3 · Q4

A phone line for a panel that expects one

Fire panels report by telephone. Herald supplies the panel's dialer with a current-limited line from its 24 V input and detects when the dialer goes off hook.

U5 · GPIO7

Tone decoding in firmware

A Goertzel filter decodes the dialer's DTMF digits to the limits of ITU-T Q.24, verified on the host with a complete Contact ID call.

GPIO14 · R25–R27

Line tones from a PWM pin

Dial tone, handshake and acknowledgement come from a microcontroller pin through two RC stages. Simulation caught a first design that was too weak for the line before any board was made.

J3 · R31 · R32 · U8

Three supervised inputs

End-of-line resistors let one ADC reading tell a closed contact, an intact loop and a cut wire apart, with at least 0.2 V of margin at every simulated corner.

K1 · Q6 · J7

A fail-safe trouble relay

The relay is held on while Herald is healthy. A power loss or a reset releases it, and the panel reports the fault.

U3 · J4 · J5

Cellular first

A Quectel BG95-M1 LTE-M module with a nano SIM, level-shifted to the ESP32-S3, with a hand-routed 50 Ω antenna feed.

U5

Wi-Fi as backup

The ESP32-S3's own radio, with an external antenna connector for installation in a metal cabinet.

Q5 · R21

When both paths fail

Herald drops the line feed, so the panel reports a communication fault just as it would for a cut phone line.

Herald's front in 3D: the BG95 modem, the nano SIM, the ESP32-S3 module, the status lights, the relay, the USB-C port and the black screw terminals along the bottom edge

The board in 3D

KiCad's model of the routed board, with every part, in its real colours: red solder mask, white legend and gold-plated pads. Drag to turn it: every part sits on the front, and the back carries the installer's notes.

Every layer of Herald on its own, from workcenter render
$ workcenter gates examples/fire-alarm-communicator/v0.1
PASS   erc        0 errors, 0 warnings  [5.52s]
PASS   drc        0 errors, 7 warnings (0 unconnected, 0 parity)  [7.18s]
       - warning: silk_edge_clearance: Silkscreen clipped by board edge
       - warning: silk_edge_clearance: Silkscreen clipped by board edge
       - warning: silk_edge_clearance: Silkscreen clipped by board edge
       - warning: silk_edge_clearance: Silkscreen clipped by board edge
       - warning: silk_edge_clearance: Silkscreen clipped by board edge
PASS   sim        8 decks, 573 corner runs, 0 failures  [1.56s]
PASS   export     4/4 outputs, 24 gerber files  [1.55s]
GREEN with 7 warnings: herald  report /home/user/via/examples/fire-alarm-communicator/v0.1/build/gates.json
Via's four checks on Herald, exactly as the terminal printed them. The seven warnings flag silkscreen outlines that meet the board edge, where the terminal blocks and the USB-C connector face outward. The project README covers the specification, the pin plan, every part and the open items, and the design file is the board itself.

Checks

Four checks before any board is released

Each check reports on one line, and the last line is the verdict. The drawings below show each check catching a fault in a test circuit from this repository, with the numbers its run printed.

J5STICK_L 12345 +3V3STICK_LXSTICK_LYGND L3 U774HC165 D4D5D6 BTN_L1BTN_SHARE BTN_L3 ≠ two labels, one pin each: the clicks reached nothing

examples/universal-controller/v0.1/rosetta.kicad_sch

Electrical rules (ERC)

KiCad's electrical rule check on the schematic. On Rosetta's first wired schematic it found a stick's click on a net named L3 while the shift register read BTN_L3: two labels, each on one pin, connected to nothing.

0.05 mm apartrule: 0.20 mm unconnected end, a warning

tests/boards/fail-drc-clearance

Design rules (DRC)

KiCad's design rule check on the routed board, with your fabricator's limits added by --fab. In this test circuit two tracks pass 0.05 mm apart where the rule asks for 0.20 mm.

5 V R1 10k±5 % vref D1 0.600.500.40 −20 °C27 °C85 °C 0.646 V window 0.50–0.60 V 0.548 V as written 0.4216 V at 85 °C, R1 +5 %

tests/boards/fail-sim-corner/sim/diode_ref.cir

Simulation at every corner (SIM)

ngspice runs every simulation as designed, at each temperature the project names, and with each part at both ends of its tolerance. This test circuit's reference is inside its window at room temperature and leaves it hot and cold.

the rail swings 6.8 V on 5 V its average holds 4.9–5.1 V 5.3 kHz load×2×4×5 ×3 = 15.9 kHz filter peak 15.9 kHz, Q 14 2 kHz5k10k20k50k

tests/boards/fail-freq-overlap/sim/frequency-plan.json

The frequency plan

Switching frequencies and their harmonics are checked against every resonance the simulations measure. In this test circuit the load's third harmonic lands on the filter's peak: the rail swings while its average still passes.

ratsnestrouted FreeRouting Rosetta: 2,700 segments, 256 vias, 3 routed layers

examples/universal-controller/v0.1/rosetta.kicad_pcb

Automatic routing

FreeRouting routes the board from the design file, with no manual steps in a GUI. Rosetta v0.1's four layers routed once the RP2040's capacitors moved to its corners and its vias shrank to 0.45 mm.

R1 R2 C1 drill F.SilkF.MaskF.CuB.CuB.MaskEdge.Cuts 4/4 outputs, 22 gerber files

tests/boards/pass-rc-divider/build/fab/

Fabrication files (EXPORT)

Gerbers, drill files, the bill of materials and the schematic PDF, written to build/fab/ only for a board that passed every check. This test circuit writes four outputs.

$ workcenter next tests/boards/fail-sim-corner
NEXT       The circuit is inside its bound as written and outside it at that corner. Change the circuit: a tighter part, another value, another topology. A bound, a rule or a requirement is never changed to pass: the design changes.
RUN        workcenter gates tests/boards/fail-sim-corner
WHY        SIM failed: diode_ref:vref=0.4215933 at 85 C, R1 +5 % (and 5 more corners) not in [0.5, 0.6] (the fixture's reference window, 0.55 V within 0.05 V)
READ       .claude/skills/simulate/SKILL.md, "Corners"
DONE WHEN  the last line starts with GREEN

workcenter next

What to fix next

When a check fails, workcenter next says what to do: the change to make, the command to run, why the check failed and the guide to read. Here, a test circuit meets its limit at room temperature but drifts out of it at 85 °C. Engineers and AI agents get the same guidance.

$ workcenter gates tests/boards/pass-rc-divider
PASS   erc        0 errors, 0 warnings  [0.27s]
PASS   drc        0 errors, 0 warnings (0 unconnected, 0 parity)  [0.59s]
PASS   sim        1 decks, 46 corner runs, 0 failures  [0.16s]
PASS   export     4/4 outputs, 22 gerber files  [1.21s]
GREEN: rc_divider  report tests/boards/pass-rc-divider/build/gates.json

$ workcenter gates tests/boards/fail-drc-clearance
PASS   erc        0 errors, 0 warnings  [0.27s]
FAIL   drc        1 errors, 1 warnings (0 unconnected, 0 parity)  [0.63s]
       - error: clearance: Clearance violation ( clearance 0.2000 mm; actual 0.0500 mm)
       - warning: track_dangling: Track has unconnected end
RED: rc_divider  report tests/boards/fail-drc-clearance/build/gates.json
Two test circuits from this repository, as the terminal printed them. The second has a clearance error on purpose.
  • GREEN exit 0
  • RED exit 1
  • SKIPPED exit 2

The exit code matches the last line, so scripts and CI can rely on it. A check whose tool is missing is reported as skipped, never as passed.

Design as code

How a Python File Becomes a Board

Parts, connections and placement live in one file under version control. Change a line, regenerate, and Via rebuilds the schematic and the routed board, with no manual steps in a GUI.

design.py

for k in range(3):
    n = k + 1
    x = J_IN + 3.5 * k
    r(f"R{31 + 4 * k}", "100", f"Z{n}_EXT", f"ZONE{n}", (x, 147.6), 90, fp=R0603)
    r(f"R{32 + 4 * k}", "4.7k", "+3V3", f"ZONE{n}", (x - 0.6, 144.0), 90)
    r(f"R{33 + 4 * k}", "10k", f"ZONE{n}", f"ZONE{n}_ADC", (x + 0.6, 144.0), 90)
    c(f"C{30 + k}", "10n", f"ZONE{n}_ADC", (x + 0.6, 141.6), 90)
Herald's three supervised inputs are a seven-line loop in its design file.

herald.kicad_sch

The supervised inputs in Herald's schematic: the INPUTS terminal J3, a pull-up, series and filter resistor for each zone, and U8 clamping the field wiring
One command draws the schematic

herald.kicad_pcb

Herald's routed board in 3D, from the front
and routes the board, with no manual steps in a GUI.

workcenter design design.py --route writes Herald's KiCad schematic and routed board from its design file, so every change to the board is a change you can review.

Architecture

Built on KiCad, ngspice and FreeRouting

design.py a Python file that names parts from the KiCad libraries
workcenter design
KiCad project a schematic and a routed board
workcenter gates
ERC · DRC
SIM · EXPORT
four checks in order, ending in a single verdict
GREEN
build/fab/ Gerbers, drill files, a bill of materials and a schematic PDF

Open-source engines, all running headless

KiCad 10 kicad-cli runs ERC, DRC and the export
ngspice runs every deck at every corner
FreeRouting routes the board

The command-line tool needs only Python's standard library. workcenter doctor reports the status of each engine, and a check whose engine is missing is reported as skipped, never as passed.

Every procedure is written as a skill an agent can follow: designing a board, running the checks, simulating, routing, pricing parts and writing a verification package. The contract lists everything a project receives.

Get started

Free and open source under the MIT license

On Ubuntu 24.04, install.sh installs KiCad 10, ngspice, Java 21 and FreeRouting. Start with one of the example projects, then describe your own board.

$ git clone https://github.com/ThyFriendlyFox/via.git && cd via
$ sudo ./install.sh
$ workcenter doctor
$ workcenter gates examples/fire-alarm-communicator/v0.1

Current status. Via is in early development and has no release yet. The checks, the simulation corners, the frequency plan and workcenter next run in every test of the repository. The Docker image and the cloud setup script are not released yet, and chip design, from RTL to mask layout, is in progress. The status page has the details.

Start your first board

Clone the repository, run the checks on an example project, then describe your own board.