Data Science Snippets

Raspberry Pi Speakers

Okay, so this may not be specifically related to data science but still the tech world nonetheless. For my brother’s very belated Christmas present, I turned old Sony speakers gathering dust in the basement into newfangled wireless ones using a good ole Raspberry Pi circuit board. Mind you, it wasn’t the cheapest project in the world, but the self-satisfaction and recycling an old item is worth it, in my opinion. Below is my best attempt at a tutorial.


I have attached links in case you want to buy these products online and price for reference.
18-Gauge Speaker Wire – $10.98
Wire Strippers – $11.79 (you can use scissors if you want as well)
• Old Speakers (mine were Sony 100V 8ohm)
HiFiBerry Amp2 – $53.21
Raspberry Pi 3 – $41.99
MicroSD Card – $12.93
• Micro SD Reader – this depends on whether you use a Mac – $12.99 a PC – $5.99 or what ports your computer has (i.e., USB C versus USB)
18V 5.5mm Adapter – $4.99
• Screwdriver (or a thin knife)
USB Keyboard – $19.99
Mouse – $8.99
HDMI Cord – $7.82



Links to download the necessary software.
balenaEtcher – to download software onto your microSD
Volumio – base software used for this project “The free and open source audiophile music player designed to maximize audio quality.”


I am a big fan of lists, and to make this project as simple as possible, I will walk you through a step-by-step guide.

I like to complete the software installation first so you can multitask with the hardware while waiting for the downloads to complete.

  1. On your home computer, download balenaEtcher.
  2. Once that completes, also download Volumio.
  3. Plug your microSD card into the computer. Open balenaEtcher and use the software to download Volumio onto your microSD drive.

While this is going on, you can get started on the hardware.

  1. Configure the HiFiBerry Amp2 on top of the Raspberry Pi 3. Simply pop the Amp2 Housing onto the GPIO pins of the Pi. Then use the clear screws that come with the Amp2 to connect the boards in all four corners.
  2. Measure out your speaker wires to the desired length. I had dual speakers, so I measured out two wires. The length depends on how much wire you want between the speaker and the Pi configuration. I opted for around two feet. Once you cut the wire, strip the 18 AWG wire on both sides to expose the wire.
  3. Plug your speaker wire into the back of your speaker, depending on the plugins available. Silver wire is positive (red plugin), and copper wire is negative (black plugin).
  4. Screw the other end of your speaker wires into the rectangular housing on the Amp2. Printed on the board are the polarities of the hookups.
  5. Now the software should be done. Plug your microSD card into the slot on the bottom of the Pi.
  6. BONUS: Definitely not a necessity, but you can construct a box to house the Pi/Amp set up so that it doesn’t distract from the look of the speakers. I painted a wooden box black and drilled holes in the back to allow the power supply and speaker wires to protrude out the back. I also drilled holes in the bottom of the box in a grid pattern to allow airflow. This may not be the best fire safety solution, so take proper precautions.

Now for the fun!

  1. Plug the AC power cord into the Amp2 and a power source. Plug the HDMI into the Pi and a monitor. Also plug in your USB keyboard and mouse to the Pi. Turn on your monitor, and if all goes as planned, you should see the Volumio software appear! It may take a bit of time on the first boot and will make a beautiful “doodledodo” sound when it kicks on.
  2. In the Volumio terminal, type in the default username and password (hint they are both volumio). To be honest, I didn’t do anything further with the terminal here but may go back and tinker a bit later.
  3. The reason I opted for the Raspberry Pi 3 is the wireless LAN compatibility. This means that Volumio will automatically create a WiFi hotspot using the built-in Pi hardware. Next, check the device you want to hook your speaker up to for the time being. Later you can access it from different devices as long as you are connected to the same WiFi network – the device can be a phone or computer. Go to the WiFi settings of the device you chose, and you should see a WiFi network called “Volumio.” Connect to it; the password is volumio2.
  4. Go through the setup wizard that pops up upon connection to begin; it will ask to attach to a local WiFi network. If you get disconnected, you can continue the process through the local address in your browser (again phone or computer) at http://volumio.local (I recommend using Google Chrome). This address can be reconfigured to something personalized and quirky throughout the setup wizard under the player name (http://volumio.local/plugin/system_controller-system). Just remember that will change the local address you use to be http://yournewname. This address will have the Volumio user interface for adjusting settings, installing plugins, and interacting with music (unless you stick to Airplay on your Apple device).

  1. For general playback options, I chose the output device to be the HiFiBerry DAC Plus, turned on the I2S DAC, and my model was HiFIBerry DAC Plus. My playback mode was set to DSD Direct.
  2. On the address mentioned above, http://volumio.local/plugin-manager, you can now go and install plugins in the plugin window. I would recommend installing and enabling the Spotify and YouTube Playback plugins. You can then log in to your Spotify account.
  3. Reboot the machine to solidify the new settings (through the shutdown tab). Once the device is rebooted, you can use your phone to Airplay, either Spotify or Apple Music! I believe there is an Android equivalent called AirSync? Just again, make sure you are connected to the same WiFi network. If you need to change the WiFi on the Volumio speakers, you can do that through the Volumio local address http://volumio.local/plugin/system_controller-network. Alternatively, you can use the Spotify or Web Radio tabs on the Volumio user interface http://volumio.local/browse.
  4. Keep experimenting around, congrats you have done it!

Fun features I have found so far… You can customize the UI to whatever you fancy. There are additional plugins for more functionality and features on the device (for an example an equalizer) – some are an upgrade cost but the necessary ones are free. You can rename your hotspot, local address, passwords. Additionally you can access your last played tunes on the “Last 100” tab. You can also favorite songs and create playlists on the interface. Also if you wanted to go more old fashioned you could download songs onto the Pi itself instead of Airplay features.

So, the question you all have been waiting for… How is the sound? I know it probably has to do a bit with the base speakers you work with, but boyyy was I impressed. At a mere 50% juice they are L-O-U-D and the quality is quite literally music to my ears. At the end of the project, I have fully decided that there is no way I can just make speakers for my brother, I am going to have to do the same for myself. The customization possibilities are impressive which is not as possible with just your standard everyday speaker set. Not to mention the retro look is superb. If anyone has extra speakers lying around – I know a gal who would use them.

Big thanks to Rob Campbell for the blog post that I followed for the majority of this project and for answering my question so quickly (I got hung up on screwing in the speaker wires thinking I needed wire pins).

As always, reach with any questions and concerns, I would be happy to troubleshoot!

2 thoughts on “Raspberry Pi Speakers”

  1. Hey Sam, great read. I think once this covid stuff is over I think I’m gonna go garage sell hunting for some old speakers and make a project like you. I’ll let you know if anything good comes of it. Also, do you look at your Facebook data? I noticed the url has a trackingcode on it from when I clicked from there. Also, how does your website save a name and email with the checkbox below? If it’s with a cookie, cookies are gonna start going away in a couple of years.

    1. Wohoo yes I would love to hear your results! It is super fun and would be curious to hear results of someone else’s speakers. What specifically about the Facebook data? The data linking to my blog? I am not sure about the website saving name/email. It may have to do with your linked name on your email account?

Leave a Reply

Your email address will not be published. Required fields are marked *