Simple 'power on' switch?
-
Hello all. This is my first time to post here, and I'm glad to be a part of what seems to be a cool community.
My question is about what it would take to get a simple "on" switch for my RetroPie setup.
I'm using a raspberryPie 3, with retropie 4.1 based on the image from this site, a logitech wireless keyboard mouse, a converted SNES controller using this.I've done a lot of searching, and
However, given that retropie has a "shutdown" command in its menus, I'm not really concerned with a 'graceful' shutdown. I just need something that I can use to easily turn the raspberryPi back on once it's in its 'off' (standby?) mode.
Would anyone be willing to offer me some guidance for this? Do I really need to get a breadboard and program stuff and all that? Or is it as simple as connecting a toggle push button to the correct headers on the GPIO pins?
Thanks in advance.
-
@RandoCalrisian they make a power cord for the pi that has a built in push on/off switch right on the cable. You will have to look through ebay and stuff under "raspberry pi power supply switch"
-
While I wouldn't be AGAINST that as a solution, it's not really what I'm looking for.
Granted, a new ac adapter wouldn't cost a LOT, it'd still cost more than a simple toggle push button.
Also, I'd like a solution that's at the unit, not at the wall. If bury a cable into a place I can't get to, having a switch on the ac adapter would be problematic.
Thank you for your input though.I'm a little mystified at this topic being as murky as it is.
Every topic I keep coming across continues to reference the need to shutdown the pi or you'll ruin the SD card, but as stated, I'm not concerned with that.I really just want to be able to send a "turn on" signal to the unit in as simple and hopefully graceful a way as possible.
-
@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..
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.