Raspberry Pi Audio Streamer? Why not!
Dear Chromecast Audio — you’ve been faithful for a long time, but it’s now time to retire. Pi, you’ve got some big boots to fill.
So, here’s the thing. I’ve got a decent little Hi-fi setup in my living room. Every bloke needs one. I’m by no means an audiophile, but It’s typically the first thing I see in the morning, and the last thing before bed. All the while, providing me with a great deal of enjoyment with its sonic prowess. For those interested, the speakers are a pair of Bowers & Wilkins 764s, powered by a Rotel RA-10 stereo amp. I purchased this kit around the same time I purchased my second hand Fiat Coupe Turbo during an early 20s crisis. Turns out there’s more fulfilling ways to spend your money. After selling the Fiat I went travelling which was a life changing experience and far better use of spare cash — but the Hi-fi lives on — unscathed — after all this time.
More to the point, I almost exclusively listen to music through Spotify via a Chromecast audio attached to the amp as a photo input. It’s a setup that has worked very well for a number of years. For those that don’t know, Chromecast audio was is a sibling to the full-fat Chromecast; a HDMI device for ‘casting’ media to your telly over the internet. The Chromecast audio worked in the same way, only as you may have guessed, was specifically designed for streaming music from Spotify, Google play Music (no more), and other streaming service that supported the format. It was an extremely affordable (£20) way of adding reliable audio streaming to your existing Hi-fi. Not bad Google, not bad.
Google discontinued the Chromecast audio a couple of years back. Tragic, I know. I can only assume the audience who would be interested in such a device was simply too niche to justify the ongoing development and support. I guess I’m now a dwindling member of the CCA appreciation club — I’ve waited many years to have an exchange with another CCA owner to share our experience, but I’m yet to have that encounter. I guess that says it all really. Fair play Google, fair play.
One of my issues with the Chromecast audio was that the built in DAC wasn’t really up to much. Quick lesson on DAC’s incoming... A DAC (Digital to Analog Converter) is a device which takes digital audio (like an MP3, or CD), and converts it into an analog audio signal. Your smartphone, MP3 player, Chromecast audio, or anything else that has a 3.5mm headphone jack has an internal DAC. Why? Because your headphones or external speakers expect an analog signal in order to turn it in to sound. Inversely, your dads record player doesn’t need a DAC because it’s input source (the record) is already an analog input — unlike your MP3s. Now wasn’t that interesting? Nope, thought not.
The sound quality when using a device which plays digital audio differs vastly based on quality of the DAC. Most consumer DAC’s are not designed with premium audio quality in mind — they are there simply because they need to be in order to function. Therefore, a cheap, ‘stock’ DAC will not do your sweet, sweet B&W 764s much justice. To help mitigate this problem, I bought an external DAC for the Chromecast audio to help improve audio performance. It worked, and I’ve been relatively happy with the audio quality of the CCA / DAC cocktail since the upgrade.
The problem I’m trying to solve is 2-fold. Firstly, I’ve ended up with this truly terrifying nest of cable which looks something akin to the demon-child of Gravelly Hill interchange. And whilst functioning, doesn't do my OCD much good. The other, more serious problem is that I get frequent dropouts from the CCA. I’m wondering whether the CCA software is finally showing signs of corrosion and its only a matter of time before it becomes fully deprecated. But hey, let’s be honest — I really just wanted to muck around with something cool to help with the lockdown monotony, which is as good as a reason as any!
I read on the interballs a while back that you could build a capable little music streamer using a Raspberry Pi with a dedicated DAC HAT (Hardware attached on Top). After doing some research, I learned that it’s actually a very popular little project, and for around £80-100 you can build a jolly good, great sounding little streamer. Sold!
I purchased a Raspberry Pi Zero a while back for another project — so after scurrying around the international box of mystery (obligatory crap box), I finally found it. It was like finding a nugget of gold in a haystack; For once in my adult life I’ve kept hold of something with the hope that it will come in handy at a later date — and I almost succeeded. You see, when I got my RPi Zero back in the day, you had to buy the ‘header’ separately and solder it on with a very steady hand. Being the DIY marvel I thought I was, I gave it a go at the time. It kind of worked — but as you can see here it’s not the tidiest job and I’m sure I fried the PCB with blobs of rogue solder.
Nowadays, you can buy the RPi Zero with the header pre-soldered (by an actual professional). The whole device costs a smudge under £14, so for that money it seemed daft to not simply buy a new one with a good header connection. On a side note, for £10-14 these things really are phenomenal value and well worth the investment if you’re a fellow tinkerer or fancy giving this project a go yourself.
Shopping List:
For this project, I required 5 key components:
- Raspberry Pi Zero (or a full fat Pi if you fancy)
- DAC HAT
- Power supply
- 8gb+ Micro SD card
- Case (optional)
I purchased my new kit from Pi Hut. A cracking little vendor of all things RPi and Arduino. I ended up with the following items in my basket:
You can pick up a 8gb micro SD card from Amazon for the price of a pint of bitter so I didn’t include this.
Pi Hut sell a number of DAC HATs of varying quality. It’s the most expensive part of this project, but equally the most important component. Prices range from £20 — £100. I settled on the very catchy ‘HiFiBerry DAC+ ADC’ because of its 3.5mm aux input, which will come in handy for ad-hoc audio connection of mobile devices when Spotify doesn’t cut the mustard. I can’t comment on the varying degrees of sound quality of the more expensive DACs. I’m sure there is a difference in ability - like anything - but similar to choosing a bottle of supermarket wine, you really can’t go wrong going slap bang in the middle.
Setup:
Setting up the streamer was remarkably straight forward. No programming or soldering required.
Now, for the Pi to be of any use whatsoever, it needs an operating system. This is typically accomplished by flashing your OS of choice to a micro SD card, which is then slotted in to the Pi. The most widely used OS for the Pi is Raspberry Pi OS (formerly Raspbian), which like most Pi operating systems, is a specially optimised distribution of Debian.
Rather than use a standard Pi OS, there are a raft of free Raspbian spin-offs, optimised for audio playback which have all the goodies built in such as support for Spotify Connect, Airplay, UPnP and so on. Perfect!
With that in mind, I decided to give Volumio a whirl for my streamer — it’s a feature rich choice, with an active community and has everything I need (most importantly, Spotify Connect) built in, ready to use.
So here’s the step by step:
- Download The Volumio OS RPi image (https://volumio.org/get-started/).
- Download Balena Etcher. This software will allow you to flash Volumio to your SD card (https://www.balena.io/etcher/). Other tools are available but Balena Etcher works very well.
- Launch Balena Etcher, and flash Volumio to your SD Card. (for the love of all that is holy, please make sure you select the right volume when using the software!)
- Attach your DAC to your Pi. Be gentle!
- Insert your now flashed SD card in you your Pi, and boot her up!
- After a couple of minutes, Volumio will spin up a local wireless network called ‘Volumio’. Connect to this network using your computer. (password: volumio2).
- You will then be presented with a setup window in your internet browser. If this doesn’t happen, you can kick off the setup process by visiting http://volumio.local
- Complete the setup wizard. You will be asked to enter your WiFi details during this process amongst other preferences.
- To get Spotify up and running, navigate to ‘plugins’ and install the ‘Spotify Connect 2’ plugin.
- Restart the device, connect the DAC to a spare phono input on your amp, and Boom! You’re done!
I’ve been very impressed with my new Raspberry Pi streamer so far — its early days but so far it’s been very reliable, sounds better than the olde’ Chromecast audio, and looks pretty cool too. I’m sure the Hifi would be very thankful if it wasn’t an inanimate object.
The big question is, was this project completely necessary? Probably not. Did I enjoy the process and learn something new? Absolutely.
The truth is, in the midst of what was (and still is) a very tough time for a lot of people, it’s healthy to engage your brain to think outside the box. It’s nice to tinker and learn new skills whilst refreshing old ones. It’s satisfying to fix things and craft!
If you take away one thing from this post, go out and buy a Raspberry Pi Zero. There’s literally thousands of cool little projects and the community is thriving. I really can’t think of a better to spend £13.