Hello,
first thing, i really like the forum, gave me some good advice so far.
Still, I'm doing my first project, it would be great, if you could help me.
I do have some theoretical background, but would like to verify my thoughts.
I need to fade in and fade out different LEDs with a fading time of something like 5 - 10 seconds.
I found this circuit:
http://www.simple-electronics.com/2011/09/fading-led.html
And I'm trying to do the math:
The C gets charged over the 20k R.
Vcc is 9V, the 555 chip charges from 1/3 to 2/3 of Vcc, so:
The voltage at R will be between 6 and 3 V
The voltage at C will be between 3 and 6 V
Looking and the right side of the circuit, the base of the transistor is connected to the C, which means the voltage at C will be at the LED and its resistor with a voltage drop at the transistor:
\(U_{BE} = 0.7 V\)
My LED parameters:
\( I_{max} = 20 mA \)
\(U_{f} = 2.1 V \)
The maximum voltage at the resistor will be
\(U_{R,led,max} = 6V - U_{f} - U_{BE} = 3.2 V\)
To limit the current, the value of the resistor has to be at least:
\(R_{led,min} = \frac{U_{R,led,max}}{I_{max}} = \frac{3.2 V}{20 mA}=160 \Omega\)
Same is true for the PNP side.
Now, dimensioning the RC Network:
Since I'm using the the CMOS Version of the 555, the maximal sourcing current it given with:
\(i_{R,max} = 10 mA\)
Now with slow fading times, the current in the transistor is not negligible, and with the gain of the transistor:
\(B = 100 - 500\)
the maximal current:
\(i_B = \frac{i_C}{B} = \frac{20 mA}{100} = 0.2 mA\)
Since I'm using 2 transistors, there need to be a current trough the resistor of at least:
\(i_{R,min} = 2 i_B = 0.4 mA\)
with this parameters, I can give a range of the resistor:
\(R_{min} = \frac{U_{R,max}}{i_{R,max}} = \frac{6 V}{10 mA} = 600 \Omega\)
\(R_{max} = \frac{U_{R,min}}{i_{R,min}} = \frac{3 V}{0.4 mA} = 7500 \Omega\)
so the values for R in the RC Network:
\(R = 600 \Omega ... 7500 \Omega \)
The charging + discharging time from the C between 1/3 to 2/3 is given with:
\(T = 2 \cdot 0.7 R C\)
Remark: current i_B is neglected in calculation, since it has opposing effects in charging and discharging.
So e.g. a time of 10s and with R = 3300 Ω
\(C = \frac{T}{1.4 R} \approx 2200 uF\)
So, thanks so far for reading.
I'd like tu discuss my thoughts and want to make to ensure, that I put it together in the right way.
Thanks for any help!
first thing, i really like the forum, gave me some good advice so far.
Still, I'm doing my first project, it would be great, if you could help me.
I do have some theoretical background, but would like to verify my thoughts.
I need to fade in and fade out different LEDs with a fading time of something like 5 - 10 seconds.
I found this circuit:
http://www.simple-electronics.com/2011/09/fading-led.html
And I'm trying to do the math:
The C gets charged over the 20k R.
Vcc is 9V, the 555 chip charges from 1/3 to 2/3 of Vcc, so:
The voltage at R will be between 6 and 3 V
The voltage at C will be between 3 and 6 V
Looking and the right side of the circuit, the base of the transistor is connected to the C, which means the voltage at C will be at the LED and its resistor with a voltage drop at the transistor:
\(U_{BE} = 0.7 V\)
My LED parameters:
\( I_{max} = 20 mA \)
\(U_{f} = 2.1 V \)
The maximum voltage at the resistor will be
\(U_{R,led,max} = 6V - U_{f} - U_{BE} = 3.2 V\)
To limit the current, the value of the resistor has to be at least:
\(R_{led,min} = \frac{U_{R,led,max}}{I_{max}} = \frac{3.2 V}{20 mA}=160 \Omega\)
Same is true for the PNP side.
Now, dimensioning the RC Network:
Since I'm using the the CMOS Version of the 555, the maximal sourcing current it given with:
\(i_{R,max} = 10 mA\)
Now with slow fading times, the current in the transistor is not negligible, and with the gain of the transistor:
\(B = 100 - 500\)
the maximal current:
\(i_B = \frac{i_C}{B} = \frac{20 mA}{100} = 0.2 mA\)
Since I'm using 2 transistors, there need to be a current trough the resistor of at least:
\(i_{R,min} = 2 i_B = 0.4 mA\)
with this parameters, I can give a range of the resistor:
\(R_{min} = \frac{U_{R,max}}{i_{R,max}} = \frac{6 V}{10 mA} = 600 \Omega\)
\(R_{max} = \frac{U_{R,min}}{i_{R,min}} = \frac{3 V}{0.4 mA} = 7500 \Omega\)
so the values for R in the RC Network:
\(R = 600 \Omega ... 7500 \Omega \)
The charging + discharging time from the C between 1/3 to 2/3 is given with:
\(T = 2 \cdot 0.7 R C\)
Remark: current i_B is neglected in calculation, since it has opposing effects in charging and discharging.
So e.g. a time of 10s and with R = 3300 Ω
\(C = \frac{T}{1.4 R} \approx 2200 uF\)
So, thanks so far for reading.
I'd like tu discuss my thoughts and want to make to ensure, that I put it together in the right way.
Thanks for any help!