I need to amplify two signals (BW
Use an opamp as a comparator or not?
Dec 21, 2017
10 Replies
Comparators recover a lot faster from being over-driven than do amplifiers. If I remember rightly, the compensation capacitor gets charged up and can take ages to discharge.
It's a subject that comes up from time to time so a google search on "amplifiers as comparators" would have been worth the effort.
formatting link
Bill Sloman, Sydney
Yes, there is also a good TI analysis on the subject. The problem is that there are two opposing camps, one says "never do that!" and the other "actually, it's not that bad". The opamp will be fast for other reasons, so I would like to know whether the 60x speed margin is sufficient for reliable operation or not.
Best regards, Piotr
Well then tell us. You mentioned a hysteresis band, but not how fast it needs to reach its decision. 10ns? 10us? That's what matters. :-)
Tim
Seven Transistor Labs, LLC
Electrical Engineering Consultation and Contract Design
Website: https://www.seventransistorlabs.com/
Have a look at the LM392. Element 14 seems to have plenty of them
formatting link
The op amp isn't nearly fast enough - 1MHz rather than the 24MHz GBW you seem to have in mind, and the comparator isn't quick either.
It looks like a single LM324 element with a single LM339 element - so at least it's compatible with a single 5V supply, even if slow as wet week.
Bill Sloman, Sydney
Wow, I didn't know that such combos exist at all. Thanks, Bill! Yes, this one is way too slow, but maybe there are faster variants? Good to know, this might be very useful in a future project.
Best regards, Piotr
MCP662 says 32V/us, at 5V is under 200ns. Unclear how much slope you'll get for small offsets (i.e., the comparator response vs. so many mV of input overdrive), probably not terrible.
2us at 5V implies as slow as 2.5V/us is acceptable, which is almost LM324/358 territory. :oTim
Seven Transistor Labs, LLC
Electrical Engineering Consultation and Contract Design
Website: https://www.seventransistorlabs.com/
Besides speed and open collector outputs, the other thing is that some op amps don't like having their inputs sit at very different voltages, either because there are inverse parallel diodes between them or because the input devices can get damaged. The latter probably isn't an issue at 5V supplies.
Cheers
Phil Hobbs
Dr Philip C D Hobbs
Principal Consultant
ElectroOptical Innovations LLC / Hobbs ElectroOptics
Optics, Electro-optics, Photonics, Analog Electronics
Briarcliff Manor NY 10510
http://electrooptical.net
https://hobbs-eo.com
Yes, the GBW requirements are imposed by the amplification part, the comparator doesn't have to be Speedy Gonzalez. Thanks, Tim and Phil. Let it be a separate device then.
Best regards, Piotr
Some opamps, especially newer RRO types, make decent comparators in the 1 usec ballpark. Many/most older parts hang up on a rail and take forever to come off. The best thing to do is test candidates.
I use LVDS line receivers a lot as RRIO comparators. They are not DC precise, but they are screaming fast, cheap, and have legal CMOS output levels.
John Larkin Highland Technology, Inc
lunatic fringe electronics
Join the Discussion
Have something to add? Share your thoughts — no account required.
Didn't find your answer?
Ask the community — no account required