Wednesday, 16 March 2016

Raspberry Pi 3: Reasons for a Heatsink and fan

I've had Pi's since the original Pi Model B and always instantly put a heatsink on them to "keep them cool" as I'm sure most other Pi users have and on my Pi2 I bought a cheap acrylic case I could cut up and modify, I actually ended up buying 3 in the end until I made my build exactly how I want it, with a big red power button and fan on top (pic later).

Upon arrival of my Pi3 the day after launch I decided NOT to put a heatsink on and test the temps on a stock Raspbian image, no overclocking, everything as default in the Pi3 Black case from RS where I'd ordered my Pi3.

The temps looked pretty bad straight off the bat, with just the Raspbian GUI up and a watch command checking the speed and temps. Put the below text into a file with your favourite text editor and save it with a .sh extension, chmod +x  and run watch ./ I called mine

cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_cur_freq
/opt/vc/bin/vcgencmd measure_temp

The other script you'll want is  the which reads /dev/zero into /dev/null - essentially taking as many 0's as it can get and dumping them into a blackhole, but we run this 4 times, once for each core, to generate the load needed, there are other ways of doing this, but this is one of the simplist. The below script is all one line. remember to run chmod +x so its easier to run with just ./

fulload() { dd if=/dev/zero of=/dev/null | dd if=/dev/zero of=/dev/null | dd if=/dev/zero of=/dev/null | dd if=/dev/zero of=/dev/null & }; fulload

Now watch the temps, my Pi3 was hovering at idle 49C - 51C in the Black case (there's not much ventilation with these cases, the cpu speed kept flickering between 600Mhz and 1.2Ghz.

With running, the temps sky rocketed up to 85.3C pretty quickly ! Using killall dd to stop the processes and the temps eventually came back down to about 53C after 5 minutes.

Adding the copper heatsinks, brought the idle temps down a few Celsius to a max of 49.2C, not a huge difference!

 Running with the copper heatsinks on brought about similar high temps as without heatsinks, so the heatsinks alone do not do a whole lot!

I decided to whip my Pi2 out the clear acrylic case and put my Pi3 in it, since that case has a fan and retest the temps with the heatsinks on, I really didn't want to reorder the heatsinks to do a test with a fan and no heatsinks, I'll probably end up buying another Pi3 in the next few months so I'll test again then without heatsinks but with a fan.

So the Pi3 idle temp with heatsink and fan is 27.2C ! Much better than a Pi3 without a fan.

Running brings the max temp to a decent 49.8C, which is the idle temp without a fan!

So in conclusion, add a fan to your Raspberry Pi setup if you don't want it running hot, especially if its doing a high work load.

Now this is the slightly dangerous part ... overclocking to a whopping 1.5Ghz! config.txt mods below:

The temps hover between 29.3C and a max of 31.5C, the small load of watch is what probably makes it jump to 30.9C and less often 31.5C

So after It'd been running like that for 15 minutes or so it was time to run on the beast, I watch it for about 5 minutes as it slowly climbed to about 44C then went to make a coffee ... when I got back I was greeted with the below in my ssh client and the Pi3 was unresponsive to, not even to pings so it had crashed :(

pi@raspberrypi:~$ ./
pi@raspberrypi:~$ dd: error reading ‘/dev/zero’: Bad address
3379135+0 records in
3379135+0 records out
1730117120 bytes (1.7 GB) copied, 5.55431 s, 311 MB/s
dd: error reading ‘/dev/zero’: Bad file descriptor
7702196+0 records in
7702196+0 records out
3943524352 bytes (3.9 GB) copied, 12.4847 s, 316 MB/s
Upon reboot it booted up fine and I could find no ill effects from being overclocked to 1.5Ghz and fully loaded. I decided to run another load on it and it crashed a lot quicker this time, before I could open another ssh connection and type the watch command ... so I think 1.5Ghz might be a bit much, I stepped it down to 1.45Ghz and it was much more stable with no adverse effects and the temp is a stable 61.6C which I'm happy with.... for a while then it hung a while later :(

So I stepped it down to 1.4Ghz and so far so good, no crash yet after over an hour and a max temp of 65.4C, not what I was hoping for but better than the stock 1.2Ghz.

I'd like to get another Pi3 and run the last test with just a fan and no heatsink so see if there any differences between having a heatsink or not, since there's no real difference before adding the fan.

*Note: I left the Pi3 to run the tests for at least 10 minutes each time, often more, even running at 85.3C as this it was stock Raspbian with no modifications, so if it blew up, they would have to replace it, right?

I found the basic scripts on another blog, its only right to mention it here:

No comments:

Post a Comment