Electronics

Op-Amp Comparator -Tutorial

An operational amplifier is an analog circuit consisting of two voltage inputs and one output. The term inverting input refers to input with a minus (-) sign, while the term non-inverting input refers to input with a plus (+). As suggested by the word amplifier in the name, op-amps’ basic function is the amplification of the voltage difference between its two inputs.

Op-Amp Comparator

The Op-amp comparator compares the two voltages applied at its inputs and produces a single output based on the comparison of the magnitude of the input voltages. One of the voltages applied acts as the reference voltage, while the other one can be any of the required inputs. The positive voltage supply is denoted as +Vcc while the negative supply is -Vcc.

The symbol of the op-amp comparator is shown below:

Types of OP-AMP Comparators

There are two types of op-amp comparators; inverting and non-inverting comparators, details of each of the comparators are given below:

Inverting Comparators

In inverting comparators, the non-inverting terminal (+) of the op-amp serves as a reference voltage while the input voltage is connected to the inverting (-) terminal. Usually, the reference voltage inputs are grounded in the op-amp comparators.

The inverting comparator is shown below:

Operating Principle of Inverting OP-AMP Comparator

Inverting op-amp comparators compare the input voltage at the inverting terminal to the reference voltage. The output is based on these conditions:

  • If Vin>Vref, the output shall be negative, and the op-amp shall saturate towards the negative supply voltage of -Vcc.
  • If Vin<Vref, the output shall be positive, and the op-amp shall saturate towards the positive supply voltage of +Vcc.

Example

If a sine wave input is applied at the inverting input while the non-inverting input is grounded through a voltage divider as shown in the below figure, draw the output waveform of the comparator.

Since input voltage is applied at the inverting terminal, we are considering the inverting op-amp comparator in this case.

As the input voltage is a sine wave, we can establish the comparison of input voltages at each half of the sine wave below:

  • During the positive peak of the sinusoidal input Vin>Vref. As it is the inverting op-amp comparator, the output shall be -VEE during this half cycle.
  • During the negative peak of sinusoidal input, Vin<Vref=0 As Vref is greater, the output shall be +VCC during this half cycle for the case of inverting op-amp comparator.

Non-Inverting Comparators

In non-inverting comparators, the non-inverting (+) terminal of the op-amp will receive the input voltage while the inverting terminal (-) will serve as a reference voltage. Usually, the reference voltage inputs are grounded in the op-amp comparators.

The non-inverting comparator is shown below:

Operating Principle of Non-inverting OP-AMP Comparator

Non-Inverting op-amp compares the input voltage at the non-inverting terminal to the reference voltage at the inverting terminal (-). The output is based on the following conditions:

  • If Vin>Vref, the output shall be positive, and the op-amp shall saturate towards the positive supply voltage of +Vcc.
  • If Vin<Vref, the output shall be negative, and the op-amp shall saturate towards the negative supply voltage of -Vcc.

Example

If a sinusoidal wave input is applied at a non-inverting terminal of the op-amp comparator while the inverting input is grounded through a voltage divider as shown in the figure, draw the output waveform of the comparator.

As the input is applied at a non-inverting terminal, we are therefore considering the case of the non-inverting comparator.

As the input voltage is a sine wave, we can establish the comparison of input voltages at each half of the sine wave below:

  • During the positive peak of sinusoidal input, Vin>Vref. As it is the non-inverting op-amp comparator, the output shall be +VEE during this half cycle.
  • During the negative peak of sinusoidal input, Vin<Vref=0V. As Vref is greater, the output shall be -VCC during this half cycle in case of a non-inverting op-amp comparator.

Conclusion

Op-amp comparators compare the two input voltages and provide a single output after selecting the input voltage with greater magnitude. Depending on the type of terminal to which the input is connected, op-amp operates as inverting & non-inverting comparators.

About the author

Aaliyan Javaid

I am an electrical engineer and a technical blogger. My keen interest in embedded systems has led me to write and share my knowledge about them.