Forums

Use an opamp as a comparator or not?

Started by Piotr Wyderski December 21, 2017
I need to amplify two signals (BW<=1MHz) 20 times, so there will be
an opamp with GBW=24MHz (or 60MHz, instantiated most likely by MCP66x), 
as the
price is not that much higher). Single supply, 5V. One of the amplified
signals will be then window-compared, with ~400mV hysteresis. The
question is whether the opamp should be a dual version (say, MCP662), 
accompanied by a dedicated dual comparator chip (both in SO08), or just 
use a quad opamp in SO14, which is tempting, without the comparator 
chip. Is the latter option asking for trouble?

	Best regards, Piotr


On Friday, December 22, 2017 at 10:07:35 AM UTC+11, Piotr Wyderski wrote:
> I need to amplify two signals (BW<=1MHz) 20 times, so there will be > an opamp with GBW=24MHz (or 60MHz, instantiated most likely by MCP66x), > as the > price is not that much higher). Single supply, 5V. One of the amplified > signals will be then window-compared, with ~400mV hysteresis. The > question is whether the opamp should be a dual version (say, MCP662), > accompanied by a dedicated dual comparator chip (both in SO08), or just > use a quad opamp in SO14, which is tempting, without the comparator > chip. Is the latter option asking for trouble?
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. http://www.analog.com/en/analog-dialogue/articles/amplifiers-as-comparators.html -- Bill Sloman, Sydney
bill.sloman@ieee.org wrote:

> 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. > > http://www.analog.com/en/analog-dialogue/articles/amplifiers-as-comparators.html
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
"Piotr Wyderski" <peter.pan@neverland.mil> wrote in message 
news:p1i9r2$kn5$1@node1.news.atman.pl...
> 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.
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/
Tim Williams wrote:

> Well then tell us. You mentioned a hysteresis band, but not how fast it > needs to reach its decision.&#2013266080; 10ns?&#2013266080; 10us?&#2013266080; That's what matters. :-)
<=2us. The hysteresis can be lowered to 200mV. OTOH, the comparator can have open collector outpus, which saves me 2 diodes and the area advantage of SO14 diminishes. Best regards, Piotr
On Friday, December 22, 2017 at 10:07:35 AM UTC+11, Piotr Wyderski wrote:
> I need to amplify two signals (BW<=1MHz) 20 times, so there will be > an opamp with GBW=24MHz (or 60MHz, instantiated most likely by MCP66x), > as the > price is not that much higher). Single supply, 5V. One of the amplified > signals will be then window-compared, with ~400mV hysteresis. The > question is whether the opamp should be a dual version (say, MCP662), > accompanied by a dedicated dual comparator chip (both in SO08), or just > use a quad opamp in SO14, which is tempting, without the comparator > chip. Is the latter option asking for trouble?
Have a look at the LM392. Element 14 seems to have plenty of them http://www.ti.com/lit/ds/symlink/lm392-n.pdf 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
bill.sloman@ieee.org wrote:

> http://www.ti.com/lit/ds/symlink/lm392-n.pdf
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
"Piotr Wyderski" <peter.pan@neverland.mil> wrote in message 
news:p1ilvh$cch$1@node2.news.atman.pl...
> <=2us. The hysteresis can be lowered to 200mV. OTOH, the comparator > can have open collector outpus, which saves me 2 diodes and the area > advantage of SO14 diminishes.
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. :o Tim -- Seven Transistor Labs, LLC Electrical Engineering Consultation and Contract Design Website: https://www.seventransistorlabs.com/
On 12/22/2017 09:25 AM, Tim Williams wrote:
> "Piotr Wyderski" <peter.pan@neverland.mil> wrote in message > news:p1ilvh$cch$1@node2.news.atman.pl... >> <=2us. The hysteresis can be lowered to 200mV. OTOH, the comparator >> can have open collector outpus, which saves me 2 diodes and the area >> advantage of SO14 diminishes. > > MCP662 says 32V/us, at 5V is under 200ns.&#2013266080; 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. :o > > Tim >
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
Tim Williams wrote:

> 2us at 5V implies as slow as 2.5V/us is acceptable, which is almost > LM324/358 territory. :o
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