Skip to the content
2 layers100 × 30 mmMt1-pcb, the printed circuit board in 3D

A deterministic, headless KiCad-9 PCB design pipeline — spec → schematic → placement → autorouting → DRC → physical verification → JLCPCB-ready gerbers — packaged as an installable Python toolkit (pcb-designer), with no…

Size
100 × 30 mm
Copper layers
2
Thickness
1.6 mm
Parts
25
Nets
29
Pads
77
Tracks, vias
86, 7
Pours
1
Routed
Yes
KiCad
KiCad 9.0 (file 20241229)
Created
29 Jul 2026
Updated
27 Oct 2026

Overview

Mt1-pcb is an open-source printed circuit board by yupipi93, from the yupipi93/eda-pcb-designer repository on GitHub, published under the MIT licence. It is a 2-layer board of 100 × 30 mm with 25 parts on 29 nets, routed with 86 tracks and 7 vias.

Its parts include 5 ICs, 4 connectors, 2 resistors, 1 capacitor and 1 switch.

README

README.md

eda-pcb-designer

One YAML file in → a fabricable PCB out.

A deterministic, headless KiCad-9 PCB design pipeline — spec → schematic → placement → autorouting → DRC → physical verification → JLCPCB-ready gerbers — packaged as an installable Python toolkit (pcb-designer), with no GUI and no LLM in the loop.

CI Python 3.11+ KiCad 9 License: MIT Live API

Quickstart · Hosted API · The verification gate · For AI agents · Docs

Lemon Piano v0.6.0 — photorealistic overlay render produced by the pipeline

Lemon Piano v0.6.0 — pipeline output. Placement, routing, DRC, render and dimension annotations all generated from one YAML file; the Arduino Nano photo is composited pin-over-pad by the overlay stage. Designed end-to-end through the hosted API.


The pipeline

mermaid
flowchart LR
    Y[/"board.yaml<br/>(single source of truth)"/] --> S
    S["schematic<br/>kicad-sch-api"] --> P["place<br/>real layer flips + DRC"]
    P --> R["route<br/>freerouting + GND zone"]
    R --> D["render<br/>DIM · realistic · overlay"]
    D --> V{"verify<br/>anti-mirror gate"}
    V -->|pass| F["fab<br/>gerbers · BOM · pos · zip"]
    V -->|fail| X["⛔ no fab outputs"]

Every stage is headless, idempotent and scriptable; errors fail fast with actionable messages. The pipeline calls no LLM API — it is a plain, reproducible Python + KiCad + freerouting toolchain — but it was built to be driven safely by an AI coding agent (Claude, GPT, Gemini, …) as well as by humans: the agent edits the YAML and drives the CLI, and it cannot reach fab without passing DRC plus a physical-verification gate. See AGENTS.md for the agent operating protocol.

[!TIP] 🌐 Live hosted API — https://pcb-designer.scv.multitecua.com — no install needed. Upload a .kicad_pcb, get back an autorouted board, a DRC report, raytraced renders or a JLCPCB-ready fab zip:

bash
curl -F pcb=@board.kicad_pcb https://pcb-designer.scv.multitecua.com/route -o routed.kicad_pcb

What it produces

One board, four render styles — all from the same .kicad_pcb, all generated by the render stage:

baredim
bare renderdim render
realisticoverlay
realistic renderoverlay render

Iterations are versioned, so a board's history reads like a filmstrip:

MT1 design evolution — outline, placement, autoroute, fabricated

And it ships real hardware. The MT1 rocket flight computer went through 5 fabricated releases at JLCPCB — designed entirely by this pipeline inside the multi-rocket-avionica project, and vendored here as the worked example (projects/mt1/):

Pipeline renderThe fabricated board
MT1 v0.1.4 photorealistic overlayMT1 fabricated and populated
MT1 v0.1.4 — overlay render with real breakout photosThe same design, fabricated at JLCPCB and populated

Why

Iterating a PCB by hand in a GUI is slow and unreproducible; letting a generative model emit .kicad_pcb S-expressions directly is dangerous. This toolkit takes a third path:

  • One YAML per board captures everything a layout iteration needs (outline, placements, pin counts, net numbers, trace widths) — reviewable in a diff.
  • The engine does the mechanical work deterministically: footprint placement with genuine layer flips, freerouting-based autorouting, GND zone + stitching, DRC, versioned renders, gerber/BOM/pos exports.
  • Idempotency is law: any stage can be re-run and converges to the same board.
  • Verification is part of the pipeline, not an afterthought — see the physical-verification gate below.

Install

bash
git clone https://github.com/yupipi93/eda-pcb-designer
cd eda-pcb-designer
python3 -m venv .venv && source .venv/bin/activate
pip install -e '.[schematic,render,verify,dev]'
pcb-designer --help

System requirements per stage

StageNeeds
validate, gallery, initPython ≥ 3.11 only
schematickicad-sch-api (extra) + KiCad 9 symbol libraries
place, renderKiCad 9 (kicad-cli) + poppler-utils + Pillow
routeKiCad 9 (pcbnew Python module) + Java 21 + freerouting JAR
verifynumpy + Pillow (extras)
export3dKiCad 9 (kicad-cli); component bodies need kicad-packages3d (or --fetch-models)
fabKiCad 9 (kicad-cli)

KiCad 9 install options are documented in docs/SETUP.md (AppImage without root, or ppa:kicad/kicad-9.0-releases). The freerouting JAR is not committed — fetch it once, checksum-verified:

bash
./vendor/fetch-freerouting.sh    # → vendor/freerouting.jar (v2.1.0, 64 MB)

Zero-install alternative — the Docker image ships the whole toolchain (KiCad 9 + Java 21 + freerouting + poppler):

bash
docker build -t eda-pcb-designer .
docker run --rm -w /app eda-pcb-designer pipeline --config examples/mt1.yaml --stages place,render

Quickstart

1 · Run the worked example (MT1 flight computer)

bash
pcb-designer validate --config examples/mt1.yaml
# → OK: MT1 Flight Computer Board (v0.1.4) — 19 placements, 16 through-hole, 100×30 mm board

pcb-designer pipeline --config examples/mt1.yaml --stages place,route,render
# place    → placement + layer flips + GND zone + DRC + renders
# route    → freerouting autoroute + zone fill + stitches (needs Java 21 + JAR)
# render   → PCB-editor-style DIM PNGs                    (needs kicad-cli + pdftocairo)
# export3d → GLB + STEP you can rotate (see "Look at the board in 3D" below)

pcb-designer fab --config examples/mt1.yaml --version v0.1.4
# → projects/mt1/releases/v0.1.4/…zip  (9 gerbers + 2 drill + BOM + pos, JLCPCB-ready)

2 · Start your own board

bash
pcb-designer init my-board --template minimal --vendor MyOrg
# → projects/my-board/{kicad,tools,renders,validation,releases}/
# → projects/my-board/my-board.yaml       (the board's single source of truth)

Then: create the KiCad project in projects/my-board/kicad/, fill in the YAML (schema: docs/CONFIG_REFERENCE.md, placement method: docs/PLACEMENT_GUIDE.md), and add the board's orchestrator scripts under projects/my-board/tools/ — thin wrappers that bind your board's constants and delegate to the pcb_designer package (projects/mt1/tools/ is the reference implementation).

3 · HTTP API (hosted — best for agents in the cloud)

The stateless HTTP API exposes the engine operations over uploaded board files — no project checkout, no local KiCad. No uploaded code is ever executed; the server only performs KiCad file surgery and returns the artefact.

bash
URL=https://pcb-designer.scv.multitecua.com

# Freerouting-as-a-service: autoroute any .kicad_pcb
curl -F pcb=@board.kicad_pcb "$URL/route" -o routed.kicad_pcb

# DRC report / raytraced renders / JLCPCB-ready fab zip
curl -F pcb=@board.kicad_pcb "$URL/drc" | jq .by_severity
curl -F pcb=@board.kicad_pcb "$URL/render?side=both" -o renders.zip
# render styles: bare | realistic | realistic-dim | dim | overlay
# (overlay: client sends module photos: -F modules=@modules.yaml -F images=@nano.png)

# Rotatable 3D model (?format=glb|step|both) — the service ships the 3D model
# library, so component bodies always resolve here:
curl -F pcb=@board.kicad_pcb "$URL/export3d?format=glb" -o board.glb
curl -F pcb=@board.kicad_pcb "$URL/render?side=top&style=realistic" -o top.png
curl -F pcb=@board.kicad_pcb -F sch=@board.kicad_sch "$URL/fab?version=v1.0.0" -o release.zip

# Validate a YAML config / apply placements
curl --data-binary @examples/mt1.yaml "$URL/validate"
curl -F pcb=@board.kicad_pcb -F config=@board.yaml "$URL/place" -o placed.kicad_pcb

GET /openapi.json serves the OpenAPI 3 spec (agents self-configure from it); binary responses become base64 JSON with ?format=json. Run it yourself with make docker-api or deploy with deploy/ (Cloud Run-ready — production deploys are tag-driven: pushing pcb-designer-vX.Y.Z builds and rolls out automatically via the multitec Terraform repo).

The Lemon Piano v0.6.0 board in the hero image was designed end-to-end through exactly these endpoints (/place /route /drc /render /fab) from its product repo, arduino-lemon-piano.

4 · Python API

python
from pcb_designer import load_config
from pcb_designer.placement import place_and_flip

cfg = load_config("examples/mt1.yaml")
text = open(cfg.pcb_path("."), encoding="utf-8").read()
text, updated, missing = place_and_flip(text, {r: p.as_tuple() for r, p in cfg.placements.items()})

Every module is importable on its own: kicad_pcb_io (depth-aware S-expression surgery), placement (genuine layer flips), injection, routing, autorouter, render_dim, render_overlay, export3d, verify, fab.

The physical-verification gate

The verify stage is a hard gate between routing and fabrication: a computer-vision + geometric check that catches mirrored or pin-swapped footprints by comparing the rendered board against the board's ground-truth pinout. It exists because three mirror bugs once reached a real fab order (the full story: projects/mt1/docs/POST-MORTEM-001-mirror-rootcause.md).

Mounting-hole CV checkPins-over-pads check
hole verification diffpin alignment check
Detected hole centres vs ground truth — deviation 0.000 mmEvery module pin proven to sit on its pad

If the layout contradicts the ground truth, verify exits non-zero and fab never runs. The mirrored board that motivated the gate is kept as a regression fixture (tests/fixtures/mt1-pcb-v0.1.1-buggy.kicad_pcb) so the tests prove the gate still catches it.

Look at the board in 3D

export3d runs in the default pipeline and writes two files per version: a .glb (binary glTF — opens in browsers and light viewers) and a .step (FreeCAD / Fusion, enclosure design, real fit checks). Both include tracks, pads, zones, silkscreen and soldermask.

Viewer recommendations (VS Code, web, native) and the missing-bodies gotcha

In VS Code — one click. The repo ships a .vscode/extensions.json recommending thingraph.cad-viewer, so VS Code offers to install it the first time you open the workspace. Then double-click the .glb — or the .step — and drag to rotate. It bundles occt-import-js.wasm (OpenCascade), so its STEP support is a real geometry kernel.

Web, nothing to install. Open https://3dviewer.net and drag the .glb in — it renders in your browser, the file is not uploaded to a server.

Local, lightweight. f3d (sudo apt install f3d) is a fast native viewer. There is also KiCad's own 3D viewer (Alt+3) if you have KiCad installed.

If parts are missing bodies: component bodies are not in the .kicad_pcb — each footprint stores a path into the kicad-packages3d library (several GB), and kicad-cli skips models it cannot resolve silently. export3d detects this and can fetch just the handful of files your board references (~1–2 MB):

bash
pcb-designer export3d --config board.yaml --fetch-models

The hosted API needs none of this — its image ships the model library.

Architecture

text
eda-pcb-designer/
├── src/pcb_designer/        ← the installable package (board-agnostic algorithms)
│   ├── cli.py               ← `pcb-designer` console script
│   ├── config.py            ← ProjectConfig + YAML loader (typed)
│   ├── kicad_pcb_io.py      ← paren-walker primitives for .kicad_pcb surgery
│   ├── placement.py         ← place + genuine F.Cu↔B.Cu flips (mirror-safe)
│   ├── injection.py, routing.py, geometry.py, schematic.py
│   ├── autorouter.py        ← DSN → freerouting → SES → zone fill
│   ├── render_dim.py, export3d.py, fab.py, pipeline.py
│   ├── api.py               ← stateless HTTP API (Flask; `[api]` extra)
│   ├── render_overlay/      ← photorealistic overlay compositor (+ CLI)
│   ├── verify/              ← anti-mirror / anti-pin-swap / mounting-hole gate
│   └── templates/           ← `pcb-designer init` scaffolds
├── deploy/                  ← Cloud Run image (gunicorn) + Cloud Build config
├── docs/                    ← methodology corpus (see below)
├── examples/                ← board configs (mt1.yaml, blank-board)
├── projects/mt1/            ← WORKED EXAMPLE: kicad sources, tools, renders,
│                              validation evidence, fabricated release v0.1.4
├── themes/                  ← KiCad DIM render color themes
├── vendor/                  ← freerouting fetch script (JAR not committed)
└── tests/                   ← unit tests (config, verify, holes, pins, api, 3d)

The package/example split is the core design rule: algorithms live in src/pcb_designer/ and take every parameter explicitly; board specifics live in the board's YAML + projects/<board>/tools/. The pipeline stages subprocess-call the board's orchestrator scripts (resolved via project.tools_dir in the YAML), so adding a second board never touches the package.

Where boards live: a real board belongs to its PRODUCT's repo under pcb/ — config, docs, tools, ground-truth, kicad sources, renders, validation evidence and releases all together — with the board's tools importing this toolkit as a sibling repo (../eda-pcb-designer/src) and running the generative steps in this repo's Docker image. That is how MT1 lives upstream (multi-rocket-avionica/pcb/) and how the Lemon Piano board lives in arduino-lemon-piano/pcb/. The projects/mt1/ copy here is the vendored worked example the docs and tests reference — scaffold with pcb-designer init, then move the project folder into the product repo's pcb/.

For AI agents

This repo is designed to be operated by an AI coding agent under a strict protocol — the agent edits the YAML config and drives the CLI; it never hand-edits S-expressions for routine iterations, and it cannot reach fab without passing DRC + the physical-verification gate.

  • Entry point: AGENTS.md — operating manual (reading order, hard rules, the iteration loop, stop-and-ask criteria).
  • Per-iteration briefing template: docs/AI_AGENT_PROMPT.md.
  • Load-bearing rules: docs/LESSONS_LEARNED.md — 24 rules learned from real incidents; breaking them produces boards that pass DRC yet crash pcbnew or ship mirrored.

Documentation

DocWhat it covers
docs/METHODOLOGY.mdThe canonical 8-step iteration loop
docs/CONFIG_REFERENCE.mdFull YAML schema
docs/PLACEMENT_GUIDE.mdHow to author a placements table
docs/LESSONS_LEARNED.md24 load-bearing rules (⭐ read first)
docs/CONVENTIONS.mdNaming / footprint / DRC conventions
docs/PIPELINE.mdStage I/O map + coordinate frames
docs/MOUNTHOLE_OVERLAY_METHODOLOGY.mdOverlay calibration + mounting-hole verification
docs/SETUP.mdMachine setup (KiCad 9, Java 21, kicad-mcp)
docs/FAB_ORDER_GUIDE.mdJLCPCB quote-to-order walkthrough (real MT1 order)

Parts of the methodology corpus are written in Spanish (the project's working language); code, identifiers and the agent-facing entry points are in English.

Development

bash
make dev    # editable install with all extras
make lint   # ruff check src tests
make test   # pytest
make docker # build the pipeline-in-a-box image

CI runs lint + tests on Python 3.11/3.12, validates the example configs, round-trips a pcb-designer init scaffold, builds the Docker image and runs the MT1 place,render stages inside it with a real KiCad 9, and smoke-tests every HTTP API endpoint against the deploy image.

Related projects

repowhat
eda-wirewrightThe sibling tool: declarative wiring-diagram engine with auto-router + DRC, same engine + hosted-API + agent-protocol pattern
multi-rocket-avionicaWhere this toolkit was born — the MT1 flight computer's product repo
arduino-lemon-pianoSecond production board (pcb/), designed end-to-end through the hosted API

License

MIT — see LICENSE.

Parts

25
QtyValueFootprintReferences
6MT_MountHole_M2MH1, MH2, MH3, MH4, MH5, MH6
6MountingHoleMountingHole:MountingHole_2.5mm_Pad_ViaH1, H2, H3, H4, H5, H6
2Conn_01x02PinHeader_1x02_P2.54mm_VerticalJ1, J5
2R_0805_2012Metric_Pad1.20x1.40mm_HandSolderR_0805_2012Metric_Pad1.20x1.40mm_HandSolderR3, R4
1BMP585_socketConnector_PinSocket_2.54mm:PinSocket_1x08_P2.54mm_VerticalU3
1C_0805_2012Metric_Pad1.18x1.45mm_HandSolderC_0805_2012Metric_Pad1.18x1.45mm_HandSolderC8
1LSM6DSO32_socketConnector_PinSocket_2.54mm:PinSocket_1x09_P2.54mm_VerticalU2
1PinHeader_1x02_P2.54mm_VerticalPinHeader_1x02_P2.54mm_VerticalJ2
1SW_Slide_SPDT_Straight_CK_OS102011MS2QSW_Slide_SPDT_Straight_CK_OS102011MS2QSW1
1XIAO_left_socketConnector_PinSocket_2.54mm:PinSocket_1x07_P2.54mm_VerticalU1
1XIAO_right_socketConnector_PinSocket_2.54mm:PinSocket_1x07_P2.54mm_VerticalU5
1microSD_socketConnector_PinSocket_2.54mm:PinSocket_1x09_P2.54mm_VerticalU4
1proto_headerConnector_PinHeader_2.54mm:PinHeader_1x08_P2.54mm_VerticalJ4

Similar boards

  • 2 layers159.5 × 30 mmType f, the printed circuit board in 3D

    Type f

    google/mozc-devices

    Circuit diagrams and firmware source code for Gboard DIY keyboards

    25 parts3kApache-2.0
  • 2 layers113.5 × 95.1 mmSweep high, the printed circuit board in 3D

    Sweep high

    davidphilipbarr/Sweep

    Sweep - a small promicro based keyboard inspired by the Ferris.

    25 parts2.1k
  • 2 layers58.4 × 114.3 mmPicoPedal, the printed circuit board in 3D

    PicoPedal

    hackclub/OnBoard

    💡 Join 1,000 teenagers and make your first PCB with a $100 grant!

    25 parts915
  • 2 layers54 × 15 mmXyp gpib, the printed circuit board in 3D

    Xyp gpib

    xyphro/UsbGpib

    Versatile, cheap and portable USB to GPIB converter (USBTMC class based)

    25 parts690MIT
  • 2 layers50 × 76 mmVoron 0, the printed circuit board in 3D

    Voron 0

    dennisss/dacha

    Monorepo for awesome tools/projects/libraries

    25 parts397Apache-2.0
  • 2 layers237.5 × 102.9 mmStorage, the printed circuit board in 3D

    Storage

    jes/scamp-cpu

    A homebrew 16-bit CPU with a homebrew Unix-like-ish operating system.

    25 parts301Unlicense
  • 2 layers43.3 × 21 mmNanoS3 Carrier, the printed circuit board in 3D

    NanoS3 Carrier

    UnexpectedMaker/esp32s3

    Assorted files for my ESP32-S3 development boards

    25 parts296

Questions

How big is the Mt1-pcb PCB?

It measures 100 × 30 mm and has 2 copper layers, 1.6 mm thick.

What parts does the Mt1-pcb use?

25 parts. The full list of its parts is on this page, with links to each part's symbol and footprint where PCBKit's library has them.

Where can I download the Mt1-pcb KiCad files?

From the yupipi93/eda-pcb-designer repository on GitHub, at the commit this page was made from: the board is projects/mt1/kicad/mt1-pcb.kicad_pcb and its schematic projects/mt1/kicad/mt1-pcb.kicad_sch. PCBKit opens the board in the browser, with nothing to install.

Can I use the Mt1-pcb design in my own project?

Its repository publishes it under the MIT licence: you may reuse it on that licence's terms (keep the author's notice, and for a copyleft licence share your changes alike).