0

I have been reading the following instructable: http://www.instructables.com/id/Simple-Raspberry-Pi-Shutdown-Button/

It says that when connecting a switch to the GPIO input be careful not to do it when the code is not running because doing so will blow up my Raspberry Pi Zero W.

I can see this happening easily:

  1. My pi is booting and someone presses the button
  2. There is a bug in the code causing it not to run
  3. I get the wrong GPIO during development

I would rather not hook up a 'blow up' button to my raspberry pi - doesn't seem like a clever idea.

If the Pi only detects voltage on the pin then rather than just short it to ground could I connect a resistor to the pin in series with the switch? Then it would be safe even if my code is running.

This solution must be wrong since it's very simple and if it did solve the problem it would be in the article.

Does anyone know why this is wrong?

  • There are certain pins on the pi that could short the chip if you were to apply voltage to them. I think that it is those specific pins that the tutorial is referring to. If you use the standard digital gpio pins, you should have no problems. – Camp bell Nov 3 '17 at 12:00
  • The tutorial mentions connecting the pin to ground. I don't know electronics terminology but I would have thought apply voltage would mean connecting it to either +3v or +5v. (Probably 3) - I guess this is what pull up vs pull down is. If all the standard GPIO pins are safe to short to each other or ground or positive there is less to worry about. (I note they are called BCM pins on pinout.xyz) – Robert3452 Nov 3 '17 at 13:19
  • I recommend finding another tutorial for this. There are several if you look. This one has too many hacks in it. This can be done better and in ways that mitigate your concerns. – Brick Nov 3 '17 at 20:29

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.