The output is ideally A comparator consists of a specialized high-gain differential amplifier.
They are commonly used in devices that measure and digitize analog signals, such as analog-to-digital converters (ADCs), as well as relaxation oscillators.
An operational amplifier (op-amp) has a well balanced difference input and a very high gain.
A simple comparator circuit made using an op-amp without feedback simply heavily amplifies the voltage difference between Vin and VREF and outputs the result as Vout.
In practice, this circuit can be improved by incorporating a hysteresis voltage range to reduce its sensitivity to noise.
[5] A comparator consists of a high gain differential amplifier whose output is compatible with the logic gates used in the digital circuit.
The output is a binary state often used to interface real world signals to digital circuitry (see analog-to-digital converter).
If there is a fixed voltage source from, for example, a DC adjustable device in the signal path, a comparator is just the equivalent of a cascade of amplifiers.
This reduces the saturation of the slow, large p–n junction bipolar transistors that would otherwise lead to long recovery times.
For applications in flash ADCs the distributed signal across eight ports matches the voltage and current gain after each amplifier, and resistors then behave as level-shifters.
Some comparators (e.g. LM339) use open collector output to help interface to different logic families.
High speed comparators use transistors with larger aspect ratios and hence also consume more power.
[6] Depending on the application, select either a comparator with high speed or one that saves power.
A comparator normally changes its output state when the voltage between its inputs crosses through approximately zero volts.
To prevent this output oscillation, a small hysteresis of a few millivolts is integrated into many modern comparators.
The resulting Schmitt trigger circuit gives additional noise immunity and a cleaner output signal.
These comparators make it possible to add a programmable hysteresis without feedback or complicated equations.
Comparators with an open-drain output stage use an external pull-up resistor to a positive supply that defines the logic high level.
[33] This is in contrast to a continuous comparator, which can only employ weak positive feedback since there is no reset period.
Comparators are ideal for null detection comparison measurements, since they are equivalent to a very high gain amplifier with well-balanced inputs and controlled output limits.
[34] For this type of detector, a comparator detects each time an AC pulse changes polarity.
This function is used in nearly all analog to digital converters (such as flash, pipeline, successive approximation, delta-sigma modulation, folding, interpolating, dual-slope and others) in combination with other devices to achieve a multi-bit quantization.