Differential Controller Relay chatter

Thread Starter

Ford Prefect

Joined Jun 14, 2010
245
Hi Guys,

I need some expert advice.
I built this Differential Controller using a LM393 comparator. It appears to be working except that when the temperatures from the thermistors are equal/similar, the relay chatters and the LED flashes. What is missing?
I am thinking that it may need a resisitor between the output and the non-inverting input (positive feedback) - but this will create hysteresis, or a resisitor between the output and the inverting input (negative feedback).

What are your suggestions? And what size resistor would you think would be suitable and where?
Thanks in advance.


Diff ControllerLM393.jpg
 

EM Fields

Joined Jun 8, 2016
583
Hi Guys,

I need some expert advice.
I built this Differential Controller using a LM393 comparator. It appears to be working except that when the temperatures from the thermistors are equal/similar, the relay chatters and the LED flashes. What is missing?
I am thinking that it may need a resisitor between the output and the non-inverting input (positive feedback) - but this will create hysteresis, or a resisitor between the output and the inverting input (negative feedback).

What are your suggestions? And what size resistor would you think would be suitable and where?
Thanks in advance.


View attachment 122043
When the comparator's input voltages are close to each other, noise will trigger the comparator, so you'll want to add a little hysteresis.
Try one megohm between the output and the non-inverting input of the 393.
 

Thread Starter

Ford Prefect

Joined Jun 14, 2010
245
Thanks for the advice. I understand to put a resistor between the output and the non-inverting input. But I find hysteresis complicated to work out.
Basically, is it that the higher the ohm value of the resistor the smaller the differences in input voltages and the lower the ohm value of the resistor, the wider the input voltages?
Ie. If I were to use a 1M resistor, does that give a less wide variance in the input voltages...or the other way round?
 

Dodgydave

Joined Jun 22, 2012
11,277
Yes, the hysteresis resistor is basically in parallel with the other two resistors, so in my example above, R4 is in parallel with R3 when the led is on, so the Higher the value of R4, the smaller the shift in voltage and vice-versa.

I would use a better op amp like Lm358.
and in parallel with R2 when off.
 

Dodgydave

Joined Jun 22, 2012
11,277
A 393 won't give a high voltage output, as it's an open collector op amp.

You only need about +/-100mV swing to prevent chatter, so a 1M will give a resistance change of 1k on the 10k thermistors, thats about 120mV on the 12V supply.
 
Last edited:

Thread Starter

Ford Prefect

Joined Jun 14, 2010
245
GREAT! I got some LM358's somewhere.
I'll hunt them out tomorrow and use one of them .... and stick a high value hysteresis resistor between the non-inverting input and output.
I'll let you know what happens with the LM358 (and the LM393).
It'll be interesting to see the outcome.
 

EM Fields

Joined Jun 8, 2016
583
Thanks for the advice. I understand to put a resistor between the output and the non-inverting input. But I find hysteresis complicated to work out.
Basically, is it that the higher the ohm value of the resistor the smaller the differences in input voltages and the lower the ohm value of the resistor, the wider the input voltages?
Ie. If I were to use a 1M resistor, does that give a less wide variance in the input voltages...or the other way round?
The way hysteresis works is that once a signal exceeds a given reference voltage, the reference voltage is lowered so that the noise margin between the signal and the reference is increased to the point where noise on the signal (or the reference) can't act as a trigger.

For example, let's say we have a comparator with its non-inverting input sitting at 6 volts, and the signal on the inverting input is rising positive. When the signal on the inverting input rises to higher than +6V, the output of the comparator will go low and, if we've connected a resistance between the output and the non-inverting input, the voltage on the non-inverting input will fall to less than 6 volts, widening the voltage difference between the inverting and non-inverting inputs.

The benefit of doing this is that the comparator's output will make a clean transition when the switching point is reached, but the price is that there'll always be one switching point when the signal voltage is rising past the reference, and a different one when it's falling.

Like this:
Hysteresis 101.png

Oops... D2 anode needs to go to Vcc. Sorry about that, I'll fix it tomorrow.
 
Last edited:
Top