AN420
Application note
Expanding A/D resolution of the ST6 A/D converter
1
Introduction
Occasionally the analog signal provided by external sensors require an Analog to Digital
conversion with a resolution of greater than 8 bits. In order to extract the full information for
subsequent data processing within the microcontroller a higher resolution Analog to Digital
is thus required.
The solution described in this note enables this higher resolution with the on-chip 8-bit A/D
converter of the ST62, using only an additional Operational Amplifier (OpAmp) and a few
resistors
November 2011
Doc ID 2078 Rev 2
1/15
www.st.com
Contents
AN420
Contents
1
2
3
4
5
6
Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
Principle of operation of an algebraic adder . . . . . . . . . . . . . . . . . . . . . 5
Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
Application example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
Revision history . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
2/15
Doc ID 2078 Rev 2
AN420
List of figures
List of figures
Figure 1.
Figure 2.
Figure 3.
Figure 4.
Example circuit . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
Generic algebraic adder . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
Conversion routine . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
Example circuit . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
Doc ID 2078 Rev 2
3/15
Overview
AN420
2
Overview
The technique implemented is that of the Algebraic Adder, a full discussion of the principle
of operation is included in this note.
A practical example of the external components used is shown in the following figure:
Figure 1.
Example circuit
PC4
PC5
PC6
OUTPUTS
ST6215
PB0 (A/D Input)
Vin
The resistances are selected by the ST62 I/O pins depending on the analog input voltage.
The selection programmed modifies the output voltage of the OpAmp in such a way that the
following A/D conversion is always made with the maximum input range of the converter.
This selection is made by software, therefore the total conversion time is increased versus a
normal 8-Bit conversion, however the precision is increased and the input voltage range can
be enlarged.
4/15
Doc ID 2078 Rev 2
AN420
Principle of operation of an algebraic adder
3
Principle of operation of an algebraic adder
Figure 2
represents the generic algebraic adder.
Figure 2.
Generic algebraic adder
VNn
RNn
VN2
VN1
RN2
RN1
Rr
Vn
RN0
+
Vo
Vp
RP0
VP1
VP2
RP1
RP2
-
VPm
RPm
The circuit generates an output voltage equal to:
i
(1)
m
n
i
j
V
0
=
∑
K
i
×
V
P
–
∑
K
i
×
V
N
i
=
1
i
=
1
To minimize the effects of the input polarizing currents, the total resistances seen from the
two inputs of the OpAmp should be the same. Therefore:
(2)
n
m
1
-
1
-
----- + -------- +
R
r
R
N
0
∑
j
=
1
1
-
1
-
------- = -------- +
R
N
j
R
P
0
∑
i
=
1
1
-
1
-
------- = ------
R
P
i
R
T
The two resistances RP0 and RN0 are needed to satisfy the above relation. In general, only
one of them will be needed.
Doc ID 2078 Rev 2
5/15