Pi Zero 2 Music Player

Small media player in 3D printed Case

In 2022, 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 more clear 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, 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. However, the Pirate Audio Hat was never designed to be mounted in a box, which is OK, but is a missed design opportunity. I would love to see an updated version of the board that has a couple of minor tweaks to the geometry and layout:

  • It’s awkward having the power cable and the audio on different sides (west and south), once it’s pugged in, it makes the package unwieldy. Also in the current position, the audio jack is too close to the SD card of the Pi. It was a real fight to fit the housing around these 2 parts. If it were possible to move the audio jack next to the USB ports, that would be better.
  • The buttons are very close to the LCD, this was limiting when designing the buttons into a housing, a couple of mm clearance between the buttons and the LCD would give more design freedom.

Volumio 3

I used Volumio 3 software on the Pi, this 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.