29. Stretch input pulse

Circuit

Loading simulator…

Design Approach

A 2 ms trigger pulse is too brief to directly maintain an output for tens of milliseconds. The solution charges a capacitor rapidly through a diode, then lets it discharge through a much larger resistor to extend the useful pulse duration.

How the Circuit Works

  1. Charge during the short pulse. The reference adds R_CHARGE = 100 Ω and D1 between TRIGGER_IN and the output node HOLD_OUT, with the supplied C1 = 10 µF from HOLD_OUT to ground.
  2. Estimate the peak. The charge-path time constant is about 1 ms. For a 5 V, 2 ms pulse and an approximately 0.6 V diode drop, an ideal estimate gives VHOLD_OUT≈4.4(1−e−2)V≈3.8VV_{\mathrm{HOLD\_OUT}}\approx4.4\left(1-e^{-2}\right)\,\mathrm{V}\approx3.8\,\mathrm{V}, above 3.3 V.
  3. Keep the charge after the pulse. When TRIGGER_IN returns to 0 V, D1 blocks the fast reverse path. The capacitor discharges mainly through R_DISCHARGE = 8.2 kΩ, giving τ=82ms\tau = 82\,\mathrm{ms}.
  4. Check release limits. The output decays exponentially: a roughly 3.8 V starting level gives about 2.1 V at 50 ms and 0.61 V at 150 ms. Both fall within the specified minimum and maximum voltage limits.

Verify the Circuit

Apply a 2 ms HIGH pulse to TRIGGER_IN. Inspect HOLD_OUT at the end of the pulse, then at 50 ms and 150 ms after it ends. Expect ≥3.3 V, ≥2 V, and ≤0.8 V, respectively. Try a larger R_DISCHARGE and notice how the later voltage stays higher.

Key Learnings

  • Pulse stretching converts brief input events into slower output decay.
  • The hold duration comes from stored charge and discharge resistance, while the diode allows fast initial charging.