
Doing so is sightly more complicated, but still approachable, laid out in the post linked earlier.
PI CPU STRESS TEST FULL
However it is also possible to implement a script to turn the fan on slowly when the temperature is only moderately high, and ramp it up to full blast when needed. Turning the fan on and off is good enough to cool your Pi in most instances. Also note that you can simply add the fan control line in manually, though the raspi-config option formats everything for you nicely. Note that the fan doesn’t switch off until its 10✬ below your set point, so if it’s set too low it may come on and never go off again.

Change the temp value to your preference (noting it’s the on temperature x 1000), save, reboot, and voila the fan comes on at 45✬ or wherever you like. Open up the config.txt file (sudo nano /boot/config.txt in the terminal) and find the line: dtoverlay=gpio-fan,gpiopin=18,temp=60000 noting that the two numbers may be different depending on your configuration. First enable fan control as outlined above. If you’d like to set the on temperature below 60✬, this is possible too, if slightly less convenient.
PI CPU STRESS TEST HOW TO
Core Electronics has a nice guide on how to do this, which I’ve used to verify my setup. If you’d like to test things out, you could go “brute force” with a hairdryer or similar, but a better and more convenient way would be to perform a processor stress test. It then asks you if you want to reboot, and once that is done, the fan is temperature activated. Select the GPIO pin, and select at which temperature it should come on (between 60 and 120✬, which is the same on the GUI interface). Select Performance Options > Fan, and follow the prompts to enable temperature control. Restart and you’re good to go!Īlternatively, you can set things up via the terminal. Below this you can select the GPIO pin that you’d like to use, as well as the temperature at which it should come on. Click on the Performance tab, then select the Fan Enable radio button. The EZ Fan2 board, that I designed, works for this purpose as a plug-and-play transistor unit, including a flyback diode and current-limiting resistor.įrom the Raspberry Pi OS GUI, click on the Raspberry button, then select Preferences > Raspberry Pi Configuration. For simpler fans with only a power and ground input, you’ll need to add a transistor to control current from the 5V source. Raspberry Pi Fan Control Hardware SetupĪs outlined in the video below, if you’re using a PWM fan, all you have to do for control is connect its power lead to one of the Pi’s 5V pins, ground to ground, and the PWM lead to the appropriate GPIO pin. This article covers simple on/off fan control, and variable speed fan PWM fan control is outlined in this separate post.

2-wire fans, or more advanced coolers like the ICE Tower, will need a transistor for control, but PWM fans, such as this 5V Noctua NF-A8, have the necessary components built-in. Raspberry Pi OS has functionality built-in to switch the fan on and off based on temperature. Either is slightly wasteful power-wise, and potentially annoying. To run a simple 2-wire fan continuously, connect it to the 5V and ground pins, or you can instead hook it up to 3.3V for lower speed and noise. The Raspberry Pi’s GPIO pins don’t supply enough current to power even a small fan, but there are several ways to power and control a fan with the Pi. While passive cooling options are often good enough to avoid overheating and thermal throttling, at some point you’ll need to think about using a cooling fan.

As you probably know, Raspberry Pi single-board computers, especially Pi 4 models, can get quite hot.
