Build Your 3-Degree Thermostat Circuit with LM339

Circuit diagram

Electronic Thermostat and Relay Circuit-Circuit diagram

Description

This document presents a basic thermostat circuit designed for controlling a relay and providing power to a small heating element via the relay contacts. The relay contacts are required to have a current rating exceeding the demands of the heating element.

Temperature fluctuations are monitored using a (1.7K @ 70F) thermistor, integrated in series with a 5K potentiometer. This combination generates approximately 50 millivolts per degree Fahrenheit at the input of the LM339 voltage comparator. The two 1K resistors, connected to pin 7, establish the reference voltage, setting it to half the supply voltage and defining the hysteresis range at roughly 3 degrees or 150 millivolts. This hysteresis range – the temperature span within which the relay engages and disengages – can be modified using the 10K resistor situated between pins 1 and 7. Increasing this resistance value will result in a narrower range.

LM339 Voltage Comparator

The LM339 is a versatile comparator integrated circuit widely utilized in analog circuits. It compares two input voltages and outputs a high or low voltage based on which input is greater. In this circuit, the LM339 acts as a voltage comparator, efficiently detecting the temperature difference generated by the thermistor. This IC simplifies the temperature sensing process and provides a stable and accurate output for controlling the relay. Its operation is based on comparing the voltage across the thermistor with a reference voltage, enabling precise temperature control.

In operation, the series resistor is adjusted to ensure the relay switches off precisely at the desired temperature. A 3-degree variation in temperature should trigger the relay to switch back on and remain active until the temperature returns to the set point. The relay behavior can be reversed by swapping the positions of the 5K potentiometer and thermistor. The 5.1-volt zener diode stabilizes the circuit voltage, preventing operational disruptions due to minor variations in the 12-volt supply. The voltage across the thermistor is designed to be approximately half the supply voltage – around 2.6 volts – when the temperature falls within the 3-degree range determined by the potentiometer. Various thermistors can be employed, but their resistance should be above 1K ohm at the operating temperature. The series resistor is selected to be roughly twice the thermistor's resistance to center the adjustment range.