Hi there,
Some good advice from Doug...the smaller LED's usually take 20ma max.
Here are some formulas to help calculate the correct resistor value:
R=(Vs-Vf)/I
P=R*I*I
where
R is the value of the resistor (ohms)
Vs is the source voltage (battery or other voltage in volts)
Vf is the LED forward voltage drop at specified current in volts
I is the current flowing through the LED and resistor in amps
P is power in the resistor in watts
You would first calculate the resistor value R and then calculate the power P
to make sure your chosen resistor can stand the total power when the circuit
is energized.
Example:
You want to power an LED that needs 20ma at 3.3v from a 6.4v power
source.
Here,
I=0.020
Vs=6.4
Vf=3.3
using R=(Vs-Vf)/I we calculate the resistor value:
R=(Vs-Vf)/I
R=(6.4-3.3)/0.020
so R=155 ohms.
A close standard resistor value would be 150 ohms.
Now calculate the power from
P=R*I*I
P=150*0.020*0.020
so P=0.060 watts approximately.
Doubling this to be safe we get 0.120 watts, which is less than
an 1/8 watt resistor so we can purchase a 1/8 watt or higher resistor
of 150 ohms.
There is something beautiful about an LED and series resistor circuit, in that
it's so simple yet it provides a very reliable light source.
There are also other alternatives if you find your 6v power source varies quite
a bit and the LED brightness changes too much.
A quick sensitivity analysis will tell us if our LED brightness changes
too much with input voltage...
Using the formula
I=(Vs-Vf)/R
we calculate two currents, one with normal voltage and one with
voltage 0.1 volts less than normal:
i1=(6.4-3.3)/150=0.02066667
i2=(6.3-3.3)/150=0.02000000
If we then calculate the percentage differences in both voltage and
current we get:
1-6.3/6.4=0.015625
1-i2/i1=0.03225806
Examining these results shows that for a change of 1.5 percent in voltage
we get a change in current of about 3 percent, which means the current
change is twice that of the voltage. We'd have to be careful if the voltage
changed too much. Also, other calculations show that if the voltage
is very close to the LED's forward voltage (Vf) the sensitivity is even
worse (could be very sensitive to voltage changes) so we may not even
be able to use a simple series resistor for some voltage sources unless
we could also tolerate a very drastic change in current (and thus brightness).
Luckily, this isnt the case with a 6.4v source and a 3.3v LED.
Oh yeah, BTW, "Welcome back"
Take care,
Al