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

    Want to switch a relay using GPIO Pins on power off..

    Scheduled Pinned Locked Moved Help and Support
    gpiorelayshutdownstandby
    3 Posts 3 Posters 1.5k 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.
    • C
      Chillimonster
      last edited by

      OK - hopefully i can explain this correctly.

      What i want to be able to do is to get my Pi to switch a relay as it powers off.

      I have my Pi connected to an arcade cab, and it has marquee ligting connected to a 12V PSU.

      When the Pi 'shuts down' using the shutdown script and drops into standby i want to be able to drop the power to the lighting.

      Are there any set of GPIO pins that are normally powered, but drop to zero when the pi is in standby so i can use these to trip the relay and cut power to the lights and sound.

      This is on a P3 running retropie 4.1 (But should be the same on Pi2 as we are talking hardware / GPIO)

      edmaul69E 1 Reply Last reply Reply Quote 0
      • J
        jsawhite
        last edited by

        I'm pretty sure that pin 8 (UART_TXD, gpio 14) will go 3.3v while running and 0V when in standby. Check to make sure...

        You can then use one of these relays to control your lights:

        https://www.amazon.com/gp/product/B00VRUAHLE/ref=oh_aui_search_detailpage?ie=UTF8&psc=1

        Will use 5V for relay and 3.3V for control and make sure to not mix the two. I used one of these to make a ghetto power control for my Atari2600 conversion...

        1 Reply Last reply Reply Quote 1
        • edmaul69E
          edmaul69 @Chillimonster
          last edited by edmaul69

          @Chillimonster you could use the 5v on the usb because it kills when you run a shutdown. Even if it is in "standby" and the power isnt fully cut off. Use the usb ground and 5v to power the relay and so when it gets power it flips the relay to turn on your light

          1 Reply Last reply Reply Quote 1
          • 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.