The Core Problem: Why Comparators Chatter Without Hysteresis
Op amp hysteresis is the intentional addition of positive feedback to a comparator circuit to create two separate switching thresholds (upper and lower). This deliberate deadband eliminates high-frequency output oscillation—commonly known as chatter—when an input signal slowly crosses a reference voltage or carries high-frequency noise.
Think of a home HVAC thermostat. If it were set to turn on exactly at 72°F and off exactly at 72°F, the compressor would cycle on and off every few seconds as the room temperature hovered at 71.99°F to 72.01°F, quickly burning out the relay. Instead, the thermostat uses a deadband: it turns on at 70°F and off at 74°F. In electronics, we achieve this exact same deadband using a positive feedback resistor network around an operational amplifier or dedicated comparator IC.
Op Amp Hysteresis Pinout, Symbol, and Operating Regions
To implement hysteresis, you must understand the physical pinout and the internal operating regions of your chosen IC. The industry-standard 8-pin DIP comparator (such as the LM393) features the following pinout:
- Pin 1: Output A (Open-Collector)
- Pin 2: Inverting Input A (In-)
- Pin 3: Non-Inverting Input A (In+)
- Pin 4: Ground (GND / VEE)
- Pin 5: Non-Inverting Input B (In+)
- Pin 6: Inverting Input B (In-)
- Pin 7: Output B (Open-Collector)
- Pin 8: VCC (Positive Supply, typically 3V to 36V)
In a standard inverting hysteresis configuration, your sensor signal feeds the Inverting Input (Pin 2), while the Non-Inverting Input (Pin 3) holds the reference voltage modified by the positive feedback network from the Output (Pin 1).
| Input Differential (In- vs In+) | Output Transistor State | Output Pin Voltage (with 10k Pull-up) | Feedback Node Voltage at In+ |
|---|---|---|---|
| In- < In+ (Signal below threshold) | OFF (High-Z) | ~5.0V (Pulled High) | Upper Threshold (V_UTP) |
| In- > In+ (Signal above threshold) | ON (Saturated) | ~0.2V (VCE_sat) | Lower Threshold (V_LTP) |
Sizing the Feedback Network: A Complete Application Circuit
Let's design a complete, copy-pasteable circuit for a 5V microcontroller system. We need to trigger an interrupt when a thermistor voltage drops below 2.5V, but we want a 0.45V hysteresis band to ignore power supply ripple.
The Component List
- U1: LM393 Dual Comparator
- R1 (Vref Divider Top): 10kΩ (to 5V)
- R2 (Vref Divider Bottom): 10kΩ (to GND) -> Sets baseline Vref at 2.5V
- R3 (Feedback Resistor): 100kΩ (from Output to In+)
- R4 (Pull-up Resistor): 10kΩ (from Output to 5V)
- Rin (Input Resistor): 10kΩ (from Sensor to In-)
The Math: Calculating the Thresholds
The non-inverting pin (In+) sees a voltage divider between the baseline Vref (2.5V) and the Output pin. According to All About Circuits' comparator theory, the thresholds are calculated using superposition:
1. Upper Trip Point (V_UTP): The threshold the input must rise above to force the output LOW. Assume the output is currently HIGH (5V).
V_UTP = (Vref * R3 + Vout_High * R2) / (R2 + R3)
V_UTP = (2.5V * 100k + 5V * 10k) / 110k = 300 / 110 = 2.72V
2. Lower Trip Point (V_LTP): The threshold the input must fall below to force the output HIGH. Assume the output is currently LOW (~0V).
V_LTP = (Vref * R3 + Vout_Low * R2) / (R2 + R3)
V_LTP = (2.5V * 100k + 0V * 10k) / 110k = 250 / 110 = 2.27V
3. Hysteresis Band: 2.72V - 2.27V = 0.45V.
Bench War Story: When Hysteresis Goes Wrong
Theory is clean; the workbench is not. Last year, I was debugging a 12V industrial cooling fan controller. The setup used an LM393 to switch a MOSFET based on an NTC thermistor. The baseline Vref was 6.0V.
The Setup: To 'minimize current draw', the original designer used a 1MΩ feedback resistor for the hysteresis network, with a 10kΩ Vref divider.
The Numbers: With a 1MΩ feedback resistor, the calculated hysteresis band was a microscopic 0.06V.
The Outcome: On the oscilloscope, the comparator output looked like a fuzzball. The 12V switching regulator powering the LM393 had 0.12V of high-frequency switching noise on its rail. Because the noise amplitude (0.12V) was larger than the hysteresis band (0.06V), the comparator triggered on every noise spike. The MOSFET switched at 50kHz, overheating and eventually welding the fan relay contacts shut.
What Went Wrong & The Fix: The designer treated the hysteresis resistor as a power-saving component rather than a noise-immunity component. I ripped out the 1MΩ resistor and replaced it with a 47kΩ resistor. This widened the hysteresis band to 1.2V—comfortably wider than the 0.12V power supply noise floor. The chatter vanished, and the relay operated cleanly.
Safe Default Part Numbers and Biasing Strategies
When selecting an IC for hysteresis circuits, you must match the output stage topology to your microcontroller's logic level requirements. Based on current 2026 component availability and pricing, these are the safe defaults:
| Part Number | Channels | Output Stage | Max VCC | Typical Price (1k qty) | Best Application |
|---|---|---|---|---|---|
| TI LM393 | Dual | Open-Collector | 36V | $0.12 | General purpose, high-voltage battery packs, 12V/24V systems. |
| TI LM311 | Single | Open-Collector/Emitter | 36V | $0.35 | High-speed zero-crossing detection, audio triggering. |
| TI TLV3691 | Single | Push-Pull (Rail-to-Rail) | 5.5V | $0.75 | Low-power 3.3V ESP32/Arduino sensor interfaces (no pull-up needed). |
Biasing Open-Collector vs. Push-Pull: If you use the LM393 or LM311, the output transistor can only pull the line to ground; it cannot source current. You must include a pull-up resistor (typically 4.7kΩ to 10kΩ) to your logic voltage. If you forget this pull-up, your hysteresis network will fail because the output pin will float in a high-impedance state when 'HIGH', breaking the positive feedback loop entirely. If you want to avoid the pull-up and save board space, select a push-pull output device like the TLV3691.
Troubleshooting and Testing with a Multimeter
When a hysteresis circuit fails, it usually manifests as either a stuck output or a return of chatter. Here is a systematic, numbered-steps approach to testing the circuit with a standard digital multimeter (DMM).
- Verify the Pull-Up Voltage: Set your DMM to DC Voltage. Measure the output pin relative to GND. Force the input to a known LOW state. The output should read exactly your logic high voltage (e.g., 5.0V or 3.3V). If it reads 0V or floats, your pull-up resistor is missing or broken.
- Measure the Baseline Vref: Disconnect the positive feedback resistor (R3) temporarily. Measure the voltage at the Non-Inverting Input (In+). It should match your calculated voltage divider baseline (e.g., 2.5V). If it is off by more than 2%, your divider resistors are loaded down by the IC's input bias current; drop the divider impedance.
- Test the Hysteresis Band (The Sweep Test): Reconnect R3. Connect a potentiometer to the Inverting Input (In-) to simulate your sensor. Connect your DMM to the Output pin. Slowly turn the pot to raise the input voltage. Note the exact voltage where the output snaps LOW (V_UTP). Now, slowly turn the pot the other way to lower the input voltage. Note where the output snaps HIGH (V_LTP).
- Calculate the Real-World Band: Subtract V_LTP from V_UTP. If your measured band is significantly smaller than your calculated band, check for parasitic leakage paths on your breadboard or PCB. Flux residue or moisture can create a parallel resistance path across your 100kΩ feedback resistor, artificially shrinking the deadband.
By treating hysteresis not as an abstract mathematical concept, but as a physical noise-immunity shield, you can design comparator circuits that survive the electrical noise of the real world. Select the right IC, calculate your deadband wider than your noise floor, and always verify your thresholds with a meter before powering the load.






