ADC errors AN2834
10/49 DocID15067 Rev 3
2 ADC errors
This section lists the main errors that have an effect on A/D conversion accuracy. These
types of errors occur in all A/D converters and conversion quality depends on their
elimination. These error values are specified in the ADC characteristics section of the
STM32 microcontroller datasheets.
Different accuracy error types are specified fo
r the STM32 ADC. For easy reference,
accuracy errors are expressed as multiples of 1 LSB. The resolution in terms of voltage
depe
nds on the reference voltage. The error in terms of voltage is calculated by multiplying
the number of LSBs by the voltage corresponding to 1 LSB (1 LSB = V
REF+
/2
12
or
V
DDA
/2
12
).
2.1 Errors due to the ADC itself
2.1.1 Offset error
The offset error is the deviation between the first actual transition and the first ideal
transition. The first transition occurs when the digital ADC output changes from 0 to 1.
Ideally, when the analog input ranges between 0.5 LSB and 1.5 LSB, the digital output
should be 1. St
ill ideally, the first transition occurs at 0.5 LSB. The offset error is denoted by
E
O
. The offset error can easily be calibrated by the application firmware.
Example
For the STM32 ADC, the smallest detectable incremental change in voltage is expressed in
terms of LSBs:
1 LSB = V
REF+
/4096 (on some packages, V
REF+
= V
DDA
).
If V
REF+
= 3.3 V, the input of 402.8 µV (0.5 LSB = 0.5 × 805.6 µV) should ideally lead to the
generation of a digital output of 1. In practice, however, the ADC may still provide a reading
of 0. If a digital output of 1 is obtained from an analog input of 550 µV, then:
O
ffset error = Actual transition – Ideal transition
E
O
= 550 µV – 402.8 µV = 141.2 µV
E
O
= 141.2 µV / 805.6 µV = 0.17 LSB
When an analog input voltage greater than 0.5 LSB generates the first transition, the offset
er
ror is positive (refer to Figure 7 for an example of positive offset error).