Jan Dvořák's Software-Defined Radio Is Built From a Raspberry Pi Pico — And Very Little Else
A Raspberry Pi Pico, a capacitor, and a resistor — plus a suitable antenna — are all that's needed to build this simple SDR project.
Developer Jan Dvořák has designed one of the cheapest software-defined radios (SDRs) you're likely to find — requiring nothing more than a Raspberry Pi Pico development board, a resistor, a capacitor, and a suitable antenna.
"I have never built a radio before," Dvořák writes of the project's origins. "As a software developer I have had my share of building networking applications. Even ones that made use of Wi-Fi or cellular networks. But I have never really understood how those radios worked at the level where software met the electromagnetic field. On the transmitting side, it ends up being fundamentally pretty simple. Just toggle a GPIO pin at the correct frequency, connect piece of wire as an antenna and get on the air. [But] receivers are hard."
Dvořák began by researching what others had done, and found projects that work using a field-programmable gate array (FPGA) and a handful of passive components. "The only issue is that their FPGA always had a high speed comparator to use as a one-bit ADC [Analog to Digital Converter]," Dvořák notes. "And the chip I currently enjoy messing around with does not have one. So how would one build a digital radio receiver using RP2040?"
The RP2040, a $1 microcontroller at the heart of the $4 Raspberry Pi Pico, has an analog to digital converter on-board, but at a 500kHz sample rate it's not fast enough for radio work. The chip also has programmable input/output (PIO) blocks, capable of creating state machines that can control the input/output pins — and it's this which delivers the performance required for the project, with a little help from a capacitor acting as a simple low-pass filter.
Using the RP2040's PIO blocks, rather than the ADC, Dvořák was able to create a direct sampling receiver — meaning mixing and filtering are handled in software rather than hardware, running on the RP2040's Arm Cortex-M0+ microcontroller cores. "Raw IQ samples are sent over USB CDC to my PC," the maker explains, "picked up by a small Python script, turned into TCP stream and processed with GNU Radio, which provides a nice graphical application called GNU Radio Companion that can be used to construct signal processing pipelines and output the audio to the system speakers."
The full project write-up is available on Dvořák's blog, with the source code available in a git repository under a fully-permissive public domain license. "Yes, it’s noisy," the developer admits, "but isn’t it still pretty cool that you can do that with a $1 general purpose microprocessor, two passive components and an antenna?"