This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

TL331: TL331IDBVR : Voltage comparator design

Part Number: TL331

We want to Trigger the MOSFET when the temperature is below 0°C. Please comment on the attached circuitry we build for this.

  • Hi Gokul,

    hhm, how many R4739 do you have in your schematic?? Very confusing...

    Without adding hysteresis your circuit is in danger to oscillate. This has to do with the fact that both input voltages of comparator and the heater are hanging on the same supply voltage and when the MOSFET turns-on a voltage drop on the supply voltage can feedback to the inputs resulting in oscillation.

    Because of this, mount a high ohmic resistor from the +input of comparator to the output of comparator to add hysteresis. Also mount a decoupling cap from the +12V terminal of heater to the source of MOSFET and connect a filtering cap in parallel to R4739 (below the NTC).

    If this is not sufficient, also filter the supply voltage of the voltage divider being connected to the +input of comparator by a simple RC low pass filter (1k + 1µF or so).

    Two additional points:

    1. If the heater shows any inductance, mount a free wheeling diode in parallel (inductive kickback !).

    2. If the MOSFET has a big gate source capacitance, insert a small current limiting resistor into the output of comparator. This limits ground bounce within the comparator and limits the injection of switching noise into signal ground.


  • Hi Kai,

    Thanks for your valuable feedback. Kindly see the updated schematics and let me know your thoughts on the same.

  • Hello Gokul,

    Do NOT place a capacitor (C3928) on the positive node when applying hysteresis. This capacitor will cause a delay in the feedback, which can cause "bursting" at the threshold. The cap on the negative input is fine.

    Since you are using a heater, and using the heater supply to create your reference voltage, keep an eye on the voltage drop on the supply, particularly after the RF choke.

    You will need to adjust the value of the feedback resistor to find the best response for your system - so allow the resistor value to be changed when testing (or use a 1M pot in series with a 100k resistor to allow tweaking).

  • Hi Paul,

    Thanks for your valuable feedback.

  • Hi Gokul,

    you still need a cap from pin 2 of "J109" to the source of MOSFET (pin 2).

    "C3928" should be removed. It's counterproductive having a cap at the +input of comparator when using hysteresis. Remember that the feedback from the output of comparator to the +input (hysteresis) shall help to traverse the threshold region of comparator faster and to a greater extent. But "C3928" will slow down this traversing again and by this destroy the hysteresis effect. It is as if you would brake and accelerate in a car at the same time. Think about what it means to the +input of comparator when the output of comparator toggles from low to high or high to low.


  • Hi Kai,

    I understood the effect of C3928. I can remove it. 

    Let me know since the output of comparator TL331 is open drain, do we required the feedback resistor 1M?

  • Hi Gokul,

    yes, of course, since it is a positive feedback providing hysteresis:


    See what happens when unwanted noise is superimposed to the signal. Omitting hysteresis will result in "bursting", as already mentioned by Paul:



  • Hello Gokul,

    As Kai shows so elegantly, the 1M resistor adds positive feedback, or hysteresis, to prevent "chatter" on slow moving inputs when approaching the threshold.

    Since this is a temperature detection circuit, it is assumed that the temperature change will be slow (few things change temperature in microseconds). So there could be a temperature range near the threshold where the output chatters. Hysteresis will prevent this chatter.

    Please see the following appnotes:

    Comparator with and without hysteresis circuit (Rev. A)

    Inverting comparator with hysteresis circuit (Rev. A)

    Non-inverting comparator with hysteresis circuit (Rev. A)

  • Hi Kai,

    Thank you so much. You explained it deeply and clearly.

  • Hi Paul,

    Thank you for your follow up and further comments and data. 

  • Good luck Relaxed