Safe shutdown when total power turned off.

Got an idea for a project? Found a cool project you want to share? Post it here!
Post Reply
User avatar
WoodMill
Posts: 173
Joined: Tue Sep 06, 2016 11:57 am
Location: Indianapolis, Indiana, USA
Has thanked: 20 times
Been thanked: 29 times

Safe shutdown when total power turned off.

Post by WoodMill » Tue Feb 19, 2019 6:47 pm

I've converted my Street Fighter II cabinet into a retro pie. So fun. Picked up the game for $100, so is perfect for modding.

What I'd like to do is make this as fool proof as possible. What I'd like to do is add a battery to the RPi 3+ so that it shuts down safely when I turn the power off. In a way I see it similar, but a little different than the GBZ.

How I want it to act is if the power is pulled, it will shutdown, as opposed to an actual switch like on the GBZ. That way I can have everything, like the monitor, and speakers on one circuit breaker. When I turn off the circuit breaker, the pi will shutdown on it's own.

Any thoughts on this? Like I said, I want it as fool proof as possible, so that someone doesnt have to remember to go to the shutdown menu, or even hit the power button to just the pi before turning the rest off.
Follow my Youtube Vlog about Filmmaking
https://www.youtube.com/playlist?list=P ... P0H6UZe1ds

McGyver
Posts: 211
Joined: Tue Jan 31, 2017 11:06 am
Location: Tianjin / China
Has thanked: 23 times
Been thanked: 47 times

Re: Safe shutdown when total power turned off.

Post by McGyver » Tue Feb 19, 2019 7:16 pm

What you need is something like Pi UPS. Just google about it to get some ideas.

User avatar
Flavor
Posts: 32
Joined: Sat Aug 13, 2016 2:32 pm
Has thanked: 5 times
Been thanked: 16 times

Re: Safe shutdown when total power turned off.

Post by Flavor » Fri Feb 22, 2019 1:00 pm

It almost seems like the easiest solution is to let the Pi run all the time and just turn off the monitor and speakers with the switch.

This way, it would always be on your network (assuming it's networked) to transfer files and such, too.
NGPC and WS Flash Carts: http://www.flashmasta.com
Freeplay Zero/CM3 (RPi In GBA-Style Shell): http://www.freeplaytech.com

User avatar
WoodMill
Posts: 173
Joined: Tue Sep 06, 2016 11:57 am
Location: Indianapolis, Indiana, USA
Has thanked: 20 times
Been thanked: 29 times

Re: Safe shutdown when total power turned off.

Post by WoodMill » Sat Mar 23, 2019 9:57 pm

Finally got around to setting up the UPS option. Ran into an issue I wasnt thinking of. So I tested it with an Adafruit Powerboost and battery. Had an extra 2500 battery. So when the power is disconnected, the Pi shuts down but the battery continues to send power to the Pi, so to turn the pi back on, I have to cut the power from the battery and plug it back in.

So I cant think of a way around this without adding a power button to reset it.

I rather not leave the pi running all the time. I'm going to have two of these arcade1up set up and they'll be no need to access it again once I set it up.
Follow my Youtube Vlog about Filmmaking
https://www.youtube.com/playlist?list=P ... P0H6UZe1ds

User avatar
Picicle
Posts: 62
Joined: Wed Apr 24, 2019 2:08 pm
Has thanked: 2 times
Been thanked: 13 times

Re: Safe shutdown when total power turned off.

Post by Picicle » Sat Apr 27, 2019 1:15 pm

Connect the battery through the transistor. At the gate of the transistor, feed a logic 1 from any pin GPIO. In the gate of the transistor, turn on the capacitor. Set the input of the one pin GPIO to start the shutdown when the main power disappears. When the main power is gone, the shutdown process begins. And after a while (determined by the capacitor in the gate of the transistor), the battery turns off.

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest