TI E2E Community
Op Amps used as Comparators—is it okay?
Welcome to “The Signal,” a technical blog focusing on analog signal processing circuits.
Op Amps used as Comparators—is it okay?
Many of you (and I, too) occasionally use an op amp as a comparator. Often, this is when you only need one simple comparator and you have a “spare” op amp in a quad op amp package. The phase compensation required for stable op amp operation means that it will be very slow as a comparator, but if speed requirements are modest, the op amp may suffice. We get sporadic questions about this use of an op amp. Some work okay… some don’t operate as expected. Why?...
Many op amps have voltage clamps between the input terminals, most often implemented with back-to-back diodes (sometimes with two or more diodes in series). These diodes protect the input transistors from reverse breakdown of their base-emitter junctions. With many IC processes breakdown would occur at approximately 6V differential input and could significantly alter or damage the transistor. With the NPN input stage shown below, D1 and D2 provide the protection.
In most common op amp applications you have near zero volts across the inputs and never turn on these diodes. But clearly, this protection can be a problem for comparator operation. You have a limited differential voltage range (0.7V, or so) before one input will tug on the other, pulling its voltage in an unexpected manner. This may not rule out its use as a comparator but it would require some careful consideration. In some circuits, it may be totally unacceptable.
The problem is that we (and other op amp manufacturers) have been inconsistent in communicating the presence of these clamps. Even when we do, we may not explain or interpret the message. Maybe we should say, “be careful if used as a comparator!” The authors of data sheets often just assume that you are going to use an op amp as an op amp. We recently held a meeting in our Tucson product group and resolved that we would communicate this more clearly in the future. But what about all the op amps already out there? Here are some guidelines that may help:
In general, op amps with bipolar NPN transistors have input clamps. Examples would be OP07, OPA227, OPA277, etc. An exception is the old uA741 which has NPN input transistors but additional lateral PNPs in series that provided inherent protection for the NPNs.
General purpose op amps with lateral PNP input transistors generally do not have input clamps. Examples include LM324, LM358, OPA234, OPA2251 and OPA244. These op amps are generally “single-supply” types, meaning that they have a common-mode range that extends to the negative supply terminal or slightly below. They can often be identified as the input bias current is listed as a negative number indicating that input bias current flows out of the input pins. Note, however, that high speed op amps using PNP inputs generally have input clamps as these are vertical PNPs with lower breakdown voltage.
JFET and CMOS amplifiers that operate on higher voltage (greater than 20V, or so) may or may not have clamps. It’s an iffy proposition that requires more checking. The characteristics of the process and the particular transistors used determine whether clamps are present internally.
Most low voltage CMOS op amps do not have clamps. There is a special exception for auto-zero or chopper types that may have behaviors that look like clamps.
The bottom line... if you consider using an op amp as a comparator, use caution. Glean what you can from the data sheet, including comments in the applications section. Validate its behavior in a breadboard or prototype, checking for influence of one input voltage on the other. Don’t rely on a SPICE macromodel. Some macromodels may not include extra components to model the clamps. Furthermore, other behaviors that can arise when you bang an op amp from rail to rail may not be accurately modeled. If you’re in doubt, ask us on our E2E forums.
Can differential clamps affect standard op amp circuits? Op amps should have nearly zero voltage across the inputs, right? More on this next week.
Thanks for reading,
Thanks Bruce for explanation of the topic
nice article,i never thought about the internal diodes....
Thanks for your brilliant lecturer. and I have two questions.
Do you mean the parasitic capacitor of the clamp diode infuence the delay time, so if an OP do not have input clamp, such as the PNP input, it is no problem when we use it as a comparator?
Another question is what about the input of a comparator? Is there any clamp for the input? If no, how to aviod breakdown for a IC itself?
Jie Feng-- The capacitance of the clamp diodes is not the reason for slow response of an op amp used as a comparator. Slow response is due to the internal phase compensation required for closed-loop stability. A comparator does not have this phase compensation. Comparators do not have input clamp diodes. They avoid breakdown by using other circuit design techniques. -- Bruce
Thanks for your reply. When we use OP amp as a comparator, there have two parts should be consider: 1. the voltage drop of the input diode, cause it will infuence the comparator level. 2. whether the slow response can meet the requirement of the circuit. Am I right?
Thank you for your share. This helps me a lot.
All content and materials on this site are provided "as is". TI and its respective suppliers and providers of content make no representations about the suitability of these materials for any purpose and disclaim all warranties and conditions with regard to these materials, including but not limited to all implied warranties and conditions of merchantability, fitness for a particular purpose, title and non-infringement of any third party intellectual property right. TI and its respective suppliers and providers of content make no representations about the suitability of these materials for any purpose and disclaim all warranties and conditions with respect to these materials. No license, either express or implied, by estoppel or otherwise, is granted by TI. Use of the information on this site may require a license from a third party, or a license from TI.
TI is a global semiconductor design and manufacturing company. Innovate with 100,000+ analog ICs andembedded processors, along with software, tools and the industry’s largest sales/support staff.