Constant current lighting for model trains

I had a lot of old style passenger carriers in my HO collection and i wanted to add LED lighting to them. So i quickly threw in a Schottky diode bridge, followed by a 470uf capacitor to convert the pulsing DC to DC. The 470uf cap should help over dirty tracks. Most of LEDs were the 0603 or 0805 SMD type. So i used 1k-ohm to drop the current to about 12/1k = 12mA.

However during running, there was constant flickering of the LED. Initially i wondered if the capacitor was not sufficient. Then it hit me. LED’s are primarily current driven. It means, you can actually apply 110v DC across an LED, just as long you can maintain its forward current to be within limits.

See what happens here is that we have a series circuit involving a resistor and an LED. Say over a dirty track, the power connection is lost for a brief moment. The capacitor can supply the current. However its voltage will dip slightly. Now the resistor is a voltage controlled device with its current I = V/R. So as V drops, I drops. And the LED dims. when the carriage again connects with power, current increases, LED brightens: It flickers.

The flickering was too annoying and i wanted the carriages to have the same constant brightness. So i was looking for a device that could maintain the same current (I) even with voltage variations. So you’ll need a Mosfet to that.  I came across this great current regulator from NXP, available from Digikey :  PSSI2021SAY. This tiny little Mosfet can regulate current up-to 50mA, for voltages up-to 75V. This fits the bill. It is about $0.50 for quantities of 10+.

So i pulled up EagleCAD, got a quick board layout done and sent it off to OSHW for pcb prototyping. Back in about 3 weeks and assembled, the board under a magnifying loupe.

The board is really tiny. About 0.25″x0.25″. All you need are 2 components. The PSSI2021SAY device and a resistor to determine the current setting. I chose about 7ma. The foot-prints are small, but the soldering is not that bad. Total cost?

Board = $0.50, PSSI2012SAY = $0.75, Resistor = $0.10. Thats less than 2 dollars. Of-course not counting the time and soldering work needed.


Then I test-rigged it with the LED strip. Success!. I put the strip back into the carriage. Ran it on the tracks. No flickering. No dimming. Great lighting!.


Moral of the story? : While using just a bridge and a capacitor and series resistor might be okay for lighting, go one step further and get a constant current regulator. It does not cost that much, but it makes your lighting much more prototypical.


I am a computer engineer living in the beautiful city of Austin,TX. While my day job is designing computer chips, I love to dabble in woodworking, metalworking, r/c and electronics.

Tagged with: , ,
Posted in Electronics, Model trains, Uncategorized

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: