Slow Decaying Threshold Detector

Discussion in 'General Electronics Chat' started by TrevorP, Mar 23, 2010.

  1. TrevorP

    Thread Starter Active Member

    Dec 8, 2006

    I've got a threshold detector setup using an MC3407 as a comparator. It outputs ~9V when the input goes above 0.5V. Currently the output drives a 10mA red LED. However, since this is for sound often the light flickers to fast to see. So I'd like to have the time at which the LED is illuminated for after the threshold is reached be extended to around 1/3 to 1/2 of a second. I've attached a circuit of how I think this can be done. However, I'm not yet too sure whether the OPAMP can drive something like this, and if it can how would I go about choosing the correct capacitive and resistive values. (The LED resistor is easy to pick).

    Could I say that when the voltage rises to +9V then assume 0.7V drop across the diode, so the circuit acts like an RC circuit and charges the capacitor quickly up to 8.3V. Then once the voltage from the OPAMP drops to 0V. The diode ceases conducting and the cap discharges at a rate of 2PI*C*RES_LED?

    My guess is I would need a capacitor of about: 0.4seconds/ (2PI*Res_LED) which gives me about 94uF (LED uses an 680ohm resistor at 9V nominally).


    Last edited: Mar 23, 2010
  2. TrevorP

    Thread Starter Active Member

    Dec 8, 2006
    So I did some more quick calculations. The OPAMP can source about 30mA...but the output saturation voltage drops to like 6V if I do that. Assuming it didn't drop I calculated about 276ohms for the resistor directly connected to the OPAMP output. (To get 30mA at 8.3V when the cap is not charged). This then gives me a charge time of at most: .13seconds...which is sadly not fast enough. I'm thinking I might have to buffer the output with a BJT or something to get the charge time I am looking for.
  3. ifixit

    Well-Known Member

    Nov 20, 2008
    A BJT is a good idea. Use it to reduce the discharge current the LED causes. If transistor gain is 100, then the LED resistor value can be multiplied by 100 to get the equivilent cap discharge value.

    In the attached example, the discharge TC is approximately C1 x R2 x 100. The charge TC is R1 x C1.