Automate fan, rather than always on? Topic is solved

Have some feedback, questions, suggestions, or just fancy a chat? Pop it in here.
TWHH
Posts: 56
Joined: Tue Jun 29, 2021 10:27 pm

Automate fan, rather than always on?

Post by TWHH »

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.
User avatar
Joulinar
Posts: 5090
Joined: Sat Nov 16, 2019 12:49 am

Re: Automate fan, rather than always on?

Post by Joulinar »

Well it depends on the fan you have installed. Maybe you can share the model.
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team
TWHH
Posts: 56
Joined: Tue Jun 29, 2021 10:27 pm

Re: Automate fan, rather than always on?

Post by TWHH »

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

Many thanks
User avatar
Joulinar
Posts: 5090
Joined: Sat Nov 16, 2019 12:49 am

Re: Automate fan, rather than always on?

Post by Joulinar »

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/jeremyc ... ontroller/

or you are going to build it yourself https://www.instructables.com/PWM-Regul ... e-for-Ras/

As an alternative you would need to look for a fan / case who supports fan control ootb.
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team
TWHH
Posts: 56
Joined: Tue Jun 29, 2021 10:27 pm

Re: Automate fan, rather than always on?

Post by TWHH »

User avatar
Joulinar
Posts: 5090
Joined: Sat Nov 16, 2019 12:49 am

Re: Automate fan, rather than always on?

Post by Joulinar »

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 ;)
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team
TWHH
Posts: 56
Joined: Tue Jun 29, 2021 10:27 pm

Re: Automate fan, rather than always on?

Post by TWHH »

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 8)
User avatar
Joulinar
Posts: 5090
Joined: Sat Nov 16, 2019 12:49 am

Re: Automate fan, rather than always on?

Post by Joulinar »

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

for testing, you could run some stress test
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team
TWHH
Posts: 56
Joined: Tue Jun 29, 2021 10:27 pm

Re: Automate fan, rather than always on?

Post by TWHH »

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,
User avatar
Joulinar
Posts: 5090
Joined: Sat Nov 16, 2019 12:49 am

Re: Automate fan, rather than always on?

Post by Joulinar »

Hi,

a stress test can be started using dietpi-config > 10 : Tools. Simply burn your CPU for 1 minute 8)
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team
Post Reply