Skip to main content
IlConte
Associate II
March 27, 2024
Solved

Low Battery RTC

  • March 27, 2024
  • 5 replies
  • 1789 views

I have a STM32F429, It is possible to know the batteri state ?

I would like to know from RTC register or other if the battery is near the low voltage level, and needs to be replaced it

 

Thanks

Stefano

This topic has been closed for replies.
Best answer by waclawek.jan

> Well, that measures the battery voltage - which may or may not be a good indication of its state-of-charge...

There's no magic method to determine state of charge of a battery anyway. You can coulomb-count, but that of course has its drawbacks, too.

While some chemistries have a rather steep end-of-life V-t curve, they also quite universally have increased internal resistance by that time. Loading it by the divider thus results in lower voltage than what it's unloaded. In other words, when the measurement using the divider shows some reasonably low voltage on the V-t curve, there's still some life left in the battery.

JW

 

PS. Don't leave the resistor divider connected to VBAT longer than absolutely necessary, as that would drain it very quickly.

5 replies

mƎALLEm
ST Technical Moderator
March 27, 2024

Hello,

You can do it with ADC CHANNEL18:

See RM0090:

SofLit_0-1711531703791.png

 

To give better visibility on the answered topics, please click "Best answer" on the reply which solved your issue or answered your question.
Andrew Neil
Super User
March 27, 2024

Well, that measures the battery voltage - which may or may not be a good indication of its state-of-charge...

:face_savoring_food:

A complex system that works is invariably found to have evolved from a simple system that worked.A complex system designed from scratch never works and cannot be patched up to make it work.
mƎALLEm
ST Technical Moderator
March 27, 2024

Other information that you need to take care about when you need to monitor your battery with ADC:

From the datasheet:

SofLit_0-1711532085551.png

SofLit_2-1711532098230.png

 

To give better visibility on the answered topics, please click "Best answer" on the reply which solved your issue or answered your question.
waclawek.jan
waclawek.janBest answer
Super User
March 27, 2024

> Well, that measures the battery voltage - which may or may not be a good indication of its state-of-charge...

There's no magic method to determine state of charge of a battery anyway. You can coulomb-count, but that of course has its drawbacks, too.

While some chemistries have a rather steep end-of-life V-t curve, they also quite universally have increased internal resistance by that time. Loading it by the divider thus results in lower voltage than what it's unloaded. In other words, when the measurement using the divider shows some reasonably low voltage on the V-t curve, there's still some life left in the battery.

JW

 

PS. Don't leave the resistor divider connected to VBAT longer than absolutely necessary, as that would drain it very quickly.

Andrew Neil
Super User
March 27, 2024

@waclawek.jan wrote:

Don't leave the resistor divider connected to VBAT longer than absolutely necessary, as that would drain it very quickly.


^^^ This! ^^^

A complex system that works is invariably found to have evolved from a simple system that worked.A complex system designed from scratch never works and cannot be patched up to make it work.