Visual
Concept overview
A comparator is a high-gain differential amplifier optimised for open-loop operation. It produces a digital output high or low depending on which input is greater. Unlike an op-amp, a comparator is designed for fast overdrive recovery, rail-to-rail output swing, and compatibility with logic levels. Key specifications are propagation delay, input offset voltage, hysteresis, and output structure. Most comparators have an open-collector or open-drain output that requires an external pull-up resistor to the logic supply, allowing wired-AND configurations and level shifting to different voltage domains.
Real-world applications
How it works in practice
In a basic comparator circuit, the non-inverting input receives the signal being monitored and the inverting input is connected to a reference voltage set by a resistor divider. When V_plus exceeds V_minus by more than the input offset voltage, the output switches to high. With an open-collector output and a pull-up resistor to 3.3 V, the output is compatible with a microcontroller GPIO input. Hysteresis is added by feeding a fraction of the output back to the non-inverting input through a resistor, creating a Schmitt trigger. If R_f connects output to V_plus and R_in connects source to V_plus, the positive feedback shifts the switching threshold upward when output is high and downward when output is low. The hysteresis band = V_supply * R_in / (R_in + R_f). This prevents multiple output transitions when a slowly moving or noisy signal crosses the threshold.
Examples
Future scope
Continuous-time comparators in high-speed ADCs are being replaced by dynamic latch comparators that only draw current during the sampling instant, reducing power by a factor of ten compared to static designs. At 5 nm CMOS, dynamic comparators achieve 10 GSPS with input-referred noise below 200 uV RMS. Research into time-mode comparators that encode analog values as pulse widths rather than voltage levels is being pursued for sub-threshold operation in implantable biosensors where supply voltage is constrained to 0.3 V.