Articles - LEDs
04/23/2011

How To Connect LEDs

External Reference:
A standard, one-color LED has two leads. Typically, one is longer than the other. The longer one is the anode (to be connected to the "+"), the other is the cathode (to be connected to the "-"). The anode (the longer lead) should be connected to the positive lead of the circuit, and the cathode should be connected to the negative or ground lead. If both of the LED's leads are the same length (which sometimes happens if the LED is removed from a circuit or the leads shortened to make it fit), then look for a flat side at the bottom of the LED's case. Look at the LED straight on from the top and you'll see one edge is not round but flat. The lead nearest the flat edge is the cathode, or negative lead.

How To Insert LEDs Into a Circuit

Never connect an LED directly to a power supply; it will self-destruct. Always have a resistor in the path so that the current through the LED can be controlled. This resistor is called a "current-limiting" resistor. An LED by itself will happily take whatever current the circuit has to offer; until it self-destructs. This happens in a matter of a second or less!

How To Calculate The Current-limiting Resistance

External Reference:
Because of the current-limiting resistor, you can control the amount of current the LED is allowed (call it "portion-control"; we want our LED to be on a steady diet so that it doesn't starve and doesn't overeat). The side-effect of controlling the amount of current going through an LED is that the amount of light it emits can be controlled. The less current, the dimmer the light. The more current, the brighter the light. Again, too much of a good thing here, i.e. current, and the LED will blow. Sometimes an application calls for a very bright scenario, and sometimes you want a dimmer LED.

If you have done anything relating to electronics, you will be familiar with Ohm's Law. Ohm's Law states that voltage is equal to current times resistance (V = I * R), where V is voltage (in volts), I is current (in amps), and R is resistance (in ohms). We will use this Law to calculate the size resistor we need for a certain brightness.

When you buy a new LED, the manufacturer will provide some key information about the LED on the package or in electronic format via a PDF file on their web site. Different from a regular diode, an LED can have completely different parameters based on its light color. Different chemical components are used to produce the white, gold, yellow, red, green, blue, etc. colors that are currently available. These have different parameters in normal operation. So, be sure to read the information about the specific LED you are about to use.
In our example, let's assume that the LED "consumes" 3.4 volts from the circuit to run it (should be stated on the package). Let's also say that the LED's maximum current is 20mA (i.e. 0.020A), which is generally stated on the package as well. Finally, we assume we have a standard 12-volt power supply which we wish to use to run our LED. We are going to assume a simple circuit that turns on the LED when the power supply is plugged in to the wall. To prevent the LED from burning out or aging rapidly, we are only going to provide it with 10mA of current (0.01A), which is a good, safe number to shoot for initially. In the above formula Vps is the voltage of the power supply (in my sample that's 12 volts), and Vdrop is the LED's rated voltage drop. So, connecting a 860ohm resistor between the positive lead of the power supply and the positive (anode) lead of the LED will allow 10mA of current to run through the LED. You will want to find a resistor whose value matches that calculated number as close as possible. You can experiment with smaller and larger values to achieve the desired brightness (i.e. raise or lower the current from the initial 10mA starting point).
LEDs
External Reference:
This is a somewhat dated paragraph since it seems that most manufacturers are now using LEDs as standard equipment for new locomotives. However, you may have some older engines that still use miniature lightbulbs. When those burn out, or when otherwise desired, you can replace them with an LED and resistor combination. Simply use the maximum track voltage and the desired current through the LED to determine which resistor to use. Even though your new engine may have an LED for its headlights (and/or ditch lights), it may not be of the color that you desire. Again, you can replace them. Just make sure that you adjust the resistor if the LED has significantly different specs than the one you are replacing. The photo shows three N-scale Kato E8 engines with different 3mm LEDs. The one in the center came from Richmond Controls.
LEDs
External Reference:
Since about 2010 I have been using SMD (surface-mount) LEDs. These are very, very small LEDs, but have an incredible brightness. These can also be had in various colors, but some research and experimentation may be required. I bought my first batch from Ngineering, because the company has already figured out which ones are best for scale locomotive use. However, if you are going to convert a lot of engines (and, in my case, structures), you may want to look at other bulk-purchase solutions, because they can be quite a bit cheaper that way.
LEDs
I built this S-scale kit of a PRR RS-1. I put these SMD LEDs in the headlights of the engine, as well as under the roof to light up the interior. This is a black-n-white photo I took of the model on my layout, but it clearly shows the LEDs in action.
LEDs
External Reference:
Here's the cab roof before assembly. I glued the SMD LED to the roof after soldering magnet wires to the LED (not a trivial task). However, the wiring is very well hidden on the inside of the cab.
LEDs
I've also been using these SMD LEDs on structures. This one shows one glued inside the lamp fixture of the an S-scale building.
LEDs
There are two LEDs on the inside of the building to show off the interior detailing, and there are also three LEDs on the outside. The photo was taken with the full layout lighting turned on.
LEDs