Home ⇒ Overview Courses ⇒ Electronics ⇒ Operational amplifier ⇒ Comparator
OP-Amp as a comparator
Table of Contents
ToggleAn 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 Uref is reached or undercut. A general distinction is made between inverting and non-inverting comparators:
Op-Amp as 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 OPV switches to positive.
![Non-inverting comparator circuit with OP-Amp](https://sp-ao.shortpixel.ai/client/to_auto,q_glossy,ret_img,w_706,h_257/https://learnchannel-tv.com/wp-content/uploads/2024/04/Non-inverting-comparator-circuit-with-OP-Amp.png)
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](https://sp-ao.shortpixel.ai/client/to_auto,q_glossy,ret_img,w_709,h_257/https://learnchannel-tv.com/wp-content/uploads/2024/04/Op-Amp-as-Inverting-Comparator.png)
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](https://sp-ao.shortpixel.ai/client/to_auto,q_glossy,ret_img,w_615,h_381/https://learnchannel-tv.com/wp-content/uploads/2024/05/Window-comparator-using-Operational-Amplifiers-circuit.png)
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](https://sp-ao.shortpixel.ai/client/to_auto,q_glossy,ret_img,w_271,h_190/https://learnchannel-tv.com/wp-content/uploads/2024/05/Window-comparator-using-Operational-Amplifiers-how-it-works.png)
Window comparator using Operational Amplifiers - how it works