5

I am able to trigger my Raspberry Pi 3B's fan to turn on at 50 °C with the following line in /boot/config.txt:

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

However, it automatically turns off again when the temperature has dropped by 5 °C when it gets to 45 °C. Is there a way to set it to turn off when the temperature decreases by 15 °C instead?

Peter Mortensen
  • 2,004
  • 2
  • 15
  • 18
Paradox
  • 153
  • 4

1 Answers1

4

Yes.

You can find the information on all overlays and parameters in your local filesystem at /boot/overlays/README, or in the "official" repo on GitHub here.

Following is the syntax for the gpio-fan overlay:

Name:   gpio-fan 
Info:   Configure a GPIO pin to control a cooling fan.  
Load:   dtoverlay=gpio-fan,<param>=<val>  
Params: gpiopin                 GPIO used to control the fan (default 12)
        temp                    Temperature at which the fan switches on, in
                                millicelcius (default 55000)
        hyst                    Temperature delta (in millicelcius) below
                                temp at which the fan will drop to minrpm
                                (default 10000) 

The parameter you've not specified - the one to control the temp at which the fan turns OFF - is hyst. The entry you need to turn the fan OFF after it drops by 15 deg C is:

dtoverlay=gpio-fan,gpiopin=3,temp=50000,hyst=15000

Note that units are in millicelsius.

Seamus
  • 23,558
  • 5
  • 42
  • 83