Questions about GPIO pins used on Fan Shim

I was wondering if schematics for the Fan Shim are available? The python library references GPIO 17 & 18, but looking at the photos, there also appear to be connections to GPIO 14 & 15 (The UART Tx & Rx).

I normally use my RPis headless and often use the serial console, so I wanted to make sure that the fan shim won’t interfere with the serial console operation.

2 Likes

Welcome! It’s not up on https://pinout.xyz/ yet, this is usually the go to source of such information. Maybe Phil @gadgetoid can help?

Gordon

Quit often with the shims, the header is longer than it needs to be just for the connections. Unused pins are used to give it rigidity. Just physical connections, not electrical connections. It stops the shim from moving around just from the weight of what’s on it. This is especially true of these solderless shims with no headers on them. The LED Shim for example covers all 40 pins but electrically only uses about 5 or 6 pins. i2c, power and a couple of ground pins.

The python library should tell you if it uses uart or not. You may have to sift though the examples one at a time. I would think that eventually the pinout will be up.

It looks like it uses another library called plasma which users pins 14 & 15 to control the LEDs.

So it might be possible to still use the serial console as long as the LED isn’t used.

I would have thought all of that would have been done via i2c? It looks like the APA102 used SPI though? So you may be on to something.
@sandyjmacdonald Sandy likely knows whats what with it. He was demoing it in the Bilge Tank Video. .

If you go to about 17 minutes in, in this video there is some info on what pins the Fan Shim uses.
They say that the LED works like the LED Shim, I have a couple of those, they use i2c.

The pinout is now up,

The BCM3 is marked to be used only for wakeup. So it doesn´t have an address in the bus or interfere with other HATs…? Right?

1 Like

Correct, on newer Pi’s grounding BCM3 will wake them up. I have a couple with two wire pigtails plugged into GPIO physical Pin 5 and 6. The button switch wired to the end shorts the two pins together when pressed, grounding BCM3 / Pin 5. Headless Pi 3A’s running motion eye. I just shut them down but leave them powered up. It can also be used as a shutdown signal with a config.txt edit.
dtoverlay=gpio-shutdown

If you go to the pinout page, and there is no i2c address listed, that device doesn’t use i2c. A lot of the GPIO pins have dual and now with the Pi 4, triple functions. I imagine this page will be updated to show that at some point


The new Pi 4 extra functions need to be added.

Would that mean that if I had another HAT using BCM3 with the Fanshim, the operation of both the fan and the HAT would not be affected?

I’m trying to use the Fanshim with the Sense Hat, and the only pin they both use is BCM3.

BCM 3 is only used by the fan shim, if and when the button is pressed. If you don’t press the button the sense hat should be fine. And even if you did press it, all that will happen is an io error on i2c. If i2c is enabled, shutting down by grounding GPIO 3 doesn’t work, it’s ignored. That’s why the button on the fan shim also grounds GPIO 17 when pressed, that’s the actual shutdown signal.
You should be able to use both and use the button on the fan shim. If you install the fan shim daemon, pressing the button will do a proper shutdown. It’s also going to give you an io error, but that won’t matter much if your shutting down anyway. And if you leave the power supply plugged in, pressing the button will boot up the pi. It’s only a momentary press so by the time your python code for the sense hat is running it should be fine.