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
sir I have changed nothing only just a preset I have lowered the value to the 5k and now it’s working! is this good ?
But as per our previous discussions, you were supposed to change the 10k resistor with a 470 ohms so that the MOSFET gate can get proper current, right? And also the 12V zener diode to 15v zener? Anyway, 24V cannot show at pin#3 of the opamp, because we have 12V zener across it. Something’s wrong in your circuit. If 5k preset works for you, you can use it.
hey there 👋🏻 sir how are you ! I have a question right now I’m facing a problem which is why I’m getting 24v maximum at lm358 at pin 3 ? and why the whole circuit is getting turned of at 9v ? previously I never faced this kinda issue but why now ? I have replaced bc546, bd140 and also new ic but then again same issue! why ?
Hey Neeraj, I am good, thank you!
The problem you are facing should never happen, because you already have a 12V or 15V zener after the 470 ohms you changed in place of the previous 10k 1 watt resistor.
That means the 10k preset is connected across this 12V or 15V supply, so how can pin#3 of the opamp get 24V?
Please check the voltage across this zener diode and confirm the results once again…
sir can we include a small series resistor (e.g., 10Ω) in series with each MOSFET gate ? for good current sharing? and if yeah then how ? and yeah I’m going with 15v zener and 470ohm 5w diode
Yes, you can do it in this way: From the gates of each MOSFET connect a 10 ohm resistor, and then join the other ends of the two 10 ohms with the common gate supply input. That’s all!!
no sir I can’t replace mosfets now but can we use 10k 5w or 2w resistor? and 15v zener diode or any other power resistor because serious changes can cause me so much now ! please 🙏🏻
You can use two 1k, 2 watt in parallel, to increase current, if you don’t want to use the extra BJT.
First, try with a single 1k 5 watt, if it works then good, otherwise use two 1k 2 watt in parallel, or use a single 470 ohm 5 watt.
Also, replace the gate zener with 15V zener diode…
So I need to buy 1k 5watt resistor and 15v zener diode? ? and also the resistance value is not too much lower nah ? like from 10 k to 1 k ?
Actually even with 1k, the current will be just 50 ma, which might be not enough to operate the gate of the high current MOSFET….in that case I would recommend using a transistor driver, as shown below….if possible replace the transistor with a Darlington transistor such as TIP122…

hello sir how are you I hope you’re fine I have a one question why my mosfets are getting crashed all the time I’m using 2 irf540n MOSFETs in parallel as you suggested me with the 12 V zener diode but after sometime one of the mosfets gets faulty but the other one stays perfect this cause circuit malfunction I checked it they gets heat up madly but is there any way so we can solve this issue without heatsink because I heard somewhere that limiting current at the gate of this mosfets can also cause malfunction and heat should we replace current limiting resistance 10k 1w ?
Hello Neeraj,
That’s correct. The 10k 1 watt resistor might not be able to provide sufficient gate current for the MOSFFETs. In that case, yes, please replace that resistor with a 1k 2 watt, or 5 watt wire wound resistor, and also increase the 12V gate zener diode value to 15V, and check the response.
sir please look at the link !
Neeraj,
The circuit diagram for MP4560 is easily available online.
Let me know what more information you need about this device?
For further discussion, please post your comment under the following article:
https://www.homemade-circuits.com/ic-mp1584-datasheet-and-circuit-diagram/