MuntyScruntfundle
Posts: 221
Joined: Fri Oct 27, 2017 11:14 pm

Reset switch.

Sat Dec 08, 2018 9:14 pm

Hi there.

I'm looking to put a reset switch on a bunch of pis. Model 3B+.

Looking at the header location there are two contacts, RUN and PEN.

My questions are:
1. I'm guessing RUN is the reset pin?
2. Does opening or closing the loop to ground set the reset state?
3. What does the PEN pin do?

Many thanks.

MuntyScruntfundle
Posts: 221
Joined: Fri Oct 27, 2017 11:14 pm

Re: Reset switch.

Sat Dec 08, 2018 9:18 pm

And I meant to add, of those that have tried this, what switch have you used?

I'm left in the situation where the switch will have to hang from the back of the board, less than ideal, but it's all I can do. I will need a small switch. I've ordered a few mini micro switches to test with but they're in-feasibly small, I don't think the soldering will be strong enough to last.

Any ideas for a source of small (ish) push switches?

Thanks.

klricks
Posts: 6307
Joined: Sat Jan 12, 2013 3:01 am
Location: Grants Pass, OR, USA
Contact: Website

Re: Reset switch.

Sat Dec 08, 2018 9:23 pm

MuntyScruntfundle wrote:
Sat Dec 08, 2018 9:14 pm
Hi there.

I'm looking to put a reset switch on a bunch of pis. Model 3B+.

Looking at the header location there are two contacts, RUN and PEN.

My questions are:
1. I'm guessing RUN is the reset pin?
2. Does opening or closing the loop to ground set the reset state?
3. What does the PEN pin do?

Many thanks.
The PEN is power enable used with HATs and such.

In order to add a reset you will need to connect a momentary type switch to RUN and to a ground from somewhere else on the board such as GPIO pin 6 or other ground pin.
Connecting RUN to ground will immediately halt the system in an unkind way of the RPi is running. When released then the RPi will reboot.
Unless specified otherwise my response is based on the latest and fully updated Raspbian Stretch w/ Desktop OS.

Cornz
Posts: 7
Joined: Mon Feb 18, 2019 3:11 pm

Re: Reset switch.

Mon Feb 18, 2019 3:37 pm

Hi all.
UTTER pi beginner here.
I too am asking the question about the reset switch. My question is this.
Is there a way of resetting the pi, via a simple push switch but requiring no software if using the run pin to 0v is "unkind".
In what way is it "unkind" other than being crude. The only downside i can see is that if your pi is writing data then that data may be lost.
is there an alternative location for a "reset kludge", somewhere on the PSU section of the PCB. Or cutting a track then soldering the switch between the two points (obvs a push to break switch) which seems how the wall-warts do it with a switch in the usb cable. How is that less unkind than grounding the cpu reset pin?

User avatar
davidcoton
Posts: 3656
Joined: Mon Sep 01, 2014 2:37 pm
Location: Cambridge, UK

Re: Reset switch.

Mon Feb 18, 2019 4:26 pm

Reset is only "unkind" if the Pi is running. It will immediately stop the Pi, including any writes in progress to the SDCard or other mass storage. This can lead to corruption of the OS files, and failure to reboot or other strange problems.

Reset is fine as a way to restart a system that has been properly shut down (halted) but left with power on. There are also ways to use a GPIO input to shut down and restart the Pi. See the links in this post and the following one.
Signature retired

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

Re: Reset switch.

Mon Feb 18, 2019 4:30 pm

Cornz wrote:
Mon Feb 18, 2019 3:37 pm
Hi all.
UTTER pi beginner here.
I too am asking the question about the reset switch. My question is this.
Is there a way of resetting the pi, via a simple push switch but requiring no software if using the run pin to 0v is "unkind".
In what way is it "unkind" other than being crude. The only downside i can see is that if your pi is writing data then that data may be lost.
is there an alternative location for a "reset kludge", somewhere on the PSU section of the PCB. Or cutting a track then soldering the switch between the two points (obvs a push to break switch) which seems how the wall-warts do it with a switch in the usb cable. How is that less unkind than grounding the cpu reset pin?

http://www.uugear.com/witty-pi-realtime ... pberry-pi/
adieu

My other Computer is an Asus CS10 ChromeBit running Chrome Operating System.
HP Envy 4500 Wireless Printer supported by HPLIP software in Raspbian Stretch.

PhatFil
Posts: 1099
Joined: Thu Apr 13, 2017 3:55 pm
Location: Oxford UK

Re: Reset switch.

Mon Feb 18, 2019 4:53 pm

One unsafe method of shutting down is pretty much as bad as another, and your always best served checking the activity led has stopped flashing for a good few seconds before committing to any unsafe shutdown method.


Less dependable than hard wired options you can use remote network connections or other wireless protocols.
a ssh session from your phone or pc can be used to log in and execute a shutdown or reboot safely.

or if you prefer a gui for the phone connection? host a mqtt broker on your pi and install a mqtt app on your phone. publish a shutdown topic/payload message from your phone app and run a script on your pi to sit subscribing to the topic and shutdown safely when received.

check out the variouse ble luggage/key/child finder device hacks for a dedicated wireless trigger. amazon dash buttons while hackable are not very green or cheap being a single use device with a built in battery that requires device destruction to change.

Cornz
Posts: 7
Joined: Mon Feb 18, 2019 3:11 pm

Re: Reset switch.

Tue Feb 19, 2019 8:14 pm

Ok, after some reading i have decided that for my needs, this is the ideal solution:
https://shop.pimoroni.com/collections/e ... escription

But then i see the dreaded line:
"To install the software, open a terminal and type curl https://get.pimoroni.com/onoffshim | bash to run the one-line-installer."

AAAAAnd my ideas hit a hurdle. As i said, i am a COMPLETE beginner with the pi.
My pi is configured purely as a retro-pi unit and all I've done is downloaded an image which i have transferred onto a card and my pi boots up with a pre-configured set up.
Yayy, access to my old fave games.
Boo, cant shut it down "safely".
So i assume by quitting out of "emulation station" to what i would refer to as a DOS prompt, is this a "terminal" where i would type the above command which then modifies the pi to accept that on-off shim?
Or am i talking nonsense?

LTolledo
Posts: 1246
Joined: Sat Mar 17, 2018 7:29 am

Re: Reset switch.

Tue Feb 19, 2019 9:35 pm

Your retropi installation have no shutdown feature?

... or ability to force quit a game and go to home menu to shutdown?
"Don't come to me with 'issues' for I don't know how to deal with those
Come to me with 'problems' and I'll help you find solutions"

Some people be like:
"Help me! Am drowning! But dont you dare touch me nor come near me!"

Cornz
Posts: 7
Joined: Mon Feb 18, 2019 3:11 pm

Re: Reset switch.

Wed Feb 20, 2019 3:04 pm

LTolledo wrote:
Tue Feb 19, 2019 9:35 pm
Your retropi installation have no shutdown feature?

... or ability to force quit a game and go to home menu to shutdown?
Truthfully, i dont know atm, i only set it up 2 days ago but it became apparent there was no "simple" way to reset/power down hence i am where i am.
I can quite out of Emu-Station to a command prompt and can then ( i imagine) shut down using a command but what a faff, i just want to be able to push a button and the Pi neatly shut itself down.

PhatFil
Posts: 1099
Joined: Thu Apr 13, 2017 3:55 pm
Location: Oxford UK

Re: Reset switch.

Wed Feb 20, 2019 9:22 pm

Cornz wrote:
Wed Feb 20, 2019 3:04 pm
LTolledo wrote:
Tue Feb 19, 2019 9:35 pm
Your retropi installation have no shutdown feature?

... or ability to force quit a game and go to home menu to shutdown?
Truthfully, i dont know atm, i only set it up 2 days ago but it became apparent there was no "simple" way to reset/power down hence i am where i am.
I can quite out of Emu-Station to a command prompt and can then ( i imagine) shut down using a command but what a faff, i just want to be able to push a button and the Pi neatly shut itself down.
thats how we get ya.. you soon get tiered of typing in sudo shutdown now so you probably start with writing a single key/char named script file to contain the command and making it executable, then realise how simple that was.. and then fitting a button and perhaps a resistor to a gpio and either +3.3v or gnd may not appear that big a deal.. next thing your knee deep in developing the next big thing ;)

But seriously thats what you get with a pi the basic board, any i/o your needs require are down to you to fit.
not every pi project requires an on off or reset button, and adding 'optional extras' to the package would increase the cost.. some sbc solutions do have on/off buttons, but not afaik at the same price level as the Pi.

Cornz
Posts: 7
Joined: Mon Feb 18, 2019 3:11 pm

Re: Reset switch.

Fri Feb 22, 2019 3:31 pm

PhatFil wrote:
Wed Feb 20, 2019 9:22 pm
Cornz wrote:
Wed Feb 20, 2019 3:04 pm
LTolledo wrote:
Tue Feb 19, 2019 9:35 pm
Your retropi installation have no shutdown feature?

... or ability to force quit a game and go to home menu to shutdown?
Truthfully, i dont know atm, i only set it up 2 days ago but it became apparent there was no "simple" way to reset/power down hence i am where i am.
I can quite out of Emu-Station to a command prompt and can then ( i imagine) shut down using a command but what a faff, i just want to be able to push a button and the Pi neatly shut itself down.
thats how we get ya.. you soon get tiered of typing in sudo shutdown now so you probably start with writing a single key/char named script file to contain the command and making it executable, then realise how simple that was.. and then fitting a button and perhaps a resistor to a gpio and either +3.3v or gnd may not appear that big a deal.. next thing your knee deep in developing the next big thing ;)

But seriously thats what you get with a pi the basic board, any i/o your needs require are down to you to fit.
not every pi project requires an on off or reset button, and adding 'optional extras' to the package would increase the cost.. some sbc solutions do have on/off buttons, but not afaik at the same price level as the Pi.
No, sorry. I wont be "got". I cant program computers, since my days of the ZX80, i learnt that my head doesn't work in that way. Now, bring me a ZX80 that wont turn on and a soldering iron and i'm a happy man. Give me a Windows PC that bluescreens for no reason, and i'll fix it. Give me an image to burn and i can burn it. Give me source code and i'll use it to start a bbq. I know my limits, i cant program a Pi. Hence either the shim or just ground the reset pin.

User avatar
Imperf3kt
Posts: 2121
Joined: Tue Jun 20, 2017 12:16 am
Location: Australia

Re: Reset switch.

Sat Feb 23, 2019 12:00 pm

If you can fix a bluescreening Windows PC, you're already skilled enough.
Bluescreens are most commonly caused by driver errors, which are not usually fixable by beginners.
Don't belittle yourself, you probably can do more than you think you can, you just need to try.
Google is ubiquitous - Try it today, it's free!
https://opensource.com/life/16/10/how-ask-technical-questions

Cornz
Posts: 7
Joined: Mon Feb 18, 2019 3:11 pm

Re: Reset switch.

Sat Feb 23, 2019 9:05 pm

Imperf3kt wrote:
Sat Feb 23, 2019 12:00 pm
If you can fix a bluescreening Windows PC, you're already skilled enough.
Bluescreens are most commonly caused by driver errors, which are not usually fixable by beginners.
Don't belittle yourself, you probably can do more than you think you can, you just need to try.
Thanks, but after half a century, i know my limits. I couldn't program my scientific calculator with a basic ohms law formula 30 years ago so i know i cant program a pi.
So, today i rigged up the CPU reset pin to ground via a miniature micro switch.
It works a peach.
I somehow launched something in retro pi and no amount of button stabbing on the joypad would make it stop, the reset switch sorted it though.
;-)

Return to “General discussion”