Comparitor Hysteresis Question

Thread Starter

Razzle308

Joined Mar 17, 2016
49
Hi all.

I am building this comparitor circuit to run thermo fans on my car.
Its working except I need to tighten up the hysteresis.
At the moment it cuts in at say 90degC and cuts out at around 80degC.
I need a variation of just 5degC. (cut in at 90, cut out 85.)
But when try to trim the pot further it weirds out the circuit altogether.

http://everycircuit.com/circuit/4930457976963072

Temp circuit.jpg


Anyone able to help please?
TIA.
 

danadak

Joined Mar 10, 2018
4,057
The LM139 is open collector output, so I do not see a pull up to achieve
a high level to enable cutting off the PNP.

upload_2019-4-19_6-3-2.png


Regards, Dana.
 

Thread Starter

Razzle308

Joined Mar 17, 2016
49
Thanks for your reply Dana.

Excuse my noobness but i dont exactly know what is meant buy an open collector. I understand the pullup.. What size should it be and will this help with the hysteresis?

Thanks.
 

AnalogKid

Joined Aug 1, 2013
12,126
Because the thermistor is part on the non-inverting input circuit along with the hysteresis adjustment, the two interact. Things will be much better when you add the pull up resistor, because now the thermistor is acting to keep the output transistor turned on a little bit even when the comparator output is off.

The solution is to swap the two comparator inputs and relocate the thermistor. All the same parts, just in different places. Also, you are depending on the vehicle power to be stable, but it is not. Variations in the 12 V supply will affect the trip points of the circuit.

And, you need to add a diode across the relay coil to suppress the voltage spike that occurs when it is turned off.

This is much easier to discuss if you add reference designators (U1, R2, etc.) to every component, and pin numbers to the active devices.

ak
 
Last edited:

Wolframore

Joined Jan 21, 2019
2,619
everycircuit app has it's limits...

1. you can't assign numbers to components
2. the library is limited so that OPAMP is missing some pins.
3. most the components have strange values assigned (the MOSFET symbols are like the old FET, variables are like designing chip level)

I use it once in a while to do quick analog/logic sim but it's very limited.

On the other hard the current flow visual is very cool.
 

AnalogKid

Joined Aug 1, 2013
12,126
No schematic capability today, so we're doing it text-style.

Ignoring the hysteresis pot for the moment, the inputs to the 139 form a bridge. To swap the inputs and keep the functionality and output polarity, the two lower components (connected to GND) become the upper components (connected to Vcc), the two fixed 10K resistors become the lower components, and the non-inverting input goes to the reference divider, and the inverting input now goes to the thermistor string. Now, as the temperature increases, the thermistor resistance decreases, pulling the inverting input high until it crosses the non-inverting input voltage, and the output goes low turning on the fan. Same four parts, just like rotating tires: bottom right swaps with lower left, bottom left swaps with lower right.

The hysteresis feedback still connects to the non-inverting input. Now that input does not change with temperature, making the calculations much easier. Since you need only about a +/-5 or +/-10 degree adjustment window around your desired set point to account for component variations, consider a fixed resistor in series with the setpoint pot to limit its range and make adjustments easier. Same for the hysteresis pot.

Decrease "the 10K resistor in series with the output transistor base" (see how much easier this would be if I could just say "R6"?) to something around 1.0K to 2.2K, and add a 10K resistor from the base to Vcc. There is a long form way to calculate an optimal resistor value, but this should be close enough to stabilize the transtor's turn-off.

ak
 

AnalogKid

Joined Aug 1, 2013
12,126
R3 should go between the Q1 base (not the U1 output) and Vcc. There is a sneak current path from the Q1 base through R4 and POT 2 (should be Rsomething) to the Pot1-R1 node. Moving R3 closer to the base lets it do a more effective job of turning off Q1 when the temperature is low.

ak
 

BobaMosfet

Joined Jul 1, 2009
2,211
A better way to think of 'open collector' is that the collector is not driven high by the transistor, it floats and is held high by a pullup. In any 'open-collector' circuit, the pullup is sized such that activation of the transistor grounds the collector and overcomes the pull-up.
 

Thread Starter

Razzle308

Joined Mar 17, 2016
49
Hi all.

Made some adjustment and its working.

I added R6 as the 100degC was at the extent of the NTC.
Added R5 10k
Changed Pot1 to 5k for more sweep on the temp setting.

Temp circuit proj.jpg

At the present setting it kicks in @95 and out @90 which is perfect.

Thanks everyone so much for your help.
One day i'll learn a bit more about how to calculate hysteresis ;)

Temp Project.jpg
 
Top