Comparator is a device with two input terminals of inverting and in-phase and one output terminal. The output voltage range of the output terminal is generally between the power supply rail and rail. The same is true for operational amplifiers. At first glance, it seems interchangeable. In fact, there are some important differences between the two.

Comparator is used in open-loop system to drive logic circuit from its output and works at high speed. It is usually stable.

When the operational amplifier is over driven, it may be saturated, making the recovery speed relatively slow. When a large differential voltage is applied, the input stage of many operational amplifiers will show abnormal performance. In fact, the differential input voltage range of operational amplifiers is usually limited. Operational amplifier outputs are rarely compatible with logic circuits.

However, many people still try to use operational amplifiers as comparators. This approach works at low speed and low resolution, but in most cases the results are not ideal. Today, Xiaobian will tell you the reason why the “result is not ideal”~

Different speed

Most comparators are fast, but many operational amplifiers are also fast. Why does low speed occur when operational amplifiers are used as comparators?

The comparator is used for large differential input voltage, and when the operational amplifier works, the differential input voltage will generally drop to the lowest under the action of negative feedback. When the operational amplifier is over driven, sometimes only a few millivolts may also lead to overload, and some amplifier stages may be saturated. In this case, the device takes a relatively long time to recover from saturation. Therefore, if saturation occurs, its speed will be much slower than that when it is always unsaturated (see Fig. 1).

  

Figure 1: amplifier speed saturation effect when amplifier is used as comparator

The saturation recovery time of an overdrive operational amplifier is likely to far exceed the normal group delay of the amplifier, and usually depends on the amount of overdrive. Since only a few operational amplifiers clearly specify the time required to recover from different degrees of overdrive state, generally speaking, it is necessary to determine the characteristics of amplifiers through experiments according to the specific overdrive conditions of specific applications.

The results of such experiments should be cautious, and the propagation delay value (used for design calculation under the worst conditions) through the comparator (operational amplifier) should be at least twice the worst value in all experiments.

Different output functions

The output of the comparator is used to drive a specific logic circuit series, and the output of the operational amplifier is used to swing between the power supply rails.

Generally, the logic circuit driven by the operational amplifier comparator will not share the power supply of the operational amplifier. The rail to rail swing of the operational amplifier may exceed the logic power supply rail, which is likely to damage the logic circuit and the operational amplifier after short circuit.

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

ECL is an extremely fast current guiding logic series. For the above reasons, when the maximum speed of ECL is involved in the application, the operational amplifier is unlikely to be used as a comparator. Therefore, it is usually only necessary to pay attention to driving the ECL logic level from the signal swing of the operational amplifier, and the additional speed loss caused by stray capacitance is not important. Only three resistors are needed, as shown in Figure 2.

  

Figure 2: operational amplifier comparator driving ECL logic circuit

R1, R2 and R3 are selected in the figure. When the output of the operational amplifier is positive, the gate level is – 0.8 V; when the output is low, the gate level is – 1.6 v. ECL sometimes uses positive power supply instead of negative power supply (i.e. another power supply rail is grounded). The basic interface circuit used is the same, but the value must be recalculated.

Although the input structure, logic level and current of CMOS and TTL are very different (although some CMOS clearly specify that TTL input level can be used for operation), since both logic circuits work at logic 0 (close to 0 V) and logic 1 (close to 5 V), it is very suitable to use the same interface circuit.

  

Figure 3: operational amplifier comparator driving TTL or CMOS logic circuit

The simplest interface uses a single n-channel MOS transistor and a pull-up resistor RL, as shown in Figure 3. A similar circuit can be composed of NPN transistor, RL, plus a transistor and diode. These circuits are simple, cheap and reliable. They can also connect multiple parallel transistors and one RL to realize the “line or” function, but the speed of 0-1 conversion depends on the RL value 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 with only two devices can be formed, and there is no static power consumption in each state (see Fig. 4).

  

Figure 4: operational amplifier comparator with built-in CMOS driver

In addition, it can be set to be in phase or in phase only by changing the position of the device. However, when two devices are turned on at the same time, large surge current is bound to be generated during the switching process. Unless MOS devices with integrated high channel resistance are used, current limiting resistors may be needed to reduce the impact of surge current. The gate source breakdown voltage VBGs of the MOS device used in the application in figure and figure 3 must be greater than the output voltage of the comparator in each direction. The common gate source breakdown voltage VBGs ± 25 V in MOS devices is usually more than enough, but many MOS devices have built-in gate level protection diodes, which will reduce this value, so these devices should not be used.

Input considerations

For operational amplifiers used as comparators, many factors related to their input need to be considered. The first level assumption made by the Engineer for all operational amplifiers and comparators is that they have infinite input impedance and can be regarded as open circuit (except for current feedback (transconductance) operational amplifiers, which have high impedance at the in-phase input and low impedance of tens of ohms at the inverting input).

However, many operational amplifiers (especially bias compensated operational amplifiers, such as op-07 and many subsequent products) have built-in protection circuits to prevent large voltage from damaging the input devices.

Other operational amplifiers have built-in more complex input circuits, which only have high impedance when the applied differential voltage is less than tens of millivolts, or may be damaged when the differential voltage is greater than tens of volts. Therefore, when the operational amplifier is used as a comparator, if a large differential voltage is applied, the data manual must be carefully studied to determine the working mode of the input circuit. (when using integrated circuits, it is important to study the data book to ensure that its non ideal characteristics (some non ideal characteristics exist in each integrated circuit) are compatible with the recommended applications – this is particularly important in this paper.) Figure 5 shows an operational amplifier with a built-in diode to prevent large differential voltage input.

  

Figure 5: input structure of operational amplifier with protection function

Of course, there are some comparator applications where there is no large differential voltage, and even if there is, the comparator input impedance is relatively unimportant. In this case, the operational amplifier is suitable to be used as a comparator, and its input circuit is nonlinear, but the problems involved must be considered and can not be ignored.

For BiFET operational amplifier, if its input is close to one of the power supplies (usually negative power supply), it will almost always behave abnormally. Its inverting and in-phase inputs can be interchanged. If this happens when the operational amplifier is used as a comparator, the phase of the system involved will be reversed, causing great inconvenience. To solve this problem, we must carefully read the data manual to determine the appropriate common mode range.

Moreover, the absence of negative feedback means that, unlike operational amplifier circuits, the input impedance does not have to be multiplied by the open-loop gain. Therefore, the input current will change with the comparator switch. Therefore, driving impedance and parasitic feedback play an important role in affecting the stability of the circuit. Negative feedback tends to keep the amplifier in the linear region, while positive feedback will saturate it.

Final recommendations

Operational amplifiers are not designed to be used as comparators, so this is not recommended. Nevertheless, in some applications, it is a correct design decision to use the operational amplifier as a comparator. The key is to make a decision after careful consideration and ensure that the selected operational amplifier can achieve the expected performance. Therefore, we must carefully read the data manual, carefully consider the impact of non ideal operational amplifier performance, and calculate the impact of operational amplifier parameters on the application. Since the operational amplifier is used in a non-standard way, some experiments may have to be carried out – the amplifier used in the experiment may not be typical, so it is not appropriate to be too optimistic when interpreting the experimental results.

Leave a Reply

Your email address will not be published. Required fields are marked *