Installing LEDs with DCC Decoders

DCCWiki, a community DCC encyclopedia.

Thanks to Don Fiehman for drafting these handy tips for using Light Emitting Diodes with Digital Command Control.

This series of tech notes is designed to help modelers with DCC decoder installation. This note covers using LEDs (Light Emitting Diodes) with DCC decoders and signalling.

Also see the LED Lighting and Resistors page for more information.

Why Light Emitting Diodes?

Electronic Symbol for a Light Emitting Diode

When installing lighting in a locomotive you have a choice of either incandescent lamps or solid state Light Emitting Diodes. There are reasons to chose one over the other. Factors to consider are life, cost, size and ease of installation. Incandescent lamps have been with us for a long time. Light Emitting Diodes are newer and the technology of LEDs is changing for the better.

The first visible light emitted by Light Emitting Diodes was red in colour, followed later by yellow and then green. In recent years white LEDs have also become available. The first white LEDs had a blueish tint that did not look like an incandescent locomotive headlight. Recently the Golden-White, Yeloglo and Sunny-White LEDs have changed this. These new LEDs produce colors that are closer to that of an incandescent lamp. These new LEDs are now installed in some of the new locomotives, supplied with some decoders and available through many model railroad suppliers. The cost of LEDs is just a bit more than lamps, but well worth it over time. When installed correctly an LED will outlast the locomotive.

Various LED packages

LEDs are available in different sizes. They run from the jumbo at 10 mm in diameter to a very small “chip” size (known as surface mount devices) that mounts on circuit boards.

The common sizes are 3 mm and 5 mm. The 3 mm is the best for HO headlights. LEDs are available in range of colors. Red, green, yellow, blue and white are the common colors. The LEDs that are made to resemble the yellow-white appearance of color of an incandescent lamp are the Golden-White, Sunny-White and Yeloglo.

The Golden-White is made with an amber colour epoxy that filters out some of the blue light. OK when on, but shows the amber colour when off. The Sunny-White and Yeloglo LEDs have the incandescent appearance when lighted and clear when off.

Lamps vs. LEDs

The LED has many advantages over lamps. LEDs have a life expectancy rated in years and not hours as a lamp. LEDs are better at producing light. Lamps produce heat and some light, LEDs produce light and some heat! The light from a LED is much less sensitive to changes in voltage and current than lamps. The maximum current rating of most LEDs is 20 mA (milliamps). The light output from a LED is almost constant from about 5 mA to the maximum (about 20 mA).

Please note-- although many LEDs are designed as shown in the diagram below, make sure to check the specifications for -your- LED before making connections!

LEDs Require the Correct Polarity

2000px-LED, 5mm, green (en).svg.png

Note that the cathode (negative lead) is next to the flat spot on the package, and if you hold it up to the light, the cathode is the large element that looks like an anvil. The Anode (positive lead) has the longer lead.

The light from a lamp is not focused and is good for passenger cars and buildings. When installed in a locomotive they put out some light through the headlight and in many cases end up also lighting the interior of the cab. LEDs produce a beam of light like a flashlight. This is why they work so well in the new LED flashlights. This is also why LEDs work so well for headlights, signals and panel indicators. In a darkened layout room an LED headlight can light up the area in front of the locomotive like a prototype headlight.

One problem with LEDs is they do not respond the same as lamps. LEDs turn on and off almost instantly. Lamp filaments must heat up and cool off. This does not affect their use as a headlight or strobe light, but LEDs behave differently when dimmed or used with special lighting effects. The response of the LED versus a lamp may not be satisfactory with things like dimming and Mars lights.

LEDs are semiconductors, in fact they are a specially made diode. At some point, they will just switch off as the voltage and current is reduced. A certain level of energy is needed to begin and maintain conduction through the diode.

To compensate for these differences when using special lighting effect many of the newer decoders have provisions to let the decoder know it is operating an LED. This is typically a bit in a CV (configuration variable) that controls the special lighting. When set, this bit changes the output characteristic to match the LEDs. This lets the LED appear to response like an incandescent lamp. I checked one of these decoders and found that for “Rule 17" dimming the power was reduced to under 10% for the LED and only 35% for a lamp.

Wiring LEDs

Install-led-02.gif

The LED is a Light Emitting Diode, and as a diode, polarity must be observed when it is installed. The electrical schematic above shows the standard symbol for an LED: the arrowhead, bar, and emitted photons (the tiny arrows). The arrowhead is the anode(A), the bar is the cathode (K), and when operating, the anode is more positive than the cathode so the arrowhead shows the direction of conventional current flow when the LED is illuminated.

Decoders have a common connection (BLUE) to provide power to all the function outputs. The common positive and function outputs are negative. One resistor is needed for each LED connected to a function output. If you have two LEDs that will be controlled by the same function the LEDs can be wired in series and share the same resistor. LEDs work better in series than in parallel because the same current flows through both LEDs. I have used up to 3 LEDs in series with a 1K resistor. (Two red for rear markers and one white for a headlight.) The resistor can be connected to either lead of the LED.

When you solder wires to an LED it is a good idea to use a heat sink between the LED and the solder joint. A heat sink can be a long nose pliers with a rubber band around the handles. The rubber band will keep the pliers closed and trap the heat before it gets to the LED. Hint: If you are using heat shrink tubing on the wiring, slide the tubing over the wires before making the connection.

Unlike an incandescent lamp, a LED does not generate much heat. This simplifies installation in a plastic body shell. The LED can be mounted directly to the plastic body shell without fear of damage to the shell due to heat from the LED.

When connecting an LED to a decoder a resistor must be installed in series with the device. The purpose of this resistor is to control the current (IFWD passing thru the LED. Without the series resistor, when voltage is applied to the LED, there is nothing to prevent excessive current from burning out the diode. The resistor value is selected to limit the current to a safe amount, while creating a voltage drop. The voltage drop is needed to prevent the diode from burning out when voltage in excess of its VFWD is applied across the diode.

Different color LEDs present slightly different voltage drops (VFWD) across the leads of the device, in most cases those differences can be ignored. Unlike lamps that require you to select a value of resistor to match the lamp, selection for LEDs is easy. Without a series resistor to limit the current passing through it, and the LED burns out in a flash.

If the resistance is too low, the LED burns out, and if it's too high, the LED will not illuminate. But luckily, the range between "too low" and "too high" is quite broad. And unlike incandescent lamps, an LED's brightness is relatively insensitive to current variations. So between "too low" and "too high", altering the resistor value will have little effect on the LED's brightness.

A 1kOhm (1000 Ohm) 1/4 Watt resistor works fine with 10 to 14 volts on the rails. If using more than the standard 14 volts use a 1/2 watt 1K resistor. If space is at a premium even a 1.5K Ohm 1/8 Watt resistor will work. Up to 3K can be if the LED is too bright.

See Ohm's Law.

See also LED Lighting and Resistors for a generic example.

Signals and Indicators

Another application for LEDs are signals and as panel indicators. The colors used for signals are green, yellow, red and in some cases even blue. Over 30 years ago I installed many colored lamps in a control panel. LEDs were new, but I did install a few in the panel. I also used bicolor LEDs for searchlight signals. The coating on many of the lamps has faded over the years, but the LEDs are a bright as the day they were installed. In control panels the 5mm works best for me. For signals the 3mm size works best in HO. A voltage dropping resistor is needed in series with the LED in most applications, The 1k resistor should work for 6 to 14 Volts DC.

The bicolor green-red LED not only produces a nice green and red color by switching the polarity for a searchlight signal, but can also produce yellow. Yellow is made by turning on both the red and green LEDs. To accomplish this alternating voltage (AC) is fed to the LED. The eye will be tricked into looking like yellow.

You can also use a bicolor LED to monitor the status of the track power. Normally it is a yellow/amber, a distinct red or green indicates a DC output bias and may be indication of a malfunction.