# Constant Current Lights Revisited



## gunrunnerjohn (Nov 10, 2010)

Just a quick post on constant current lighting. I was working on a caboose for my Ft. Knox Express that will run conventional (at least for now), so I wanted something that came up full brightness at any throttle setting. Here's the little module I built. You can see in the picture the component identification and connections. Basically, this is a voltage doubler followed by a LM317 wired as a constant current source. I'm driving six LED's in the LED strips that I've used before, and I got plenty of light for the little caboose using around 6MA for the whole string.










Here's the caboose in dim room lighting, with the big overhead lights on, you can't see that it's lit.


----------



## tankist (Jun 11, 2009)

simple and efficient. thumbs up


----------



## tjcruiser (Jan 10, 2010)

Can you clarify the components for us EE illiterates? Blue capacitors, black diodes, red resistor, grey diode bridge ???

How does it work? "Current flows into the ___, sine wave gets chopped by the ___ ..."

Not trying to chew up too much of your time here ... just trying to learn a bit more about this type of stuff.

Thanks,

TJ


----------



## gunrunnerjohn (Nov 10, 2010)

I'll see about drawing a schematic, I just cobbled that one together to make sure it all works, and it worked so well it's in my caboose. I've been thinking of doing voltage doubling for lighting for some time now, finally got around to testing it for real.


----------



## gunrunnerjohn (Nov 10, 2010)

Here's the schematic, the two diodes and two capacitors form a voltage doubler circuit. Basically, the first cap charges up to the peak voltage of the half cycle, and then the other cap charges from that point to double the voltage. You can actually triple or quadruple voltage the same way, but you get less and less current.

The LM317 is wired as a constant current source, you can adjust the value of the 220 ohm resistor to get any current you like.


----------



## tjcruiser (Jan 10, 2010)

OK, John ... I was halfway there ... I understand the part on the left ... diodes and caps. But the "LM317" had me stumped. Sounds like a German WWII U-boat! I Googled it, read a few refs, and am amazed as to what can be packed into such a tiny box...

"The LM317 is an adjustable three-terminal positive-voltage regulator capable of supplying more than 1.5 A over an output-voltage range of 1.25 V to 37 V. It is exceptionally easy to use and requires only two external resistors to set the output voltage. Furthermore, both line and load regulation are better than standard fixed regulators."​
I'm still fuzzy on all of the details (ee not my forte), but I have to say that that's a pretty ingenius little circuit.

Thanks for the detailed info!

TJ


----------



## gunrunnerjohn (Nov 10, 2010)

The LM317 is a voltage regulator. In this case, it's an adjustable voltage regulator. In it's normal configuration, you use a resistor to set the output voltage. However, I've wired it in an alternative configuration where the regulator is varying the voltage to keep the current constant, which is very useful for LED's. 

FWIW, the LM317LZ is the 100ma version of the one you found, that's the specifications for the TO220 package. There is also a TO-3 package one that I've used that supplies 3 amps. I built my bench variable supplies with the 3A version.


----------



## PrinzEugen (Dec 9, 2010)

Ok. Im running on 12v DC as input....i need constant bright at 3v


i suppose schematic is without 2x 33uF capacitors and 2x1n4005 diodes..AM I RIGHT?


----------



## gunrunnerjohn (Nov 10, 2010)

If you already have 12VDC, you can just use the regulator and resistor. Put a .1uF cap across the incoming 12VDC just to insure stability of the LM317 regulator.


----------



## PrinzEugen (Dec 9, 2010)

Tnx, but just one more shot....

i will use smaller one as you for led consumption only...

this one
*LM317L*
3-Terminal 0.1A Positive Adjustable Regulator
Features
• Output Current in Excess of 100mA
• Output Adjustable Between 1.2V and 37V

Description
The LM317L is a 3-terminal adjustable positive voltage
regulator capable of supplying in excess of 100mA over an
output voltage range of 1 .2V to 37V. This voltage regulator
is exceptionally easy to use and requires only two external
resistors
LM317L
PDF spec.



but his is one is for higher consumption current than 100mA

*LM317*
Features
Output Current In Excess of 1.5A
Output Adjustable Between 1.2V and 37V
TO-220 Package
D2 PAK Package

LM317
PDF spec.

so my question is that i would need BRIDGE RECTIFIER lets say 0.5A before LM317L and stability capacitor 0.1uF cause of reverse polarity of voltage 12DC ?


----------



## gunrunnerjohn (Nov 10, 2010)

Correct, for DC that will reverse polarity, you will indeed need the bridge rectifier. I falsely assumed we were talking about single polarity.


----------



## plandis (Oct 5, 2011)

gunrunnerjohn said:


> Here's the schematic, the two diodes and two capacitors form a voltage doubler circuit. Basically, the first cap charges up to the peak voltage of the half cycle, and then the other cap charges from that point to double the voltage. You can actually triple or quadruple voltage the same way, but you get less and less current.
> 
> The LM317 is wired as a constant current source, you can adjust the value of the 220 ohm resistor to get any current you like.


OK- very useful circuit!!

I think just we bit of more info would be be usefull to some of the electrically challenged in the group!! So- to "set" the current desired, calculate the value of R-1 by___

Thanks Gunny!


----------



## gunrunnerjohn (Nov 10, 2010)

The current is set by the formula I = 1.25 / R1.

In my example, 1.25 / 220 = 0.00568 amps or 5.68 milliamps.

If you want 20ma for full brightness of an LED, you would use a 60 ohm resistor.

20.08ma = 1.25 / 60 ohms.

Truthfully, I just build the circuit and then "tune" the resistor between about 100 and 300 for the proper brightness of the LED in question.


----------



## plandis (Oct 5, 2011)

gunrunnerjohn said:


> The current is set by the formula I = 1.25 / R1.
> 
> In my example, 1.25 / 220 = 0.00568 amps or 5.68 milliamps.
> 
> ...


thanks for that clariety. now on to another q- I recall a cc ic you were using on lighting in your passenger cars. You mentioned that a voltage doubler ahead of the ccr would provide good low track voltage lighting. What was the ccr you were using and would this cvr in the ccr config work better you think?


----------



## gunrunnerjohn (Nov 10, 2010)

This circuit and the CL2 do the same job. The advantage to this circuit is that it allows you to tune the current, the CL2 only allows a fixed 20ma or 25ma, depending on the specific part number. The one advantage of the CL2 is that it will handle a 90V differential, where this regulator maxes out at 37 volts. That's not much of an issue when I have my LED strips that require about 10-11 volts to light, typically I get about 40 volts out of the doubler at 18V track voltage. 18V is what the TMCC command/control runs at.


----------



## plandis (Oct 5, 2011)

gunrunnerjohn said:


> This circuit and the CL2 do the same job. The advantage to this circuit is that it allows you to tune the current, the CL2 only allows a fixed 20ma or 25ma, depending on the specific part number. The one advantage of the CL2 is that it will handle a 90V differential, where this regulator maxes out at 37 volts. That's not much of an issue when I have my LED strips that require about 10-11 volts to light, typically I get about 40 volts out of the doubler at 18V track voltage. 18V is what the TMCC command/control runs at.


awsome. good tip gunny. thanks!


----------

