I have a lovely 64x32 RGB matrix from Adafruit (2mm dot pitch) which I want to run off my Raspberry Pi 4. So I’m looking to buy this Hub75 bonnet:
However I have a fan shim on my RPI4 for obvious reasons, and I believe this uses up a few pins? Does anyone know if I can use this Hub75 bonnet at the same time as the fan shim?
Here’s the chart for the Fan Shim.
The bonnet pinout is here
The only conflict I see is GPIO 17. It’s used by the button on the Fan Shim and as a CLK on the bonnet. There is a way to install the service with the button disabled / not used. I think I have it written down someplace, will have a look for it.
The other way to do it is to not use the Pimoroni service to control the fan, do it via a dtoverly.
dtoverlay=gpio-fan,gpiopin=18,temp=55000 will turn the fan on at 55c and off at 45c. Just change the 55000 to what ever on temp you want and the off will be 10c lower than that.
The button is not used and the LED won’t light up.
EDIT: to disable the button you add --nobutton to the end.
sudo ./install-service.sh --on-threshold 55 --off-threshold 40 --delay 2 --nobutton.
and --noled turns the LED off. If you wanted to do that.
I would but the bonnet on a booster header so air can get at the fan.
1 Like
Thanks @alphanumeric alphanumeric. So when you refer to the sentence:
sudo ./install-service.sh --on-threshold 55 --off-threshold 40 --delay 2 --nobutton --noled
are you referring to the Pimoroni fanshim python service service, or to “dtoverlay”. If the former, then it doesn’t seem to work because the LED is still on and anyway I had to change it to:
sudo ./install.sh --on-threshold 55 --off-threshold 40 --delay 2 --nobutton --noled
Because the script was install.sh
, not install-service.sh
.
If the latter, namely dtoverlay, do I need to do anything else first? I assume I should erase any trace of the Pimoroni fanshim service first. Then what?
I was referring to the service, the daemon that runs on startup once to set it all up.
The way it normally goes is you do the clone and initial install as folows.
git clone https://github.com/pimoroni/fanshim-python
cd fanshim-python
sudo ./install.sh
Then you change directories again to install the service
cd examples
sudo ./install-service.sh --on-threshold 55 --off-threshold 40 --delay 2
If you don’t want the led etc its
sudo ./install-service.sh --on-threshold 55 --off-threshold 40 --delay 2 --nobutton --noled
Any time I want to change it after the fact I do the following before running install service again
cd fanshim-python
cd examples
sudo systemctl stop pimoroni-fanshim.service
Then run the sudo install service with my new values. I don’t think you have to stop it first but I do it anyway.
If you are going to use the service you don’t need to mess with any dtoverlays.
The ones I use in place of using the Pimoroni software / service are
dtoverlay=gpio-fan,gpiopin=18,temp=55000
Which turns the fan on at 55c and off at 45c.
Just change the 55000 to what ever temp you want 45000 for 45c etc.
I also use the following to do a shut down with the fan shim button.
dtoverlay=gpio-shutdown,gpio_pin=17,active_low=1,gpio_pull=up
The stock version that uses GPIO 3 is as follows
dtoverlay=gpio-shutdown
That will work until you enable i2c, after which it has to be set to an alternate pin.
The Fan Shim button as luck would have it grounds GPIO 3 and GPIO 17.
Your bonnet also uses GPIO 17 so I wouldn’t use the shutdown dtoverlay.
Not the modified one anyway. And as I mentioned, if you go with the Pimoroni software you don’t need these anyway. They will just conflict with each other.
Forgot to mention, if you have the service installed and running, but want to disable it completely, do the following
cd fanshim-python
cd examples
sudo systemctl stop pimoroni-fanshim.service
sudo systemctl disable pimoroni-fanshim.service
If you only do the stop, it will run again on your next boot up. ;)
Okay so I’ve tried it, just as above, and sadly there seems to be incompatibility. If I stop the fanshim service it interferes with the LED matrix, putting a weird pattern on the LED (see below), and if I start it again Fan shim works fine (same weird LED pattern), but as soon as I run the LED matrix demo, fanshim seems to stop working because the fan immediately starts spinning and never stops. I know the install worked because the LED didn’t come on ("–noled") but it seems that the LED matrix pins are telling fanshim to switch on somehow. Oh well, not so bad. I can still use it like this it’s just that the fan will work continuously.
If you install the Fan Shim (physically) and don’t install any software, by default the fan just runs continuously. The fan control pin has to be pulled low to stop the fan. That’s what the service does. And what the dtoverlay does.
GPIO 18 high, fan on. GPIO 18 low, fan off. It’s a fail safe if you will so you get cooling with no software.
GPIO 14 RGB LED clock, and GPIO 15 RGB Led data control the Fan Shim LED.
yeah in this case I think that’s the solution, and that’s actually fine. I just hope the fanshim is rated for a long life!
You’ll just have to watch for any weirdness. The Fan Shim pins are still there watching for input etc. I had the LED on mine light up after installing Plasma for example. After editing a file changing what GPIO Plasma uses, it lit up my Blinkt and left the Fan Shim LED alone.
EDIT: And don’t forget to “disable” the Fan Shim Service. ;)