Tanaan
Posts: 6
Joined: Mon Jul 10, 2017 8:45 am

Reset button switch off my Raspberry Pi3

Mon Jul 10, 2017 3:55 pm

Hi all there, I'm a newcomer here and with Raspberry Pi 3. I having troubles when adding a reset button and wanted to post here to see if someone could gimme a hand. I searched for something similar in some other post but cannot find any clue about what it is happening.

I soldered 2 male pin header to the RUN connections (pic1), and then two cables to the momentary push button (pic2). The Raspberry works fine until I connect the two cables to the pins (pic3), then the raspberry switch off. If press and hold the button the raspberry starts again with no issues but if I release the button then the Raspberry switch off again. Am I doing something wrong? This thing shouldn't be difficult, right?

Pic1
pic1.jpg
Pic1
pic1.jpg (59.73 KiB) Viewed 29007 times
Pic2
pic2.jpg
Pic2
pic2.jpg (49.9 KiB) Viewed 29007 times
Pic3
pic3.jpg
Pic3
pic3.jpg (60.12 KiB) Viewed 29007 times
many thanks in advance.

User avatar
Burngate
Posts: 6418
Joined: Thu Sep 29, 2011 4:34 pm
Location: Berkshire UK Tralfamadore
Contact: Website

Re: Reset button switch off my Raspberry Pi3

Mon Jul 10, 2017 4:29 pm

Are you sure the button is a press-to-make switch? It sounds to me like it's press-to-break!
To prove it, disconnect the red wire at the switch end. Putting it back on (without pressing the button) should reset your Pi.

Tanaan
Posts: 6
Joined: Mon Jul 10, 2017 8:45 am

Re: Reset button switch off my Raspberry Pi3

Mon Jul 10, 2017 6:39 pm

Many thanks for answering @Burngate.

Not sure if understood right. I did this tho, I just leave the green cable connected (pic4) and power the Raspberry. It starts properly with no issues, once the Retropie is loaded I connect the red cable to the other pin and the Raspberry switch off again and doesn't start. If I remove any of the cables, red or green, then it starts again.

This is the button i have (pic5), in case it helps.

Pic4
pic4.jpg
Pic4
pic4.jpg (60.24 KiB) Viewed 28980 times
Pic5
pic5.jpg
Pic5
pic5.jpg (53.29 KiB) Viewed 28980 times
many thanks again

drgeoff
Posts: 11428
Joined: Wed Jan 25, 2012 6:39 pm

Re: Reset button switch off my Raspberry Pi3

Mon Jul 10, 2017 7:32 pm

Your switch does not work the way you think it does.

Most push buttons make contact when pushed. Yours seems to make contact when not pushed.
Quis custodiet ipsos custodes?

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

Re: Reset button switch off my Raspberry Pi3

Mon Jul 10, 2017 7:57 pm

Do you have a test meter that can measure resistance (or continuity)?

Connect that to the two terminals on the switch and read the resistance when the switch is not pressed. If it reads 0.00 (or nearly 0) then the switch is "on" when not pressed and "off" when pressed.
(or with continuity test it will beep when not pressed and not beep when it is pressed).

You may need to get a new switch.

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

Re: Reset button switch off my Raspberry Pi3

Mon Jul 10, 2017 11:12 pm

If that switch has 3 contacts, you used the wrong 2. If it only has 2 contacts, its a "normally closed" momentary contact switch. You want a "normally open" momentary contact switch.

User avatar
Burngate
Posts: 6418
Joined: Thu Sep 29, 2011 4:34 pm
Location: Berkshire UK Tralfamadore
Contact: Website

Re: Reset button switch off my Raspberry Pi3

Tue Jul 11, 2017 10:22 am

There are several ways to find out what happens inside one of those switches. Unfortunately (for the switch) I'd choose the Stanley-knife option, and take one apart.

It's got two bits of bent springy metal, held by the plastic case so that they're touching and under slight pressure.
When you press the button, it forces the two bits apart. Let go of the button and the springiness forces the button back out, and allows them to touch again.
Just about the cheapest way to make a switch.

I'd draw a picture, but my daughter's just come down, wanting her breakfast.

Tanaan
Posts: 6
Joined: Mon Jul 10, 2017 8:45 am

Re: Reset button switch off my Raspberry Pi3

Tue Jul 11, 2017 3:04 pm

Thank you all guys, it being really interesting to know all your points of view.

So basically, you all agree the button I have is not the right one to do the job. And after google for some documentation I realised about it...

This is what I have,

https://www.aliexpress.com/item/Push-bu ... 38473.html

And there is a video showing how the buttons works (and not how I expected). Shame no to see this before. I will go to the shop to get one, do they look the same? Any clue in order to avoid any mistake again?

Thanks a lot again to all of you! So helpful!

drgeoff
Posts: 11428
Joined: Wed Jan 25, 2012 6:39 pm

Re: Reset button switch off my Raspberry Pi3

Tue Jul 11, 2017 3:15 pm

NO (Normally Open) is the type you need. NC (Normally closed) is what you appear to have.
Quis custodiet ipsos custodes?

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

Re: Reset button switch off my Raspberry Pi3

Tue Jul 11, 2017 4:23 pm

Physically , the buttons will look identical. Internally, they are different. Normally open is what you want, normally closed is what you have now.

Tanaan
Posts: 6
Joined: Mon Jul 10, 2017 8:45 am

Re: Reset button switch off my Raspberry Pi3

Tue Jul 11, 2017 4:28 pm

Now, I'm bit confused here. According your comments NC is what I have and NO is what I need, however on this link [1] the buttons supposed to be NO (what I need), but if you check the video in the "product details" box the button behaves as a NC (what I have).

Is that video wrong? or is it me whom is wrong?

[1]
https://www.aliexpress.com/item/Push-bu ... 38473.html

Many thanks

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

Re: Reset button switch off my Raspberry Pi3

Tue Jul 11, 2017 4:42 pm

In the video, the light comes on when the button is pressed. That means the contacts are normally open, and close when pressed.
Normally Open means the default state of the switch, when "NOT" pressed is an open circuit. No continuity between the contacts..
Normally Closed means the default state of the switch, when not pressed, is a closed circuit. The terminals are shorted together.
Pressing the switch switches to the opposite state.

drgeoff
Posts: 11428
Joined: Wed Jan 25, 2012 6:39 pm

Re: Reset button switch off my Raspberry Pi3

Tue Jul 11, 2017 4:45 pm

Tanaan wrote:Now, I'm bit confused here. According your comments NC is what I have and NO is what I need, however on this link [1] the buttons supposed to be NO (what I need), but if you check the video in the "product details" box the button behaves as a NC (what I have).

Is that video wrong? or is it me whom is wrong?

[1]
https://www.aliexpress.com/item/Push-bu ... 38473.html

Many thanks
Based on what you have posted in this thread the only logical conclusion that can be drawn is that your switch is not the type shown in the video.
Quis custodiet ipsos custodes?

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

Re: Reset button switch off my Raspberry Pi3

Tue Jul 11, 2017 4:51 pm

Yes, the one he has in Normally Closed and he needs Normally Open. I think he was confused as to which was which and got them backwards. Easy mistake to make if your not into electronics.

Tanaan
Posts: 6
Joined: Mon Jul 10, 2017 8:45 am

Re: Reset button switch off my Raspberry Pi3

Tue Jul 11, 2017 5:01 pm

Many thanks @alphanumeric for the explanation. I really appreciated. It is much clear now.

I was confused also because of the video. When they push the button the light switch on (and I related this to have the Raspberry on) and when they release the button the light switch off (Raspberry off too). You know what I mean? For me light on in the video means Raspberry is on and viceversa. My bad.

I know now how it supposed to be. Thanks again to everyone.

Br

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

Re: Reset button switch off my Raspberry Pi3

Tue Jul 11, 2017 5:17 pm

Tanaan wrote:Many thanks @alphanumeric for the explanation. I really appreciated. It is much clear now.

I was confused also because of the video. When they push the button the light switch on (and I related this to have the Raspberry on) and when they release the button the light switch off (Raspberry off too). You know what I mean? For me light on in the video means Raspberry is on and viceversa. My bad.

I know now how it supposed to be. Thanks again to everyone.

Br
Ah OK, I can see your logic. It's flawed, but I see way you thought it would work that way. What actually happens when you press the button is it shorts the two pads on the Pi. This sends a reset signal to the Pi and the CPU reboots. I use it to turn my Pi ON, not OFF. On my Media Center Pi which runs KODI, I do a shut down from the menu. But don't unplug the power pack. Then when I want it to boot up I press the button. Holding it down will keep the CPU in a continuous reboot. That's what your button was doing by default. When you pressed it, the PI booted up. When you released it, it went into reboot again. Now that you brought this up, you don't actually want to use the RUN pins to shut the Pi down. Pressing the button while the Pi is running will just do a reset, and potentially corrupt your SD card. You could use the switch to shut down via GPIO pin and some python code though. That would be a graceful proper shutdown. I've done it in the past on one of my headless Pi's. I got sidetracked on the switch type and completely missed this side of your post until now. :oops:

User avatar
Burngate
Posts: 6418
Joined: Thu Sep 29, 2011 4:34 pm
Location: Berkshire UK Tralfamadore
Contact: Website

Re: Reset button switch off my Raspberry Pi3

Tue Jul 11, 2017 6:03 pm

Just drawn a diagram.
Buttons.png
Buttons.png (3.23 KiB) Viewed 28749 times

Tanaan
Posts: 6
Joined: Mon Jul 10, 2017 8:45 am

Re: Reset button switch off my Raspberry Pi3

Tue Jul 11, 2017 7:20 pm

Interesting point @alphanumeric. I'm trying this because, as probably many others, I have installed Retropie and I would like to have a Reset button. Do you think isn`t a good idea? I obviously need to buy the right button (NO) to do the job.

I will also have a a switch ON/OFF button via GPIO and some coding. For this case I do also need the same type of button right (NO)?

Many thanks @Burngate for the diagram.

Many thanks to everyone.

Br

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

Re: Reset button switch off my Raspberry Pi3

Wed Jul 12, 2017 9:43 am

If the Pi is locked up and unresponsive, doing a reset isn't going to make things any worse. I wouldn't use the RUN/Reset switch just to reboot so you can play a different game though.

GPIO can be programed to look for a logic low or a logic high, just about any switch will work.

https://www.element14.com/community/doc ... berry-pi-b

YanKleber
Posts: 19
Joined: Sun Nov 11, 2018 5:45 pm

Re: Reset button switch off my Raspberry Pi3

Wed Dec 12, 2018 4:25 pm

Burngate wrote:
Mon Jul 10, 2017 4:29 pm
Are you sure the button is a press-to-make switch? It sounds to me like it's press-to-break!
I thought exactly the very same thing when I read the OP!

electrician1
Posts: 1
Joined: Thu Feb 21, 2019 12:15 am

Re: Reset button switch off my Raspberry Pi3

Thu Feb 21, 2019 12:25 am

YanKleber wrote:
Wed Dec 12, 2018 4:25 pm
Burngate wrote:
Mon Jul 10, 2017 4:29 pm
Are you sure the button is a press-to-make switch? It sounds to me like it's press-to-break!
I thought exactly the very same thing when I read the OP!
I tested my Pi3 by shorting together the 2 reset pins, and the Pi rebooted.
I've done this a number of times with the same result.
So the switch required is "push-to-make" (contacts normally open) . Definitely!

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

Re: Reset button switch off my Raspberry Pi3

Thu Feb 21, 2019 3:12 pm

electrician1 wrote:
Thu Feb 21, 2019 12:25 am
So the switch required is "push-to-make" (contacts normally open) . Definitely!
No debate about that. The problem is thaty the OP seems to be using the wrong type.
Why re-open an eighteen-month old thread anyway?
Location: 345th cell on the right of the 210th row of L2 cache

Return to “Beginners”