

Oparroy ci
WS2812 inspired versatile serial protocol and hardware
- Size
- 240 × 180 mm
- Copper layers
- 4
- Thickness
- 1.6 mm
- Parts
- 570
- Nets
- 436
- Pads
- 1,953
- Tracks, vias
- 0, 0
- Routed
- Not yet
- KiCad
- KiCad 10.0 (file 20260206)
- Created
- 26 Sep 2026
- Updated
- 26 Oct 2026
Overview
Oparroy ci is an open-source printed circuit board by kristofferkoch, from the kristofferkoch/oparroy repository on GitHub, published under the MIT licence. It is a 4-layer board of 240 × 180 mm with 570 parts on 436 nets.
It is built around the CH32V003F4P6, RP2040 and INA241A5ID, with the W25Q16JVSSIQ, 74LVC1G3157 and SN74LVC1G3157DBV among its other parts. Its parts include 274 resistors, 116 ICs, 69 capacitors, 44 diodes and 16 transistors. It belongs with the lEDs and displays boards and the RP2040 and RISC-V boards of this library.
Main components
12CH32V003F4P6
TSSOP-20-175milTSSOP-20-175mil Microcontrollers (MCU/MPU/SOC) ROHSWCH (Nanjing Qinheng Microelectronics)Microcontrollers (MCU/MPU/SOC)RP2040
LQFN-56(7x7)12bit 133MHz 30 LQFN-56(7x7) Microcontrollers (MCU/MPU/SOC) ROHSRaspberry PiMicrocontrollers (MCU/MPU/SOC)INA241A5ID
SOIC-8-40℃~+125℃ -5V~110V 0.1uV/℃ 1.1MHz 166dB 2.5mA 2.7V~20V 200V/V 2uV 35uA 8V/us High-side detection、Low-side detection、Bidirectional detection、Zero drift / auto-zero、Programmable output reference level ±30V SOIC-8 Current Sense Amplifiers ROHSTexas InstrumentsCurrent Sense AmplifiersW25Q16JVSSIQ
SOIC-8-208mil-40℃~+85℃ 100,000 cycles 10uA 133MHz 16Mbit 2.7V~3.6V 20 Years 3ms SPI SOIC-8-208mil NOR FLASH ROHSWinbondNOR FLASH74LVC1G3157
UncategorisedDiodes IncorporatedSN74LVC1G3157DBV
SOT-23-6-40℃~+85℃ 1 1.65V~5.5V 17.3pF 2:1 3.8ns 300MHz 300ps 5.7ns 6Ω SOT-23-6 Analog Switches, Multiplexers ROHSTexas InstrumentsAnalog Switches, Multiplexers74HC595
SOP-16-40℃~+85℃ 1 100ns@5V,50pF 10MHz 2V~6V 74HC 8 Serial-to-Serial or Parallel Tri-State SOP-16 Shift Registers ROHSGRShift Registers74HC165D
SO-16-40℃~+125℃ 1 28ns@6V,50pF 2V~6V 35MHz 500mW 74HC 8 Parallel or Serial to Serial SOIC-16 Shift Registers ROHSNexperiaShift RegistersAMS1117-3.3
SOT-223-40℃~+125℃ 0.003%Vout 1 1.1V@(800mA) 15V 1A 3.3V 5mA 72dB@(120Hz) Fixed Over Current Protection、Short Circuit Protection、Thermal shutdown Positive SOT-223 Voltage Regulators - Linear, Low Drop Out (LDO) Regulators ROHSAdvanced Monolithic SystemsVoltage Regulators - Linear, Low Drop Out (LDO) RegulatorsXL-3216SYGC
1206-40℃~+85℃ 120° 2.4V 20mA 225mcd 50mW 565nm~575nm 570nm Discrete Diode Top-mount Water Clear Yellow Green 1206 LED Indication - Discrete ROHSXINGLIGHTLED Indication - DiscreteAO3401A
SOT-231 P-Channel 14nC@10V 30V 47mΩ@10V、60mΩ@4.5V、85mΩ@2.5V 4A 55pF 645pF 80pF 900mV SOT-23 MOSFETs ROHSAlpha & Omega SemiconductorMOSFETsBAT54S
SOT-231 Pair Series Connection 1V@100mA 200mA 2uA@25V 30V 600mA SOT-23 Schottky Diodes ROHSMDDSchottky Diodes
README
README.mdoparroy
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,
constexprconfig; no exceptions/RTTI/heap. - Foundation library modeled on SerenityOS's AK, landed in
firmware/lib/:ErrorOr<T>withTRYpropagation and fallibletry_*APIs,VERIFYwith a target failure hook, fixed-capacityStaticVector/Span, and aStaticArenaslot 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.hppdirectly (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_pcblayout 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 indesign/— the full node board is captured (CH32V003 + PHY front-end + charge-pump watchdog + status LEDs + segment connectors) — with ngspice benches incircuits/run viascripts/sim-run. - Datasheets are extracted, not just stored:
datasheets/<PART>/holds vendor PDFs plus LLM-readable markdown sidecars (facts, per-peripheral notes, quirks) — seedatasheets/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 gateninja -C build/host check-reproduciblebuilds every configuration twice and compares artifact hashes.
- host (clang; host objects + LLVM bitcode for KLEE):
- nix flake provides everything non-Python (riscv/arm cross GCC,
clang 19 + KLEE, AFL++, ngspice, KiCad, uv itself), pinned by
flake.lock—nix developenters the shell (.envrcprovided for direnv users); uv owns Python alone (3.14, ruff strict, ty, pytest):uv sync, thenuv run pytest/uv run ruff check/uv run ty check. - Pre-commit hooks (
pre-commit install): clang-format, clang-tidy (replaying the host build'scompile_commands.json), and the markdown pipeline (mdformat + markdownlint-cli2 + lychee link checks) — cheap checks only, ~2 s warm. Hooks arelanguage: systemagainst 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 fromHEAD— commit source edits first).
Repository layout
| Path | Contents |
|---|---|
AGENTS.md | Doc-split and writing conventions for agents |
IDEAS.md | Not-yet-planned ideas (append-only stash) |
DESIGN.md | Settled design decisions + open design questions |
KANBAN.md | Single home for planned work (cards, Next/Backlog) |
code-std.md | Project-owned coding standard: general rules (living) |
code-std-cpp.md | C++ coding standard (living) |
code-std-python.md | Python (DSL) coding standard (living) |
README.md | This file |
flake.nix + flake.lock | Pinned dev shell: all non-Python tools (DESIGN.md §8) |
pyproject.toml + uv.lock | Python 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 |
.envrc | direnv hook into the flake shell |
.pre-commit-config.yaml | Hook 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 |
LICENSE | MIT, 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
570| Qty | Value | Footprint | References |
|---|---|---|---|
| 96 | 47k | Resistor_SMD:R_0603_1608Metric | R1, R10, R11, R12, R13, R14, R15, R108, R112, R113, R116, R118, R135, R141, R142, R155 +80 |
| 80 | 470 | Resistor_SMD:R_0603_1608Metric | R104, R106, R110, R111, R114, R115, R119, R120, R121, R122, R133, R137, R138, R139, R140, R143 +64 |
| 60 | 74LVC1G3157 | Package_TO_SOT_SMD:SOT-23-6 | U22, U23, U24, U25, U26, U27, U37, U38, U106, U107, U108, U109, U110, U111, U112, U113 +44 |
| 37 | 100n | Capacitor_SMD:C_0603_1608Metric | C1, C2, C10, C11, C12, C13, C18, C19, C20, C21, C22, C23, C24, C25, C26, C27 +21 |
| 37 | 10k | Resistor_SMD:R_0603_1608Metric | R102, R103, R117, R125, R126, R127, R128, R149, R150, R164, R172, R173, R174, R175, R196, R197 +21 |
| 30 | 1k | Resistor_SMD:R_0603_1608Metric | R105, R107, R129, R130, R131, R132, R134, R152, R154, R176, R177, R178, R179, R181, R199, R201 +14 |
| 22 | SN74LVC1G3157 | Package_TO_SOT_SMD:SOT-23-6 | U1, U2, U3, U4, U5, U30, U31, U32, U33, U34, U35, U36, U46, U57, U104, U115 +6 |
| 16 | XL-3216SYGC | LED_SMD:LED_1206_3216Metric | LED1, LED3, LED5, LED7, LED9, LED11, LED13, LED15, LED17, LED19, LED21, LED23, LED25, LED27, LED29, LED31 |
| 11 | 74HC595 | Package_SO:SOIC-16_3.9x9.9mm_P1.27mm | U8, U9, U10, U13, U14, U15, U16, U17, U18, U19, U20 |
| 9 | 10u | Capacitor_SMD:C_0603_1608Metric | C14, C31, C35, C40, C44, C49, C53, C58, C66 |
| 8 | 0R | Resistor_SMD:R_0603_1608Metric | R101, R124, R148, R171, R195, R218, R240, R262 |
| 8 | 10n | Capacitor_SMD:C_0603_1608Metric | C33, C38, C42, C47, C51, C56, C64, C69 |
| 8 | 220 | Resistor_SMD:R_0603_1608Metric | R109, R136, R156, R183, R203, R230, R247, R274 |
| 8 | 22n | Capacitor_SMD:C_0603_1608Metric | C32, C37, C41, C46, C50, C55, C63, C68 |
| 8 | 2N7002 | Package_TO_SOT_SMD:SOT-23 | Q2, Q3, Q6, Q7, Q10, Q11, Q14, Q15 |
| 8 | 3V3 | TestPoint:TestPoint_Pad_1.5x1.5mm | TP2, TP6, TP10, TP14, TP18, TP22, TP26, TP30 |
| 8 | AO3401A | Package_TO_SOT_SMD:SOT-23 | Q1, Q4, Q5, Q8, Q9, Q12, Q13, Q16 |
| 8 | BAT54S | Package_TO_SOT_SMD:SOT-23 | D5, D6, D7, D8, D9, D10, D11, D12 |
| 8 | CH32V003F4P6 | Package_SO:TSSOP-20_4.4x6.5mm_P0.65mm | U47, U58, U68, U79, U89, U100, U105, U116 |
| 8 | DNP | Resistor_SMD:R_0603_1608Metric | R100, R123, R147, R170, R194, R217, R239, R261 |
| 8 | DNP | Package_TO_SOT_SMD:SOT-23-5 | U45, U56, U66, U77, U87, U98, U103, U114 |
| 8 | GND | TestPoint:TestPoint_Pad_1.5x1.5mm | TP3, TP7, TP11, TP15, TP19, TP23, TP27, TP31 |
| 8 | PC7 | TestPoint:TestPoint_Pad_1.5x1.5mm | TP4, TP8, TP12, TP16, TP20, TP24, TP28, TP32 |
| 8 | SWIO | TestPoint:TestPoint_Pad_1.5x1.5mm | TP1, TP5, TP9, TP13, TP17, TP21, TP25, TP29 |
| 8 | TS-1187A-B-A-B | Button_Switch_SMD:SW_Push_1P1T_XKB_TS-1187A | SW1, SW2, SW3, SW4, SW5, SW6, SW7, SW8 |
| 8 | XL-3216SURC | LED_SMD:LED_1206_3216Metric | LED2, LED6, LED10, LED14, LED18, LED22, LED26, LED30 |
| 8 | XL-3216UYC | LED_SMD:LED_1206_3216Metric | LED4, LED8, LED12, LED16, LED20, LED24, LED28, LED32 |
| 4 | 10k | Potentiometer_THT:Potentiometer_Alps_RK09K_Single_Vertical | RV1, RV2, RV3, RV4 |
| 4 | UDD32C03L01 | Diode_SMD:D_SOD-323 | D1, D2, D3, D4 |
| 3 | 1u | Capacitor_SMD:C_0603_1608Metric | C28, C29, C60 |
| 3 | PKLCS1212E4001-R1 | Buzzer_Beeper:Buzzer_Murata_PKLCS1212E | BZ1, BZ2, BZ3 |
| 2 | 15p | Capacitor_SMD:C_0603_1608Metric | C16, C17 |
| 2 | 27 | Resistor_SMD:R_0603_1608Metric | R74, R75 |
| 2 | 5k1 | Resistor_SMD:R_0603_1608Metric | R65, R66 |
| 2 | 74HC165 | Package_SO:SOIC-16_3.9x9.9mm_P1.27mm | U11, U12 |
| 2 | Conn_02x05_Odd_Even | Connector_IDC:IDC-Header_2x05_P2.54mm_Vertical_SMD | J1, J3 |
| 1 | 1n | Capacitor_SMD:C_0603_1608Metric | C61 |
| 1 | 22u | Capacitor_SMD:C_0603_1608Metric | C15 |
| 1 | 47 | Resistor_SMD:R_0603_1608Metric | R232 |
| 1 | 4k7 | Resistor_SMD:R_0603_1608Metric | R88 |
| 1 | ABM8-272-T3 | Crystal:Crystal_SMD_3225-4Pin_3.2x2.5mm | Y1 |
| 1 | ADCS7476 | Package_TO_SOT_SMD:SOT-23-6 | U101 |
| 1 | AMS1117-3.3 | Package_TO_SOT_SMD:SOT-223-3_TabPin2 | U21 |
| 1 | HC-TYPE-C-16P-01A | Connector_USB:USB_C_Receptacle_HCTL_HC-TYPE-C-16P-01A | J2 |
| 1 | INA241A5 | Package_TO_SOT_SMD:SOT-23-8 | U102 |
| 1 | R082 | Resistor_SMD:R_0603_1608Metric | R234 |
| 1 | RP2040 | Package_DFN_QFN:QFN-56-1EP_7x7mm_P0.4mm_EP3.2x3.2mm | U28 |
| 1 | W25Q16JVSSIQ | Package_SO:SOIC-8_5.3x5.3mm_P1.27mm | U29 |
More from kristofferkoch/oparroy
1- 2 layers33.6 × 28.2 mm

Similar boards
- 4 layers101.2 × 63.5 mm

FABulous board
FPGA-Research/FABulous_board
A PCB created for FABulous FPGAs, based on the caravel board.
85 parts6Apache-2.0 - 4 layers30 × 30 mm

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 mm

- 4 layers90 × 60 mm

Better lamp controller
super-cow-powers/better-lamp-controller
A custom lamp controller with audio, controlled with an RP2040
103 partsBSD-3-Clause - 2 layers251.6 × 177.8 mm

MelbourneTrainTracker
itsmevjnk/MelbourneTrainTracker
Melbourne Train Tracker project repository (SIT210, T1/2025)
1,071 parts40 - 2 layers215.1 × 85 mm

Le oeuf
eggsworks/le-oeuf-v2
An ultra-low profile (Kailh PG1316S) keyboard inspired by Le Chiffre.
110 parts8CERN-OHL-S-2.0 - 4 layers117.6 × 83 mm

Nile test chip pcb
Ash-tronix/nile_test_chip_pcb
KiCad PCB design files to support the Ashtronix® Nile test chip.
177 parts - 2 layers20 × 35 mm

KiCAD ICOM Internal GPS
MSF-Telecom/UT-GPS
A small, internal, and open-source GPS module for ICOM IC-5060 and IC-6060 radios.
30 partsCC-BY-SA-4.0
Questions
How big is the Oparroy ci PCB?
It measures 240 × 180 mm and has 4 copper layers, 1.6 mm thick.
What parts does the Oparroy ci use?
570 parts, built around the CH32V003F4P6, RP2040, INA241A5ID and W25Q16JVSSIQ. 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 ci KiCad files?
From the kristofferkoch/oparroy repository on GitHub, at the commit this page was made from: the board is boards/ci/oparroy-ci.kicad_pcb. PCBKit opens the board in the browser, with nothing to install.
Can I use the Oparroy ci 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).