Comparator (Thermal Control with Hysteresis)

Status
Not open for further replies.

abuyaser

New Member
The circuit I have built is attached, it uses LM393N single power supply.
* Note: The BJT npn transistor is built inside the comparator it selt and I just placed it in the LTSpice comparator one to make it functions like the real one.

My problem is that I could not calculate the resistance value for the hysteresis. I set reference voltage to 2.275 V because I need the fan to operate at 40 degrees Celsius. the hysteresis should be between 40 and 35 degrees Celsius. I could not figure out the calculations.

The temperature sensor is AD22100 which is linear and the output equation for this sensor is: VOUT = (V+/5 V) × (1.375 V + 22.5 mV/°C × TA)
V+ in this case is 5 VDC and TA= 40 Degrees Celsius.

Please advice in how to calculate the resistor values to get hysteresis between 35 and 40 degrees Celsius.
 

Attachments

  • Untitled.png
    121.2 KB · Views: 251


Hi there,


Lets see if we can make this easy. The following takes all the guess work out of the process of selecting the resistor values.

If we first calculate what voltages we want for the high trip point and the low trip point and choose R2 to be some value like 10k for example, we can calculate the other two resistors R1 and R3 (R3 will be the hysteresis resistor) knowing a few other things about the circuit.

Before we get to that however i should mention that you need a resistor between your comparator output and the transistor base if the comparator puts out a logical high without a pullup resistor.

A few things we have to know about the circuit before we can calculate the exact resistor values:
1. The power supply voltage, Vcc.
2. The output of the comparator when it goes to a high level, Vout.
3. The output of the comparator when it goes to a low level (output saturation voltage), Vsat.
4. The high level trip point voltage we want the comparator to trip at, vtpH.
5. The low level trip point voltage we want the comparator to trip at, vtpL.

Knowing those things (or measuring them), we calculate R1 from this:
R1=(Vsat*R2*vtpH-Vout*R2*vtpL)/((Vout-Vcc)*vtpL+(Vcc-Vsat)*vtpH+Vcc*Vsat-Vcc*Vout)

Then once we know R1 we can then calculate R3 (the hysteresis resistor) from this:
R3=(R1*R2*(vtpH-vtpL+Vsat-Vout))/((R1+R2)*(vtpL-vtpH))

For example, lets say Vcc=5v and Vsat=0.2v and Vout=4v, and we want the comparator to trip at the high point of 3v and the low point of 2v, and we choose R2=10k. This gives us:
Vcc=5
Vsat=0.2
Vout=4
vtpH=3
vtpL=2
R2=10000


Inserting those values into the equation for R1 we come up with:
R1=11212.12 ohms

and inserting that plus the other values into the equation for R3 we come up with:
R3=14800

With those values we'll see the comparator trip at 2v when the input is low going and 3v when the input is high going.

To get the two trip points you would calculate the output of your sensor for the desired two temperature points.

Obviously the two trip point values have to be such that they are less than the supply voltage and the high one is higher than the low one.

If your comparator requires a pullup resistor we'll have to include that into the equations next time.
 
Last edited:
Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…