itthon / Elektronikus hírek / Comparator: Principle, application and difference with Op amp

Comparator: Principle, application and difference with Op amp

A comparator is an electronic component that compares the current or voltage of two input terminals and outputs different voltage results at the output terminal. Next, we will introduce the comparator in detail, including its definition, principle, application, and its connection and difference with the operational amplifier.

Catalog

1. Definition and principle of comparator IC

2. Type of Comparator

3. Difference between comparators and operational amplifiers

4. Application of Comparator

1. Definition and principle of comparator IC

A comparator is a circuit or device that can perform the function of comparing the current or voltage of two input terminals. It has two input terminals Vi+ and Vi-, and one output terminal Vout. The input terminal is connected to an analog signal, and the output terminal is a digital signal. The output is either high or low. The specific high level is arbitrarily determined by the external voltage amplitude.

In most cases, comparators are implemented using dedicated comparator ICs, but op amps can also be used as an alternative. Comparator diagrams and op amp diagrams use the same symbols.

Comparator Symbol

Figure 1: Comparator symbol

Select one of the input terminals as the reference point (REF) for comparison. For example, select the non-inverting input terminal V2 as the reference. When the inverting input terminal V1 is greater than V2, Vout outputs low level; when V1 is less than V2, Vout outputs high level. . It can be seen that the state of the output terminal represents the sign of the net difference between the two inputs, and the reference voltage V2 is called the threshold voltage UT of the comparator. Since the comparator is actually a 1-bit analog-to-analog converter (ADC), it is an essential component in the ADC.

The functional relationship between the output voltage uo of the voltage comparator and the input voltage ui is called its voltage transfer characteristic, that is, uo=f (ui). Since the characteristics of the comparator and the integrated op amp in open loop are relatively similar, we might as well review the voltage transmission characteristics of the op amp first, as shown in Figure 2.

Voltage transfer characteristics of operational amplifier

Figure 2 Voltage transfer characteristics of operational amplifier

The main difference between the voltage transfer characteristics of the comparator and the operational amplifier is that the comparator has an open-loop output, no negative feedback and no phase compensation, so its switching speed is faster than that of the operational amplifier. Secondly, since the comparator is generally an open-collector output, its output high-level voltage is not determined by the power rail but by the external circuit. Generally, if the flipping time is ignored, its voltage transmission characteristics are approximately as shown in Figure 3..

Voltage transfer characteristics of comparator

Figure 3 Voltage transfer characteristics of comparator

In addition to the output high and low levels UOH & UOL and threshold voltage UT mentioned above, the comparator voltage transmission characteristics also have the third major element - the direction of uo transition when ui changes and passes through UT. Figure 4 shows that the output voltage jump direction is opposite when the reference voltage is applied to the inverting terminal and the non-inverting terminal.

Comparator voltage transfer characteristics

Figure 4 The reference voltage is applied to the inverting terminal (left) and the non-inverting terminal (right) respectively.

The figure below shows the schematic diagram of a comparator IC from TI. It can be found that the input stage also uses a differential amplification circuit, while the output stage is different from the operational amplifier - it adopts the form of an open collector.

Schematic diagram of a certain TI comparator

Figure 5 Schematic diagram of a certain TI comparator

2. Type of Comparator

Comparators are electronic devices that compare input signals and generate corresponding outputs based on their voltage or current levels. They can be classified into several main types based on their operating principles and characteristics:

  1. Zero-Crossing Comparator: This type of comparator detects when an alternating current (AC) signal crosses the zero voltage line and is commonly used for synchronizing AC signals in processing and control applications.

  2. Voltage Comparator: By connecting one input to a fixed voltage and the other input to the voltage to be compared, this comparator compares the voltages and generates an output signal based on their relative levels.

  3. Window Comparator: Comprising two amplitude comparators and some diodes and resistors, this comparator has two threshold levels. It outputs a specific state when the input voltage falls within the range defined by these thresholds.

  4. Hysteresis Comparator: By introducing a resistor-divider feedback path from the output to the inverting input, this comparator exhibits hysteresis behavior. As the input signal gradually increases, the comparator's output toggles between two threshold levels, helping to eliminate noise or enhance system stability.

3. Difference between comparators and operational amplifiers

3.1 Comparator vs Op Amp: Structural difference

1) Compared with the push-pull output method of the operational amplifier, the comparator uses an open-collector output and requires a pull-up resistor.

Comparator output pull-up

Figure 6 Comparator output pull-up

2) In order to speed up the response speed, the comparator has very few intermediate stages and no internal frequency and phase compensation. As shown in Figure 4, it can be found that the comparator has no intermediate stage but only an input stage and an output stage.

3.2 Comparator vs Op Amp: Open loop and closed loop

The operational amplifier generally works in a closed-loop negative feedback state (linear area), and its main function is to amplify the input signal; the comparator works in an open-loop state (nonlinear area), mainly to compare and discriminate the input signal, and the flip speed is faster quick.

When speed requirements are not high, the operational amplifier can operate in open loop and be used as a comparator, but the output will be limited by the power rail, so attention needs to be paid to level matching issues. On the other hand, voltage comparators cannot be used as operational amplifiers in most cases, mainly because the comparator does not perform phase compensation and the closed loop is prone to instability.

3.3 Comparator vs Op Amp: Output signal form and response speed

1) Compared with the operational amplifier that outputs an analog signal, the comparator outputs high and low levels corresponding to digital 0s and 1s. The open collector makes it compatible with TTL or CMOS.

2) Compared with the operational amplifier, the response speed of the comparator is faster, which is also because there is no phase compensation inside it.

4. Application of comparator

4.1 Zero-crossing comparator

The zero-crossing comparator is to set the reference voltage to Uref=0. As shown in Figure 7 and Figure 8.

Figure 7 Zero-crossing comparator (inverting terminal as reference)

Figure 7 Zero-crossing comparator (inverting terminal as reference)

Figure 8 Zero-crossing comparator (non-inverting terminal as reference)

Figure 8 Zero-crossing comparator (non-inverting terminal as reference)

A zero-crossing comparator is a specialized electronic component used to detect the precise moments when an alternating current (AC) waveform crosses the zero voltage line. By rapidly sensing these zero-crossings, it provides valuable timing information for various applications requiring synchronization with the AC waveform.

This type of comparator finds widespread use in tasks such as phase control for light dimmers and motor speed controllers, synchronous detection in communication systems, power factor correction in power electronics, grid synchronization for renewable energy systems, audio signal processing, and instrumentation and measurement applications. Its ability to accurately identify zero-crossings enables precise timing, synchronization, and control in diverse electronic systems, making it an essential component in many circuits where AC waveform analysis or manipulation is necessary.

4.2 Hysteresis Comparator

For the above-mentioned simple comparator, when the two input signals are very close, the output will continuously jump due to the glitches in the input voltage. This is the so-called ringing effect. In order to solve this problem, people designed a hysteresis comparator. Since the input voltage of the hysteresis comparator gradually increases or decreases, there are two unequal thresholds. Its transmission characteristics have the shape of a hysteresis curve, so it has a strong Anti-interference ability. Hysteresis comparators can be divided into upward hysteresis (i.e., non-inverting input, inverting reference) and downward hysteresis (i.e., inverting input, non-inverting reference). According to whether the reference voltage is zero, it can be divided into those with reference voltage and those without reference. Voltage.

Upstream hysteresis comparator (without reference voltage)

Figure 9 Upstream hysteresis comparator (without reference voltage)

Downstream hysteresis comparator (without reference voltage)

Figure 10 Downstream hysteresis comparator (without reference voltage)

Upstream hysteresis comparator (with reference voltage)

Figure 11 Upstream hysteresis comparator (with reference voltage)

Downstream hysteresis comparator (with reference voltage)

Figure 12 Downstream hysteresis comparator (with reference voltage)

4.3 Window comparator

Two comparators connected in parallel are used to determine whether the signal is between two reference voltages. The input signal is considered valid only if it is between these two thresholds. If the input signal is above the upper limit or below the lower limit, the window comparator will sound an alarm or trigger the corresponding logic circuit. The specific functions are as follows:

  • Detect input signal: The window comparator can monitor the input signal in real time and determine whether the signal is within the specified threshold range. This function is required in many automatic control systems and sensors, such as measurement of temperature, pressure, light intensity, etc.

  • Limiting effect: The window comparator can provide the effect of limiting the amplitude of the input signal. When the input signal exceeds the preset upper or lower limit, the output signal will change. This functionality can be widely used in analog signal processing, audio processing, and video signal processing.

  • Signal trigger: The window comparator can also be used as a signal trigger. When the input signal enters or leaves the preset threshold range, the output signal will trigger the relevant event or process. This capability can be used in areas such as electronic design, robotic control, and automated processes.

Window comparator schematic

Figure 13 Window comparator schematic

From a simple analysis, it is not difficult to find that the two thresholds corresponding to the comparator window in the above schematic diagram are 1/3VCC and 2/3VCC respectively. If the signal is within the window range, a high level is output. If the signal level exceeds the window range, a low level is output. As shown below.

Window comparator transient simulation results

Figure 14 Window comparator transient simulation results

4.4. AD conversion

In addition to the above three classic uses, the comparator can also be used as a typical component in ADC. For example, one input terminal of the comparator is connected to a magnetic sensor or a photodiode, the other input terminal is connected to a reference voltage, and the sensor is used to drive the output terminal of the comparator to generate high and low levels suitable for driving the logic circuit.

Convert typical circuit diagram

Figure 15 Typical circuit diagram of photoresistor analog-to-digital conversion

Share this post

Share To FacebookShare To TwitterShare To Linkedin

Frequently Asked Questions

1. What are the comparator ICs?

Common chips include LM311, LM324, LM358, LM339, uA741, TLV431, LT1011, TL081\2\3\4, MAX9028, OP07, OP27, AD790, LMV7219, LMH7322, LT1719. These can all be made into voltage comparators (without adding Negative feedback). LM339 (A quad comparator) and LM393 (A dual comparator) are professional voltage comparators with fast switching speed and small delay time. They can be used in special voltage comparison situations.

2. Why is it called a comparator?

A comparator is named so because it compares two input voltages or currents and outputs a digital signal indicating which one is larger. The term "compare" refers to the process of determining the relationship between these input signals.

3. What is the difference between op-amp and comparator IC?

While both operational amplifiers (op-amps) and comparators are integrated circuits used in electronic circuits, they serve different purposes. Op-amps are primarily used for amplification and signal conditioning, providing continuous output voltages based on their input signals. Comparators, on the other hand, are used for comparing two input signals and providing a digital output based on the result of the comparison (e.g., high or low). Comparators typically have faster response times and are optimized for digital output applications.

4. Is LM741 a comparator?

No, the LM741 is not a comparator; it is an operational amplifier (op-amp). The LM741 is a general-purpose op-amp known for its versatility in various analog circuit applications, such as amplification, filtering, and signal processing. Comparators like the LM339, LM311, and LM393 are specifically designed for comparing input signals and generating digital output based on the comparison result.

Elektronikai alkatrészek indexe
Több
# 0 1 2 3 4 5 6 7 8 9 A B C D E F G H I J K L M N O P Q R S T U V W X Y Z

We value your privacy

Our website uses cookies to ensure you are getting the best browsing experience, serve personalized content, and analyze our traffic.
By clicking "Accept Cookies", you consent to our use of cookies. Privacy Policy