cancel
Showing results for 
Search instead for 
Did you mean: 

ADC Measurements of VDD

ramil
Associate

Dear Community, 

I started investigating issues on one old project that based on STML071xB and has been implemented by another engineer. I got confused with implementation of battery measurements. Here is the thing: 

1. MCU is directly supplied by a battery (working voltage is expected to be in 2-3V range)

2. VREF+ is connected to a battery 

3. ADC internal channel is used to measure VDD level 

Datasheet says that VDD can be measured accurately using internal ADC channel when VREF+ is not connected. Meaning, an internal reference voltage which is 3.0V (bandgap) is used as a reference to measure VDD. But what if VREF+ is connected to a battery voltage, how VDD is supposed to be measured in this case? 

From my understanding, VDD cannot be measured when VREF+ is used as a reference since it will be giving nearly maximal raw values on ADC output. 

What is the most confusing part is when I use external supply to power the device and change output voltage I see accurate measurements of the batter. How is it possible? But on the field we have many devices that are showing suspicious battery readings. 

Please advise what I'm wrong with.

Thank you!

2 REPLIES 2

Please show the schematic of this arrangement:

https://community.st.com/t5/community-guidelines/how-to-write-your-question-to-maximize-your-chances-to-find-a/ta-p/575228


@ramil wrote:

1. MCU is directly supplied by a battery (working voltage is expected to be in 2-3V range)

2. VREF+ is connected to a battery 


Are these the same battery, or two separate batteries?


AScha.3
Chief III

Hi,

just at first think a little bit: how could any ADC measure its own Vref ? It always will be 100% (adc-value).

So only way is to measure a fixed, known reference and ( by doing 3rd class mathematics ) calculate the ADC-Vref (or VDD, because same here) .

So what you found, is the standard way to get the VDD (or Vref) by measuring a known reference and then calculating the actual VDD from this, ( if there is no (working) fixed Vref+ , thats coming from a reference voltage and thus allows measuring the VDD from a voltage divider (from VDD) and using the ADC with fixed Vref ).

If you feel a post has answered your question, please click "Accept as Solution".