Onoff shim for pi4?

Any plans to create an onoff shim for the pi4?

@JonF We have something along those lines in the works… It’s called Utility HAT, and it has USB-C power input (that back-powers the Pi 4) and on/off capability, a speed-controllable fan, 240x240 colour LCD, four buttons, and an RGB LED, as well as I2C expansion. Should be out in the next couple months, hopefully.

Thanks, but I was just hoping for the simple on/off functionality. I have clusters of Pis mounted vertically and was looking for a nice way to power on and off via a button press.

It should be entirely possible to use OnOff SHIM as it is currently with a Pi 4 and a 2.5A micro-B power supply, providing you don’t have any power-hungry peripherals attached. I’ll solder one I have here up and confirm that it does indeed work, but I can’t see any reason why it wouldn’t…

There’s a chance that we’ll do an updated version with USB-C too, but in the meantime give the current one a shot.

Yep, confirmed working on my Pi 4 with full power and on/off functionality from an official Raspberry Pi 2.5A micro-B power supply (the black one)…

Nice, I’ll give that a try!

I could confirm, that the OnOff Shim doesn’t support a Raspberry Pi 4B with below listed peripherals:

  •  analog speakers (Trust Compact 2.0, 6 Watts peak). The Power is drained via USB connection from the Pi.
    
  • Neuftech card reader connected via USB)
    
  • 27" Monitor (Dell U2715H) connected via HDMI
    
  • Powerbank (EasyAcc PB26000MS) as power supply
    

However, connecting the power bank directly via USB-C plug works like a charm. See also OnOff Shim @ Pi 4 - Unter-voltage issues?

Shut down can be done via a button press, if that helps. It won’t completely remove power but it will do a proper shutdown. If you add the following to your config.txt, momentarily grounding GPIO 3 (physical pin 5) will have Raspbian do a proper shutdown.
dtoverlay=gpio-shutdown
That same button will also boot it back up if you don’t remove power. A normally open momentary switch wired between GPIO 3 and ground will work.
If you have i2c enabled you need to use a different GPIO pin though. I use the following with my Fan Shim.
dtoverlay=gpio-shutdown,gpio_pin=17,active_low=1,gpio_pull=up
The button on the Fan Shim grounds GPIO 3 and 17 when pressed.

Sandy you can put me down for at least one Utility Hat when released. =)

The setup.sh script provided in this repository can be used to set your preference of GPIO pin to monitor in order to initiate the shutdown. To install support for a specific product however, such as OnOff SHIM or Zero LiPo, we recommend you use the one-line installers listed further down the page.

We highly recommend you use the generic one-line installer rather than run the setup.sh script directly.

If you need to however, for example because the above command states that your operating system is not supported, clone this repository locally and run setup.sh. When prompted, enter the pin you would you like to use as trigger for the shutdown.

Note that the setup script expects an integer value between 4 and 27 (you can use others outside this range by manually editing the config file as explained below, but there are caveats so if it does not quite work, you’re on your own!)