Using LEDs in Coaches
Revised 01-15-12

new: Higher Voltage Option


Adding interior lights to passenger cars and other rolling stock can add interest and realism to your railroad.  Some coaches come with interior lights but many do not.  Adding them can be a challenge in terms of design, mounting and providing power.  This article will show a method that I have found to be very effective and easy to implement.

For our first round of tests let's start with these assumptions:

  • Lighting will be provided by "warm white" LEDs
  • The LEDs will be powered by 4 @ AA or 4 @ AAA rechargeable cells
  • 5mm diameter LEDs will be used
  • The LEDs will be mounted on the inside of each car's roof
  • As many as a dozen LEDs may be needed to illuminate a large G scale passenger car
  • The power will be turned on and off with a latching reed switch

White LEDs require at least 3 volts, sometimes more, to fully illuminate.  While 3 rechargeable cells (3 x 1.2 volts = 3.6 volts) can work my experiments have found that you can light longer strings of LEDs wired in parallel when using 4 cells (4 x 1.2 volts = 4.8 volts).  Four non-rechargeable alkaline cells will work if higher value current limiting resistors are used since 4 alkaline cells = 6 volts, quite a bit more than the 4.8 provided by rechargeables.  A 9 volt battery could also be used (with significantly less useful life than the AA and AAA cells) by increasing the value of the current limiting resistor to an even higher value.

5mm warm white LEDs give off light that is much closer to incandescent or other softer white light sources rather than the somewhat glaring blue/white light that is frequently associated with LEDs.  They are mounted so that their light shines directly down and will illuminate the coach nicely especially if the interior is painted a light, reflective color.  White or off white tissue paper can be mounted over the LEDs to disperse the light more broadly.  You can also change the dispersal pattern by drilling the LEDs as described in this article:

Spacing multiple LEDs close together and lighting the LEDs to less than their maximum brightness gives a better lighting effect than using only a few LEDs at high brightness.

While drilling a hole in the bottom of each car and mounting an on/off toggle switch is a good way to turn the power on and off a latching reed switch, mounted to the inside top of the coach roof, can be a better alternative.  See:  These unusual reed switches stay on or off after a magnet is passed over them.

Test Setup - LED Boards
The test LEDs are mounted on popsicle sticks.  Circuit boards could, and will, be used but using popsicle sticks is a great alternative when you are experimenting and don't want to wait for circuit boards to be fabricated!

Here is the test setup showing two LED boards, a resistor test board (in black) and 4 AA NiMH cells for power.  The three striped objects near the center are additional resistors that will be plugged into the sockets on the black popsicle stick to adjust brightness.

To make the LED boards drill six pairs of holes in each stick about 3/4" apart.  Each pair of holes for the LEDs should be as far apart as the leads that come out of the bottom of each LED.  This is about 1/10 inch.

Push the leads through the holes making sure that the LEDs are all aligned with the same orientation, that is with the longer leads (the positive anodes) together on one side and the sorter (negative cathodes) together on the other side.

Bend the leads over as shown and solder them together so that the LEDs are wired in parallel.  The cathodes (shorter leads) are at the top and wired to the black connecting wire.  The anodes (longer leads) are at the bottom and connected to the red connecting wire.  Red wire connects the anodes and black the cathodes.  Two strips like the one below will give a total of 12 LEDs for testing.

Test Setup - Power Board
The power board supports the latching reed switch and sockets for the test resistors.  The schematic shows the wiring.  Note that only one of the 100 ohm resistors is shown to be connected.  The other resistors are added to the circuit by plugging them in during testing.

The reed switch is to the left with the resistor sockets to the right.  The one permanently soldered 100 ohm resistor is at the far right.  One plug-in resistor has been inserted  in the leftmost socket.

The latching reed switch is fragile and WILL break if you bend its leads without supporting the glass body of the switch.  See the information towards the end of this article for tips on safely bending leads: .  It explains that you MUST hold each lead close to the glass body of the switch with a pair of pliers as you bend the lead.

To make the sockets for the resistors I used sections of plastic headers that can be purchased here:   Just cut two pin sections out and mount them as shown.

The resistors were soldered to matching headers:  As shown in the schematic, one 100 ohm resistor was permanently soldered in while the others can be inserted or removed as needed.

If you don't want to take the time to deal with sockets and plug in resistors you could just as easily solder in additional resistors as you check LED brightness.

Here is a close-up of the resistors.

The yellow line indicates where the reed switch is located on the top of the board.

This view of the back of the boards shows all of the wiring.

Connect the power board to one or more LED strips.  You should see each LED light up, but somewhat dimly, when you pass the magnet close to the latching reed switch.  If any or all LEDs are not lit check to see that they are all mounted with their anodes together and their cathodes together.  You can also put a temporary jumper across the pins of the reed switch to make sure that power is getting through it.

Add additional resistors, one at a time, until a good balance between brightness and current consumed is reached.  When I used this setup with 12 LEDs the single 100 ohm resistor only allowed a current of 20 ma to flow.  The table below shows the power that is provided as more resistors are placed in parallel. 

100 ohm resistors Resistance (ohms) mA to LEDs Hours /w 2000 mAh cells
one 100 20 100
two 50 40 50
three 33.3 60 33.3
four 25 80 25
five 20 90 20

Most nickel metal hydride AA cells deliver 2000-3000 mAh (milliamp hours) of current.  AAA cells deliver less than 1/2 as much.  As you can see from the table the more current you give the LEDs the less time you get before they go out.

An Alternative Test Setup
Rather than using popsicle sticks you can also make a test unit that is functionally identical to the one above using a prototyping board.  The resistors are in the bottom left along with the latching reed switch.  The LEDs are plugged into the power bus at the top.

This video gives an overview of the test unit.

(right click on the box below and select Play or click

A Printed Circuit Board to Replace Popsicle Sticks!
Once the testing was complete I decided to make up a printed circuit board to simplify construction of additional light boards.  Below is a segment of the design.  It shows, from left to right, pins for input power, holes for seven LEDs (the full board accommodates 25), a place for a current limiting resistor and a place for a latching reed switch that can be used to turn the lights on and off with a magnet.  The segment that houses the first five LEDs is repeated five times across the whole 13" board.  The vertical dashed lines show where the boards can be cut to fit into smaller cars or buildings.

Since some users may not need to use current limiting resistors or reed switches the holes for those devices are joined by a "trace" that electrically bypasses them.  In order to use a resistor you must cut the trace between the resistor holes with a knife.  Similarly you must cut the trace between the Reed Switch holes to have the reed switch turn the unit on and off.  Make sure you insert the resistor and reed switch in the segment closest to the power pins (the far left in the drawing) when you are using multiple 5 LED segments in one strip.

Here is a view of the whole printed circuit board.  The board on the left has a current limiting resistor as well as a number of LEDs.  The board on the right has not been populated as yet.  You will note that only one resistor is needed for the entire board.

The yellow arrow points to the trace that connects, and bypasses, the resistor mounting holes.

Here the trace between the resistor holes has been cut so that a resistor can be mounted in the holes. 


If a latching reed switch is to be used to turn the lights on and off you have to make a similar cut somewhere along the trace labeled "reed switch".  Only the trace closest to the power input should be cut.

The reed switch can be mounted directly to the circuit board, as shown here, or it can be attached to a length of wire so that it can be mounted elsewhere.  Note that the resistor for this board has been mounted on the bottom rather than the top.  This makes it a bit less noticeable than when it is on the top of the board.

Here the LED circuit board has been mounted to the top of a coach.  Thirteen of the 25 available LED locations on the board have been used.  When 4.8 volts is used with a 33 ohm resistor it gives a very realistic looking effect.  A photo of this car when seen from the outside is at the beginning of the article.

Resistor Wattage
All of my tests were done with 1/4 watt resistors.  If you are using a single 1/4 watt resistor with a string of LEDs and an input voltage of 5 volts you may note that the resistor gets quite warm.  If that happens you may want to replace the 1/4 watt resistor with a 1/2 watt unit.  You can also put multiple like valued resistors in parallel which doubles their current handling capability and divides their resistance by the number of resistors.  For example, if  I needed a 33 ohm resistor I could put three 100 ohm resistors in parallel.  That gives 33 ohms (100 / 3) and a current handling capacity of 3/4 watt (1/4 x 3). 

Track Power
In order to power the LEDs from track power several things need to be done.  First you have to use wheels that have power pickups.  Once you gather power from the track you must run it through a bridge rectifier which takes DC of either polarity (which appears when a train switches from forward to backward motion) and converts it to constant polarity.  Next the variable voltage from the track is fed to a 7805 voltage regulator that supplies no more than 5 volts to the LEDs.  Finally you need to use one or more capacitors to keep the LEDs from flickering when the wheels cross dirty track or the frogs on switches. 

The top part of the photo below shows a drawing of a circuit board that I designed.  While awaiting its arrival I made up a sample that is functionally identical using a popsicle stick.  The first stick is drilled and the second is populated with (from left to right) a bridge rectifier, a small filter capacitor, a 7805 regulator, a small jumper (see yellow arrow) that takes the place of a diode and three 16volt, 2200 uF capacitors.  The diode is not needed unless you are using special "supercaps" that are discussed below.  In this case I just used a short jumper in its place.

Here is another view of the same board.  There are three 2200 uF  / 16 volt capacitors wired in parallel.  When capacitors are wired in this way their capacitance is added so they behave as though we are using one 6600 uF capacitor.  This may sound like a high value but 6600 uF is only enough power storage to keep the LEDs from flickering, not enough to keep them lit for any length of time beyond a second or two if power is completely lost.  To accomplish that we need to employ SUPERCAPS.

Here the three 2200 uF capacitors have been replaced with two 10F capacitors wired in series.  They are wired in series because the voltage rating of these capacitors is only 2.3 volts and we are supplying 5 volts from the voltage regulator.  The capacitors are wired in series with the positive lead from one going to the negative lead of the other, doubling their voltage to 4.6 volts but halving their capacitance to 5 F.  The diode just after the 7805 drops the voltage another 0.7 volts to make sure we don't feed any more than 4.6 volts to the capacitors.

You might not think that changing from 6600 uF to 5 F is much of a change in capacitance unless you know that there are 1,000,000 uF in a F (1,000,000 microfarads in a farad).  This means the 5 F supercaps have 5,000,000 / 6600 = 757 times the capacity of the 6600 uF set of capacitors!  These supercaps will keep the light shining for several minutes after the power has been removed.

Supercaps are discussed in more detail in this article

Hopefully these experiments and notes have helped to cast some "light" on the issue of illuminating rolling stock.  If you would like to give any of these methods a try I have a supply of warm white LEDs, latching reed switches, resistors and bare circuit boards.  I should have the power supply boards in a week or so.


Please let me know if you have any questions or suggestions (

Power Supply Board Modification
After the power supply boards were fabricated a question came up about using the current limiting ICs described here: - These little devices are super but can only deliver 20 or 25 ma to the LEDs that you are powering.  For the longer LED strip lights 25 ma is just not enough.

For those of you who are only powering a few LEDs, where 20 or 25 ma is sufficient, you can rewire the power supply board to use the CL2N3-G current limiting IC as shown here.

The bare board is at the bottom and the rewired board with the CL2N3-G is at the top.  Note that the DC power is picked up at the red/black wires new location by the CL2N3-G, not at the far left end of the board where two contacts are labeled "DC + & -". 

As usual the center pin of the CL2N3-G is cut off.  Note that nothing is connected to the hole just above the "p" in "cap".

The bottom view shows that one trace needs to be cut.  It is circled in yellow.  One of the leads from the CL2N3-G is connected to the pad just below the yellow circle.

Here is another view of the top of the completed board.

Higher Voltage Options
This lighting system was originally designed for use with batteries and is wired to operate from low voltage.  The use of the power supply board is one option for powering the LEDs from voltages above 4 or 5 volts but there are other ways that it can be done. 

The following information shows how some minor rewiring of the LED strips puts the array of lights in a mixed parallel / series circuit that works nicely from 18 or more volts, something that might be available if you are working with DCC track power.

This schematic shows the way the board is wired when it is populated with 25 LEDs.

You can see that all 25 LEDs are wired in parallel and each receives the same voltage from the battery pack through a current limiting resistor.

In this schematic the same 25 LEDs are shown.  The wiring has been changed so that there are five groups of five LEDs.  Each group of five LEDs (D1, D2, D3, D4 and D5, for example) can be thought of as one LED and each LED in that group receives the same voltage.  Since each LED (or group) requires a bit over 3 volts (its forward voltage) to light we need to supply something above 15 volts to light each group.  I have not shown a current limiting resistor but, if you are supplying 18 or move volts, a small value resistor of 10 or 15 ohms may be needed.   

Here is what needs to be done to rewire each board.  First cut the two traces that connect each 5 LED segment as shown here.  I used a small tip Dremel drill bit to grind the traces away.  This needs to be done four times.

On the bottom of the board we need to connect the pins indicated by the arrows and the line.

Here the jumper has been soldered to the board.  This happens to be the last of four jumpers and it also shows the return wire that connects to the power input pins at the other end of the board.

One trace needs to be cut at the power input end of the board.  Cut only the negative (-) trace.

I put a small socket (to the left of the LED) in the resistor position so that I could test the board with different value resistors and installed two pins for power input.

Here the black return wire is soldered to the negative power input pin under the board.

Here is a view of the back of the board with the 4 jumpers circled.  You can also see the black wire that connects from the leftmost jumper back to the negative power pin on the far right.

The completed board works very well with input voltages above 17 volts.  I watched the current consumption as I increased voltage and installed a current limiting resistor to keep the current draw from the whole board to about 100 ma.  This supplies about 20 ma to each LED.  At 18 volts a 10 ohm resistor did the trick when used with all 25 LEDs.

I also built up a small power supply board so that I could supply power to the LEDs from DCC track power.  Only three components are used, a bridge rectifier and two capacitors.  The voltage regulator is not needed as we want the full DCC voltage to arrive at the LEDs.  A jumper (yellow oval) connects the input pin from the 7805 to the positive lead that goes to the capacitors.  I used two 680 uF / 50 volt capacitors.  Make sure that the voltage rating on the caps is at least 25 volts, preferably 35 or more.

Note that the use of the power supply board will drop the voltage that gets to the LEDs by about 1.4 volts when it passes through the bridge rectifier so you may need to adjust the value of any current limiting resistor that you use.

The example above requires a fairly high voltage to operate as LEDs are in groups of five.  If you want to use the same method to keep current consumption down but operate at lower voltages you can do that by putting LEDs into fewer groups.  For example, if you are using 12 LEDs and put them into 3 groups of four the voltage required to give good illumination would be closer to 10 volts (a forward voltage of about 3.3 volts x 3 groups).  4 groups of three would be closer to 14 volts (3.3 volts x 4 groups) and so on.


Prices for Kits & Parts:

13" boards that will fit up to 25 LEDs - $5.00
shorter boards - cost is per 5 LED section $1.25
Warm white 5mm LEDs $0.60
Latching Reed Switch $1.00
Battery case for 4 AA cells $1.60
25 ohm resistors $0.10
Magnets $0.25
Complete kit consisting of one 13" board, 12 warm white LEDs, reed switch, magnet, resistor and battery case $15.00
Power Supply Board $3.50
Parts for Power Supply (small bridge rectifier, 7805, three 2200 mfd capacitors $5.00
Cl2N3 LED driver $1.00
Shipping  for kit or small quantity of materials within US approximately $6.00

 (Note added 1-7-2015 - my supply of latching reed switches is about gone - those that remain are available for $2.00 each.  The kit prices remain the same)