Skip to main content
jacinta sartor
Visitor II
July 27, 2017
Question

Using Vbat as ADC for battery level monitoring

  • July 27, 2017
  • 2 replies
  • 4690 views
Posted on July 27, 2017 at 05:18

I'm updating an old PCB design that used the STM32L432KB. The new design is using the STM32L452CE which has the Vbat pin.

In the old design I used a voltage divider across the battery and connected it to an ADC pin to periodically check the battery level.

In the new design instead of using a voltage divider to an ADC pin can I use a connection from the positive terminal of the battery straight to the Vbat pin?

I don't wish to use Vbat as a backup power supply or any of the other feature, just as an ADC input since the board is to be powered with the battery only. 

#adc #vbat #battery-life #battery
This topic has been closed for replies.

2 replies

pksn
Visitor II
July 27, 2017
Posted on July 27, 2017 at 06:05

In the new design instead of using a voltage divider to an ADC pin can I use a connection from the positive terminal of the battery straight to the Vbat pin?

Yes. Possible.

Below is the image snapshot from

http://www.st.com/content/ccc/resource/technical/document/reference_manual/group0/b0/ac/3e/8f/6d/21/47/af/DM00151940/files/DM00151940.pdf/jcr:content/translations/en.DM00151940.pdf

of the MCU.0690X00000607gmQAA.png

Couple of points:

  1. Enable the bridge (CH18SEL) only during measurement. else it will drain battery continuously.
  2. The read analog value represents will be one third of the actual battery voltage.
S.Ma
Principal
July 28, 2017
Posted on July 28, 2017 at 08:33

If the battery is 4.6V, the vbat gpio maynot be 5v tolerant, hence make sure not to beleive 5/3 will solve it...

S.Ma
Principal
July 27, 2017
Posted on July 27, 2017 at 08:33

Check the normal operating input voltage of vbat to make sure weather the battery can be direct connect to vbat pin or not. As i recall, the adc will have an inyernal divider to scale the voltage within mid range of the adc. It has a power switch to reduce leakage. Using vref adc channel, the accurate vbat voltage can be calculated properly.

If the vbat is 5v, it would probably require an external divider...