-1

I'm developing a reset switch for the Raspberry Pi, but I want to prevent that holding the button keeps on resetting the device. To solve this I had the following idea:

Wire a push button from the Raspberry Pi power to a GPIO pin. Whenever the button is pushed, that pin becomes high. Then, with Python, this is detected and another GPIO pin is pushed high. This pin is connected to the reset, ergo the device resets.

But because the device resets itself after an input, it automatically unresets, because of the fact the device resets. When it resets, it cannot put the pin to high and thus cannot reset itself.

So, a single press reset button for the Raspi in which it isn't a problem if you hold it a little longer.

Is my logic on how this works correct?

Len
  • 107
  • 1
  • 2
  • Your description is vague, but so is your aim. The Pi already has a reset input, but I assume you mean something like reboot. Maybe you mean a poweroff? In any event I see no need for any complex circuitry. Your first job is to describe exactly what you are trying to achieve, before jumping into solution mode. Just to be clear when the RUN is LOW the Pi will be reset. It will restart when the RUN goes HIGH. – Milliways Aug 31 '16 at 08:20
  • Apologies for the vagueness.

    With a push button, I'm constantly putting a high input on the reset pin. As such, the device will stay in reset mode. By adding this circuitry of detecting if the button is pushed with a GPIO, then outputting HIGH to the reset with another GPIO, I want to reset the device because as soon as it resets, the GPIO outputting HIGH will not be high anymore and the reboot (or boot) already begins. It's more that I don't want to put high on the reset pin for a longer period of time.

    – Len Aug 31 '16 at 08:23
  • I am not aware that the Pi will be damaged by holding it in reset for longer periods of time (and neither could I think of any good reasons). If wired correctly (pull low to reset) it will just start to run once the button is released. If you're worried about "strange" user behaviour, consider this. Using your scheme and a user keeps pressing the button while the Pi reboots and starts your python script again - it will reboot again, so nothing is helped. – Ghanima Aug 31 '16 at 08:30
  • Still doesn't make any sense. Assuming you are referring to the RUN header, it is high. You pull it LOW to reset. Resetting this way is a really bad idea. I have a pushbutton wired to the RUN header on my Pi to RESTART it - after I have powered down properly (or in the rare event of a lockup). – Milliways Aug 31 '16 at 08:34
  • Alright, then I'll just do that. Thanks for the insights, I'm kinda just starting with Raspi so just wanted to make sure. – Len Aug 31 '16 at 08:36
  • 2
    I’m voting to close this question because it is poorly constructed, vague and of no benefit to anyone. In addition, the OP has abandoned SE, and therefore no answer will ever be accepted. – Seamus Aug 20 '21 at 19:59

1 Answers1

0

This may still not be exactly what you want, but the following script is what I use to Power my Pi off (not my own code, although I adapted it so you need to hold the button for 1 sec to poweroff), but you could adapt the script too reboot if this is what you want.

I use the RUN pin to reboot (all my Pi have a button soldered to the RUN pads).

Milliways
  • 59,890
  • 31
  • 101
  • 209