An immediate application of the Comparator is the zero crossing detector or sine wave to Square wave converter.
The basic Comparator can be used as the zero crossing detector provided that Vref is set to zero.
Figure shows the circuit diagram of inverting comparator used as zero crossing detector. The output voltage Vo, in waveform shows when and in what direction an input signal Vin crosses zero volts.
ie; The output signal Vo is driven into negative saturation when the input signal Vin passes through zero in the positive direction. Conversely, when Vin passes through zero in the negative direction, the output Vo switches and saturates positively.
In some applications, the input Vin may be a slowly changing waveform. That is, a low frequency signal. Therefore, it will take Vin more time to cross 0V; therefore, Vo may not switch quickly from one saturation voltage to other. On the other hand, because of the noise at the operational amplifier's (OP AMP) input terminals, the output Vo may fluctuates between two saturation voltages +Vsat and -Vsat , detecting zero reference crossings for noise voltages as well as input voltage, Vin. Both of these problems can be cured with the use of regenerative or positive feedback that causes the output Vo to change faster and eliminate any false output transitions due to noise signals at the input.