Engineering case study · Ryan Blake Bussey
Portable Embedded Radio
A standalone audio device that combines physical playback controls with smartphone-based media management.
Embedded Linux · Custom PCB · Python · Flask · Mechanical design
My contribution: Combining Raspberry Pi firmware, custom electronics, a mobile web interface, and a SolidWorks-designed enclosure into a portable audio system.
The goal: simple controls, flexible media management
The project brings two ways of interacting with an audio device together: a single hardware button for playback states and a mobile-friendly web interface for managing content and adjusting playback.
A Raspberry Pi Zero 2W runs the playback software and web server. Custom electronics provide the audio output and regulated power, while a 3D-printed enclosure brings the components into one physical device.
Hardware: from digital audio to a physical device
- Compute: A Raspberry Pi Zero 2W provides embedded Linux and Wi-Fi connectivity.
- Audio output: The Pi sends I2S digital audio to a MAX98357A amplifier, which drives a 4-ohm speaker.
- Physical input: A GPIO-connected push button controls playback states.
- Custom PCB: Designed in Altium Designer to integrate the electronics and a regulated 5V supply.
- Enclosure: Designed in SolidWorks and 3D printed to house the PCB, Pi, speaker, and power system with appropriate component spacing.
Audio path: Raspberry Pi I2S → MAX98357A amplifier → speaker.
Software architecture: playback and web control
Firmware layer
radio.py handles GPIO button input, playback modes, playlist shuffling, and a persistent mpg123 playback engine. It also monitors volume changes during playback.
The playback state machine has three states: off, vocal playlist, and instrumental playlist.
Web server
server.py uses Flask to provide a mobile-friendly control interface. Users can view the current song, upload MP3 files, select playlists, skip tracks, and adjust volume from a phone.
Startup
Separate systemd services, radio.service and radio-server.service, start the playback layer and web server automatically.
Using the device
- Power on the device and allow its playback and web services to start.
- Use the hardware button to move between the available playback states.
- On the local network, open
http://radipi.localfrom a phone, or use the NFC tap-to-open control-page feature. - Upload MP3 files, choose a playlist, and adjust playback through the mobile interface.
The documented media pipeline also uses yt-dlp and ffmpeg to retrieve and convert authorized audio into MP3 files for a selected playlist. Only use media you have permission to download and play.
Engineering across hardware and software
This project spans more than the playback script. The GPIO input, Linux services, digital audio path, web controls, PCB, and enclosure all contribute to how the device operates.
- Two control surfaces: Physical input supports basic playback interaction, while the phone interface handles richer media-management tasks.
- Separate responsibilities: Playback logic and the Flask server run as distinct components.
- Physical integration: PCB layout and enclosure design account for the electronics, speaker, power system, and component spacing.
Documented capabilities and remaining work
The project README describes the hardware, playback states, web controls, media pipeline, and service setup. It does not provide measured battery life, audio performance, startup time, or long-duration reliability results, so those outcomes are not claimed here.
Project photos are not included in the supplied README. Future improvements listed there include multi-room streaming, Bluetooth audio, an OLED track display, battery-powered operation, and a playlist-management interface. These are planned ideas, not current capabilities.
Source and documentation
This case study is based on the supplied Portable Embedded Radio README. Implementation details and setup instructions are available in the project repository.
Technologies: Raspberry Pi Zero 2W · Python · Flask · Linux · systemd · GPIO · I2S · mpg123 · Altium Designer · SolidWorks · 3D printing