In this article, we are going to make a simple Analog Temperature Controller using OP-Amp and Relay. This is a basic article, that can be used as a reference for large designs. If you understand it clearly, you can apply it in other controls. So let’s start!

Disclaimer:

You can this article too: Analog Temperature controller for an incubator with Capacitor Power Supply

## The basic of comparator:

Comparator is one of the modes of the Op-Amp circuit. It is pretty simple in a configuration like this image below:

The output of the comparator is high if the non-inverting input voltage is higher than the inverting input pin. And the output is low if the non-inverting pin is lower than in voltage reading than the inverting pin. Here, we can take one pin as a reference and the other pin as an input pin. This is a totally simple operation. But there are some problems using in this condition while you are controlling something like a switch or relay or a load. Because, if the input voltage is almost the same as the reference voltage, the output will fluctuate. Check this image carefully.

The output is fluctuating for a very short time. This will definitely kill the relays if this is not conditioned. You may think about adding capacitor filters but that will not improve it. To solve this problem, we need to use the comparator circuit as a Schmitt-Trigger circuit or a comparator with hysteresis.

#### Ecplanation:

Here, a resistor R2 is used as a feedback resistor. This feedback resistor works as our hysteresis control resistor. Think in a simple way, whenever the input Vin is lower than the reference voltage, the output will be high. Then the feedback resistor will carry a minor current to the reference pin which increases the pin voltage a little. That makes the reference voltage a little higher than the present Vin voltage. So to turn the output off, the Vin pin has to be a little extra higher than the previous reference voltage.

But once it is higher than the preset reference voltage, the output will be low. Again the feedback resistor will draw some current from the reference pin which will actually reduce the actual reference voltage by a little. Now what? the Vin pin needs to be lower than this voltage (actual reference voltage + voltage droop due to the feedback resistor). This way the hysteresis works.

This hysteresis helps to control the output from fluctuating at the same input voltage range. That protects relays from chattering ensuring longer life.

Now, we can apply the comparator circuit in our project.

## Circuit diagram:

Here is the circuit diagram of our Analog Temperature Controller:

Here, a common Op-Amp LM358 is used where the R6 is our feedback resistor. Tuning the potentiometer RV1, we can set our temperature range. Then sensor RT1 is a 10KOhms NTC type temperature sensor. When the temperature is higher than the setpoint, the relay will be turned on and the heater is off. The same circuit can be used for cooling purposes too connecting a cooler in the other terminal of the relay.

## Conclusion:

Many people ask me to post simplified projects so that they can understand them. That is why this article is posted and I tried it the maximum simple I can do. I hope this will help you to understand the circuit. If still, you have any problem, kindly comment below. And don’t forget to subscribe.

For Professional Designs or Help:

See you in the next article, Thanks.

Check this: 6V Lead-Acid battery charger circuit

#### MKDas

Mithun K. Das; B. Sc. in EEE from KUET; Head of R&D @ M's Lab Engineering Solution. "This is my personal blog. I post articles on different subjects related to electronics in the easiest way so that everything becomes easy for all, especially for beginners. If you have any questions, feel free to ask through the contact us page." Thanks.