Op Amp Comparator hysteresis

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!

Reply to
panfilero
Loading thread data ...

itive feedback resistor network that acts as a voltage divider to the outpu= t.

il? If your negative rail is grounded this aint gonna give you hysteresis..= . is there a way this would work with a single supply opamp?

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

So, if I want my high threshold at 2V and low at 1V then (assuming my divid= er 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 inpu= t signal never goes beyond my rails...

???????

Reply to
panfilero

feedback resistor network that acts as a voltage divider to the output.

If your negative rail is grounded this aint gonna give you hysteresis... is there a way this would work with a single supply opamp?

If your threshold voltage is at zero, then you're likely to have other problems as well.

However, the resistor still provides hysteresis. Say you have a 10k resistor from the reference to the + input, and a 1M feedback resistor. With +5/0 outputs, the threshold will be:

V_LH = (Vref*1M + 5V*10k)/1.01M = 0.99*Vref + 50 mV V_LH = (Vref*1M + 0V*10k)/1.01M = 0.99*Vref

With a 5V swing and a 1% division ratio, you always get 50 mV hysteresis. If the reference voltage is halfway between the supplies, the hysteresis range is symmetrical, but not otherwise.

Cheers

Phil Hobbs

--
Dr Philip C D Hobbs
Principal Consultant
ElectroOptical Innovations LLC
Optics, Electro-optics, Photonics, Analog Electronics

160 North State Road #203
Briarcliff Manor NY 10510
845-480-2058

hobbs at electrooptical dot net
http://electrooptical.net
Reply to
Phil Hobbs

positive feedback resistor network that acts as a voltage divider to the output.

If your negative rail is grounded this aint gonna give you hysteresis... is there a way this would work with a single supply opamp?

my opamp so that the positive feedback voltage divider gives me the thresholds I need...

There you go.

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...

But why are you using an OpAmp? That only guarantees slow transitions. ...Jim Thompson

--
| James E.Thompson, CTO                            |    mens     |
| Analog Innovations, Inc.                         |     et      |
| Analog/Mixed-Signal ASIC's and Discrete Systems  |    manus    |
| Phoenix, Arizona  85048    Skype: Contacts Only  |             |
| Voice:(480)460-2350  Fax: Available upon request |  Brass Rat  |
| E-mail Icon at http://www.analog-innovations.com |    1962     |
             
I love to cook with wine.     Sometimes I even put it in the food.
Reply to
Jim Thompson

feedback resistor network that acts as a voltage divider to the output.

If your negative rail is grounded this aint gonna give you hysteresis... is there a way this would work with a single supply opamp?

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

Reply to
Jamie

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
Reply to
Tim Wescott

e
?

=20

=20

=20

=20

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 slow= ly... I'm not sure if using a comparator buys anything when your not concer= ned about speed... maybe it does, I don't know, I'm all ears though, and I'= m gonna dig into it some more...

Reply to
panfilero

the

e

mp?

om

I

is a really slow signal which, basically DC, it would rise and fall real sl= owly... I'm not sure if using a comparator buys anything when your not conc= erned 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 -

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)

Reply to
George Herold

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 -

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. ;-)

Reply to
krw

g a

to the

tive

opamp?

from

e

ike

ong

ils

s (I

and

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 c= oncerned about speed... maybe it does, I don't know, I'm all ears though, a= nd I'm gonna dig into it some more...- Hide quoted text -

hard

ge on

ended.

T

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.

Reply to
George Herold

feedback resistor network that acts as a voltage divider to the output.

your negative rail is grounded this aint gonna give you hysteresis... is there a way this would work with a single supply opamp?

--- Depends on the opamp.

As others have suggested, instead of an opamp use a true comparator instead, like this: (View using a fixed-pitch font)

.Vcc>---------+--------+ . V2--+--|---+ | . | | | | . | | [R2] [R3] .Vin--[R1]-+-|+\ | | . | >-+----+--->Vout .Vref>-------|-/U1 . | .GND>---------+

Assume: Vcc = 5V Vref = 2.5V R1 = 10k R2 = 100K R3 = 1K Vout = 0V,

and Vin is ramping up from 0V. Then, with U1's output low, you have a voltage divider that looks like this:

Vin | [R1]10k | +--V2 2.5V | [R2]100k | Vout 0V

Now, since Vref is at 2.5V, as Vin ramps up eventually V2 will get to

For V2 to be driven to 2.5V, R2 must drop 2.5V and, if R2 is a 100k ohm resistor, the current through it must be:

E 2.5V I = --- = ------- = 25µA R 100kR

Then, since current in a series circuit is everywhere the same, the current through R1 must also be 25µA.

Since R1 is 10k ohms, with 25µA through it it'll drop:

Vin = IR = 25µA * 10kR = 0.25 volts.

So, since V2 is 2.5V and R1 must drop 0.25 volts, Vin must be either

2.75V or 2.25V.

--- If anyone is interested, I'll go on.

-- JF

Reply to
John Fields

the

opamp?

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 -

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).

Reply to
krw

ting a

er to the

egative

u

ly opamp?

ngs from

hose

of

t like

on.

a-long

rails

ways (I

s, and

ng at is a really slow signal which, basically DC, it would rise and fall r= eal slowly... I'm not sure if using a comparator buys anything when your no= t 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 -

en hard

ltage on

ommended.

g LT

LT

d 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!)

Reply to
George Herold

a

to the

negative

opamp?

from

extra-long

rails

and

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 -

on

recommended.

text -

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.

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.

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

Reply to
krw

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...

--
Here's a good place to start:

http://www.ti.com/lit/an/snoa654/snoa654.pdf
Reply to
John Fields

putting a

vider to the

a negative

you

upply opamp?

swings from

f those

ts of

on't like

egion.

xtra-long

wer rails

us ways (I

ents, and

oking at is a really slow signal which, basically DC, it would rise and fal= l 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 tho= ugh, and I'm gonna dig into it some more...- Hide quoted text -

ear

riven hard

voltage on

recommended.

mes

the

ying LT

ing LT

oted text -

arts

Huh? I was describing what I do. No contempt was intended.

ense

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.

You seem angry for some reason?

George (just trying to get along) H.

- Hide quoted text -

Reply to
George Herold

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.