VBAT voltage divider ratio
Answer
11/19/15 10:24 AM
Dear all,

I am currently trying to measure the voltage of the included Li-Ion battery. For this I am using adcSingleInpCh7 as an input pin as this one is referenced in PTD_portDriver_ph.h. It is clear, that I can't measure the 3.3-4.2V of the battery directly so there should be some kind of voltage divider. I found no documentation about this at the moment. Can anyone provide me the voltage ratio of this divider?
Thank you.

Kind regards,

Kai Liebich
0 (0 Votes)
VBAT voltage divider ratio
Answer
11/20/15 9:30 AM as a reply to Kai Clemens Liebich.
Hi Kai,

first of all, here's some info on the battery:

It's a LiPo battery 1S (1 Cell), 3.7V with 560mAh 2.07Wh.

For the voltage divider, I'm not 100% sure what you mean, but if I'm not totally mistaken that's the chip used for the power supply management:
http://www.ti.com/product/bq24072

- Florian
0 (0 Votes)
VBAT voltage divider ratio
Answer
11/20/15 10:00 AM as a reply to Florian Harr.
I would like to measure the voltage of the battery. I don't wan't to interfere in any way with the power supply management. It should just be an information for me. In PTD_portDriver_ph.h this is written:

/** ADC input pin of Battery voltage monitoring */
#define PTD_PORT_VBAT_ADC_OUT         gpioPortD
#define PTD_PIN_VBAT_ADC_OUT          7
#define PTD_MODE_VBAT_ADC_OUT         gpioModeInput
#define PTD_DOUT_VBAT_ADC_OUT         PTD_GPIO_INPUT_FILTER_OFF

I guess that this should mean that the channel7 of the ADC is connected in any way with the battery so that I am able to measure the battery voltage. The voltage of a LiPo battery can vary dependend on the charging state between 3.0 and 4.2V. This voltage is too high to directly connect it to the microcontroller. Because of this i guess that there should be some sort of voltage divider (https://learn.sparkfun.com/tutorials/voltage-dividers) between the battery and the ADC-Input pin. Now I need to know the ratio of the voltage divider, eg. by which factor he lowers the battery voltage. With this ratio I am able to calculate the voltage of the battery in mV out of my current readings of ca. 3330-3334.
0 (0 Votes)
VBAT voltage divider ratio
Answer
11/27/15 9:24 AM as a reply to Kai Clemens Liebich.
Dear Kai,

The function definition is a bit misleading; in fact there is no direct conncection between the battery voltage and the MCU. However, the charger chip provides an output voltage that is almost battery voltage (infact a little bit higher) and can give an indication for the battery voltage if you take into account the characteristics of the charger chip (please refer to http://www.ti.com/lit/ds/symlink/bq24072.pdf for details). A battery voltage (for a fuly charged battery) of 4.2V will represent in a votage of about 4.4V; the voltage divider used to bring it down to a level suitable four the MCU is 1:1, so that would mean in theory the pin should be at 2.2V in that case.
However, we have not implemented and tested this functionality to an exted that we can release it. If you want to try it out, I'd be happy if you share your experience.

Regards,
Mathias
0 (0 Votes)
VBAT voltage divider ratio
Answer
11/27/15 9:27 AM as a reply to Mathias Bruendel.
Thanks Mathias for replying so quickly to the ticket.

@Kai
Sorry I didn't answer your question fully in first place. I forwarded it to Mathias though ;)
0 (0 Votes)
VBAT voltage divider ratio
Answer
11/30/15 8:26 AM as a reply to Florian Harr.
Okay, with the voltage divider of 1:1 I get three different results depending on the method of measuring:
  1. Vref = VDD
    I have read somewhere that VDD in the XDK should be 2.5V so in this version I assumed that VDD = 2.5V. The resulting maximum battery voltage was 4.45V.
  2. Vref = 2.5V (internal bandgap reference)
    Using the internal 2.5V bandgap reference I get a reading of 4.40V.
  3. Vref = VDD (calibrated)
    In this version I again used VDD as reference voltage but this time I tried to compensate the possible offset error of VDD (still expected to be 2.5V) by measuring VDD/3 with the 1.25V internal reference after every measurement of VBAT. (adc_value*vdd_value)/((4096*2.5)/(3*1.25))
    The result of this measurement is 3.35V.
All voltages are quiet stable and barely have any noise. Which of those readings could be the most reliable one? Is the internal 2.5V bandgap voltage stable if the supply voltage itself is around 2.5V (possible voltage drop, Supply Voltage Rejection Ratio)? How accurate are the internal reference voltages?
I don't understand why the first measurement is bigger than the second. If the internal reference voltage drops because the supply voltage is too low, the readings should be higher and not lower than when measuring to VDD...
0 (0 Votes)
VBAT voltage divider ratio
Answer
12/9/15 3:18 PM as a reply to Kai Clemens Liebich.
Hello Kai,

Thanks for sharing your results. I don't understand the difference between 1) and 2), but please note that what you measure is not the battery voltage, but the output of the charger chip (it's proportional though). The nominal output should be at 4.4V, according to the data sheet tolerances between 4.3V and 4.5V are possible. I'd assume that either method works; measurements in our labs gave a result of 4.4V. If you set the threshold for detecting low battery to 3.7-3.8V, I'd assume that you get a pretty good starting point for battery charge estimation.

- Mathias

 
0 (0 Votes)
VBAT voltage divider ratio
Answer
12/11/15 2:11 AM as a reply to Mathias Bruendel.
I will do it like this. Thank you. The difference between 1) and 2) is that in theory the supply voltage and the 2.5V bandgap reference voltage are the same but while the reference voltage should be stable, the supply voltage can change depending on the voltage regulator between 2.475 and 2.525V (+-1%).
0 (0 Votes)