Skip to the content
2 layers242.5 × 87.9 mmPetrock-40, the printed circuit board in 3D

Petrock-40

dycli/petrock

Custom Keyboard

Size
242.5 × 87.9 mm
Copper layers
2
Thickness
1.6 mm
Parts
102
Nets
94
Pads
570
Tracks, vias
542, 261
Pours
8
Routed
Yes
KiCad
KiCad 10.0 (file 20260206)
Created
4 Oct 2026
Updated
6 Oct 2026

Overview

Petrock-40 is an open-source printed circuit board by dycli, from the dycli/petrock repository on GitHub. It is a 2-layer board of 242.5 × 87.9 mm with 102 parts on 94 nets, routed with 542 tracks and 261 vias.

Its parts include 40 diodes, 40 switches, 4 connectors and 2 ICs. It belongs with the keyboards and input boards and the AVR (ATmega, ATtiny) boards of this library.

README

README.md

Petrock

A split choc keyboard with a trackpoint in place of an outer thumb key: Petrock-41 has one, at the right thumb; Petrock-40 has one on each half; Petrock-42 has none, a key at both outer thumbs.

Based on holykeebs' Corne Choc PCB and plate from idank/keyboards (corne/choc, commit f149b9b), licensed CC-BY-SA-4.0. This derivative uses the same licence.

Changes from the Corne Choc

The board is built from the stock file: its parts move to the new layout, and every wire is then drawn afresh by rule (see Build). The stock schematic's connections stay, apart from the thumbs' columns (see Firmware).

  • No lighting. Every per-key and underglow LED, the LED supply diodes and the LED wiring are gone (tools/no_leds.py). An RGB version may follow.
  • Exact stagger. Rows exactly 17 mm apart, each column's top key a whole number of 2.37 mm steps below the middle finger's (tools/stagger.py; stock is off by up to 0.02 mm).
  • Five columns. The outer pinky column goes. The pinky column moves up to one step below the ring column and gains a fourth key (the old outer top key); the ring column gains one too (the old outer bottom key). Each joins the column wire it lands on, in the thumb row (row 3).
  • Thumb cluster. Each thumb key turns 15 degrees from its neighbour about a hinge where their facing corners sit 0.5 mm apart, starting from the bottom inner-index key (tools/thumbs.py). The 1.5u inner key becomes two 1u keys; the new upper one takes the thumb row's last free column (col 0).
  • Trackpoint. Sprintek SK8707-01-004 at the outer thumb key: sensor on the front, nub centred on where the key was, driver on the back, PS/2 clock and data on controller pins 1/2, 3.3 V from the OLED header; sensor A1/A3, controller board A2/A4 (tools/outer_thumb.py, footprints from tools/make_footprints.py).
  • Pins for wireless. Pins 1/2 are a nice!nano's high-frequency D1/D0, which the ZMK PS/2 driver recommends (lower-frequency pins can disturb Bluetooth); the TRRS data line moves from pin 2 to pin 11 to free them (tools/pins.py).
  • Outline. Drawn from the keys (tools/outline.py): a flat top 1.15 mm above the middle column, 7.5-degree slopes to either side, a straight outer side, one 7.5-degree bottom edge, and the inner side widened for the upper thumb key (tools/widen.py). Keycaps sit 1.15 mm from the edge wherever it follows them.
  • Controller corner. Across the strip between the inner index keycaps and the inner edge, the controller (a nice!nano's 17.78 mm board) and the jack's 6 mm body sit with three even 1.63 mm gaps; each drops until its square top corner is 1.15 mm inside the inner slope, like the keycaps. The USB-C and the jack's barrel overhang. The reset button sits under the jack (tools/inner_strip.py).
  • The holykeebs and Corne logos and holykeebs' revision stamp are removed; the back carries the short hash of the commit the board was built from, between each controller's pin rows (tools/stamp.py; the build won't stamp uncommitted scripts); the board and the switch plates carry the Petrock logo with a 7 mm dot in its notch (tools/logo.py), and the jack, reset button and OLED header have no printed outlines (tools/quiet_silk.py).
  • Five standoffs per half, as stock, placed by geometry (tools/standoffs.py): four where four keys meet, each at the four keys' centre, forming a 54 x 34 mm rectangle (pinky and ring columns, and index and inner index columns, each between their top two rows and below their third); and one at the thumbs, equally far from its three keycap corners. A key diode may move a fraction to make room, if it stays clear. The switch plate has a screw hole over each (tools/plate.py), as stock.
  • Plates regenerated (tools/plate.py): the right one (both, on Petrock-40; neither, on Petrock-42) has an opening for the trackpoint sensor; a new FR4 bottom plate fits the outline.

Build

tools/build.sh [single|dual|none] regenerates a board from the stock file:

  1. Place: strip the lighting, then move every part to the layout (tools/parts.py drag).
  2. Route by rule (tools/route.py), as a careful hand would: each column a straight line up the front through its switch pins; each row a line along the back under its keys, stepping 45 degrees in the gap between columns; every diode in the same place beside its key with the same two short links; the column wires gathered into an evenly spaced bus in the gap under the middle row and fanned into the controller in a staircase; the trackpoint wires and power in a bundle up the lane between the middle and index columns and along the top edge; every bend 45 degrees, no right angles except where a wire joins another. Then ground is poured on both sides and stitched together with vias (tools/stitch.py).
  3. Check: the build fails unless DRC finds nothing but the stock footprints' library notices and every connection is made.

Then tools/plates.sh makes the plates (order the switch plates at 1.2 mm, which choc switches clip into; the main board and bottom plate at 1.6 mm; all in HASL, the cheapest finish: the trackpoint driver's pads are hand-soldered and wide enough that ENIG's flatness isn't needed) and the 1:1 printout (print it with scaling off, e.g. lp -o print-scaling=none). tools/fab.sh [single|dual|none] writes Gerber and drill zips and JLC's assembly BOM and placement (diodes and hot-swap sockets) to fab/; tools/demo.sh renders demo/. All need KiCad 10.

Outputs: pcb/petrock-41*.kicad_pcb and pcb/bottom.kicad_pcb; pcb/dual/petrock-40*.kicad_pcb and pcb/dual/bottom.kicad_pcb; pcb/none/petrock-42*.kicad_pcb and pcb/none/bottom.kicad_pcb.

Assembly

The stack, per standoff: a top screw through the switch plate's 2.1 mm hole into a spacer that passes through the main board's 3.1 mm hole down to the bottom plate, where a bottom screw holds it. The switch plate and bottom plate clamp the spacers; the main board hangs from the switches (clipped into the plate, pins in the hot-swap sockets), 1.0 mm under the plate.

  • 10 round M2 x 5 mm female-female spacers, 3.0 mm across (knurled brass ones are common; hex ones don't pass the 3.1 mm holes). 5 mm, not holykeebs' 4 mm: it leaves 2.4 mm under the main board for the sockets (1.85 mm) and the trackpoint drivers (about 2.1 mm).
  • Top screws (they sit on the plate, beside the switches): the four where four keys meet sit between switch housings (15 mm square on an 18 x 17 mm grid), so their heads must be about 3.0 mm across or less: M2 low small-head socket screws (e.g. MISUMI's; check the listed head diameter), or M1.6 socket caps (3.0 mm heads) with M1.6 spacers at those four. The thumb one and the 10 underneath: ordinary low M2 x 3 mm screws (e.g. ISO 7380, holykeebs').
  • Order: spacers up through the main board, bottom plate on; switch plate on and its screws in; then the switches, which draw the main board up as they seat.
  • Rubber feet: near the standoffs, and two along the bottom edge (by the outer corner and under the trackpoint), which has no standoff.

Firmware

  • Matrix (each half, right with _r nets): rows 0-2 are the three full rows, columns 1-5 pinky to inner index. Row 3 is the bottom pinky key (col 1), the bottom ring key (col 2) and the thumbs, outer to inner: col 3, col 4, col 5. Col 0 is unused, except on a half with four thumbs (the 41's left, both of the 42's): there the extra outermost one (in the trackpoint's place) is col 3, the next two col 4 and col 5, and the innermost col 0.
  • Wired (QMK, RP2040 Pro Micro): split serial on pin 11 (SOFT_SERIAL_PIN GP8, PIO driver); PS/2 PS2_CLOCK_PIN GP0, PS2_DATA_PIN GP1 (PIO driver).
  • Wireless (ZMK, nice!nano): PS/2 clock D1 (P0.06), data D0 (P0.08), e.g. with infused-kim's PS/2 mouse driver; the trackpoint's driver board resets itself, so no reset pin. It draws power from the controller's VCC pin, which ZMK's external-power control switches off in sleep. The battery solders to the nice!nano's B+/B- pads (no switch on the board). The jack isn't used.
  • The sensor's pad edge faces the controller (if the axes come out turned, rotate them in firmware). No RGB.

Open items

  • Driver footprint: Sprintek doesn't draw the detached driver on its own. Its outline and sensor-link pads follow the integrated-module drawing. Its host pins disagree between the drawing (1.80 mm pitch) and holykeebs' product photos (1.72 mm), so their pads fit both: 1.758 mm pitch about the row's shared middle, every pin within 0.21 mm of its pad's centre either way. Check a real driver against the footprint before ordering boards.
  • Under-board height: check that the driver (about 2 mm) clears the bottom plate.
  • Standoff length for the plate/PCB/bottom sandwich (M2 3 mm both sides expected for the 1.6 mm FR4 bottom).
  • Schematic: still the Corne Choc's.

Parts

102
QtyValueFootprintReferences
40Dkbd:D3_SMD_v2D1, D2, D10, D11, D12, D13, D14, D15, D16, D17, D18, D20, D21, D22, D23, D24 +24
40SW_PUSHholykeebs:SW_choc_v1_HS_CPG135001S30_1uSW1, SW2, SW10, SW11, SW12, SW13, SW14, SW15, SW16, SW17, SW18, SW20, SW21, SW22, SW23, SW24 +24
8h2holykeebs:M2_SPACERh2, h2, h2, h2, h2, h2, h2, h2
2M2_SPACERholykeebs:M2_SPACER,
2MJ-4PP-9kbd:MJ-4PP-9_1sideJ1, J3
2OLEDholykeebs:OLED_1side_1mm_holesJ2, J4
2ProMicroholykeebs:ProMicro_1mm_holesU1, U2
2SK8707-01 driverSK8707-01_driverA2, A4
2SK8707-01 sensorSK8707-01_sensorA1, A3
2SW_PUSHkbd:ResetSW_1sideRSW1, RSW2

More from dycli/petrock

1
  • 2 layers242.5 × 87.9 mmPetrock-42, the printed circuit board in 3D

    Petrock-42

    dycli/petrock

    Custom Keyboard

    102 parts

Similar boards

  • 2 layers208.7 × 393.8 mmFerris, the printed circuit board in 3D

    Ferris

    pierrechevalier83/ferris

    A low profile split keyboard designed to satisfy one single use case elegantly

    102 parts1.3k
  • 2 layers100 × 94.2 mmPin board 1 x2, the printed circuit board in 3D

    Pin board 1 x2

    rusefi/rusefi

    rusefi - GPL internal combustion engine control unit

    102 parts1.2k
  • 2 layers107.5 × 2.5 mmESP32Clock, the printed circuit board in 3D

    ESP32Clock

    hackclub/OnBoard

    💡 Join 1,000 teenagers and make your first PCB with a $100 grant!

    102 parts915
  • 2 layers110.3 × 171.8 mmECM DISP PANEL, the printed circuit board in 3D

    ECM DISP PANEL

    jrsteensen/OpenHornet

    OpenHornet 1:1 F/A-18C Simulator Repository

    102 parts431
  • 2 layers172 × 152.9 mmTrackpad, the printed circuit board in 3D

    Trackpad

    george-norton/peacock

    A big QMK powered trackpad

    102 parts309CERN-OHL-S-2.0
  • 2 layers118.1 × 101.6 mmTeensy eurorack, the printed circuit board in 3D

    Teensy eurorack

    newdigate/teensy-eurorack

    Hardware Design: Eurorack shield for teensy 4.1 with 14 in / 16 out analog channels

    102 parts259MIT
  • 2 layers157.5 × 115.8 mmTestjig, the printed circuit board in 3D

    Testjig

    plinkysynth/plinky_public

    a public release of the plinky sw and hw

    102 parts227
  • 2 layers75.2 × 61.1 mmHelios, the printed circuit board in 3D

    Helios

    Grix/helios_dac

    Helios Laser DAC

    102 parts132

Questions

How big is the Petrock-40 PCB?

It measures 242.5 × 87.9 mm and has 2 copper layers, 1.6 mm thick.

What parts does the Petrock-40 use?

102 parts. 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 Petrock-40 KiCad files?

From the dycli/petrock repository on GitHub, at the commit this page was made from: the board is pcb/dual/petrock-40.kicad_pcb and its schematic pcb/petrock-41.kicad_sch. PCBKit opens the board in the browser, with nothing to install.

Can I use the Petrock-40 design in my own project?

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