# Help with LED lighting please



## stevedenver (Jan 6, 2008)

i have a clamshell motor LGB  2090 yellow KOF it has dummy lights-i want to light them 

i run analog

this engine is very efficient and runs identically to an older stainz regarding power consumption, doenst take much to get it going scale speeds

the dummy lights diameter are, roughly, between 5-7mm in diameter-

heres where i ask for help/suggestions please

i plan on inserting an LED into each of the lamps (3 front -3 rear) so as to fill the housing

i think i can do this with minimal mess

i dont know how to :
have them light at about 3-5 volts-directionally
and still have them not blow in the event of a 20-24 volt application

ie i need a paint by number explanation of how to limit the voltage and get constant lighting with the leds

the reason for LEDs over incandescent is the shape of the lamps-they have milk white lens which are useless-and i think an LED would work best for filling the lamp, giving the look of a proper lens, having nice tidy leads through the back and downward into the running boards and into the chassis and motor pick ups-likewise for the molded lamps on the rear wall of the cab-

so what electronics stuff would i need to build to allow for a bright light at minimal voltage and keep it from blowing at high voltage? if this isnt possible-what do i need to simply allow for some reasonable voltage span without a blow out-say 0-14V?

and-

is there the possibility of using LEDs that change from white to red with a polarity change-so id have all six on at any one time-forward white-rearward red and vice versa-?

any other suggestions welcome too


----------



## George Schreyer (Jan 16, 2009)

see the link for the information on constant intensity, you want to use an LM317L in constant current mode. 

There are no white/any other color LEDs 

If you want red to the rear, that use ANOTHER LM317L to drive the two red LEDs in series. You'll need to do the same thing at the other end with two more LM371L's 

http://www.girr.org/girr/tips/tips7/white_led_tips.html 

You COULD run the white one at the rear in series with the red ones at the front, but then it would take 3 more volts of track voltage to get them to light at all. With the LM317L driving the LEDs, they won't come on at all until you get to about 5 volts on the track, but they will stay absolutely constant up to 30 volts


To use the LM317L, you will need a total of 3 parts, the LM317L itself, a 62 ohm resistor and a polarity protection diode. If you want to run the lights at the lowest possible track voltage, you will need 4 sets of these parts. You can solder up each set with the leads clipped as short as possible and encapsulate the set in shrink tube, one wire in, one wire out.


----------



## Madstang (Jan 4, 2008)

George thanks for the link but after looking at it..it is still not "color by the numbers"..the person that made this reference, I thinks does not realize that when a person does not understand LEDs' all that is printed on the page does not mean anything to anyone except for the people that understands them.

Is there a MORE simplified form of explaniation? You know for dummies? Like me when it comes to LEDs'..you know MORE comprensive? That ain't it!









Bubba


----------



## George Schreyer (Jan 16, 2009)

Bubba, if you can't figure it out from that link, you ought not be trying it yourself. That's about as simple as it gets.


----------



## stevedenver (Jan 6, 2008)

many thanks -ill see if i can work through this- 

(i actually built a clone of a 1957 Fender tube guitar amplifier by pictures -it can be done-and it worked first fire up...i digress) 

and 

when i do ill see if i can come up with a generic g scale LED unit i can share- 


and as an aside 

i have actually found LEDS that are red and white 

and red green and white-desinged for class lights on DCC-ah but alas....... 

and some other combinations too- 
red/ green 


these were all 3mm-and i want 5mm or larger for my application


and some that have a common negative for DCC (not that i need this for analog) 




i guess ill work it until i get it-luckily these type of componenets arent pricey and i can afford to destroy more than a few in the process





just was hoping someone already had a unit suitable for straight track power -ill use the one in the diagram wiwth the 317 and let you know


have decided to do 2 white at each end and one red at each end (ala swiss railway config-even tho not prototypical-and this will make the forward -reverse application simple off and on via diode i guess


----------



## George Schreyer (Jan 16, 2009)

A white LED has about 3 volts drop, a red one about 1.6 volts. If you use two white ones at each end and you wire them in series, then it will take about 8 volts to get them to light. If you really want the low turn on, then you need to wire them in parallel which means that you want to use a 5 volt regulator (7805) and a 75 ohm resistor in series with each one. A white LED at 20 mA is pretty bright, you don't actually need two for the light output but you may have other reasons for wanting to use two. 

BTW, DCC applications use a common positive. 

red/green LEDs are quite common. I have never seen a white one combined with any other.


----------



## SteveC (Jan 2, 2008)

They're out there

*Red/White LED*


----------



## steam5 (Jun 22, 2008)

Could you use a tri coloured LED? I think you can get red, green, blue and white? 

Alan


----------



## steam5 (Jun 22, 2008)

Steve you just bet me. Yours is a much better solution than using a tri.


----------



## Dan Pierce (Jan 2, 2008)

I have modified 4 2090 engines. 
I drill 2 holes in the bottom of the sockets and I am able to put the lenses back in place. The led leads go through each hole. 
On the front, I drill holes through the hood and bend the led leads through these holes. 
I then wire the bulbs in series and use a 680 ohm resistor to limit the current. 
I do the same for the rear leds. 

Since the rear has red lenses, I just used the 3mm bright white leds, red ones not needed. 

Picture of inside my 2090 hood with led wiring. 

http://1stclass.mylargescale.com/danpierce/2090/LGB2090Light.JPG


----------



## Dennis Cherry (Feb 16, 2008)

Using a 7805 voltage regulator on a 20-24 volt input circuit will make the regulator very hot, you will have to put a heat sink on the regulator, The LM-317L is a much better way to go. No heat sink needed up to 36 volts using it a 20 ma. 
One other thing is the LED will come on at a lower voltage and will be at full current and brightness when the 20ma. peek is achieved using the LM-317 circuit. Once the LED reaches about the 50% value (10ma.) the difference in intensity will not be that noticeable. 



My other hobby using 15,000 LED lights:

http:/www.vimeo.com/Dennischerry


----------



## stevedenver (Jan 6, 2008)

dan and others thanks 
dan i appreciate the photos 

did you use the milk white lens or eliminate them? 

im going to try to eliminate all lens and somehow insert the LEDS and see if i can supplement with some type of filler for a lens like appearance both front and rear 

worst case if i can do this ill simply cut some lens


----------



## stevedenver (Jan 6, 2008)

Posted By George Schreyer on 05/07/2009 5:47 PM
A white LED has about 3 volts drop, a red one about 1.6 volts. If you use two white ones at each end and you wire them in series, then it will take about 8 volts to get them to light. If you really want the low turn on, then you need to wire them in parallel which means that you want to use a 5 volt regulator (7805) and a 75 ohm resistor in series with each one. A white LED at 20 mA is pretty bright, you don't actually need two for the light output but you may have other reasons for wanting to use two. 


well as the engine has three lamps on each end-and i plan to light 2 each end white and one each end red-and light according to direction of travel-ill do them parallel, eachwith the appropriate resister, and use the 371 to avoid the heat issues i think


----------



## Greg Elmassian (Jan 3, 2008)

Very cool led! I think that's what is needed for class lights, will have to see if I can retrofit to my USAT stuff, since they have red/green on the F units. 

7 bucks! ouch, but what can you say.... 

Regards, Greg


----------



## SteveC (Jan 2, 2008)

OK, then try this.

*Red/White LED*


----------



## Dan Pierce (Jan 2, 2008)

I used the original lenses, If you remove the lenses, you could fit 5 mm leds in the housings. 

On the LM317 vs the LM7805. There is no difference in heat dissipation. 20 ma at 18 volts is the same for both devices. I use the T type t0-220 cases. 1/3 of a watt heat for 20ma at 19 volts for either device. 
If the power exceeds 1 watt, a heat sink is needed. 
I bolt my regulators to the metal weights in the engines. 

When using the LGB smoke unit, the 5 volt regulator on a dcc/mts system has to handle 100ma times 19 volts which is about 2 watts. Heat sink definately needed.


----------



## George Schreyer (Jan 16, 2009)

Actually, there are two differences in dissipation between the 7805 single diode version and the LM317 single diode version. However, both differences are 2nd order effects. 

1) The 7805 bypasses a few mA to ground directly. This does not go to the load. The extra few mA (the exact amount being manufacturer dependant but less than 10 mA) increases the dissipation of the 7805. 

2) The 7805 version uses a 75 ohm resistor to provide current limiting for the diode. Assuming the diode is really 3.5 volts at 20 mA, this works out. Some diodes have a little different Vf at 20 mA but it doesn't vary by much. The LM317 version uses a 62 ohm resistor to produce the 1.25 volt drop that the regulator wants to see to set 20 mA. The difference is that the split of dissipation between the resistor and regulator is a little different, with the resistor getting less and the regulator getting more in the LM317 version. 

Overall counting both effects, the LM317 version will dissipate less AND it will cause the LED to light to full intensity at slightly lower input voltage. 

The LM317L (in the little TO-92 plastic package) can handle a 20 mA load from our typical track voltages so it can drive a single diode or a diode stack safely. However, for every diode added to the stack, the input voltage that it takes to get the stack to turn on goes up by the Vf of the added diode. 

The 7805 comes in a TO-220 case with a metal tab. Fortunately, the tab is ground so hooking it to a weight for a heat sink is usually ok unless something else at a different potential is connected to the same wieght. Check this before you do it. The LM317T is a larger version that also comes in a TO-220 case, but the tab is connected to one of the leads, can't remember which right now, but bolting it to a weight for a heat sink is a little more problematic. 

If you are going to wire the LEDs in parallel (each with their own 75 ohm resistor) to get the lowest turn on with multiple diodes, then use a 7805, it will be easier to mount than an LM317T. 

Also note that with 3 parallel diodes each running at 20 mA, your input current will be 65 or 70 mA (including the parasitic load of the regulator) and the dissipation of the regulator will be roughly 1 watt so that it WILL need a heat sink.


----------



## astrayelmgod (Jan 2, 2008)

George said "A white LED has about 3 volts drop, a red one about 1.6 volts." 

"Normal" red LEDs are about 1.6V, but high brightness red are 2.2 - 2.5V.


----------



## George Schreyer (Jan 16, 2009)

that's why current regulators are good. They don't care what the "proper" forward voltage is, they instead force the "proper" forward current no matter what voltage the thing runs at


----------



## Dan Pierce (Jan 2, 2008)

I am wondering as to how many users have tried to use the LM317 as a current device vs using it for a voltage.


----------



## astrayelmgod (Jan 2, 2008)

"I am wondering as to how many users have tried to use the LM317 as a current device vs using it for a voltage." 

I've done it, it works fine.


----------



## Jerry Barnes (Jan 2, 2008)

I just wire them up with a 470 ohm resistor and they do fine.


----------



## George Schreyer (Jan 16, 2009)

470 ohms will program an LM317 to about 2.5 mA.


----------



## Dennis Cherry (Feb 16, 2008)

I only use the current regulator circuit, after doing many tests it is the only way to get the lighting needed in our world of varying voltages.

Now if I have a circuit that has a steady state voltage like 5 or 12 volts then it is a no brainier just to use a dropping resistor only.

I have converted many USA passenger cars to LEDS using the LM317L. Now the current draw is 80ma per car instead of 3/4 amp per car.


BTW: if anyone is interested I can get 10 mm LED's over 10,000Mcd at a reasonable price. Colors too.


----------

