Maker Pro
Maker Pro

Op Amp Comparator hysteresis

P

panfilero

Jan 1, 1970
0
I see circuits that add hysteresis to op-amp comparators by putting a positive feedback resistor network that acts as a voltage divider to the output.

Am I right in thinking that this will only work if you have a negative rail? If your negative rail is grounded this aint gonna give you hysteresis... is there a way this would work with a single supply opamp?

thanks!
 
P

panfilero

Jan 1, 1970
0
I see circuits that add hysteresis to op-amp comparators by putting a positive feedback resistor network that acts as a voltage divider to the output.



Am I right in thinking that this will only work if you have a negative rail? If your negative rail is grounded this aint gonna give you hysteresis.... is there a way this would work with a single supply opamp?



thanks!

I think I have an idea.... I would have to figure out my thresholds and float my opamp so that the positive feedback voltage divider gives me the thresholds I need...

So, if I want my high threshold at 2V and low at 1V then (assuming my divider splits my voltage in half) I'd need my high opamp rail at 4V and my low rail at 2V... so I'd have to make sure my opamp works off of 2V and my input signal never goes beyond my rails...

???????
 
J

Jamie

Jan 1, 1970
0
panfilero said:
I see circuits that add hysteresis to op-amp comparators by putting a positive feedback resistor network that acts as a voltage divider to the output.

Am I right in thinking that this will only work if you have a negative rail? If your negative rail is grounded this aint gonna give you hysteresis... is there a way this would work with a single supply opamp?

thanks!
Yes, it works the same way. You need to put a virtual common node at the
(+) input when operating single rail. This feed back R is calculated
working with this virtual network so that you can select the hysteresis
window.

Jamie
 
P

panfilero

Jan 1, 1970
0
You don't need a negative rail. Just having an output that swings from

one rail to another is enough to provide hysteresis with one of those

networks. Do the math, it'll jump out at you.



Note that using an op-amp for a comparator can lead to all sorts of

subtle or not-so-subtle misbehaviors. In general, op-amps don't like

operating in regimes where they aren't working in the linear region.

Some op-amps show this with such mild misbehaviors as taking extra-long

for the output to come off the rail, or not approaching the power rails

in an easily predictable manner. Other's get nasty in various ways (I

don't know the whole catalog, but oscillation, high input currents, and

(I think) phase shift are all on the list).



Using a comparator for a comparator is often better.



--

My liberal friends think I'm a conservative kook.

My conservative friends think I'm a liberal kook.

Why am I not happy that they have found common ground?



Tim Wescott, Communications, Control, Circuits & Software

http://www.wescottdesign.com

I went with an OpAmp out of convenience, and because what I'm looking at isa really slow signal which, basically DC, it would rise and fall real slowly... I'm not sure if using a comparator buys anything when your not concerned about speed... maybe it does, I don't know, I'm all ears though, and I'm gonna dig into it some more...
 
G

George Herold

Jan 1, 1970
0
I went with an OpAmp out of convenience, and because what I'm looking at is a really slow signal which, basically DC, it would rise and fall real slowly... I'm not sure if using a comparator buys anything when your not concerned about speed... maybe it does, I don't know, I'm all ears though, and I'm gonna dig into it some more...- Hide quoted text -

- Show quoted text -

Everyone should have a few LM393's in their parts box. I sometimes
find a comparator to be too fast, but you can hang a capacitor on the
output to slow it down.... nice linear ramps from one rail to the
other.

George H.

(for a fast 'twichy' comparator I like the LT1016)
 
Comparitors have outputs that are designed more like gates than linear
devices. Opamps may not be well behaved when their outputs are driven hard
into the rails. They're also not designed to have a differential voltage on
the input. Using opamps as comparators can be done but it's not recommended.
Everyone should have a few LM393's in their parts box. I sometimes
find a comparator to be too fast, but you can hang a capacitor on the
output to slow it down.... nice linear ramps from one rail to the
other.

If you drive a capacitor, watch the output current.
George H.

(for a fast 'twichy' comparator I like the LT1016)

Your boss must be filthy rich. ..or perhaps dirt poor, after buying LT
stuff. ;-)
 
G

George Herold

Jan 1, 1970
0
Comparitors have outputs that are designed more like gates than linear
devices.  Opamps may not be well behaved when their outputs are driven hard
into the rails.  They're also not designed to have a differential voltage on
the input.  Using opamps as comparators can be done but it's not recommended.


If you drive a capacitor, watch the output current.



Your boss must be filthy rich.   ..or perhaps dirt poor, after buying LT
stuff.  ;-)- Hide quoted text -

Nah, not much quantity so saving a few bucks is not worth my time.
(the $3 comparator with a $3 opamp replaced a ~$100 (?) Amp-tek part.
so my boss is happy.)


George H.
 
Nah, not much quantity so saving a few bucks is not worth my time.
(the $3 comparator with a $3 opamp replaced a ~$100 (?) Amp-tek part.
so my boss is happy.)

If I specified a $3 comparator, it would be my last. In fact, anything LT
will draw lightning in a design review (even a no-pop, BTDT).
 
G

George Herold

Jan 1, 1970
0
If I specified a $3 comparator, it would be my last.  In fact, anythingLT
will draw lightning in a design review (even a no-pop, BTDT).- Hide quoted text -

- Show quoted text -

I know it's like I'm 'living in the past' selling circuits with two
connectors, a rotary switch (or two) a bunch of 0.1% resistors, and an
opamp (or two)... sprinkle in some C's.

The opamp is often the least expensive part of the equation,
(we match the C's when it's important).

George H.
(Hey, there must be someone besides me buying these IC's!)
 
I know it's like I'm 'living in the past' selling circuits with two
connectors, a rotary switch (or two) a bunch of 0.1% resistors, and an
opamp (or two)... sprinkle in some C's.

Hardly. A couple of high-end DSPs, a uC, and a couple of thousand other parts
(BOM cost in the hundred$ - anticipated AOQ perhaps half million). Your
contempt and cluelessness is noted, though.
The opamp is often the least expensive part of the equation,
(we match the C's when it's important).

When you're making a million of something, a $3 opamp doesn't make much sense
when a $.10 opamp will do, now does it? Yes, I even get beat up for 1%
resistors. Money matters.
George H.
(Hey, there must be someone besides me buying these IC's!)

Little guys with rich (and clueless) bosses, evidently. ;-)
 
G

George Herold

Jan 1, 1970
0
Hardly. A couple of high-end DSPs, a uC, and a couple of thousand other parts
(BOM cost in the hundred$ - anticipated AOQ perhaps half million). Your
contempt and cluelessness is noted, though.

Huh? I was describing what I do. No contempt was intended.
When you're making a million of something, a $3 opamp doesn't make much sense
when a $.10 opamp will do, now does it?  Yes, I even get beat up for 1%
resistors.  Money matters.

Sure that's fine. I'm making tens of something. Next to the $3 opamp
is a $10 switch, surrounded by $2 worth of R's. Different world.
Little guys with rich (and clueless) bosses, evidently.  ;-)

You seem angry for some reason?

George (just trying to get along) H.



- Hide quoted text -
 
Top