Skip to the content
2 layers42 × 58 mmIndex.circuit, the printed circuit board in 3D

ESP32-A1S DJ media player: MP3/WAV playback from SD, variable speed with WSOLA keylock, OLED file browser, timecode vinyl decoder skeleton.

Size
42 × 58 mm
Copper layers
2
Thickness
1.6 mm
Parts
36
Nets
27
Pads
95
Tracks, vias
240, 30
Pours
1
Routed
Yes
KiCad
KiCad 9.0 (file 20241229)
Created
19 Apr 2026
Updated
7 Nov 2026

Overview

Index.circuit is an open-source printed circuit board by audiodestrukt, from the audiodestrukt/freedj-esp repository on GitHub, published under the GPL-3.0 licence. It is a 2-layer board of 42 × 58 mm with 36 parts on 27 nets, routed with 240 tracks and 30 vias.

It is built around the CH32V003F4P6. Its parts include 1 capacitor and 1 IC. It belongs with the RISC-V boards of this library.

Main components

1

README

p4/deck/hardware/ctrl-pcb/README.md

freedj control board

One 42 × 58 mm two-layer board under CUE / PLAY. It carries:

  • the two buttons and their ring LEDs,
  • the pitch fader input,
  • one I2C target chip that does the ADC, button debouncing and LEDs for the host.

The AS5600 jog encoder shares the same I2C bus through the board. The host is the P4 dev board, a Pi Zero or a Teensy, over a single 5-wire cable.

Top Bottom

The chip: CH32V003F4P6

A 32-bit RISC-V microcontroller (WCH), TSSOP-20, LCSC C5187096: 26,000+ in stock at JLCPCB, about $0.29.

  • One chip does it all. It has:
    • a hardware I2C target,
    • a 10-bit ADC for the fader (oversampled in firmware for more resolution),
    • GPIO for the two buttons, debounced in firmware,
    • one pin per LED, so firmware can dim and animate them.
  • Why not fixed-function chips: an ADC plus a GPIO expander (ADS1015 + PCA9555) would still need firmware-side debouncing, and costs more parts.
  • Why not an ATtiny 1-/2-series: the ATtiny1616 / 1626 would do the same job, but JLCPCB had only 47–108 in stock.
  • Programming: one wire (SWIO) from a WCH-LinkE (about $5), with 3V3, GND and SWIO on the bottom-side pads. ch32fun or the openwch Arduino core both build for it.

Pins

CH32V003UseCH32V003Use
1 PD4LED CUE 111 PC1SDA (I2C target)
2 PD5LED CUE 212 PC2SCL
3 PD6LED CUE 313 PC3INT to host (open drain, 10k pull-up)
4 PD7NRST (10k pull-up)14 PC4Fader wiper, ADC A2, 1k + 100 nF filter
5 PA1LED PLAY 115 PC5PLAY button (internal pull-up, to GND)
6 PA2LED PLAY 216 PC6CUE button
7 VSSGND17 PC7LED CUE 4
8 PD0LED PLAY 318 PD1SWIO (programming pad)
9 VDD3V3 (100 nF + 10 µF)19 PD2spare
10 PC0LED PLAY 420 PD3spare

LEDs are driven high, with the cathode to GND:

  • PLAY: KT-0805G green (C2297) with 100 Ω.
  • CUE: KT-0805Y 590 nm amber-yellow (C2296) with 470 Ω.

That's about 3–5 mA each at 3.3 V. Both are JLCPCB basic parts. Use PWM in firmware to match their brightness.

The switches are ZX-QC66-7.5TP, 6 × 6 mm SMD, 7.5 mm tall (C7470157). Each is wired across its diagonal pads (1 and 4), which are switched whichever way the contacts pair up inside.

Connectors (JST-XH, through-hole, soldered on the bottom)

Pin 12345
J_HOST (back edge)3V3GNDSDASCLINT
J_ENC (right edge, AS5600)3V3GNDDIR (tied to GND)SCLSDA
J_POT (right edge, fader)3V3 (one end)wiperGND (other end)
  • Pull-ups: I2C has 4.7k pull-ups on this board. On the P4, use a separate I2C bus from the codec/touch bus.
  • AS5600: its address (0x36) doesn't clash with the CH32V003, which will use 0x42 once its firmware exists.

How it fits the case

The outline, the three M2.5 holes, the switch centres, the LED circle and the connector positions all come from the enclosure CAD:

  1. gen_geom.py reads them from ../cad/machine_params.py and ../cad/ctrlboard.py.
  2. It writes them to lib/geom.json.
  3. index.circuit.tsx places from that file.

Keep-out: each light ring's skirt sits on r 10.8–11.8 mm around its switch centre. Only the LEDs go there, under notches in the skirt. The bosses come down onto the top face around the holes, so keep r 3 mm there clear too. build.sh doesn't check these keep-outs; the checks run were one-off.

Build

bash
npm ci                                   # tscircuit, same versions as freedj-3000
ln -s ~/.claude/skills/pcb-layout/scripts scripts
./build.sh

build.sh does the whole board:

  1. Reads the anchors from the CAD.
  2. Builds the tscircuit design.
  3. Routes it with Freerouting and the capacity router, keeping the better result.
  4. Drops dead copper islands.
  5. Finishes any open connections with TraceMaker.
  6. Runs the gates: KiCad DRC, the JLCPCB DFM check and the floating-pad check.
  7. Writes fab/.

The tscircuit build reports 34 pad-clearance "errors" between the MCU's own pins. These are false: they come from its rotated pill-shaped pads, and KiCad's DRC on the exported board is clean.

Ordering (JLCPCB)

  • PCB: fab/freedj-ctrl-gerbers.zip, 2 layers, 1.6 mm.
  • Assembly, top side:
    • Upload fab/freedj-ctrl-bom.csv and fab/freedj-ctrl-cpl.csv, which list 27 parts.
    • Check the rotations in JLCPCB's placement preview, especially U1, the LEDs and the switches. Part rotations don't always line up between KiCad and JLCPCB's library.
  • By hand: the three JST-XH sockets, from fab/freedj-ctrl-handsolder.csv. Put the housings on the bottom side, where their outlines are on the bottom silkscreen.

Still to do

  • Firmware for the CH32V003: I2C register map, debouncing, fader oversampling, LED PWM and the INT line.
  • A host driver on the P4.

Parts

36
QtyValueFootprintReferences
4100Ωtscircuit:resistor_res0603R_PLAY1, R_PLAY2, R_PLAY3, R_PLAY4
4470Ωtscircuit:resistor_res0603R_CUE1, R_CUE2, R_CUE3, R_CUE4
4LEDtscircuit:led_0805_color(green)D_PLAY1, D_PLAY2, D_PLAY3, D_PLAY4
4LEDtscircuit:led_0805_color(yellow)D_CUE1, D_CUE2, D_CUE3, D_CUE4
3tscircuit:hole_circle_holeDiameter2.7mm, ,
2100nFtscircuit:capacitor_0603C_POT, C1
210kΩtscircuit:resistor_res0603R_INT, R_NRST
24.7kΩtscircuit:resistor_res0603R_SCL, R_SDA
2B5B_XH_A_LF__SN_tscircuit:B5B_XH_A_LF_SNJ_ENC, J_HOST
2ZX_QC66_7_5TPtscircuit:ZX_QC66_7_5TPSW_CUE, SW_PLAY
110uFtscircuit:capacitor_0805C2
11kΩtscircuit:resistor_res0603R_POT
1B3B_XH_A_LF__SN_tscircuit:B3B_XH_A_LF_SNJ_POT
1CH32V003F4P6tscircuit:CH32V003F4P6U1
1TP_3V3tscircuit:test_point_smtpad_circle_d1.5TP_3V3
1TP_GNDtscircuit:test_point_smtpad_circle_d1.5TP_GND
1TP_SWIOtscircuit:test_point_smtpad_circle_d1.5TP_SWIO

Similar boards

  • 2 layers36.1 × 21 mmLinux ch32v003, the printed circuit board in 3D

    Linux ch32v003

    tvlad1234/linux-ch32v003

    Linux on a $0.15 RISC-V microcontroller

    16 parts289MIT
  • 2 layers32 × 35 mmCh32v003-usbpd, the printed circuit board in 3D

    Ch32v003-usbpd

    eeucalyptus/ch32v003-usbpd

    Use the ch32v003 as a usb pd controller

    22 parts56MIT
  • 2 layers50.5 × 94.7 mmSwordOfSecretsUSBProd, the printed circuit board in 3D

    SwordOfSecretsUSBProd

    gili-yankovitch/SwordOfSecrets

    To solve the challenge you will need to discover a series of flags, hidden inside the sword. Each one will help you unlock the next step in the challenge, to finally reveal the ultimate secret the sword holds.

    16 parts47MIT
  • 4 layers44.8 × 76 mmTiny scarab, the printed circuit board in 3D

    Tiny scarab

    Embeetle/tiny-scarab

    Tiny beetle board based on the CH32V003 10-cent chip.

    147 parts24MIT
  • 2 layers52.3 × 16.3 mmGeneric TSSOP20, the printed circuit board in 3D

    Generic TSSOP20

    dwillmore/TSSOP20_breakout

    A generic breakout board for TSSOP20 chips to a SIP header meant for breadboard use

    45 parts18CERN-OHL-W-2.0
  • 2 layers65.4 × 133.6 mmBSidesTLV2025GloveBadge, the printed circuit board in 3D

    BSidesTLV2025GloveBadge

    bsidestlv/bsidestlv-2025-badge

    To solve the challenge you will need to discover a series of flags, hidden inside the badge. Each one will help you unlock the next step in the challenge, to finally reveal the ultimate secret the badge holds.

    35 parts13MIT
  • 4 layers22 × 22 mmFrekLedMini, the printed circuit board in 3D

    FrekLedMini

    Drewbi/frekmini

    Mini version of the IKEA Frekvens

    25 parts10
  • 2 layers92 × 63.4 mmBsidesorl v1, the printed circuit board in 3D

    Bsidesorl v1

    bsidesorlando/2026-badge

    The electronic badge for BSides Orlando 2026, themed around retro-futurism: a 1960s World's Fair vision of tomorrow, with Lil Chompy the alligator at the wheel of a flying car.

    39 parts5

Questions

How big is the Index.circuit PCB?

It measures 42 × 58 mm and has 2 copper layers, 1.6 mm thick.

What parts does the Index.circuit use?

36 parts, built around the CH32V003F4P6. 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 Index.circuit KiCad files?

From the audiodestrukt/freedj-esp repository on GitHub, at the commit this page was made from: the board is p4/deck/hardware/ctrl-pcb/index.circuit.kicad_pcb. PCBKit opens the board in the browser, with nothing to install.

Can I use the Index.circuit design in my own project?

Its repository publishes it under the GPL-3.0 licence: you may reuse it on that licence's terms (keep the author's notice, and for a copyleft licence share your changes alike).