No problem, I think you missed where I said:
"So, if you had say 168 volts on the input, ..."
I was only trying to show how the LM317 works, but I'll post
a complete circuit, below, and show you how you can go back
to 54 LEDs instead of 48. Please note that this is posted
just as a learning experience. There are better and safer
solutions that do not require you to deal with 120 volt
mains. I'll post a separate reply to address that.
This thread has covered a lot of territory. :-)
The incomplete discussion of using an LM317, and the idea
of restoring your ability to use 54 LEDs instead of 48
prompts this:
For 54 LEDs, use the following:
3.8Fv 3.3Fv 2.2Fv 1.7Fv
30mA 30mA 30mA 30mA
18LEDs 12LEDs 12LEDs 12LEDs
That adds to 68.4 + 39.6 + 26.4 + 20.4 = 154.8 volts.
Note that it's 18 3.8 volt LEDs, and 12 of each of
the other voltage leds, forming a series string of 54 LEDs.
We'll set the current to ~18 mA with an LM317 and 68 ohm
resistor, and develop the necessary voltage with a bridge
rectifier and capacitor. Here's the circuit:
----------- 470 ----- 68
AC---| +|---/\/\/---+---|LM317|---/\/\/---+
| Bridge | | ----- |
| Rectifier | 47uF --- | |
| | 250V --- +--------------+
| | | |
| | | LEDs
| | | |
AC---| -|-----------+---------------------+
-----------
The 68 ohm resistor connected from the 317 out pin to the
adj pin sets the current to about 18 mA. The LM317 holds
its output pin at 1.25 volts above its adjust pin; thus the
current is 1.25/68 or about .0183 amps.
At 18 mA, the voltage drop in the 470 ohm resistor will be
about 8.6 volts. (470 * .0183 = ~ 8.6)
*Here's the part where you get ~168 volts*
The 47 uF cap will be charged to the peak mains voltage,
about 169.7. The peak voltage is computed by
Vrms * square root of 2. So 120*sqrt(2) = ~169.7
From 169.7, subtract the ~8.6 drop across the 470 ohm resistor
and minus the ~1.4 volt drop in the bridge. So the voltage
across the cap will be about 159.7. That means the voltage
drop across the LM317 will be about 4.9 volts, because the
54 LEDs in series drop about 154.8 volts.
Power dissipation in the 470 ohm resistor is about .16 watts.
Power dissipation in the LM317 is about .09 watts, and power
dissipation in the 68 ohm resistor is about .023 watts.
Note that the circuit purposely includes some drawbacks.
What happens if the line voltage drops? Say it drops to
110. As Mike pointed out, the rectified and filtered
output now becomes 110*sqrt(2) or ~155.5. When you subtract
the voltage drop in the resistor (8.6) and the voltage drop
in the bridge (1.4), you end up with ~ 145.5. That is
lower than the 154.8 volts computed for the 54 LED string.
It also "starves" the LM317. The LM317 (and all other 3
legged voltage regulator chips) needs some "headroom".
That is, it needs some voltage above the output voltage
to work properly. For the LM317 3 volts is more than it
needs, but is easy to use as that "headroom" voltage in
computations. So for the sake of the example, we can
say the LM317 needs 157.8 volts on its input pin to provide
154.8 volts on its output pin.
As mentioned earlier, another drawback is that you would
have to use mains voltage. Still another is the use of
the LM317 in the first place, where a single resistor
would be good enough. If you used the filtered and rectified
mains to produce ~168 volts to drive a 154.8 volt string of
LEDs, you could drop the voltage from ~168 to ~154.8 with
a single resistor. Ohms law says E = I*R where E is voltage,
I is current, and R is resistance. We need to drop about
13.2 volts (168 - 154.8) across the resistor. It is a good
idea to drive the LEDs gently, so let's choose about 20 mA
as the current we want. Plugging in to the formula:
13.2 = .02 * R, so R = 13.2/.02 or 660 ohms. A standard
value resistor close to that is 680 ohms, so that is what you
would choose.
Ed