Skip to the content
2 layers33 × 85 mmLab3, 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
33 × 85 mm
Copper layers
2
Thickness
1.6 mm
Parts
19
Nets
15
Pads
104
Tracks, vias
192, 0
Routed
Yes
KiCad
KiCad 10.0 (file 20260206)
Created
23 Jul 2026
Updated
18 Sep 2026

Overview

Lab3 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 33 × 85 mm with 19 parts on 15 nets, routed with 192 tracks and 0 vias.

It is built around the 74AHC1G04SE, 74AHC1G08GW and 74AHC1G32GW. Its parts include 6 switches, 3 capacitors, 3 resistors, 3 ICs and 3 diodes.

Main components

3

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

19
QtyValueFootprintReferences
5SW_SPDTButton_Switch_THT:SW_E-Switch_EG1224_SPDT_AngledSW2, SW3, SW4, SW5, SW6
3100nfCapacitor_THT:C_Disc_D5.0mm_W2.5mm_P5.00mmC1, C2, C3
3330Resistor_THT:R_Axial_DIN0207_L6.3mm_D2.5mm_P7.62mm_HorizontalR1, R2, R3
3LEDLED_THT:LED_D5.0mmD1, D2, D3
174AHC1G04Package_DIP:DIP-14_W7.62mmU1
174AHC1G08Package_DIP:DIP-14_W7.62mmU2
174AHC1G32Package_DIP:DIP-14_W7.62mmU3
1Barrel_JackConnector_BarrelJack:BarrelJack_HorizontalJ1
1SW_SPSTButton_Switch_THT:SW_CK_JS202011AQN_DPDT_AngledSW1

More from moi-script/pcb_ui

2
  • 2 layers113.5 × 41.5 mmLabExam, the printed circuit board in 3D

    LabExam

    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…

    28 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
  • 6 layers100 × 220 mmSrvant mk2, the printed circuit board in 3D

    Srvant mk2

    lwolf/srvant-board

    [WIP] Carrier board for the CM4 with BMC

    276 parts2
  • 4 layers90 × 88 mmControl, the printed circuit board in 3D

    Control

    AJain9199/AOS16

    Table of Contents About The Project Pictures Technical Details Directory Structure To-Do Acknowledgments

    129 parts1
  • 2 layers100 × 100 mmAS NES Mapper474-SM1, the printed circuit board in 3D

    AS NES Mapper474-SM1

    Akerasoft/AS-NROM-368

    Mapper 474 - Submapper 1 - NROM-368

    17 parts
  • 4 layers281 × 142 mmTuring Machine, the printed circuit board in 3D

    Turing Machine

    MelonMars/TuringPCB

    A Turing Machine that does not use any premade microchips, but rather is built exclusively on simple components.

    255 parts
  • 2 layers90.2 × 95.9 mmBatt Boardv1, the printed circuit board in 3D

    Batt Boardv1

    UChicago-Space-Program/pulse-hardware

    This is the central repository for documents related to PULSE-A hardware development.

    60 parts1

Questions

How big is the Lab3 PCB?

It measures 33 × 85 mm and has 2 copper layers, 1.6 mm thick.

What parts does the Lab3 use?

19 parts, built around the 74AHC1G04SE, 74AHC1G08GW and 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 Lab3 KiCad files?

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

Can I use the Lab3 design in my own project?

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