# When wiring a circuit with a capacitor why does the electricity go to the capacitor first instead of bypassing it?

I am relatively new to electronics and only dabbled in high school with very simple circuits but I was doing an led project with neopixels and they wanted a capacitor on the positive and negative rails to stop an inrush of current to prevent damaging the first pixel.

"When using a DC power supply, or an especially large battery, we recommend adding a large capacitor (1000 µF, 6.3V or higher) across the + and – terminals. This prevents the initial onrush of current from damaging the pixels. See the photo on the next page for an example."

The circuit above kind of shows what I mean, how come the electrons don't flow past the capacitor and too the led or is that a wrong assumption and electrons do flow past the capacitor and the capacitor just takes some of the energy?

If the electricity has to charge the capacitor first than what is stopping the current going past the capacitor.

I hope I worded that well. I apologise if I am not getting my point across.

• If there's a big hole in your bucket, what stops you filling it? Electricity doesn't have options, it has rules and current wants to take the easy path to flow. – Andy aka May 3 '20 at 14:55
• BTW it is preferable to insert some small resistor (a few dozen ohms) between the battery and the capacitor if you want the battery to serve you longer. – Circuit fantasist May 3 '20 at 15:36

The circuit above kind of shows what I mean, how come the electrons don't flow past the capacitor and too the led or is that a wrong assumption and electrons do flow past the capacitor and the capacitor just takes some of the energy?

When the capacitor is discharged, the voltage across it is 0 V. If there is some resistive load in parallel, then no current will flow through the resistive load because the voltage across it is 0 V.

Only after current flows through the capacitor will its voltage increase. As its voltage increases, some of the current will start to be diverted through the resistive load.

Once the capacitor voltage increases to near the battery's emf, the battery won't be able to increase the voltage across the capacitor any more, and current will stop flowing through the capacitor. At this point just about all of the battery's output current will flow through the load.

The battery can only supply a finite amount of current, because the internal cells (6 in series) are each small and have insulating cases around each cell along with the necessary (+) and (-) contacts and the needed chemical pastes and materials embedded within those pastes to extract electrons.

With a finite current from the battery to your circuit, with initially zero charge in the capacitor, the voltage must start at zero and then slowly charge up.

We can predict the charging rate; electronics people use the term "time constant" to describe this charge_up.

Assume 1 ohm resistance in each cell. There are 9 in series, thus a total of 9 ohms.

The capacitor, if 100uF, and the full series resistance of 9 ohms, multiplied together to compute the time_constant (in Greek, we use TAU as the smaller_to_write word).

Thus the time_constant (TAU, tau) τ is 100uF * 9 Ω or 900 microSeconds.

That is too fast for the human eye to notice.

Because the series resistance of the capacitor (resistance to ground or "-" ) is lower than the resistance of the resistor before the LED + the LED. As the capacitor fills up, its resistance to ground increase and current start flowing through the LED. When it's completely full, all the current goes through the LED because it can't cross the capacitor anymore. When you disconnect the + wire from the battery, the LED will shine a little bit longer as the current charged into the capacitor is being evacuated through the LED. The the capacitor will be discharged.