# The Flashing LED project. The fundamentals.

#### RAMBO999

Joined Feb 26, 2018
256
Hello All

I am about to embark on what is allegedly the Hello World project of the breadboard beginner.

The Flashing LED project.

I have looked around the net and there are a couple of "recipe" based solutions eg: take these resistors, this transistor, this capacitor, this LED, this battery, put them all together like that hey presto the LED flashes.

Simply making an LED switch on and of is not all I want to achieve.

What I do want to achieve is an understanding of the physics at the fundamental level so that I can produce the outcome using any appropriate combination of components.

So far this is what I have gleaned from what knowledge I already have of the components involved.

First of all I know I don't necessarily need a transistor in this solution nor a capacitor. There are other ways of producing a pulsing voltage. eg: relays.

But for now I want to focus on an RC circuit solution. No transistor.

So that would be resistors, a capacitor, an LED an a power source.

Put simply I figure that what I need to do is attach a supply current to the capacitor anode and the LED to the capacitor cathode.

I then need to create a situation, using the resistors where the charge rate of the compacitor is less than it's discharge rate.

That way the capacitor will continue to charge from V=0 to the threshold voltage of the LED.

When the LED threshold voltage is reached the LED will then discharge the capacitor down to its threshold, the LED that is.

When the voltage in the capacitor falls to the threshold voltage of the LED the LED will turn off.

This is in effect your flash event.

The cycle is then repeated.

The duration of the flash event will be determined by the capacitor time constant as it discharges.

The frequency of the flash event will be determined by the difference between the charge rate and discharge rate of the capacitor.

All of these parameters will deteremine which components to use in the project. ie: capacitor and resistors.

In order to calculate these parameters for any given flash duration and frquency I am looking at the following formulae:

Charging : V = E(1 - e^(-t/RC)) where E = Charging source voltage volts; t = time seconds; R = resistor ohms; C = cap capacitance Farads; e = Eulers number

Discharging : V = V0 * ( e^(-t/RC)) where V = Capacitor charge volts; t = time seconds; R = resistor ohms; C = cap capacitance Farads; e = Eulers number

Time constant tau = RC where R = resistor ohms; C = cap capacitance Farads;

How does that sound? Am I missing anything?

Thanks

#### iimagine

Joined Dec 20, 2010
483

#### Wolframore

Joined Jan 21, 2019
2,192
could you draw it out? I can't picture it.

#### RAMBO999

Joined Feb 26, 2018
256
You reckon it can't be done then. That right?

#### Wolframore

Joined Jan 21, 2019
2,192
not without other help... I can't even imagine how you propose wiring it that makes sense.

#### RAMBO999

Joined Feb 26, 2018
256
could you draw it out? I can't picture it.
It's a simple circuit.

Although the final solution might well insert a resistor between teh cap and the LED. I have yet to figure it out.

#### Attachments

• 32.3 KB Views: 19

#### iimagine

Joined Dec 20, 2010
483
Will only work if you have a spark gap and a very high voltage

#### dl324

Joined Mar 30, 2015
12,245
Am I missing anything?
The circuit won't work. Initially you'll have charging current through the capacitor, which may or may not cause the LED to light. Once the capacitor charges, you have nothing that will discharge the capacitor to restart the cycle.

BTW, your equations would be easier to read if you used tex. I'll format it later...

#### RAMBO999

Joined Feb 26, 2018
256
The circuit won't work. Initially you'll have charging current through the capacitor, which may or may not cause the LED to light. Once the capacitor charges, you have nothing that will discharge the capacitor to restart the cycle.

BTW, your equations would be easier to read if you used tex. I'll format it later...
As I say, I am only at the theoretical stage at this point. But I don't see how you reach that conclusion. The LED will discharge the capacitor when the cap voltage reaches the LED's threshold voltage. The rate at which the capacitor discharges will determine how much of the cap charge is dissipated but I would expect a flash at that point. Once the cap discharge voltage falls below the LED threshold the cap will stop discharging and it will start recharging again. Why wouldn't that work?

#### SamR

Joined Mar 19, 2019
2,904
To start with your circuit is incorrect. the LED and series R need to be parallel to the cap. Without doing the math the cap discharge can be a quite high current so it is a tradeoff between cap and resistor and quite a balancing act. Apparently, from a quick look-see it does work.

#### RAMBO999

Joined Feb 26, 2018
256
To start with your circuit is incorrect. the LED and series R need to be parallel to the cap. Without doing the math the cap discharge can be a quite high current so it is a tradeoff between cap and resistor and quite a balancing act. Apparently, from a quick look-see it does work.
Ok. I will check that out. But I can say that "The LED will discharge the capacitor when the cap voltage reaches the LED's threshold voltage" does actually happen with the two in series. I have just tested it. The cap does charge and the LED does flash. The question is how to get it to repeat. But I will think about the parallel arrangement.

#### Alec_t

Joined Sep 17, 2013
11,800
The LED will discharge the capacitor when the cap voltage reaches the LED's threshold voltage.
No, it won't if the cap is in series with the LED as set out in your earlier posts. The LED would have to be in parallel with the cap.
I have just tested it. The cap does charge and the LED does flash.
So they do, but what you are seeing is the LED charge current causing the LED to light. As soon as the cap has charged the current stops and the LED goes out.

#### SamR

Joined Mar 19, 2019
2,904
First the simple circuit.

Then the xstr flip-flop version.

#### dl324

Joined Mar 30, 2015
12,245
I don't see how you reach that conclusion. The LED will discharge the capacitor when the cap voltage reaches the LED's threshold voltage. The rate at which the capacitor discharges will determine how much of the cap charge is dissipated but I would expect a flash at that point. Once the cap discharge voltage falls below the LED threshold the cap will stop discharging and it will start recharging again. Why wouldn't that work?
There is nothing in the circuit to discharge the capacitor.

It's questionable whether you'd get the LED to flash. It depends on the values of R and C. The initial charging current will be the highest and then it will decrease. The LED might turn on and then dim fast enough to call it a flash; if it turned on at all.

$$\small V = E(1 - e^{\frac{-t}{RC}})$$

$$\small V = V_0 * e^{\frac{-t}{RC}}$$

Last edited:

#### iimagine

Joined Dec 20, 2010
483
The question is how to get it to repeat
How about learning the fundamental of charging and discharging a capacitor first?

#### RAMBO999

Joined Feb 26, 2018
256
No, it won't if the cap is in series with the LED as set out in your earlier posts. The LED would have to be in parallel with the cap.

So they do, but what you are seeing is the LED charge current causing the LED to light. As soon as the cap has charged the current stops and the LED goes out.
Ahhhh. I think I see what you are saying. That's why you need an alternative route for charging the cap. ie: parallel circuit. But why does it flash just once when I initially power it up? What's going on there if the LED is breaking the circuit?

#### Xavier Pacheco Paulino

Joined Oct 21, 2015
728
A capacitor will block DC currents, and the diode only allows current in one direction. That's why there's no way to discharge the capacitor in your circuit.