How to prevent lead-acid batteries from running out of power