LED Lighting and Resistors

DCCWiki, a community DCC encyclopedia.
(Redirected from LED)
Blue, green and red LEDs.
Construction details
An SMT LED, useful in tight spaces and for ditch lights
A variety of LEDs with a clear lenses. Tamiya Clear Yellow paint can simulate an incandescent lamp when applied to a white LED.

Light-Emitting Diodes (LEDs) are solid state light emitting devices known for their low current draw (typically 20-60 milliwatts) and long lifespan (100,000 hours). They will burn out if too much current is allowed to flow through them.

An LED is a diode, therefore current can only flow through it in one direction.

A common application is replacement of lamps or additional lighting effects. While LEDs are available in a variety of sizes and colours, white LEDs do not look like incandescent lamps. The preferred colour is Sunny White. It is also possible to tint the lens of a white LED to get the correct effect.

Light Emitting Diodes and Series Resistors

An LED is a current controlled device. In most applications related to Digital Command Control, a simple, low cost resistor is used to limit the current flowing through the LED. For more exacting applications a controlled current source would be used instead of a resistor.

LED+Resistor Diagram

The LED is a semiconductor device that will burn out quite quickly if its specifications are exceeded.


The following explains how to wire an LED for your model train or layout without letting the magic smoke out of the LED.

In this example, our LED specifies a forward current of 20mA (milliAmps) at a forward voltage of 2 volts. We will be wiring the LED from a power source, and using a resistor to limit both the current and the voltage. (Always read the spec sheet for your LED as it will have the details you need to calculate the series resistor.)

Voltage from one end of a string of devices in series (like the LED and Resistor, above) to the other is divided among the items in the series, in proportion to their resistance. Assume that the voltage source is 9 Volts DC. Since the voltage across both devices is 9 Volts, and the LED is rated for 2 volts, the voltage drop across the series resistor must be 7 volts.

Since the current through two devices in series is the same through both devices, and we want the maximum current through the LED to be 20 mA, the resistor must drop 7 volts at a current of 20mA.

Ohm's Law

We need to calculate the Resistance of the resistor. Ohm's law tells us how Voltage, Current, and Resistance in a circuit are related. The 3 variables are:

  • Voltage (measured in Volts, represented by the letter V, or it may be E.)
  • Current (measured in Amperes, represented by the letter I ('eye'))
    • (don't ask why it's not A)
  • Resistance (measured in Ohms, represented by the letter R or the symbol Ω)

The law says that V=IxR. This can be re-arranged to say I = V/R or R = V/I. This 3rd form is the one we want:

Resistance = Voltage / Current Ohm's Law Excerpt

The math:

  • R = 7 Volts / 20 milliAmps
  • R = 7 Volts / .020 Amps
  • R = 7/.020
  • R = 350 Ω (Ohms).

So, we need:

  • LED, forward current: 20mA, forward voltage: 2V
  • Power supply: 9VDC
  • Resistor, 350 Ω

The next step is to choose a resistor with a value of at least 350 ohms. (You may see this value written as 350R.)

Resistors are only available with certain standard values. Standard values near 350 Ω include 330, 360, and 390 Ω. Due to manufacturing processes, resistors are manufactured with 5, 10, or 20% tolerance. The tolerance means the value may vary ±5%, 10% or 20% from the stated value. Many of the resistors you see today will be 10% or better tolerance, as the old carbon resistors are no longer manufactured.

With a manufacturing tolerance of 10%, a 390 Ω resistor could be anywhere from 351 to 429 Ω. If the value is precisely as marked, a 390 Ω resistor would limit the current to 7/390, or 18mA. This is below the 20mA maximum for the LED. At the lower extreme (assuming a worst case value of 351 Ω) the maximum current would be 20mA.

Don't forget-- the ratings for the LED are the MAXIMUM values! Limiting the current to less than 20 mA or reducing the voltage will extend the life of the LED, just as running a light bulb at less than rated voltage will extend its life! And, just as in a light bulb, reducing the current or voltage will reduce the brightness of the LED.

Also remember that if a power supply isn't supplying a full load, the rated output voltage is often exceeded! So you may need to calculate the resistance based on a higher than rated voltage, and a lower than rated current.

Wiring Multiple LEDs

When wiring multiple LEDs in a circuit, it is best to connect them in parallel, each with its own series resistor to limit the current. In this case, the power source must be able to supply enough current in total to insure each device gets enough current. Ten LEDs at 20mA each would need a total current of 200mA.

Large numbers of LEDs can be powered by a lower current power source by multiplexing them. Each LED is rapidly switched ON, then OFF, but to the human eye, it appears to be constantly lit. For the additional complexity of the driver circuits, a larger power supply is simpler.

Why Can I Not Use a Single Resistor for Multiple LEDs?

You can, but you really should not.


  • Ten LEDs in parallell, 20mA IFWD. VFWD is 2V.
  • Power source is 12V.

There are two components to this circuit:

  • Ten LEDs in parallel, VDrop = 2V, ILED = 20mA × 10 = 200mA
  • Series Resistance: VDrop = 10V, IResistor = 200mA.

Ohms Law says RSeries = V÷I. 10 ÷ 0.2 = 50Ω

Should one LED fail, the current flowing through RSeries will still be 200mA to maintain the 10V drop. ILED is now 200 ÷ 9, or 22.2mA.

Not all LEDs are alike. Some may flow more current, others less. So one might be flowing 25mA, until it fails. Now you have 8 LEDs remaining, flowing on average 25mA. When another fails, it becomes 29mA...

LED Parameters IFWD and VFWD are nominal, not absolute values for a specific LED. These values vary by batch, and by individual LED.

Identifying the Anode and Cathode

Identifying the Anode (A) and Cathode (K) can be easy with some LEDs. The typical LED with the coaxial leads has a flat spot on the package, and a shorter lead, which is the cathode. The positive lead (Anode) is the longer lead.

Another technique is to hold the device up to the light so you can see the internal structure. The cathode (or anvil) looks like a flag.

Surface Mount Devices

Surface Mount Devices are very small components. By eliminating most of the packaging, the component can often be made smaller, which means less cost for packaging it, and higher board density at manufacture. SMT LEDs can be used in tight spaces. They may or may not come with leads.

To identify the K cathode, there may be a stripe (like a diode), a dot, or a chamfer on one corner of the package. If not, there may be a dot printed on the underside of the package. As always, consult the data sheet for the device if you are unsure.

Another type may look like a little button, with three leads, two long ones and a short one, with a hole. The two long leads are the anode and cathode. The short lead, or tab with the hole, is part of the lead frame. The lead opposite it is the cathode. The lead next to the tab is the anode. As always, check the data sheet.

Why is the Cathode marked with a K?

The terms Anode and Cathode go back to the vacuum tube diode. The Anode is the positive connection which is in turn connected to the B+ power supply connection. The Cathode was usually grounded, and marked as K on schematics. The K was used, as C was already claimed to indicate a capacitor on a schematic. The term C- referred to the control grid voltages used in an amplifier.

These terms also resulted in the A, B, and C designations for batteries. The A cell was a large 1.5V cell (about the diameter of a D cell but about four times longer) that supplied the filament voltage, the B battery was 90V, connected to the anode, supplying the B+ voltage. Prior to the invention of the indirectly heated cathode, all radios were battery powered, using an A cell and B battery.

Failure modes

The most common way for LEDs to fail is the gradual lowering of light output and loss of efficiency. However, sudden failures can occur as well. When operated at, or just below their rated current (I.e. 20mA) an LED should last 100,000 or more hours before failure.

Other methods include:

  • Extreme current - Too high of a current will let the magic smoke out of the LED, causing premature failure.
  • Extreme heat - Caution should be used when soldering LEDS to a board or wires to the LED leads. It's recommended to use a soldering heat sink.
  • Electrostatic discharge - ESD may cause immediate failure of the semiconductor junction. Be sure to ground yourself and your workstation when working on any electronics.
  • Excessive Reverse Voltage - LEDs can be very intolerant of excessive reverse voltage. Diodes are designed to withstand a reverse voltage, and have a PRV (Peak Reverse Voltage) specified, but LEDs are not designed to be used as rectifiers.

Avoid the excessive current failure vector by using a resistor for each LED. This prevents increasing current if one LED fails, since a single resistor is calculated to limit the current with multiple LEDs connected to it. Two LEDs connected in parallel with one series resistor will flow 40mA of current, and the resistor will be half the size. Meaning it will allow 40mA through one LED should the other fail. See the above section on Ohm's Law.

LED Colours

The colour of a LED is important.

The first LEDs were Red in colour. Later, Green and Yellow LEDs appeared. For a number years, those were the only colours available, with Blue ones eventually appearing, and later still, White

For the examples below, a 5mm commodity LED is the norm for values presented.


Red, Red-Orange, and Orange LEDs are typically 1.7 to 2.4V at 10mA.


Green, and yellow-green, are typically 1.8 to 2.4V. Some green LEDs can be 3 to 3/5V.


2.8 to 3.5V. Early "blue LEDs" were in fact, small incandescent lamps with a blue diffuser. Later ones were true semiconductors and further development brought blue LEDs five times brighter than their predecessors .


True white-light-emitting LEDs do not exist. LEDs emit one wavelength.

White does not appear in the colour spectrum; instead, perceiving white requires a mixture of wavelengths. 

A trick is employed to make white LEDs: Blue-emitting semiconductor base material is covered with a converter material that emits yellow light when stimulated by the blue light, similar to a fluorescent light's construction. The result is a mixture of blue and yellow light that is perceived by the eye as white. The mixing of specific colour values is the principle behind colour television.

White LEDs exhibit a colour shift due to different concentrations of converter material, in addition to a change of wavelength with forward voltage for the blue-emitting InGaN material. So when changing the forward current, the colour balance of the LED with shift. This can be an issue if multiple LEDs are used. Also, dimming the LED will have some effect.

Reading the Data Sheet

Manufacturers and distributors of LEDs will supply a data sheet outlining their products parameters. There are a number of details you need to know. (These were taken from a Vishay white LED data sheet.)


Forward Voltage
Min Typ Max
2.8 - 3.6

Forward Voltage indicates the amount of voltage drop across the junction, which must not be exceeded.

Maximum Ratings
Parameter Test Conditions Symbol Value Unit
Reverse Voltage VR 5 v
DC Forward Current IF 30 mA
Soldering Temperature t≤ 5s TSD 260 °C

Two details are important: VR and IF. The maximum current, IF must not exceed 30 mA, and the maximum reverse voltage VR applied to the LED is 5V.

What the Data Sheet Tells You

As seen in the tables above, the maximum current is 30mA, and forward voltage is 3.6 MAX. For easy calculations, a nominal VF of 3.0V will be used.

Calculation Example

Power supply, VS will be 14V.

The forward voltage is 3V. Therefore the series resistor must flow enough current to develop a potential across it of 14 − 3 or 11V.

Using the value of 11V, Ohms Law says that R=V ÷ I, or 14 ÷ 0.03, which is 467Ω. Resistor values in this range are multiples of 4.3, 4.7, and 5.1. Using that rule, 470Ω is a reasonable choice, at a tolerance of 5% or ±24Ω. Since a lower value will cause more current to flow, the better choice is 510Ω, which results in a current of 22mA. This also gives a margin of safety.

If this LED will be powered by a DCC track signal, it gets more interesting. It will be exposed to a reverse voltage of ≈14V Note 1 when the phases switch, exceeding the 5V VR. To prevent that, a pair of zener diodes in series will be placed in parallel with the LED to protect it.

The zener diodes will be connected cathode to cathode, and this assembly is connected in parallel with the LED. The zener voltages are selected to be greater than the forward voltage of the LED, but less than or equal to the maximum reverse voltage. During normal operation the current flows through the LED, whereas during the reverse phase current can flow through the zener pair, limiting the reverse voltage seen by the LED. Data sheets for LED often have these protection circuit schematics.

This section also applies to layouts using Analog Direct Current for power.

Note 1: The DCC voltages on the track may be more than 14V. Measure it or estimate it to be greater than the amounts specified in the NMRA Standards.

Standard Resistor Values

Resistors are manufactured to standard values. The values and their multiples are as follows:

Standard Resistor Values, ± 5%
1 10 100 1.0K 10K 100K 1.0M
1.1 11 110 1.1K 11K 110K 1.1M
1.2 12 120 1.2K 12K 120K 1.2M
1.3 13 130 1.3K 13K 130K 1.3M
1.5 15 150 1.5K 15K 150K 1.5M
1.6 16 160 1.6K 16 16K 1.6M
1.8 18 180 1.8K 18 180K 1.8M
2.0 20 200 2.0K 20K 200K 2.0M
2.2 22 220 2.2K 22K 220K 2.2M
2.4 2.4 240 2.4K 24K 240K 2.4M
2.7 2.7 270 2.7K 27K 270K 2.7M
3.0 30 300 3.0K 30K 300K 3.0M
3.3 33 330 3.3K 33K 330K 3.0M
3.6 36 360 3.6K 36K 360K 3.6M
3.9 39 390 3.9K 39K 390K 3.9M
4.3 43 430 4.3K 43K 430K 4.3M
4.7 47 470 4.7K 47K 470K 4.7M
5.1 51 510 5.1K 51K 510K 5.1M
5.6 56 560 5.6K 56K 560K 5.6M
6.2 62 620 6.2K 62K 620K 6.2M
6.8 68 680 6.8K 68K 680K 6.8M
7.5 75 750 7.5K 75K 750K 7.5M
8.2 82 820 8.2K 82K 820K 8.2M
9.1 91 910 9.1K 91K 910K 9.1M

See Also

Also see this website for more information: SM LEDs.