Page 1 of 1

Safe shutdown needed?

Posted: Fri Jun 28, 2019 10:23 am
by xaphor
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?

Re: Safe shutdown needed?

Posted: Fri Jun 28, 2019 12:40 pm
by infinitLoop
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

Re: Safe shutdown needed?

Posted: Mon Jul 01, 2019 9:42 am
by MrErickson
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.