Raspberry Pi Powered Outdoor Speaker Instability

My Raspberry Pi powering outdoor speakers became unstable and I found out why...

Raspberry Pi Powered Outdoor Speaker Instability Photo by Comfreak from Pixabay

Introduction

Last Summer I built an airplay enabled outdoor speaker using a Raspberry Pi. It worked pretty well, and it was nice that I could stream music outside using our iOS devices while we spend time outside. Over time I noticed that the Raspberry Pi would freeze after some time of using it, and I would have to reboot it in order to start playing music again. I started with HiFiBerry OS but then tried out Volumio. It seemed to work a little better – mostly with being able to increase the buffer size of the music being played so it does not stutter as much when I walk to the side of the yard which has weaker WiFi. However, the Raspberry Pi was still crashing. I was questioned if it was the microSD card going bad or the Raspberry Pi itself.

Then one day when I was trying to use a different microSD card, I took off the cover of the case holding the RPi (affiliate link) and quickly realized the HiFiBerry Amp2 (affiliate link) was extremely hot – you know, audio amplifiers can get very hot. It dawned on me that the Raspberry Pi is likely overheating especially in the plastic enclosure I was using that had no built-in fan. Yes, I know that it should have a built-in heat sink at a minimum and a fan at best, but that case is designed to house various audio-based RPi hats – it has cutouts for different types of audio hats. One may be misled to think that it is adequate. I can say from personal experience that it is not adequate!

The Solution

So what is the solution to this problem? Leave the top lid off the case and add a fan that connects to the GPIO pins! It looks more unsightly, but I would rather have the stability. Since it is located in my server closet, the unsightly appearance is not a big deal.

Raspberry Pi with Amp2 and Fan

I purchased a fan (affiliate link) that is actually designed for the Argon Raspberry Pi cases (affiliate link), but I figured it would work well enough for my use case. Since I am leaving the lid off of my case, any type of fan should work. It seemed to have good ratings and is programmable using their scripts (however, I do not think it will work on all operating systems, which simply means the fan will run constantly at half power).

In addition to buying a fan, I needed to buy some GPIO header extensions (affiliate link) to raise the fan up high enough to be above the large capacitors on the Amp2.

The only issue I had with the fan which I found odd is that if I push the fan all the way down on the GPIO header extension, the audio would not function properly, but if I left it half way on, it works perfectly. I do not think it is shorting anything since I would imagine it would have fried something. Perhaps when using certain GPIO pins, it cannot be used by all of the devices connected to the pins. Since the fan I purchased is more sophisticated than other fans (it has a power off button that can shut down the RPi safely when programmed to do so), it may need additional pins to support the extra features. If you take a similar approach with the same or similar hardware, be aware of that potential pitfall to save some time troubleshooting.

You can see this gap in the image below. I only seated the fan far enough down that it will not fall off easily. Keep in mind that if you get a more basic fan, you may not have the same issue.

Raspberry Pi with Fan Halfway on GPIO Pins