Raspberry Pi: Power SWITCH possible?

Every product I see out there is a momentary button, being called a switch. Correct me if I’m wrong, but isn’t a switch a physical toggle between on and off states, and not a button that only momentarily completes the circuit? I can’t find a switch product that works with the raspberry pi like this…everything I find is a momentary button (Pimoroni OnOff SHIM for Raspberry Pi, for example) that can only be pressed to toggle on or off states. But that’s not really what I’m going for.

What I am hoping for is a breakout switch (not button!) that can be used to switch on or off a raspberry pi. I’m hoping there is an off-the-shelf product that connects straight to the GPIO pins just like the OnOff SHIM does…the closest thing I found is this very clunky solution: Shutdown / power switch for Raspberry Pi – Mausberry Circuits

Does anyone have some advice, or know of a product that has this function and is compatible with the Pi?


A switch can be latching or non latching.
A switch that latches / toggles, retains the last state it was left in. On or off, left or right, up or down, etc.
A non latching switch, which can be a button, Only changes state when pressed, and returns to a default state when released. It’s a momentary switch.

With a device that runs an OS, like a Raspberry Pi, you don’t want to remove the power without shutting down the OS first. A momentary switch is used for simplicity.
The button tells the ON Off shim to tell the OS to shut down. After that’s done the power is removed. Press the button again and it restores power and the Pi boots up.

Clearly it is possible to make a latching switch work with the pi, as long as it is more sophisticated than merely a latching switch. I am asking whether there is a product that uses a latching switch but also has intelligent circuitry to safely power off the pi.

Other than the link you posted, I haven’t seen such an item.

I’ve done it with two switches. A button that signals the OS to shut down. And a switch to kill the power after it shuts down. No fancy circuitry in between.

1 Like