# What's the relationship between capacitor and resistance in a fading LED circuit with a 555 timer?

I followed the instructions in this video to make a fading LED circuit with a 555 timer:

...apparently loosely following the schematics here:

Note that the guy in the video uses different values for both resistors, the capacitor and the voltage source, and only one LED. And so do I. I use a 6V voltage (4xAA), a 130Ω resistor in series with two 3,4V LEDs in parallel, as the "high" resistor I use a potensiometer, and I use a 470µF capacitor. All is good and the circuit appears to work as it should.

1) Now, what I don't understand is the relationship between the capacitor and the high resistor (potensiometer). In the video instructions the guy said to use a 1000µF capacitor, which I tried. The comments below the video said a much smaller capacitor was all that was needed. I found that there seemed to be a linear-ish relationship between the capacitor and resistance. I could choose different values of capacitors, adjust the potensiometer, and the circuit behaved the same. Can someone explain this to me, and whether I'm tinkering with this in the right way?

2) Is the 130Ω resistor in series with the two LEDs (in parallel) an adequate value?

Break the circuit into its functional blocks and it all becomes very obvious how this circuit works.

The transistors are simply emitter followers - they follow the voltage across the capacitor. By using NPN and PNP BJTs they act in antiphase - as the voltage increases (wrt 0V) the NPN side LED increases and the PNP side decreases.

The LED resistor is not a critical value (it sets the maximum brightness) so changing it to 130R at a lower operating voltage is fine.

The capacitor voltage changes between 1/3rd and 2/3rds of the supply. This is set by the internal comparators of the 555 chip. When the output (pin 3) of the 555 goes HIGH the capacitor is charged through the 20k. The voltage rises to 2/3rds supply voltage and switches the output pin LOW. The capacitor then discharges through the 20k until it gets to 1/3rd supply voltage and then switches the output HIGH.

The timing is controlled by the product of C and R. (larger values, longer time). i.e. A 1000uF and 10k would have the same time constant as 500uF and 20K and produce the same flash rate.

• Hi, and thanks for your answer. I'm going to mark it as accepted. But, just to clarify, within reason I can simply experiment with different C and high R to find a flash rate that is suitable and it otherwise won't matter? I'm using a potensiometer for high R, which is how I regulate the flash rate. Oct 7, 2016 at 17:52
• Yes but remember to keep a fixed resistor (say 1k0) in series with your variable so that you can't directly connect the output (pin3) to the capacitor. The other thing to consider is that you need to keep the variable resistor in a range that will not only charge the capacitor but supply the base currents and overcome any capacitor leakage as well , say 22k max - which would give you roughly a 20:1 tuning ratio in combination with the 1k0. It would be better to increase the capacitor value rather than increasing the variable resistor value to get longer delays. Oct 8, 2016 at 10:45
• Cool. So why is this important? Is there a risk of frying the circuit or is it simply good practice and the circuit will misbehave otherwise? I've already done all the things you advice against ;) Oct 9, 2016 at 18:15
• Its basic advice to keep the circuit within working parameters. Yes, you could end up frying the 555 by not limiting the output current with the 1k0. Yes, it may not be able to function if the values get too far out. What I've suggested is simply a set of values that will give a predictable working outcome. If you wish to experiment with other values then go for it. As an engineer I always err on the safe side. Oct 9, 2016 at 23:13