A noninverting comparator with hysteresis requires a two-resistor network and a voltage reference (VREF) at the inverting input, as shown in Figure 8-5,
The equivalent resistor networks when the output is high and low are shown in Figure 8-6 Note that RPU should be considered in series with R2 when the output is high. RPU should be at least 10x less than R2.
When VIN is less than VREF,, the output is low. For the output to switch from low to high, VIN must rise above the VIN1 threshold. Use Equation 4 to calculate VIN1.
When VIN is greater than VREF, the output is high. For the comparator to switch back to a low state, VIN must drop below VIN2. Use Equation 5 to calculate VIN2.
The hysteresis of this circuit is the difference between VIN1 and VIN2, as shown in Equation 6.