joeydream
Posts: 4
Joined: Thu Dec 05, 2019 1:13 pm

add a switch for turn on the pi

Thu Dec 05, 2019 1:24 pm

Hi everybody, the newcomer is called Joeydream, nice to meet you all here.

As title, i wish to add a switch for my pi instead for "unplug and plug" the usb cable. I read some discussion on web, and they said that i can add a "press button" for the "RUN pin" onboard. Is it a good idea ? Or the pin is designed for another purpose ?

Thanks for your help.
Last edited by joeydream on Thu Dec 05, 2019 9:54 pm, edited 1 time in total.

fruitoftheloom
Posts: 23337
Joined: Tue Mar 25, 2014 12:40 pm
Location: Delightful Dorset

Re: add a switch for turn on the pi

Thu Dec 05, 2019 1:39 pm

joeydream wrote:
Thu Dec 05, 2019 1:24 pm
Hi everybody, the newcomer is called Joeydream, nice to meet you all here.

As title, i wish to add a switch for my pi instead for "unplug and plug" the usb cable. I read some discussion on web, and they said that i can add a "press button" for the "RUN pin" onboard. Is it a good idea ? Or the pin is designed for another purpose ?

Thanks for your help.

https://howchoo.com/g/mwnlytk3zmm/how-t ... spberry-pi
Rather than negativity think outside the box !
RPi 4B 4GB (SSD Boot)..
Asus ChromeBox 3 Celeron is my other computer...

joeydream
Posts: 4
Joined: Thu Dec 05, 2019 1:13 pm

Re: add a switch for turn on the pi

Thu Dec 05, 2019 9:57 pm

Thanks, i follow your suggested webpage and it's work now. i think it's a proper way as it can shutdown the pi properly by an external physical button. Bravo.

anyway,

I still want to know more about what is the use of the pin "run", thx

deepo
Posts: 579
Joined: Sun Dec 30, 2018 8:36 pm
Location: Denmark

Re: add a switch for turn on the pi

Fri Dec 06, 2019 12:55 pm

The Run pin needs to be shorted to ground with a push button to wake the processor from halt state.
You use e.g. sudo shutdown -h now to enter the halt state.

/Mogens

emma1997
Posts: 820
Joined: Sun Nov 08, 2015 7:00 pm
Location: New England (not that old one)

Re: add a switch for turn on the pi

Fri Dec 06, 2019 1:10 pm

It's unfortunate "unplug and plug" and "press button" are confused because they are not at all the same. First one removes power completely but risks corrupting SD (unlikely but "It could happen!" :) ). Second, often referred to as "safe shutdown", but leave some current drain when off (halt mode).

Many think Pi4 draws more than older models but I found the opposite to be true, specially regarding halt mode. Using 12v DC converter instead of 5v wall wart to power the PI solved not only dreaded lightning bolt of death, but allows me to safely shut down with virtually no current drain. Like this:

https://www.raspberrypi.org/forums/view ... 8#p1550408

Image

You can see the actual power cut slide switch for emergency use and a tact button for the more common 'safe' on/off. Even safe mode can draw relatively little power depending on eeprom settings.

alphanumeric
Posts: 2547
Joined: Tue Jan 19, 2016 2:17 pm
Location: Sydney, Nova Scotia, Canada

Re: add a switch for turn on the pi

Fri Dec 06, 2019 8:14 pm

If you connect a normally open, momentary contact switch, to GPIO 3 (physical pin 5) and ground pin 6. Your Pi will boot up if it was shut down and left powered. Momentarily grounding GPIO 3 will boot it up. Also, if you add dtoverlay=gpio-shutdown to your config.txt file, it will do a safe shutdown when that same switch is pressed. One button does both. =)

Return to “Beginners”