English
Language : 

AN929 Datasheet, PDF (3/22 Pages) Microchip Technology – Temperature Measurement Circuits for Embedded Applications
Ramp Rate Method
The resistor-capacitor (RC) ramp rate method shown in
Figure 5 provides a simple solution for resistive
sensors, such as thermistors. This method provides a
low-cost solution with an accuracy of approximately
±1%. When voltage is applied to a RC combination, the
capacitor’s voltage will increase exponentially and the
ramping time can be measured with a comparator. The
accuracy of the RC timing method can be improved by
comparing the ramp rates of a sensor resistor (RSensor)
and a known resistance (RREF) to reduce the effects of
temperature and component tolerance.
AN929
The RC timing method can be implemented using the
circuitry inside a microcontroller. The timing measure-
ment begins by configuring the GP1 pin as a logic ‘1’
output and GP2 as an input. This connects RSENSOR to
a logic-high voltage (VOH ≅ VDD), while RREF is discon-
nected from the circuit via the high impedance of an
input pin. The I/O pin AN0 is configured as an input and
connects the capacitor to a comparator inside the
microcontroller. The time required for the capacitor
voltage to ramp-up to the reference voltage of the
comparator (VTH ≅ VREF) can be determined through
either a hardware or software timer. Once the measure-
ment is completed, the GP1 pin is toggled to a logic ‘0’
output to discharge the capacitor. The configuration
procedure of GP1 and GP2 is then reversed in order to
measure RREF .
Voltage (V)
VTH
RREF
RSensor
RREF
GP2
RSensor
GP1
Output
Input
Output
Input
t=0
t = t1
t = t2
Time (t)
AN0
VREF Comparator
C
PIC16C5X
Vc(t)
=

VD D  1
–
e R--–---Ct--

t
=
–RC
In


1
–
V-V---D-T---DH---
RSensor
=


-t--2-
t1


RR
EF
FIGURE 5:
Ramp Rate Method.
Duty Cycle Output
Silicon IC sensors that provide an output proportional
to the duty cycle of a digital signal are available, as
shown in Figure 6. These sensors typically have a
constant “on” time (t1) and a variable “off” time (t2).
However, it is often necessary to calculate the t1-to-t2
ratio in order to achieve the specified sensor accuracy.
It is possible to have a duty cycle output with a thermo-
couple, RTD or thermistor. However, the circuit is
relatively complex when compared to other signal
conditioning options.
t1
t2
Temp. ∝ t1 / t2
FIGURE 6:
Duty Cycle Output.
 2004 Microchip Technology Inc.
DS00929A-page 3