Should I Use an Opamp for a Comparator?

preview_player
Показать описание
Welcome to the video series, the operational amplifier, from abstraction to reality. While the operational amplifier can be used as a voltage comparator, there are several reasons why you should NOT. We will examine those reasons and point out the differences, between the opamp and a comparator.

00:00 Intro
00:24 Comparison of the Caparator and the Opamp
01:00 Reasons to NOT Use Opamp as a Comparator
02:03 Input Stage Internal Simplified Schematic Comparison
02:52 Input Stage Spec Comparison
04:02 Full Equivalent Circuit Comparisons
05:35 Speed Test - Opamp vs. Comparator
06:25 Possibility of Phase Reversal
06:43 Opamp Input Diodes
06:59 Interface to Logic Levels
07:41 Summary
Рекомендации по теме
Комментарии
Автор

Good in-depth analysis of a controversial topic. Thanks!

Enigma
Автор

There are some subtleties that perhaps ought to be explored before rejecting outright the use of an opamp as a comparator. If you have fast rising signals, like your 10KHz square wave, then the deliberately limited slew rate of the LM358 will be a disadvantage. Nevertheless, at lower frequencies, and especially where the input signal may be quite slow to change such as with sensors, then the limited slew rate becomes irrelevant. Remember that the pullup resistor on the LM339 will quickly degrade its fast rise times if there is capacitance present on the output. A power mosfet's input capacitance can easily be around 1nF, and that will have a time constant with the 10K resistor of around 10μs, not much less than the rise time for the LM358.

In general, with the comparator some hysteresis (positive feedback) becomes essential for slow inputs because of the tendency for the comparator to burst into oscillation around the crossing point unless extreme care is taken with layout, whereas the limited bandwidth of the opamp reduces that problem.

It's also worth noting that the LM311 can sink 6ma, but cannot source current, so with a 10K pullup resistor, its high output will drop from 5V to 3V with a little as 0.2mA drawn. For comparison, the LM358 can sink 10mA, but can source 20mA, a factor of 100x more. That may be crucial in some applications.

RexxSchneider
Автор

Nice rise time comparison. As someone adding analog wrinkles to digital circuits, I tend to use digital ground as analog minus, thus simplifying the interfacing of comp outputs to digital inputs. For this, the open collector outputs are an inconvenience as they require an additional pull up resistor between V+ and comp output.
The equivalent circuits shown have the comparator as essentially the first stages of the opamp, but with the capacitor removed. The omitted stages happen to invert the signal during amplification, but that's not fundamental.

johndododoe
Автор

This is what we call a good explanation and a good comparison, tbh i used to think that i can use op-amps as comparators
Now I respect the fact that they are called ( op-amps// comparators ) for a reason
This shows that we should respect nominations etc

unknown-unknown
Автор

Thanks, I built an analogue power supply many years back using an op-amp and high powered transistor which worked well, just realised now may be I should have used the comparator??

PF-givv