This project brings together a great mix of raspberry pi coding and woodworking, two amazing hobbies that have endless applications. If either of these things are completely foreign to you then don’t be intimidated!
Building your own DIY raspberry pi Spotify jukebox is a great project for both woodworking and raspberry pi coding and can be realistically accomplished by anyone with enough determination.
This DIY raspberry pi Spotify jukebox project was brought to us by reddit user justthatoneotherdude, who did an amazing job of explaining each step and documenting his build process. Let’s get into it!
DIY Raspberry Pi Spotify Jukebox Build
This is a music box that I finished earlier this year, after nearly a year in the idea-code-build cycle (mostly thinking of ideas and coding). Inside is a Raspberry Pi running Volumio, which links to my Spotify account. The four smaller knobs are linked to Spotify playlists, and the bigger center knob adjusts the volume. Inspiration (and lots of the code structure) comes from this post by /u/auntie-matter:
While I don’t claim to be nearly as skilled a woodworker as he/she/they are, I’ve made some tweaks and added some features that work better for my needs. Many thanks to them for the basic how-to. The code that I’m running is here: http://pastebin.com/73AQDB7u.
I’m also making use of the spop client by Schnouki on Github (https://github.com/Schnouki/spop), which I use as the go-between between Python and Spotify. Volumio v1.55, the OS that I’m using on the Pi, is available here: https://volumio.org/. I had to do some trickery to get the GPIO pins to work with it – I don’t remember the exact methods, but they can probably be found with some Google-fu.
The (small) workshop. I made a large Home Depot run to pick up the first set of materials – as with every DIY project, I would do at least 2 more. On my laptop you can see a Sketchup draft of the box that I used to make my cut list.
Starting to glue pieces together with my brand new square. I thought about doing mitered corners, but didn’t have the tools to really do the job well, and I’d rather have good non-mitered corners than crappy mitered corners. Also, I’d give my kingdom for a drill press. Seriously.
Glued the switches into position – the threads weren’t long enough to go through a 1×3, and I didn’t want to drill too much into the front piece. So, superglue it is.
Got the knobs on eBay. They’re nice and solid and feel great to turn. I found somewhat similar ones on amazon here if you’re interested.
Gluing more of the box together. Thank god for clamps.
Had to do some fine sanding work to get the switches to fit right.
The prototype breadboard. At this point, I had already pulled the microcontroller out…
…and put it in here. All the circuitry runs off this one perma-proto breadboard from Adafruit (Amazon link).
Gluing the plexiglass into place. I basically cut out a big “u” shape with a jigsaw, leaving factory edges on the 3 outside edges. Add some epoxy and clamp overnight.
Meanwhile, enter my idea for a removable bottom for access to the inside. The bottom and rear pieces would be glued together and slide onto the main chassis, in effect being locked in by pins from two directions. More on that later.
Routing out a chunk from the bottom for my IKEA Allen keys to sit in.
Gluing the bottom together, with the plexi still drying in the background. Had to buy more clamps on my second Home Depot run. The white is a slab of marble I found in this workshop when I moved in and that works great as a flat surface for lining things up.
Test fitting the lid on. This was going to be permanently epoxied in place, so before I did that, I wanted to rout out a recessed area for the LEDs to sit in.
Freehanded this recessed lip for the LEDs to sit in. They’ll be glued to the inside of the plexiglass…
…as seen here. Test fitting a small strip of the LEDs on the recessed gap I routed out, and they fit great. The LEDs (Dotstars) are centered perfectly on the 1/4″ plexi.
Aaaand the old epoxy-and-clamp routine is back.
Meanwhile, start to cut out circuit ports from the back. Because of my locking mechanism for the back, I needed all the ports to be centrally located.
Pictured here are power, sound, USB, and HDMI extenders. An Ethernet extender will also sit in the middle.
Testing to see what my options are for mounting the interior electronics. The whole box is only 12″x9″, so things were a bit of a tight fit.
Wiring the switches up, being careful to use the breadboard as a guide for what goes where.
Returning to my locking mechanism for the bottom and rear of the DIY raspberry pi Spotify jukebox. Here I’m drilling holes for two IKEA Allen keys to sit in, which I glued to the inside of the front. That way, the bottom slides on from the back.
Allen key gluing process. It was finicky, getting them to line up with both the holes and grooves, but everything fit together eventually.
It’s alive! Testing the circuitry for my Pi’s switches and LEDs. The allen keys from before can also be seen glued against the front of the box.
Different angle. The LEDs do a slow rainbow fade while songs are playing. Additionally, there is a fixed color LED above each knob that is activated, and a 10-LED volume indicator that appears whenever the middle knob is used to change the volume.
The last part of my locking mechanism. Four door hinge pins, with the mounting holes juuuuust wide enough to keep them from falling out when the box is turned. Had to add a bit of tape here and there to the pins to get them the right snugness.
Test fit with more electronics. Starting to get crowded in there. A lot of the wire is cut to extra length because everything attached to the back of the device is attached permanently, meaning there has to be room to move the lid out of the way when accessing the innards.
Debugging. I don’t have an external monitor, so I took over the TV in the living room.
Final view of the inside the raspberry pi Spotify jukebox. Pi is mounted with nylon bolts that are superglued to the lid (so it actually hangs upside down for normal operation). The circuit board ended up not needing anything securing it due to the sheer volume of wires holding it in place anyway. Note the USB audio card, because the Pi’s onboard audio jack sounds like crap when changing the volume.
Gluing the bottom to the rear featuring The Clamping 2: The Re-Clamping.
Finished! Unfortunately, my phone is bad at capturing LED colors, so the picture isn’t that great. But it’s currently on a yellowish color.
View of the back. The red button, when held down for 5 seconds, activates a shutdown sequence (illustrated by LED shifts) that enable power to safely be removed from the Pi. The blue button toggles power to-from the Pi; the LEDs and button lights receive power constantly when plugged in – I didn’t wat to run too much current through the switch.
I used Ethernet for the internet connection because the unit is going to sit in my entertainment center anyway, and getting a WiFi USB dongle to work was not my top priority.
The HDMI port is empty because the extender I bought was too short to connect without putting serious pressure on the Pi’s HDMI port. I’ll have to get another one off Amazon sometime.
And here it is in its home with my speakers and TV. About one year from start-to-finish, which mainly consisted of 3 months brainstorming, 8 months on-and-off coding, and ~2 weeks of final construction.
Also, for when I’m feeling lazy, Volumio also comes with a built-in webserver accessible from any web browser on the local network. So, I can adjust volume or playback without getting off the couch, if needed!
Thanks for reading! I hope this DIY raspberry pi spotify jukebox build was both informative and entertaining. If you liked this post check out our other DIY projects!