# LED challenge: How to build an LED circuit that feeds off of a Lionel train track (2-18 VAC) at a reasonable price.?

I am working on a shelf-train that will circle my son's room. I want to add lights to the boxcars using LED, which means the power would come from the tracks. That means AC power, variable from 0 to 18 VAC, with 5-6VAC the average use power. What is the best way to do it? Should the power be rectified? And how do you deal with the variable power source?
I also plan to control the transformer with an arduino. Bonus points for any advice there!

Thanks

sort by: active | newest | oldest
You used to be able to buy constant current LEDs, but I can't find any now.  That (and a bit of rectification) would have been the easiest option.

One way is with a simple constant current sink or source circuit, like THESE.  It would be best to add a diode and capacitor to half-wave rectify the input.
The problem with this would be the forward voltage drop of the LEDs - Even with a single LED and the low dropout of the circuit, you probably wouldn't get light until 4 or 5 volts

A better way would be to use a diode / capacitor half wave rectifier, then a simple zener regulator to give 2V or so.  You could then use a joule thief circuit to whizz the voltage up and drive the LEDs off this.  You would be building a small inverter circuit.

If you have the room in the boxcar (you haven't said what gauge you're using) the easiest method would be to charge a small rechargeable battery through a full-wave rectifier and a low value resistor.  The battery would store charge whilst the loco was running fast and keep the voltage when the power dropped.  The rectifier would stop the battery discharging through the loco PSU. The terminal voltage of the battery would give you a steady voltage to calculate the LED resistors.
7 years ago
Not a bad setup - bu I wouldn't worry about dropout; since average is around 5-6 volts, then a full bridge rectifier(low drop).  You could use a voltage multiplier (2 diodes 2 capacitors) to up the AC voltage if necessary..., then a linear regulator to keep it a reasonable level...

The rectifier + joule thief idea is good too; a lot of constant current drivers work very similarly to joule thieves...
7 years ago
I didn't think of a simple voltage doubler.  I'd usually only consider them in relation to HV circuits, but we've got AC coming in, so why not.

I think the main challenge is keeping the lights on when the train is stationary.  For that reason I think the rechargeable battery approach is probably best as it gives a constant voltage out.  Lionel trains are pretty large ('O' gauge) so plenty of room inside.  (Interesting fact - Neil Young is a model railway enthusiast and used to be a shareholder in Lionel).
7 years ago
indeed...

All my model train sets as a kid used an incandescent bulb, and it went off when the train went off.

I figure a really neat setup would involve live dc rails, and hooking up an rf transmitter/receiver pair to control the locomotive/other stuff.  All the lights/accessories could stay on while the train was stationary.

You mentioned a small battery...a protected lipo battery can be charged with a simple rectifier "dumb charger" since the battery has its own overcharge/undervolt protection on board...then just hook up to accessories and leave them always on...
Sandisk1duo7 years ago
a resistor would be the easiest
seandogue7 years ago
drive the train, of course.

Re-design7 years ago
You can do it but you'll have to use a voltage regulator to keep the voltage at 5 or less volts.  Also you won't have enough power to light the led's until you are giving the regulator about 6 volts.  It will have to be rectified to dc for the regulator.