English
Language : 

AN897 Datasheet, PDF (5/16 Pages) Microchip Technology – Thermistor Temperature Sensing with MCP6SX2 PGAs
5.0
4.5
4.0
G = +1
G = +8 G = +32
3.5
3.0
2.5
2.0
1.5
1.0 Design # 2
0.5 RA = 28.0 k:
0.0
Hysteresis
-50 -25 0 25 50 75 100 125 150
Thermistor Temperature (°C)
FIGURE 12:
PGA Output Voltage.
The gain change points were chosen to make the
ADC’s resolution as good as possible (see Figure 13)
at a reasonable cost. The number of gains was kept
low to minimize the piece-wise linear interpolation
table’s size in firmware.
The maximum voltage allowed in each range is 300 mV
from VDD. This keeps the PGA in its specified output
range and allows some headroom for noise. The
minimum voltage allowed is well above 300 mV from
ground, which keeps the PGA in its most linear region
of operation.
Random noise can make the PGA’s gain change
frequently. Adding hysteresis to the gain-selection
algorithm (in firmware) reduces this problem. The
hysteresis needs to be large enough to compensate for
the PGA’s maximum gain error (±1%).
Figure 12 and Table 2 show a hysteresis of 1.7°C and
2.0°C at the lower temperature and higher temperature
transistions, respectively. The gain-change points are
separated by 6% of VDIV, which is six times larger than
the PGA’s maximum gain error; this ensures proper
functioning of the gain-change algorithm. The
thermistor self-heating error has been corrected in
Table 2.
TABLE 2:
PGA GAIN-CHANGE POINTS
WITH HYSTERESIS.
Gain
(V/V)
Gain
Change
(V/V)
ADC Code
(LSb)
VDIV TTH
(V) (°C)
1
1→8
8
8→1
8 → 32
32 32 → 8
< 113
> 960
< 226
> 960
0.552 50.9
0.586 49.2
0.138 94.6
0.146 92.6
 2004 Microchip Technology Inc.
AN897
Analog Error Analysis
Figure 13 displays the ADC’s temperature resolution
and Figure 14 shows the expected worst-case analog
circuit errors. Both plots are based on these
assumptions:
• ADC’s DC Error ≤ ±3.5 LSb
• PGA’s gain error ≤ ±1% (±0.1% at G = +1)
• PGA’s input offset error ≤ ±1 mV (including PSRR
and temperature drift)
• Specified thermistor accuracy
This design achieves an ADC temperature resolution of
0.27°C over the -40°C to +150°C temperature range.
The analog circuit accuracy is better than 3.0°C over
the same range. Other temperature ranges will have
different resolutions and accuracies.
0.00
Design # 2
-0.05 RA = 28.0 kΩ
-0.10
-0.15
-0.20
-0.25
-0.30
-50
10-bit ADC
DC Error ≤ 3.5 LSb
-25 0 25 50 75 100 125 150
Thermistor Temperature (°C)
FIGURE 13:
Resolution.
ADC’s Temperature
2.0
1.8 Design # 2
1.6 RA = 28.0 k:
1.4
1.2
1.0
0.8
0.6
0.4
0.2
0.0
-50 -25 0
PGA Error
ADC Error
RA Error
25 50 75
100 125 150
Thermistor Temperature (°C)
FIGURE 14:
Analog Circuit Errors.
Digital Design
The PIC16F684 microcontroller (Appendix A.2.5
“Signal Analysis PICtail Daughter Board”) handles
several important tasks. It communicates with the PGA
to set its gain and input channel, can provide averaging
to reduce the noise and converts the result into the tem-
perature at the thermistor using a piece-wise linear
interpolation table. The microcontroller can have either
a SPI port built in or the SPI interface can be
implemented in software on the microcontroller [7].
DS00897B-page 5