RetroPie forum home
    • Recent
    • Tags
    • Popular
    • Home
    • Docs
    • Register
    • Login
    Please do not post a support request without first reading and following the advice in https://retropie.org.uk/forum/topic/3/read-this-first

    Simple 'power on' switch?

    Scheduled Pinned Locked Moved Help and Support
    powerswitchgpiotogglepush button
    34 Posts 17 Posters 22.4k Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • TheStrayMongrelT
      TheStrayMongrel @RandoCalrisian
      last edited by

      @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.

      Raspberry Pi 2 B+

      1 Reply Last reply Reply Quote 0
      • S
        SloTayHolmes @RandoCalrisian
        last edited by

        @RandoCalrisian
        Here's a few options:

        ATX Raspi
        https://lowpowerlab.com/atxraspi/

        Power Block
        http://petrockblog.storenvy.com/products/13969704-powerblock

        Mausberry Circuits
        http://mausberry-circuits.myshopify.com/

        S 1 Reply Last reply Reply Quote 1
        • Z
          Zigurana
          last edited by Zigurana

          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 tetris has thought me anything, it's that errors pile up and that accomplishments dissappear.

          GraboidG RandoCalrisianR 2 Replies Last reply Reply Quote 1
          • obsidianspiderO
            obsidianspider
            last edited by

            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.

            📷 @obsidianspider

            1 Reply Last reply Reply Quote 0
            • RandoCalrisianR
              RandoCalrisian
              last edited by

              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.

              1 Reply Last reply Reply Quote 1
              • Z
                Zigurana
                last edited by

                @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.

                If tetris has thought me anything, it's that errors pile up and that accomplishments dissappear.

                1 Reply Last reply Reply Quote 0
                • Z
                  Zigurana
                  last edited by Zigurana

                  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.

                  If tetris has thought me anything, it's that errors pile up and that accomplishments dissappear.

                  1 Reply Last reply Reply Quote 2
                  • GraboidG
                    Graboid @Zigurana
                    last edited by

                    @Zigurana Hi Zigurana, when you say similar, what changes did you make? This looks a perfect solution for what I am thinking of. Thanks

                    Built Space Invaders Themed Bartop - Check it out here:- https://retropie.org.uk/forum/topic/5593/space-invaders-themed-bartop-arcade-uk-completed

                    Z 1 Reply Last reply Reply Quote 0
                    • X
                      XeroOmega
                      last edited by

                      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)

                      1 Reply Last reply Reply Quote 0
                      • Z
                        Zigurana @Graboid
                        last edited by

                        @Graboid my script looks a little different, is all. No functional difference.

                        If tetris has thought me anything, it's that errors pile up and that accomplishments dissappear.

                        1 Reply Last reply Reply Quote 0
                        • RandoCalrisianR
                          RandoCalrisian @Zigurana
                          last edited by RandoCalrisian

                          @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.

                          1 Reply Last reply Reply Quote 1
                          • P
                            pc4life0427
                            last edited by

                            I also want to ask.....I have the USB with the switch built in...0_1480824972505_switch.jpg

                            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

                            Z 1 Reply Last reply Reply Quote 0
                            • Z
                              Zigurana @pc4life0427
                              last edited by

                              @pc4life0427, using this switch is the same thing as pulling the plug.

                              If tetris has thought me anything, it's that errors pile up and that accomplishments dissappear.

                              P 1 Reply Last reply Reply Quote 0
                              • P
                                pc4life0427 @Zigurana
                                last edited by

                                @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..

                                Z 1 Reply Last reply Reply Quote 0
                                • Z
                                  Zigurana @pc4life0427
                                  last edited by

                                  @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?

                                  If tetris has thought me anything, it's that errors pile up and that accomplishments dissappear.

                                  P 1 Reply Last reply Reply Quote 0
                                  • P
                                    pc4life0427 @Zigurana
                                    last edited by

                                    @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

                                    Z 1 Reply Last reply Reply Quote 0
                                    • Z
                                      Zigurana @pc4life0427
                                      last edited by

                                      @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.

                                      If tetris has thought me anything, it's that errors pile up and that accomplishments dissappear.

                                      P 1 Reply Last reply Reply Quote 1
                                      • B
                                        Brewskii
                                        last edited by BuZz

                                        [removed]

                                        P 1 Reply Last reply Reply Quote 2
                                        • P
                                          pc4life0427 @Zigurana
                                          last edited by

                                          @Zigurana thanks..

                                          1 Reply Last reply Reply Quote 0
                                          • P
                                            pc4life0427 @Brewskii
                                            last edited by

                                            @Brewskii yes I am subbed to him.. he makes great videos...I watched it.. being in Japan it's hard to get cheap switches... I did find this one on Amazon.. was thinking about putting on top of case.. 0_1480982756957_IMG_7892.PNG

                                            FlyingTomahawkF 1 Reply Last reply Reply Quote 0
                                            • First post
                                              Last post

                                            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.