Linux Format

Cool your Pi

Les Pounder shows us how to keep the new Raspberry Pi 4 cool, even under heavy workloads, using bolt-ons.

- Les Pounder is a freelance maker who works with organisati­ons across the world.

Les Pounder shows us how to keep the new Raspberry Pi 4 cool, even under heavy workloads, using bolt-ons.

The Raspberry Pi has seen great increases in CPU speed since 2012. From a single-core 700MHZ CPU to the latest Pi 4 and a 1.5GHZ quad-core CPU is quite a difference, and with this increase in power there is an inevitable increase in heat. The Raspberry Pi 4 has a rather warm CPU: a stock Pi can idle at 39°C, and under extended heavy load it can reach up to 80°C! There are now many companies offering their version of a cooling system to help prolong the life of the Pi 4 and stop our fingers getting burnt. But which is the most effective? Which is the cheapest? And do we need passive or active cooling?

Passive vs active cooling

Passive cooling is when a CPU is cooled using a heatsink or pipe, which draws away the heat from the CPU to a series of thin metals fins that are designed to offer the most surface area from which the heat can dissipate. CPUS have used heatsinks since the late 386 devices, and this was enough for most CPUS.

But with the rise of the Pentium era, extra cooling was required and this is where active cooling became the norm. With the more powerful Pentium CPUS generating more heat as their speed increased, heatsinks were no longer enough and fans were needed to whisk the heat away from the CPU. It has now become the norm for PCS to have many fans to keep everything cool, and with the Pi 4 now running a more powerful CPU, the need for active cooling has arrived. But which is best for our Raspberry Pi 4? Let’s find out!

Hot stuff

We used a Raspberry Pi 4 running the latest version of Raspbian, and with the firmware updated to the latest available. For each test the Pi was allowed to rest and stabilise temperatur­e for five minutes before a test was run. Each cooling unit was used with the stock equipment/accessorie­s which it came with.

The test involved running Sysbench to verify prime numbers between 2 and 50,000, and used all four cores of the CPU. The data was collected using a Python script which ran every minute and collected the current time, CPU temperatur­e and CPU speed. This was then saved to a CSV file and edited in a spreadshee­t. We also looked at whether the cooling systems gave decent access to the GPIO pins, Camera

(CSI) and Display (DSI), and Power over Ethernet (POE) – plus their ease of assembly.

A stock Raspberry Pi 4 can quite happily run without much issue if used as a generic computer, or in projects that use the GPIO. If we push the Pi past 80°C then the CPU will throttle the speed in order to cool itself. This drop in speed is noticeable to users as it causes applicatio­ns and the operating system to slow down or halt if pushed too far.

If you need to keep your Pi 4 running at top speed for longer, cooling is required, and here are five cooling solutions that we tested for you.

Pimoroni Aluminium Heatsink Case

For passive cooling – with no moving parts, just a large heatsink – the current best solution is the Aluminium (Al isn’t the best of heat conductor options–ed)

Heatsink Case from Pimoroni. Coming as a two-part metal kit with four hex screws, this case is super-simple to assemble, requiring only that we apply the thermal pad to the CPU, then close up the case.

This silent cooling solution claims to drop 15°C from the stock CPU temperatur­e, but in our tests it managed a drop of just 2°C. The supplied thermal pad was the issue – it only made partial contact with the case, as it was so thin. If passive cooling is your top priority, invest in a thicker thermal pad or use thermal paste to make good contact between the case and Pi.

That said, this case is very usable and does provide enough cooling to run a Pi 4 all day. It provides access to the GPIO, but a HAT board will need to use a header extension. Access to POE, CSI and DSI connection­s are possible, but must be made before securing the case. The POE connection is rather awkward to achieve, but possible with extension headers.

All of the other ports are exposed and easily accessible, including the microsd card port which is easy to access even for large hands. Consider this case if you need silent cooling and don’t plan to overclock.

Jun_electronic Aluminium Heatsink

At first glance this looks just like Pimoroni’s case, and yes, it is very close. But this version has two 20mm fans which are powered directly from the 5V and GND pins of the GPIO. The case can be used passively, with similar performanc­e to Pimoroni’s version. But adding the fans drops the idle temperatur­e to 37°C, and under load for four minutes the temperatur­e was 47°C – a full 16°C less than Pimoroni’s. With great passive and active cooling this case can keep your Pi cool under load for a full day.

The case is made of two parts and they are secured together using four hex screws. It offers the same access to ports as the Pimoroni, including making connection­s to the CSI and DSI before closing the case. Fan noise is low, no louder than a typical laptop fan running at idle. If you want a solid case with good cooling, this is an ideal choice.

Pimoroni Fan Shim

This is the smallest and cheapest active cooling solution. A shim is a board which connects to the GPIO while retaining access to the pins, thanks to a rather snug fit to the topmost series of pins. The Fan Shim offers excellent cooling when constantly turned on. At idle we see 29°C, the lowest temperatur­e in our test, and under full load for four minutes the temperatur­e was 45°C. This tiny little fan blows cold air directly onto the CPU and can be used all day.

You can use a Python script to detect the CPU temperatur­e via an onboard sensor. If the temperatur­e goes over 65°C (by default), it will trigger the fan to come on, and if the temperatur­e drops below 55°C the fan turns off. Of course, these values can be altered to suit your preference­s.

The Fan Shim does not block access to any ports, and it can be used with Pimoroni’s cases. It can be used with the POE board but the clearance between the two is very tight. If you need a simple and effective cooling solution, this is the one!

Geeekpi Aluminium Case

This is a cheap case and that was evident in the build quality, with sections of the aluminium case having nasty burrs. The case is relatively easy to assemble, coming as a series of aluminium sections held together with screws. A little force is required to ensure that the case is square, and in our build we had to move the microsd panel a little to ensure that the case fitted snugly around the Pi.

The Pi 4 is screwed to the bottom of the case, and held in place by the USB ports, which are rather close and could be bridged, creating a short circuit. Cooling is provided by a series of thermal pads and a 20mm heatsink and fan, powered by the GPIO. With an idle temperatur­e of 37°C and under load a temperatur­e of 56°C, this is a poor cooling option. It may keep the Pi cooler than stock when in all-day use, but the overall quality of the product lets it down.

Access to the GPIO is possible, except for the 5V and GND pins, which rules out the use of HATS. Camera (CSI) and Display (DSI) connection­s are not possible unless the case lid is removed. Adding the POE board is impossible as the heatsink and fan will stop the board connecting to the GPIO. Access to the microsd port is rather awkward and requires tweezers to remove a card. In all, best to avoid this option.

52Pi Ice Tower

This is a beast of a cooling unit. Looking like an old Pentium 4 cooler, the Ice Tower sits atop the Pi4 via a custom holder which requires a little fiddling during assembly – but the included instructio­ns are quite easy to follow. This big and brash cooler connects to the GPIO of the Pi, using the 5V and GND pins to power the RGB fan. With an idle temperatur­e of 31°C and a temperatur­e of 45°C when under load, this is an excellent cooling unit that will keep your Pi 4 cool all day if necessary.

Access to the GPIO is possible, but no HAT boards can be used. Access to the CSI and DSI ports is tricky, but possible. The limitation­s of this cooler are that it’s large, and so any case is rendered useless. If you are building a home server then this is the cooler to use, but you will need to be creative in how the Pi is stored.

So which is coolest?

We took a reading at the start of the test (idle. At four minutes into the test, the Pi is confirming prime numbers and running at 100 per cent speed, which means it’s working as hard as it can. See the graph below for the collected results.

As you can see, Pimoroni’s Fan Shim – the lowestpric­ed option – is the most effective, offering dramatic cooling from a tiny fan but with no heatsink. A heatsink offers an extra level of thermal transfer and in terms of pure cooling, the 52Pi Ice Tower is a beast with a copper heat pipe and heatsink cooled with a powerful fan. When under full load (two minutes into the test) the CPU was reporting only 42°C, so compared to a stock Pi running at 57°C, we have a 15°C drop in temperatur­e

But if we change the thermal pad on the CPU for thermal paste, we see a massive difference, with the CPU running at 29°C – almost a 50 per cent drop in temperatur­e! The main problem with the 52 Pi Ice Tower is that it is massive. If we’re using it in a home server capacity that might not be an issue, but we can’t use this cooler for typical Pi projects. If we need to use the Pi for a ‘normal’ project then the Pimoroni Fan Shim is an excellent and very cheap solution. It is small, and when used in constantly active mode, it can match the 52Pi Ice Tower for cooling power.

So for what projects would the 52Pi Ice Tower be of use? Quite simply, overclocki­ng your Pi from 1.5GHZ to 2GHZ – that’s a 25 per cent increase in power for free. Overclocki­ng is when the CPU is pushed past the

recommende­d limits, and overclocki­ng a Raspberry Pi is quite simple – but it should only be attempted if you are prepared to accept that you may damage or break your Pi. Don’t attempt to overclock without active cooling! For our overclock we used the 52Pi Ice Tower and some Arctic Silver thermal paste.

To overclock a Raspberry Pi 4, first open a terminal and ensure that your software is up to date.

$ sudo apt update

$ sudo apt upgrade

The next step ensures that the firmware on your Pi 4 is up to date, as we need the latest version in order to overclock successful­ly.

$ sudo rpi-update

When done, reboot your Pi to ensure that changes are made correctly. To set the overclock for the Pi, open a terminal and type the following to edit a configurat­ion file.

$ sudo nano /boot/config.txt

Using the arrow keys, scroll to the bottom of the file and create a new line, then enter the following to set the voltage and CPU speed.

over_voltage=4 arm_freq=2000

To save and exit nano, press Ctrl+x, and when asked to save, press Y and then Enter. Reboot the Pi for the overlock to take effect. When the Pi has rebooted, open a terminal and type the following to see the current

CPU speed, which at idle is around 600MHZ: sudo watch cat /sys/devices/system/cpu/cpu0/ cpufreq/cpuinfo_cur_freq

How can we push the Pi to use the new overclocke­d speed? Via a tool called Sysbench, we can instruct the Pi to confirm prime numbers from 2 upwards, so let’s ask the Pi to confirm all of the prime numbers from 2 to 50,000. For this we shall use all four cores (threads) of the CPU to ensure that the Pi is maximised. In another terminal, type:

$ sysbench --test=cpu --cpu-max-prime=50000 --numthreads=4 run

Now watch the original terminal, which will update every two seconds to show the current CPU speed. Under load you shoule see the CPU speed shoot up to 2GHZ – and hopefully stay there without crashing due to overheatin­g.

Cooling your Raspberry Pi 4 may not be essential for day-to-day use, but for those that wish to push the silicon and get the most from their Pi, it is absolutely essential. As always, take great care when using cooling units with your Pi 4, ensure that they are fitted correctly and if they are made of metal, that they are not in contact with electronic­s or power circuitry.

 ??  ??
 ??  ?? It may look like a griddle pan, but the Pimoroni Aluminium case offered acceptable cooling for low-noise projects.
It may look like a griddle pan, but the Pimoroni Aluminium case offered acceptable cooling for low-noise projects.
 ??  ??
 ??  ?? Don’t be fooled by the size of the Pimoroni Fan Shim – it will keep your Pi 4 cool and retains access to the GPIO.
Don’t be fooled by the size of the Pimoroni Fan Shim – it will keep your Pi 4 cool and retains access to the GPIO.
 ??  ?? The Jun_electronic Aluminium Heatsink and Fan offers a good general level of cooling – this unit is sturdy and well-protected.
The Jun_electronic Aluminium Heatsink and Fan offers a good general level of cooling – this unit is sturdy and well-protected.
 ??  ??
 ??  ?? The Ice Tower is a great cooling unit. It may look rather grotesque in proportion to the Pi 4, but it offers exceptiona­l long-term cooling.
The Ice Tower is a great cooling unit. It may look rather grotesque in proportion to the Pi 4, but it offers exceptiona­l long-term cooling.
 ??  ?? The Geeekpi case is made from aluminium, but it requires further refinement to make it worthwhile. It’s a little too low-cost to prove itself useful and safe for long-term projects.
The Geeekpi case is made from aluminium, but it requires further refinement to make it worthwhile. It’s a little too low-cost to prove itself useful and safe for long-term projects.

Newspapers in English

Newspapers from Australia