cancel
Showing results for 
Search instead for 
Did you mean: 

I am using STM32L432KBU6 controller in my design. I want to Monitor battery voltage on ADC pin using Voltage divider.

HRawa
Associate II

LiPo battery ratings is 3V to 4.2V.

Any reference circuit than please share.

I want to learn exact calculation for ADC.

There are various values of RAIN mention in table 63 of datasheet.Should i use same values for Resistor Divider?

How much counts i can get on ADC to check level of Battery?

I want to learn all about ADC with reference data of STM32L4 series controller so that i can easily configure and sense battery voltage.

4 REPLIES 4
HRawa
Associate II

One more :

What can be the range of output voltage i can set at output of voltage divider.

External impedance mention in datasheet is 50kohm. How can i match same impedance at the input of ADC pin while using voltage divider?

HRawa
Associate II

Please consider all above questions or share me related post so that i can refer.

T J
Lead

nice question,

you have 2 dont's

dont go over Vcc and dont try to stuff it up.

( dont be lazy with 12V bare wires hanging around your PCBs..etc clean up your testing station.)

since the voltage is static, you can use a 0.1uF cap on the ADCpin, thereby giving you (guessing) 200ohms drive impedance...

then the Voltage divider impedance determines how fast the ADC value will become accurate.

in your case it does not matter as long as the Battery Voltage remains connected.

ie 10MOhms input resistor going to 1MOhm sense resistor will charge to 1/10th of BatVoltage but very slowly...

adjusting impedance: with new values;

10kOhms input resistor going to 1kOhm sense resistor will charge to 1/10th of BatVoltage within a few mS

the difference being that the 10MOhm will just be slower...

The Cap fixes the impedance question.

You must be lower than 3.3, so use 10k - 10k sense to halve the voltage, use the 0.1uF cap on the pin

I want to learn exact calculation for ADC.

On my board, I use the calibrate function every minute.

I check the Reference voltage and the processor temperature.

Then I calculated the incoming Vdda based on the known internal reference voltage.

When I measured the Vdda voltage directly, the calculation was within 2mV of the actual.

When you have completed those tasks, you will finished.

HRawa
Associate II

How to set internal reference voltage that can be used for ADC monitoring?