Fanshim should stop, but isn't

My fanshim never really quite worked from the start, and I haven’t been able to find a solution to any problems that are quite like mine.

When not running the automatic.py script, the LED stays off and the fan stays in dummy mode (just cooling). This is as expected.

When running the automatic.py script, however, the LED comes on but the fan does not turn off when well below the off threshold. The LED changes color as the pi heats up, but the fan never stops spinning.

Here is the script running with verbose on

pi@raspberrypi:~/fanshim-python/examples $ python automatic.py --verbose --brightness 100 --on-threshold 60 --off-threshold 50
Current: 37.97 Target: 50.00 Freq  1.80 Automatic: True On: True
Current: 37.00 Target: 50.00 Freq  0.60 Automatic: True On: False
Current: 37.00 Target: 50.00 Freq  0.60 Automatic: True On: False
Current: 37.48 Target: 50.00 Freq  0.60 Automatic: True On: False
^Cpi@raspberrypi:~/fanshim-python/examples $

I would reattach the fan shim. Maybe even press down on it or tilt it slightly and see if the fan works normally. Best guess is the fan control pin isn’t making a good contact.

I do believe that pin is pulled low (grounded) to turn the fan off.

Yes the contacts aren’t reliable. I screwed mine down through the RPI mounting hole with a 3D printed spacer because the vibration made it move around and touch my case lid. It then stopped working and I had to release the screw a little to get it to work again.

I soldered mine to a booster header. I just left out those two spacer nuts when mounting the fan to the holder to lower it back down a bit. I also have the heatsink attached so I need a bit of space between the fan and the heatsink anyway.