henryhanselscott wrote:Thanks for the replies, very useful information. My thought is to have the pi run on a normal 5 volt supply with a battery backup in the case of a power failure. Then when the batteries begin to get low after a power failure the system would shutdown.
But the 5V from your battery is converted from the actual battery voltage. Assuming a switching regulator, the 5V will not dip until the battery is exhausted, which may not leave enough to shut down. You need to monitor the actual battery voltage.
I'm building a heating controller with battery backup. Since the heating won't work with no mains, my strategy is to shut down as soon as the mains fails (well, as soon as it has failed for more than a few seconds). Auto reboot when power is restored.