OP-Amp as a comparator

An operational amplifier as a comparator is a toggle circuit with defined voltage values at its output (specified by the operating voltage +Vcc and -Vcc) when a reference voltage Vref is reached or undercut. A general distinction is made between inverting and non-inverting comparators:

Op-Amp as Non-Inverting Comparator

The reference voltage VRef is applied to the inverting input and Vin is applied to the non-inverting input as shown below. As soon as VI > VRef, the OP-Amp switches to positive.

Non-inverting comparator circuit with OP-Amp

Non-inverting comparator circuit with OP-Amp


Op-Amp as Inverting Comparator

The reference voltage VRef is applied to the non-inverting input and Vin is applied to the inverting input as shown below. As soon as Vin > VRef, the OP-Amp switches to negative.

Op-Amp as Inverting Comparator

Op-Amp as Inverting Comparator


Window comparator using Op-Amp

As can be seen in the circuit, two OP-Amp comparator stages are connected in parallel. The input signal Vin is applied to both comparators (the inverting or the non-inverting input). The other two other inputs are connected to a common reference voltage, which is realized here with a voltage divider, for example. The size of the window can be set here using the potentiometer R2.

Window comparator using Operational Amplifiers - circuit

Window comparator using Operational Amplifiers - circuit

The following truth table can be defined for the outputs Vou1 and Vout 2 as follows:

Window comparator using Operational Amplifiers - how it works

Window comparator using Operational Amplifiers - how it works