Operational amplifier as a comparator: Applications of opamp
A comparator is a circuit which compares two different quantities connected at its two inputs the inv. input and the non-inv. input. When voltage at non-inv. input terminal is larger than inv. input terminal, output of comparator is +ve. Similarly when voltage at non-inv. input terminal is less than inv. input terminal, output of comparator is –ve. Consider the following circuit –
Here opamp is used WITHOUT feedback resistor. Inverting input terminal is grounded and input signal is connected between non-inv. terminal and ground. Its maximum output voltage swing is 2V less than power supply voltage. This voltage is called as saturation voltage (Vsat). Mathematically it is given by –
There are four types of comparators, which are as follows. Consider the following figures –
Non-inverting zero reference comparator – in above figure, this comparator is shown. It has three conditions –
i) When Vi > 0, Vo = +Vsat
ii) When Vi < 0, Vo = –Vsat
iii) When Vi = 0, Vo = 0
Inverting zero reference comparator – in above figure, this comparator is shown. It has three conditions –
i) When Vi > 0, Vo = –Vsat
ii) When Vi < 0, Vo = +Vsat
iii) When Vi = 0, Vo = 0
Non-inverting non-zero reference comparator – in above figure, this comparator is shown. It has three conditions –
i) When Vi > Vref, Vo = +Vsat
ii) When Vi < Vref, Vo = –Vsat
iii) When Vi = Vref, Vo = 0
Inverting non-zero reference comparator – in above figure, this comparator is shown. It has three conditions –
i) When Vi > Vref, Vo = –Vsat
ii) When Vi < Vref, Vo = +Vsat
iii) When Vi = Vref, Vo = 0
Note: comparator is mainly used to convert sine wave into proportional square wave.


Is it so that for all comparators, the output voltage will be zero, if input is zero?
The output voltage will be zero only if Vin=Vref.
No. Actually the output voltage will be either positive or negative depending on the compared values. This is the result of comparison at the output of OPAMP.