Op amps as comparators

SgtWookie

Joined Jul 17, 2007
22,230
how about this link, from ucdavis, about building schmitt triggers with your favorite 741/411 opamps.
Again, you have me confused with someone else. 741 opamps are a favorite of the academic world, perhaps because they perform so poorly that no student would consider stealing them. ;)
is ucdavis good enough to earn your trust?

http://nuclear.ucdavis.edu/~cebra/classes/phys116/Lab10_rev06.pdf

notice that that circuit is the same as the wikipedia's circuit that you trust.
It's a Physics class lab experiment, using a 1kHz waveform with 10kHz noise on it. They had to keep the frequency low due to the misapplication of an opamp instead of a comparator.
 

beenthere

Joined Apr 20, 2004
15,819
No matter how strongly held the opinions, and how much material may be presented to support such opinions, one question remains unanswered - if op amps can be made to behave adequately as voltage comparators and vice versa, why have the various IC manufacturers gone to the trouble of making these devices just as if there really were some significant difference between them?

If the differences between op amps and voltage comparators is really trivial, what reason can there possibly be for having devices in the class "operational amplifier" presented and specified as distinctly different from those devices in the class "voltage comparator"? Are we to believe that the designers of such devices have such a poor understanding of their own products? Is that not more than absurd?
 

SgtWookie

Joined Jul 17, 2007
22,230
so you just discard whatever info that doens't agree with your preset mindset. nice.
No, it comes from reading application notes from the manufacturer who actually make the devices.

Please read the application note that StayAtHomeElectronics so kindly posted a link to; that and several others like it (not handy at the moment) is what gave me that mindset.

While I acknowledge that it is possible to use an opamp as a comparator, or a comparator as an operational amplifier, it would be using the wrong tool for the job, and your mileage may vary considerably.

how about this one, fourth down from the same google page:

http://webpages.ursinus.edu/lriley/ref/circuits/node5.html

do you notice its similarity with the wikipedia page you love to trust?

do you also notice that on top of the page it says, in bold letters, "Operational Amplifier Circuits"?
More acadamia; Physics classes using 741/411 opamps. :rolleyes: You DO realize that these are "sandbox I" type courses, right?

so you knew that there are numerous (more than 208?) comparators that can sink and source current but that knowledge still didn't prevent from stating that "virtually all comparators can only sink current"?
That statement is within the context of these Forums; where most members are hobbyists and are using easily available components. For example, Radio Shack carries LM741, TL082 and LM324 opamps and an LM339 comparator. Many members in the past have been "bitten" by the open-collector outputs of the LM339, LM393 and LM2903 comparators - which is mostly what is used here.

so if packaging gets in the way of telling the truth, we should just lie?

nice.
Most of the newbies do not have the knowledge or equipment to create a custom PCB for SMT/SMD's; as such they are generally limited to DIP devices until they do develop the skills and obtain the equipment, or have a PCB made by a board house. Most don't seem to want to go to that level, which is fine.
 

Thread Starter

millwood

Joined Dec 31, 1969
0
No matter how strongly held the opinions, and how much material may be presented to support such opinions, one question remains unanswered - if op amps can be made to behave adequately as voltage comparators and vice versa, why have the various IC manufacturers gone to the trouble of making these devices just as if there really were some significant difference between them?
for many valid reasons, some mentioned before. a Buick Roadmaster is foundamentally a car, as is a 911. But that doesn't mean 911 will do as good of a job hauling people as the roadmaster, or the roadmaster can race down a track as gracefully as a 911.

for example, comparators are typically NOT internally compensated, and opamps aren't. that means opamps may not swing as fast as a comparator, everything else being equal.

But you can find plenty of opamps that will swing plenty other comparators. ad815 for example, it can swing in as fast as 10ns, and lm119 (a high speed comparator) may take as long as 50ns - 100ns to swing to full output.

saturation: many comparators use CCS loading to avoid deep saturation (not on the open collector architecture though). many opamps also use CCS loading (to achieve high gain) that will also prevent deep saturation. examples of the opposite also exist: some opamps use baker clamps to avoid saturation and you rarely find them on comparators.

the list goes on. but if you look at devices in both classes, you will find that they are surprisingly similar and foundamentally identical: most of them follow the Linn 3-stage topology; both of them have very high open loop gain; both of them have inverting and non-inverting inputs, ...

opamps typically can moonshine for comparators, and comparators may have a harder time working as opamps. But none of those differences are fundamental.

If the differences between op amps and voltage comparators is really trivial, what reason can there possibly be for having devices in the class "operational amplifier" presented and specified as distinctly different from those devices in the class "voltage comparator"? Are we to believe that the designers of such devices have such a poor understanding of their own products? Is that not more than absurd?
comparators are a much smaller market - in part because opamps can be used as comparators, and in part because comparators can be and often are implemented digitally (via adc) for cost and convenience reasons. the only (US) firm that actively pursuing that niche is LT, but then that firm's strategy is niche.

if you look around a comparator catalog, you will notice that many of them are legacy products from the 70/80s. you don't see many new comparator designs with exciting features. and many times, the selection for comparators is much smaller.

so there are many reasons for comparators to exist, both technical and non-technical. but its existence is a poor argument for it being fundamentally different from opamps.
 

steveb

Joined Jul 3, 2008
2,436
so there are many reasons for comparators to exist, both technical and non-technical. but its existence is a poor argument for it being fundamentally different from opamps.
You are being overly zealous. I didn't get the impression that anyone claimed they were fundamentally different. The impression I got was that you should use the device that is optimized for the application. In other words, don't use a compensated low-bandwidth opamp as a comparator. This seems like good advice to me, and would serve the hobbyists and newbies very well.

It's always easy to take a statement of someone and interpret it too literally and make a big deal about it. Nobody here is fooled by this type of nonsense.
 

Thread Starter

millwood

Joined Dec 31, 1969
0
I am still waiting for that "closed loop" opamp-based schmitt trigger, through.

love to see that "design".

The impression I got was that you should use the device that is optimized for the application.
don't know that. I usually use the parts that I have to get the job done right. I don't recall a single time I used a part that is optimized for any application.
 

SgtWookie

Joined Jul 17, 2007
22,230
I will "correct" it after you tell us where that "closed loop" is in the schmitt trigger, :).
There IS no closed loop in a Schmitt trigger.

As far as using an AD815 as a comparator - yes, I suppose that could be done as well. However, that would be akin to using a Ferrari to haul a fishin' boat. You would get some rather odd looks from others on the road.

An AD815 costs around $11 at Newark. An LT1016 10nS comparator costs around $2 at Digikey. You would have a difficult time justifying to project management the inappropriate use of an expensive part vs a correct part on a project.

Just because something is possible doesn't mean that it's a good thing.

In the meantime, we try to steer the "newbies" towards workable solutions for their dilemmas.

Unfortunately, your insistence at pounding round pegs into square holes has temporarily distracted several of us from assisting said newbies. Hopefully, this won't become an ongoing issue.
 

Thread Starter

millwood

Joined Dec 31, 1969
0
An AD815 costs around $11 at Newark.
it is always easy to pay more and get less, :).

ad815 is expensive because it is out of production - it is an old part that our hobbyists play with.

comparable or higher performing parts can be had for a lot less. or if you insist on an ad815, for a lot less, and definitely less than that $2 lt part.

you just need to know where to look.
 

steveb

Joined Jul 3, 2008
2,436
don't know that. I usually use the parts that I have to get the job done right. I don't recall a single time I used a part that is optimized for any application.
Once again you take a statement too literally and diverge from the point based on the context of the statement. My point is that I agree with the advice to use a comparator that is designed for that function, rather than a low-bandwidth opamp which is not optimized for that function.

Also, once again, you are not fooling anyone here, accept maybe yourself.
 

Thread Starter

millwood

Joined Dec 31, 1969
0
My point is that I agree with the advice to use a comparator that is designed for that function, rather than a low-bandwidth opamp which is not optimized for that function.
I don't recall ever advocating that.

Also, once again, you are not fooling anyone here, accept maybe yourself.
 

SgtWookie

Joined Jul 17, 2007
22,230
it is always easy to pay more and get less, :).

ad815 is expensive because it is out of production - it is an old part that our hobbyists play with.

comparable or higher performing parts can be had for a lot less. or if you insist on an ad815, for a lot less, and definitely less than that $2 lt part.

you just need to know where to look.
Go ahead, find a lower price from a factory authorized distributor. It really doesn't matter, as it's a poor application for an obsolete part, which makes me wonder why you brought such an irrelevant item into the discussion anyway - simply for the sake of argument, perhaps?

What does matter is that you have left a "n00b" dangling with an ill-conceived and non-functional circuit diagram, while wasting time trying to prove your pointless point.
 

Wendy

Joined Mar 24, 2008
23,415
I'm watching this thread with interest. I'm not fooled by the dancing and obfuscations either. AAC doesn't allow flames or flame wars, this site is about electronics and helping people. I've been wrong many times, and try to admit it when I am, as I am here to learn as well as help. I am not trying to prove how smart I am, that will become obvious from my posts (in either sense).

But to keep it on topic, I've used op amps as comparitors, mostly due to size and cost. I've done this with full knowledge they have a lot of problems and what those problems are. The big ones for me is the lack of rail to rail response as well as slew rate. When we are trying to teach beginners, it is important they know why it is a problem, then help them do it if it can be done.
 

Thread Starter

millwood

Joined Dec 31, 1969
0
What does matter is that you have left a "n00b" dangling with an ill-conceived and non-functional circuit diagram, while wasting time trying to prove your pointless point.
it is ill-conceived and non-functional because you don't understand how schmitt trigger works.
 

Thread Starter

millwood

Joined Dec 31, 1969
0
I missed this one, :)

Originally Posted by SgtWookie
While you can use an opamp as a comparator, they're really not designed to be run open-loop. ... Bandwidth suffers quite a bit,
the last twenty years in the opamp land are about an entire class of opamps whose bandwidth is independent of its gain.

you can read more about them.
 

SgtWookie

Joined Jul 17, 2007
22,230
it is ill-conceived and non-functional because you don't understand how schmitt trigger works.
How is it that something that you concieved is non-functional because you believe that I don't know how a Schmitt trigger works?

The circuit in that thread which I put together:
http://forum.allaboutcircuits.com/attachment.php?attachmentid=10898&d=1247945872
for the OP in this thread:
http://forum.allaboutcircuits.com/showthread.php?t=25746
works just fine in simulation as an opamp used in a linear fashion coupled to a comparator with hysteresis ala Schmitt trigger and meets the OP's requirements, while your circuit:
http://forum.allaboutcircuits.com/attachment.php?attachmentid=10896&d=1247935921
does not meet the OP's requirement for a TTL level signal output.

As I see it, you are able to argue for argument's sake while making feeble attempts to denigrate and obfuscate , but you are not willing (or perhaps able) to provide assistance to those who seek it.

As such, you continue to prove yourself a distraction and indeed a liability to these forums rather than a valued contributor.

If you continue upon your current path, that path will reach a rather abrupt end in the near future.
 

steveb

Joined Jul 3, 2008
2,436
I don't recall ever advocating that.
I don't recall you advocating either, just arguing, there's a fine line between the two. However, this thread is started with your quote from SgtWookie, which would seem to indicate you thought his advice was wrong, and the title of the thread is "Op amps as comparators".

So what is your opinion? Should compensated opamps be used as comparators, or is it better to use a comparator that has been designed specifically for that purpose? This is the basic question that was being addressed by SgtWookie, or so it seemed to me. Yes, the devices are based on the same principles, but the applications are very different. Only advanced designers would deal with uncompensated opamps and understand the inner workings and limitations of all the opamp variants, and those people don't need all this discussion. They already know it.

So?
 
Last edited:

Thread Starter

millwood

Joined Dec 31, 1969
0
How is it that something that you concieved is non-functional because you believe that I don't know how a Schmitt trigger works?
you have done an excellent job convincing virtually everyone that you don't.

I don't recall you advocating either, just arguing,
then recall better next time.
 

SgtWookie

Joined Jul 17, 2007
22,230
you have done an excellent job convincing virtually everyone that you don't.
Poor attempt at redirection.

You now realize that you aren't able to come up with a better solution than I did, and are feebly attempting to convince others that somehow it must be my fault.

I'm not buying it, and neither is anyone else.
 
Top