
AN685| Application Note
Maxim > App Notes > TEMPERATURE SENSORS and THERMAL MANAGEMENT Keywords: temperature sensors, temperature switches, thermal comparators, remote diode temperature sensors
Aug 04, 2000
APPLICATION NOTE 685
How to Simplify the Interface between Microcontroller and Temperature Sensor
Abstract: Temperature is an analog quantity, but digital systems often use temperature to implement measurement, control, and protection functions. If you apply the right techniques and components, the necessary conversion of analog temperature to digital information won't be difficult. This application note discusses thermal comparators, PWM-output temperature sensors, and remote diode (or thermal diode) temperature sensors. Temperature is an analog quantity, but digital systems often use temperature to implement measurement, control, and protection functions. If you apply the right techniques and components, the necessary conversion of analog temperature to digital information won't be difficult. Reading temperature with a microcontroller (uC) is simple in concept. The uC reads the output code of an analogto-digital converter (ADC) driven by a thermistor-resistor voltage divider, analog-output temperature sensor, or other analog temperature sensor (Figure 1). The ADC built into some controllers can simplif
y this design. ADCs require a reference voltage, which can be generated by an external device. For example, the reference voltage for a thermistor sensor is usually the same as that applied to the top of the resistor-thermistor voltage divider. However, the following complications can arise in these systems:
q
q
q
q
q
The sensor's output-voltage range is significantly smaller than the ADC's input-voltage range. A typical ADC for this purpose might have 8-bit resolution and a 2.5V reference voltage, which is normally equivalent to the input-voltage range. If the sensor's maximum output for the temperature range of interest is only 1.25V, the effective resolution drops to 7 bits. To achieve 8-bit resolution, either add gain via an external op amp or lower the ADC's reference voltage (which may reduce the accuracy of some ADCs). The error budget is tight. Combining the error from the thermistor-resistor combination or analogsensor device with those contributed by the ADC, the amplifier offset voltage, the tolerance of gainsetting resistors, and the voltage reference error may be more error than your system can tolerate. You want a linear temperature-to-code transfer function and you're using a thermistor. The transfer function for thermistors is very nonlinear, but it may be sufficiently linear over the narrow temperature ra
nge required in many applications. You can compensate for the nonlinearity with a lookup table, but this approach requires resources that may not be available. ADC inputs are limited. If the number of temperatures you want to measure exceeds the number of ADC inputs available, you may need to add a multiplexer, which will increase the cost and development time. The number of uC I/O pins is limited. This won't be an issue for an internal ADC, but an external serial ADC will require two to four I/O pins as an interface to the uC.
AN685 Application Note maxim Download PDF
Add this permalink to your bookmarks for future download of AN685 ApplicationNote
Permalink: http://application.emcelettronica.com/maxim/AN685