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
Pic2
Pic3
many thanks in advance.
- 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
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.
To prove it, disconnect the red wire at the switch end. Putting it back on (without pressing the button) should reset your Pi.
Re: Reset button switch off my Raspberry Pi3
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
Pic5
many thanks again
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
Pic5
many thanks again
Re: Reset button switch off my Raspberry Pi3
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.
Most push buttons make contact when pushed. Yours seems to make contact when not pushed.
Quis custodiet ipsos custodes?
Re: Reset button switch off my Raspberry Pi3
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.
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
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.
- 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
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.
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.
Re: Reset button switch off my Raspberry Pi3
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!
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!
Re: Reset button switch off my Raspberry Pi3
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
Physically , the buttons will look identical. Internally, they are different. Normally open is what you want, normally closed is what you have now.
Re: Reset button switch off my Raspberry Pi3
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
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
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.
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.
Re: Reset button switch off my Raspberry Pi3
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.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
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
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.
Re: Reset button switch off my Raspberry Pi3
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
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
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.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
- 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
Just drawn a diagram.
Re: Reset button switch off my Raspberry Pi3
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
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
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
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
-
electrician1
- Posts: 1
- Joined: Thu Feb 21, 2019 12:15 am
Re: Reset button switch off my Raspberry Pi3
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!
- davidcoton
- Posts: 5776
- Joined: Mon Sep 01, 2014 2:37 pm
- Location: Cambridge, UK
- Contact: Website
Re: Reset button switch off my Raspberry Pi3
No debate about that. The problem is thaty the OP seems to be using the wrong type.electrician1 wrote: ↑Thu Feb 21, 2019 12:25 amSo the switch required is "push-to-make" (contacts normally open) . Definitely!
Why re-open an eighteen-month old thread anyway?
Location: 345th cell on the right of the 210th row of L2 cache