The Raspberry Pi single-board computer is a great choice for a wide variety of applications. Because it is designed to be tinkered with, one of the things users can do is overclock their Pi. However, overclocking can result in overheating and irreparable damage. The Pi is designed to run fairly hot; however, if you’re overclocking to get the best performance out of your Pi, you might run into problems. Fortunately, you can prevent this by adding sufficient cooling to your Pi.
How Does Cooling Work?
Electronics generate heat. This heat can be detrimental to the performance of those electronics, so keeping them cool is paramount. Fortunately, there are a few affordable ways to achieve this. The first is with a heatsink.
A heatsink is a piece of metal, most commonly copper or aluminum, that features a number of fins extending vertically from the base. The heatsink is applied to an electrical component that generates heat (in this case the CPU). The heat is carried up, away from the CPU, into the heatsink fins, allowing the heat to dissipate into the air, cooling down the CPU.
Another way to cool down your CPU is with a fan. A fan pulls heat away from the CPU and other heat generating components. This lowers the overall temperature of the CPU and improves performance and stability.
What Happens If My Pi Overheats?
Obviously, heat is bad for computers. Prolonged exposure to high temperatures can damage the motherboard and other components of your computer. If you are unable to boot your Raspberry Pi, there is a good chance you’ve suffered CPU failure due to excessive heat.
That being said, Raspberry Pi single-board computers are designed to run very hot, around 80 degrees Celsius. However, if you are pushing your Pi to its limits, it isn’t uncommon to see temperatures spike well beyond this point. The Raspberry Pi will try to prevent damage by throttling back the CPU speed in an effort to cool itself down. Unfortunately, this will result in a drop in performance. Long story short, the best case scenario is that your Pi will run slower. Worst case scenario, you fry your Pi.
Heatsinks for your Raspberry Pi are super-cheap and really easy to install. As we mentioned earlier, the two most common types are aluminum and copper. Both types can be used with your Pi. However, copper has higher thermal conductivity than aluminum, allowing heat to pass through it more quickly. This means that copper heatsinks are generally better at dissipating heat than aluminum ones. That being said, copper is a more expensive material and is generally more difficult to make. Because of these factors, heatsinks made of copper are more expensive than those made from aluminum.
Where to Apply Heatsink
Since the CPU, GPU and more is all housed in the SoC (system on chip), we’ll be focusing on cooling this component above all others, as it generates the most heat. You can also add heatsinks to the memory chip and the ethernet/USB controller. However, you won’t see much in the way of performance increases if you do so. That being said, it might reduce the overall temperature a degree or so, so it definitely wouldn’t hurt.
Installing a heatsink is very simple. Most of the heatsinks available for the Raspberry Pi have thermal tape pre-applied on the bottom. This means all you have to do is locate the SoC and plop the heatsink down on top of it. While thermal tape is super convenient, we recommend you use a dollop of thermal grease/paste instead. This is because thermal grease/paste has better conductivity.
The most common fans you will see for the Raspberry Pi are 30mm x 30mm computer case fans; however, larger (and smaller) fans are available. What size fan you end up using will largely depend on your setup and what sort of case you use. There are cases that have fans built into them, and others, like the official Raspberry Pi case, have a removable top so fans can be installed.
Whether you want fresh air pulled in or hot air pushed out is subject to debate. The general consensus seems to be that if your Pi is in an enclosure like a case, you want to affix the fan so that it draws air up and out of the case. If your Pi is out in the open, then you can situate the fan either way. Whichever way you choose, as long as you have air circulating, you should see a significant drop in temperature.
How to Install a Fan
Different fans will have different installation instructions; however, most will affix themselves via nuts and bolts. The fan will draw power from the GPIO (General Purpose Input/Output) pins. To get your fan spinning, place the red wire on the second pin from the outside of the outer row of GPIO pins. Plug the black wire onto the third pin of the same row of GPIO pins, and you’re good to go.
If you’ve ever built a PC, you’re probably familiar with water cooling. Liquid cooling is the best way to cool down a PC simply because water transfers heat a lot better than air. For many people, water cooling a Raspberry Pi will be overkill, but kits do exist if you think you need it. A word of caution: if you opt for water cooling, make sure you follow the instructions exactly!
With proper cooling methods applied, you can overclock your Pi to run intensive applications like the pesky N64 emulator in RetroPie. Just remember that once you get Goldeneye up and running, Odd job is off limits.