Voltage comparators are not perfect devices and their performance may suffer from the effects of a parameter known as the Input Offset Voltage. The Input Offset Voltage for many comparators is only a few millivolts and in most circuits can be ignored.
Problems related to the Input voltage normally occur when the Input voltage changes very slowly.
The net result of the Input Offset Voltage is that the output transistor does not fully turn on or off when the input voltage is close to the reference voltage.
The following diagram attempts to illustrate the effect of the input offset voltage with a slowly changing input voltage. This effect increases as the output transistor current increases so keeping the value of RL high will help reduce the problem.
For most comparator circuits Hysteresis is the difference between the input signal voltages at which a comparator's output is either fully ON or fully OFF. Hysteresis in comparators is generally undesirable but it can also be added to a circuit to reduce the sensitivity to noise or a slowly moving input signal.
Internal hysteresis that is normal for comparators causes the output of the comparator to go from OFF to ON and vice-versa relatively slowly.
External hysteresis uses positive feedback from the output to the non-inverting input of the comparator. The resulting Schmitt trigger type circuit gives additional noise immunity and a cleaner output signal.
The effect of added hysteresis is that as the input voltage slowly changes, the reference voltage will quickly change in the opposite direction. This gives the comparator's output a "snap" action.
A mechanical analog of added hysteresis can be found in many toggle switches: As the handle moves past its center point, a spring in the switch forces the contacts of the switch to open or close, ensuring that the switch's contacts snap to the ON or OFF position.