Fan Shim button always held

RPi4 arrived today with a fan shim. All seems to work fime except that the button is always registering as being held down.

I did a quick continuity check and found the following:
Red - Short
Green - Short
Blue - Open (Closed when button pressed)

Is this correct? Am I just reading the status incorrectly? (Using the button.py example)

I don’t really like the location of the button so was going to remove it and have one somewhere else anyway. Would just like to check if there’s an actual issue here.

That internal wiring looks to be normal to me. The small 4 pin black push buttons in this kit are like that.

Why yours is detected as always pushed I don’t know?

same.
Both with python2 and 3.
Maybe something gpio related changed with buster?

I had a look at the button.py but to be honest can’t figure it out? I will be getting a fan shim at some point, don’t have one to play with at the moment though.
Only other thing I can think of is maybe its not making a good connection on the GPIO pins? Those friction fit shims can be a bit iffy sometimes.

fanshim = FanShim(pin_button=3) works for me, the code just seems to be wrong (it uses gpio 17 by default) or there has been a hardware revision.

1 Like

Thanks kttter42. That sorted it straight out.

GPIO 3, physical pin 5, is the pin used on a Pi 3B to boot it up. It can also be used to do a proper shutdown with a config.txt edit.
If you do a shut down from Raspbian on a PI 3B+, and leave it powered. Momentarily grounding pin 5 will boot it up. Just a FYI post. ;)

I too am having the same problem. Will give kitter42’s suggestion a try!

I was going to suggest reporting the issue on the GitHub page but it already has.

This is due to an underlying known issue with RPi.GPIO ( https://sourceforge.net/p/raspberry-gpio-python/tickets/168/ ) which has not been updated to support setting pin pull/up down states on the Pi 4.

Swapping the pin over to BCM3 works because the button is connected to both BCM3 (for waking from sleep) and BCM17 (for avoiding conflicts with i2c). BCM3, by virtue of being one of the hardware i2c pins on the Pi, has its own onboard pull-up resistor, so it skirts around the fact pull up/down states aren’t being properly set by RPi.GPIO.

1 Like

The fan shim pinout is now up showing what GPIO are used.