Raspberry Pi 4: Do you need a fan? What’s the best fan for a raspberry pi 4?

In this video I spend some time thinking about the temperature of the new raspberry pi 4, and whether it needs a fan.

Idle Temperature

I installed rpi-monitor and also watched the cpu temperature using console tools. In the case that I used, I found the pi 4 at idle to be running at about 55 to 57 degrees Celsius. That’s on my desktop in my relatively cool office. Another pi installed over by my 3D printer, where the ambient is a bit warmer I found to be idling around 60 C. In my opinion these idle temperatures are fine. Even though you can feel some heat, for example when touching the USB and Ethernet jacks, 60 C is not a problem.

Temperature under load

I used sysbench running 4 threads computing primes to produce load and then I again measured the temperatures. Under load, we steady out around 82 C. The pi is now running at 1.5 GHz, and frequency cap is enabled. It still hasn’t throttled yet. Material on the net leads me to believe that it won’t throttle until it hits 85 C. I never hit 85 C. I do think that using some of the onboard peripherals, such as the HDMI ports or the USB ports or the ethernet may have produced some heat, and perhaps we could have got it to throttle.

Simple 2-pin fans

I had a 30 x 30 x 10 Sunon fan handy, part number MC30100V1-000U-A99. According to datasheet this is a 9500 RPM fan. This dropped the temperature under load from 82 C to around 50 C. It’s noisy.

To reduce the noise, I tried connecting the fan to 3.3V using the Pi’s 3.3V regulator. This noticeable reduced fan noise and RPM, and produced little or no effect on the temperature under load. However, I don’t think connecting motor to the pi’s 3.3V regulator is a great idea. I’d rather power it from the 5V supply.

So the next thing I tried was a 37.5 ohm resistor (two 75 ohm in parallel) in series with the fan connected to 5V. This slowed the fan down even more, reduced speed, and the temperature climbed up to 55 C. This is a perfectly acceptable temperature. I think using resistors like this and powering from 5V is superior to trying to power from 3.3V. It does mean, however, adding a few inline resistors. Not a big deal, but klugy looking.

A 4-pin PWM fan

Next I tried a 4-pin PWM fan from delta electronics, sourced via digikey. This lets me control the speed using PWM via GPIO 18 on the pi. GPIO 18 was specifically selected because it supports hardware PWM on the pi. You can easily vary the speed from 0 to 100%. This particular fan also supports RPM monitoring, allowing the RPM to easily be read back. In my case, I read back the RPM on GPIO 23. I found that I could get acceptable cooling (62 C) all the way down at 1500 RPM. The fan is pretty much silent at this point.

Note that you don’t necessarily need a 4-pin fan to do PWM control. You can do it with a 3-pin or even a 2-pin fan. In that scenario you would just need to add a transistor driver to switch the fan from the pi’s GPIO. The 4-pin fans have the driver built in, that’s why I like them better — fewer external components.

This delta electronics fan is my recommended fan, as I think being able to easily control the speed with no additional components and being able to monitor the RPM are nice features. It’s also a 7mm thick fan, which will fit it into tighter cases than a 10mm thick fan.

Do you need a fan at all?

Some people say yes, some people say no. I find myself in the “no” camp unless you are running your pi in an area where ambient air is already warm and cooling may be impaired. Running with a fan doesn’t hurt anything, it certainly gives you some breathing room before throttling would kick in. So there’s no harm in doing so. Fan sellers and heatsink sellers will try to convince you a fan is mandatory, they’ve been doing so since the raspberry pi 2 and 3. I say it makes more sense to simply try out the pi under your expected load and see what temperatures you are producing. Monitoring the temperature is easy enough using tools like rpi-monitor. If you don’t want to install rpi-monitor, then a simple “cat /sys/class/thermal/thermal_zone0/temp” will tell you the temperature, just divide the number you get by 1000.

Will a raspberry pi 4 melt a 3d-printed case?

Normally I used PETG for my project cases, and I would have absolutely no concern of melting a PETG case. For this video, I figured I’d try a PLA case as well, since PLA has a lower deformation temperature than PETG. I let the pi sit inside of the PLA case for over an hour at maximum CPU load, with a CPU temperature of 82  C. No deformation of the PLA case. Not at all.

Some Caveats

The type of projects I build lately don’t use a monitor or keyboard, and hence I didn’t use the pi 4’s dual HDMI outputs. I suspect that generating video on the pi will probably produce a bit more heat. Using USB devices will probably also produce more heat, and of course anything that causes additional load on the pi’s 3.3V regulator may cause regulator heat. So as I said above you really ought to measure the temperature in your own application to determine your own thermal behavior.

Source Code

If you’re looking for the tool I wrote to monitor rpm, you can find it at https://github.com/sbelectronics/smb-pi-lib. It’s a bit of a work in progress, no guarantees on how correct it is. I do think that producing a simple reactive temperature monitoring daemon that watched CPU temperature and adjusted the fan speed as necessary would be relatively simple with one of these 4-pin PWM fans.

Leave a Reply

Your email address will not be published. Required fields are marked *