Want to switch a relay using GPIO Pins on power off..
-
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)
-
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...
-
@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
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.