The circuit in Figure 1 shows a familiar technique for converting a low-level analog signal to digital form. Resistors R_{1} and R_{2} set the quiescent dc level at the Schmitt inverter's input to a value roughly equal to the midpoint of the hysteresis band. Capacitor C_{1} removes dc content from V_{IN}, such that the Schmitt trigger's input signal, V_{I}, centers itself on the midhysteresis level. Provided that V_{IN} is large enough to cross IC_{1}’s threshold level, the output signal, V_{OUT}, provides a faithful digital representation of V_{IN}. Unfortunately, the circuit suffers from several drawbacks. The presence of C_{1} makes it impossible for IC_{1} to switch at specifically defined dc levels on V_{IN}. Furthermore, for low-frequency waveforms, C_{1} must be extremely large to prevent unwanted signal attenuation. Also, if V_{IN} is of random period or is asymmetrical with time (for example, a pulse train with low duty cycle), the signal at V_{I} will not swing symmetrically about the quiescent dc level and may fail to cross one of IC_{1}’s thresholds. You can solve all these problems by replacing C_{1 }with a resistor, as in Figure 2.

Figure 1. |
This Schmitt-trigger circuit is useful for converting an ac signal to digital form. |

Figure 2. |
Eliminating the input capacitor avoids problems with asymmetricalinput waveforms. |

In Figure 2, R_{1} and the parallel combination of R_{2} and R_{3} act as an attenuator that allows IC_{1 }to switch at specific, user-defined dc levels that may be much greater than IC_{1}’s switching thresholds. Furthermore, R_{2} and R_{3} introduce an offset that allows V_{IN}’s lower threshold to be negative if required. R_{1} and R_{2} relate to R_{3} as follows:

where V_{S} is the supply voltage; V_{P} and V_{N} are the required upper and lower V_{IN} thresholds, respectively; and V_{TU} and V_{TL} are the Schmitt trigger's upper and lower switching thresholds. By measuring V_{TU} and V_{TL} for a given Schmitt inverter and selecting a suitable value for R_{3}, you can calculate the corresponding values of R_{1} and R_{2}. The circuit accommodates almost any values of V_{P} and V_{N}. The only restriction is that the hysteresis (V_{P} – V_{N}) is sufficiently larger than IC_{1}’s hysteresis (V_{TU} – V_{TL}); otherwise, the equations can yield negative resistor values. If IC_{1} is a CMOS device (for example, 74HC14, 74AC14, 4093B, or 40106B), you can use large resistances, thus ensuring high input impedance.

Figure 3. |
The potentiometer networks solve the problem of large spreadsin component values. |

For cases in which it is inconvenient to measure the exact values of V_{TU} and V_{TL}, you can replace R_{1} and R_{2} with variable resistors to accommodate the worst-case spread in V_{TU }and V_{TL}. However, because R_{2} and R_{3} have a large influence on R_{1}, the spread of values you need for R_{2} results in a broad variation in the R_{2}-R_{3} parallel combination and results in an even broader spread of values for R_{1}. Replacing R_{2} and R_{3} with a potentiometer network, as in Figure 3, provides a solution to the “spread” problem. Because R_{2} varies with R_{3}, the spread in the R_{2}-R_{3} parallel combination, and hence in R_{1}, is narrower. This arrangement results in some fairly onerous equations relating the variables. However, you can simplify matters by observing that for a particular CMOS Schmitt inverter, each of its thresholds is a constant fraction of the supply voltage, V_{S}. Therefore, you can define V_{TU} = U_{VS} and V_{TL} = L_{VS}, where U and L are the respective fractions. This simplification results in the following equations:

and

The design procedure is to select the desired values for V_{S}, V_{P}, and V_{N} and then to calculate R_{1}, R_{2}, and R_{3} in terms of R_{X} for the worst-case spread in U and L. You can then scale the values of R_{1}, R_{2}, and R_{3} accordingly. As an example, assume that you need to set V_{P} at 6 V and V_{N} at –7.5 V using a 74HC14 operating from a 5 V supply. Although slight differences exist between manufacturers, the “typical” spread in thresholds for the 74HC14 on a 5 V rail yields the following values: U = 0.5 (minimum) to 0.7 (maximum), and L = 0.2 (minimum) to 0.44 (maximum). These values are subject to the restrictions on hysteresis: (U-L) = 0.09 (minimum) to 0.5 (maximum). You can intuitively see that R_{1} is at a maximum when IC_{1}’s hysteresis is small and the parallel combination of R_{2} and R_{3} is large. This scenario occurs when IC_{1} has a narrow hysteresis band centered roughly on V_{S}/2. In this example, R_{1 }is a maximum of 7.25R_{X} when L = 0.435 and U = 0.525. Conversely, R_{1} is at a minimum when IC_{1}’s hysteresis is large and the parallel combination of R_{2} and R_{3} is small. This scenario occurs when L = 0.2 and U = 0.7, resulting in R_{1} = 1.067R_{X}. The range of potentiometer R_{P} must allow you to set the quiescent value of V_{I} anywhere from the minimum midhysteresis band level (occurring when L and U are both minima), to the maximum midhysteresis level (occurring when L and U are both maxima). In this example, the values are R_{2} = 0.4125R_{X} and R_{3} = 0.5875R_{X} (when L = 0.2 and U = 0.5) and R_{2} = 0.6467R_{X} and R_{3} = 0.3533R_{X} (when L = 0.44 and U = 0.7). Assuming that you use resistors with ±1% tolerance and potentiometers with ±10% tolerance, you can accommodate the required spread in R_{2} and R_{3} with an adequate margin by making R_{A} = 1.1 kΩ, R_{P} = 1 kΩ, and R_{B} = 1.3 kΩ. The corresponding spread in R_{1} (including the tolerance in R_{X} itself) is 3.495 to 25.549 kΩ. You can obtain this range by using a parallel connection of a 50-kΩ potentiometer and a 51-kΩ resistor that is in series with a 3.3-kΩ resistor.

Figure 4. |
These waveforms indicate clean hysteretic switching with a triangle-wave input.ometer networks solve the problem of large spreads in component values. |

The oscilloscope screen in Figure 4 illustrates the performance of the example circuit, in which V_{IN} is a ±10 V triangle wave. By adjusting the two potentiometers in turn, we made the output waveform switch when V_{IN} = 6 V and –7.5 V. Despite the interaction between the potentiometers, you can fairly easily (with a little patience) set the thresholds. Although the circuit is not intended for precision applications, it does extend the range of the garden-variety Schmitt inverter and allows you to implement positive and negative thresholds of several tens or even hundreds of volts. Moreover, the circuit allows V_{N} to be positive, provided that V_{P} is sufficiently greater than V_{N} to avoid negative resistance values. You can obtain operation of greater than 10-MHz frequency if you use suitable devices for IC_{1}. The 74AC14 or 74HC14 yield response times of just a few nanoseconds with a rail-to-rail output. For best high-frequency performance, use low resistor values, a shunt trimmer capacitor across R_{1} to provide compensation, or both. Finally, use Schottky clamp diodes as in Figure 3 to protect the inputs of IC_{1} from overvoltage conditions.