# How to calculate measurement error in a voltage divider?

I'm trying to calculate the measurement uncertainty of the voltage represented by the ADC in +/- V or % of a voltage measured across R2 of a voltage divider.

What would be the general way to tackle this problem? I found a video of someone calculating measurement uncertainty of a voltage divider using partial derivatives.

The formula used is shown below.

Would the quantization error of the ADC be added to the voltage uncertainty I calculate using the partial derivative method?

Q.E of ADC = LSB / 2 => (3.3V / 256) / 2 = 6,45 mV so is this the uncertainty I add to the uncertainty in voltage V2 to get a total uncertainty?

• Partial derivatives? Sounds like a whole lot of faff to me. Jan 3, 2021 at 13:09

You can calculate the error using partial derivatives, if you write the formula Vout=f(Vref,R1,R2) and calculate its partial derivatives. This would give you error with regard to:

• Voltage error
• R1 resistor error
• R2 resistor error

The ADC quantization can't be evaluated in this calculation, however it can be added latter, for example:

E =+2% / -0.5% +/- 2LSB

• How do you mean the error would be added? If my total error is +/- 2 % for example, then i would simply add the % error of ADC LSB/2 of Vref? (6,45mV/3,3V)*100 and add this percentage? Jan 3, 2021 at 15:56
• why 2LSB should the ADC Q.E. be LSB/2 Marko? Jan 3, 2021 at 17:45

I performed many worst case analyses in my career and never once did I perform a partial derivative.

For the first pass, you assume that every part can be at the worst value. The old fashioned way is to make a big spreadsheet with columns for all the tolerance contributions. Note that you need to look at the datasheet in detail, you will probably find that a 1% can vary more than 1% if all factors are included.

You write an equation for the output and calculate the value for two conditions. One where the tolerances cause the output to be maximum, and another where the tolerances cause the output to be minimum. If you have more than a handful of parts in the equation, it can be difficult to determine if a part with a positive tolerance will cause the output to be higher or lower.

If the first method doesn't pass, you try another, to assume that all parts can be worst case at the same time is unrealistic. RSS or Monte Carlo are two of the alternate methods. Google them if you are interested.

Don't confuse the resolution of the ADC with its accuracy. The quantization error is the error due to the limited resolution of the ADC, but the actual inaccuracy of the ADC is probably much higher. Only the datasheet can give you the answer to that.

You should also consider the stability and accuracy of the voltage reference used by the ADC. In low-cost microcontrollers the reference voltage may be just the supply voltage, which brings a lot of variation to the measurements.

If this is a one-off project you may be able to calibrate the system to account for many of these errors. If it is intended for mass production you have more calculations ahead of you.