Openmediavault fanshim

I’ve used your link to install openmediavault on pi4 over raspberry OS lite. The old installation had an operating fanshim Pimoroni (which now runs continuously). I’ve attempted to install Python3 and necessary fanshim software. it still doesn’t work. Any suggestions because I don’t want fan to run continuously.

Hi @Dallas115355

Welcome to the forum!

You may need to set the pimoroni software as a cronjob to load on boot, if you’re not sure how to setup a cronjob this guide should point you in the right direction

Thanks Dan. I’m no expert in these matters, but your suggestion looks like it’d provide a solution. I’ll get to it and report. Before your reply, I reinstalled everything. Got the fan to work but, irritatingly, when the pi is running cool the fan is stopped. But when the pi is then switched off the fan restarts and stays on! The Cron might fix it.

If the Pi is off, Cron wont do anything.
The fan runs when the Pi is off because the control pin no longer is being driven by the software, it is essentially floating. The way to stop it, is to remove power, I assume when you say the Pi is off, the OS is no longer running but power is still applied.

I gave up using this device when I realised it uses one of the I2C pins, SCL. I could not get I2C to work with the shim installed. Poor design in my opinion. Suggest you use something else to cool the Pi, the Argon Fan works good and is cheaper. I have this working in a Open Media Vault Pi 4.

Regards
Jim

Could you add a very weak pull up/down such that when not driven its in the needed state.

Yep. As long as it did not affect the operation when it was being driven.

Brief look at the software, the GPIO pin is set TRUE for fan ON which would be VCC.
So to turn the fan OFF it would need to be driven LOW (GND).
When the Pi is no longer driving the pin there would be no LOW and the fan would turn on.

I cannot find a circuit diagram (typical of Pimoroni) to confirm how best to attach an external component so the fan does not turn on.

Regards
Jim

Unless I am missing something, I would just run a 20K or higher resister between the Fan IO pin (the one going to the controller to turn it on/off) to ground.
When the controller pin drives it high, the high resistance will mean it will stay high with very little loss via the resistor.

When the controller drivers the pin low then it will be same as if it was physically disconnected as the resister to ground will drain any power and hold at ground level.
If the controller IO pin is in a float state/disconnected then the resistor to ground will hold it at ground.

e.g.

1 Like

Thanks James for the suggestion. I take your point. A direct solution is probably the best.

1 Like

Thanks for your response Michael. One alternative seems to be put up with it (irritating). The other is to get a different fan. Thanks to all for advice.

1 Like

Hi @Michael99645,

20k is too high.
On a bench test, the highest was 6K8 and the fan would turn off. 10k was too high.
I didn’t have any other values closer to 10k.

It seemed the voltage needed to fall to about 1.5V or lower for the fan to turn off.
I didn’t test with the Fanshim software running.

The Pi should be ok, as the pins are usually high impedance when not programmed.

Checking the board.
It has a 3 terminal device switching GND to the Fan (probably a Mosfet). This device is triggered by 3V3, pullup resistor (8K2). When GPIO 18 is taken low enough the device turns off, turning the fan off.

So when there is no program running but power still applied, there is a voltage divider between the 8k2 pullup and the external resistor. It needs to be low enough to drag the voltage down enough to turn the 3 terminal device off.
A 6k8 on the pin should not interfere with normal operation as the GPIO pin is only dragging it to GND.

@Dallas115355, connect a pulldown as Michael has shown, and the fan should turn off. 4k7 is probably what I would choose.

Regards
Jim

2 Likes

Fair enough. I was just going very weak as to not get in the way of live running. but as you have tested, sounds good.

1 Like

This the schematic of the fan control from buzzing out the board.

1 Like

That explains the stronger pull down needed, but I feel by design its meant to be on with a physical switch to ground to turn off. I suspect that without the internal pull up it would work better to be off when the controller is off and let the GPIO pull it high when its high.

Hi James
Just butting in a bit here.That seems to be a very strange circuit (but maybe stranger things happen with this sort of stuff). I would have thought that a thing like a fan would have an input to turn it on. This looks like it will be on while ever power is on and you have to supply an input (logic LOW) to switch it off. It would have to be Chinese with thinking like that.

I would remove the existing pull up resistor and use the original thinking 10kΩ for a pull down. That way there might be a chance of “normal” operation.
Cheers Bob

1 Like

Hi James
Add on:
Actually if that point you have marked as “3.3V” should actually be meant to go to “GND” the whole thing would make more sense. Would this thing be plugged into the wrong pins perchance. Or this device is not meant for that board.

What you have buzzed out is pretty much a stupid thing to do and I can’t see it happening by design. Maybe the pins on that RPi board have a slightly different layout from the RPi the fan controller was designed for.

I knew there was a reason not to migrate to RPi. A bit short on backward compatibility besides the problems with 3.3V.
Cheers Bob

1 Like

The board is definitely wired up the way I have shown. Checked it quite a few times to be sure.
The Mosfet is a guess, it is a 3 terminal surface mount device, cannot see any markings on it.

The idea of the board being so thin it can fit under a ‘hat’ board, in my opinion is dumb. The board I have has been used many times on different RPi’s and the friction fit does work properly anymore. I have given it up as joke, especially when the I2C does not work, and when the Argon board is much better and more robust.

It is a Pimoroni design, not a great fan of their products. And is in no way related to the Raspberry Pi Corporation. My guess is their thinking was to have the fan running whenever there is power applied and the software can switch it off. If the software fails for any reason the fan will keep running keeping the Pi cool (relatively).

The processor on the RPi gets too hot without cooling, something the Corporation has only considered in its recent version RPi 5. Hence a number of manufacturers of RPi add on products have produced ways of keeping the thing cool. The RPi 3 I have runs at 50 degrees celsius even with a fan, and about 10% processor usage. The RPi 5 with official fan runs at about 44%.

The RPi is an amazing microprocessor for its cost and what it can do. I have a RPi 3 and RPi 5 running software for months now with no problems. A PC would need updates and would eventually need a reboot. The Raspberry Pi Pico is now my microcontroller of choice it is so reliable and easy to use.

Highly recommend any of the RPi’s.

Regards
Jim

Hi James
I just had another thought about this method of switching a cooling fan.

many years ago I was doing some part time work automating some processes in a factory producing lighting components like ballasts, transformers etc mainly for stadium and high bay lighting.
One task was the heater control in some fairly large ovens. A phenomenon I saw was termed “temperature overshoot” by the principal engineer and it is when the heated air temperature continues to rise for a time after the heating elements are turned off. The same situation occurs at the bottom of the cycle.

Now is it possible this shim designer had this in mind and devised this system to ensure the RPi did not get hotter when power removed by arranging the fan to stay on after RPi power is removed.

If this is so it still does not excuse the manufacturer from not noting this in the descriptive text or somewhere it would be read.

Methinks it would save a lot of frustration and hair pulling by the poor old end user. He (or she) could then make other arrangements to stop the fan. Removal of the gate voltage (3.3V) will not stop it as you have found out as the gate capacitor charge will keep a Mosfet ON for a long time (weeks??) even after completely removing ALL power. It is still on when re powered.
Cheers Bob

Hi James
Just had another look at the pics.
What are the holes make “Button” Could this be a button to ground the gate thus discharging the gate cap?

There is mention of an no/off button in the corner. This is visible in the pics. If this is a push on/push off type is it possible it is in the ON position and the RPi over rides this when switching the fan OFF with a logic signal.

Still the availability (in this case non availability) of an official schematic would be an enormous help here. As I have said previously this omission would prevent me personally purchasing this thing in the first place.
Cheers Bob
Cheers Bob
On second thoughts if that button was stuck in the ON position it promamly would not make a difference as the RPi is actually turning it OFF (default seems to be ON) and in the OFF position there might be a permanent short Gate to Gnd and it would not come on. Too confusing.