-dave- said:
Would the resistence of the dropping resistor need to be changed if
the number of LEDs in series is changed (for example from 5 to 20)
or is the resistence not critical?
The brightness of an LED depends on the current through it; the
voltage across it varies little over its useful range. so, if you
want the brightness to remain constant, you need a constant *current*
source, not a constant *voltage* source.
In the usual circuit, you have a constant voltage and a resistor.
Since the LED has a "fixed" voltage across it, the resistor does too,
and you can use the value of the resistor to determine the current
through the circuit. However, if you change the number of LEDs, you
change the voltage across the resistor, and thus the current.
If you want the current to remain the same regardless of how many LEDs
there are, what you need is a constant current power supply. You can
use an LM317 with a single 62 ohm resistor as a 20 mA constant current
supply, but you need to get one beefy enough to handle the *minimum*
number of LEDS (largest power dissipated by the regulator) and the
*maximum* (highest needed input voltage) at the same time. 50 LEDs
would require about 100 volts, but 20 could be doable... that's about
40v input, and a big LM317 can handle up to 57v input.
So, example... 20 LEDs at 2v, 20 mA = 40v output. Add 2v for the
regulator itself, and 1.25v across the 62 ohm resistor, say 44v input.
Now, 5 LEDs is only 10v, possibly as low as 9v. That's about 34v
across the regulator, or about 0.7 watts In a TO-220 package, it'll
run 50 C/W or 35 degrees C hotter than ambient, well under the 125C
limit.
Once she finalizes the design and you know how many LEDs are in the
string, you can use the same circuit but with a smaller input voltage
to reduce heat loss. If she needs more than 20 LEDs, just make two or
more circuits. I've got a project with 11 LM317s in it running 11
strings of 9 LEDs each off a 37v supply, works great.
Alternately, if the input voltage is fixed already, figure out how
many LEDs you can put in series before you run out of voltage drop,
and put strings of those in parallel with each other (each string has
its own suitable current-limiting resistor). For example, if you have
a 12v supply and need 18 LEDs, you could have three strings of five
LEDs (10v drop) each with a 100 ohm resistor, plus a string of
(example) 3 LEDs (6v drop) with a 300 ohm resistor. This is probably
the easiest solution if you don't *have* to have all the LEDs in
series.