Comparators vs. op amps

P

Peter S. May

Jan 1, 1970
0
Non-critical curiosity.

In an application where one needs a logic signal based on whether an
input is of higher or lower voltage than a specific reference, one can
use a comparator (such as LM339) with or without a feedback loop as
necessary. But a regular op amp (such as LM324) can also be configured
as an almost direct replacement.

What makes the comparator any better for such an application than the op
amp?

Thanks
PSM
 
E

Eeyore

Jan 1, 1970
0
Peter S. May said:
Non-critical curiosity.

In an application where one needs a logic signal based on whether an
input is of higher or lower voltage than a specific reference, one can
use a comparator (such as LM339) with or without a feedback loop as
necessary. But a regular op amp (such as LM324) can also be configured
as an almost direct replacement.

What makes the comparator any better for such an application than the op
amp?

More suitable voltage swing at the output for one.

Faster response time.

Possibly lower power consumption.

Graham
 
G

Genome

Jan 1, 1970
0
Non-critical curiosity.

In an application where one needs a logic signal based on whether an
input is of higher or lower voltage than a specific reference, one can
use a comparator (such as LM339) with or without a feedback loop as
necessary. But a regular op amp (such as LM324) can also be configured
as an almost direct replacement.

What makes the comparator any better for such an application than the op
amp?

Thanks
PSM

I don't know how much Eeyore paid you to troll for him but hows about
you **** off and read the data sheets.

Oh, and before you feel the need to come back.

I don't do your sense of reasonable.

Bye

DNA
 
T

Tim Williams

Jan 1, 1970
0
Eeyore said:
More suitable voltage swing at the output for one.

Note that most comparators require a pull-up resistor; few are equipped to
source current as op-amps are.
Faster response time.

Not so much response time (what's the propagation delay on an LM324
anyway?) as slew rate: the 324 is slow as molasses.

Tim
 
J

John Larkin

Jan 1, 1970
0
Non-critical curiosity.

In an application where one needs a logic signal based on whether an
input is of higher or lower voltage than a specific reference, one can
use a comparator (such as LM339) with or without a feedback loop as
necessary. But a regular op amp (such as LM324) can also be configured
as an almost direct replacement.

What makes the comparator any better for such an application than the op
amp?

Thanks
PSM

Comparators are faster, being uncompensated, and have "logic level"
outputs. But an opamp can be used as a very nice, non-oscillating
comparator if you don't need speed, and sometimes if you do (see
HFA1130.)

Beware that if one section of an LM324 "switches", it may shoot big
spikes into the three other sections.

John
 
D

D from BC

Jan 1, 1970
0
Non-critical curiosity.

In an application where one needs a logic signal based on whether an
input is of higher or lower voltage than a specific reference, one can
use a comparator (such as LM339) with or without a feedback loop as
necessary. But a regular op amp (such as LM324) can also be configured
as an almost direct replacement.

What makes the comparator any better for such an application than the op
amp?

Thanks
PSM

Some comparators have built-in hysteresis for better behavior with
noisy or slow signals. Op amps need external resistors to mimic.

Also
Maybe other posters will confirm this...
Output linearity is not critical with comparators. Internally, this
probably helps make a comparator act more like a better comparator.
A power savings too?

Some op amps can have internal compensation for stability whereas
comparators...uh..(I'd have to look that up..)
This effects the edge time.

If you need high performance ..use a comparator as a comparator.
Otherwise, an op amp can be ok..depends on the app.


D from BC
 
R

Rich Webb

Jan 1, 1970
0
Non-critical curiosity.

In an application where one needs a logic signal based on whether an
input is of higher or lower voltage than a specific reference, one can
use a comparator (such as LM339) with or without a feedback loop as
necessary.

Hysteresis is A Good Thing and thus the positive feedback usually is
necessary (or at least desirable). Maxim has a brief app note on this
at http://www.maxim-ic.com/appnotes.cfm/an_pk/3616.
But a regular op amp (such as LM324) can also be configured
as an almost direct replacement.

With the exception that op amps typically "don't like" being sent to
the rails and into saturation. Switching time may be slower when it's
time to come out of saturation.
What makes the comparator any better for such an application than the op
amp?

One is designed as a bistable comparator, one as a linear amplifier.
 
Hysteresis is A Good Thing and thus the positive feedback usually is
necessary (or at least desirable). Maxim has a brief app note on this
athttp://www.maxim-ic.com/appnotes.cfm/an_pk/3616.


With the exception that op amps typically "don't like" being sent to
the rails and into saturation. Switching time may be slower when it's
time to come out of saturation.

Op amps never have a specified propagation delay from a finite
(saturating) input over-drive to the output transition.

Op amps are almost always much slower - I'v heard tell of really
pathological cases where the propagation delay could stretch to 500
usec.
One is designed as a bistable comparator, one as a linear amplifier.

So the comparator never has a free-quency compensation capacitor, and
almost always uses more stages of gain from input to output, which
means more gain-bandwith than an op amp built with a comparable
process.
 
R

Rene Tschaggelar

Jan 1, 1970
0
Peter said:
Non-critical curiosity.

In an application where one needs a logic signal based on whether an
input is of higher or lower voltage than a specific reference, one can
use a comparator (such as LM339) with or without a feedback loop as
necessary. But a regular op amp (such as LM324) can also be configured
as an almost direct replacement.

What makes the comparator any better for such an application than the op
amp?

While a comparator has the full, or almost the full
supply range as input range, some OpAmps do not like
the differential input voltage being too large.

Rene
 
J

Jan Panteltje

Jan 1, 1970
0
While a comparator has the full, or almost the full
supply range as input range, some OpAmps do not like
the differential input voltage being too large.

Rene

OK, now I have heard 2 theories (Bill's and yours).
I disagree with Bill Sloman on the comparator usually having more gain stages.
Maybe same number or even less of stages with more gain.

But I have these ideas:
For a comparator linearity is less of an issue, however offset and gain is.

Is this correct?
 
OK, now I have heard 2 theories (Bill's and yours).
I disagree with Bill Sloman on the comparator usually having more gain stages.

My example was the Am685 comparator (and its numerous descendents) tht
all seem to have three stages of voltage gain, versus almost every op
amp since the uA709, which have - at most - two stages of voltage
gain.
What's your example?
Maybe same number or even less of stages with more gain.

But I have these ideas:
For a comparator linearity is less of an issue, however offset and gain is.

Is this correct?

Comparators rarely seem to offer sub-millivolt offsets, while a large
number of op amps seem to be trimmed down to offests of the order of a
few tens of microvolts.

Comparators rarely seem to offer gains much above a few thousand
(60-70dB) while some op-amps go up to 100dB and higher.
 
J

Jan Panteltje

Jan 1, 1970
0
My example was the Am685 comparator (and its numerous descendents) tht
all seem to have three stages of voltage gain, versus almost every op
amp since the uA709, which have - at most - two stages of voltage
gain.
What's your example?

mmm I was thinking ua710 comparator, from what I remember of it's diagram
it had few components.

As the last time I looked at that was < 30 years ago, or perhaps 40? it may well have
been simplified in my brain over time.

Comparators rarely seem to offer sub-millivolt offsets, while a large
number of op amps seem to be trimmed down to offests of the order of a
few tens of microvolts.
Comparators rarely seem to offer gains much above a few thousand
(60-70dB) while some op-amps go up to 100dB and higher.

Yes you are probably right.. my view was as when you needed less linearity,
thne you could use less - , or same number, of stages, with diff amps with higher gain.....

OK let me see, and take this challenge on the ua710:
http://www.datasheets.org.uk/search.php?q=UA710&sType=part
TI has 2 diff stages

And the 709 (from the same era, the 710 seems to be from 1972, so 35 years, I was close :) )
also seems to have 2 diff stages with some extra stuff added, so my memory checks out OK
that 709 was more complex then 710 (I used both):
http://www.datasheets.org.uk/search.php?q=UA709&sType=part&ExactDS=Starts

It seems to me that offset in a comparator is very important, but indeed you
are right, there are many opamps with very low offset.
But I would not want a comparator with high offset, or offset drift!
 
S

Spehro Pefhany

Jan 1, 1970
0
My example was the Am685 comparator (and its numerous descendents) tht
all seem to have three stages of voltage gain, versus almost every op
amp since the uA709, which have - at most - two stages of voltage
gain.
What's your example?


Comparators rarely seem to offer sub-millivolt offsets, while a large
number of op amps seem to be trimmed down to offests of the order of a
few tens of microvolts.

Comparators rarely seem to offer gains much above a few thousand
(60-70dB) while some op-amps go up to 100dB and higher.

Comparator response time ratings are 'interesting', in a Heisenbergian
sense. You get the rated speed or the gain, but not both at the same
time.

Best regards,
Spehro Pefhany
 
J

Jim Thompson

Jan 1, 1970
0
Comparator response time ratings are 'interesting', in a Heisenbergian
sense. You get the rated speed or the gain, but not both at the same
time.

Best regards,
Spehro Pefhany

You can invariably count on high gain giving you low speed and vice
versa.

Then there are folk who want a 100uV sensitivity comparator in an
SAR-based system where the LSB is 14mV ;-)

...Jim Thompson
 
J

John Larkin

Jan 1, 1970
0
OK, now I have heard 2 theories (Bill's and yours).
I disagree with Bill Sloman on the comparator usually having more gain stages.
Maybe same number or even less of stages with more gain.

I know of one comparator that has back-to-back clamp diodes on its
inputs! But opamps and comparators use similar processes, so have
similar constraints. Many fast comparators have very limited input
differential voltage specs and often have weird common-mode rules.

Comparators tend to have lower gains, because they only need gains in
the ballpark of 1000, just enough to guarantee a solid output when the
inputs differ by more than the offset spec. And they are designed for
speed, another reason to keep the gain and the number of stages low.

A typical opamp will have a gain of 100K or more; a common comparator
might be more like 1000, often less. You couldn't sell an opamp with a
gain of 53 dB.

John
 
V

Vladimir Vassilevsky

Jan 1, 1970
0
Rene said:
While a comparator has the full, or almost the full
supply range as input range, some OpAmps do not like
the differential input voltage being too large.

LM339 is as prone to the phase inversion as LM358.

BTW, I have seen a design where a spare section of LM339 was used as
opamp. They put a big RC at the output so it made the LM339 compensated.


Vladimir Vassilevsky
DSP and Mixed Signal Design Consultant
http://www.abvolt.com
 
V

Vladimir Vassilevsky

Jan 1, 1970
0
John Larkin wrote:

A typical opamp will have a gain of 100K or more; a common comparator
might be more like 1000, often less. You couldn't sell an opamp with a
gain of 53 dB.

In fact, there are quite many single stage opamps with the gain about
60dB. Due to the single stage design, they are stable without
compensation -> higher slew rate, better frq response.

Vladimir Vassilevsky
DSP and Mixed Signal Design Consultant
http://www.abvolt.com
 

neon

Oct 21, 2006
1,325
Joined
Oct 21, 2006
Messages
1,325
If a comparator is the same as an op-amp why the different name and applications. an LM324 if overdriven it can latch up and never come out of saturation. A comaritor can egt to the rails while an op-amp that is unpredictable.
 
S

Spehro Pefhany

Jan 1, 1970
0
You can invariably count on high gain giving you low speed and vice
versa.

Then there are folk who want a 100uV sensitivity comparator in an
SAR-based system where the LSB is 14mV ;-)

...Jim Thompson

Eg.

http://cache.national.com/ds/LM/LM111.pdf , a "200ns comparator"

Top right figure on page 9, it's stretched out about 10:1 even with a
fairly healthy 2mV of overdrive.


Best regards,
Spehro Pefhany
 
D

DJ Delorie

Jan 1, 1970
0
From what I've read, the primary difference is that a comparator is
designed to operate with (and recover from) a saturated output, and an
op-amp is not.

I.e. the speed/slew/delay/etc ratings you read in the specs only apply
during "normal" operation, and using an op-amp as a comparator is not
normal, so the specs don't apply. They may "happen" to work as
comparators, at least for a while, but there are no performance (or
even functional) guarantees.
 
Top