My newest dumb question is this: what formula do I use or whatever when calculating what type of resistor to use with an LED, how do I hook it up and why do I need it in the first place? As far as electricity goes, I know just enough to be dangerous.[:D]
The reason I’m asking is that not only would I like to switch over a couple of locos to LED headlights (especially N scale locos whose headlights suck), but I would also like to explore the possibility of using LED’s in streetlights, building lights, crossing lights, etc.
Ohms Law is used to calculate the value of resistor. LED’s are polarized, and must be connected to correct polarity.
For installation as a headlight in a locomotive, you must have additional circuitry in the form of a bridge rectifier to insure that the correct polarity is applied to an LED regardless of track polarity.
Newer locomotives with constant lighting boards in them already have the required diodes to maintain polarity. If you are running DCC, the decoder takes care of the polarity issue for you.
Ohms Law states that the Resistance necessary equals the required Voltage subtracted from applied Voltage, divided by Current, or R=E/I. Most LEDs draw 30mA of current and are rated for 1.2 to 1.5 Volts, so the value of resistor needed for them, assuming a power pack output at full throttle of 14 Volts DC, would be calculated by subtracting 1.5 from 14, or 12.5 Volts that needs to be dropped by the resistor. So R=12.5 divided by .030, or 416 Ohms. Resistors don’t come in this rating, so a 500 Ohm would be used. Since the current draw of the LED is so low, a low Wattage (1/4 Watt) resistor would suffice.
Polarity of an LED is determined by looking at the leads on the back – the longer lead is positive, and the shorter is negative. If you wire it backwards, it just won’t light.
For building lights, you’re probably going to need the super-bright LEDs, because the average ones are known as “point source” meaning that they emit a very narrow beam of light that is insufficient to illuminate the interior of a building unless you use several of them. Most point source LEDs don’t come in a color that would be good for building illumination, either.
Your knowledge of electricity in pretty much on par with mine. Neither N or HO headlight bulbs look very good in locomotives.
I just recently switched to DCC and changed out the headlight in both my 2-8-2 Mike and my Alco S1 switcher. Wow! What a difference! The 2-8-2 already had a LED in it but it was “green”. (Not exactly prototypical.) I used 3mm “golden-white” in both. They really light up the layout now. (You can see a few pics on the link at the bottom of my post.)
As far as the calculations are concerned, I’ll have to defer that to others who are much more knowledgable on the topic. What I do know about LED’s is this:
-LED’s are diodes and current only goes through a diiode in ONE direction ONLY.
-Current can travel through a resistor in either direction and can be soldered to either lead of the LED.
-The longer lead of the LED is called the anode (positive); the shorter, the cathode (negative).
-The anode is connected to common (blue wire)); the cathode, to ? (white or yellow wire).
-The white is for the front headlight; the yellow, the rear light.
-The resistor is needed in-line to drop the voltage down low enough so that the LED won’t blow.
-LED’s are intense and put out quite a bit of light. They are eighter ON or OFF.
Ray, for general lighting on a layout, I would suggest using a “softer” lighting like incondescent lighting - as you can use a spare to power pactk to adjust the voltage and brighten or dim the lighting, as desired. The bulbs also come in a variety of sizes to fit both the structure the lighting will be used on, as well as help set the mood you are trying to achieve for your layout.
Ray, I just gave you pretty much all I understand on the topic…so far. Hope that helps in some way.
To put it into a formula (just substitute the values fromt he LED’s specs, since different types of LEDs have different voltage drops and maximum current limits):
Power supply voltage - LED voltage drop / desired current = resistance needed
Volts/Amps = Resistance in ohms
Note that the current leisted for an LED is the MAX - exceed that and the LED will be destroyed. Better to run at about half the max - ie if the LED specs says 30ma, calculate based on running it at 15ma. For the calculation above - 15ma = .015amp, so for 14v track power and an LED with a 2.1v drop, it would be:
14-2.1/.015 or 11.9/.015 or 793 ohm. Closest dtandard value to that is going to be 820 ohms.
For locos, I prefer the Golden White LEDs - at least for first generation diesel and steam power. Looks more like the 32v incandescent bulbs used. Modern diesels probably look better with Sunny White or even plain White LEDs, like the brighter modern halogen sealed beam lights. For DCC I’ve used 1K resistors for the Golden Whites with no problems, plenty bright enough and they are runnign at the low end of their current limits. Most white LEDs drop around 3.5 volts, not the 1.6-2.1 common to typical red, green, and yellow LEDs. Always check the specifications though.
For streetlights and building lights - a regulr white LED will give an appearance sort of like flourescent lighting. It would look good in a store or office. Or light int he basement of a house - the homeowner might have a model railroad down there!
As rrinker says, the current stated for an LED is the maximum. You’re safer at a lower current. I usually operate LEDs at 15 mA, and I’ve run them as low as 10 mA without a noticable decrease in brightness–I’m just talking about the garden variety red LEDs here. Different coloured LEDs will have different brightness at the same current. Normally red ones are brighter than green or yellow, so if you are using them near each other, say for panel indications, you’d need to lower the current on the red ones to match the brightness of the others. There are also different varieties of LEDs, like super-bright and super-low current. I plan to do some experiments with some 5 mA LEDs to see if I can successfully drive them directly from CMOS logic without having to use a driver transistor. I think it should work.
Another alternative is if you are like me and to lazy to do calculations. Loy’s Toys sells a resistor selector box. It allows you select different levels of resistance to be applied to any bulb you clip to it. You can the adjust resistance until the desired level of illuminations is found. I use it to determine resistnace level for LED’s before installing them in locos.
Just don’t forget to start at the HIGHEST setting when using a subsitution box! [banghead]
The only downside of using one for LEDs is, LEDs don’t give any warning that one more step will be too much - it just looks ok, looks ok, looks ok…POOF. If you hook a meter in series with the LED - then you can proceed with some indication about what’s going on. Even an inexpensive meter will have a 20ma and 200ma range to use for this.
Randy, that project was put on the shelf about a year ago so I’ve forgotten what ICs I was planning to use. It’s going to need revision anyway when I dust it off because I’ve decided to go with 2-colour LEDs in the new control panel for turnout indicators.