Article count:2305 Read by:3469961

Account Entry

An article explains the similarities and differences between operational amplifiers and comparators

Latest update time:2019-08-14
    Reads:

A comparator is a device with two inputs, an inverting and a non-inverting input, and an output that typically has an output voltage range from rail to rail. The same is true for an op amp. While they may seem interchangeable at first glance, there are actually some important differences between the two…


  • Comparators are used in open loop systems, are intended to drive logic circuits from their output, and are generally stable when operated at high speeds.


  • Op amps can saturate when overdriven, making recovery relatively slow. Many op amp input stages behave strangely when large differential voltages are applied, and in practice, op amps often have limited differential input voltage ranges. Op amp outputs are also rarely compatible with logic circuits.


But there are still many people who try to use op amps as comparators. This approach may work at low speeds and low resolutions, but in most cases the results are not ideal. Today, I will tell you why this "result is not ideal" ~


1
Different speeds


Most comparators are fast, but so are many op amps. Why is the speed so low when using an op amp as a comparator?


Comparators are designed for large differential input voltages, and when op amps are operating, the differential input voltage is generally minimized by the negative feedback. When an op amp is overdriven, sometimes only a few millivolts can cause overload, and some of the amplifier stages may saturate. In this case, the device takes a relatively long time to recover from saturation, so if saturation occurs, it will be much slower than if it had never been saturated (see Figure 1).



Figure 1: Amplifier speed saturation effects when the amplifier is used as a comparator


The saturation recovery time of an overdriven op amp is likely to be much longer than the normal group delay of the amplifier and is usually dependent on the amount of overdrive. Since only a few op amps have specific specifications for the time required to recover from various degrees of overdrive, it is generally necessary to experimentally characterize the amplifier for the specific overdrive conditions of a particular application.


The results of such experiments should be viewed with caution, and the propagation delay value through the comparator (op amp) (used in the worst-case design calculations) should be at least twice the worst value from all experiments.


2
Output functions are different


The output of the comparator is used to drive a specific series of logic circuits, and the output of the op amp is used to swing between supply rails.


Typically, logic circuits driven by op amp comparators do not share the op amp's power supply, and the op amp rail-to-rail swing may exceed the logic supply rails, which may damage the logic circuit and may also damage the op amp if a short circuit is caused.


There are three types of logic circuits that must be considered, namely ECL, TTL and CMOS -


ECL is an extremely fast family of current-steering logic. For the reasons mentioned above, it is unlikely that an op amp will be used as a comparator when the highest speeds of ECL are involved in the application, so usually only care needs to be taken to drive the ECL logic levels from the signal swing of the op amp, and the additional speed loss due to stray capacitance is not significant. Only three resistors are required, as shown in Figure 2.



Figure 2: Op amp comparator driving ECL logic circuit


R1, R2, and R3 are chosen so that the gate level is –0.8 V when the op amp output is positive and –1.6 V when the output is low. ECL sometimes uses a positive supply instead of a negative supply (that is, the other supply rail is grounded), and the basic interface circuit is the same, but the values ​​must be recalculated.


Although CMOS and TTL input structures, logic levels, and currents are very different (although some CMOS are specified to operate with TTL input levels), since both logic circuits operate at logic 0 (near 0 V) ​​and logic 1 (near 5 V), they are well suited to use the same interface circuits.



Figure 3: Op amp comparator driving TTL or CMOS logic circuits


The simplest interface uses a single N-channel MOS transistor and a pull-up resistor, RL, as shown in Figure 3. Similar circuits can be constructed using an NPN transistor, RL, and an additional transistor and diode. These circuits are simple, inexpensive, and reliable. It is also possible to connect multiple transistors in parallel and an RL to achieve a "wired-OR" function, but the speed of the 0-1 transition depends on the value of RL and the stray capacitance of the output node. The lower the RL value, the faster the speed, but the power consumption will also increase. By using two MOS devices, one P-channel and one N-channel, a CMOS/TTL interface can be constructed with only two devices, with no static power consumption in either state (see Figure 4).



Figure 4: Op amp comparator with built-in CMOS driver


In addition, the devices can be set to anti-phase or non-phase by simply changing their positions. However, when both devices are turned on at the same time, a large surge current will inevitably be generated during the switching process. Unless a MOS device with integrated high channel resistance is used, a current limiting resistor may be required to reduce the impact of the surge current. The MOS device gate-source breakdown voltage VBGS used in the application of this figure and Figure 3 must be greater than the output voltage of the comparator in each direction. Common gate-source breakdown voltage values ​​for MOS devices are VBGS > ±25 V, which is usually more than enough, but many MOS devices have built-in gate protection diodes that reduce this value, so these devices should not be used.


3
Input Considerations


There are also a number of factors that must be considered regarding the inputs of an op amp used as a comparator. The first-order assumption that engineers make about all op amps and comparators is that they have infinite input impedance and can be considered an open circuit (with the exception of current feedback (transconductance) op amps, which have high impedance at the noninverting input but only a few tens of ohms at the inverting input).


However, many op amps (especially bias-compensated op amps, such as the OP-07 and many of its successors) have built-in protection circuits to prevent large voltages from damaging the input devices.


Other op amps have more complex input circuits that simply present high impedance when the applied differential voltage is less than a few tens of millivolts, or may be damaged when the differential voltage is greater than a few tens of volts. Therefore, when using an op amp as a comparator, it is important to study the data sheet carefully to determine how the input circuitry will work if a large differential voltage is applied. (When using an integrated circuit, always study the data sheet to ensure that its nonideal characteristics (every integrated circuit has some nonideal characteristics) are compatible with the recommended application—this is especially important in this article.) Figure 5 shows an op amp with internal input diodes to protect against large differential voltages.



Figure 5: Op amp input structure with protection


Of course, there are some comparator applications where large differential voltages do not exist, and even when they do, the comparator input impedance is relatively unimportant. This situation lends itself to using an op amp as a comparator with input circuits that exhibit nonlinearity, but the issues involved must be considered and cannot be ignored.


BIFET op amps almost always behave strangely if their inputs are close to one of the supplies (usually the negative supply). Their inverting and noninverting inputs can be interchanged. If this happens when the op amp is used as a comparator, the phases of the systems involved will be reversed, which is very inconvenient. To solve this problem, you must read the data sheet carefully to determine the appropriate common-mode range.


Also, the absence of negative feedback means that unlike an op amp circuit, the input impedance does not have to be multiplied by the open-loop gain. Therefore, the input current will change as the comparator switches. Therefore, the driving impedance and parasitic feedback play a major role in affecting the stability of the circuit. Negative feedback tends to keep the amplifier in the linear region, while positive feedback will cause it to saturate.


Final Advice
Op amps are not designed to be used as comparators, so using them as comparators is not recommended. Nevertheless, there are applications where using an op amp as a comparator is the right design decision, but the key is to think carefully before making the decision and ensure that the op amp you choose will perform as expected. Therefore, it is important to read the data sheet carefully, consider the effects of non-ideal op amp performance, and calculate the impact of the op amp parameters on the application. Because the op amp is used in a non-standard way, you may also have to do some experimentation - the amplifiers used in the experiments may not be typical, so it is not advisable to be overly optimistic when interpreting the experimental results.



Give you a careful heart, please click "Watching"


Latest articles about

 
EEWorld WeChat Subscription

 
EEWorld WeChat Service Number

 
AutoDevelopers

About Us Customer Service Contact Information Datasheet Sitemap LatestNews

Room 1530, Zhongguancun MOOC Times Building,Block B, 18 Zhongguancun Street, Haidian District,Beijing, China Tel:(010)82350740 Postcode:100190

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京ICP证060456号 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号