Comparators vs. op amps

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

Reply to
Peter S. May
Loading thread data ...

I don't know how much Eeyore paid you to troll for him but hows about you f*ck 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

Reply to
Genome

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

Reply to
John Larkin

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

Reply to
D from BC

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

formatting link

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.

One is designed as a bistable comparator, one as a linear amplifier.

Reply to
Rich Webb

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.

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.

-- Bill Sloman, Nijmegen

Reply to
bill.sloman

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

--
Ing.Buero R.Tschaggelar - http://www.ibrtses.com
& commercial newsgroups - http://www.talkto.net
Reply to
Rene Tschaggelar

On a sunny day (Mon, 01 Oct 2007 06:34:22 +0200) it happened Rene Tschaggelar wrote in :

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?

Reply to
Jan Panteltje

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.

-- Bill Sloman, Nijmegen

Reply to
bill.sloman

On a sunny day (Mon, 01 Oct 2007 06:17:14 -0700) it happened snipped-for-privacy@ieee.org wrote in :

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.

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:

formatting link
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):

formatting link

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!

Reply to
Jan Panteltje

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

--
"it\'s the network..."                          "The Journey is the reward"
speff@interlog.com             Info for manufacturers: http://www.trexon.com
Embedded software/hardware/analog  Info for designers:  http://www.speff.com
Reply to
Spehro Pefhany

stages.

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

--
|  James E.Thompson, P.E.                           |    mens     |
|  Analog Innovations, Inc.                         |     et      |
|  Analog/Mixed-Signal ASIC\'s and Discrete Systems  |    manus    |
|  Phoenix, Arizona            Voice:(480)460-2350  |             |
|  E-mail Address at Website     Fax:(480)460-2142  |  Brass Rat  |
|       http://www.analog-innovations.com           |    1962     |
             
         America: Land of the Free, Because of the Brave
Reply to
Jim Thompson

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

Reply to
John Larkin

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

formatting link

Reply to
Vladimir Vassilevsky

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

formatting link

Reply to
Vladimir Vassilevsky

Tschaggelar

stages.

Eg.

formatting link
, 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

--
"it\'s the network..."                          "The Journey is the reward"
speff@interlog.com             Info for manufacturers: http://www.trexon.com
Embedded software/hardware/analog  Info for designers:  http://www.speff.com
Reply to
Spehro Pefhany

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.

Reply to
DJ Delorie

I'll second phase reversal as a serious issue when using op amps as comparators. This is often overlooked.

Reply to
miso

Tschaggelar

stages.

An evil device, now well and truly obsolete. As far as I am concerned, the first useful comparator was the - relaitvely slow - LM311, which preceded the LM339 (not to mention the LM3930) which was even slower, throwing away of a lot of performance for low price and stability.

well have

higher gain.....

Linearity isn't an issue with a fundamentally non-linear device like a comparator.

was close :-) )

checks out OK

In fact, I think the uA710 was more nearly contemporary with the uA702 op amp. The uA709 was the first op amp that had enough gain to be widely useful, but the architecture was evil, and it got replaced by the uA741/8 and LM301/307 which were much better.

T\\If you look at what is made and sold, the market seems to have other priorities.

-- Bill Sloman, Nijmegen

Reply to
bill.sloman

This is a bit misleading. Op amps are constrained by the requirement that that have to be stable when used with a fair bit of negative feedback, which limits the number of stages of voltage gain that they can use. Comparators aren't used with negative feedback, so the designer can add extra stages of voltage gain - which does add extra propagation delay, silicon area and so forth, so they don't go for many more stages.

But the balance between delay per stage and gain per stage does seem to optimise around three stages of voltage gain.

-- Bill Sloman, Nijmegen

Reply to
bill.sloman

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.