Simple 'power on' switch?
-
@RandoCalrisian: My understanding of the power cable with the on/off switch was that it was like a lamp. The button is on the cable, not on the part that plugs into the wall. Like this:
So you woudn't have to worry about reaching to the plug to switch it off/on.
-
Check out mausberry circuits works excellent
-
@RandoCalrisian another option is this. You can install a pushbutton on your case and wire it to the reset on the pi. When you do a shutdown on the pi you can just hit the reset button to power it back up. Its what i do so i dont have to reach to the back of my apple iie to turn the power switch off.
-
@RandoCalrisian said in
My question is about what it would take to get a simple "on" switch for my RetroPie setup.
Mine kicks back in when i wiggle the joystick or push a couple of buttons. I assume this probably has something to do with the fact theyre wired to the GPIO though (if it doesnt happen with a USB controller).
Sorry thats not much help.
-
@RandoCalrisian
Here's a few options:ATX Raspi
https://lowpowerlab.com/atxraspi/Power Block
http://petrockblog.storenvy.com/products/13969704-powerblockMausberry Circuits
http://mausberry-circuits.myshopify.com/ -
I use something very similar to what is described here.
This requires only a single button, two wires, and a single script to monitor the pin.
It will allow you to shut down the pi (or at least go to minimal power mode) and turn it back on again. -
If I'm reading between the lines, you're looking for a way to keep the power supply plugged in and add a switch via GPIO to tell the Pi to turn on or off. The Pi isn't sophisticated enough to do that. You'll need to use a separate circuit, as @SloTayHolmes suggested. I personally am using a Mausberry and it works very well.
-
Thanks for the responses, everyone. It definitely seems like there's a solution for me here. I'll post back once I apply one, and let you all know how it goes.
-
@obsidianspider , well it really depends on what you consider 'turning off'.
If you just want to go to a low power mode so you arrest all writing activity and can unplug the pi without risking damage to de sd-card, then the Pi can do that just fine.
If you want to go to absolute zero-power mode or physically uncouple power from the device (for instance because you care about the residual power draw in a battery operated setting) then you will need an additional circuit such as with your solution. -
Maybe I should explain, if it's not obvious :
- When you call
shutdown - h now
, it go to sleep mode. - When in sleep mode, the Pi will wake up when you connect pin5 (aka GPIO03) with ground (pin6).
And seeing as sleep is close enough to 'being turned off' for me, I do not need more than a single button and a script to create an on/off button.
Now, if you want a real switch that stays in a definite on position, well that's something you'll need a Mausberry for.
- When you call
-
@Zigurana Hi Zigurana, when you say similar, what changes did you make? This looks a perfect solution for what I am thinking of. Thanks
-
I also run a pi3, my solution is to put a momentary contact switch across the "run" header.(on pi2 it's called pin6) when my pi is in lower powermode this brings it back with the press of a button. i cut a small hole in my case and superglued the switch in place.
for permanent use i've added 2 pins through the holes for the run header, this way i can pop open the case and unplug anything attached to the top half.
difficulty easy 5minute job.
required tools/parts,
soldering iron, dremel(or a sharp knife)
one moumentary contact switch(i harvested mine from an old pc case reset button) with wires/jumper
2 pins for the run header(de soldtered from an old motherboard) -
@Graboid my script looks a little different, is all. No functional difference.
-
@Zigurana said in Simple 'power on' switch?:
I use something very similar to what is described here.
This requires only a single button, two wires, and a single script to monitor the pin.
It will allow you to shut down the pi (or at least go to minimal power mode) and turn it back on again.Okay, so, using the advice posted by @Zigurana, I purchased a simple momentary switch.
I went ahead and got some jumper cables and used a couple for COM and NO.Given the nature of this kind of switch, I knew it didn't matter which cable went into which terminal of the switch, and I simply had to connect to pin 5 and 6 on my RPi 3.
This definitely did the trick. I can now simply press this button when the RPi3 is in its low power state, and it'll come right on. This is exactly what I need, and it works great.
Given that making the script and using the full function of the post @Zigurana linked would be pretty easy, I went ahead and got that script written up and working too. I can't say I use the switch for powering down, as I simply 'shutdown' from emulation station, but it's good to know it's there if I need it.
Thanks for the input everyone.
-
I also want to ask.....I have the USB with the switch built in...
Can I just put the code in for a power off and then use my switch? I have seen people using wires across pins...paperclips and with the code, they say its fine?
thanks
-
@pc4life0427, using this switch is the same thing as pulling the plug.
-
@Zigurana yes I know that.. that is why I was asking about the code.. if I add the right code will that work? I am looking at doing a switch from GPIO.. but if I can run the code then shutdown from start menu etc..
-
@pc4life0427 I do not understand your question. Do you mean to use two buttons, one on the usb cable, and one on the gpio's?
-
@Zigurana I want to stop using the USB.. yes.. that is why I was asking about GPIO...
But I have seen code for proper shutting down.. then I can use the USB switch I have to then turn off completely
-
@pc4life0427 Yes. For that you can use the script I linked to above.
Regarding using the cable switch as well, unless you are operating on battery power, I dont see the point. The remaining <1 Watt (120mA @ 5V) (source) is negligible otherwise.
Contributions to the project are always appreciated, so if you would like to support us with a donation you can do so here.
Hosting provided by Mythic-Beasts. See the Hosting Information page for more information.