CPU heatsink and ventilation holes

How do they influence CPU temperature in Raspberry Pi 4 with Monarco HAT in metal enclosure?

Why are we studying it?

The answer is simple: Because these are the two most common questions which we repeatedly receive, especially after we announced the field-testing of Monarco HAT with Raspberry Pi 4:

  1. Are you using some CPU heatsink? Which one would you recommend?
  2. Why are there no ventilation holes in the metal case? They would surely help in preventing the Raspberry Pi from overheating!

Long story short, we have conducted a series of tests to back up our answers with specific data. And we share our findings here.

The testing setup consisted of 3 devices, where the middle one was the main Device-Under-Testing (DUT).

A group of Raspberry Pi 4 and Monarco HAT-based PLCs on a DIN-rail
A group of Raspberry Pi 4 and Monarco HAT-based PLCs sitting on a DIN-rail.

The first purpose of the tests was to examine the following CPU heatsinks:

And the second one was to examine the prototype of enclosure with ventilation holes:

CPU heatsinks

Our expectations regarding the benefits of using a CPU heatsink we quite low. Given the compactness of the device and the fact that the whole metal DIN-rail case acts as a heatsink, we anticipated there is not much room for improving the heat dissipation. Still, we prefer knowing over guessing so we ran some tests.

  • The copper heatsink totally failed because the sticky substance holding it on top of the CPU melted, allowing it to slip away. Because the vertical mounting position is our preferred one, this failure immediately disqualified the copper heatsink from our tests. A conductive element possibly going loose in an electronic device - no way!
  • Although the aluminium heatsink kept its position, its effect was not measurable at all. We can only guess if it was due to its small size or due to low thermal conductivity of the glue, but the result is the same: no reason to test or use that one.
  • The big black heatsink was the only one which had some measurable effect. Its benefits are described and displayed below.

Ventilation holes

Our expectations regarding the ventilation holes were more optimistic. In a series of experiments, we tested the following combinations:

  1. Plain CPU, closed enclosure
  2. Plain CPU, enclosure with ventilation holes
  3. CPU with a heatsink, closed enclosure
  4. CPU with a heatsink, enclosure with ventilation holes

In all cases, we ran one experiment with a constant CPU load. The other experiment contained a CPU idle phase. Otherwise the CPU load was the same: approximately 75% in a single CPU core (*). Ambient temperature during the tests was 24.7°C, the devices under testing were mounted in vertical position on a DIN-rail.

The graph below shows that the effect of the CPU heatsink and ventilation holes alone is nearly the same, the CPU temperature drops down by approximately 1.5°C. When these two are combined together, we get another decline by 1.0°C.

*) approximately 60000 high-pass and low-pass filters (LLC and FOPDT blocks), executed each 50 milliseconds by REXYGEN runtime core

Time plot showing the effect of CPU heatsink and ventilation holes in Raspberry Pi 4 and Monarco HAT
Time plot comparing the effect of CPU heatsink and ventilation holes on CPU temperature in Raspberry Pi 4 and Monarco HAT

Lessons we learned

  • 1
    Do not compare multiple Raspberry Pi devices against each other
    The absolute CPU temperature readings may differ by 3°C even if the two devices are under the same load and the ambient temperature is also the same. However, it is just an offset given by the precision of the sensor. The reactions to variations in load are the same, i.e. the temperature increases or decreases by the same amount of degrees.
  • 2
    The effect is the same on multiple devices
    Although the time plot shows only data from experiments on a single Raspberry Pi 4, we observed the same effects on the other two devices.
  • 3
    The effect is the same even at higher temperatures
    If a HDMI screen is connected to display e.g. HMI webpage, the CPU load and temperature naturally increases. However, the effect of using the CPU heatsink and ventilation holes remains the same.
  • 4
    Our findings do not apply for a plain Raspberry Pi 4
    We conducted our tests with the Raspberry Pi 4 and Monarco HAT in a metal case. With a plain Raspberry Pi, especially when not enclosed, the effect of CPU heatsink will be more significant.


We did not make a final conclusion yet, but:

  1. We are still not convinced that using CPU heatsink brings significant benefits to outweight the added cost, additional operation during assembly and the risk of a conductive element possibly getting loose and creating a short-circuit.
  2. We are inclined towards adding ventilation holes to the enclosure. Although the temperature drop is not very significant, the added holes should not hurt nor break anything.

What are your thoughts on this? Let us know!

  • Raspberry Pi is a trademark of the Raspberry Pi Foundation.