I’ve been toying with the idea of using a Pi Zero to build a wireless music streaming box for a while. My original plan was to use cherry wood and metal to give the box a Hi-Fi look, but the wood I ordered from Rockler ended up getting delayed, and isn’t coming until this Friday (10/6).
While looking at different boxes at the container store I came across a hockey puck display case made of acrylic that fit my parts and would provide an opportunity to etch the top. From a design perspective, I liked the idea of sticking a single metal knob onto the front of the box to control the volume and having the rest of the box remain clear to show off the “guts”.
I definitely bit off more than I could chew for a 1 week project. I continued to add complexity (why not add a powered amp on Tuesday!), despite not having a ton of time. I spent around 20 hours on this project, 3/4 of that was the “comp” side–both hardware (lots of wiring + soldering) and software (I now hate ALSA in linux). Ultimately, if I had scaled down the complexity this would’ve been more successful. That said, I’m fairly happy with the results as a starting point for a longer project.
- Raspberry Pi Zero W
- Pimoroni Phat DAC
- Acrylic hockey puck case
- Surface mount parts (10k pot, DC jack, 1/8″ stereo jack)
- Analog to digital converter (MCP3008)
- 5v voltage regulator
- Adafruit 20W class D amp
- Perf board + wiring and solder
On the electronics side, I started with a lot of components I already had on hand:
The Pi doesn’t have any analog inputs on the GPIO header, so I had to use an analog to digital chip into my circuit in order to control the volume with a potentiometer. The volume control happens at the software level via a Python script I cobbled together from an Adafruit library:
Poorly soldered (but working) header pins:
I put it all together on a perf board:
Since I had previously soldered pins into the DAC I had to cut some out with clippers to make the A2D chip pins fit:
With the basic hardware setup, I started on the box by drilling a hole for the pot in the center of the case:
The next day, I was digging through stuff at home and came across a 20w amp I bought from Adafruit a while ago. “Why not make this project more complicated, even though you have no time to work on it?” I thought. I then spend 2-3 hours pulling off surface mount parts, attaching panel mount parts, and wiring the output to a 5v regulator circuit to power the Pi + DAC:
Wired up with sweet metal knob attached:
In my haste to drill a spot for the DC jack, I cracked the case. Fortunately, the corner remained intact, so I was able to continue for the time being:
I drilled the hole for the audio jack freehand using a dremel:
Aaaand my surface mount audio jack doesn’t fit:
Testing the fit. Unfortunately, the way I wired the 12 -> 5v regulator to the perf board really screwd things up, making for a sloppy fit. If I had taken more time to plan it out I could’ve avoided this:
I laser etched a Pi logo onto the top of the case @ 90%/40%:
Not particularly happy with the “final” product, but it’s a start. I bought another hockey puck case and am going to redo this minus the amp + voltage regulator and clean up the wiring. I will probably also add some small spacers between the bottom of the box and the Pi and perf board to give it a cleaner look.