Voltage divider circuit resistors values

Thread Starter

DJ_AA

Joined Aug 6, 2021
490
Hi,

I have a simple question.

I normally use a battery gauge IC to monitor battery level, but in this case, I am restricted to using an ADC on my microcontroller.

The battery's maximum voltage is 12.6V, and my ADC reference voltage is 2.06V.

Therefore, my voltage divider will have 51.7K (47K + 4.7K) connected to VCC and 10K connected to GND.

This would give me a maximum voltage of about 2.04V.

The reason for using these resistor values is simply that my PCB already uses these values, so I am keeping my BOM variation low.

However, the question is: could these values cause any issues compared to using lower-value resistors?
 

BobTPH

Joined Jun 5, 2013
11,466
The impedance might be a bit high. Does you ADC say what impedance is required?

A capacitor across the 10K would help with that.
 

Ian0

Joined Aug 7, 2020
13,098
Your ADC will have a input capacitance, usually a few pF, the value will be in the datasheet. Therefore there will be a time constant τ which is the time taken to charge the input capacitance. The resistance in the time constant is the parallel combination of your two divider resistors (even though they appear to be in series).
If your ADC has multiple inputs, then you need to wait at least x*τ after you select the input before you start the conversion process, otherwise the capacitor won't have charged and it will have the wrong voltage on it.
The value of x depends on the number of bits of your converter. For an 8 bit converter it has to settle to within 255/256, for a 12 bit converter 4095/4096.
[edit] as @BobTPH said just as I was typing, a capacitor across the lower resistor lowers the impedance and the input capacitor charges more quickly because it can charge from the capacitor. The capacitor can be quite large, as the battery voltage is unlikely to change quickly.
 

crutschow

Joined Mar 14, 2008
38,331
If your ADC has multiple inputs, then you need to wait at least x*τ after you select the input before you start the conversion process, otherwise the capacitor won't have charged and it will have the wrong voltage on it.
But if the battery is hard-wired to the input, then wouldn't the input capacitance be already be charged when the input is selected for the A/D conversion?
Or does selecting the input change the input capacitance?
 

AnalogKid

Joined Aug 1, 2013
12,055
The Thevenin equivalent source impedance of your divider is 8.4K. This appears as a series resistor between the battery and the A/D input. How does this compare to the input impedance of the A/D? Some capacitive A/D's have a fairly low input impedance, especially to changing voltages.

With an input impedance of 1 M, the A/D will see an input voltage that is 99.17% of the actual value. This is an error of 0.8%, or 1 part in 120. Depending on your application, this may or may not matter. After all, this is approx equal to the error introduced by the 1% resistor values. Comparing this error to the quantizing error of the A/D converter, an 8 bit A/D comes in at 0.4%, 10 bit = 0.1%, and 12 bit = 0.024%. IOW, the attenuator impedance is costing you bits of resolution. The good news is that it is a constant error and can be corrected in software. Of course, a higher A/D input impedance reduces this effect.

ak
 
Last edited:

Thread Starter

DJ_AA

Joined Aug 6, 2021
490
Yes, I will be running this on 12-bit mode. I will then represent the voltage as a percentage; I need to make a simple gauge.
 

Ian0

Joined Aug 7, 2020
13,098
But if the battery is hard-wired to the input, then wouldn't the input capacitance be already be charged when the input is selected for the A/D conversion?
Or does selecting the input change the input capacitance?
Most processors I've come across have a single A/D preceded by an analogue multiplexer. The capacitor in question is the sample and hold capacitor for the A/D so it has to be charged or discharged every time the multiplexer changes to another channel.
There may be higher spec processors that have a complete A/D for every input - but they would be beyond my budget!
 
Top