2
\$\begingroup\$

I am actually a computer engineer trying to get a feet into the embedded world starting by learning basic circuit stuff using 5 V or 3.3 V provided by Elegoo power supply.

I built the following circuit, hoping that the LED would remain bright for a few seconds when I turn the power off. However, the LED immediately goes off and a multi-meter also shows an immediate decrease of voltage.

schematic

simulate this circuit – Schematic created using CircuitLab

I noticed that the LED actually remains bright for many seconds if I open the circuit before power off.

schematic

simulate this circuit

I don't understand this behavior. What am I missing?

Thanks

EDIT: According to SamGibson's answer adding a diode solved my technically my problem but I have two more questions.

  • I noticed that the higher the resistance, the slower the discharging of the capacitor. It makes sense as the current flow decreases. Am I right to say that when the power supply is off it acts as a wire without resistance?

  • Before I started experimenting with a capacitor I calculated 330 ohm as a resistance for the LED. However, using 330 ohm the capacitor discharges also (almost?) immediately. Using 100 kohm the LED is not very bright but noticeable bright. Is there any way to put 15 mA on the LED and still using a capacitor?

\$\endgroup\$
1
  • 1
    \$\begingroup\$ "Is there any way to put 15mA on the LED and still using a capacitor?" Yes, using a bigger capacitor: the time constant is R*C. \$\endgroup\$
    – AdriZ
    Apr 20, 2022 at 9:06

1 Answer 1

2
\$\begingroup\$

What am I missing?

The capacitor is discharging quickly into the power supply, if the power supply is turned off while it is still connected. That is why...

I noticed that the LED actually remains bright for many seconds if I open the circuit before power off.

Exactly - with the power supply disconnected, the capacitor cannot discharge back into that, so its charge can supply the LED.

The solution is to add a small diode in series with the power supply to your circuit, like this:

schematic

simulate this circuit – Schematic created using CircuitLab

Any diode will work as D1. A schottky diode would have a lower forward voltage drop, but greater leakage (though I doubt that will make a difference here).

You show R1 as 100 kΩ but that will only result in something like 2 uA LED current. So since you say the LED is bright, I guess that value is a placeholder for a lower actual value.

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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