HomeRaspberry PiThe coolest heatsink for Raspberry Pi 4

The coolest heatsink for Raspberry Pi 4

Improving the design of the 52pi ICE Tower Heatsink

Some time ago I reviewed the ICE Cooling Tower from 52pi – an impressive heatsink with a 40mm fan. There were two glaring issues with it: lack of RPM controls and no controls over RGB LEDs in the fan. I guess, this post fixes that. I think I just made the coolest heatsink for Raspberry Pi 4.

Modding ICE Cooling Tower

This mod should take you about 30 min, providing you have the components needed. The shopping list is extremely short and inexpensive.

With these components, a couple of cables, some glue, heat-shrink and some patience you will be able to control RPMs of the 40mm fan and add RGB effects to your ICE Cooling Tower.

To start, I have to open up the 40 mm fan and remove the existing LEDs. To open up the fan, press down firmly on the centre axis and the bearing. Both should slide out from its case, exposing the motor coils and the PCB.

The PCB comes with 4 LEDs that are surface mounted. These are seriously small, so all it takes to get it off from the PCB is some heat from the soldering iron. Just heat up one side and wiggle the iron a little – the LED should come off without issues. I used 375ºC to achieve this.

Now your ICE Cooling Tower is ready to become the coolest heatsink for Raspberry Pi 4.

Buy 52pi ICE Cooling Tower

Buy it using these links to support NotEnoughTech.


The easiest (but there are more sophisticated ways) of controlling a DC motor is to use a PWM signal to limit the RPMs of the motor. Since the ICE Cooling Tower fan comes with no such controls I can use 2N2222 series transistor to control the fan’s speed.

The base of the transistor needs a 1KΩ Resistor to limit the current from the GPIO. Use heat-shrink to separate each pin and prevent accidental shorts. Then simply cut the power wires and resolder everything based on the diagram.

You should have 3 wires now: signal, 5V and GND. You can glue the transistor to the bottom of the fan. It’s time to add some colour to my project.


I salvaged one of the RGB LED strips from a previous project. I only needed 3 individually addressable WS2812b LEDs. To make the diodes fit, I sheered some of the strip off. Then I used a thin wire to connect all of them, creating a 3 LED long strip. You can use some glue to keep the LEDs in place. This is how the finished fan mod should look like.

Custom driver in NodeRED

At this point, you could write a driver in Python, but since I already have NodeRED running, I took upon the challenge of creating an interactive driver for the coolest heatsink for Raspberry Pi 4. It’s actually easier than I thought it would be.

I’m going to use 3 nodes to monitor Raspberry’s CPU, control GPIO and the WS2812b LEDs:


The neopixel node relies on a Python driver, so I also had to install:

 curl -sS get.pimoroni.com/unicornhat | bash 

I have 4 wires to connect:

5VPower Supply
GPIO23 (or any PWM pin)2N2222’s base pin

Neopixel library leaves me no options, so I have to use GPIO18, but to control the RPMs of the 40 mm fan I can pick any PWM enabled pin.

NodeRED Flow

Injecting a payload every 5sec to the CPU node provides me with the core’s temperature. Based on this value I can create the brackets for colours of the RGB and adjust the fan RPMs.

I’m going to use NodeRED 1.0 environmental settings in subflow to create a config node which lets me set the values that flow will use. For RPMs, the value is 0-100 and for RGB I need to pass the number of LEDs (3) and the colour (this list).

Colour names are assigned in the setting subflow. I picked 7 colours representing the temperature levels. The hotter the core gets, the warmer the colour. Neopixel node just needs the number of pixel in the string.

Function Node: Fan Colour Profile
var colour1 = flow.get("colour1");
var colour2 = flow.get("colour2");
var colour3 = flow.get("colour3");
var colour4 = flow.get("colour4");
var colour5 = flow.get("colour5");
var colour6 = flow.get("colour6");
var colour7 = flow.get("colour7");

var temp = msg.payload;

if(temp<= 33){
    msg.payload = colour1;

if(temp<= 35 && temp >33){
    msg.payload = colour2;

if(temp<= 38 && temp >35){
    msg.payload = colour3;

if(temp<= 42 && temp >38){
    msg.payload = colour4;

if(temp<= 45 && temp >42){
    msg.payload = colour5;

if(temp<= 48 && temp >45){
    msg.payload = colour6;

if(temp >48){
    msg.payload = colour7;

return msg;

RPMs are set based on the % value 0-100. My fan struggles to spin on PWM set lower than 30%. My setup keeps the fan off until the CPU core reaches 40ºC. It ramps up to 30% then 50% and 100% if the temperature crosses 60ºC. The GPIO node is set in PWM mode at a frequency of 30Hz.

For some reason, I can actually hear the motor whine at lower RPMs. It’s not loud but it’s there. The sound goes away when fan spins at 100%.

Function Node: Fan Colour Profile
var speed1 = flow.get("speed1");
var speed2 = flow.get("speed2");
var speed3 = flow.get("speed3");

var temp = msg.payload;

if(temp<= 40){
    msg.payload = 0;

if(temp<= 50 && temp >40){
    msg.payload = speed1;

if(temp<= 60 && temp >50){
    msg.payload = speed2;

if(temp >60){
    msg.payload = speed3;

return msg;

Buy 52pi ICE Cooling Tower

Buy it using these links to support NotEnoughTech.


This is no doubt the coolest heatsink for Raspberry Pi 4. With this simple mod, you can add life to your project. Nothing stops you from displaying different things using the LEDs. For the majority of the time, ICE Cooling Tower keeps the Raspberry Pi 4 under 40C, so it’s silent. The fan kicks in when it has to. What do you think about this project? You can leave me a comment in this Reddit thread.

Project Download

Download project files here. Bear in mind that Patreon supporters have early access to project files and videos.


Nothing says "Thank you" better than keeping my coffee jar topped up!


Support me on Patreon and get an early access to tutorial files and videos.


Bitcoin (BTC)

Use this QR to keep me caffeinated with BTC: 1FwFqqh71mUTENcRe9q4s9AWFgoc8BA9ZU


Programable, ESP32 based awesome dev platform with 4.7 e-ink display by M5Stack

More HATs


Argon One M.2

Enclose Raspberry Pi 4 inside this great case with custom I/O, cooling and GPIO and M.2 SSD support

More cases on


Best Raspberry Pi Projects

How to use Raspberry PI as WOL (wake on lan) server

While you could wake up your PC from a mobile directly, having a dedicated server capable of doing so is the best solution. The reason is simple. You can hook up as many devices as you wish with a single endpoint. This is why Raspberry Pi is perfect for this.

Slow Internet Warning

From time to time my Internet grinds to a stop. Since Raspberry Pi 4 comes with a 1Gbps Ethernet, I decided to take advantage of it and create a reporting system in NodeRED that will monitor and report when the ISP is not keeping the contractual agreements. Works with Alexa, Google Home, Android and Windows 10.

How fast Raspberry Pi NAS is?

Let's see how fast Raspberry Pi NAS really is?

Argon18: Argon ONE SSD modification

Argon One case just got better - now you can boot it from USB without ruining the design thanks to Argon 18: Argon One SSD modification


It took me 2 months to boot CM4 from NVMe

Complete beginners guide to Compute Module 4 boot from NVMe.

Raspberry Pi Zero 2 W vs other Zero boards

It's time to test the Raspberry Pi Zero 2 W against other Raspberry Pi boards from Zero series: power, WiFi, temperature and core performance

C/C++ and MicroPython SDK for Raspberry Pi Pico on Windows

A guide to SDK toolchain for Raspberry Pi Pico and C/C++ , Micropython on Windows.

A comprehensive guide to Grafana & InfluxDB

How to use Grafana and InfluxDB on Raspberry Pi for IoT sensors in home automation

How to boot Raspberry Pi 4 from USB

How to set up and boot Raspberry Pi 4 from USB drive - headless guide.