Build Your Smart Temperature-Controlled Switch Circuit

Description

It sounds rather mysterious: a switch that is controlled by its ambient temperature. All without the touch of a human hand, except for when you’re building this sort of electronic thermostat. There are a lot of handy uses for a thermally controlled switch. If the temperature inside your PC gets too high sometimes, the circuit can switch on an extra fan. You can also use it to switch on an electric heater automatically if the room temperature is too low. There are innumerable potential applications for the thermostat described here.

Circuit diagram:

Temperature-Controlled Switch-Circuit diagram

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.

National Semiconductor LM35

The LM35 is a three-terminal integrated circuit sensor that is used to measure temperature. It provides a linear output voltage that is proportional to temperature. This allows for easy integration into temperature measurement circuits. It is a popular choice for applications where a precise and easily readable temperature measurement is required.

TLC271

The TLC271 is a low-power operational amplifier with a comparator function. It is often used in analog circuits for comparison and switching applications, offering a precise way to define and respond to voltage thresholds.

TLC271 Opamp

The TLC271 is a low-power operational amplifier that can be used as a comparator. Its low power consumption makes it suitable for battery-powered applications, and its comparator functionality allows it to switch based on voltage levels.

T1 Transistor

Transistor T1 is a NPN transistor used as a switch. It is controlled by the output of the TLC271 comparator. When the comparator output is high, the transistor turns on, allowing current to flow through a relay, which can switch on a heavy load or a higher voltage circuit.

D1 LED

LED D1 is a light-emitting diode that indicates whether the temperature is above the reference value. It turns on when the comparator output is high, visually showing that the temperature has exceeded the setpoint.

P1 Potentiometer

Potentiometer P1 is a variable resistor that is used to set the reference value for the temperature. By adjusting the potentiometer, you can change the temperature at which the circuit activates.

R1, R2, R4

R1, R2, and R4 are resistors that are used to fine-tune the circuit’s performance and stability. R1 and R2 are used to set the reference voltage for the comparator, and R4 provides hysteresis to prevent instability near the reference value.
author: Elektor Electronics 12-2010
circuit from http://www.extremecircuits.net/2010/04/temperature-controlled-switch.html