DocID15067 Rev 3 43/49
AN2834 How to get the best ADC accuracy
48
Software change
The side effect mentioned above can be solved by software. The objective is to create a
delay in order to let C
ext
discharge through R
in
(not measure so often) giving enough
“discharge time” between ADC conversions. The “discharge time” (t
C
) is equal to the
transferred charge from C
sh
to C
ext
(charging) and from C
ext
to R
in
(discharging). The
assumption is that C
ext
>> C
sh
.
where:
U
lsb
....... 0.5 LSB voltage level
U
max
..... 4096 LSB voltage level (worst case)
Q
charging
= Q
discharging
Simplification of the above formula gives the final formula for the required waiting time
between conversions:
This final formula shows dependency between the external capacitor C
ext
and the required
waiting time between two conversions if the precision U
lsb
is needed.
From the same formula you can see that the argument in logarithm must be positive and
theref
ore there is a condition for the minimal value of C
ext
:
Choosing a larger C
ext
decreases more the time between conversions (t
C
).