Op-Amp Comparator Calculator
Determine output state and voltage for push-pull and open-collector comparator configurations.
Component Values
Results
Vout = HIGH when V+ > V−
Op-Amp Comparator Fundamentals
A comparator is an op-amp used in open-loop mode (no negative feedback). When V+ > V−, the output saturates to its positive rail (HIGH). When V+ < V−, the output saturates to its negative rail (LOW). The transition is very fast because there is no feedback to slow it down.
Push-pull comparators actively drive both HIGH and LOW output states. This makes them fast and easy to use but limits their flexibility. Open-collector (or open-drain) outputs only pull LOW actively; for HIGH, an external pull-up resistor is required. Open-collector outputs allow wired-AND connections and voltage translation between different supply levels.
Unlike op-amps, dedicated comparators like the LM393 and LM339 are optimized for fast switching and have output stages designed for saturation recovery. Using a general op-amp as a comparator works but may result in slower transitions, especially on the rising edge.
Comparator Rule
Vout = HIGH if V+ > V−
Vout = LOW if V+ < V−Key Points
- Vout = HIGH when V+ > V−, Vout = LOW when V+ < V−
- Open-collector: requires external pull-up resistor for HIGH state
- Add hysteresis (positive feedback) to avoid chattering on slow/noisy inputs
- Dedicated comparators (LM393) are faster than op-amps in open-loop
Applications
- Battery under/over voltage detection
- Zero-crossing detection
- Analog-to-digital conversion (flash ADC)
- Level shifting between voltage domains