Using fanshim-python with standard fan


I want to use the fanshim-python script for a standard fan and a standard button.
This means both the fan and the button will be connected with GPIO.

Can you please confirm which GPIO pins must be used for the fan and the button respectively?


The fan needs control circuitry to be turned on off via a GPIO pin. If you try to run a standard 2 wire fan directly from a GPIO, other than the 5V pin, your going to damage that GPIO pin.

Fan SHIM at Raspberry Pi GPIO Pinout

The fan is a standard 5V fan.
Based on the Fan SHIM GPIO Pinout I would connect it to GPIO 18 and ground.
The button would be connected to GPIO 17 and ground.
Would this make sense?

It won’t work that way, if you do that you will damage GPIO 18. That GPIO Pin is only 3.3V when its a logic high, and has a low current limit. The fan is going to draw too much current and damage the Pi.

I fear you are right.
Actually the fan is mounted to a heatsink like this.

I guess the only option to get a temperature controlled fan is by applying this solution.

Yes, you will need to add the extra control circuit to a stock fan.

I’ll try to sell this heatsink on ebay and buy Pimoroni Fan SHIM instead of adding this extra control circuit.