Reference Voltage / Power-Supply Regulation; Analog-Input Signal Noise Elimination - ST STM32 Application Note

How to get the best adc accuracy in microcontrollers
Hide thumbs Also See for STM32:
Table of Contents

Advertisement

How to get the best ADC accuracy
3.2.2

Reference voltage / Power-supply regulation

The power supply should have good line and load regulation since the ADC uses V
V
as the analog reference and the digital value is the ratio of the analog input signal to
DDA
this voltage reference. V
Whenever the load is increased by switching on a part of the circuit, the increase in current
must not cause the voltage to decrease. If the voltage remains stable over a wide current
range, the power supply has good load regulation.
For example, for the LD1086D2M33 voltage regulator, the line regulation is 0.035% typical
when V
IN
when I
load
The lower the line regulation value, the better the regulation. Similarly, the lower the load
regulation value, the better the regulation and the stability of the voltage output.
It is also possible to use a reference voltage for V
voltage reference diode of 2.5 V (refer to LM236 datasheet for more details).
3.2.3

Analog-input signal noise elimination

Averaging method
Averaging is a simple technique where you sample an analog input several times and take
the average of the results by software. This technique is helpful to eliminate the effect of
noise on the analog input in case of an analog voltage that does not change often.
The average has to be made on several readings that all correspond to the same analog
input voltage. Make sure that the analog input remains at the same voltage during the time
period when the conversions are done, otherwise you will add up digital values
corresponding to different analog inputs, and you will introduce errors.
In the STM32L0 and STM32L4 microcontrollers, the ADC hardware oversampling feature
can be used for averaging. This feature simply performs the sum of a given number of ADC
raw samples into one final sample. This final sample can then be right shifted to reduce the
bit width caused by multiple ADC samples accumulation. All these operations (accumulation
and right-bit shifting) are performed by hardware. The STM32L0 and STM32L4
microcontrollers support hardware oversampling up to 256 input samples.
Adding an external filter
Adding an external RC filter eliminates the high frequency. An expensive filter is not needed
to deal with a signal that has frequency components above the frequency range of interest.
In this case, a relatively simple low-pass filter with a cutoff frequency f
frequency range of interest will suffice to limit noise and aliasing. A sampling rate consistent
with the highest frequency of interest will suffice, typically two to five times f
Note:
The R and C that form the external filter should have values that match the conditions
described in
24/49
must thus remain stable at different loads.
REF+
varies from 2.8 V to 16.5 V (when I
varies from 0 to 1.5 A (please refer to the LD1086 series datasheet for details).
Section 3.2.4
and
Section
DocID15067 Rev 3
= 10 mA), and the load regulation is 0.2%
load
, for instance the LM236, which is a
REF+
3.2.7.
AN2834
or
REF+
just above the
C
.
C

Hide quick links:

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the STM32 and is the answer not in the manual?

Questions and answers

Table of Contents