The server is back online today, after being down for most of a week. After a few sunny days and no sign of it coming back up I checked the battery. It was fully charged, but no power was making it to the circuit to turn the Raspberry Pi on and off. I finally had some time to look into the issue in more detail last night.
Turns out my Victron solar charge controller, in its wisdom, was withholding power to the ‘load’ part of the circuit (the power from the battery comes via the charge controller, not direct to the server). It looks like this was probably because it was in ‘Battery Life’ mode, which is designed for Lead Acid batteries, not LiFePo4 batteries. Because LiFePO4 batteries have a very flat discharge curve, holding almost the exact same voltage right until they are almost empty, the Victron algorithm gets confused. As a result it probably scaled the disconnect threshold very high, withholding power to the load output.
I switched the charge controller’s battery setting to ‘Always On’ mode instead this morning, and the server came back up immediately. That’s the equivalent of having a direct connection from the battery to my switching circuit, where power is switched to the Pi based on the battery’s state of charge.
Kind of strange that the default setting expects a Lead Acid battery to be connected? Perhaps a sign of how quickly battery technology is evolving.
I also rewired various signal connections as part of my investigations, to make them more robust.
It was never going to be a case of ‘set and forget’…