Last week we had a power cut all day, and when power was restored ( for all of 3 minutes ) the sub-station exploded and we were again without power for the night - just another day in Africa !
My home alarm and access control system, running off an Arduino Mega 2560 attached to a PowerMax power supply with a battery backup, ran out of power and died after around 5 hours.
The battery specs are :
Model OT 9-12 ( 9Ah 12 V )
Standby Use 13.6 - 13.8 V
Cyclic Use 14.5 - 14.9 V
Initial Current less than 2.7A
( ps.. any laymans explanation of the above would be really welcome )
Attached to the power supply are :
Arduino Mega 2560
2 electronic strike locks for pedestrian gates
2 x 3 channel remote receivers
2 DS18B20 temperature sensors
window and door contacts ( magnetic reed switches )
2 indoor PIRs
16 x 4 LCD display with backlight
Cellular Alert device
Armed Reaction Company radio transmitter
various relays for strobe light, sirens, status LEDs, etc
Once we had power again, I tried restarting the system. It ran for a few minutes and then died. Repeatedly.
I measured the voltage from the PowerMax. 13.8 V ( as expected ) on startup, then down to around 5V when it died.
The now disconnected battery voltage measures 11.07 V
Replacing the battery resolved the problem.
My assumption here, is that the battery was drained down so far, that it was damaged beyond its ability to recharge ?
If this is the case, how do I prevent this from happening again ?
Do I add a voltage divider so the code can watch for a fall in the voltage from the power supply ?
At what voltage should I be taking "drastic action" ?
My thoughts would be to do the following :
as soon as mains power is lost ( not yet sure how to detect this ), disable the non-essential items like :
use of the Ethernet shield
electronic strike locks
LCD display with backlight
Then, as power further reduces as the battery runs down, turn off the system to prevent damage to the battery.
But how can this be done, with the need that the system wakes up / resets when sufficient power is again restored ? Max time that the system could be without power is around 3 days.
Scary as if it had happened 2 weeks earlier, we were 600km away and would have the property exposed without any protection.