Practice problems
Schmitt trigger and hysteresis practice problems
A Schmitt trigger is a comparator with positive feedback: a resistor from the output to the non-inverting (+) input shifts the threshold each time the output switches state. So there are two thresholds, the upper and lower threshold voltages (VUT and VLT), and the gap between them is the hysteresis. These ten problems find the hysteresis width, work out both thresholds and choose the feedback resistor for the hysteresis you want. Type your answer to check it, and open the working whenever you want it.
The method
- Rth is the reference divider's Thevenin resistance (its two resistors in parallel), and Vth is its open-circuit output voltage
- Vswing is the output swing between its low and high levels: 5 V for a rail-to-rail output from 0 to 5 V
- To design, rearrange it: Rf = Rth × (Vswing ÷ ΔV − 1)
- Exact thresholds, with k = Rth ÷ (Rth + Rf): with the output low at 0 V, VLT = Vth × (1 − k), and VUT = VLT + Vswing × k
The problems
Type your answer and tap Check. Every one has the working, step by step.
Problem 1 of 10
A thermostat's comparator switches on at 2.4 V and off at 2.9 V. What is its hysteresis width, in millivolts?
Show the working
- The hysteresis width is the difference between the upper and lower threshold voltages, VUT − VLT.
- 2.9 V − 2.4 V = 0.5 V, which is 500 mV. Between the thresholds, the output holds its last state.
Answer: 500 mV
Problem 2 of 10
A comparator's reference is a divider of two 22 kΩ resistors. What is its Thevenin resistance Rth?
Show the working
- Set the supply to zero (replace it with a short). Seen from the divider's output node, both resistors then go to ground, so they're in parallel.
- Rth = 22 × 22 over 22 + 22 kΩ = 11 kΩ. Two equal resistors give half of one.
Answer: 11 kΩ
Problem 3 of 10
A Schmitt trigger's rail-to-rail output swings from 0 to 5 V. Its reference has Rth = 10 kΩ, and the feedback resistor Rf = 100 kΩ connects the output to the non-inverting (+) input. What is the hysteresis width, in millivolts?
Show the working
- Rth and Rf form a divider from the output to the + input: ΔV ≈ Vswing × Rth over Rth + Rf.
- ΔV = 5 V × 10 kΩ over 110 kΩ ≈ 0.455 V, which is 455 mV.
Answer: 455 mV
Problem 4 of 10
A Schmitt trigger's rail-to-rail output swings from 0 to 9 V, with Rth = 4.7 kΩ and Rf = 47 kΩ. What is its hysteresis width?
Show the working
- ΔV ≈ Vswing × Rth over Rth + Rf = 9 V × 4.7 kΩ over 51.7 kΩ
- ΔV ≈ 9 V × 0.0909 ≈ 0.818 V
Answer: 0.818 V
Problem 5 of 10
An op-amp comparator runs on ±12 V rails, and its output swings between −10.5 V and +10.5 V. With Rth = 10 kΩ and Rf = 200 kΩ, what is the hysteresis width?
Show the working
- Vswing is the output swing, from one saturation level to the other: 10.5 V − (−10.5 V) = 21 V.
- ΔV ≈ 21 V × 10 kΩ over 210 kΩ = 1 V
Answer: 1 V
Problem 6 of 10
A Schmitt trigger has a rail-to-rail output swinging from 0 to 3.3 V and Rth = 10 kΩ. You want 0.3 V of hysteresis. What value of Rf gives it?
Show the working
- Rearrange the hysteresis formula: Rf = Rth × (Vswing over ΔV − 1).
- Rf = 10 kΩ × (3.3 V over 0.3 V − 1) = 10 kΩ × 10 = 100 kΩ
Answer: 100 kΩ
Problem 7 of 10
A Schmitt trigger on 12 V has a rail-to-rail output swinging from 0 to 12 V. Its reference is two 10 kΩ resistors. You want 1 V of hysteresis. What value of Rf gives it?
Show the working
- Rth is the two 10 kΩ resistors in parallel: 5 kΩ.
- Rf = 5 kΩ × (12 V over 1 V − 1) = 5 kΩ × 11 = 55 kΩ. The nearest E12 value, 56 kΩ, gives a hysteresis width of about 0.98 V.
Answer: 55 kΩ
Problem 8 of 10
A Schmitt trigger's rail-to-rail output swings from 0 to 5 V. Its reference is two 10 kΩ resistors from 5 V (2.5 V, Rth = 5 kΩ), and Rf = 45 kΩ. What is its lower threshold voltage, VLT?
Show the working
- Let k = Rth over Rth + Rf = 5 kΩ over 50 kΩ = 0.1.
- With the output low at 0 V, Rf pulls the + input down: VLT = Vth × (1 − k) = 2.5 V × 0.9
- VLT = 2.25 V. The upper threshold voltage is VUT = 2.25 V + 5 V × 0.1 = 2.75 V.
Answer: 2.25 V
Problem 9 of 10
Stretch: a light sensor's output, fed to a comparator with a 0 to 5 V rail-to-rail output, has up to 0.2 V of noise. The reference divider is 33 kΩ from 5 V to the + input and 22 kΩ from there to ground. What Rf gives a hysteresis width of exactly 0.2 V?
Show the working
- Rth = 33 × 22 over 33 + 22 kΩ = 726 over 55 kΩ = 13.2 kΩ.
- Rf = 13.2 kΩ × (5 V over 0.2 V − 1) = 13.2 kΩ × 24
- Rf ≈ 317 kΩ. Pick 330 kΩ: it gives about 0.19 V, which is narrower than the noise, so step down to 270 kΩ for about 0.23 V.
Answer: 317 kΩ
Problem 10 of 10
Stretch: a Schmitt trigger's rail-to-rail output swings from 0 to 9 V. Its reference divider is 10 kΩ from 9 V down to the + input and 22 kΩ from there to ground, and Rf = 68 kΩ. What is its upper threshold voltage, VUT?
Show the working
- The reference: Vth = 9 V × 22 over 32 ≈ 6.19 V, and Rth = 10 × 22 over 32 kΩ ≈ 6.88 kΩ.
- k = 6.88 kΩ over 6.88 kΩ + 68 kΩ ≈ 0.0918, so VLT = 6.19 V × (1 − 0.0918) ≈ 5.62 V.
- VUT = VLT + Vswing × k = 5.62 V + 9 V × 0.0918 ≈ 6.45 V
Answer: 6.45 V
“Comparators with hysteresis” is lesson 2 of 6 in Amplifier Peaks, Electronics World 6. Free with an account. Lessons unlock in order, so you’ll do the 36 before it first.
Free lesson
Now build it yourself
Each lesson comes in three short parts: see the idea, try it on a live board, then build it yourself, with quick checks as you go.
“Comparators with hysteresis” is lesson 2 of 6 in Amplifier Peaks, Electronics World 6. Free with an account. Lessons unlock in order, so you’ll do the 36 before it first.
Or start from the very first lesson, no account neededCheck it with a calculator
The ideas behind it
- Comparator hysteresis and the Schmitt triggerTwo thresholds instead of one: how a feedback resistor stops a comparator chattering on a noisy signal.
- What is hysteresis, and how does it stop flicker?On below one line, off above another: the gap that stops a noisy reading flickering.
- Op-amp comparator explainedTwo inputs, one decision: the output switches high or low the moment one input passes the other.
Questions people ask
What is the difference between a comparator and a Schmitt trigger?
A plain comparator has one threshold, so a noisy input near it switches the output back and forth many times: output chatter. A Schmitt trigger adds positive feedback, feeding a fraction of the output back to the non-inverting (+) input. That gives it two thresholds, V_UT and V_LT. Between them, the output holds its last state.
How do I work out the hysteresis width?
Find R_th, the reference divider's Thevenin resistance (its two resistors in parallel). R_th and R_f form a divider from the output, so the hysteresis width is ΔV ≈ V_swing × R_th ÷ (R_th + R_f), where V_swing is the output swing between its low and high levels.
How wide should the hysteresis be?
Wider than the peak-to-peak noise on the input, so noise alone can't cross both thresholds, but narrow enough that the real signal still crosses them. A room thermostat typically switches over a band of about 0.5 to 1 °C. Rearrange the formula to choose R_f: R_f = R_th × (V_swing ÷ ΔV − 1).
More practice
- Ohm's law practice problemsFind V, I or R, then the power, with the working for each.
- Units and prefixes practice problemsConvert mA, kΩ, µF, nF, pF, ms and mV, with the working for each.
- LED resistor practice problemsSize the resistor for one LED or a string, round to a standard value, check the power.
- Electrical power practice problemsPower three ways, energy in kWh, battery life and running costs, all worked.
- Series and parallel resistors practice problemsTotals in series and parallel, mixed networks and branch currents, all worked.
- Kirchhoff's laws practice problemsBalance currents at a junction and voltages round a loop, with the working for each.
- Voltage divider practice problemsFind Vout, pick R2 for a target and work out loading, with the working for each.
- Thevenin and Norton equivalent practice problemsReduce a network to V_th in series with R_th, then load it, with the working.
- Capacitor practice problemsCharge, capacitance, series and parallel, and stored energy, with the working.
- RC time constant practice problemsτ = R × C, the 63% rule, charging and discharging, with the working.
- Inductor practice problemsV = L × ΔI ÷ Δt, stored energy and inductors in series and parallel, with the working.
- RL circuit time constant practice problemsτ = L ÷ R, the current's rise and decay, and inductive kickback, with the working.
- AC voltage and transformer practice problemsPeak, RMS, period, AC power and transformer turns ratios, with the working.
- Capacitive and inductive reactance practice problemsCapacitive and inductive reactance, AC current and impedance, with the working.
- Impedance practice problems for RC and RL circuitsSeries RC and RL impedance, phase angle and current, with the working.
- RC filter practice problemsCutoff frequency, choosing R or C, and the output either side of the cutoff, with the working.
- Decibel practice problemsRatios to dB and back, for power and voltage, gains that add and the −3 dB point.
- LC resonance practice problemsf₀ = 1 ÷ (2π√(LC)), tuning for a frequency, and scaling, with the working.
- Diode practice problemsForward voltage, series resistor current, diodes in series, reverse bias and power dissipation.
- Rectifier and ripple practice problemsPeak output, ripple and the smoothing capacitor for half-wave and bridge rectifiers.
- Zener diode practice problemsSize a Zener regulator's resistor, split its current and check the Zener's power.
- Transistor switch practice problemsBase current, base resistor and load current for a BJT switch, then a MOSFET.
- MOSFET switch practice problemsConduction loss from R_DS(on), gate and pull-down currents, flyback diodes and junction temperature.
- Op-amp gain practice problemsInverting and non-inverting gain, the output, the resistor to pick and when it clips.
- Inverting and summing amplifier practice problemsInverting gain, input resistance, summing amps, averaging, a simple DAC and clipping.
- Op-amp limits practice problemsGain-bandwidth, slew rate, output swing and input offset, with the working.
- Binary and hex practice problemsBinary to decimal and back, bits needed, the largest n-bit number and hex.
- Logic gates practice problemsGate outputs, truth-table rows, Boolean expressions and fewer gates, with the working.
- Counters and flip-flops practice problemsTop count, flip-flops needed, frequency division, rollover and ripple delay.
- PWM and duty cycle practice problemsDuty cycle, average voltage, on-time, analogWrite 0–255 and power, with the working.
- ADC and analog input practice problemsanalogRead to volts and back, resolution, dividers and 12-bit ADCs, with the working.