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
AN420
Application note
November 2011 Doc ID 2078 Rev 2 1/15
www.st.com
Contents AN420
Contents
1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
2 Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
3 Principle of operation of an algebraic adder . . . . . . . . . . . . . . . . . . . . . 5
4 Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
5 Application example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
6 Revision history . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
2/15 Doc ID 2078 Rev 2
AN420 List of figures
List of figures
Figure 1. Example circuit . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
Figure 2. Generic algebraic adder . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
Figure 3. Conversion routine . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
Figure 4. Example circuit . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
Doc ID 2078 Rev 2 3/15
Overview AN420
PC4
PC5
PC6
ST6215
PB0 (A/D Input)
Vin
OUTPUTS
-36
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
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
VNn
RNn
RrRN2
VN2
VN1
RN1
RN0
Vn
Vo
+
-
Vp
RP1
RP2
VP2
VP1
VPm
RPm
RP0
-36
V
0
K
i
i1=
m
∑
V
P
i
K
i
i1=
n
∑
V
N
j
×–×=
1
R
r
----- -
1
R
N
0
---------
1
R
N
j
--------
j1=
n
∑
++
1
R
P
0
---------
1
R
P
i
--------
i1=
m
∑
+
1
R
T
-------==
3 Principle of operation of an algebraic adder
Figure 2 represents the generic algebraic adder.
Figure 2. Generic algebraic adder
The circuit generates an output voltage equal to: i
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:
The two resistances RP0 and RN0 are needed to satisfy the above relation. In general, only
one of them will be needed.
(1)
(2)
Doc ID 2078 Rev 2 5/15