A pocket-size, playable electronic drum card built on RP2040 + CircuitPython. Touch the printed pads to play stereo samples. Designed to be reproducible, low-cost, and instant-on.
- MCU: RP2040
- Storage: 16 MB QSPI flash (W25Q128) for firmware + samples
- Audio: PWM stereo -> 2-pole RC low-pass (~15 kHz) -> op-amp buffer -> 3.5 mm jack
- Input: capacitive pads under full-color silkscreen (no external touch IC; CircuitPython TouchIO)
- Power: USB-C (5 V)
- UX: status LED blinks on hit; instant boot (no OS)
Looks like a toy, plays like a real instrument. Great as a memorable handout and a small teaching platform.
This project has a Linux sibling - the version I started with. It's interesting because it puts a full Linux system on a business card and uses FluidSynth for sound synthesis. If you want to explore OS-level audio, services, and tooling, check out the Linux drum card as well.
- Fast prototyping: CircuitPython, no heavy toolchain
- Instant-on: no boot delay
- Cost: ~$1 PCB (small runs) + ~$5 parts (DIY assembly); SMT assembly adds cost
/src/v3 # CircuitPython code for boards marked v3 (code.py, samples)
/src/v4 # CircuitPython code for boards marked v4 (code.py, samples)
/hardware # Schematics/PCB
/licenses # Full text of all the licenses used
LICENSE.md # License matrix
- Touch pads: RP2040 reads pad capacitance via
touchio - Triggering: software edge detect
- Mixer:
audiomixer.Mixer(8 voices, 2 channels, 22.05 kHz, 16-bit) - Output:
audiopwmio.PWMAudioOutfeeds the analog filter/buffer
- Get CircuitPython UF2 for RP2040-Plus 16 MB (Waveshare) from this repo or circuitpython.org.
- Hold BOOTSEL, plug USB -> drive RPI-RP2 appears -> drag-drop the UF2.
- Board reboots as CIRCUITPY. Copy
code.pyand the/src/v3or/src/v4folder content to the drive (see the board version on the silkscreen) - As soon as
code.pyis saved, it auto-runs. - Optional: open the USB serial port (115200 8N1) to see simple debug logs.
- RP2040, W25Q128 (or compatible 16 MB QSPI)
- USB-C (power only), 3.5 mm audio jack
- RC filter (two RC poles per channel) + op-amp buffer
- Passives, LED
- PCB with multi-color silkscreen
Indicative DIY cost in small runs: ~$6 per card (PCB ~$2 + parts ~$4-5). SMT assembly increases cost.
- Software (
/src): GPL-3.0-only - Hardware (
/hardware): CERN-OHL-S v2.0 (you're required to publish modifications)) - PCB art under
/hardware, except branding (see below): CC BY-NC-SA 4.0 - Branding (name/logo/branding/background/real QR): not licensed, all rights reserved - see licensing
The branded front artwork with my name/logo/QR is for illustration only and not licensed for reuse. If you need to reference my branding beyond editorial use, please contact me (see licensing).
- CircuitPython and its audio libraries (
audiopwmio,audiomixer). I am truly impressed by lightweigt CircuitPython approach, powerful libraries, and how easy it makes developing without even installing any toolchain - Thanks to the Raspberry Pi community and readers who improve the design
This is an independent project developed in my personal time. I'm happy to share more details, provide background materials, or support coverage of the project in any form - whether it's for a blog, article, interview, or showcase.
I'm also open to participating in exhibitions or events with my instruments and live demos - it's always pleasure to show these devices in action.
If you're working on something similar or want to collaborate on embedded music tech, feel free to reach out!
More about my work and contact info: midiaccordion.com