skip to Main Content

My First Raspberry Pi Project: Using Hifi Berry DAC to Emulate A Squeezebox

RPI-HB-DACRCA-300pxSome time ago I received a Raspberry Pi B+ as a gift. It had been on my amazon wish list, and for good reason. It looked like one practical approach to emulating the venerable Logitech Squeezebox, which to this day serves as the basis for music playback hereabouts.

Since we were not expanding our music playback scheme there was at first little motivation to got ahead with this effort. That is, until the analog outputs of our existing fleet of Squeezeboxes started to fail. Eventually the analog outputs become unusable, the result of failing electrolytic capacitors. Three of our five SB3s now suffer this malady.

So, not long ago I set to the task of emulating a Squeezebox using a Raspberry Pi 2 Model B, a HiFiBerry DAC and a 4 GB micro-SD memory card. To this core I added a suitable case, a power-over-Ethernet splitter and piCorePlayer. All in, this rig cost under $100.

The process of setting up the software was blissfully simple. piCorePlayer is well documented. I slipped the micro SD card into an adapter and used my desktop PC to flash it with the piCorePlayer image. It’s no more difficult than flashing a CF card to setup a m0n0wall or SmallWall router, something that I’ve done dozens of times over the years.

The micro SD card was then installed to the RPi, which was connected to my network via Ethernet. Applying power via the micro-USB port the RPi came to life.

I initially connected the HDMI output of the RPi to a monitor. This allowed me to verify that all was well before I tried to connect over the network.  It also allowed me to capture the boot up sequence, which appears here.

The entire boot-up takes around under 30 seconds. Thereafter the Pi is connected to our local SqueezeCenter server. It reports itself as “piCorePlayer” initially.

piCorePlayer-Basic

piCorePlayer has its own web interface for configuration.  Logging into the web UI you find that there are several views offered. There’s are many adjustments and customizations that can be made, including audio I/O configuration and Wi-Fi settings. The default setting for nearly everything worked fine in my installation.

Network & Power Concerns

I left the Wi-Fi disabled as I prefer to use wired connectivity for streaming media. In fact, I think that powering the device over the network using 802.11af power-over-Ethernet would be great. It would allow the RPi to be powered via the UPS in my wiring closet. That’s where this particular device will reside, driving the chain that delivers to the Definitive Technology speakers in the back yard.

POE splitter

To this end I experimented with using a P.O.E. splitter to address both power and connectivity. This worked well, however I found that the micro-USB power connector on the RPi was problematic. I find that it’s not mechanically stable. It’s very easy to dislodge the connector accidentally. A locking connector would be preferable. Of course, the Ethernet connector is a locking connector!

raspi-shield-connected

I’m inclined to try the new P.O.E. “Hat” for the RPi. This daughter-board delivers power via the multi-pin connector instead of the micro-USB port. It can be used with the HiFi Berry DAC daughter-board. However, the combination of the RPi, P.O.E. hat & a HiFiBerry implies a completely custom case is required. That seems a common situation when stacking RPi add-ons. If you’re not able to make them yourself, a fancy case can drive up the cost of the project.

The HiFi Berry DAC

Since this is supposed to be a Squeezebox equivalent a good quality analog output is required. Happily, the HiFi Berry DAC+ card for the RPi in every bit as good or better than the DAC stage in the Squeezebox 3. It handles audio streams up to 192 KHz at 24 bits. That’s 100% genuine Hi-Fi.

hifiberry-dac-pro-rca

In my case I used the DAC+ version with analog output on two RCA jacks. It delivers unbalanced, –10 dbm level consumer style output. This gets fed to some self-powered monitors, most typically the M-Audio BX5 Series. In truth, I’d prefer professional style, balanced XLR outputs at +4 dbm. Sadly, that’s just not in the plans for HiFi Berry. It could be done with an outboard line matching amplifier if truly necessary.

The pseudo-Squeezebox is basically headless, not unlike the Squeezebox Duet. That’s OK, since I typically control the playback from the servers web GUI or Squeeze Ctrl on an Android device.

Initial listening to the pseudo-Squeezebox, conducted in my office (not the back yard) has been impressive. It’s every bit as good as the original Squeezebox 3.

The device was fun and easy to build. Given the current, basic case and p.o.e. splitter, it costs less than most alternatives. In fact, cross-referencing Ebay and AudioGon, it cost less than a used Squeezebox 3. At this point used Squeezeboxes must be considered suspect, as they’re now old enough to be suffering faulty analog outputs.

Even as I was drafting this article the Raspberry  Pi 3 was released, with 10x the CPU performance of it’s predecessor. Onboard Wi-Fi and Bluetooth round out the new board. While some hoped for gigabit Ethernet, I was hoping for on-board power-over-Ethernet, neither of which are in the new RPi 3. Happily, it’s still affordable and accommodates options like HiFi Berry and the P.O.E. Hat.

The ability to emulate a Squeezebox using high-performance, readily available hardware ensures that our existing whole house & yard music system will live on another few years. It can even be expanded, with the cost or complexity of migrating to some new platform.

Back To Top