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

    Pi power button turns arduino on and off? arcade

    Scheduled Pinned Locked Moved Help and Support
    pi 3arduino
    10 Posts 3 Posters 2.1k 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.
    • T
      thomen
      last edited by

      Hi I'm building up a retropie barcade and I was hoping to implement a power button like so on the pi:

      I was hoping to then get the pi to turn an arduino on or off i.e. Pi is on, arduino is on.. pi is off arduino is off.

      The arduino runs some lighting for the arcade machine.

      I was wondering if anyone had any suggestions on where to begin.

      I didn't want the equivalent of pulling the plug not good for the pi!

      cyperghostC caver01C 2 Replies Last reply Reply Quote 0
      • cyperghostC
        cyperghost @thomen
        last edited by cyperghost

        @thomen Use the GPIOs that provide 5V from the RPi
        Pi off > 5V off > Arduino off
        Use a Mausberry for this costs around 20$

        1 Reply Last reply Reply Quote 0
        • caver01C
          caver01 @thomen
          last edited by

          @thomen Maybe, power the arduino from USB, and plug it into a USB hub connected to the Pi. That's how my backlighting works, although I don't use an arduino. I get 5v via USB from my USB hub which switches off when the Pi goes off. When the Pi goes on, the USB hub (powered) also comes on, and when that happens, my LEDs light up. NO GPIO connections or scripting needed.

          My 4-player cocktail style cabinet built as a custom "roadcase"

          T 1 Reply Last reply Reply Quote 1
          • cyperghostC
            cyperghost
            last edited by

            @caver01 Good catch...

            1 Reply Last reply Reply Quote 0
            • T
              thomen
              last edited by thomen

              That's a great idea @caver01 ! What powered hub are you using?

              Thanks!

              1 Reply Last reply Reply Quote 0
              • T
                thomen @caver01
                last edited by thomen

                @caver01 how does the hub switch on and off as the pi goes on and off if it is powered don't the peripherals remain powered?

                1 Reply Last reply Reply Quote 0
                • T
                  thomen
                  last edited by

                  That got me thinking.. what about a master slave style powerboard where the pi is the master and when shut down the slave devices would then turn off?

                  https://www.bunnings.com.au/eco-solutions-6-way-master-slave-powerboard_p4331027

                  I like the usb hub idea better :) but I'd like to know how the master usb device activates the on state as I was thinking of using the powered usb hub to power the arduino and some neopixels.. so ideally I'd like both the pixels and arduino off when the pi turns off

                  caver01C 1 Reply Last reply Reply Quote 0
                  • caver01C
                    caver01 @thomen
                    last edited by caver01

                    @thomen maybe it is merely a circumstance/feature of the hub I am using. The powered hub remains connected to power via the AC/DC adapter, but the master device which connects to the Pi from one side of the hub seems to be "watched" as it triggers a power up for the rest of the devices (8 ports on the other side). Consequently, when the Pi goes on, the hub wake up, and anything connected to it starts drawing power--including my pushbutton LEDs.

                    My 4-player cocktail style cabinet built as a custom "roadcase"

                    T 1 Reply Last reply Reply Quote 0
                    • T
                      thomen @caver01
                      last edited by

                      @caver01 that sounds perfect what hub are you using? Model?

                      caver01C 1 Reply Last reply Reply Quote 0
                      • caver01C
                        caver01 @thomen
                        last edited by caver01

                        @thomen It looks like it is an older, D-Link model DUB-H7 USB2.0 powered hub. You can see it in my project build thread (click link in my signature below). I have since cleaned up a bunch of USB cables using custom ones I built to length, but the shorter, white USB cable in the image is the power for my LEDs.

                        This hub definitely pre-dates high-power charging for smartphones and tablets, so might be an out-moded design. It seems these days, folks would want their devices to continue to get power for charing even if their computer is OFF. I wonder if a modern version of this hub will work differently.

                        My 4-player cocktail style cabinet built as a custom "roadcase"

                        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.