Stupid OnOff SHIM question - using it with an illuminated LED button


Hi Pimornoni peeps and fellow tinkerers.

This is probably a very stupid question, but I’m only just starting out with Raspberry Pi as an OctoPrint box for my 3D printer, and I’m building an enclosure for the Pi to live in…

If I can find the damn thing, I’ve got a momentary push button switch and I’m aware that I can wire that to the two “BUTTON” locations on the SHIM to have it take over from the built in mini button.

Here’s where the daft question comes in - Said momentary button has an LED (with resistor in place already, nice!) that will work with 3-6 V to illuminate the button, and as such has seperate legs on the bottom of the switch for the LED.

If I was to run a 5V connection from pin 4 on the Pi (occuplied by the SHIM) to the +VE leg for the LED in the button and the negative from the button to a GND pin on the PI, would the LED light when the SHIM is “on” and the Pi is up and running, then and go off when the SHIM pulls the pin 4 to low once shutdown is completed? (I.e. Pi is on, button LED is lit, Pi is off, button LED is off)

In theory, I’m guessing that this would work, but I don’t want to just wire it up to the SHIM in case I let the magic smoke out somewhere as a result! (I was a nervous wreck after soldering the headers onto the SHIM LOL)

Would this work? If I can find the button, shall I just wire it up and try it?


(PS I can’t use the spare 3,3V pin on the PI that the SHIM isn’t using as I’ll be using that to trigger a relay)


Pin 2 or 4 will work, they are as far as I know electrically connected together. If the LED has the resistor it should be fine. Even if you got it wired backwards nothing bad will happen, being a DIOD it will be reverse biased and won’t conduct. It will be an open circuit.
This is assuming Pin 2 and 4 will only have 5V when powered by the on off shim, which sounds like how it works from the description on the product page. So you reasoning and plan sounds good to me.


Wonderful, thanks! I was concerned about turning the LED in the switch into a fry-ode somehow. LOL

If I can find where I put the switch, I will give it a try and report back :)