It’s been a long time since I last blogged about a technology-related thing I did. I miss that. After talking politics, public policy, and everything else that’s wrong with the world, let’s talk about something cool and exciting – hacking!
During my recent trip to Alberta I got to tour some of the maker spaces and hacker labs. I got inspired – I wanted to build something cool. For years I’ve had little bits of technology sitting around from various projects that were started and stopped. One of my limits was the space I’ve had. When you live in an apartment it’s tough to justify keeping lots of tools around. Plus cleanup can be quite messy.
When I got home, my girlfriend and I talked about her need for a portable speaker for playing music at dance lessons. It got me thinking. “I have an old model 1 Raspberry Pi that I’m not using. I’ve also got an old, cheap guitar amplifier. Maybe I could build a powered Wi-Fi speaker that we could stream to?”
So that’s exactly what I set out to do. I was finally at the magical intersection: I had the tools to pull off the job, the equipment needed, and the skills and patience to pull it all off.
Step 0: Prepare the Pi
I decided to use Pi MusicBox for this project. It pretty much worked out of the box. Simple configuration (had it on the Wi-Fi on the first try), and I was able to stream from the iPad direct to it. The Pi was ready in about 10 minutes actually.
Step 1: Modify the amplifier
The first step was to connect the Raspberry Pi to the amplifier. Since this was a proof of concept, I wasn’t too concerned about the quality of sound. I decided the easiest way would be to solder a 1/8″ (headphone plug) wire to the input jack on the amplifier. I connected both left and right channels together (it’s a mono speaker) and soldered them to the input jack. That way the front input is still usable. I then tacked the wire down with hot glue.
Important disclaimer notice: this particular amplifier directly exposed the mains (120V AC) input. I’ve got lots of experience with electronics. Do not poke around randomly if you’ve never done this before. That’s more than plenty of power to kill you very quickly.
Step 2: Cut a hole for the Raspberry Pi
One of my objectives for the speaker was to be able to plug in a USB thumb stick and play music from it. Since I didn’t want to add a separate jack for USB, I decided the easiest route was to cut a hole in the back of the amp where the Pi would stick out.
I first traced out the rough shape of the Pi with a permanent marker. Then I drilled out pilot holes to help get the cuts started. Finally I attached a reinforced cutting wheel and started hacking away.
A few things I learned while using the Dremel to cut this hole.
- Wear a mask. A lot of dust is going to get kicked up.
- Don’t use a cutting wheel. Use a cutting bit and a press attachment.
- Do it all outside. I ended up moving outside after the initial holes were drilled.
A dry fit later and it all came together nicely! Looks pretty good too.
Step 3: Assembly and Details
The assembly was rather simple. I added 3M Command Strips to the underside of the Pi case to keep the Pi secure.
The space was large enough for me to run an HDMI cable and the Power Supply for the Pi on the outside.
After a few more dabs of hot glue to keep the audio cable secure, I screwed everything back together.
What’s next for this speaker? Well, there’s a few things I don’t care for right now.
- The speaker included sucks. It produces okay sound when the settings are just right, but it’s not great. I’d like to replace it with a full range driver at some point.
- Two plugs. The amp has one plug and the Pi power supply has another. I’d like to add an internal power strip that the amp and Pi plug into, then the power strip has one lead coming out that plugs into the wall.
- The HDMI wire just hangs out there. I really only need it for debugging. I might add an HDMI keystone jack at some point.
- No indicator that the Pi is ready. I’d like to add an LED or some other status indicator to let me know the Pi is booted and ready to rock.
In the meantime, I’ve drawn up plans to build a small audio system for our kitchen. I’ll post about that soon.
Have fun hacking your Pi! Have you tried something like this before?