markkulix
Posts: 8
Joined: Mon Jul 06, 2015 6:01 pm

Reset switch

Thu Jul 09, 2015 7:38 pm

Ok, I have a RPI2B an I have attached a Reset Switch to the RUN (P6) pins (next to the right of the LEDs).

Documents say, that this is the way to do soft reset. But it just cuts the power off immediately.

To my understanding 'soft reset' means that the computer shuts down nicely, like 'reboot -hi'.

What am I missing? :-o

Cheers,

Markku

User avatar
rpdom
Posts: 16746
Joined: Sun May 06, 2012 5:17 am
Location: Chelmsford, Essex, UK

Re: Reset switch

Thu Jul 09, 2015 7:41 pm

It is not a soft reset as in "reboot", it halts the CPU when pressed and restarts it when released. The only way is can be considered "soft" is that it doesn't cut the power to the board.

If you want a true soft reset switch or shutdown button you can find lots of examples of how to connect a button to some GPIO pins and write some software to initiate a shutdown or reboot.

Kevin2341
Posts: 22
Joined: Tue Feb 24, 2015 5:39 pm

Re: Reset switch

Thu Jul 09, 2015 10:09 pm

If you want to get a nice soft reboot from a GPIO pin, you'd probably have to wire a GPIO port to accept input and feed it with a 3.3\5V signal (add some resistance to be safe). Then write a simple program to detect the input and execute a reboot command. At least that's how I'd handle it, but the other poster was correct, you're doing a hard reset by cutting off power to the CPU and as a result that kills and reboots the system.

User avatar
mahjongg
Forum Moderator
Forum Moderator
Posts: 12841
Joined: Sun Mar 11, 2012 12:19 am
Location: South Holland, The Netherlands

Re: Reset switch

Fri Jul 10, 2015 12:29 am

and feed it with a 3.3\5V signal
NOOOO! :o :o :o BAD ADVICE!

Feeding 5V to a GPIO will mean instant destruction of the PI!
Lesson 1 class 101, PI GPIO's do NOT tolerate 5V on them, the control transistors will blow up causing a short in the PI between 3.3V power and ground.

feeding 5V though a resistor doesn't solve it, the transistor will still blow up!
Only dividing the 5V signal with TWO resistors to a level between 2.0V and 3.3V will work and be safe!

User avatar
Holmes
Posts: 5
Joined: Thu Jul 09, 2015 1:20 pm
Location: Frederick, MD

Re: Reset switch

Fri Jul 10, 2015 3:05 pm

I followed these instructions:

http://www.instructables.com/id/Simple- ... wn-Button/

I rigged up a pushbutton and soldered it to a 2-position female header to slip onto the GPIO pins, and I can conveniently transport this to whichever Pi I'm using.

This script and method works great for me. Seems to be pretty efficient, but I'll leave that to the experts here.

As an aside, if you set the GPIO pin up as the end one (next to a GND), you can also use a paperclip to short the GPIO pin and shutdown, in the even you don't have your pushbutton with you. I've done this many times now.

Return to “Beginners”