I'm new to electronics, so what I've found to be helpful to a good learning process is examples.

Now, I was studying transistors and capacitors, and as far as I could understand, a transistor acts more or less like an "electrical valve/switch" and the capacitor store current until it's discharged.

To test what I've learned, I've made the following circuit: circuit

What I though it will do was:

  1. circuit being in the presented configuration, the LED will stay lit
  2. when R1 is removed, the transistor ("valve"?) will close, the capacitor will gradually discharge, and the LED will fade away

But what the circuit actually does is

  1. circuit being in the presented configuration, the LED will lit and imediatly fade out
  2. when R1 is removed, nothing happens :(. When reconnecting R1, the LED will lit a little, then fade out. If I short the capacitor (to discharge it, I can tell this is maybe not recommended), then reconnect R1, the step 1 repeats again ...

Why does this happen? What did I got wrong ?

PS: the transistor is 2N2222

  • 2
    \$\begingroup\$ There's no dc current path from voltage source to resistor for starters. That cap is blocking it. \$\endgroup\$ Commented Oct 8, 2012 at 20:05

4 Answers 4


First draw the circuit with positive power at the top negative at bottom, power currents generally flowing down, and signals feeding left to right. If you do that, two useful things happen. First, many circuits will be drawn similarly most of the time, and you learn to recognize them after a while. Second, you will confuse yourself and anyone you ask to help you less in what is actually going on and what you hooked up where.

Redrawing the schematic so as to better illuminate the circuit, we have:

It is obvious why the LED doesn't come on, or blips on for a short time at best. That is because it is in series with capacitor C1. Capacitors block DC current. There can't be any sustained current thru the LED.

What you probably intended was something like this:

This allows the capacitor to be like a small reservoir for the LED. It will keep the LED lit for a short time after the transistor is shut off.

With this circuit you can see how a little base current can control a larger collector current, which is how a bipolar transistor is used to make circuits with gain.

However, the values don't seem right for what I think you want this circuit to do. Most LEDs are rated for 20 mA maximum, so R2 should be sized to that this can't be exceeded. Let's say it's a green LED and drops 2.1 V at full current, and that the transistor would drop another 200 mV. That leaves 9.0V - 2.1V - 200mV = 6.7V accross R2. From Ohm's law, 6.7V / 20mA = 335Ω, which is the minimum resistance to keep the LED current within spec. Therefore use the next higher common value of 360 Ω. That still results in nearly 19 mA LED current. You won't notice the brightness difference between 19 mA and 20 mA even in a side by side comparison.

Another problem is that there isn't enough base current to reliably light the LED to its full value. Let's say the B-E junction drops 600 mV, then there is 8.4 V accross R1, which results in 84 µA. Let's say you can count on a gain of 50, so the minimum LED current is only 4.2 mA. That's enough to see it light up on your desk, but not to reach full brightness. In reality, you will likely get a gain higher than 50, so you will get more LED current, but relying on that is bad design.

Let's work backwards to see what R1 should be to fully turn on the LED. Again we'll assume the transistor has a gain of 50, and we've already said the maximum LED current is about 20 mA. 20mA / 50 = 400µA. With 8.4 V accross R1 from above and using Ohm's law again, the maximum R1 value is 8.4V / 400µA = 21kΩ, so the common value of 20 kΩ would make this a nice and reliable circuit if the intent is to light the LED to full brightness.

  • \$\begingroup\$ Ah, ok. This I didn't knew: once the capacitor is charged, it will not conduct anymore. Thank you for you well explained and elaborated response! \$\endgroup\$
    – Nicu Surdu
    Commented Oct 8, 2012 at 21:38
  • \$\begingroup\$ Once again I wish Stack Exchange would allow us to give brilliant answers like this one more than just one up vote, even if it cost me some rep. \$\endgroup\$ Commented Dec 28, 2017 at 9:14

The LED lights when current flows through it. But the only way current can flow through it in this circuit is through the capacitor. As current flows through a capacitor, the voltage across the capacitor builds up, until the capacitor is fully charged and no more current will flow. That's why the light turns on, then immediately turns off.

Capacitance is an effect that limits rate of change. Once things have settled out, there is no more change, and it has no further effect. So in the long-term, steady-state, capacitors (and inductors, for that matter) look like what they are; they act like you'd expect them to act if you knew how they were constructed, but didn't know capacitance or inductance even existed.

A capacitor is a gap between two conductors. After it charges, it behaves like an open circuit. The instantaneous behavior is the opposite. Until it charges, a cap acts like a short circuit.

In short (haha), your capacitor is in the wrong place. Depending on what you're trying to achieve with it, it should probably be in parallel with the DC supply, in parallel with the LED, or removed entirely.

  • \$\begingroup\$ As Olin Lathrop, you've lightened my way: once the capacitor is charged, it will not conduct anymore. That part I didn't get from any documentation. Thank you very much! \$\endgroup\$
    – Nicu Surdu
    Commented Oct 8, 2012 at 21:41
  • \$\begingroup\$ Hi Stephen ! "the capacitor is fully charged and no more current will flow" what is meant by fully charged ,is there any upper limit of charging of capacitors or charging until it causes transistor to operate in Saturation or cut-off region? \$\endgroup\$
    – user215805
    Commented Feb 24, 2021 at 16:03

Try this instead. Use your LED instead of the diode I used and you may need to adjust R8 to get the right amount of current flowing. In this configuration current will flow, remove the endof R7 that's connected to 9V and connect it to GND, and you'll get no current flowing.

enter image description here


To simplify all the answers above.

Once capacitor is fully charged it will have high resistance and will not let the current through. So in order to keep it as a short back up power all u need is to connect it in parallel to you led and resistor.


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.