The simple comparator circuit in has two disadvantages. For a very slowly varying input, the output swing can be rather slow. Worse still, if the input is noisy, the output may make several transitions as the input passes through the trigger point . Both these problems can be remedied by use of positive feedback. The effect of R3 is to make the circuit have two thresholds, depending on the output state. In the example shown, the threshold when the output is at ground (input high) is 4.76 volts, whereas the threshold with the output atThe output depends both on the input voltage and on its recent history, an effect called hysteresis. This can be illustrated with a diagram of output versus input. The design procedure is easy for Schmitt triggers that have a small amount of hysteresis. First choose a resistive divider (R1, R2) to put the threshold at approximately the right voltage; if you want the threshold near ground, just use a single resistor from noninverting input to ground.