Comparators vs Op Amps - Page 1
Forum section: electronics / beginners

author: cowboy303
author_rank: Regular Contributor
timestamp: March 08, 2012, 03:23:34 pm
content: Probably simple but what is the difference between Comparators and Op amps I looked all over Google and can't find anything.I know you can hook up a op amp as a comparator but can't find out how there different.Thanks

author: Armin_Balija
author_rank: Regular Contributor
timestamp: March 08, 2012, 03:47:03 pm
content: Operational Amplifiers use differential inputs to produce an amplified output hundreds of thousands of times the difference in voltage of the input. An operational amplifier can be hooked up without feedback to be used as a comparator which compares the inputs and gives you an output close to the supply voltage based on if the inputs are outside of the threshold you put.So say you set up your Op-Amp as a comparator and set the sensitivity of the op-amp to give you an output when the difference between the inputs is past a certain voltage, say 50 mV. So when the inputs of the Op-Amp are the same voltage (or within 50 mV of each other) you will not get an output close to the supply voltage. Once the 50 mV threshold is broken you will get an output close to supply voltage.Operational Amplifiers can be used as voltage amplifiers through the use of feedback to drive it's inputs.That's how I understand them at least.

author: BravoV
author_rank: Super Contributor
timestamp: March 08, 2012, 03:54:05 pm
content: Read this Texas Instrument App Note -> "Op Amp and Comparators – Don’t Confuse Them!" ->http://www0.fh-trier.de/~berres/Datenbl%E4tter/TEXAS/sloa067.pdfHere quote from the final paragraph of this paper ->"Comparators and op amps, although similar, are very different components. It is unlikely that a comparator will be used as an op amp. However, Texas Instruments applications have received a number of inquiries about using op amps as comparators in an open loop. The best advice Texas Instruments can give is to not do this. The very best a designer can expect is very poor performance; the worst is a circuit that does not work or even burns out."

author: saturation
author_rank: Super Contributor
timestamp: March 08, 2012, 05:06:32 pm
content: You can use an op amp as a comparator except you have to design it to compensate for its op amp flaws, and insure its performances thereafter is within your specification. Today, with premade comparators to choose from already optimized for digital logic, its less practical to do this, unless you simply have an extra op amp say after using what you need from a dual or quad package, and want to drive say an LED as an annunciator. Many design texts from the 1980s onward op amp comparators in detail.http://en.wikipedia.org/wiki/Comparator#Op-amp_voltage_comparatorhttp://www.ecircuitcenter.com/circuits/op_comp/op_comp.htmIn the metrologic grade voltage reference EDC MV106 than Dave reviewed a while back, it uses a 741 op amp as a comparator to switch on the overload output indicator; it works perfectly well in that simple task and this device has been in existence since 1989.Likewise, when analog designers were fairly prolific, it was acceptable use to purpose logic gates as linear devices when needed, just to squeeze more functions from excess parts you have left over.http://www.electronics-related.com/usenet/design/show/2285-1.phpThere are no hard rules so long as you play within the boundaries of anticipated performance.

author: jahonen
author_rank: Super Contributor
timestamp: March 08, 2012, 06:45:10 pm
content: One major difference is that not all opamps tolerate large differential input voltage, so that may prevent using them as a comparator.Regards,Janne

author: cowboy303
author_rank: Regular Contributor
timestamp: March 08, 2012, 06:53:16 pm
content: WOW that was fast Thanks.Dave did this with one of his power supply videos and I was wondering if I can do this with a lm393 I have a lm324 on the board But its not in a very good spot. It has an open output any way but it would take some wireCan I do this with an lm393 or should I use the lm324.http://www.falstad.com/circuit/#%24+1+5.0E-6+10.20027730826997+50+5.0+50%0Aa+368+176+368+272+0+15.0+-15.0+1000000.0%0Ar+320+128+416+128+0+1.0%0Ar+320+128+320+176+0+10000.0%0Ar+320+272+320+176+0+10000.0%0Ar+416+128+416+176+0+10000.0%0Ar+416+176+416+272+0+10000.0%0Ag+480+192+480+208+0%0Ag+320+272+320+288+0%0AR+256+128+208+128+0+0+40.0+10.0+0.0+0.0+0.5%0Aw+256+128+320+128+0%0Aw+416+128+480+128+1%0Aw+384+176+416+176+0%0Aw+352+176+320+176+0%0Aw+368+272+416+272+0%0AO+368+272+368+304+1%0A174+480+128+480+192+0+1000.0+0.9950000000000001+Resistance%0Aw+496+160+496+192+0%0Aw+496+192+480+192+0%0AThanks.

author: amspire
author_rank: Super Contributor
timestamp: March 08, 2012, 09:58:52 pm
content: You cannot use a comparator as a negative feedback stabilized opamp (like the instrumental amplifier circuit in your link).LM324's have an internal capacitor to guarantee they will be stable with resistive negative feedback.LM393's are designed to be as fast as possible, so they do not have any compensation to make them stable with negative feedback.

author: IanB
author_rank: Super Contributor
timestamp: March 09, 2012, 03:44:51 am
content: Quote from: cowboy303 on March 08, 2012, 03:23:34 pmI guess the short answer is that a comparator is a digital component, i.e. its output is designed to be fully high or fully low but nowhere in between.An op amp is designed to be an analog amplifier--its output can be anywhere between high and low and remain stable in that position.You can sometimes (mis)use one as the other, but only if you account for the limitations and don't try to exceed the capabilities of the device.

author: cowboy303
author_rank: Regular Contributor
timestamp: March 09, 2012, 04:21:00 am
content: OK thank I'll do some pin swappingOne of the lm324 outputs are running a led any way so I think every thing will work out great.Thanks everyone.

author: Mechatrommer
author_rank: Super Contributor
timestamp: March 09, 2012, 09:17:46 am
content: high slew rating can be had cheap on comparator, but only if you do not care "linear region" (opamp)

author: BravoV
author_rank: Super Contributor
timestamp: March 09, 2012, 09:57:02 am
content: Just remember an excellent illustration and analogies on both at different output from my mentor long time ago ......Comparator, either ON or OFF at it's output and it will perform really fast and no hesitation.Op amps, though it can be made to behave like a comparator to swing to both extreme sides, it will be slower and other complications might arised, since its designed to give the output result swinging "in between" both ends.Hence, its very unlikely to make a comparator to behave like an op amp.

author: Spiro
author_rank: Contributor
timestamp: March 10, 2012, 03:15:32 pm
content: Some comparators have open colector as output.

author: cowboy303
author_rank: Regular Contributor
timestamp: March 20, 2012, 04:27:06 am
content: I'm sorry about bringing this up again. But I was thinking that if op amps are analog and comparators are digital can't you use a comparator for a switching power supply? Or would that be hard on it?Sorry again Dave's last video got me thinking on some stuff.

author: amspire
author_rank: Super Contributor
timestamp: March 21, 2012, 12:24:11 pm
content: Quote from: cowboy303 on March 20, 2012, 04:27:06 amLots of switching power supplies have been based around the LM339 quad comparator. They are perfect for a custom switching power supply as long as you are not expecting it to run at 1MHz or something. The LM339 designs I can think of were in sub-100KHz supplies.If you want to switch at 200KHz or more, it is hard to beat the new generation of controller IC's that usually either include the switching mosfets, or the mosfet drivers.Richard.

author: T4P
author_rank: Super Contributor
timestamp: March 21, 2012, 03:51:08 pm
content: For up to 500kHz the legendary UC384X series is hard to beat .Anything above that obviously are for the new range of chips .The TL494 is similarly overused and it only has 300kHz operation speed ,A computer PSU i found that is the same size as newer PSU's of 800W ( this one is 200W ) uses both TL494 and LM339 .But yeah , UC384X chips were found in higher end power supplies of back then ( The one i have from a tape drive is still perfectly clean and it's silkscreen is sex on a stick ! )

author: marinedalek
author_rank: Contributor
timestamp: March 21, 2012, 10:01:32 pm
content: A little off-topic, but here's a fun example of what you can achieve by (mis)using 4000-series digital logic in analogue designs.A voltage-controlled sawtooth oscillator with a second voltage-controlled PWM output:http://www.uni-bonn.de/~uzs159/vco4069.html