What it does
pico_spdif_recorder turns a Raspberry Pi Pico (RP2040) or Pico 2 (RP2350) into a dedicated S/PDIF-to-WAV recorder. Feed it a digital audio stream from a CD player, DAT deck, MD recorder, or any TOSLINK source, and it writes raw, untouched PCM data straight to a microSD card as standard WAV files — bit-perfect, with no host computer in the loop.
Key features
- Bit-perfect digital capture — 16-bit or 24-bit, 2-channel, at 44.1 / 48 / 88.2 / 96 kHz (and experimentally up to 176.4 / 192 kHz)
- Automatic sample-rate detection — locks to whatever the source is outputting; no manual configuration
- Smart silence-aware splitting — auto-starts on sound detection, auto-stops on long silence, and seamlessly splits tracks on short blanks (gapless, no samples lost)
- Manual split — instant, gapless track break via serial command
- Resolution toggle — switch 16-bit / 24-bit on the fly with a button or serial command
- NTP-synced timestamps — when built for Pico W and connected to Wi-Fi, recorded files carry accurate wall-clock timestamps (with timezone, on exFAT)
- Status LED — slow blink while recording, fast blink during background file housekeeping
- WAV Tagger companion tool — Python post-processor (in /wav_tagger) that merges/splits files based on YAML album metadata and writes UTF-8 ID3v2.3 tags
Hardware
Minimal external parts:
- Raspberry Pi Pico, Pico W, Pico 2, or Pico 2 W
- A TOSLINK receiver module (DLR1160 or equivalent) S/PDIF input (see the related pico_spdif_rx project for switchable inputs)
- microSD card socket (SPI wired — SD-XC / V30 class recommended)
- Optional: two tactile buttons (Start/Stop, 16/24-bit toggle)
A custom PCB (shown in the photos) integrates the TOSLINK receiver, microSD socket, and control buttons into a compact board that drops directly onto a Pico.
Bandwidth notes
The Pico's single-bit SPI interface to microSD is the practical bottleneck. 24-bit / 96 kHz is reliably stable on recommended cards (Samsung PRO Plus 256 GB, SanDisk Extreme PRO 256 GB). 24-bit / 192 kHz is achievable for short tracks but can drop samples when closing long-running files — Verbose mode reports real-time bandwidth headroom so you can see exactly how close you are to the edge.
Build & source
Full source, schematic, build instructions, and pre-built UF2 binaries are on GitHub: https://github.com/elehobica/pico_spdif_recorder
Built on the Pico SDK 2.1.1. Released under the BSD-2-Clause license.
Elehobica