Automate fan, rather than always on?

Hi there,

I’ve got fan running on my Pi, but it’s on all the time.

I’ve seen some solutions to have the come on automatically when the Pi’s temperature rises above a pre-determined level. However, executing the various shells and scripts etc is way beyond my current capabilities.

Is there a simple/easy way to install this functionality, ie is there an ‘app’ or a cut and paste of some code that I can utilise?

Thanks in advance.

Well it depends on the fan you have installed. Maybe you can share the model.

I have the CanaKit 5V fan. Not sure if relevant but its 3cm wide/tall.

Many thanks

nope it’s not possible to control this fan without additional hardware. If I’m not mistaken it doesn’t support PWM.

You would need something like this https://www.tindie.com/products/jeremycook/ez-fan2-tiny-raspberry-pi-fan-controller/

or you are going to build it yourself https://www.instructables.com/PWM-Regulated-Fan-Based-on-CPU-Temperature-for-Ras/

As an alternative you would need to look for a fan / case who supports fan control ootb.

OK, so looks like this may work?

https://thepihut.com/products/fan-controller-for-raspberry-pi

yes something like this. But I guess you are using a case, there you would need to check before hand if the board will fit inside :wink:

Seems to have done the trick, and fitted nicely in the case.

The instructions said to add the following to the boot/confiq.txt file:

dtoverlay=gpio-fan,gpiopin=3,temp=80000

I’ve assumed that 80000 is 80 degrees C, so I’ve adjusted this to 60000. Guess I won’t know if it works until the Pi heats up :sunglasses:

you ordered this peace of hardware? Was quicke delivery I would say :smiley:

for testing, you could run some stress test

I know I was very impressed with the speed of delivery.

Although I’ve adjusted the value in the command down to 60000 the Pi is still getting to over 60 degrees. And the Pi tells me it’s hot, but not unsafe. Should I bring the value down?

Are you able to point me in the direction of a stress test?

Many thanks,

Hi,

a stress test can be started using dietpi-config > 10 : Tools. Simply burn your CPU for 1 minute :sunglasses:

Using this and it is great: https://shop.pimoroni.com/products/fan-shim