apogeeweb title
Home  Amplifiers

Aug 18 2020

Using Op Amps as Comparators Characteristics Overview

Introduction

In electronics, operational amplifiers are generally dual/quadruple configurations. So users can consider using the extra amplifier as a comparator. Electrical symbols of the comparator and the operational amplifier are very similar. They are devices with one input inverting terminal and one non-inverting terminal, and one output terminal. In addition, the output voltage range of the output terminal is generally between the rail-to-rail power supply. Meanwhile, they have same features of low bias voltage, high gain and high common-mode rejection ratio. When an op amp is used as a comparator, its own gain bandwidth product, group delay, slew rate and other parameters are likely to be changed due to internal frequency compensation and saturation effects. For an optimized single device, this change can be seen as an economical solution. This article discusses the specifications and characteristics to consider when using op-amps as comparators and provides design advice.

Op-Amp As a Comparator

Catalog

Introduction

Ⅰ Operational Amplifier and Comparator

1.1 Electronic Op Amp

1.2 Electrical Comparator

Ⅱ Circuit Structure Comparison

2.1 Op Amp

2.2 Comparator

Ⅲ Difference between Amplifier and Comparator

3.1 Total Difference Summary

3.2 Distinctions between Op-amp and Comparator

Ⅳ Basic Use of Comparators and Op Amps

Ⅴ Op-amp Comparator

5.1 Technique

5.2 Op Amp Comparators Disadvantages

Ⅵ Using Op Amps as Comparators Notes

Ⅶ Conclusion


Ⅰ Operational Amplifier and Comparator

1.1 Electronic Op Amp

The operational amplifier is a kind of differential amplifiers with high input resistance, low output resistance, high open gain (open-loop gain), and has the function of amplifying the voltage difference between the active input pin and the negative input pin. Operational amplifiers and voltage comparators are indeed the same in principle and diagram symbol. That said, they have 5 pins: two of which are power supply (+) and supply power (-), another two pins are non-inverting input (+) and non-inverting input terminal (-), and the last pin is the output terminal.

op amp symbol
Figure 1. Op Amp Symbol

1.2 Electrical Comparator

Comparing two or more data items to determine whether they are equal, or determining the  relationship and arrangement order between them is called comparison. A circuit or device that can realize this is called a comparator. Specifically, it is a circuit that compares an analog voltage signal with a reference voltage. The two inputs of the comparator are analog signals, and the output is a binary signal 0 or 1. When the difference of the input voltage increases or decreases and the sign of the positive and negative remains unchanged, the output remains constant. Comparing the voltages of the two input terminals, if the voltage at the positive input terminal is a and the voltage at the negative input terminal is b, when a>b, the output is high level(logic 1); when a<b, the output is low level(logic 0). The schematic diagram is shown below (the voltage at the input terminals of the comparator is IN1 and IN2, the power supply is VCC/GND, the pull-up resistor is 1K, and the pull-up voltage is VCC.).

Volatge Comparator
Figure 2. Volatge Comparator

When output voltage IN1>IN2, positive input is in high level with high voltage.
When output voltage IN2>IN1, negative input is in low level with high voltage.

A reference voltage is usually applied to an input terminal. Then the output will indicate the  signal applied to the other input. Comparators are often used to determine whether a signal is above or below the reference level. And meawhile, the comparator can form a non-sinusoidal waveform conversion circuit and be used in fields such as analog and digital signal conversion.
When the reference voltage is zero, the comparator is called a zero-crossing detector. It uses to convert a sine wave into a square wave. Two comparators can form a "window" circuit, which is used to determine whether a signal is between two limited values. In an output state of the comparator changes as quickly as possible, and sometimes the output of the comparator is required to have a certain logical relationship with the input, a dedicated strobe pulse is required. At this time, the op amp comparator only has an output during operation. In general, a dedicated comparator IC has better performance. And it replaces the operational amplifier in some applications. The most common advantage is that the comparator IC operates with a single power supply.
The comparator has a wide range of uses, and can be used for discrete control of voltage signals such as thermistors and photosensitive sensors. For example, the voltage value of the photoresistor is collected by a comparator to determine whether it is day or night. What’s more, the comparator can also be used for voltage adjustment in an analog negative feedback circuit.

TLC311 comparator

Figure 3. TLC311 Comparator

It can be seen from the diagram that the difference between the operational amplifier and the comparator lies in the output circuit. The operational amplifier uses a dual-transistor push-pull output. While the comparator uses only one transistor, the collector is connected to the output terminal, and the emitter is grounded. In addition, the comparator requires an external pull-up resistor from the positive power supply terminal to the output terminal, which is equivalent to the collector resistance of the transistor. Op amp can be used for linear amplifying circuit (negative feedback), as well as the non-linear signal voltage comparison (open-loop or positive feedback). The comparator can only be used for signal voltage comparison, not for linear amplifier circuits (because it has no frequency compensation). Both can be used for signal voltage comparison, but the comparator is designed as a high-speed switch, which has a faster conversion rate and a shorter delay than an operational amplifier.

 

Ⅱ Circuit Structure Comparison

2.1 Op Amp

Op Amp Circuit
Figure 4. Op Amp Circuit

Op amp circuit generally consists of input segment, gain segment, and output segment. The input  is composed of a differential amplifier section for amplifying the voltage difference between two pins. In addition, the in-phase signal component (the state where there is no potential difference between the pins and the input voltage is some) is not amplified to take a cancellation effect. If only relying on the differential amplifier circuit, the gain is insufficient, so the gain section is used to further increase the open gain of the operational amplifier.
The anti-vibration phase compensation capacitor is connected between the gain section of the ordinary operational amplifier. In order to avoid changes in the characteristics of the operational amplifier due to loads such as resistors connected to the output pins, a compensation capacitor is connected with the output as a buffer.
The change (distortion, voltage drop, etc.) in output characteristics caused by the load is mainly determined by the circuit structure and current capability of the output section.
Generally, types of output circuit stages are A, B, C, and AB type, which are classified according to the amount of drive current flowing in the output (the difference in bias voltage). Depending on the amount of drive current, the level of distortion coefficient in the output section will change. The order of general circuit distortion from small to large is type A, type AB, type B, and type C.

 

2.2 Comparator

comparator circuit
Figure 5. Comparator Circuit

The comparator circuit structure is basically the same as that of an operational amplifier. Because a negative feedback circuit is not used, there is no built-in phase compensation capacitor for vibration isolation. Owing to it can limit the operating speed between the input and output, the response time is significantly improved compared with the operational amplifier.
The output circuit form of the comparator is mainly divided into open collector (open drain) type and push-pull output type. The figure shows the internal equivalent circuit of BA10393, it is also an open collector output circuit.

 

Ⅲ Difference between Amplifier and Comparator

3.1 Total Difference Summary

(1) The main difference between amplifier and comparator is the closed-loop characteristic. Most of the amplifiers work in a closed loop state, so it is required that they cannot be self-excited after the closed loop. Most of the comparators work in an open loop state and pursue speed. For the case of relatively low frequencies, the amplifier can completely replace the comparator (the output level should be considered), but in most cases, the comparator cannot be used as an amplifier.
In order to increase the speed, the comparator optimization will reduce the range of closed-loop stability. While the op amp is optimized for the closed-loop stable range, so the speed is reduced. If an amplifier used as a comparator, as for performance, you may pay more than an amplifier price for its closed-loop stability.
In other words, whether an op amp is used as a comparator or not is to see the negative feedback depth of the circuit. Therefore, a shallow closed-loop comparator may work in the amplifier state and will not have self-excited state. However, a lot of experiments must be done to ensure that the op amp is stable under all working conditions.

(2) In general speaking, the comparator is an open-loop application of the op amp, but the comparator is designed for voltage threshold comparison. The required comparison threshold must be accurate, and the rise or fall time of output edge after comparison should be short. It conforms to TTL/CMOS level/or OC, etc., does not require the accuracy of the intermediate links, in addition, the driving capability is also different. In short, using op amps as comparators cannot achieve full-scale output in most cases, or the edge time after comparison is too long. So it is better to use special comparators in the design.

op amp and comparator symbol

Figure 6. Op Amp and Comparator Symbol

3.2 Distinctions between Op-amp and Comparator

Although the electrical symbols of the comparator and the op amp are the same on the circuit diagram, the two devices have big differences and are generally not interchangeable. The differences are as following:
1. The flipping speed of the comparator is fast, on the level of ns, while the flipping speed of the op amp is generally us level(except for special high-speed op amps).
2. The op amp can be connected to the negative feedback circuit, but the comparator cannot use negative feedback. Although the comparator also has two input terminals of the inverting and non-inverting phase, when connecting negative feedback, the circuit cannot work stably without phase compensation circuit inside. But it is the main reason why the comparator is much faster than the op amp.
3. The output stage of the operational amplifier generally adopts a push-pull circuit and a bipolar output. The output stage of most comparators is an open collector structure, so pull-up resistors and unipolar output are needed, which are easy to connect to digital circuits.
4. Based on input, many operational amplifiers have built-in protection circuits to prevent large voltages from damaging the chip. When a large differential voltage is input, the input work will become abnormal, because the differential input voltage range of the op amp is usually limited. In addition, the common-mode input voltage range of non-rail-to-rail op amps cannot reach the positive power rail, but the comparator supports the positive power rail. Op amps and comparators have many similar parameters. It is more convenient to choose op amps instead of comparators in applications that require low offset voltage, low offset current, and high common mode rejection.

 


Ⅳ Basic Use of Comparators and Op Amps

operational amplifier and comparator
Figure 7. Operational Amplifier and Comparator

The comparator is an open-loop circuit. Its function is to compare the voltage of the output terminal. When the voltage at the positive input terminal is large (IN2>IN1), the output is in high level (note: The comparator is an OC output, and the output terminal needs a pull-up resistor. A few volts will be pulled up to output a few volts, otherwise, the output will be an open circuit). When the negative input terminal voltage is large (IN1>IN2), the output will be in low level (GND). The voltage comparator input signal is an analog voltage, and the output signal generally only has two steady-state voltages of high level and low level. The voltage comparator can convert various periodic signals into rectangular waves.
Operational amplifier can be used in linear amplifying circuit, and can also be used in non-linear circuit (used as comparator). It is widely used in electrical circuits, such as non-inverting amplification, inverse proportional amplification, difference, addition circuit, subtraction circuit, integral and differential circuit.

 

 

Ⅴ Op-amp Comparator

5.1 Technique

The functions of the operational amplifier are more complicated, but the comparator is relatively simple. When the frequency requirement is not high, the operational amplifier can also be used as a low-performance comparator in practical applications.
In theory, an operational amplifier with an open-loop configuration (no negative feedback) can function as a low-end comparator. When the voltage of the non-inverting input terminal (V+) is higher than the inverting input terminal (V-), due to the higher open-loop gain, a positive saturation voltage +U is output. When the voltage of the inverting input terminal (V-) is higher than the positive input terminal (V+), a reverse saturation voltage -U is output. For an op amp that works in a linear negative feedback configuration and is powered by a separate voltage (±V), is different from a non-linear comparator without negative feedback.

 

5.2 Op Amp Comparators Disadvantages

In practice, the use of op amp comparators has the following disadvantages compared with the use of dedicated comparators:
1) The op amp is designed to work in a linear segment with negative feedback, so saturated op amps generally have a slower flip speed. Most op amps have a compensation capacitor used to limit the slew rate of high-frequency signals. This makes the op amp comparator generally have a propagation delay on the level of microseconds, but a dedicated comparator is on the level of nanoseconds.
2) The op amp does not have a built-in hysteresis circuit and requires a special external network to delay the input signal. 
3) The static operating current of the op amp is stable only under negative feedback conditions. When the input voltage is not equal, there will be a DC offset.   
4) The function of the comparator is to generate the input signal for the digital circuit. When using the op amp comparator, it is necessary to consider the compatibility with the digital circuit interface.
5) Interference may occur between different frequencies of multiple op amps.
6) Many op amps have diodes connected in reverse series at the input. The input of the two poles of the op amp is generally the same, which will not cause operational problems. But the two poles of the comparator need to be connected to different voltages, which may cause unexpected breakdown of the diode.
7) Integrated circuits of dedicated comparator, which better combine the characteristics of analog and digital. It provides an output representing the logic state related to two analog voltages, one of which is a fixed reference quantity. When another voltage exceeds the reference value, is less than the reference value, or is in a specified range, the comparator can send a signal. It has an optimized combination of high gain, wide bandwidth and large flip rate to quickly change the output state. And the conversion time of digital signals is usually very fast.

 


Ⅵ Using Op Amps as Comparators Notes

There are many points should remember when using op amps as comparators in circuits. You must consider five main op-amp characteristics to ensure expected performance:

1) Power Supply
If the logic and operational amplifier share the same power supply, the rail-to-rail operational amplifier can drive CMOS and TTL logic. but if they do not share the same power supply, an additional interface circuit is required.

2) Input impedance and Bias Current
When the operational amplifier is used as a comparator, it must meet the high input impedance condition. The input impedance of the CMOS voltage feedback operational amplifier is in the megohm level, which meets the requirement. As for current feedback (transconductance) operational amplifiers, the inverting input terminal has extremely low impedance, which cannot be used as a comparator.

3) Differential Input Characteristics
The original intention of operational amplifier design is to cooperate with negative feedback to reduce the differential input as much as possible. In specific applications, the actual differential input voltage and the maximum differential input voltage that the op amp can actually provide should be considered.

4) Common-mode Input Characteristics
For the old FET-type input operational amplifier, when the input exceeds the common-mode voltage range allowed by the device, a phase reversal will occur. At present, the op amps produced by various manufacturers use various methods to prevent the op amps from phase inversion. If the actual common-mode voltage range exceeds the allowable input common-mode voltage range of the op amp, you need to actually verify whether it is working properly.

5) Stability
Because there is no negative feedback externally, the open loop gain of the op amp used as a comparator is very high. Therefore, parasitic capacitance of the PCB and ground impedance of the non-inverting input terminal may cause the output to oscillate.

window comparator circuit

Figure 8. Window Comparator Circuit


Ⅶ Conclusion

Although op amps are not designed to be used as comparators, nevertheless, many applications where the use of an op amp as a comparator is an economical engineering decision. It is important to make an reasonable decision to ensure that the op amp chosen performs as expected.
That said, it is necessary to read the data sheets carefully and to consider the effects of op amp parameters on the application. Because the op amp is being used in a nonstandard manner, it may not reflect actual behavior, and some circuit experiment is advisable. Furthermore, because not all devices are typical in their behavior, some pessimism is warranted when interpreting the experimental results.

Related Articles

0 comment

Leave a Reply

Your email address will not be published.

 
 
   
Rating: