xorbit / LiFePO4wered-Pi

Access library, command line tool and daemon for the LiFePO4wered/Pi module
GNU General Public License v2.0
132 stars 31 forks source link

REQ: Autoshutdown #5

Closed madeinoz67 closed 7 years ago

madeinoz67 commented 7 years ago

I'd like the ability to perform auto shutdown of Pi if incoming power is disconnected. e.g. shutdown after x delay when incoming power in not present.

xorbit commented 7 years ago

This is a feature that has been requested frequently, and as you can see in the code, it has been added to the host code already! Look for AUTO_SHDN_TIME, which has been added to register version 4. As this requires hardware support, it will first be available in the new LiFePO4wered/Pi3 that will hopefully be released later this week. I'm hoping to backport this to future versions of the LiFePO4wered/Pi as well.

madeinoz67 commented 7 years ago

awesome, can the current version hardware be modded to take advantage of the autoshutdown?

xorbit commented 7 years ago

Unfortunately not easily. The original LiFePO4wered/Pi power manager is missing a connection from the 4-pin header to the microcontroller and the charger part doesn't have the correct resistive divider.