JuiceBoxZero / LowBatteryShutdown

This script, when run with a connected JuiceBox Zero will trigger an automatic shutdown sequence when the attached Li-Ion battery reaches 3.2v.
MIT License
10 stars 10 forks source link

Safe shutdown when turned off #6

Open mwilde345 opened 5 years ago

mwilde345 commented 5 years ago

Looks like when I flip the juicebox to Off, it's just a hard power disconnect.. makes sense. But, most of the time that is NOT a good idea to hard shutdown. Screws up the SD card and what not. Any way to do a safe shutdown WITHOUT waiting until the battery goes to 3.2v?

mwilde345 commented 5 years ago

I made my own:

https://core-electronics.com.au/tutorials/how-to-make-a-safe-shutdown-button-for-raspberry-pi.html

https://m.imgur.com/gallery/uSOwAB2

Sandyman commented 4 years ago

You could probably solder a little switch between the collector and emitter of transistor Q1 (maybe with a little 300R resistor to be sure). That way, the shutdown itself would be handled by the same code as the low power event.