# LED/DC Light question



## I Am Fasha

I have a DC powered Atlas SW7 Loco that has only one light in the shell. How hard is it to attach another light for the rear (cab end)?

Also is it possible to wire it for directional use?

Also again, what is necessary to turn these into LED's/


----------



## golfermd

Are you planning to convert it to DCC, or just leave it as DC? If it's going to be DCC, then put a 1K resistor in front of the positive lead of the LED. A smaller resistor if you want a brighter light, larger if you want it dimmer.

I can't speak to the DC aspect.


----------



## Southern

(1) not hard
(2) Yes 

a DC loco can have LEDs. Yea they can be directional.


----------



## tr1

that is a good question,that I too have an interest in. Some type of incandecsant,LED,light bulb fixture has to be designed, i think that's most difficult part of the question. Maybe the
engine manufacturer already has a light bulb fixture designed for that purpose. I'm sorry if i
bud in here.You may also want to try a variable restore. to control light brightness.tr1


----------



## I Am Fasha

Thanks for the replies Everyone! I get the impression this may not be too hard, lets hope not, I may ask for help walking me through this. The loco in question, (Im not sure if this makes a difference or not, but FYI) will be running on a DCC System, but without the decoder. The owner that Im working in it for, has a Digitrax Zepyhr System, we understand he can run one DC locomotive on this DCC system. He would like this loco to be that one. I would like to put lights in it for him 

So with this additional information, has my situation changed? If not, where do I get these resistors and LED's :dunno:


----------



## MISTER ANDERSON

RadioShack/fry's electronics/Microcenter for something local depending on location. Superbrightleds.com for best selection/prices online. Warm white is a very close color to the old incandescent bulbs they will be replacing


----------



## I Am Fasha

Thanks for the reply MISTER ! I believe you have lead me to the root of my problem, I just don't understand electronics :dunno:

Do I need to have a lot of "highly technical info" or just walk into Radio Shack and say "I need a half dozen 3amp warm white LED's and half dozen 1k resistors" ?


----------



## MISTER ANDERSON

Figure what you need, and then ask where the items are located. They are usually in the back of the store in drawers.


----------



## gunrunnerjohn

Truthfully, I probably wouldn't buy them at Radio Shack. For directional lights, you just need to use track power. The LED, a suitable resistor, probably in the 470-680 ohm range, and a diode to protect against reverse voltage on the LED. Since for DC use the track power reverses for direction change, just wiring the LED/diode in the correct polarity will accomplish directional lights. For steamers, you can also use a bridge rectifier for headlights so they're on all the time, and use the directional light for the tender reverse light.


----------



## I Am Fasha

Ok more good info guys and for that I thank you. Forgive me, I am slow to learn. I will post a pic of the loco that I wish to do this on. If someone can point me in the right directions as to where Im suppose to attach these things, that will be help. 

Here is the loco:


----------



## ktcards

gunrunnerjohn said:


> Truthfully, I probably wouldn't buy them at Radio Shack. For directional lights, you just need to use track power. The LED, a suitable resistor, probably in the 470-680 ohm range, and a diode to protect against reverse voltage on the LED. Since for DC use the track power reverses for direction change, just wiring the LED/diode in the correct polarity will accomplish directional lights. For steamers, you can also use a bridge rectifier for headlights so they're on all the time, and use the directional light for the tender reverse light.


I'm curious how a diode protects the circuit from reverse voltage. After all a LED is a light emitting diode and to add a second diode will either have no effect or turn the light off completely. And a Full Wave Bridge Rectifier is a bridge made from four diodes in a convenient case.

K


----------



## gunrunnerjohn

ktcards said:


> I'm curious how a diode protects the circuit from reverse voltage. After all a LED is a light emitting diode and to add a second diode will either have no effect or turn the light off completely. And a Full Wave Bridge Rectifier is a bridge made from four diodes in a convenient case.
> 
> K


That's because you haven't read the spec sheets for common LED's. The reverse voltage specification runs from around 5 to 7 volts, much lower than they might see in this application. The common silicon diode has at least 50V or much more reverse voltage capability.


----------



## DonR

John didn't say where to buy the electronics if not Radio Shack, but
most likely they will be a handy source in most towns.

You'll want 1/4 watt (or 1/2 watt) resistors depending on availability,
one for each LED. You'll also want 2 small diodes. Maybe 4.00 total
if that much.

The loco already has a light doesn't it? If so, simply remove the
fixture. Connect one LED long wire in series with the diode.
(LEDs come with one wire longer than the other this
is where positive leads go). The other wire to the existing
light connects to the short LED wire. Then connect the other (backup)
LED, resistor and diode the opposite of this. Connected that 
way the headlight would burn when loco goes forward and
the backup when in reverse. Brightness, however, will vary
with engine speed. Which is one of the reasons we like DCC.
The lights stay on same brightness even
when stopped. 

If the existing bulb has only one wire, it will get the other
side of the circuit from the frame. You will do the same using
the method above.

Don


----------



## gunrunnerjohn

If you buy them onesie-twosie, Radio Shack is probably an OK choice if they have them. I get MUCH cheaper prices at Mouser and Digikey for any kind of quantity. I also buy bulk LED's on eBay, I usually only pay a couple of cents apiece for them.


----------



## DonR

ktcards said:


> I'm curious how a diode protects the circuit from reverse voltage. After all a LED is a light emitting diode and to add a second diode will either have no effect or turn the light off completely. And a Full Wave Bridge Rectifier is a bridge made from four diodes in a convenient case.
> 
> K


A diode passes current in only one direction. So it blocks a reverse current
automatically. The LED lights when it gets a DC current but it must be
wired correctly so that the long wire gets +. A diode in the plus
circuit permits only + and the LED lights. If source polarity is reversed the
diode does not pass the - so the LED remains dark. That's how
directional lights work on DC tracks. The resistor
in the circuit is to limit the voltage to LED specs.

Alternating current, AC. does as it's name says: Every cycle of the 60 has
a DC plus and a DC -.

A bridge rectifier creates DC from AC by sending all of the pluses of
the sine wave thru diodes to become the + of DC while the other diodes 
in the rectifier pass the - Thus you have DC current with a + and a -.

I use diodes to create a cascade matrix for my yard turnouts twin coil
motors. I press a panel button for the destination track. All turnouts
in the route are set to give a clear path. Diodes pass the current from that button
to the next turnout, and so on through the route. The diodes block
back feeds so only necessary turnouts are thrown.

Don


----------



## gunrunnerjohn

DonR said:


> A diode passes current in only one direction. So it blocks a reverse current automatically.


See my previous post, only up to it's reverse voltage specification. If it exceeds that by a sufficient amount, it breaks down, that's usually a one-time event. 

I grabbed a typical LED specification, most are very similar.


----------



## blvdbuzzard

Here are few pictures of the Aethern BB GP-35 I did. I just bought the 12v bulbs. I may use the LED's in the future but I found the bulbs at the LHS so I picked them up.

I did have to paint the bottom of the cast piece for the lights and number boards black to keep the light out of the cab. I used (2) bulbs for the rear, (1) for the top lights and number boards and (2) for the other front lights.

The board I used is a Digtax DCC module. Took about 25 minutes or so to hook it all up.


So yes it is an easy to do project.

Buzz.


----------



## I Am Fasha

Okay, if Im reading this right, (and ty to all that have replied!!! Im understanding this so far :smilie_daumenpos, Once I identify the source for the + where the exsisting bulb gets power, and then identify - for the same bulb, can I also do the reverse wiring for the other blub to these same points? 

So if front bulb is #1 and I run the long wire to the positive, at that point I can run the - wire of Bulb #2 to same point and solder? Thus running the long wire of Bulb #2 to the - of Bulb #1?


----------



## gunrunnerjohn

Remember that LED's require current limiting, so you'll need a series resistor unless they're running from a current limited power source. If you connect LED's reverse polarity in parallel like that, the bonus is the LED that is lit provides reverse voltage protection for the unlit one, so no regular diodes are needed.


----------



## I Am Fasha

gunrunnerjohn said:


> Remember that LED's require current limiting, so you'll need a series resistor unless they're running from a current limited power source. If you connect LED's reverse polarity in parallel like that, the bonus is the LED that is lit provides reverse voltage protection for the unlit one, so no regular diodes are needed.


So Gun, I think I follow what you just said. By running the two LED's together, in parallel like I described, one acts as the resistor, Correct?

So if I was running the same two LED's, on the same loco, but I wired them separate, I would need a resistor for each one, correct?


----------



## I Am Fasha

My journey continues, and so, could someone save me many "more" fuses, and tell me which setting to adjust this knob to, to use with this LED/DC project.

Headed to store to get more fuses now :smilie_auslachen:


----------



## gunrunnerjohn

You will ALWAYS need current limiting when using LED's. What I was saying about two connected in parallel with reverse polarity is they'll protect each other from reverse voltages, so you don't need a series diode to protect them. Of course, if they're connected as described, you only need one resistor, as only one diode will be active, depending on polarity.


----------



## I Am Fasha

gunrunnerjohn said:


> You will ALWAYS need current limiting when using LED's. What I was saying about two connected in parallel with reverse polarity is they'll protect each other from reverse voltages, so you don't need a series diode to protect them. Of course, if they're connected as described, you only need one resistor, as only one diode will be active, depending on polarity.


Okay cool! This resistor, where would I wire it? Does it go between the (+) and the point of contact or the (-)?

And this same resistor does it need to be a certain one, kind?


----------



## gunrunnerjohn

The resistor can be anywhere in the circuit. 

For the voltages and currents you'll encounter with model train lighting and LED's, a 1/4W resistor is sufficient. As far as the resistance value, that depends on the maximum voltage you expect to ever encounter. Also, you may want the LED's to run at less than the full 20ma they're capable of, many times I run them at much less current, especially for markers or class lights.

Rule of thumb, for white LED's, take the maximum voltage applied to the lighting circuit, subtract 3 from that, and then multiply the result by 50, that's the minimum value resistor you'll want to use. You can use a higher value, but not a lower value.

Example: I have 12 volts maximum track voltage and I want to light white LED's in a direction sensitive manner. Connect the LED's back to back as discussed, and subtract 3 from the 12 volts. Multiply the remaining 9 volts by 50 to get 450. For this application, for maximum brightness, I'd select a 470 ohm 1/4w resistor, it's the closest higher standard value 5% resistor value.


----------



## I Am Fasha

Okay that make sense, Ty Gun! I will eventully buy these online, but for now I will visit the local radio shack, armed with this info. I need to get anther fuse for my meter any way :smilie_auslachen:

Anything else I should know before I head that way?


----------



## gunrunnerjohn

Probably a lot you should know, but it doesn't come to mind right now.


----------



## I Am Fasha

All is good Gun, I really appreciate this site, this thread and the time those have taken to help me understand this project.

:appl::appl::appl::appl::appl::appl::appl::appl::appl:


----------



## golfermd

Basic Ohm's law still works: V=I*R (Volts = Current times Resistance).


----------



## gunrunnerjohn

golfermd said:


> Basic Ohm's law still works: V=I*R (Volts = Current times Resistance).


And here I thought it had been repealed.


----------



## I Am Fasha

:rippedhand:


----------



## DonR

Fasha

On your meter:

To read AC volts on the layout set it to 50, but if checking house current set it to 250.
Probe color doesn't matter with AC tests.

To read DC volts on the layout set it also to 50. The Red probe goes to the
plus + side when checking a DC circuit. The black to the - side.

To check for a short or circuit continuity set the ohms (omega sign) to lk in
most cases. The needle would usually go full scale if a short or if
the circuit is complete.

Be very careful to avoid setting it to read amps. That can cause a
short circuit. Ask me how I know this. 

A few minutes with that meter and you'll be a master electrician. 

Don


----------



## I Am Fasha

Thanks for the reply Don! Yep I have already blown the fuse, painting hopper cars today. Need to get to Radio Shack for a replacement fuse. Dont go anywhere, I may have more questions, well, Im sure I will 

Me = :dunno:


----------



## I Am Fasha

Gun, so lets revisit this project. This little loco will be run on a DC side of a DCC layout. So far, I just want to give him some headlamps that will work directional. 

Is there still away, to do this, but also widen out the number boards as you mentioned, and install additional 3mm LED's, but have those wired for constant power?


----------



## gunrunnerjohn

Sure, you can just put an LED behind the number boards and power them using a bridge rectifier and resistor, that will flip the polarity of the power to the correct sense for either direction. Same rules for the resistor apply to these LED's as well. I'd use higher value resistors for the number boards, you don't want them like headlights, so you need to "tone them down" to the proper intensity. I've been known to grind the front of the LED flat (or use flat LED's) and glue the front to a translucent white piece of plastic to disperse the light for stuff like number boards. If you have room, you can also use a 5mm LED ground flat to spread the light out for the whole number.

Finally, I use Liquid tape (black) to coat the rear so light doesn't bleed out and spoil the effect.


----------



## Southern

*Don't do it!* Just put a decoder in it and run it as DCC. yes you can run a DC on some DCC layouts. But you can't leave it stopped for long. i am not sure if the lighting will work the way you want it to running on DCC track with out a decoder. The power on the track is not true DC.


----------



## I Am Fasha

Southern!!!!!!!!!!!!!!!!!!!!:cheeky4:

I think I may have just figured it out, to a new point. LOL

I went by Radio Shack to get some replacement fuses for my meter and while I was there, looked in the LED drawl. I found the two pack below and grabbed them. (See pic below)

I then sat the loco on the track on top of some e z rollers, gave it some power and played with my meter until I found the positive and negative contacts for the light.

As it turns out, the copper band behind the light bulb is the positive and the silver metal piece up front is the ground. I touched the long lead of one diode to the copper and short lead to the silver and it lit up!!!!!!!!!!!!!!!!!:smilie_daumenpos:

But then it burned out, I held it there too long :smilie_auslachen:

So with one left, I decided to test what I have read in this thread. Leaving the loco running in same direction, I touched the short lead of the other diode to copper band (+) and long lead to the silver (-) and it didn't light up, I then reversed direction and touched them again and it lit up!!!!!!!!!!!! YEA!!!!!

But then I held it too long and it burned out again :smilie_auslachen:

So now I need to determine exactly what resistor I need to ask for and I think I will be in business. I believe I have a idea of how to wire this all up too. Can I just spot solder the wires to this copper band and to the silver band and then run them to the leads?


----------



## gunrunnerjohn

You MUST have current limiting for LED's or they'll only live a short time, like seconds! In any case, once you've overloaded them, even if they survive, they're likely to fail fairly soon.


----------



## I Am Fasha

So what would be a good resistor to use with the bulbs I pictured above? A 3 amp?


----------



## gunrunnerjohn

Resistors are not rated in amps. Check the previous post in this thread: http://www.modeltrainforum.com/showpost.php?p=235162&postcount=24


----------



## I Am Fasha

Awesome Gun! Thanks for the reminder. With all I had going on last night, I had read that, but forgot about it. Quick followup question. Doe the color of the LED matter? Reason I ask, radio shack is out of all colors but red, these red ones are my ginnie pigs


----------



## gunrunnerjohn

Yes, color does matter, at least a bit.

Red, Yellow, and Green LED's are typically 1.5 volt units. White and blue LED's are normally 3 volt units. So, when doing the computation, you have to take account which specific version of LED's you are using.

Rather than pay Radio Shack prices, why not get a bunch of the right LED's, you'll end up spending a lot less money.


----------



## I Am Fasha

Thanks for the additional info Gun! Good point on saving money, I intend to buy them like that in the future. I'm just getting these in my hands as we go through this and I learn what I'm doing. Sort of "striking while the iron is hot". Reading these post and applying what I'm learning. :smilie_daumenpos:


----------



## gunrunnerjohn

Have you reached the post where you need current limiting for LED's?


----------



## I Am Fasha

gunrunnerjohn said:


> Have you reached the post where you need current limiting for LED's?


:dunno: w h a t . . .


----------



## gunrunnerjohn

I Am Fasha said:


> :dunno: w h a t . . .


That keeps them from going up in smoke.


----------



## I Am Fasha

Then I think we should have this discussion sir! :thumbsup:

Let's keep it basic so I dont get confused. How does these current limiting LED's work, compared to not current limiting LED's?


----------



## gunrunnerjohn

Again, look at the previous post about adding the resistors.


----------



## tr1

*relativly a simple dc ckt.*

I can't help you here, for I have yet to do this, however it's some what straight forward. May I suggest, have the the local hobby shop do the first one, and then follow their
lead. Regards,
tr1


----------



## I Am Fasha

Thanks for the reply tr1! I've got in the local area, owner is a butthead and I drive by his to get to the other, bit it is so far away. I've learned quite a bit since this thread started


----------



## tr1

*I'm Fasha, Please referance here*

I like to add a little something here Sir. If I may? Purchase a bread board for simple dc circuit design.
It may help you in in your determination of the value's of your current limiting resisters
A multimeter will definitely help also to determine your ohms of resistance of your resisters. A color chart for the color codes found on the resisters. Good luck with electronic principles.
Regardstr1


----------



## DonR

Fasha:

GRJ is the brain when it comes to electrical circuits.

But he didn't mention that there is a handy dandy little
web site program that very easily tells you what resistor you
need for whatever LED you use and whatever voltage
your power source may be.

Here it is:

http://www.led.linear1.org/1led.wiz

You will possibly need to convert amps to miliamps A to MA
to use it.

Here is an example: 0.0125 Amps = 12.5 Miliamps
(and the reverse of that)

Each LED package will show DC voltage and current draw, usually in miliamps.
Use that data in the form along with the voltage of your power source
and the form will give you the value of the resistor you need.

Don


----------



## gunrunnerjohn

Color codes are easy.










With standard LED's, they run on 20ma maximum current. 


Take the operating voltage of the LED, figure 1.5V for red or green, and 3V for white or blue. 
Subtract the operating voltage of the LED from the max DC supply voltage and then multiply that result bo 50 and that's the minimum value of resistor you should use. 
Higher values are OK, lower values will push the LED past it's operating current specification.


----------



## I Am Fasha

By all means, please do, I have never heard of a bread board. Is there on you use that you like more than others? If so, please post a link to it here.


----------



## gunrunnerjohn

Here's a very popular type of breadboard, I use one of these from time to time to test circuit ideas.


----------

