Skip to the content.

Stage 2: sensed cardboard mock-up

Revised 4 Dec 2026: no cardboard. Each pad is now a printed skin, curved to the drum scan, on a flat sensor tile, held by a printed frame. Every part prints without supports and carries over into the full model. See PLAN.md. The cardboard build sheet below is kept for reference.

Part of deepPan. References in brackets point to REFERENCES.md. Stage 2 adds a hit sensor under each pad of the stage 1 cardboard mock-up, then learns to combine the drum’s signals with the active sticks’ IMU. The full reasoning is in the stage 1 plan. This page is the build sheet.

Phase 2 multiplexer wiring

The mock-up

Real deepPan layout for the mock-up

Electronics

Part Qty Have? Note
Raspberry Pi Pico 2 1 yes (2) ADC0/1/2 (GP26/27/28) read the three muxes; GP10–GP13 drive S0–S3
CD74HC4067 16:1 analog mux breakout 3 no One per ring: outer O0–O11 → ADC0, central C0–C11 → ADC1, inner I0–I4 → ADC2; 3V3, EN to GND, 100 nF decoupling
Piezo disc 29 9 One per pad, under the centre
Input clamp per pad: 1N4728 (3.3 V, 1 W zener) 29 yes (1N4728–1N4737 kit) Protects the mux and ADC: see below
Peak-hold per pad: 1 kΩ, small signal diode (e.g. 1N4148), 10 nF, 1 MΩ 29 sets no Holds the peak for ~10 ms, so the scan can’t miss a hit; tune on real pads
eBay piezo shock modules (digital out) 6 yes Fallback for timing-only pads; power from 3V3

Input protection. A hard hit can drive a piezo to tens of volts, but the CD74HC4067 and the Pico’s ADC tolerate only a little above their 3.3 V supply. Each channel therefore runs (zener [R12], rectifier [R13], mux [R11]): piezo → 1 kΩ → 1N4728 zener to GND → rectifier diode → 10 nF ∥ 1 MΩ → mux input. The zener clamps the input node at about 3.3 V and, conducting forwards, at about −0.7 V; the 1 kΩ limits the clamp current. After the rectifier’s drop, the held voltage can’t exceed about 2.7 V.

The zener sits before the rectifier on purpose. A 1 W zener’s leakage (up to ~100 µA near 1 V, per the 1N47xx datasheets) would drain the 10 nF hold capacitor in well under a millisecond if it were on that node; in front of the rectifier, the diode blocks it. Its leakage still loads the piezo slightly, which may soften the quietest hits: measure that in milestone P1, and if it matters, swap in a dual Schottky clamp (BAT54S to 3V3 and GND) at the same node. Only the 1N4728 suits this circuit: the rest of the 1N4728–1N4737 kit (3.6–7.5 V) clamps too high for 3.3 V inputs.

Diode orientation

The Pico scans every channel in a loop: set S0–S3, let the mux settle, read ADC0, ADC1 and ADC2. It reports a hit when a channel’s held peak rises past a threshold, sending the pad, amplitude and a microsecond timestamp over USB serial to the host.

Fusion and self-calibration

Each signal is a noisy clue. Piezos pick up crosstalk from neighbouring pads, the stick’s yaw drifts and the timing jitters. The host matches stick hits to drum hits by time and multiplies the likelihoods. When the result is confident, the strike point is known, and the tip-on-surface constraint recalibrates the stick (yaw offset, pivot, length, mounting).

Fusion

Self-calibration loop

Milestones

# Milestone Test Pass mark
P1 One pad Scope or log one piezo through its clamp and peak-hold; soft to hard hits Peak tracks strength; held for the scan interval; never above ~2.9 V on the hardest hits; soft hits still register with the zener fitted
P2 9 pads, one mux Hit each pad 20 times; log all channels Crosstalk matrix measured; the struck pad is the largest ≥ 95% of the time
P3 Time sync Stick and drum log the same hits Hits matched one to one; offset and jitter measured
P4 Fusion Prompted test on the 9 pads with and without the drum Fused accuracy beats the stick alone and the drum alone
P5 Self-calibration Play a 10-minute free session with no prompts Stick accuracy holds or improves without recalibrating
P6 All 29 pads The other two muxes and the remaining piezos P2 and P4 hold across all three rings

Piezo triggers through a multiplexer are standard in DIY e-drums: HelloDrum [R24] supports muxed piezos, and Edrumulus [R25] is a reference for trigger detection and crosstalk handling. The pad positions come from deepPan’s own stage 3 data [R1, R2].

Results go in results/.