Skip to the content
2 layers33.6 × 28.2 mmOparroy node, the printed circuit board in 3D

WS2812 inspired versatile serial protocol and hardware

Size
33.6 × 28.2 mm
Copper layers
2
Thickness
0.8 mm
Parts
37
Nets
26
Pads
114
Tracks, vias
308, 47
Pours
1
Routed
Yes
KiCad
KiCad 10.0 (file 20260206)
Created
26 Sep 2026
Updated
26 Oct 2026

Overview

Oparroy node is an open-source printed circuit board by kristofferkoch, from the kristofferkoch/oparroy repository on GitHub, published under the MIT licence. It is a 2-layer board of 33.6 × 28.2 mm with 37 parts on 26 nets, routed with 308 tracks and 47 vias.

It is built around the CH32V003F4P6, SN74LVC1G3157DBV and UDD32C03L01, with the XL-3216SYGC-FB, BAT54S and XL-3216SURC-FB among its other parts. Its parts include 13 resistors, 9 diodes, 4 capacitors, 3 ICs and 2 connectors. It belongs with the lEDs and displays boards and the RISC-V boards of this library.

Main components

7

README

README.md

oparroy

A read+write, fault-tolerant ring communication protocol for extremely cheap microcontroller nodes, inspired by the WS2812 single-wire protocol.

Unlike WS2812's write-only daisy chain, oparroy closes the chain into a ring so nodes can both send and receive. The physical layer is designed so that no single point of failure — a broken connector (permanent or intermittent), or a dead/hung microcontroller — partitions the ring:

  • The ring is dual: every segment carries two counter-rotating data rings with symmetric rebroadcast, so any single fault leaves every node reachable (DESIGN.md §3).
  • Bypass wiring routes around failed interconnects.
  • Each node has a semi-passive hardware watchdog that bypasses the node's RX→TX path unless the MCU actively keeps the bypass disabled.
  • Status LEDs make faults visually locatable to node and segment without instruments.

Extremely low node cost is the central design principle (sub-3-NOK MCU class); every other driver — resilience, repairability, testability — is achieved subject to it. Supervisor and test infrastructure, by contrast, may cost freely.

Hardware direction

  • Node MCU: CH32V003F4P6 — 48 MHz RV32EC in TSSOP-20, on-chip comparator routable to timer capture, ~$0.14 @4k. Clocked from the factory-trimmed internal HSI — no crystal; the ratio-metric PHY makes absolute clock accuracy irrelevant. Rationale: docs/mcu-research.md; extracted part facts: datasheets/CH32V003/notes/.
  • Supervisor: RP2040 — its PIO is the re-timing PHY engine and golden-reference transceiver; on the test board its PIO also runs as a logic analyzer on the instrumented boundary node (DESIGN.md §6).
  • PHY: WS2812-compatible duty-coded PWM cells with ratio-metric decode at an 800 kbit/s anchor, comparator RX + DMA, per-bit cut-through re-timing, positional addressing, and the frame gap as a ring-wide vsync latch (DESIGN.md §2; analysis: docs/phy-analysis.md).
  • Segment interconnect (DESIGN.md §2.1, §3): 2x5-pin IDC connectors (2.54 mm box headers on 3M 3365/10 ribbon) carry both counter-rotating data rings plus power — a single 3.3 V rail that is both the signaling rail and node power, and a raw 5–18 V rail for payloads with their own buck. On 3M 3365 ribbon, segments reach 10 m unamplified; the 470 Ω TX series resistor, not the cable, sets the limit (simulation: docs/cable-reach.md).
  • Node I/O: potmeter, buttons/matrix, capacitive touch, I2C accelerometer, LEDs, buzzer — nodes are smart peripherals serving cooked data (Bela/Trill pattern, see docs/bela-lessons.md).
  • Test board: 8 ring nodes + supervisor, full fault injection (per-segment open/short, per-node power cut, keep-alive cut), everything scriptable for hands-off hardware-in-the-loop testing. Doubles as the demonstrator: some nodes carry human-facing I/O (potentiometer, buttons, LEDs, buzzer), each input overridable by the supervisor so scripted runs stay hands-off (DESIGN.md §6). 4-layer, self-documenting silkscreen. Prototypes assembled by JLCPCB Economic PCBA; part selection is inventory-driven — minimize unique Extended BOM lines.

Firmware direction

  • Freestanding C++, no standard library — RAII, typed volatile structs over memory-mapped I/O, constexpr config; no exceptions/RTTI/heap.
  • Foundation library modeled on SerenityOS's AK, landed in firmware/lib/: ErrorOr<T> with TRY propagation and fallible try_* APIs, VERIFY with a target failure hook, fixed-capacity StaticVector/Span, and a StaticArena slot pool.
  • Ring protocol core in firmware/protocol/ — bit cells and node/ring forwarding logic (DESIGN.md §2) — proven by KLEE symbolic-execution harnesses and libFuzzer harnesses whose seed corpora double as the meson test suite; branch coverage is measured on the release build (scripts/coverage-release).
  • The node pin map is captured in the DSL — 17 of 18 CH32V003 GPIO assigned with a budget check — and emits firmware/node/pins.hpp directly (DESIGN.md §7).
  • All of it under the project-owned coding standard: code-std.md holds the language-independent rules and links the per-language standards (code-std-cpp.md, code-std-python.md) — borrowing from JSF AV / MISRA / AUTOSAR / CERT, statically checked from the first commit (DESIGN.md §8).

Tooling

  • Design capture is code: the home-rolled Python DSL (src/oparroy/dsl/, DESIGN.md §7) is the single source of truth — an IR with subcircuit composition (ports, port arrays, bundles, multipacking, component sockets), a validation pass (limit ranges, interval containment, waivers as data), and emitters for KiCad netlists, ngspice simulation netlists, and firmware pin headers. Footprint assignment and annotation/back-annotation are explicit, repeatable stages between capture and pcbnew, so emission is not a one-shot export. The parts DB carries assembler-stock status (inventory-driven selection), and a .kicad_pcb layout property checker audits the physical layout (stackup, trace budgets, bypass-path copper independence, mechanical contracts). KiCad is used for layout only. Learn the DSL from docs/dsl-tutorial.md; the API map is docs/dsl-reference.md. Circuit captures live in design/ — the full node board is captured (CH32V003 + PHY front-end + charge-pump watchdog + status LEDs + segment connectors) — with ngspice benches in circuits/ run via scripts/sim-run.
  • Datasheets are extracted, not just stored: datasheets/<PART>/ holds vendor PDFs plus LLM-readable markdown sidecars (facts, per-peripheral notes, quirks) — see datasheets/README.md.
  • Meson + ninja build the firmware (DESIGN.md §8): one build dir per toolchain, freestanding flag set in meson.build.
    • host (clang; host objects + LLVM bitcode for KLEE): meson setup build/host --native-file meson/native/clang.ini
    • CH32V003 (RV32EC objects): meson setup build/rv32ec --cross-file meson/cross/rv32ec.ini
    • then meson compile -C build/<dir>; the reproducibility gate ninja -C build/host check-reproducible builds every configuration twice and compares artifact hashes.
  • nix flake provides everything non-Python (riscv/arm cross GCC, clang 19 + KLEE, AFL++, ngspice, KiCad, uv itself), pinned by flake.lock — nix develop enters the shell (.envrc provided for direnv users); uv owns Python alone (3.14, ruff strict, ty, pytest): uv sync, then uv run pytest / uv run ruff check / uv run ty check.
  • Pre-commit hooks (pre-commit install): clang-format, clang-tidy (replaying the host build's compile_commands.json), and the markdown pipeline (mdformat + markdownlint-cli2 + lychee link checks) — cheap checks only, ~2 s warm. Hooks are language: system against the nix-pinned tools, so the flake stays the single tool source.
  • CI (.github/workflows/ci.yml): GitHub Actions runs every gate — pytest, firmware host build + unit tests, KLEE proofs, bounded fuzz runs, ngspice benches, the rv32ec cross build, the reproducibility gate, and the pre-commit suite — inside the nix dev shell, so CI exercises byte-identical tools to a laptop. Each gate sparse-checks-out only its declared inputs, so an undeclared dependency fails CI even when the full tree builds locally; scripts/check-sparse <gate> rehearses a gate against a sparse worktree before pushing (file content comes from HEAD — commit source edits first).

Repository layout

PathContents
AGENTS.mdDoc-split and writing conventions for agents
IDEAS.mdNot-yet-planned ideas (append-only stash)
DESIGN.mdSettled design decisions + open design questions
KANBAN.mdSingle home for planned work (cards, Next/Backlog)
code-std.mdProject-owned coding standard: general rules (living)
code-std-cpp.mdC++ coding standard (living)
code-std-python.mdPython (DSL) coding standard (living)
README.mdThis file
flake.nix + flake.lockPinned dev shell: all non-Python tools (DESIGN.md §8)
pyproject.toml + uv.lockPython side: the DSL package (ruff strict, ty, pytest)
src/oparroy/Design-capture DSL package (dsl/: IR, checks, emitters)
design/DSL circuit captures: node board, pin map, parts DB seed
circuits/ngspice benches: PHY segment, watchdog, cable reach
tests/Python tests (pytest) + golden netlists, .kicad_pcb fixtures
meson.build + meson/Firmware build: flag set, native/cross toolchain files
.envrcdirenv hook into the flake shell
.pre-commit-config.yamlHook wiring; tools nix-pinned, language: system
.github/workflows/CI: every gate inside the nix shell
firmware/Node/supervisor firmware: foundation lib, ring protocol
scripts/Build, sim/proof/fuzz, coverage + pre-commit scripts (sh)
docs/Reference documents (research reports, sub-designs); dsl-tutorial.md + dsl-reference.md document the DSL
datasheets/Vendor PDFs + extracted markdown sidecars per part
LICENSEMIT, copyright 2026 Kristoffer Koch

Doc conventions follow the IDEAS → KANBAN/DESIGN graduation model: stray thoughts live in IDEAS.md, planned work in KANBAN.md cards, settled decisions in DESIGN.md. See AGENTS.md §Documentation.

Status

The design-automation pipeline is landed end-to-end: the DSL captures the full node board, validates it, and emits KiCad and ngspice netlists, the firmware pin header, and layout constraint skeletons; simulation benches cover the PHY, the charge-pump watchdog, and cable reach. On the firmware side the foundation library and the ring-protocol core are in place under KLEE/fuzz/coverage verification, and CI runs every gate. No boards exist yet: next up is KiCad layout of the node board, which unblocks the 8-node test board and the long-cable bench work. Current work is tracked as cards in KANBAN.md.

Parts

37
QtyValueFootprintReferences
5470Resistor_SMD:R_0603_1608MetricR1, R2, R3, R4, R10
4UDD32C03L01Diode_SMD:D_SOD-323D1, D2, D3, D4
210kResistor_SMD:R_0603_1608MetricR7, R8
21kResistor_SMD:R_0603_1608MetricR9, R11
2Conn_02x05_Odd_EvenConnector_IDC:IDC-Header_2x05_P2.54mm_Vertical_SMDJ1, J2
2XL-3216SYGC-FBOparroy:LED_1206_3216Metric_ReverseMount_Hole1.5x2.4mmLED1, LED3
10RResistor_SMD:R_0603_1608MetricR6
1100nCapacitor_SMD:C_0603_1608MetricC1
110nCapacitor_SMD:C_0603_1608MetricC4
110uCapacitor_SMD:C_0603_1608MetricC2
1220Resistor_SMD:R_0603_1608MetricR13
122nCapacitor_SMD:C_0603_1608MetricC3
13V3TestPoint:TestPoint_Pad_1.5x1.5mmTP2
147kResistor_SMD:R_0603_1608MetricR12
1BAT54SPackage_TO_SOT_SMD:SOT-23D5
1CH32V003F4P6Package_SO:TSSOP-20_4.4x6.5mm_P0.65mmU3
1DNPResistor_SMD:R_0603_1608MetricR5
1DNPPackage_TO_SOT_SMD:SOT-23-5U1
1GNDTestPoint:TestPoint_Pad_1.5x1.5mmTP3
1PC7TestPoint:TestPoint_Pad_1.5x1.5mmTP4
1SN74LVC1G3157Package_TO_SOT_SMD:SOT-23-6U2
1SWIOTestPoint:TestPoint_Pad_1.5x1.5mmTP1
1XL-3216SURC-FBOparroy:LED_1206_3216Metric_ReverseMount_Hole1.5x2.4mmLED2
1XL-3216UYC-FBOparroy:LED_1206_3216Metric_ReverseMount_Hole1.5x2.4mmLED4

The 35 most common of 37 parts.

More from kristofferkoch/oparroy

1
  • 4 layers240 × 180 mmOparroy ci, the printed circuit board in 3D

    Oparroy ci

    kristofferkoch/oparroy

    WS2812 inspired versatile serial protocol and hardware

    570 partsMIT

Similar boards

  • 2 layers75 × 75 mmDxhub, the printed circuit board in 3D

    Dxhub

    NerdFlare/DXHub25

    8 parts1
  • 4 layers30 × 30 mmReCamera 2002 POE Board, the printed circuit board in 3D

    ReCamera 2002 POE Board

    Seeed-Studio/OSHW-reCamera-Series

    reCamera is a series of open-source AI cameras.

    75 parts495Apache-2.0
  • 4 layers81 × 60 mmFanpico, the printed circuit board in 3D

    Fanpico

    tjko/fanpico

    Fanpico: Open Source Programmable PWM (PC) Fan Controller

    86 parts239GPL-3.0
  • 4 layers46 × 100 mmMusic32v3, the printed circuit board in 3D

    Music32v3

    Thecactusman0/Music32-V3

    Portable music player

    183 parts3GPL-3.0
  • 4 layers52.5 × 80 mmCharger compare, the printed circuit board in 3D

    Charger compare

    WillB97/lipo-chg-eval-pcb

    BQ25792/MP2759 LiPo Charger Evaluation Board

    110 parts2
  • 4 layers80 × 60 mmCowkeyr sc g0, the printed circuit board in 3D

    Cowkeyr sc g0

    Agilack/cowkeyr-sc-g0

    An USB smartcard reader with auditable and extensible firmware

    35 parts
  • 6 layers160 × 100 mmETH1LCR3, the printed circuit board in 3D

    ETH1LCR3

    BehrensG/ETH1LCR3

    546 parts

Questions

How big is the Oparroy node PCB?

It measures 33.6 × 28.2 mm and has 2 copper layers, 0.8 mm thick.

What parts does the Oparroy node use?

37 parts, built around the CH32V003F4P6, SN74LVC1G3157DBV, UDD32C03L01 and XL-3216SYGC-FB. 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 Oparroy node KiCad files?

From the kristofferkoch/oparroy repository on GitHub, at the commit this page was made from: the board is boards/node/oparroy-node.kicad_pcb. PCBKit opens the board in the browser, with nothing to install.

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