Years ago I read something about turning a simple Raspberry PI into a decent audio streamer by adding a DAC HAT for some tens of Euros. The claim was that this would allow to create something that can compete with commercially available audio streamers easily costing hundreds or even thousands of Euros. Honestly, I didn't buy into it at the time - it seemed too good to be true. The first manufacturer of these DAC HATs was Hifiberry from Switzerland, some years later followed by Allo from India (with some audio designers in France). Meanwhile there are plenty of DAC HATs around but it seems as if Hifiberry is still the best known one and also still introducing new and even better models.
Trying to find out more about this topic I stumbled over a video discussing the effect that power supplies have on a DAC HAT's sound quality. The video was from a "sound evangelist" from the Netherlands called Hans Beekhuyzen who claimed that a linear power supply unit for around 300 EUR would audibly increase the sound quality of a Raspberry / Hifiberry combination - which together costs around 75 EUR. I wasn't prepared to spend 300 EUR on a power supply for a Raspberry PI but the idea that a good power supply with a constant and low-ripple output voltage would have a positive effect on sound quality made sense to me. So I decided to build one myself (with parts costing much less than 300 EUR).
Probably this sounds familiar to you but I tend to have several "projects" going on in parallel. Also, an exciting job at a Japanese test & measurement company added some queue-jumping topics I was curious about (like this, this, this or this), so regarding that power supply I had the plan in my head and most parts sitting around and collecting dust for almost two years. And then came lockdown. Workwise lockdown didn't make life in any way less busy - actually a lot more busy because now the entire family was either working from home or "going to school" at home. But I am not complaining - in the end "home offiice" means that you have a home and work. As usual at the end of the year Christmas came along which in our spread-out family always involves quite some travelling and crossing borders - something absolutely not possible in 2020. But it provided the perfect opportunity to build that power supply...
Maybe it's me being German that I didn't like the idea of having the power supply in one box and the Raspberry PI / Hifiberry in another. But mostly (I think) it had something to do with the fact that I wanted to use this PI based audio streamer to power a headphone amplifier which was in a seperate box again. Originally my plan was to use a Raspberry PI 3 which I bought out of curiousity when it was introduced and a HifiBerry DAC+ pro (which since my time of purchase has been replaced by the "DAC2 HD" model). This is known to be an excellent combination - unless of course you are German and want the power supply and the PI to live in the same box. Because all of a sudden, at Christmas in lockdown, you realize that the plans you made two years ago didn't consider all necessary details - like the USB / LAN connectors of the PI pointing in one direction and the HifiBerry's cinch connectors pointing into another. I wasn't too worried about the LAN interface because my plan was to use WiFi. To be able to use WiFi, however, I needed a USB connector, because the box that was waiting to house my PSU / PI combo was made of alloy. I was thinking of soldering an antenna connector to the PI but gave up on that because I didn't have one available - well, and of course because I thought I would kill the PI when trying to do that kind of soldering work with my poor soldering skills and setup.
Fortunately I also had a Raspberry PI Zero flying around as well which originally was intended for another project. It could sit below the HifiBerry if I found a way to bring the PI's USB micro connector to the outside of the box as a USB-A connector. There wasn't enough room for a normal USB connector from a standard cable, neither straight nor angled. But I had a small micro USB connector that allowed for cables to be soldered on it which would be small enough for what I needed.
For me this was the perfect solution to my "space problems". Soldering a 40-pin header to the PI Zero would allow to connect the Hifiberry, and using the 5V connector on the Hifiberry would also power the Pi Zero. By the way, in a blog post published recently and after I finished my project HifiBerry recommends not to use the Pi Zero for audio projects. Yes, the boot process takes longer than with a PI 3 model and yes, missing Ethernet, the mini HDMI and only one USB connector makes setting up the PI not so easy. But I chose Volumio as software for the PI. With Volumio, when you first switch on the Raspberry with the Volumio image on the SD card, and when Volumio can't establish a network connection neither through LAN or WiFi then it sets up the PI's WiFi to act as a hotspot. You can then connect to it from your mobile, do the basic setup including WiFi through your browser, enable SSH, and after rebooting it's like any other PI in your network. This really only took a couple of minutes with the longest time being the first boot of Volumio.
The 10-pin connector on the bottom of the above image connects to a dual USB A socket. One of these USB sockets provides 5V for the external headphone amp while the second one connects to the USB connector of the Pi Zero allowing for a WiFi stick with an external antenna to be used. My idea of the power supply was to have two separate 5V power rails - one for the external headphone amp and a second one for the PI Zero / HifiBerry combination. As with the HifiBerry the external headphone amp was reviewed as performing much better when a good power supply was used instead of the standard one from the box. I did chuckle a bit when some reviewers claimed that replacing the standard PSU by a USB power bank would massively improve the sound quality - because inside of any power bank typically sits a 3.7V Li-Ion battery and the cheapest possible boost converter to 5V. Nothing I would describe as clean DC power. But then I have learnt that in the audio world many things around audio quality are based on belief. Alternatively clean power may have less of an impact on audio quality than a Dutch audio evangelist has successfully made me believe.
In the power supply part I wanted to have low-noise 5V voltage regulators. A very good one for that is the TPS7A47 from Texas Instruments. The bad news with that one is that it is only available as an SMD part (see above regarding my soldering skills). The good news is that the bay of plenty has tons of reasonable offers for ready-made boards that are based on this chip. Yes, I could have also done it the classic way and use a LM7805 or LM317. A more modern alternative would have been the LT3081. But I really liked the noise level of just 4 uVrms that the TPS7A47 promised. I have to admit I never made any measurements to check the cleanliness of the 5V power. Obviously I did measurements to see that the output voltage was okay but with my 8-bit-scope and just passive probes available I had no chance to go anywhere near measuring a uV ripple on a 5V DC voltage. Also, I was kept busy by more mechanical and not so much by electronic challenges.
Things I wanted to have in my box was a mechanical switch for the primary AC side. Also because of their LINUX based file system, Raspberries don't like to be switched off hard because this can have an impact on their file system. Therefore I added a switch to the front of the box to send a shutdown command to the PI - something that is quite easy to create with a python script, and actually even easier to download from the web. Also I added two LEDs to show that the 5V power rails work - one of them powered by a GPIO pin from the PI.
Coincidentially the width of my chosen alloy box to house my project was exactly the same as the width of the external headphone amp. As a headphone amp I chose the "Head Box S2" by "Project Audio Systems", an Austrian company from Vienna with the box itself made in neighboring Slovakia. To get started I re-activated a 20 year-old headphone called "K-501" from AKG - at the time of purchase also an Austrian company. When I say "to get started" I kind of played with the idea of using all of this as an excuse to buy a more up-to-date headphone. But then I put it all together, linked Volumio to my NAS which has all my CDs as FLAC files stored on it - and... I didn't miss a thing.
I have absolutely no idea if my litlle project would pass the test of any sound evangelist. Also I have no idea whether I could have achieved the same or probably an even better result by buying a ready made power adapter like the iPower by iFi audio for something like 50 EUR. In that case I could have taken a PI 3, the Hifiberry, put it into an acrylic box, use the built-in WiFi and started listening to music on Boxing Day. But building this was part of the fun - and certainly something I enjoyed during this Christmas lockdown.