MICROCHIP AN929

AN929
Temperature Measurement Circuits for
Embedded Applications
Author:
Jim Lepkowski
Microchip Technology Inc.
INTRODUCTION
This application note shows how to select a temperature sensor and conditioning circuit to maximize the
measurement accuracy and simplify the interface to the
microcontroller. Practical circuits and interface
techniques will be provided for embedded applications
with thermocouples, Resistive Temperature Detectors
(RTDs), thermistors and silicon integrated circuit
temperature sensors. The attributes of each temperature sensor and the advantages of analog, frequency,
ramp rate, duty cycle, serial and logic output solutions
will be discussed. An analog output thermocouple
circuit will be compared with a frequency output RTD
oscillator circuit, along with design examples using
serial and analog output silicon Integrated Circuit (IC)
sensors. In addition, a Programmable Gain Amplifier
(PGA) circuit will be shown that can increase the
effectiveness of the Analog-to-Digital Converter (ADC)
bit resolution of a non-linear thermistor sensor.
DEFINITIONS
The following terms are used in this application note:
• Accuracy is the difference between the true and
measured temperature
• Common Mode Rejection Ratio (CMRR) is
defined as the ability of the amplifier to reject a
signal which is common to both inputs
• Input Offset Voltage (VOS) is the voltage that must
be applied to an amplifier to produce a zero volt
output
Temperature
Sensor
EMI / ESD
Filter*
Amplifier
• Local sensors are located on the same PCB as
the microcontroller
• Precision is the ability to measure a small
temperature gradient and determines the
interchangeability of the sensor
• Remote sensors are located at a distance from
the microcontroller’s PCB
• Repeatability is the sensor’s ability to reproduce
previously measured values
• Stability is defined as the long-term drift of the
sensor over a period of time
SENSOR-TO-MICROCONTROLLER
INTERFACE OPTIONS
The sensor interface option is selected by evaluating
the complexity of the sensor circuitry, in addition to the
required hardware and software trade-offs of the microcontroller. The available sensor interface options that
are proportional to temperature include:
•
•
•
•
•
•
Analog
Frequency
Ramp Rate
Duty Cycle
Serial Output
Logic Output
Analog Output
Thermocouples, RTDs and thermistors can be interfaced to an amplifier circuit to provide a voltage which
is proportional to temperature. Analog output silicon
sensors are available that integrate the sensor and the
signal conditioning circuit. Figure 1 shows a block
diagram of a typical analog interface circuit.
AntiAliasing
Filter
ADC
PICmicro®
MCU
*Required only for remote sensors
FIGURE 1:
Block Diagram of an Analog Output Sensor.
 2004 Microchip Technology Inc.
DS00929A-page 1
AN929
Frequency Output
Oscillators provide a frequency output proportional to
temperature that can be interfaced to a microcontroller,
as shown in Figure 2. While a Resistor-Capacitor (RC)
operational amplifier (op amp) oscillator can accurately
measure the resistance of an RTD, this circuit is
typically not used with a thermistor because of the large
logarithmic change in the sensor’s resistance over
temperature. The main advantage of a frequency
output is that an ADC is not required. A frequency
output is also useful in applications where the sensor
conditioning circuitry is combined with a remote sensor.
A logic-level output signal is less sensitive to noise than
an analog output signal that transmits information to
the microcontroller.
Clock
RTD
RC op amp
Oscillator
PICmicro®
Microcontroller
FIGURE 2:
Block Diagram of a
Frequency Output Sensor.
The accuracy of the frequency measurement is directly
related to the quality of the microcontroller’s clock
signal. Precision high-frequency microcontroller clock
oscillators are readily available. However, they are
relatively expensive. The two options available to
measure frequency are the fixed time or fixed cycle
methods. The microcontroller resources required for
determining frequency varies depending upon the
processor bandwidth, available peripherals and
desired measurement accuracy.
FIXED TIME METHOD
The fixed time method, shown in Figure 3, consists of
counting the number of pulses within a specific time
window, such as 100 ms. The frequency is then calculated by multiplying the count by the integer required to
correlate the number of pulses in one second. This
measurement approach inherently minimizes the effect
of error sources (such as jitter) by averaging many
oscillator pulses in the time window. The fixed time
method utilizes a firmware delay or hardware delay
routine. The firmware can poll for input edges, though
this consumes processor bandwidth. A more common
implementation uses a hardware timer/counter to count
the input cycles during a firmware delay. If a second
timer is available, the delay can be generated using this
timer, thus requiring minimal processor bandwidth.
DS00929A-page 2
Algorithm:
Count the number of clock pulses in a time window.
Oscillator
Signal
Time Window
Example: Measure the number of oscillation pulses in a
100 msec. window and multiply by 10 to
determine the frequency.
FIGURE 3:
Time Method.
Frequency Output - Fixed
FIXED CYCLE METHOD
In the fixed cycle method, shown in Figure 4, the
number of cycles measured is fixed and the
measurement time is variable. This approach
measures the elapsed time for a fixed number of
cycles. The number of cycles is chosen by the designer
based on the desired accuracy, input frequency,
measurement rate and the microcontroller clock
frequency (FOSC). FOSC determines the minimum time
an edge can be resolved. The measurement error will
then be proportional to the total amount of time versus
FOSC. Increasing the number of cycles measured will
increase the measurement time and reduce the error.
Increasing FOSC will also decrease the minimum time
to resolve an edge, thereby reducing the error.
Algorithm:
Determine the time between a fixed number of oscillation
pulses.
Oscillator
Signal
Time
Example: Measure time between four rising edges of the
oscillation signal.
FIGURE 4:
Cycle Method.
Frequency Output - Fixed
The fixed cycle method can utilize firmware to both
measure time and poll the input edges. This, however,
is processor-intensive and has accuracy limitations.
For example, a more common implementation is to utilize the Capture/Compare/PWM (CCP) module of a
PICmicro® microcontroller configured in the Capture
mode. This approach uses the 16-bit timer TMR1
peripheral and has excellent accuracy and range.
 2004 Microchip Technology Inc.
AN929
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.
The RC timing method can be implemented using the
circuitry inside a microcontroller. The timing measurement 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 disconnected 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 measurement 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)
RREF
Output
Input
GP1
Output
Input
RSensor
RREF
RSensor
VTH
GP2
AN0
Time (t)
t=0
t = t1
VREF
t = t2
Comparator
C
PIC16C5X
–t
--------

RC
V c ( t ) = VDD  1 – e 


FIGURE 5:
V TH
t = – RC In  1 – -----------

V DD 
t2
RSensor =  ----- R REF
 t1 
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 thermocouple, RTD or thermistor. However, the circuit is
relatively complex when compared to other signal
conditioning options.
 2004 Microchip Technology Inc.
t1
t2
Temp. ∝ t1 / t2
FIGURE 6:
Duty Cycle Output.
DS00929A-page 3
AN929
Serial Output
Figure 7 provides an example of the timing diagram of
the SPI serial output of the TC77 silicon IC sensor
where the temperature data is represented by a 13-bit
two’s complement digital word. The SPI serial interface
consists of the Chip Select (CS), Serial Clock (SCK)
and bidirectional Serial Data (SI/O) signals. Communication with the TC77 is initiated when the CS goes to a
logic ‘0’ and the SI/O then transmits the first bit of data.
The Least Significant Bit (LSB) is equal to 0.0625°C.
The SCK input is provided by the microcontroller and
data is transferred on the rising edge of SCK. Once 13
bits of data have been transmitted, the SI/O line is then
tri-stated.
Serial output sensors measure temperature and
communicate with the processor via a standard serial
data protocol, such as the SPI™, I2C™ or SMBus
protocols. Silicon IC sensors are available that
integrate the temperature sensor, ADC and temperature detection logic on a single chip. Thermocouple and
RTD ASICs are available that have an amplifier, ADC
and linearization logic integrated into a single IC. Serial
output sensors offer the advantage of reducing the
system component count, as well as using digital logic
to provide a linear output.
CS
CLK
1
SI/O
FIGURE 7:
HI-Z
Sign 27
8
26
25
24
23
22
21
13
20 2-1 2-2 2-3 2-4
HI-Z
TC77 SPI Serial Output Silicon IC Sensor.
Logic Output Sensors
Logic output sensors are sometimes referred to as
temperature switches because they typically function
as a thermostat to notify the system that a maximum or
minimum temperature limit has been detected.
Figure 8 shows an example of a thermistor and silicon
logic output sensor.
The features of logic output sensors include:
Logic level output sensors are similar to analog output
sensors, except that the output amplifier of the sensor
is a comparator. The comparator circuit sets the switch
point of the sensor through either internal or external
resistors. The output is typically not latched and, thus,
the switch will turn-off when the temperature falls below
the temperature set point. Note that it is necessary to
have hysteresis so the switch does not “chatter” when
crossing the temperature setpoint.
• Logic level output
• Output indicates that the temperature is above (or
below) a preset value
• Available in both push-pull and open-drain
configurations
• Output signal can be either active-low or high
• Either factory or user-programmable temperature
settings
DS00929A-page 4
 2004 Microchip Technology Inc.
AN929
Thermistor Logic Output Sensor
Silicon Logic Output Sensor
VDD
VDD Non-Inverting Comparator
R3
RS
VDD
R1
VIN
VOUT
VDD
R2
RT
R4
Thermistor
VREF
Fan
RSET
MCP6541
Assume: VOH = VDD, VOL = 0 and R3 >> R1
VREF = VDD x (R4 / (R2 + R4))
VTL ≅ [(R1 + R3)VREF - (R1 x VDD)) / R3]
VTH ≅ [((R1 + R3)VREF) / R3]
VHYS = VTH - VTL
≅ [(R1 / R3) x VDD]
TSET
OUT
NC
OUT
GND
TC622
RTRIP = 0.5997 x T2.132
RTRIP = Programming Resistor Value (Ω)
T = Set point Temperature (°C)
Set point Temp.
Hysteresis Temp.
VOUT
VOH
Output Voltage
Fan
VOL
VTL
FIGURE 8:
VTH
Off
On
Off
VIN
Logic Output Sensors.
Most logic output sensors are available in either a hot
or cold option, as shown in Figure 9. The hot and cold
options are used to allow the flexibility of using the
switch in either hot (temperature increasing) or cold
(temperature decreasing) sensing applications. The
hot and cold options ensure that the hysteresis is in the
appropriate position, either below or above the
temperature set point.
Hot Option
TSET > THYS
“ON” if temperature > TSET
“OFF” if temperature < THYS
Voltage
For example, assume that the temperature switch is
being used to turn on a cooling fan. The setpoint is
75°C and the hysteresis is 10°C. A sensor with the hot
option will switch to the active logic level at 75°C. The
sensor will remain in the on condition and the fan will
run until the temperature drops to 65°C, or 10°C below
the temperature setpoint.
OUT
In contrast, assume that a cold option switch is used in
an application that requires a heater to turn on to prevent freezing. Assume that the temperature set point is
0°C and the hysteresis is 10°C. The cold option sensor
will switch to the active logic level at 0°C and turn on the
heater. The sensor will remain in the on condition until
the temperature increases to 10°C, or 10°C above the
temperature set point.
TSET < THYS
Temperature
“Cold”
THYS
TSET
“Hot”
Cold Option
“ON” if temperature < TSET
“OFF” if temperature > THYS
Voltage
OUT
Temperature
“Cold”
TSET THYS
“Hot”
FIGURE 9:
Logic Output Sensors - Hot
and Cold Options.
 2004 Microchip Technology Inc.
DS00929A-page 5
AN929
SYSTEM INTEGRATION ISSUES
Local versus Remote Sensing
The location of the sensor relative to the conditioning
circuit, as shown in Figure 10, plays a key role in
selecting the appropriate interface and noise reduction
circuit. Local sensors are located relatively close to
their signal conditioning circuits. Therefore, the noise
environment usually is not as severe as remote
sensors. In contrast, remote sensors are connected to
the amplifier via long wires that often introduce noise
into the electronics. A non-inverting amplifier circuit is a
good choice for a local sensor, while a remote sensor
requires a differential measurement in order to cancel
noise. All sensors should be considered as remote sensors in high-noise environments or precision
applications to take advantage of the high CMRR and
noise reduction of a differential amplifier.
Local
Sensing
Amplifier
Sensor
PCB
Remote Sensing
Sensor
Amplifier
PCB
FIGURE 10:
Sensing.
DS00929A-page 6
Local versus Remote
Noise Reduction Techniques
Accurate temperature measurements require careful
attention to noise reduction techniques. The high
CMRR of the differential amplifier reduces noise.
However, grounding, shielded cables and Electromagnetic Interference/Electro-Static Discharge (EMI/ESD)
filters are also required to prevent noise from degrading
the accuracy of the measurement.
Grounding
Figure 11 shows four basic methods of grounding a
sensor. A grounded source has its negative terminal
connected to ground at the sensor, often by virtue of
the mechanical mounting of the sensor. In contrast, a
floating source connects the sensor’s negative terminal
to ground at the amplifier.
The preferred grounding configuration for a remote
sensor is shown in circuits B and D. These circuits
provide for a two-wire differential measurement that
can be implemented with either a differential or
instrumentation amplifier. A differential measurement
requires that the common mode voltage level of the
signal source does not exceed the amplifier’s
maximum input voltage specification. As shown in
circuit D, adding bias resistors to reference the input
signal to a known voltage can solve this problem and
the resistors will not affect the measurement, if they are
relatively large.
The grounding methods of circuits A and C provide a
single-ended input measurement that should only be
used with a local sensor. The separate sensor and
amplifier grounds of circuit A can produce an offset
voltage due to the difference in the voltage potentials of
the two grounds. In local sensor applications, the
magnitude of ∆VGND is small and either an inverting or
non-inverting op amp can be used. The configuration of
circuit C should be used with caution in low signal
output sensors such as thermocouples. Noise can be
induced into the measurement via the thermocouple
wires and the magnitude of the sensor voltage will be
affected by ground bounce or switching noise at the
amplifier’s ground.
 2004 Microchip Technology Inc.
AN929
VS
+
VMEAS = VS +∆VGND
VS
-
+
VMEAS = VS
-
∆VGND
C. Floating Source/Common Ground
- Use Only with Local Sensors
A. Grounded Source - Ground Loop
VS
+
VS
VMEAS = VS
-
VMEAS = VS
-
D. Floating Source - Preferred Connection
B. Grounded Source - Preferred Connection
FIGURE 11:
+
Accurate Measurements Require Careful Grounding.
Shielded Cables
A shielded cable is an effective tool to prevent radiated
interference from introducing a noise voltage on the
signal wires. Shielded twisted-pair cables reduce the
loop area of the victim signal and minimize the voltage
induced on the sensor signal lines. The noise signals
on each wire in the cable will be essentially equal,
which is the assumption needed for the high CMRR
feature of a differential amplifier to cancel the
interference. For most applications, it is recommended
that the shield be connected to ground only at one
point. In applications using a metal enclosure, the
shield’s connection to chassis ground can occur
through the mechanical connection of the cable
connector to the box. Figure 12 provides an example of
a remote RTD measurement using a shielded cable.
VREF
Connector
EMI Filter
RTD
EMI Filter
Shielded
Cable
PCB
FIGURE 12:
Use Shielded Cables and EMI Filters for Remote Measurements.
 2004 Microchip Technology Inc.
DS00929A-page 7
AN929
EMI/ESD Protection
EMI and ESD filters function as both a noise filter and
a protective device to the circuit on the PCB. An IC
input pin should never be connected directly to a
remote sensor because EMI or ESD overvoltage
failures will likely occur. Ferrite beads, capacitive feedthrough filters, RC filters and transient-voltage-suppressor (TVS) zener diodes are popular devices that
can be used to provide protection for the sensor circuit.
Ferrite beads, capacitive feed-through filters and RC
filters function as filters and only limit the slew rate of a
transient-input voltage. A voltage-clamping device
(such as a TVS zener diode) is required to limit the
input voltage to a safe value that will not damage the IC
amplifier. Though a TVS device is similar to a standard
zener diode, they are designed to turn on fast and
dissipate a short duration, high-peak energy voltage
transient. In contrast, a zener diode is designed to
clamp a steady-state voltage for a long duration.
In many applications, a combination of different EMI/
ESD filter devices are often used. One option is to use
a capacitive feed-through filter that is located inside the
connector, in addition to TVS and RC filters which are
placed on the PCB board, as shown in Figure 13.
Feed-through capacitors are typically mounted on a
conductive chassis, with the mechanical mounting
forming the ground connection. The noise signal is
filtered at the connector before the signal reaches the
PCB. The effectiveness of the filter is usually very good
because the inductance associated with the ground
connection is minimized. The TVS diodes on the PCB
ensure that the transient voltage is limited to a safe
value, while the RC filters provide additional filtering to
the instrumentation amplifier.
Ferrite Bead
Equivalent Circuit
Feed-through
Capacitor
R2 C1
C3
Instrumentation
Amplifier
C2
R1 = R2
C1 = C2
C3 >> C1 and C2
Common Mode Filters
f-3dB = 1/(2 π R1C1)
f-3dB = 1/(2 π R2C2)
f –3db
Differential Mode Filter
1
= -------------------------------------------------------------------------C1 × C2
2π ( R1 + R 2 )  ------------------- + C 3
 C 1 + C 2
FIGURE 14:
Providing EMI/ESD
Overvoltage Protection with Resistors and
Capacitors.
Fault Detection Capability
Sensor
Instrumentation
Amplifier
FIGURE 13:
Remote Sensors May
Require Multiple EMI Filter Devices.
DS00929A-page 8
R1
TVS Diode
PCB
Connector
Figure 14 provides the design equations for a RC filter
which can be used with differential and instrumentation
amplifiers. The RC combinations of R1/C1 and R2/C2
are used to form common mode filters and reduce the
noise which is common to both input lines. The common-mode resistors and capacitors should be matched
as close as possible and the resistors should have a
tolerance of 1% or better, while the capacitors should
be at least 5%. Capacitor C3 forms a differential mode
filter that attenuates the signal with respect to the difference in the voltage potentials of the two inputs. C3 also
compensates for any mismatch of R1/C1 and R2/C2,
which is important because the difference in the R/C
combinations degrades an amplifier’s CMRR.
It is often necessary to identify a failed sensor,
especially in remote-sensing applications. Differential
amplifiers can be used to implement a Built-In-Test
(BIT) circuit that can determine an open or short failure
at the sensor. Figure 15 shows circuits that can be
used to detect a failed RTD and thermocouple. A logic
inverter gate can be used to monitor the voltage divider
network of a RTD. Another approach to provide BIT to
a sensor is to add pull-up or pull-down resistors, or
both, as shown in Figure 15.
The typical failure mode of RTDs and thermocouples is
an open-circuit failure. Wire wound RTDs are constructed from a relatively small gauge wire and are
prone to vibration failures. Thermocouple wires can
also fail due to vibration because the wires get brittle
over time when exposed to high temperatures. Also,
the voltage at the amplifier inputs resulting from noise
can be equal in magnitude to a functional
thermocouple.
 2004 Microchip Technology Inc.
AN929
VREF
Dual Power Supply Amplifier
+V
Sensor BIT
RTD
Single Power Supply Amplifier
+V
HC14
R1
R2 >> R1
Thermocouple
Thermocouple
R2
Instrumentation
Amplifier
FIGURE 15:
-V
Remote Sensor Fault Detection Circuits.
Amplifier Selection Criteria
such as VOS. The important parameters for oscillators
are the amplifier’s frequency response and the Gain
Bandwidth Product (GBWP). The op amp’s GBWP
should be at least a factor of 100 times the maximum
oscillation frequency.
Two key op amp specifications in a sensor amplifier are
VOS and CMRR. VOS is important in sensor applications when the input signal is of the same magnitude as
VOS, while the CMRR ratio is critical in reducing the
noise signal induced on the long wires of a remote
sensor. Other op amp specifications, such as the AC
frequency characteristics are less important because
the frequency content of a temperature sensor is
typically less than 100 Hz. The op amps used in
oscillators are relatively immune to DC specifications
TABLE 1:
SENSOR SELECTION CRITERIA
Table 1 provides a summary of the attributes of
thermocouples, RTDs, thermistors and silicon IC
sensors.
ATTRIBUTES OF THERMOCOUPLES, RTDS, THERMISTORS AND SILICON IC
SENSORS
Attribute
Thermocouple (type K)
RTD
Thermistor
-55°C to 150°C
Silicon IC
Range
-184°C to 1260°C
-200°C to 850°C
-55°C to 125°C
Temperature (t)
Accuracy
Greater of ±2.2°C or
±0.75%
Class B = ± [0.012 +
Various,
(0.0019 |t|) − 6 X 10-7t2] ±0.5°C to 5°C
Various,
±0.5°C to 4°C
Output Signal
40 µV/°C
≈ 0.00385 Ω /Ω/°C
≈ 4% ∆R/°C
for 0°C ≤ t ≤ 70°C
Analog, Serial,
Logic, Duty Cycle
Linearity
Fair
Excellent
Poor
Good
Precision
Fair
Excellent
Poor
Fair
Durability
Good at lower temp.,
Poor at high temp, Opencircuit vibration failures
Good, Wire wound
prone to open-circuit
vibration failures
Good, Power
derated with
temperature
Excellent
Thermal
Response Time
Fast (function of probe
material)
Fast (function of probe
material)
Moderate
Slow
Cost
Low
Wire wound – High,
Thin-film – Moderate
Low
Moderate
Interface Issues
Cold junction
compensation, Small ∆V
Small ∆R/°C
Non-linear
resistance
Sensor located on
PCB
 2004 Microchip Technology Inc.
DS00929A-page 9
AN929
Thermocouples
Thermocouples are the most common sensor used in
high-temperature measurements. A thermoelectric
electromagnetic-force (emf) or voltage results when
two dissimilar metals are joined together that produce
an output voltage that is proportional to temperature.
Figure 16 shows a block diagram of a typical thermocouple system. The thermocouple probes are typically
located remotely from the amplifier circuit and are
Measurement Site
(TMEAS)
Type K
“Isothermal
Block”
connected to the amplifier via the thermocouple wires
that enter the enclosure through a connector. The cold
junction occurs at the point where the copper wires of
the PCB meet the Alumel and Chromel connector pins.
The cold junction will be formed at the inside wall of the
enclosure if the connector uses Alumel and Chromel
pins. The temperature of the cold junction or “isothermal block” is estimated by a sensor that is located as
close as possible to the connector on the PCB.
PCB
CJC Circuit
(TCOLD)
Chromel Wire
+
Copper Wire
Alumel Wire
VS
Copper Wire
Thermocouple
Amplifier (THOT)
TMEAS = THOT - TCOLD
Enclosure
FIGURE 16:
Thermocouple Basics – Typical Measurement System.
RTDs
Silicon Integrated Circuits
RTDs are the standard sensor chosen for precision
sensing applications because of their excellent repeatability and stability characteristics. RTDs are based on
the principle that the resistance of a metal changes with
temperature. A RTD can be characterized against
temperature to obtain a table of temperature correction
coefficients. The correction can be added to the
measured temperature to obtain an accuracy greater
than 0.05°C. RTDs are available in two basic designs:
wire wound and thin film. Wire wound RTDs are built by
winding the sensing wire around a core to form a coil,
while thin film RTDs are manufactured by depositing a
very thin layer of platinum on a ceramic substrate.
Silicon IC sensors provide an accurate temperature
measurement for a steady-state or relatively constant
temperature. However, their thermal response time to
a rapid change in temperature is poor. Silicon sensors
provide a non-contact temperature measurement.
Thus, the location of the sensor is important. These
sensors measure temperature by monitoring the voltage of a diode located on the IC die, as shown in
Figure 17. The substrate of the die is typically
grounded and connected to the PCB’s ground plane via
a bonding wire and the lead of the package. The
ground pin of the IC provides a low-impedance thermal
path between the die and the PCB, allowing the sensor
to effectively monitor the temperature of the PCB
board. The thermal path between the top of the package to the ambient air and between the bottom of the
package and the PCB is not as efficient because the
plastic IC housing package functions as a thermal insulator. Silicon sensors provide a measurement of the
temperature of the PCB’s ground plane and the ambient air temperature has only a small effect on the measurement.
Thermistors
The main advantages of thermistors are that they are
inexpensive and available in a wide variety of
packages. Thermistors are built with semiconductor
materials and can have either a positive (PTC) or a
negative (NTC) temperature coefficient. However, the
NTC devices are typically used for temperature
sensing. The main negative feature of thermistors is
that the change in resistance with temperature is very
non-linear at temperatures less than 0°C and greater
than 70°C.
DS00929A-page 10
 2004 Microchip Technology Inc.
AN929
DESIGN EXAMPLES
SOT-23-5A
Thermocouple Circuits
77
TC
DUAL POWER SUPPLY CIRCUIT
Mold Compound
Die Attach Adhesive
Die Attach Pad
Copper Lead
FIGURE 17:
Silicon IC Sensor.
Die
Figure 18 shows a circuit that can be used for a remote
thermocouple-sensing application. A TC913A autozeroed op amp was selected as the amplifier because
of its low VOS of 15 mV (max.) and high CMRR of
116 dB (typ.). Auto-zero, chopper and instrumentation
amplifiers are good thermocouple amplifiers because
of their good VOS and CMRR specifications. The
thermocouple inputs are tied to a positive and negative
supply through 10 MΩ resistors, so that the circuit can
detect a failed open-circuit thermocouple. The gain of
the amplifier was selected to be 249, which provides a
temperature coefficient (TC) of 10 mV/°C.
Gold Wire
Cross-section of the TC77
Noise immunity can be provided to silicon sensors by
using a decoupling capacitor and a good PCB layout. A
0.1 µF to 1 µF decoupling capacitor should be inserted
between the power supply and ground pins. The PCB
should be designed with the standard layout guidelines
used for a low-noise circuit. The temperature sensor’s
main thermal path to the PCB is through the ground
connection. Thus, the size of the ground pad at the
sensor should be as large as possible. A good PCB
layout keeps high-frequency clock and switching power
supply PCB traces away from the sensor pins.
+5V
Connector
Type K
Thermocouple
Shielded
Cable
R1 = R2 = 10 MΩ
R3 = R4 = 1 kΩ
R5 = R6 = 249 kΩ
C1 = C2 = C3 = 0.1 µF
+5V
R1
EMI Filter
EMI Filter
R2
+5V
VIN1
R3
C1
IN_1
VIN2
TC913A
C2
R4
R6
-5V
C3
TC1047A
R5
-5V
Cold Junction Compensation
ADC
IN_2
R5
249k
VOUT = ( V IN2 – VIN1 )  ------- + VREF = ( ∆V IN )  ------------
R3
1k
Temp. Coef. = 249 × 40µV ⁄ °C ≅ 10mV ⁄ °C
FIGURE 18:
Schematic of Dual Supply Voltage Thermocouple Amplifier.
 2004 Microchip Technology Inc.
DS00929A-page 11
AN929
The microcontroller computes the actual temperature
by subtracting the cold junction temperature from the
temperature determined from the thermocouple
amplifier. The cold junction temperature is measured
with a TC1047A silicon IC analog output sensor that is
located on the PCB. The actual cold junction occurs
where the thermocouple wires meet the copper wires,
which is typically at a connector. Placing the TC1047A
adjacent to the connector can minimize the cold
junction error (TCJC_Location) that results by placing the
temperature sensor on the PCB. The voltage output of
the TC1047A is listed below.
The TC1047A provides an output voltage of 10 mV/°C
with an offset of 500 mV.
The accuracy of the thermocouple amplifier and cold
junction circuits were estimated to be ±5.4°C by using
the root-squared-sum (RSS) equation. The common
mode voltage noise signal entering the circuit from the
thermocouple leads was assumed to be equal to 10V.
It is important to use tight tolerance resistors for the
differential amplifier in order to achieve a high CMRR.
0.1% resistors were chosen for R3, R4, R5 and R6. The
analysis shows that the majority of the measurement
error is due to the error of the cold junction
compensation.
VOUT = [(Temp. (°C)) x (10 mV/°C)] + 500 mV
1 + Amplifier Gain
1 + 249
CMRR Resistors ≈ --------------------------------------------- = ---------------------- = 62500 = 95.9db
4 × Tolerance
4 × 0.001
V CM – NOISE
10V
Error CMRR Resistors = --------------------------------------- = --------------- = 160µV ≅ 4°C
CMRR Resistors
62500
CMRR Amplifier (TC913A) = 116db ( typ. )
1
Noise Attenuation = ------------------630,957
V CM – NOISE
10V
Error CMRR Amplifier (TC913A) = ------------------------------------------------------------------ = ------------------- = 15.8µV ≅ 0.4°C
CMRR Amplifier (TC913A)
630,957
VOS (TC913A)
15µV
V OS error = -------------------------------------------------- = ------------------------ ≅ 0.4°C
Temp. Coef. (type K)
40µV ⁄ °C
T CJC_Sensor (TC1047A) error = 3°C (max.)
T CJC_Location error = 2°C (est.)
Total error Worst Case = CMRRRESISTORS + CMRR AMPLIFIER (TC913A) + VOS + T CJC_Sensor + T CJC_Location
= 4 + 0.4 + 0.4 + 3 + 2 = 9.8°C
Total error RSS =
DS00929A-page 12
2
2
2
2
2
( 4 ) + ( 0.4 ) + ( 0.4 ) + ( 3 ) + ( 2 ) = 5.4°C
 2004 Microchip Technology Inc.
AN929
SINGLE POWER SUPPLY CIRCUIT
gain resistors can also be used to implement this circuit. The gain of the amplifier was selected to be 249,
providing a temperature coefficient of 10 mV/°C. The
thermocouple inputs are biased to VDD/2 through
10 MΩ resistors, providing the ability to detect a failed
open-circuit thermocouple.
Figure 19 provides a low-cost, single power supply
thermocouple amplifier circuit using a quad op amp.
The buffered input differential amplifier topology is
similar to an instrumentation amplifier and offers the
feature of equal and high input impedance at the amplifier inputs. An instrumentation amplifier with integrated
R3
R4
+5V
Connector
R1
R7
R2
+5V
EMI Filter
C2
U1A
VIN1
R5
VIN2
U1B
EMI Filter
Shielded
Type K
Thermocouple Cable
R1 = R2 = 1 MΩ
R3 = R4 = 10 MΩ
R5 = R6 = 1 kΩ
R7 = R8 = 249 kΩ
C1 = C2 = 1 nF
C3 = 0.1 µF
FIGURE 19:
C1
+5V
TC1047A
R6
R8
C3
U1C
MCP619
IN_1
ADC
IN_2
Cold Junction Compensation
R7
249k
VOUT = ( V IN2 – VIN1 )  ------- + VREF = ( ∆V IN )  ------------
R5
1k
Temp. Coef. = 249 × 40µV ⁄ °C ≅ 10mV ⁄ °C
Schematic of Single Supply Voltage Thermocouple Amplifier.
RTD Oscillator Circuits
Oscillator circuits can be used to provide an accurate
temperature measurement with an RTD sensor. The
state variable oscillator provides an output frequency
that is proportional to the square root of the product of
two temperature-sensing resistors and is a good circuit
for precision applications. The astable multi-vibrator or
relaxation oscillator provides a square wave output
with a single amplifier and is a good alternative for
cost-sensitive applications.
The components must be chosen carefully so that the
change in the oscillation frequency results primarily
from the RTD and not from variation due to the component tolerance, temperature coefficient and drift rate.
Metal film resistors, metal foil resistors and NPO
porcelain capacitors are recommended to minimize the
component error. Capacitors are relatively poor in
performance when compared to resistors. Typically, the
capacitor limits the accuracy of the oscillator. Furthermore, precision capacitors are only available in
relatively small values. The state variable oscillator
requires two 100 nF capacitors, while the relaxation
 2004 Microchip Technology Inc.
oscillator uses a 0.68 µF capacitor to produce a nominal oscillation of 1 kHz. The state variable and relaxation circuits have an uncalibrated measurement
accuracy of approximately 1°C and 3°C, respectively.
The difference is primarily due to the capacitor error.
An application that requires an accuracy of better than
±1°C may require a temperature calibration and burnin procedure. A temperature compensation algorithm
can easily be implemented using the E2 non-volatile
memory of a microcontroller to store temperature
correction data in a look-up table. The temperature
coefficients are obtained by calibrating the circuit over
temperature and comparing the measured temperature
against the actual temperature. A burn-in or temperature-cycling procedure can significantly reduce the drift
of the resistors and capacitors. Burn-in procedures are
useful because the majority of the change in magnitude
of resistors and capacitors occurs within the 500 hours
of a life test.
DS00929A-page 13
AN929
STATE VARIABLE OSCILLATOR
an oscillation is produced when the output of the third
amplifier is fed back to the first amplifier. The addition
of capacitor C4 helps ensure oscillation start-up. The
dual element RTD represented by R1 and R2 is used to
increase the difference in the oscillation frequency from
the minimum to the maximum sensed temperature.
The state variable oscillator shown in Figure 20 consists of integrators A1, A2 and inverter circuit A3. Each
integrator provides a phase shift of 90°, while the
inverter adds an additional 180° phase shift. The total
phase shift of the three amplifiers is equal to 360° and
C1
R4
R2 = RTDB
A1
R3
A2
VDD/2
VDD/2
VDD
C5
A4
FIGURE 20:
VDD/2
VDD/2
Set R1 = R2 = R, C1 = C2 = C, R3 = R4 and RO is the
RTD resistance at 0°C.
3.
Select a desired nominal oscillation frequency.
C = 1 / (2πRofo).
Ro = RTD resistance @ 0°C.
Select an op amp with a GBWP ≥ 100 x fmax
where: fmax = 1 / (2πRminC) and Rmin = RTD
resistance at coldest sensing temperature.
4.
5.
VDD/2
A5
VOUT
State Variable RTD Oscillator.
Design Procedure:
where:
R7
A3
R1 = R2 = RTD
R3 = R4 = R5 = R6 = R7 = 1 kΩ
R8 = 1 MΩ
If R1 = R2 = R, C1 = C2 = C, and R3 = R4
C1 = C2 = 100 nF
1
then fO = --------------C4 = 20 pF
2πRC
C5 = 1 µF
The state variable circuit offers the advantage that a
limit circuit is not required if rail-to-rail input/output
(RRIO) amplifiers are used and the gain of the inverter
stage A3 is equal to one (i.e., R3 = R4). In contrast, most
oscillators require a limit or clamping circuit to prevent
the amplifiers from saturating. Amplifier A4 is used to
provide the mid-supply reference voltage (VDD/2)
required for the single-supply voltage circuit. Resistors
R5 and R6 form a voltage divider, while capacitor C5 is
used to provide additional noise filtering. A comparator
circuit A5 is used to convert the sinewave output to a
square wave digital signal. The comparator functions
as a zero-crossing detector with a switching threshold
that is equal to VDD/2. Resistor R8 is used to provide
additional hysteresis (VHYS) to the comparator.
1.
2.
R8
R4
1
fO = ------ ------------------------2π R1 R2 C 1 C 2
VDD
R5
R6
C4
C2
R1 = RTDA
Select R3 = R4 equal to 1 to 10 times Ro.
Select C4 using the following equations:
f-3dB = 1 / (2πR4C4)
C4 ≈ 1 / (2πR4f-3dB)
where: f-3dB ≅ op amp’s GBWP
DS00929A-page 14
RELAXATION OSCILLATOR
The relaxation oscillator shown in Figure 21 provides a
simple circuit to interface a RTD to a microcontroller.
This circuit requires only a comparator, capacitor and a
few resistors to generate a frequency output that is
proportional to the RTD resistance. The accuracy of
this circuit is limited by the poor tolerance and large
temperature coefficient available with the required,
relatively large, capacitor C1.
The relaxation oscillator functions as a comparator.
Resistors R2, R3 and R4 form a voltage divider that sets
the hysteresis and voltage trip levels. Resistor R1 and
capacitor C1 form the RC time constant that determines
the charge and discharge rate or oscillation frequency.
If VOUT equals VDD, C1 charges from the comparator’s
low threshold (VTL) to the high threshold (VTH), causing
VOUT to toggle to VSS. If VOUT equals VSS, C1
discharges from VTH to VTL and VOUT switches to VDD.
The voltage-switching process then repeats, which
generates the oscillation.
The accuracy of the relaxation oscillator can be
improved by using a comparator rather than an op amp
for the amplifier. A comparator offers several advantages over an op amp in a non-linear switching circuit,
such as a square wave oscillator. An op amp is
intended to operate as a linear amplifier, while the comparator is designed to function as a fast switch. The
switching specifications (such as propagation delay
and rise/fall time) of a comparator are typically much
better than an op amp’s specifications. Also, the
switching characteristics of an op amp typically consist
of only a slew rate specification. The accuracy of the
relaxation oscillator can be improved by using a higher
 2004 Microchip Technology Inc.
AN929
resistance RTD and a higher performance comparator.
The trade-off, however, will be that the comparator’s
current consumption will be much higher.
Design Procedure:
Set R1 = RTD sensor, R2 = R3 = R4 = R and R ≅ 10 x
Ro, where: Ro = RTD resistance at 0°C.
1.
2.
3.
Select a desired nominal oscillation frequency.
C1 = 1/(1.386 Ro fo)
Select a comparator with an Output Short
Circuit Current (ISC), which is at least five times
greater than the maximum output current, to
ensure start-up at cold and a relatively good
accuracy.
Thermistor Circuits
VOLTAGE DIVIDER CIRCUIT
Thermistors offer the advantages of a high sensitivity
(∆R vs. temperature) and a linear change in resistance
between approximately 0°C and 70°C. Figure 22
shows the conventional circuit used with thermistors.
The circuit consists of a voltage divider and a voltagefollower op amp with a gain of one. The voltage divider
network consists of reference voltage VREF and series
resistor RS. A low-pass, noise-reduction filter is formed
by R2 and C1. The equation listed below can be used
to select RS.
R T1 R T2 + RT2 RT3 – 2R T1 R T3
Rs = ----------------------------------------------------------------------R T1 + R T3 – 2RT2
IOUT_MAX = VDD/R1_MIN
ISC = IOUT_MAX * 5
where: R1_MIN = RTD resistance at coldest
sensing temperature and VDD is equal to the
supply voltage.
RT3 = thermistor resistance at the high
temperature.
VDD
VINVIN+
A1
VSS
VOUT
R2
VDD
If R 2 = R3 = R4
VREF = 5V
RS
4.53 kΩ
R4
R3
RT1 = thermistor resistance at the low
temperature.
RT2 = thermistor resistance at the mid-point
temperature.
R1 = RTD
C1
Where:
1
then f O = -----------------------------------( 1.386 ) ( R1 C 1 )
RT
10 kΩ
VOUT
Voltage
FIGURE 22:
VOL
VINVIN- and VIN+
MCP60X
VOUT
1 µF
RT
V OUT =  -------------------- VREF
 RS + R T 
VOH
VIN+
VOH
VTHL
VTLH
VOL
tcharge
FIGURE 21:
100 kΩ
tdischarge
tcharge
time
Relaxation RTD Oscillator.
 2004 Microchip Technology Inc.
Voltage Divider Circuit.
A plot of the output of the divider circuit is shown in
Figure 23. While a microcontroller can use a software
routine to improve the linearization, a high-bit ADC is
required to resolve the small change in the output voltage at temperatures less than 0°C and greater than
70°C. Figure 24 shows the change in voltage or slope
of the output voltage. The ADC must be able to resolve
a voltage of approximately 50 mV at 35°C and a voltage of less than 20 mV at temperatures less than -5°C
and greater than 90°C. Table 2 provides the resolution
of an ADC, assuming that the ADC’s Effective Number
of Bits (ENOB) is equal to one bit less than the maximum available resolution. If this aggressive ENOB
assumption is made, an 8-bit ADC is required to measure temperatures between 10°C and 60°C, with an
11-bit ADC being required to measure temperatures at
the cold and hot end points.
DS00929A-page 15
AN929
VDD
VREF = 5V
FIGURE 23:
RS
28 kΩ
100 kΩ
RT
10 kΩ
1 µF
VOUT vs. Temperature.
MCP6S21
VOUT
Gain Adjustment
Input Selection
SPI
RT
VOUT =  --------------------- ( V REF ) (Amplifier Gain)
 R S + RT 
FIGURE 25:
TABLE 3:
∆VOUT vs. Temperature.
FIGURE 24:
TABLE 2:
ADC RESOLUTION
PGA Thermistor Circuit.
GAIN CHANGE POINTS WITH
HYSTERESIS
Gain Change
(V/V)
Temperature
(°C)
VOUT
(V)
1→2
37.0
0.885
2→4
57.0
0.451
4→8
77.0
0.236
ADC
(N-bits)
2N
Ideal ADC
Volts/bit
(VFS = 5V)
ENOB
(N - 1)
ENOB
Volts/bit
(VFS = 5V)
8 → 16
97.0
0.1288
8 bits
256
19.5 mV
7-bits
39.0 mV
16 → 32
118.5
0.0708
9 bits
512
9.77 mV
8-bits
19.5 mV
16 ← 32
114.5
0.0789
10 bits
1024
4.88 mV
9-bits
9.77 mV
8 ← 16
93.0
0.1448
11 bits
2048
2.44 mV
10-bits
4.88 mV
4←8
73.0
0.268
12 bits
4096
1.22 mV
11-bits
2.44 mV
2←4
53.0
0.516
1←2
33.0
1.012
PROGRAMMABLE GAIN AMPLIFIER (PGA)
CIRCUIT
A PGA circuit can be used to increase the gain of the
amplifier at the temperatures where a small change in
the output voltage is difficult to detect. Increasing the
output voltage as a function of temperature allows a
lower bit ADC to accurately resolve the relative small
differences in the thermistor’s resistance at cold and
hot temperatures. The circuit shown in Figure 25 uses
the MCP6S21, which uses a SPI interface to select a
gain of 1, 2, 4, 8, 16 or 32 V/V.
DS00929A-page 16
The output voltage of the PGA circuit is shown in
Figure 26. The gain of the amplifier is adjusted as a
function of temperature with the values shown in
Table 3. The advantage of the PGA circuit is shown by
comparing the VOUT slope plots of Figure 24 and
Figure 27. The VOUT slope for the PGA circuit has a
minimum value of 30 mV for temperatures greater than
35°C, which means that only a 9-bit ADC is required. In
contrast, a voltage divider with a gain of one will require
an 11-bit or higher ADC to provide an equivalent
temperature resolution. The resolution of a thermistor
circuit is important in applications such as
overtemperature shutdown circuits.
 2004 Microchip Technology Inc.
AN929
An accurate thermistor is required for the PGA circuit to
provide an advantage with the variable gain. A BC
Components™ #2322 640 5103 thermistor was chosen
that has a resistance tolerance of 1% at 25°C and a ∆R
accuracy of 0.75%, which corresponds to a temperature accuracy of approximately 0.2°C at 25°C and 1°C
at 100°C. The accuracy of a standard thermistor is
typically ±2°C to ±5°C and the magnitude of the sensor
error is too large to achieve the improved resolution
benefit of an adjustable gain circuit.
FIGURE 26:
PGA VOUT vs. Temperature.
FIGURE 27:
PGA ∆VOUT vs. Temperature.
Silicon IC Sensors
SERIAL OUTPUT
Figure 28 shows a schematic of the TC77 serial-output
sensor which integrates the temperature sensor, ADC
and digital registers on a single chip that is connected
to the processor through the SPI serial bus. The SPI
bus uses SCK, SI/O and CS pins to transmit and
receive data. Temperature is measured by monitoring
the voltage of a diode with a 13-bit ADC. The temperature data is stored in the Temperature register. If a
Temperature register read operation occurs while an
ADC conversion is in progress, the previous completed
conversion will be outputted. The Configuration
register is used to select either the continuous
temperature conversion or shut-down operating
modes. The Shutdown mode disables the temperatureconversion circuitry to minimize the power consumption. However, the serial I/O communication port
remains active. The test registers are used for offset
and gain calibration by the vendor and are not available
to the user.
VDD
VDD
0.1 µF
VDD
PICmicro®
MCU
TC77
CS
AN0
SCK
SCK
SI/O
SDI
SDO
VSS
FIGURE 28:
TC77
Internal
Diode
Temperature
Sensor
13-Bit
Delta-Sigma
ADC
Temperature
Register
VSS
Calibration
Registers
Manufacturer
ID Register
CS
Serial
Port
Interface
(SPI™)
SI/O
SCK
Configuration
Register
Interfacing a TC77 Silicon IC Sensor to a Microcontroller.
 2004 Microchip Technology Inc.
DS00929A-page 17
AN929
the two-wire SMBus or I2C protocols. Also, a number of
temperature sensors are available that use a single I/O
pin to transmit information using a pulse-width coding
scheme.
Serial I/O sensors can be used to monitor multiple
temperatures on the same PCB and minimize the
number of microcontroller interface pins. Most silicon
sensors available today are designed using the SPI,
VDD
100 kΩ
1 kΩ
1 kΩ
GP2/INT
Data
Data
Clock
Clock
Data
Data
Clock
Clock
VDD
A0
PIC16LF872
PICmicro®
MCU
System
Controller
TCN75
SD ADC
VDD
Diode
Temperature
Sensor
VDD
A0
Alert
A1
A1
A2 TCN75
A2 TCN75
A2 TCN75
Sensor #0
Sensor #1
Sensor #7
Clock
Generator
Control
Logic
Counter /
Accumulator
Address
Decoder
Serial Bus
Interface
Data Registers
Temperature Data
Temperature Setpoint
Temperature Hysteresis
Set Point Comparator
Calibration Registers
Offset Correction
A0
A1
A2
Data
Clock
VDD
Gain Correction
Configuration Registers
Control
Manufacture ID
Multi-Zone Temperature Monitoring with the TCN75 Thermal Sensor.
Figure 29 provides a multi-zone temperature monitor
that uses the TCN75 sensor to notify the host controller
when the ambient temperature exceeds a userprogrammed set point. Communication with the TCN75
sensor is accomplished via a two-wire serial bus. The
microcontroller can monitor the temperature of each
sensor by reading the Temperature Data register or the
sensor can function as a stand-alone thermostat. The
temperature threshold trip point is programmed by
writing to the Set Point register. The INT pin is an opendrain output that can be connected to the microcontroller’s interrupt pin to monitor up to eight sensors. Three
address pins are used to identify each sensor.
DS00929A-page 18
Alert
A1
Alert
FIGURE 29:
A0
Alert
ANALOG OUTPUT
Analog output silicon sensors have an output voltage in
the form of the equation of a straight line. The slope of
the output is equal to a constant temperature
coefficient (mV/°C), while the y-intercept point typically
is the sensor’s output voltage at 0°C. A simplified
schematic of an analog sensor and ADC system is
shown in Figure 30.
 2004 Microchip Technology Inc.
AN929
Analog Output
Silicon Sensor
RSWITCH
ROUT
+
VOUT
CFILTER
Sample
Hold
CSAMPLE
ADC’s Input Stage
( R OUT + R SWITCH ) × C SAMPLE ≤ 0.1 × T SAMPLE
FIGURE 30:
Interfacing an Analog Output Silicon Sensor to an ADC.
The sensor’s output impedance can affect the ADC.
The temperature sensor’s output pin is typically driven
by a buffer op amp, while the input of a typical ADC
consists of a sample and hold circuit with a switch that
connects VOUT to CSAMPLE. ROUT, RSWITCH and
CSAMPLE form a time constant which must be less than
the sampling rate (TSAMPLE) of the ADC, as illustrated
by the equation in Figure 30. An external capacitor
CFILTER can be added to the output pin to provide
additional filtering. However, this may impact the time
response of the sensor. Enough time must be provided
to allow CFILTER to charge sufficiently between ADC
conversions.
The magnitude of the CFILTER capacitor should be in
the range of 1 nF to 100 nF to prevent the sensor
amplifier from oscillating. A small resistor of
approximately 10Ω to 100Ω can be added between the
output pin of the sensor and CFILTER to isolate the
sensor’s amplifier from the capacitive load. The output
impedance of the sensor ROUT varies as a function of
frequency. Thus, a series resistor should be added to
the effective ROUT resistance, if CFILTER is intended to
serve as the ADC’s anti-aliasing filter.
 2004 Microchip Technology Inc.
DS00929A-page 19
AN929
CONCLUSION
REFERENCES
Temperature sensors are used in embedded systems
for both thermal monitoring and management applications. A designer must evaluate the trade-offs of the
sensor, conditioning circuitry and sensor output in
order to maximize the measurement accuracy while
easing the interface to the microcontroller. In addition,
the designer must consider system integration issues
such as the location of the sensor, grounding, EMI/ESD
protection and shielding in order to provide a robust
temperature measurement. A sample of practical
circuits and interface techniques has been provided
along with design equations.
1.
The following sensor guidelines can be used as a starting point to select a temperature sensor. If your application requires a high-temperature measurement,
thermocouples are a good choice because of their wide
temperature operating range. Thermocouples are typically used as remote sensors and, therefore, the circuit
must provide noise immunity by using good grounding
and shielding methods. If your application requires precision, RTDs set the standard with their superior
repeatability and stability characteristics. For applications such as the temperature measurement on a PCB,
either thermistors or silicon IC sensors should be considered. Thermistors are available in more packages,
are lower in cost and have a faster thermal response
time than silicon sensors. However, thermistors require
additional signal-conditioning circuitry, while silicon
sensors provide both the sensor and circuitry on a
single IC that can be interfaced directly to the
microcontroller.
The output of the sensor is selected by the available
microcontroller hardware and software resources, in
addition to the complexity of the sensor circuit. The
sensor output can consist of an analog, frequency,
ramp rate, duty cycle, serial or logic format that is
proportional to temperature. Temperature measurement is a popular topic and the designer should review
the literature to evaluate the many sensor and circuit
options available.
2.
3.
4.
5.
6.
7.
8.
9.
10.
11.
12.
13.
14.
AN679, “Temperature Sensing Technologies”,
DS00679, Baker, Bonnie, Microchip Technology
Inc., 1999.
“High-Accuracy CMOS Smart Temperature
Sensors”, Bakker, A. and Huijsing, J., Kluwer
Academic Publishers, Boston, 2000.
AN913, “Interfacing the TC77 Thermal Sensor
to a PICmicro® Microcontroller”, DS00913,
Bible, S. and Lepkowski, J.,
Microchip Technology Inc., 2004.
AN897, “Thermistor Temperature Sensing with
the MCP6S2X PGA”, DS00897, Blake, K.,
Microchip Technology Inc., 2004.
AN512, “Implementing Ohmmeter/Temperature
Sensor”, DS00512, Cox, D.,
Microchip Technology Inc., 1997.
TB052, “Multi-Zone Temperature Monitoring
with the TCN75 Thermal Sensor”, DS91052,
Dietz, K., Microchip Technology Inc., 2001.
AN895, “Oscillator Circuits for RTD Temperature
Sensors”, DS00895, Haile, E. and Lepkowski,
J., Microchip Technology Inc., 2004.
“Section 7: Temperature Sensors, Practical
Design Techniques for Sensor Signal
Conditioning”, Kester, W., Bryant, W. and Jung,
W., Analog Devices, 1999.
AN871, “Solving Thermal Measurement
Problems Using the TC72 and TC77 Digital
Silicon Temperature Sensors”, DS00871,
Lepkowski, J., Microchip Technology Inc., 2003.
“Silicon Sensors Harness Thermal
Management”, Marsh, D., EDN,
December 11, 2003.
“NTC Thermistor Basics and Principles of
Operation”, McGillicuddy, D. Sensors,
December, 1993.
“The ABCs of RTDs”, McGovern, B., Sensors,
November 2003.
“Noise Reduction Techniques in Electronic
Systems”, Ott, H, John Wiley, N.Y., 1998.
AN571, “Using Analog Temperature Sensors
with ADCs”, Maxim Semiconductor, 2001.
ACKNOWLEGDEMENT
The author appreciates the assistance of Kumen Blake
of Microchip Technology. The thermistor circuit design
examples are based on his work.
DS00929A-page 20
 2004 Microchip Technology Inc.
Note the following details of the code protection feature on Microchip devices:
•
Microchip products meet the specification contained in their particular Microchip Data Sheet.
•
Microchip believes that its family of products is one of the most secure families of its kind on the market today, when used in the
intended manner and under normal conditions.
•
There are dishonest and possibly illegal methods used to breach the code protection feature. All of these methods, to our
knowledge, require using the Microchip products in a manner outside the operating specifications contained in Microchip’s Data
Sheets. Most likely, the person doing so is engaged in theft of intellectual property.
•
Microchip is willing to work with the customer who is concerned about the integrity of their code.
•
Neither Microchip nor any other semiconductor manufacturer can guarantee the security of their code. Code protection does not
mean that we are guaranteeing the product as “unbreakable.”
Code protection is constantly evolving. We at Microchip are committed to continuously improving the code protection features of our
products. Attempts to break Microchip’s code protection feature may be a violation of the Digital Millennium Copyright Act. If such acts
allow unauthorized access to your software or other copyrighted work, you may have a right to sue for relief under that Act.
Information contained in this publication regarding device
applications and the like is intended through suggestion only
and may be superseded by updates. It is your responsibility to
ensure that your application meets with your specifications.
No representation or warranty is given and no liability is
assumed by Microchip Technology Incorporated with respect
to the accuracy or use of such information, or infringement of
patents or other intellectual property rights arising from such
use or otherwise. Use of Microchip’s products as critical
components in life support systems is not authorized except
with express written approval by Microchip. No licenses are
conveyed, implicitly or otherwise, under any intellectual
property rights.
Trademarks
The Microchip name and logo, the Microchip logo, Accuron,
dsPIC, KEELOQ, MPLAB, PIC, PICmicro, PICSTART,
PRO MATE, PowerSmart and rfPIC are registered
trademarks of Microchip Technology Incorporated in the
U.S.A. and other countries.
AmpLab, FilterLab, microID, MXDEV, MXLAB, PICMASTER,
SEEVAL, SmartShunt and The Embedded Control Solutions
Company are registered trademarks of Microchip Technology
Incorporated in the U.S.A.
Application Maestro, dsPICDEM, dsPICDEM.net,
dsPICworks, ECAN, ECONOMONITOR, FanSense,
FlexROM, fuzzyLAB, In-Circuit Serial Programming, ICSP,
ICEPIC, Migratable Memory, MPASM, MPLIB, MPLINK,
MPSIM, PICkit, PICDEM, PICDEM.net, PICtail, PowerCal,
PowerInfo, PowerMate, PowerTool, rfLAB, Select Mode,
SmartSensor, SmartTel and Total Endurance are trademarks
of Microchip Technology Incorporated in the U.S.A. and other
countries.
SQTP is a service mark of Microchip Technology Incorporated
in the U.S.A.
All other trademarks mentioned herein are property of their
respective companies.
© 2004, Microchip Technology Incorporated, Printed in the
U.S.A., All Rights Reserved.
Printed on recycled paper.
Microchip received ISO/TS-16949:2002 quality system certification for
its worldwide headquarters, design and wafer fabrication facilities in
Chandler and Tempe, Arizona and Mountain View, California in
October 2003. The Company’s quality system processes and
procedures are for its PICmicro® 8-bit MCUs, KEELOQ® code hopping
devices, Serial EEPROMs, microperipherals, nonvolatile memory and
analog products. In addition, Microchip’s quality system for the design
and manufacture of development systems is ISO 9001:2000 certified.
 2004 Microchip Technology Inc.
DS00929A-page 21
WORLDWIDE SALES AND SERVICE
AMERICAS
China - Beijing
Korea
Corporate Office
Unit 706B
Wan Tai Bei Hai Bldg.
No. 6 Chaoyangmen Bei Str.
Beijing, 100027, China
Tel: 86-10-85282100
Fax: 86-10-85282104
168-1, Youngbo Bldg. 3 Floor
Samsung-Dong, Kangnam-Ku
Seoul, Korea 135-882
Tel: 82-2-554-7200 Fax: 82-2-558-5932 or
82-2-558-5934
China - Chengdu
200 Middle Road
#07-02 Prime Centre
Singapore, 188980
Tel: 65-6334-8870 Fax: 65-6334-8850
2355 West Chandler Blvd.
Chandler, AZ 85224-6199
Tel: 480-792-7200
Fax: 480-792-7277
Technical Support: 480-792-7627
Web Address: http://www.microchip.com
3780 Mansell Road, Suite 130
Alpharetta, GA 30022
Tel: 770-640-0034
Fax: 770-640-0307
Rm. 2401-2402, 24th Floor,
Ming Xing Financial Tower
No. 88 TIDU Street
Chengdu 610016, China
Tel: 86-28-86766200
Fax: 86-28-86766599
Boston
China - Fuzhou
2 Lan Drive, Suite 120
Westford, MA 01886
Tel: 978-692-3848
Fax: 978-692-3821
Unit 28F, World Trade Plaza
No. 71 Wusi Road
Fuzhou 350001, China
Tel: 86-591-7503506
Fax: 86-591-7503521
Atlanta
Chicago
333 Pierce Road, Suite 180
Itasca, IL 60143
Tel: 630-285-0071
Fax: 630-285-0075
Dallas
4570 Westgrove Drive, Suite 160
Addison, TX 75001
Tel: 972-818-7423
Fax: 972-818-2924
Detroit
Tri-Atria Office Building
32255 Northwestern Highway, Suite 190
Farmington Hills, MI 48334
Tel: 248-538-2250
Fax: 248-538-2260
Kokomo
2767 S. Albright Road
Kokomo, IN 46902
Tel: 765-864-8360
Fax: 765-864-8387
Los Angeles
18201 Von Karman, Suite 1090
Irvine, CA 92612
Tel: 949-263-1888
Fax: 949-263-1338
San Jose
1300 Terra Bella Avenue
Mountain View, CA 94043
Tel: 650-215-1444
Fax: 650-961-0286
Toronto
6285 Northam Drive, Suite 108
Mississauga, Ontario L4V 1X5, Canada
Tel: 905-673-0699
Fax: 905-673-6509
ASIA/PACIFIC
Australia
Suite 22, 41 Rawson Street
Epping 2121, NSW
Australia
Tel: 61-2-9868-6733
Fax: 61-2-9868-6755
China - Hong Kong SAR
Unit 901-6, Tower 2, Metroplaza
223 Hing Fong Road
Kwai Fong, N.T., Hong Kong
Tel: 852-2401-1200
Fax: 852-2401-3431
Singapore
Taiwan
Kaohsiung Branch
30F - 1 No. 8
Min Chuan 2nd Road
Kaohsiung 806, Taiwan
Tel: 886-7-536-4818
Fax: 886-7-536-4803
Taiwan
Taiwan Branch
11F-3, No. 207
Tung Hua North Road
Taipei, 105, Taiwan
Tel: 886-2-2717-7175 Fax: 886-2-2545-0139
EUROPE
China - Shanghai
Austria
Room 701, Bldg. B
Far East International Plaza
No. 317 Xian Xia Road
Shanghai, 200051
Tel: 86-21-6275-5700
Fax: 86-21-6275-5060
Durisolstrasse 2
A-4600 Wels
Austria
Tel: 43-7242-2244-399
Fax: 43-7242-2244-393
Denmark
China - Shenzhen
Regus Business Centre
Lautrup hoj 1-3
Ballerup DK-2750 Denmark
Tel: 45-4420-9895 Fax: 45-4420-9910
Rm. 1812, 18/F, Building A, United Plaza
No. 5022 Binhe Road, Futian District
Shenzhen 518033, China
Tel: 86-755-82901380
Fax: 86-755-8295-1393
China - Shunde
Room 401, Hongjian Building, No. 2
Fengxiangnan Road, Ronggui Town, Shunde
District, Foshan City, Guangdong 528303, China
Tel: 86-757-28395507 Fax: 86-757-28395571
China - Qingdao
Rm. B505A, Fullhope Plaza,
No. 12 Hong Kong Central Rd.
Qingdao 266071, China
Tel: 86-532-5027355 Fax: 86-532-5027205
India
Divyasree Chambers
1 Floor, Wing A (A3/A4)
No. 11, O’Shaugnessey Road
Bangalore, 560 025, India
Tel: 91-80-22290061 Fax: 91-80-22290062
Japan
Benex S-1 6F
3-18-20, Shinyokohama
Kohoku-Ku, Yokohama-shi
Kanagawa, 222-0033, Japan
Tel: 81-45-471- 6166 Fax: 81-45-471-6122
France
Parc d’Activite du Moulin de Massy
43 Rue du Saule Trapu
Batiment A - ler Etage
91300 Massy, France
Tel: 33-1-69-53-63-20
Fax: 33-1-69-30-90-79
Germany
Steinheilstrasse 10
D-85737 Ismaning, Germany
Tel: 49-89-627-144-0
Fax: 49-89-627-144-44
Italy
Via Quasimodo, 12
20025 Legnano (MI)
Milan, Italy
Tel: 39-0331-742611
Fax: 39-0331-466781
Netherlands
P. A. De Biesbosch 14
NL-5152 SC Drunen, Netherlands
Tel: 31-416-690399
Fax: 31-416-690340
United Kingdom
505 Eskdale Road
Winnersh Triangle
Wokingham
Berkshire, England RG41 5TU
Tel: 44-118-921-5869
Fax: 44-118-921-5820
02/17/04
DS00929A-page 22
 2004 Microchip Technology Inc.