Skip to the content
PCBKitNew board
2 layers113.5 × 41.5 mmLabExam, the printed circuit board in 3D

A simple one-layer PCB "drawer": read a KiCad board, extract the copper traces, and turn them into travel-optimized G-code you can plot on a pen-plotter / small CNC driven by a microcontroller (GRBL — an Arduino running…

Size
113.5 × 41.5 mm
Copper layers
2
Thickness
1.6 mm
Parts
28
Nets
33
Pads
201
Tracks, vias
352, 7
Routed
Yes
KiCad
KiCad 10.0 (file 20260206)
Created
23 Jul 2026
Updated
18 Sep 2026

Overview

LabExam is an open-source printed circuit board by moi-script, from the moi-script/pcb_ui repository on GitHub. It is a 2-layer board of 113.5 × 41.5 mm with 28 parts on 33 nets, routed with 352 tracks and 7 vias.

It is built around the 74AHC1G32GW. Its parts include 10 ICs, 8 capacitors, 5 switches, 2 resistors and 2 diodes.

Main components

1

README

serverside/README.md

serverside — the TraceWorks backend

A simple one-layer PCB "drawer": read a KiCad board, extract the copper traces, and turn them into travel-optimized G-code you can plot on a pen-plotter / small CNC driven by a microcontroller (GRBL — an Arduino running grbl_servo_z).

Aimed at hobby / student mini projects, not professional copper milling.

Pipeline

text
labExam.kicad_pcb
  → pcb_read.py          parse (custom s-expression parser; supports KiCad 10)
  → pcb_draw.py          board preview by copper layer  (labExam_wiring.png)
  → pcb_gcode.py         travel-optimized G-code         (labExam.gcode)
  → pcb_gcode_preview.py verify toolpath, no hardware     (labExam_toolpath.png)
  → pcb_send.py          stream to GRBL over USB serial (--check to validate)
  → Arduino running GRBL 1.1, over USB

pcb_send.py is the CLI streamer and is not what the web app uses. The API owns the serial port itself:

text
grbl/        the GRBL 1.1 stack: protocol codec, port enumeration, the
             flow-controlled streamer thread, machine state, travel limits,
             and a simulator good enough to develop against
machine.py   the one process-wide Session that owns the port
job.py       streams one board's G-code, with progress, pause, stop

Run

bash
python main.py                # run the whole pipeline, step by step
python main.py --skip-preview # ... without the matplotlib image steps

Each stage also runs on its own — see DOCS.md for full documentation, status, and roadmap, and HARDWARE.md for the plotter build (parts list, flashing steps, starter config).

Web API + database (server side of the UI)

server.py is a FastAPI app that wraps this pipeline for the web UI in ../userpage, and drives the machine. It parses uploaded boards, generates G-code, and stores accounts and routed boards in MongoDB (mongodb://localhost:27017, database traceworks).

bash
pip install -r requirements.txt
uvicorn server:app --reload --port 8000                  # needs a local MongoDB

TRACEWORKS_SIM=1 uvicorn server:app --reload --port 8000  # ...and no hardware

Board and account endpoints: POST /route (upload a .kicad_pcb → parsed + routed board), POST /trace (an image → a pen path), /auth/signup · /auth/login, /boards/{email}, /board/{id}.

Machine endpoints — the backend runs on the same PC as the browser, so it, not the tab, owns the COM port:

EndpointWhat it does
GET /machine/portsserial ports with chip names; suggested only when exactly one candidate exists
POST /machine/connect{port, baud, email?} → the firmware banner
POST /machine/disconnect
GET /machine/statethe machine snapshot: state, mpos, wpos, job progress
GET /machine/last?email= → the last port and baud used, or null
WS /machine/wsthe same snapshot pushed at up to 10 Hz, plus console lines
POST /machine/jog{axis, distance, feed}; refused with the axis named if it would leave the envelope
POST /machine/jog/cancel, /home, /unlock
POST /machine/zero{axes} — set work zero on X, Y, Z or any combination
POST /machine/command{line} — one raw line; realtime characters are routed as realtime
POST /machine/estoprealtime soft reset; returns instantly, never waits on the link
POST /machine/run{board_id, check} — stream a stored board; check brackets it with $C
POST /machine/pause, /resume, /stop

See server.py for the full list and db.py for the Mongo connection. The reusable entry point is pcb_read.extract_wiring(text).

Requirements

Python 3 and matplotlib for the CLI pipeline. The web API also needs fastapi, uvicorn, python-multipart, and pymongo (all in requirements.txt), plus a running MongoDB. (kiutils is intentionally not used — it does not support the KiCad 10 file format.)

See ../RUNNING.md for running this together with the frontend in ../userpage.

Parts

28
QtyValueFootprintReferences
7C_PolarizedCapacitor_THT:C_Disc_D5.0mm_W2.5mm_P5.00mmC9, C11, C12, C13, C14, C15, C16
2330Resistor_THT:R_Axial_DIN0207_L6.3mm_D2.5mm_P7.62mm_HorizontalR1, R2
2LEDLED_THT:LED_D5.0mmD1, D2
174AHC1G04_NOT_SOLOPackage_DIP:DIP-14_W7.62mmU10
174AHC1G32Package_DIP:DIP-14_W7.62mmU8
174AUC2G04_NOT_DUALPackage_DIP:DIP-14_W7.62mmU9
174AUC2G08_AND_4Package_DIP:DIP-14_W7.62mmU1
174AUC2G32_OR_1Package_DIP:DIP-14_W7.62mmU5
174AUC2G32_OR_2Package_DIP:DIP-14_W7.62mmU6
174AUC2G32_OR_3Package_DIP:DIP-14_W7.62mmU7
174LS08_AND_1Package_DIP:DIP-14_W7.62mmU2
174LS08_AND_2Package_DIP:DIP-14_W7.62mmU3
174LS08_AND_3Package_DIP:DIP-14_W7.62mmU4
1Barrel_JackConnector_BarrelJack:BarrelJack_HorizontalJ1
1C_Polarized NOTCapacitor_THT:C_Disc_D5.0mm_W2.5mm_P5.00mmC10
1SW_SPDT_WButton_Switch_THT:SW_E-Switch_EG1224_SPDT_AngledSW5
1SW_SPDT_XButton_Switch_THT:SW_E-Switch_EG1224_SPDT_AngledSW4
1SW_SPDT_YButton_Switch_THT:SW_E-Switch_EG1224_SPDT_AngledSW3
1SW_SPDT_ZButton_Switch_THT:SW_E-Switch_EG1224_SPDT_AngledSW2
1SW_SPSTButton_Switch_THT:SW_CK_JS202011AQN_DPDT_AngledSW1

Questions

How big is the LabExam PCB?

It measures 113.5 × 41.5 mm and has 2 copper layers, 1.6 mm thick.

What parts does the LabExam use?

28 parts, built around the 74AHC1G32GW. 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 LabExam KiCad files?

From the moi-script/pcb_ui repository on GitHub, at the commit this page was made from: the board is serverside/labExam.kicad_pcb. PCBKit opens the board in the browser, with nothing to install.

Can I use the LabExam design in my own project?

Its repository states no licence, so its author keeps all rights: ask moi-script before reusing the design.

More from moi-script/pcb_ui

2
  • 2 layers33 × 85 mmLab3, the printed circuit board in 3D

    Lab3

    moi-script/pcb_ui

    A simple one-layer PCB "drawer": read a KiCad board, extract the copper traces, and turn them into travel-optimized G-code you can plot on a pen-plotter / small CNC driven by a microcontroller (GRBL — an Arduino running…

    19 parts
  • 2 layers36 × 37 mmNewProject, the printed circuit board in 3D

    NewProject

    moi-script/pcb_ui

    A simple one-layer PCB "drawer": read a KiCad board, extract the copper traces, and turn them into travel-optimized G-code you can plot on a pen-plotter / small CNC driven by a microcontroller (GRBL — an Arduino running…

    11 parts

Similar boards

  • 2 layersDiffuino selector, the printed circuit board in 3D

    Diffuino selector

    elixpo/elixpo_chapter

    Elixpo’s canonical collection for public build-and-release Chapters, bringing open-source software, reproducible research, hardware, and community contributions into one attributable record.

    46 parts85
  • 2 layers31.4 × 20.6 mmWindow sensor V5, the printed circuit board in 3D

    Window sensor V5

    gadjet/Window-Door-sensor-Version-5

    Version 5 of the Window/Door sensor project this time with ultra low current consumption

    32 parts70GPL-2.0
  • 2 layers126.8 × 54.7 mmSnes controller pcb, the printed circuit board in 3D

    Snes controller pcb

    misteraddons/Reflex-CTRL

    Update Firmware: Select + Start + Up + Plug in USB | Mode | Button Combo | | --- | --- | | Nintendo Switch Mode | B + Plug in USB | | Xinput | A + Plug in USB |

    67 parts19
  • 2 layers30 × 30.5 mmSDGeckoLED, the printed circuit board in 3D

    SDGeckoLED

    silverstee1/SDGecko-2.0

    MicroSD Card Adapter For GameCube's Front Memcard Slots v2.0

    8 parts17Unlicense
  • 2 layers36.5 × 46.3 mmGamecube SD2SP2PRO, the printed circuit board in 3D

    Gamecube SD2SP2PRO

    silverstee1/SD2SP2-Pro

    Micro SD Card Adapter v1 and v2.0 for Gamecube's Serial Port 2

    4 parts16MIT
  • 2 layers81.7 × 372 mmUEggMG v3b, the printed circuit board in 3D

    UEggMG v3b

    ultimaterobotics/uEMG

    uEMG project

    80 parts14MIT
  • 4 layers40 × 19 mmRom2k40, the printed circuit board in 3D

    Rom2k40

    mengstr/Rom2k40

    EPROM emulator based on RP2040

    28 parts12
  • 2 layers47 × 28 mmUMyo v3 1, the printed circuit board in 3D

    UMyo v3 1

    ultimaterobotics/uMyo_v3_1_pcb

    PCB files for uMyo v3.1

    53 parts12CERN-OHL-P-2.0