Safe shutdown needed?

General GBZ-related chat goes here. Share ideas, tips and tricks, or ask questions that don't fit into the hardware/software help forums.
Post Reply
xaphor
Posts: 26
Joined: Sun May 05, 2019 8:41 am
Has thanked: 2 times
Been thanked: 1 time

Safe shutdown needed?

Post by xaphor » Fri Jun 28, 2019 10:23 am

I've seen quite a few tutorials online that don't use a safe shutdown circuit, I was wondering if it's possible without whilst using a battery?

I don't really understand the concept of them if I'm honest,

I understand it you can run a shutdown script and it'll shutdown the pi, if it's connected to a powerboost directly then once it's shutdown will the pi then reboot as it sees the power?

Do I need one overall? I've got most of my build apart from one, can I not just set a button to trigger the shutdown script?

Also.. if the pi freezes the shutdown script won't run right?

User avatar
infinitLoop
Posts: 536
Joined: Mon Dec 24, 2018 11:46 am
Location: Portland, OR
Has thanked: 222 times
Been thanked: 199 times
Contact:

Re: Safe shutdown needed?

Post by infinitLoop » Fri Jun 28, 2019 12:40 pm

xaphor wrote:
Fri Jun 28, 2019 10:23 am
I've seen quite a few tutorials online that don't use a safe shutdown circuit, I was wondering if it's possible without whilst using a battery?

I don't really understand the concept of them if I'm honest,

I understand it you can run a shutdown script and it'll shutdown the pi, if it's connected to a powerboost directly then once it's shutdown will the pi then reboot as it sees the power?

Do I need one overall? I've got most of my build apart from one, can I not just set a button to trigger the shutdown script?

Also.. if the pi freezes the shutdown script won't run right?
if all that you do is call the "shutdown" for the pi, then the power will stay active (it doesn't call a reboot, it just doesn't turn off the power along with shutting down the pi). when people use a hotkey to trigger shutdown (say, with the MintyBatteryMointor option), then you just have to wait a few seconds after triggering the shutdown, and turn the power off yourself.

in addition to the trigger for the software shutdown method, most "safe shutdown" circuits have something like a mosfet h/w gate that will keep the power active until that software shutdown is complete (another connection to the GPIO triggered on "poweroff") and so you only have to do the one switch. that's the "safe" bit. the concept is the same for a PC, where you "Shutdown Windows" in the software, which cuts the power at the end of its process.

and yes, if frozen, the shutdown cannot activate, and it can get stuck "on", so you sometimes need to pull the battery or have another h/w way to cut the power

MrErickson
Posts: 171
Joined: Sat Nov 04, 2017 3:04 pm
Has thanked: 54 times
Been thanked: 38 times

Re: Safe shutdown needed?

Post by MrErickson » Mon Jul 01, 2019 9:42 am

As for do you need one? That is probably subjective, if you have young children or peeps that are not tech savvy it is probably best to have one, if it just for you and you're aware you shouldn't just kill power to the pi over and over you can probably get away without using one. Camble has a great safe shutdown board that I've used if you're looking for help with one.

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest