Extreme's Blog :Return to Blog
There are lots of ways to measure the temperature of an object. One very simple way is to use a semiconductor sensor, such as the National Semiconductor LM35 IC. This sensor is accurate to within 0.5 °C at 25 ºC, and few other sensors can do better or even come close to this level of accuracy. In the circuit described here, the sensor (IC2) generates an output voltage of 10 mV/°C, so the minimum temperature that can be measured is 0 °C. At 25 °C, the output voltage of the sensor is (25 °C × 10 mV/°C) = 0.25 V.
The circuit uses a TLC271 opamp as a comparator. It compares the voltage from the temperature sensor, which is connected to its non-inverting input (pin 3), with the voltage on its inverting input (pin 2). The latter voltage can be set with potentiometer P1. If the voltage from the sensor rises above the reference value set by P1 (which represents the desired temperature), the output of the comparator toggles to the full supply voltage level. The output is fed to transistor T1, which acts as a switch so the output can handle more current.
This makes it possible to energize a relay in order to switch a heavy load or a higher voltage. The transistor also supplies current to LED D1, which indicates whether the temperature is above the reference value. The reference value can be adjusted by P1 over the range of 18–30 °C with the indicated component values. Of course, you can adjust the range to suit your needs by modifying the value of R1 and/or R2. To prevent instability in the vicinity of the reference value, a small amount of hysteresis is provided by resistor R4 so the temperature will have to continue rising or falling by a small amount (approximately 0.5 °C) before the output state changes.
The LM35 is available in several different versions. All versions have a rated temperature range of at least 0–100 °C. One thing you may have to take into account is that the sensor has a relatively long response time. According to the datasheet, the sensor takes 3 minutes to reach nearly 100% of its final value in still air. The opamp has very low drift relative to its input voltages, and in the low-power mode used here it draws very little current. The sensor also draws very little current, so the total current consumption is less than 80 µA when LED D1 is off.
The advantage of low current consumption is that the circuit can be powered by a battery if necessary (6 V, 9 V or 12 V). The sensor has a rated operating voltage range of 4–30 V, and the TLC271 is rated for a supply voltage of 3–16 V. The circuit can thus work very well with a 12-V supply voltage, which means you can also use it for car applications (at 14.4 V). In that case, you must give additional attention to filtering out interference on the supply voltage.
Source: Elektor Electronics 12-2010