|
||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||
|
|
by Bonnie C. Baker, Microchip Technology, Inc. In process and industrial-control environments temperature sensors are almost as prolific as operational amplifiers are in analog circuits. Most commonly temperature sensors such as the diode, thermistor, RTD, thermocouple, and silicon thermometer are used to capture critical thermal information. With these applications the required levels of accuracy and temperature range vary from situation to situation. However, if a temperature range of 50ý C with ý 1.5ýC error band is all that is required, simplicity might be the best strategy. For example, a simple, inexpensive, smart solution can use a combination of a few resistors, a capacitor and a microprocessor to achieve this good performance with processor memory to spare. The Embedded Temperature Sensor Signal Path In the spirit of simplicity, the easiest solution would be to bring the temperature sensor as close to the microcontroller as possible (see Fig.1.) A standard thin-film resistor is placed in parallel with the thermistor, which implements a first-order thermistor linearization. This parallel combination of a thermistor and standard resistor provides linear performance over a 50ý C range that falls within an error band of ý1.5ýC. The value of this resistor, RPAR, is chosen to equal the value of the thermistor at the mid-point of a 50ýC temperature range. For example, take an application that has a temperature range from 25ýC to 75ýC. A 10 kW thermistor is equal to approximately 3.6 kW at 50ýC. In order to implement linearization in the temperature range of 25 to 75ýC, the linearization resistor, RPAR, should also equal 3.6 kW . Once the parallel resistance (RPAR) has been determined the reference resistor, RREF, can easily be selected. For optimum performance, the reference resistor is selected to be equivalent to the resistance of the NTC thermistor in parallel at the nominal temperature (RREF = 1.8 kW.) ![]() Circuit Implementation To perform an Analog-to-Digital conversion with this circuit (Fig. 1, again) GP1 and GP2 should be set as inputs. Additionally, GP0 should be set as a low output in order to discharge the capacitor, CINT. Once the capacitor is fully discharged GP0 should be changed to an input and GP1 to a high output. The microcontroller then counts the number of clock cycles before GP0 changes to a high, measuring the rise time (tNTC) of the (RNTC || RPAR)/CINT circuit. With this count in memory, GP1 and GP2 should be set as inputs again and GP0 set as a low output, which discharges the capacitor, CINT. When the capacitor is fully discharged GP0 is again changed to an input and GP2 is set to a high output. The microcontroller then counts the number of clock cycles before GP0 changes to a high, which measures the rise time (tREF) of the RREF/CINT circuit. Analysis of the Results The rise time of an R/C network such as that in Fig. 1 is equal to: t = - RC ln (1 Vth / VDD) where, Vth is equal to the threshold voltage of the controller input gate, GP0, VDD is equal to the power supply voltage of the microcontroller, R is equal to the resistor in the circuit, and, C is equal to the capacitor in the circuit. If, in the relationship between these two rise times (see Fig.2), the ratio of the threshold voltage of the gate GP0 (Vth) and the power supply voltage to the microcontroller (VDD) is constant, the relationship between the rise time of the circuit containing RREF and the circuit containing RNTC||RPAR is equal to: RNTC||RPAR = (t1/t2) * RREF or, RNTC = (t1*RREF * RPAR)/(t2 * RPAR t1 * RREF) ![]() Choose the Capacitor with Care In this circuit (of Fig. 1) the conversion accuracy is independent of the power supply voltage, VDD, and the threshold voltage of the input gate on GP0. Additionally, since the two time constants of these similar networks are compared, errors due to capacitor leakage and non-linearity are minimized. The value of the capacitor is then dependent on the controllers processor time. For best results, a stable, low-leakage, capacitor such as a polypropylene or NPO ceramic should be used. With all this said, even the best of capacitors will exhibit the phenomenon of memory. The combination of the dielectric absorption and the capacitor discharge voltage will determine the magnitude of this remnant charge. A technique that can be used to minimize this affect is to discharge the capacitor to the same trip point every time. Keeping it Simple If simplicity is what you are after, this temperature-sensing circuit is a perfect fit. The hardware requirements are minimal and include a microprocessor (with a counter), one thermistor, two resistors and one capacitor. The firmware requirements are equally straight forward where a counter is used to measure the temperature circuit and then the reference circuit. These two measurements are used in a simple calculation to obtain the final temperature measurement results. Analog Main | Product of the Week | Columns | Editorial | Tech Notes
|
|||||||||||||||||||||||||||||||||||
|
Copyright © 2003 ChipCenter-QuestLink About ChipCenter-Questlink |
||||||||||||||||||||||||||||||||||||