If there's one feature we wished the wonderful Raspberry Pi had built in, it wouldn't be for a faster processor or more memory. While those features would be nice, just a simple power button is all we ask for. Pulling the plug on a Raspberry Pi — particularly one that's running without a screen and keyboard — can be a risk to your programs and data.
Pimoroni's OnOff SHIM is all we could have asked for in a power button. Install it on your GPIO headers, run Pimoroni's easy setup code, and you're done! The SHIM (the name's a slightly silly acronym, but Pimoroni have never been too sensible) re-routes the Raspberry Pi power supply through the GPIO pins and adds some electronics to disconnect power once your Pi is shut down.
Using it is very simple:
No messing about with keyboards or remote logins required!
While the OnOff SHIM comes with a header connector that most users will want to use, what if you wanted to use it along with most existing Raspberry Pi HATs and accessories? The adventurous user can solder the OnOff SHIM directly to the GPIO pins to save all of the space:
This makes your OnOff SHIM much more shim-like when you see it with a HAT attached:
Depending on your application, you may not need to cut away the GPIO pin supports as I did. Either way, you might wish to put some isolating tape on the base of the OnOff SHIM to prevent the possibility of an electrical short.
Before permanently soldering an OnOff SHIM to your Raspberry Pi, you might want to check the GPIO pins you need to use on pinout.xyz. The OnOff SHIM needs exclusive access to physical pins 7 & 11, and any other board you put on top can't use those.