Does the Raspberry Pi3 need cooling and are the CPU heatsinks effective? After getting temperature warnings on my RPi3 I decided to see if heatsinks help.
Raspberry Pi 4 Update:
This article is aimed at the Raspberry Pi 3. The Raspberry Pi 4 cpu does get hotter quicker than the RPi3 causing it to slow the CPU down. I would recomment you have a small fan installed to a Raspberry Pi 4 if you are doing any medium or intensive tasks. See this article Testing the ICE Tower Cooling Fan for the Raspberry Pi 4 for more information and testing on the Raspberry Pi 4.
Raspberry Pi 3
I have several Raspberry Pi's from the original model B to the Raspberry Pi 3 which are all used for various tasks and left on for hours or days at a time but generally don't get too hot. The Raspberry Pi2 does get a little warm but my Raspberry Pi 3 get's too hot at times causing the Yellow then Red squares to appear in the top right corner indicating the processor is getting a tad too hot. For the PIXEL desktop the warnings signified by a Thermometer.
With PC's and Laptops the CPU has a fan to keep things cool as the CPU's get very hot and will be damaged without it. The Raspberry Pi's has low power requirements so the CPU dosn't need cooling to stop damage. If a Raspberry Pi 3 gets to 85oC the processor speed will be halved allowing things to cool down. The down side is it will now take longer for the task you are doing to complete.
So what can be done to keep a Raspberry Pi cool if you are getting CPU Over Temperature errors?
- Well you could move to somewhere inside the Arctic circle which should do the trick, though not every bodies idea of home.
- You could point a desk fan at your RPi3 though that could make working on it a bit drafty.
- You could place it in a container of dry ice and program some flashing coloured LEDs for that party effect.
More practical suggestions would be to use a heatsink or use a heat dissipating case.
Heatsinks
A heatsink is the cheaper of the options and involves sticking a metal grooved block to the Raspberry Pi's CPU. The CPU heats up the heatsink but because it has a bigger surface area it can be cooled quicker by the surrounding air, which in turn cools the CPU and gives you one non sweaty RPI.
Heatsinks are available for as little as £1 and can be made from Aluminium or Copper. A heatsink is more effective the more surface area it has so some perform better than others.
I have tried out two types of Aluminium heatsink with my RPi3. A silver one that came with a case, which just has grooves and a black one with columns of fins. When im converting several thousand PiCamera timelapse stills into a video I often get the Yellow and Red squares appear on the screen as the CPU gets hot. After installing each heatsink in turn and re-running the test I still get the CPU temperature warnings so they don't seem to be very effective without some additional airflow.
So how effective are Raspberry Pi heatsinks?
I have done some tests all converting 2364 images into a video to find out how well heatsinks perform. During the test the proccesor is running on average at 98% capacity for at least 25 minutes.
The ambiant temperature was about 20oc. The CPU temperature was monitored using the following commands:
cpu=$(cat /sys/class/thermal/thermal_zone0/temp)
echo "CPU: $((cpu/1000)) c"
If you get a permissions error then add the command sudo before cat.
Test 1: Raspberry Pi 2 - No Heatsink
Firstly I tested a Raspberry Pi 2 with no heatsink. It was running for over 30 minutes at about 98% CPU usage and got to 65oc. So no cooling required.
Test 2: Raspberry Pi 3 - No Heatsink
Next was the Raspberry Pi 3 with no heatsink. This was running on average at 98% CPU usage for 25 minutes and and got to 86oc causing the yellow temperature error warning at 80oc and the red warning square at 85oc. On average it was at 84oc showing the yellow square. When the Red square appeared at 85oC the processor speed went from 1200Mhz to 600Mhz to help cool the CPU. It stayed at 600Mhz for the rest of the test.
Tests 3 & 4: RPi3 with Heatsink
I then repeated this test with the silver heatsink. This showed no real improvement peaking at 85oc and going into the red. The black heatsink was no better also with a peak temperature of 85oc. As both heatsinks got to 85oc the processor speed was halved in both tests.
How hot can we get?
For the next test I decided to see how hot the CPU would get if the ambiant temperature was much warmer. As I live in England I would have to wait a long time for the ambiant temperature to get to tropical conditions even with global warming. So I put a Fox in the Microwave. No i'm not being cruel, it is like a cuddly toy which when heated in a microwave, stays hot, to be used like a safe hot water bottle.
Test 5: RPi3 in High Ambiant Temperature
The RPI3's idle CPU temperature was 53oc, I then placed "Mr Fox" across the Pi and waited 5 minutes for the ambiant temperature to increase. The CPU's idle temperature went up 11oc to 64oc. Then I started the video test again. The CPU temperature got to 85oc within a minute eventually peaking at 88oc.
So from these tests the Raspberry Pi 3 doesn't get hot enough on it's own to need cooling but also the heatsinks don't make any difference unless there is some airflow into the case. The only reason you would need cooling is if you need to keep the CPU running at 1200Mhz in which case the temperature needs to be kept below 85oc.
Test 6: RPi3 with CPU Fan
For a final test the RPI3 had a heatsink installed. I then attached a 5v 0.2 amp fan to the gpio port to get some airflow into the case and run the video test again. The CPU temperature only got to 60oc so the RPi3 stayed at 1200Mhz. In previous test the video took 25 minutes to create. In this test it took 12 minutes.
Conclusion
A Raspberry Pi 3 does not need CPU cooling as it manages the cooling by lowering the CPU speed. In general use it won't get hot enough to cause the CPU speed to be lowered. If you are doing intensive tasks but time is not an issue then again you don't need cooling. If you need the Raspberry Pi3 to keep performing at top speed for an intensive task then you just need some airflow as the CPU will only need to be cooled a few degrees. From most of my tests 2 degrees C is sufficiant and 4 degrees C in very hot enviroments.
Heat Dissipating Case
A heat dissipating case is more expensive but if you have a Raspberry Pi that is in constant use perfoming intensive tasks and you are in a warmer environment then this could be a good option. This type of case keeps the CPU cool because part of the metal case is in contact with the RPi's CPU and as with the heatsink the case is warmed up but with a much larger surface area the RPI will be kept cool for whatever tasks you are making it work hard for.
Monitoring CPU Temperatures and Speeds
For these test I used a Bash script based on this article by Vivek Gite.
This script displays the CPU & GPU temperature and the processor speed every 10 seconds.
#!/bin/bash
CPU=$(/sys/class/thermal/thermal_zone0/temp)
while [ $CPU -gt 30000 ]; do
CPU=$(/sys/class/thermal/thermal_zone0/temp)
MHZ=$(/sys/devicessystem/cpu/cpu0/cpufreq/cpuinfo_cur_freq)
echo "$(date)"
echo "CPU: $((CPU/1000)) c"
echo "GPU: $(/opt/vc/bin/vcgencmd measure_temp)"
echo "MHZ: $((MHZ/1000))"
sleep 10
done
To use this script copy the code into a text editor making sure the #!/bin/bash is on the top line.
save the file as CpuTemp.sh
Then open Terminal and navigate to the location you saved the file to.
If this was the desktop then enter
cd ~/Desktop
Then to make the script exceutable enter the command
chmod +x CpuTemp.sh
To run the script enter the command
sudo ./CpuTemp.sh
To exit press Ctrl & c