Op Amp Comparator hysteresis

P

panfilero

Guest
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!
 
panfilero wrote:
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!
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
 
On Fri, 31 Aug 2012 08:30:01 -0700 (PDT), panfilero
<panfilero@gmail.com> wrote:

On Friday, August 31, 2012 10:17:55 AM UTC-5, panfilero wrote:
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...
There you go.

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

???????
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.
 
panfilero wrote:
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
 
On Friday, August 31, 2012 10:17:55 AM UTC-5, panfilero wrote:
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...

???????
 
On Fri, 31 Aug 2012 08:17:54 -0700, panfilero wrote:

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?
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
 
On Friday, August 31, 2012 12:48:54 PM UTC-5, Tim Wescott wrote:
On Fri, 31 Aug 2012 08:17:54 -0700, panfilero wrote:



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?



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 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...
 
On Aug 31, 3:08 pm, panfilero <panfil...@gmail.com> wrote:
On Friday, August 31, 2012 12:48:54 PM UTC-5, Tim Wescott wrote:
On Fri, 31 Aug 2012 08:17:54 -0700, panfilero wrote:

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?

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 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)
 
On Fri, 31 Aug 2012 12:26:40 -0700 (PDT), George Herold
<gherold@teachspin.com> wrote:

On Aug 31, 3:08 pm, panfilero <panfil...@gmail.com> wrote:
On Friday, August 31, 2012 12:48:54 PM UTC-5, Tim Wescott wrote:
On Fri, 31 Aug 2012 08:17:54 -0700, panfilero wrote:

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?

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

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. ;-)
 
On Aug 31, 5:46 pm, "k...@att.bizzzzzzzzzzzz"
<k...@att.bizzzzzzzzzzzz> wrote:
On Fri, 31 Aug 2012 12:26:40 -0700 (PDT), George Herold





gher...@teachspin.com> wrote:
On Aug 31, 3:08 pm, panfilero <panfil...@gmail.com> wrote:
On Friday, August 31, 2012 12:48:54 PM UTC-5, Tim Wescott wrote:
On Fri, 31 Aug 2012 08:17:54 -0700, panfilero wrote:

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?

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

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.  ;-)- 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.
- Show quoted text -
 
On Fri, 31 Aug 2012 08:17:54 -0700 (PDT), panfilero
<panfilero@gmail.com> wrote:

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?
---
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
Vref and then Vout will go high.
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
 
On Fri, 31 Aug 2012 22:09:59 -0700 (PDT), George Herold
<gherold@teachspin.com> wrote:

On Aug 31, 5:46 pm, "k...@att.bizzzzzzzzzzzz"
k...@att.bizzzzzzzzzzzz> wrote:
On Fri, 31 Aug 2012 12:26:40 -0700 (PDT), George Herold





gher...@teachspin.com> wrote:
On Aug 31, 3:08 pm, panfilero <panfil...@gmail.com> wrote:
On Friday, August 31, 2012 12:48:54 PM UTC-5, Tim Wescott wrote:
On Fri, 31 Aug 2012 08:17:54 -0700, panfilero wrote:

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?

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

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.  ;-)- 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.)
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).
 
On Sep 2, 1:47 pm, "k...@att.bizzzzzzzzzzzz" <k...@att.bizzzzzzzzzzzz>
wrote:
On Fri, 31 Aug 2012 22:09:59 -0700 (PDT), George Herold





gher...@teachspin.com> wrote:
On Aug 31, 5:46 pm, "k...@att.bizzzzzzzzzzzz"
k...@att.bizzzzzzzzzzzz> wrote:
On Fri, 31 Aug 2012 12:26:40 -0700 (PDT), George Herold

gher...@teachspin.com> wrote:
On Aug 31, 3:08 pm, panfilero <panfil...@gmail.com> wrote:
On Friday, August 31, 2012 12:48:54 PM UTC-5, Tim Wescott wrote:
On Fri, 31 Aug 2012 08:17:54 -0700, panfilero wrote:

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?

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

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

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).- 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!)
 
On Sun, 2 Sep 2012 14:39:23 -0700 (PDT), George Herold <gherold@teachspin.com>
wrote:

On Sep 2, 1:47 pm, "k...@att.bizzzzzzzzzzzz" <k...@att.bizzzzzzzzzzzz
wrote:
On Fri, 31 Aug 2012 22:09:59 -0700 (PDT), George Herold





gher...@teachspin.com> wrote:
On Aug 31, 5:46 pm, "k...@att.bizzzzzzzzzzzz"
k...@att.bizzzzzzzzzzzz> wrote:
On Fri, 31 Aug 2012 12:26:40 -0700 (PDT), George Herold

gher...@teachspin.com> wrote:
On Aug 31, 3:08 pm, panfilero <panfil...@gmail.com> wrote:
On Friday, August 31, 2012 12:48:54 PM UTC-5, Tim Wescott wrote:
On Fri, 31 Aug 2012 08:17:54 -0700, panfilero wrote:

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?

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

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

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).- 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.
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. ;-)
 
On Fri, 31 Aug 2012 12:08:24 -0700 (PDT), panfilero
<panfilero@gmail.com> wrote:


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...
---
Here's a good place to start:

http://www.ti.com/lit/an/snoa654/snoa654.pdf

--
JF
 
On Sep 2, 7:45 pm, "k...@att.bizzzzzzzzzzzz" <k...@att.bizzzzzzzzzzzz>
wrote:
On Sun, 2 Sep 2012 14:39:23 -0700 (PDT), George Herold <gher...@teachspin..com
wrote:





On Sep 2, 1:47 pm, "k...@att.bizzzzzzzzzzzz" <k...@att.bizzzzzzzzzzzz
wrote:
On Fri, 31 Aug 2012 22:09:59 -0700 (PDT), George Herold

gher...@teachspin.com> wrote:
On Aug 31, 5:46 pm, "k...@att.bizzzzzzzzzzzz"
k...@att.bizzzzzzzzzzzz> wrote:
On Fri, 31 Aug 2012 12:26:40 -0700 (PDT), George Herold

gher...@teachspin.com> wrote:
On Aug 31, 3:08 pm, panfilero <panfil...@gmail.com> wrote:
On Friday, August 31, 2012 12:48:54 PM UTC-5, Tim Wescott wrote:
On Fri, 31 Aug 2012 08:17:54 -0700, panfilero wrote:

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?

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

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

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

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.
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.
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.
George H.
(Hey, there must be someone besides me buying these IC's!)

Little guys with rich (and clueless) bosses, evidently.  ;-)
You seem angry for some reason?

George (just trying to get along) H.



- Hide quoted text -
- Show quoted text -
 

Welcome to EDABoard.com

Sponsor

Back
Top