1
\$\begingroup\$

I have the following circuit which attempts to turn on and off LED in a gradual manner (instead of having abrupt change between states).

enter image description here

So when I press S1, LED1 will light up gradually, thanks to C1's charging. My eye can observe a 1 second period till the LED fully light up. This works as expected. However, If I release S1 afterwards, LED1 will gradually turn off, but it take very long, like 30 seconds or so till the light completely vanishes.

So C1 discharges really slow, and I don't understand this behaviour. I thought C1's discharging process should be fairly fast, since there is only a 220ohm resistance (plus the diodes' resistance) between its two poles? Can someone explain to me what's happening here?

\$\endgroup\$
3
\$\begingroup\$

Your analysis is flawed. If there was a 220ohm discharge process this would also be present when charging BUT clearly this isn't the case by your own acceptance of what is going on. You said: -

This works as expected.

When you open circuit the switch there is a very weak (by comparison) discharge of C1 by the 220 ohm multiplied by the hFE of the transistor so, 220 ohm becomes more like 22k or much greater (transistor dependent).

If you want it to discharge at approximately the same rate try using a 2 position switch where one position connects to a 10k pull-up resistor (as per your circuit) and the other position connects to a 10k pull down resistor.

\$\endgroup\$
1
  • \$\begingroup\$ Hi Andy, thanks for your explanation and pointing out hFE. I haven't consider about the hFE of the transistor, so as you elaborated, my assumption about the overall resistance of the circuit is false. Although I haven't tried your suggestion, my confusion has been cleared, sort of. \$\endgroup\$ – Andree Nov 29 '15 at 5:01
1
\$\begingroup\$

Or just put a 3k R from the junction of the switch and the 10k to GND -- you can use the switch you have. For faster discharge add a diode across the 10k (opposite polarity to the NPN's B-E diode).

\$\endgroup\$
2
  • \$\begingroup\$ Won't this resistor prevent the capacitor from fully charging to the supply voltage? It seems to me you are creating a voltage divider that will only allow the capacitor to charge to about 1.5V...the LED will never light up. \$\endgroup\$ – Elliot Alderson Apr 9 '20 at 13:56
  • \$\begingroup\$ @ElliotAlderson He said to put the 3k on the switch side of the 10k. It will be directly connected to the supply when the switch is closed so the 3k has no effect on the (charging) time constant or final cap voltage. \$\endgroup\$ – pr871 Apr 9 '20 at 14:41

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.