This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

MEASURING RTC BATTERY VOLTEGE

Hi,

We require to provide information about the battery that drives the RTC. Is there any way for the condition or way to tell if the battery is near failure from within the C51? I suspect not.
If no I will have to add a fet sampling circuit to the battery in hardware.

Regards,
Keith

  • In a correct hardware design, your processor will either receive a perfectly fine and stabilized supply voltage or it will be in the reset state. So the processor is normally not able to check on batteries.

    Some processors have brownout detection, in which case they can be allowed to detect a slightly lower voltage and potentially perform some actions - like storing important data to EEPROM - before the voltage continues to drop far enough that the processor itself or external reset logic resets the processor or the prcoessor starts to do random magic.

    So in the end, you normally need additional hardware to feed your battery voltage to an ADC-capable pin or some comparator or similar.

    Very best for a battery-operated device - at least if using rechargeable batteries - is a battery supervisor chip that can accumulate charge or discharge information, allowing you to figure out how many mAh you have drained (load or self-discharge) from the battery. Then you can predict remaining time without having to react first when the voltage starts to drop - especially since lots of rechargeable batteries have a very flat discharge voltage curve until they are nearly fully depleted.