In this post I have explained a simple yet very accurate temperature controller circuit using IC LM35, featuring an automatic cut off with a push button latch.
LM35 is a precision temperature sensor IC, which can be effectively used for detecting temperature differences accurately. For more details regarding this IC you can refer to this article.
Circuit Diagram

How the Circuit Works
The IC1 741 is configured as a comparator circuit.
Its pin#3 which is its non-inverting input pin, is attached with the output of the heat sensor IC2 LM35.
The inverting input pin#2 of IC1 is configured with a preset P1, which is used for setting the reference voltage at pin#2.
Whenever pin#3 voltage exceeds pin#2 voltage, the IC1 output at pin#6 turn high.
Conversely, as long as pin#3 voltage remains below pin#2 voltage, the output pin#6 of IC1 remains at 0V, or logic low.
At normal room temperature the LM35 output will be low which will keep the pin#3 potential of the 741 lower than its pin#2 reference.
Therefore, when the push button is pressed, the IC741 momentarily activates sending a 0V (low) to the base of BC557 which now conducts so that the whole circuit now gets latched even if the push button is released, and stays powdered through the BC557.
In this situation the relay switches ON and its contacts shift to the N/O points. Since the heater is wired with the supply through the N/O contacts of the relay, it is also switched ON.
The heater temperature now starts rising. Since the IC2 LM35 is attached with the heater, the LM35 also starts heating up which causes its output voltage at pin#3 of IC 741 to rise proportionately.
When the LM35 output voltage at pin#3 of IC1 741 reaches a point where it exceeds its pin#2 potential, the output of IC 741 instantly reverts and goes high.
As soon as the output of IC 741 goes high, it inhibits the negative or 0V supply to the base of BC557. Due to this the BC557 turns off.
As BC557 turns OFF, it breaks the latch so that the 12V supply to the circuit is cut off, the whole circuit along with the relay is turned off.
This also turns OFF the heater and the circuit returns to its previous original condition.
How to Setup and Test
Assemble the circuit as shown in the above diagram. Initially, do not connect any heater with the relay contacts.
Keep the P1 slider fully at the positive level or fully towards R2.
Switch ON the 12V DC to the circuit.
Push and release the SW1 switch momentarily. This should instantly cause the circuit and the relay to switch ON and get latched. Both the LEDs must illuminate.
Next, using a soldering iron heat the LM35 to the desired level. Monitor the temperature with an accurate thermometer, make sure it does not exceed 100° Celsius.
Once the desired temperature is reached, slowly adjust the P1 preset until the IC1 output turns high causing the latch to break and turn OFF the relay. This is indicated by the LEDs which are now turned OFF.
Repeat the above procedure a few times to confirm the results.
The circuit is now set and ready to work with an actual heater attached with the relay contacts.
Troubleshooting
If somehow the circuit does not work, please implement the following improvements in the circuit.
Please connect a 1uF/25V capacitor across the base/emitter of the BC557 transistor. This will ensure that the circuit does not start by itself during power switch ON, rather initiates only when the push-button is pressed.
Please remove R2 (10k resistor) and replace it with a jumper. This will ensure that when initially the slider of the preset is held at the positive side, the op amp output delivers a low logic without fail.
Also, connect a 1uF/25V across pin#3 of the IC and ground, this is optional.
After finishing the above operations, please follow the steps explained under "How to Setup and Test."
Parts List
- All Resistors are 1/4 watt 5% CFR
- 1k, 4.7k = 1 each
- 10k = 2
- 4.7k preset = 1
- Semiconductors
- IC 741, IC LM35 = 1 each
- Transistor BC557 = 1
- LEDs 20mA, 5mm = 2
- Relay 12V 10 amp = 1




Questions & Answers
Thats great but it’s with much more parts and I have a question does this circuit can work with 24v 15a 360w ? Directly? And how there is no transistor to operate the relay and can I connect 24v input directly?
Yes, you can use 24V directly with a 24V relay, but then the opamp will need to be from the IC LM358.
The relay is operated by the BC557 output itself.
Yeah but 24v relay is not available widely in the Market! So if I need 12v relay to be used then I have to add 7812 in the input of the circuit?
Sorry but I couldn’t understand the “opamp will need to be from the IC LM358”
You can use the circuit as shown with 12V supply and 7812 IC but then the 7812 will heat up a lot.
If you use 24V DC and 24V relay then the opamp should be from LM358.
There are two opamps inside LM358, use any one of them.
What about the connection of the lm358 ? And I have heard that this lm358 is more versatile then the lm741. Please confirm about its connections
Pin3, pin2 and pin4 will be as it is. No change required.
Replace pin7 with pin8.
Replace pin6 with pin1.
Yes, LM358 is more efficient than IC 741.
Hey have a one Little doubt can I use this circuit with 48v ?
You can use with modifications.
Which type of modification any suggestions?
Sorry I am so needy but as we can assume 24v takes almost 15a in order to achieve 360w but on the other hand 48v needs only 7.5a for 360w and it won’t give much strain on the wire !
You will need a 48v coil relay for this, to avoid a regulator circuit, I hope that is OK with you.
So if I wanna switch from 24 to 48 then just change the relay ?
A few more modifications will be required, I will update the drawing tomorrow.
Which type of modification sir any suggestions!
You can try the following circuit:
I forgot to show a push-button between the collector/emitter of BD140, please insert a push button in that position.
Okay sir
And I can use lm358 IC instead of lm741
Yes 1/2 LM358 can be used, IC 741 will also work nicely.
It’s accuracy is same as this previous circuit?
It is the same circuit as earlier except the voltage range which is 48V now.
Also please make sure to connect a 12V zener diode between pin3 of the IC and the ground line, to ensure that pin3 voltage never exceeds the pin7 voltage of the IC.
Sir I have a one general question one of my friend asked me this question if I have 1 wire and I have 2 different loads first is 48v 360w with 7.5amps and second one is the 24v 360w with 15amps so can you tell me at which load this wire will heater up much faster ? At 48v or 24v ? Because the power is same but the amps is so different I am so confused ?
Hello Neeraj,
24V heater will burn if used with 48V, so it cannot be used. It will heat fast and burn or get damaged after some use.
It’s not about heater it’s about wire just simple copper wire
OK, sorry I misread your question. The wire will heat up more with the 24v load because it will pull more current than the 48v load.
So power doesn’t matter
Power does matter, and it’s the current in the power which does the damage, so it’s the current which needs to be considered.
And 48v is much more safer then 24v in terms of everything!
If all the relevant parameters are rated at 48V then 48V is better than 24 V in terms of power efficiency.
Sir I was working on this circuit which is shown in the article and with lm385 and the voltage is 24v but the real thing is that the push button function is not working at all and when I connect this circuit to the power it’s directly went on and also it’s can’t even sensing the temperature and also the second led is not working at all
I followed the whole stages as described in the article
And still the circuit is not working also checked all the connection and everything is fine but still !
Neeraj, the circuit is obvious and straightforward and will surely work, however it can be successfully completed only by proper understanding and proper setting up procedures. Tomorrow I will update the above article with the full step by step set up and troubleshooting procedures…please read it, understand it and go ahead accordingly…
Neeraj,
I have added the necessary details in the article under “troubleshooting”.
Please follow the steps and test the circuit without a relay and with 12V supply first. Check the LED response at the output of the opamp.
Sir I did everything for the trouble shooting but nothing worked now I got both LEDs on but the issue is same as before there is no push button function is working and no temperature sensor at all after giving it power it’s went automatically on that’s all I also connected 1uf capacitor at pin3 of the IC to the ground! Also I am using UA741CN IC! -_-
Hi Neeraj,
Please note that 741 might burn if supply voltage is above 15V.
Try the following basic setup without relay, without LM35, and with 12V and first confirm the push button action:
Hey sir it’s working perfectly with 12.3v what’s the next steps!
Neeraj,
Now first check and confirm the working of the LM35 ic separately.
Connect its vcc pin to 12v, gnd pin to gnd and connect a voltmeter across it’s out pin and gnd….heat it slowly with soldering iron upto 70 degrees and check the voltage output, if the voltage increases proportionately, then your lm35 is OK, now you can connect it with opamp pin3 as shown in the previous diagram…and check the circuit as explained in the above article, make sure lm35 is cooled down before initiating the testing procedures.
sorry sir I know it’s been a whole month actually my grandmother was died and on the next week my grandfather also so I couldn’t test those lm35 but I have returned from the village so I tested the lm35 and heated it and connected multimeter’s ground to the lm35 ground and positive to the output pin of the lm35 but I got confused the voltage is increasing after heating it up but it’s too fluctuates ! the voltage at the output pin and gnd of the ic fluctuates so much that’s why I didn’t get the accurate results! what should I do now !
Hi Neeraj,
Please refer to youtube videos, you can find some good videos which shows how to test Lm35 IC. The output should rise slowly as long as the temperature rises, and as soon as the heat source is removed the output voltage should start dropping towards.
The range of the meter should be set to 2V or 1.5V.
The meter reading will fluctuate as the temperature is connected or removed.
Make sure you do not exceed the temperature above 100 degrees C.
sir I tried everything after testing push button function I connected the lm35 to the pin3 of the 741ic and heated it but nothing happened with the preset was turned up fully and the input voltage was 12v ! I bought 3 lm35 ic’s but got the same result! either the store owner is crock or my luck is faulty ! I don’t know ?
Neeraj,

It will work only if you do it with proper understanding.
LM35 must be connected to pin#2 of the new circuit which is suggested, not pin#3
The idea is simple, after pressing the push button the red LED will illuminate.
After this when Lm35 is heated it will create a rising voltage at pin#2.
As soon as the pin#2 voltage rises above the pin#3 voltage (as per the preset setting) the latch will break and the red LED will shut off, the transistors will shut off.
It is a simple circuit and should work immediately without much efforts.
Sorry sir but suggest me other temperature ic because I have tried 4 lm35 and nothing happened i have checked all the circuit again and again and did not found any miscommunication but still lm35 is not working as it should have to be suggested me another ic so I can complete our remaining work and after that if I visit outer market from the town then I will buy the good quality lm35 but for now suggest me other temperature ic! Please
Neeraj, if your LM35 output is not increasing from around 100mV to 700mV in response to temperatures from 30 degrees C to 100 degrees C, that means your IC is not good. If it does, then your circuit will definitely work.
Unfortunately there are no other equivalent type temperature sensing ICs which are commonly available in the market.
I would still recommend checking the LM35 separately and see whether the output increases from 100mV to 700mV or not…there are many youtube videos you can refer to.
Sir can you suggest me how to check the 741ic because after getting right lm35 the circuit isn’t working! I have taken every step carefully all the time but still unable to make it ☹️☹️? this is so bad it’s shameful for me because I can’t even make this simple circuit!
Hi Neeraj,

In the the following circuit, suppose you set the preset so that voltage at pin#3 of the IC is 0.5V. Now, when you heat the Lm35 if its output voltage at pin#2 of the IC exceeds the 0.5V then the output pin#6 will turn from 12v to 0V, turning off the transistors and breaking the latch.
Before the above operations you must press the push button to latch the IC 741 so that pin#6 is at 12V.
So basically when pin#3 voltage is higher than pin#2, then the output is high or at +DC supply level.
If the voltage at pin#3 goes below pin#2 voltage, then the output voltage at pin#6 becomes low or 0V.
Conversely, when pin#2 voltage is higher than pin#3, then the output is low or 0V.
If the voltage at pin#2 goes below pin#3 voltage then the output voltage at pin#6 becomes high or +DC supply level.
More can be found here:
https://www.homemade-circuits.com/how-to-use-ic-741-as-comparator/
Sir can you please make a video on this circuit because whatever I do i fail all the time I am desperate right now please make a video on this circuit and how do you make it I wanna see it where is i am wrong because now I do everything right but at the end the results are same as before ? it’s my humble request to you please make a video on this circuit and also show me how to make it from scratch on your YouTube channel please because I have done previously so much works with circuits but this one is so simple but frustrating please make a video it’s my humble request and tomorrow is my birthday if this circuit won’t work tomorrow then I can’t celebrate my birthday happily !
Neeraj, a video is not required for such a simple operation. You are not not reading the steps and not discussing the results that’s why you are not able to solve it.
You have already confirmed that when you press the push button the 741 latches and the LED turns on, right?
Next, you just have to set the preset mid-way and touch the pin2 to positive for a second then remove, this should break the latch and revert the circuit to its original position, with LED switched off.
Yeah but today I was frustrated and i remade the circuit again but now the new circuit is not even functional for the push to on and the 741ic is not latching I have checked the all the connection but every connection was good but still didn’t got the result! Why ? Sometimes it’s works and sometimes it’s don’t why ? I am using all new components but still unable to make it happen why!
Please build it by soldering on a strip-board and then it should work. If you try it on breadboard it can be difficult to get the correct results. Use an IC socket when you build it on a strip board.
Sir I know the breadboard is not good that’s why I am using zero pcb which you have suggested me right now how can I upload pictures of our circuit on the comment section if I can then I will show you