User avatar
PeterO
Posts: 5884
Joined: Sun Jul 22, 2012 4:14 pm

Fan overlay working with Pimoroni fan shim

Fri Aug 23, 2019 9:58 am

I now have a Pimoroni fan shim fitted which uses pin 18 , so I added

Code: Select all

 dtoverlay=gpio-fan,gpiopin=18,temp=65000
and it just works :-)
Now I'm sitting here wasting time watching it start and stop 8-) :lol:
PeterO
Discoverer of the PI2 XENON DEATH FLASH!
Interests: C,Python,PIC,Electronics,Ham Radio (G0DZB),1960s British Computers.
"The primary requirement (as we've always seen in your examples) is that the code is readable. " Dougie Lawson

Andyroo

Re: Fan overlay working with Pimoroni fan shim

Fri Aug 23, 2019 11:18 am

PeterO wrote:
Fri Aug 23, 2019 9:58 am
...
Now I'm sitting here wasting time watching it start and stop 8-) :lol:
PeterO
I was going to ask if you where having a bad day but then I thought this would be more entertaining than the tripe on TV most days. Neat solution and bookmarked - thanks for the solution.

User avatar
DougieLawson
Posts: 39169
Joined: Sun Jun 16, 2013 11:19 pm
Location: A small cave in deepest darkest Basingstoke, UK
Contact: Website Twitter

Re: Fan overlay working with Pimoroni fan shim

Fri Aug 23, 2019 11:19 am

Does Pimoroni document that on their website? If not you may want to tweet this to them.
Note: Any requirement to use a crystal ball or mind reading will result in me ignoring your question.

Criticising any questions is banned on this forum.

Any DMs sent on Twitter will be answered next month.
All non-medical doctors are on my foes list.

User avatar
PeterO
Posts: 5884
Joined: Sun Jul 22, 2012 4:14 pm

Re: Fan overlay working with Pimoroni fan shim

Fri Aug 23, 2019 11:38 am

DougieLawson wrote:
Fri Aug 23, 2019 11:19 am
Does Pimoroni document that on their website? If not you may want to tweet this to them.
Already done so Dougie...
PeterO
Discoverer of the PI2 XENON DEATH FLASH!
Interests: C,Python,PIC,Electronics,Ham Radio (G0DZB),1960s British Computers.
"The primary requirement (as we've always seen in your examples) is that the code is readable. " Dougie Lawson

User avatar
clicky
Posts: 477
Joined: Thu Oct 25, 2012 7:34 am

Re: Fan overlay working with Pimoroni fan shim

Fri Aug 23, 2019 4:22 pm

PeterO wrote:
Fri Aug 23, 2019 9:58 am
I now have a Pimoroni fan shim fitted which uses pin 18 , so I added

Code: Select all

 dtoverlay=gpio-fan,gpiopin=18,temp=65000
and it just works :-)
Now I'm sitting here wasting time watching it start and stop 8-) :lol:
PeterO
I've got a complaint to file: why didn't you post it sooner! LOL
Thanks - I'll do it asap, too! :D

itsmedoofer
Posts: 402
Joined: Wed Sep 25, 2013 8:43 am

Re: Fan overlay working with Pimoroni fan shim

Thu Aug 29, 2019 11:39 am

First class, I'll give that a go tonight !! The python tools currently used look nice with the bright lights but there are a lot of dependencies and I'm sitting here with top running looking at it using 2%CPU :)

alphanumeric
Posts: 2553
Joined: Tue Jan 19, 2016 2:17 pm
Location: Sydney, Nova Scotia, Canada

Re: Fan overlay working with Pimoroni fan shim

Sun Feb 09, 2020 1:01 pm

Missed this thread some how. Anyway, I've been running mine this way for a while. I've posted it once or twice on the Pimoroni forums.
I have also added a 10K pull down resistor between GPIO 18 and ground. On shutdown now my fan turns off, no having to unplug my power supply to make it stop. I have also added the following to my config.txt

Code: Select all

 dtoverlay=gpio-shutdown,gpio_pin=17,active_low=1,gpio_pull=up 
This lets me shut down and boot up my Pi by pressing the button on the fam shim.

Code: Select all

 dtoverlay=gpio-shutdown
will also work as the Fan shim button grounds GPIO 3 and GPIO 17 when pressed. If you enable i2c though it stops working and you have to use GPIO 17 instead.

User avatar
PeterO
Posts: 5884
Joined: Sun Jul 22, 2012 4:14 pm

Re: Fan overlay working with Pimoroni fan shim

Sun Feb 09, 2020 1:12 pm

alphanumeric wrote:
Sun Feb 09, 2020 1:01 pm
Missed this thread some how. Anyway, I've been running mine this way for a while. I've posted it once or twice on the Pimoroni forums.
I have also added a 10K pull down resistor between GPIO 18 and ground. On shutdown now my fan turns off, no having to unplug my power supply to make it stop.
If you are not using any Hats, you can restore the original power down behaviour with the bootloader configuration.
See https://www.raspberrypi.org/documentati ... _config.md
I don't have any shutdown/boot buttons so it may not work with your setup.
PeterO
Discoverer of the PI2 XENON DEATH FLASH!
Interests: C,Python,PIC,Electronics,Ham Radio (G0DZB),1960s British Computers.
"The primary requirement (as we've always seen in your examples) is that the code is readable. " Dougie Lawson

alphanumeric
Posts: 2553
Joined: Tue Jan 19, 2016 2:17 pm
Location: Sydney, Nova Scotia, Canada

Re: Fan overlay working with Pimoroni fan shim

Sun Feb 09, 2020 1:28 pm

I do believe if you do that, the Pi will no longer boot up by grounding GPIO 3. You have to ground the reset pin or the global_en pin.
With my current setup pressing the Fan Shim Button will boot it up if it was shut down and left powered. And after the config.txt edit it will do a proper shut down when the button is pressed. And with my pull down resistor mod the fan turns off on shut down. It has to be commanded on once you do the mod though. It will not start up all on its own anymore.

alphanumeric
Posts: 2553
Joined: Tue Jan 19, 2016 2:17 pm
Location: Sydney, Nova Scotia, Canada

Re: Fan overlay working with Pimoroni fan shim

Fri Mar 13, 2020 7:41 pm

Sorry to bump this thread but I have more info to add. If you add the following to your config.txt the fan will turn off on shut down. The downside is grounding GPIO 3 will no longer boot it back up. It is easier to implement than going back to an older firmware though. Just a FYI post.

Code: Select all

dtoverlay=gpio-poweroff,gpiopin=18,active_low=1 

Return to “Device Tree”