Skip to the content
2 layers55 × 40 mmCoupon, the printed circuit board in 3D

Claude-drivable 2.5D heightmap CAM for the Makera Carvera Air — verify-before-metal, incident-traced safety rules, live 3D viewer

Size
55 × 40 mm
Copper layers
2
Thickness
1.6 mm
Parts
52
Nets
24
Pads
108
Tracks, vias
175, 0
Pours
6
Routed
Yes
KiCad
KiCad 10.0 (file 20260206)
Created
27 Jul 2026
Updated
6 Aug 2026

Overview

Coupon is an open-source printed circuit board by billschaller, from the billschaller/ClauderaCAM repository on GitHub, published under the MIT licence. It is a 2-layer board of 55 × 40 mm with 52 parts on 24 nets, routed with 175 tracks and 0 vias.

It is built around the LM358, NE555P and S8050, with the SS14 among its other parts. Its parts include 11 resistors, 8 capacitors, 5 diodes, 2 ICs and 2 switches.

Main components

4

README

README.md

ClauderaCAM

ci

Claude-drivable 2.5D heightmap CAM for the Makera Carvera Air. STL relief → rough / semi / finish / cutout → physical stock-simulation verification → live 3D viewer → .nc. Built from the exact code that cut the brass Mango coin, then hardened by a 42-agent adversarial review whose 35 confirmed findings are each either fixed or a named check (see DESIGN.md "2026-07-28: adversarial review & hardening"). A second lane mills PCBs from KiCad gerbers through the same gate (see The PCB lane below).

Setup

sh
python3 -m venv .venv
.venv/bin/python -m pip install -e .          # pure-python (works everywhere)
.venv/bin/python -m pip install ./kernel      # optional Rust kernel (~10-50x
                                              # faster verify; needs cargo)

The two kernels are parity-locked (tests/kernel_parity.py): bit-exact stock, epsilon-exact measurements. The Python one is the semantic reference.

MCP (primary interface)

.mcp.json in this repo registers the server for Claude Code sessions started here. From elsewhere:

sh
claude mcp add --scope user clauderacam -- \
  <repo>/.venv/bin/python -m clauderacam.mcp_server

Tools: load_job, generate, verify, preview, view (opens the job as a session in the live viewer, starting a server only if none is running), sessions (lists open sessions). There is deliberately no upload tool — .nc files reach the machine only by hand.

The viewer is a stage-aware, multi-session inspection app. One server holds many sessions — one per open job file — and every process joins it: the MCP, the CLI and any number of browser tabs land on the same server via a discovery file, so a change Claude pushes appears in the watching browser within a second. Sessions are keyed by job path, so opening a file that is already open joins its session (that's the collaboration model). In the browser: a session list with verdict badges and a job-file picker (opening verifies in the background; the browser never generates or edits — job changes are Claude's); per session, the program's logical operations (recovered from the .nc bytes themselves) as a selectable list with per-stage time estimates — selecting one shows the simulated stock as it will exist after that operation with the material that stage removes highlighted — plus a stage-detail card (removed volume, tool contact, windowed chip load and cutting power, each drawn as a utilization bar against its limit), the tool library with the active stage's tool marked, and the full check list. Claude runs the job; the viewer exists so a human — including a CAM expert — can audit it. Each session offers a download of its program — serving the exact bytes that were verified (stored at push time; a later regenerate can never hand out unverified toolpaths under a displayed PASS), with an explicit are-you-sure on anything not cleared for metal. Downloading to a human hand is the Article VII workflow: the file still reaches the machine only by that hand.

CLI

sh
.venv/bin/clauderacam all jobs/mango.toml       # generate + verify + preview
.venv/bin/clauderacam view jobs/mango.toml      # open in the live viewer at
                                                # :8323 (joins a running
                                                # server, else serves)
.venv/bin/clauderacam serve                     # empty viewer server; open
                                                # job files from the browser

The rule

Nothing goes to the machine without verify returning PASS. The verifier strictly parses the program (anything it cannot model — unknown tools, arcs, modal G-less lines — is fatal, never skipped), carves every move into virtual stock, and checks:

  • geometry (simulation facts): rapids (lateral and descending), true per-move tool contact for every tool (footprint max vs move-start stock, limits calibrated to metal evidence), shank/holder clearance against standing stock, depth vs stock bottom, gouging below the target surface, surface completeness, cutout sever-through, the fixture keep-out zone, and the spindle-state dialect (M5 before M6, dwell after M3)
  • cutting physics (model verdicts, provenance-annotated in physics.py): per-material sustained chip load and spindle power over 0.25s windows, rubbing (starvation feed), plunge rate, machine feed caps, a sustained- power heat proxy, and an enclosed-chip gumming proxy — materials carry specific cutting energy, chip-load floors and evacuation limits; tools carry flutes, flute length and shank geometry; the machine model is the Carvera Air's 200W / 13k RPM spindle

tests/negative_suite.py proves the gate can fail: 24 distilled hazards — slams, stalls, rubbing, gumming, shank crashes, rapid plunges, arcs in disguise — that must each be caught. tests/stage_model.py proves the per-stage model tells the truth: stage snapshots partition the carve bit-exactly and per-stage stats are measured, not inferred.

Golden test

sh
.venv/bin/python tests/golden_mango.py

Regenerates the mango job (assets/mango-coin-d52.stl — yes, that's a real cat) and asserts byte-identical toolpaths against the G-code in tests/golden/ that cut the physical coin, then verifies the assembled program. Run it after touching anything in ops/, engine.py, or heightmap.py.

Reference suite

sh
.venv/bin/python tests/reference_suite.py

assets/generate_references.py synthesizes four deterministic shapes, each paired with a job in jobs/ that stresses a different hazard:

jobexercises
terraceslayered-rough terracing on 0.22mm steps, simplify on flats, cutout with tabs
dome2mm flat rough (smaller tool = relaxed slope budget), two-ball finish chain, no cutout
ripple1mm ball finishing directly after rough — legal only because every slope is inside the engagement budget
pocketfieldgraduated feature access by tool BODY (Ø7 down to 1.3mm slots) — honestly annotated: the shallow features are bottomed by the 2mm ball's contact circle; true tool exclusion awaits depth-stepped clearing

Together with mango these cover the supported tool set: flat 3.175, flat 2.0, ball 2.0, ball 1.0, plus twist drills for registration holes — the geometries validated by cut metal. V-bits and tapered ball noses need a conical offset model plus a real-world tip engagement limit, so they are roadmap, not shipped guesses.

Two-sided (pin-and-flip) jobs

One TOML with [twosided], [pins] and per-side op lists describes a coin machined on BOTH faces: side 1 cuts the front art plus a minimal moat, then spot-faces and peck-drills registration holes through the stock into the spoilboard — same setup, so the holes are coaxial by construction. Flip the blank onto dowel pins (layout must be symmetric under the configured flip axis — enforced), and side 2 cuts the back art and the tabbed cutout. Two .nc programs come out; each verifies through the same gate, and the back side is additionally checked against the carried, flipped front stock: punch-through into the front art, sever against the actual material bottom, a continuous tab bridge from coin to skeleton, and pin keep-out. The cutout's tab_top is derived from the carried front floor to hit a target tab_bridge thickness (hand-written values are refused — the first cut coin's hand-picked tab_top made 0.24mm tabs that snapped too thin). jobs/twoside-ref.toml + tests/twosided_suite.py are the executable spec, negatives included.

The PCB lane

Gerbers + Excellon in, verified Carvera programs out: isolation-milled PCBs through the same gate. A [pcb] TOML names a KiCad export directory and parameterizes the operator's six-phase chain — cut traces (0.2mm vee, a multi-pass ladder so gaps too wide for one pass and too narrow for the clearing tool still come out copper-free) → clear copper → solder mask (operator: squeegee + UV cure) → silkscreen (455nm laser onto the cured mask) → scrub mask off pads (spring tool) → drills + edge cut. FlatCAM (a pinned headless fork) runs as the geometry engine only: its per-phase output is strictly parsed and re-emitted through emit.py, so every shipped byte obeys the house dialect (the laser program has its own — one M321, then a mandatory G0 Z0 defocus, dose-ceilinged M3 S). Verification never trusts the generator: gerbv rasterizes the same gerbers through an unrelated parser lineage, and the gate measures the assembled programs against those maps — iso containment and coverage, a residual-copper law on the simulated carve (no bridging sliver survives between what isolation reaches and what clearing owns — a loupe-found incident), clearing margins, scrub laps inside pad copper, pad scrubbability, thermal-relief spoke delivery, silk clearance and stroke metrics, the exact Excellon hole schedule, cutout ride + tab census, and true sheet stock simulation for the milling programs (guides/pcb-dfm-notes.md translates the big fab houses' hand-solder DFM rules into this milled lane's numbers). Double-sided boards compose [pcb] + [twosided]: per-side phase tables, both machine frames derived from the one Edge.Cuts, registration pins under the coin lane's pins law, both-side annular-ring and flip-concentricity checks for hand-soldered wire vias, and a side-2 scrub generator that laps drilled pads annularly instead of driving the spring tip across open holes. Board contracts — plus each board's assembly map, companion sheet and machine-side tool pull-list — live in boards/, golden assets in tests/golden_pcb/; the viewer opens a [pcb] job as one session per program, with 2D overlays for the non-carving stages and the operator's run-sheet card. FlatCAM and gerbv are external optional binaries (like the Rust kernel): the blessed goldens verify without them and the suites skip loudly.

The tool crib

jobs/inventory.toml is the machine's physical tool inventory. A job may only use tools that match an entry — type, diameter, shank, flutes, reach, quantity on hand — and refuses to load otherwise (Article XI). Geometry in the crib is measured or catalog-sourced, never guessed; a tool with an unknown dimension is absent, and the resulting refusal is the feature.

Project law

CLAUDE.md is the constitution: the verification gate, the golden-test contract, and the incident-traced safety rules. Read it before contributing — human or model.

License & credits

MIT (see LICENSE). Vendors three.js r160 (MIT) for the viewer. Named for Claude + Carvera: designed and written by Claude Code working alongside a human machinist, and proven by cutting real metal before it was ever a package.

Parts

52
QtyValueFootprintReferences
6TestPointTestPoint:TestPoint_Pad_D2.0mmTP1, TP2, TP3, TP4, TP5, TP6
4coupon:MountingHole_3.4mm_NPTHH1, H2, H3, H4
4100nFCapacitor_SMD:C_0805_2012Metric_Pad1.18x1.45mm_HandSolderC3, C6, C7, C8
4wire 12.7mmcoupon:JumperWire_P12.7mmJP2, JP5, JP6, JP7
210kResistor_SMD:R_0603_1608Metric_Pad0.98x0.95mm_HandSolderR2, R9
210uFCapacitor_SMD:C_0805_2012Metric_Pad1.18x1.45mm_HandSolderC1, C4
2330RResistor_SMD:R_1206_3216Metric_Pad1.30x1.75mm_HandSolderR7, R11
2LED_5MMLED_THT:LED_D5.0mmLED2, LED3
2wire 15.24mmcoupon:JumperWire_P15.24mmJP3, JP4
1+5VTestPoint:TestPoint_THTPad_D4.0mm_Drill2.0mmPAD1
1100kResistor_SMD:R_0603_1608Metric_Pad0.98x0.95mm_HandSolderR8
110kResistor_SMD:R_0805_2012Metric_Pad1.20x1.40mm_HandSolderR10
110nFCapacitor_SMD:C_1206_3216Metric_Pad1.33x1.80mm_HandSolderC5
110uHInductor_SMD:L_0805_2012Metric_Pad1.05x1.20mm_HandSolderL1
11kResistor_SMD:R_0603_1608Metric_Pad0.98x0.95mm_HandSolderR5
11kResistor_SMD:R_1206_3216Metric_Pad1.30x1.75mm_HandSolderR1
11uFCapacitor_SMD:C_0603_1608Metric_Pad1.08x0.95mm_HandSolderC2
1330RResistor_SMD:R_0805_2012Metric_Pad1.20x1.40mm_HandSolderR6
133kResistor_SMD:R_0805_2012Metric_Pad1.20x1.40mm_HandSolderR3
16.8kResistor_SMD:R_1206_3216Metric_Pad1.30x1.75mm_HandSolderR4
1GNDTestPoint:TestPoint_THTPad_D4.0mm_Drill2.0mmPAD2
1LED_GRNLED_SMD:LED_0805_2012Metric_Pad1.15x1.40mm_HandSolderLED4
1LED_REDLED_SMD:LED_0805_2012Metric_Pad1.15x1.40mm_HandSolderLED1
1LM358Package_SO:SOIC-8_3.9x4.9mm_P1.27mmU2
1NE555PPackage_DIP:DIP-8_W7.62mm_SocketU1
1S8050Package_TO_SOT_SMD:SOT-23_HandsolderingQ1
1SS14Diode_SMD:D_SMA_HandsolderingD1
1SW_PushButton_Switch_THT:SW_PUSH_6mmS2
1SW_SPDTcoupon:SW_Slide_SS12D00_HandMillSW1
1couponR_1206_3216Metric_Pad1.30x1.75mm_HandSolderCP1
1couponR_0603_1608Metric_Pad0.98x0.95mm_HandSolderCP3
1couponR_0805_2012Metric_Pad1.20x1.40mm_HandSolderCP2
1wire 10.16mmcoupon:JumperWire_P10.16mmJP1

Similar boards

  • 2 layers250 × 225 mm8BitComputer, the printed circuit board in 3D

    8BitComputer

    MatanBright/8BitComputer

    This is a simple programmable 8-bit computer that is built from scratch.

    333 parts2
  • 2 layers93.7 × 103.5 mmLed sign, the printed circuit board in 3D

    Led sign

    ambadran/Free-Lance-Projects

    repo for holding my free lance work

    89 parts
  • 2 layers90.7 × 55.4 mmH bridge V3, the printed circuit board in 3D

    H bridge V3

    ambadran/Revolute_Joint

    Optimal Cheap Robotic Actuator allowing high Torque and moderate Speed. Allow PRECISE Absolute, Speed and Torque Control. Using 3D-printed Cycloidal Drive, Custom PCB and LQR Control Algorithm.

    57 parts
  • 2 layers84.3 × 64.5 mmTapeshnik proto, the printed circuit board in 3D

    Tapeshnik proto

    svofski/tapeshnik

    compact cassette data drive

    138 parts14
  • 2 layers99.5 × 99.5 mmCarico elettronico, the printed circuit board in 3D

    Carico elettronico

    dario0603/electronic_load

    Un progetto open-source per la progettazione e simulazione di un Carico Elettronico Bipolare (Electronic Load), ideato per il test e la caratterizzazione di alimentatori, batterie e circuiti di potenza.

    92 parts
  • 2 layers120 × 66.5 mmMinimum viable badge, the printed circuit board in 3D

    Minimum viable badge

    CCHS-Melbourne/Minimum-viable-badge

    A minimum viable badge design.

    76 parts2
  • 2 layers40.5 × 36.6 mmXDuinoRails Hermes M, the printed circuit board in 3D

    XDuinoRails Hermes M

    xDuinoRails/xDuinoRails_Hermes-M

    Your DCC/Railcom signals and a +5V power source for your microcontroller on a breadboard

    27 parts2CERN-OHL-W-2.0
  • 4 layers83 × 67.5 mmMarineBoard, the printed circuit board in 3D

    MarineBoard

    Cadburies/SisuAssistant

    Sailing yacht Sisu: Home Assistant + ESPHome Marine Board (alternator regulation, tanks) + MQTT kernel, Signal K/Grafana/InfluxDB on a NAS, and Sisu Nav chart & weather-routing cockpit.

    162 parts1Apache-2.0

Questions

How big is the Coupon PCB?

It measures 55 × 40 mm and has 2 copper layers, 1.6 mm thick.

What parts does the Coupon use?

52 parts, built around the LM358, NE555P, S8050 and SS14. 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 Coupon KiCad files?

From the billschaller/ClauderaCAM repository on GitHub, at the commit this page was made from: the board is boards/coupon/coupon.kicad_pcb and its schematic boards/coupon/coupon.kicad_sch. PCBKit opens the board in the browser, with nothing to install.

Can I use the Coupon 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).