Pi Zero 2 Music Player

Year:
2022
Small media player in 3D printed Case

We needed a new music player in our kitchen – but why would I buy one, when I can make one for three times the price? 😉

The system is:

We mostly use it to listen to Radio 6 Music, it can play any internet radio station, it also has space on the SD card for storing some favourite albums, and if we had a subscription to Spotify, it could stream that too.

Housing Design

The two-part housing was designed in SolidWorks and 3D printed in PETG on my Ender 3v2. I used it to keep my SolidWorks skills from going rusty; in total, it went through 5 or 6 iterations.

One design feature that I am particularly happy with is the flexing buttons built into the lid. There were a few iterations to dial in the clearances and tolerances to get the spring stiffness right.

A couple more iterations were spent tweaking tolerances to get the case as compact and close-fitting around the internal details as possible. Although it’s designed to be 3D printed, the final housing is pretty close to something that could be injection moulded; that’s a pro-industrial designer habit.

The latest version is available as 3MF files on Github: https://github.com/DrewBatchelor/Pirate-Audio-Volumio-box. If you make one, please share photos with me.

Hacking the Python Plugin Code

Compute screen displaying some Python Code in the editor Visual Studio code.

For software, I used Volumio 3 and the fab Pirate Audio Plugin by AxLED, which makes the hat work. I hacked AxLED’s Python 3 Beta to add more debounce to the buttons, improve the graphics display and layout to make them clearer and make the appearance look more like Volumio. This definitely pushed my Python coding ability further, and learned that I know nothing about the design of UI for small devices. I look forward to learning more about these in future. My updated “display.py” file and instructions on how I hacked it are in the code folder on GitHub: https://github.com/DrewBatchelor/Pirate-Audio-Volumio-box.

Pirate Audio Line Out Hat

A hand holding a small circuit board, with an audio jack and an LCD screen displaying "BBC Radio 6 Music"

I love this little Pirate Audio board. Functionally, it’s great, the manufacturing quality is great! The audio quality is great! It’s a super nice way to add a small screen, audio jack and buttons to a Pi.

Volumio 3

I used Volumio 3 software on the Pi, which is an open-source media player and streamer. I’ve been using Volumio for years as a music player above my desk, It’s an amazing project, reliable and responsive.

In May 2022, this project was featured in MagPi Magazine issue 117.