News:

Please read the Forum Code of Conduct   >>Click Here <<

Main Menu

LED for DCC track voltage

Started by richg, July 29, 2011, 06:59:24 PM

Previous topic - Next topic

richg

Once in a while someone ask about using a LED to indicate DCC track voltage for maybe a siding. Here is a suggestion from Allen Gartner's website.

Using an LED to indicate DCC track power on.
You will need a voltage-dropping resistor in series with the LED. You will also need a reverse polarity protection diode.



VPS = 14.4V
VL = 2.6V
VD = 0.7V
IL = 20mA = 0.02A
R = 555 ohms. You can use 560 ohms from Radio Shack.
Using a 560 from Radio Shack, W computes to be 0.224. Use a 1/4W resistor or larger. Radio Shack has 560 available in ½W size. Use that.

My suggestion:

For lower current, about 10 ma, and longer LED life use a 1k resistor.
Right click on this message and copy and paste into a Word document for future reference.

Rich

Jim Banner

I have to agree with Rich that you really should use that extra diode to keep from applying too much reverse voltage to the LED.  But there are better ways of doing so.  Unless you are interested in the electronics theory behind this, skip down the page to where the recommendations are in bold type.




Applying ac, such as our DCC track voltage, to an LED can shorten its life by 90% or more, even though you use the appropriate resistor.  The reverse voltage required to start causing damage is around 5 volts for a typical LED.  At that reverse voltage, the reverse current is typically around 100 microamps (1/10 of a milliamp) so it is not an excess current or a heating problem.  And the problem is not instantaneous like operating an LED with no current limiting resistance.  You don't even know you have a problem until one day, a year or two after installing the LED, you look at it and wonder what kind of crappy LED they sold you that it gets dim and hard to see after only a few thousand hours of use.  What happened to the hundreds of thousands of hours they are supposed to last?  I have forgotten the physics behind this so lets just say that over voltage eats up the magic smoke, one molecule at a time, until there is none left.

Using any one of a variety of diodes, including the one Rich has shown, will prevent the problem.  But if you do not have a 1N4148 on hand, you may be tempted to grab whatever you do have and use it.  The only problem is, rectifier diodes also have reverse leakage.  If the reverse leakage is low, like the 1N4148, then most of the reverse voltage will be across the rectifier diode.  But if it is high, then most of the reverse voltage will be across the LED.  Low and high reverse leakage currents at the voltages we are talking about could be 10 microamps or less and 1 milliamp or more.  Let's consider something in between, say 100 microamps at 5 volts, just like our LED.  If we hook such a diode in series with an LED and apply reverse voltage, the voltage will be equally split across the rectifier diode and the LED.  If our DCC command station puts out an idealized waveform that swings cleanly from +14 to -14 volts, then the reverse voltages applied to the diodes will be close to 7 volts each.  Oops, the magic smoke is slowly oozing out of the LED.  That was the bad news.  The worse news is that some command stations go a little higher in voltage.  And some model railroads, particularly larger ones, can go a lot higher if the DCC waveform starts to ring (jump up and down every time there is a transition from - to + or + to -.  This can easily reach 30 volts or more and if you put half of that backwards across an LED, it really is not going to like it.  So what is the solution, other than the obvious one of hunting down 1N4148 diodes or their equivalents?




One solution is to connect the rectifier diode in reverse parallel with the LED rather than in series with it.  Reverse parallel just means they are in parallel but backwards to one another.  That way, the LED conducts (and lights up) on one half cycle and the rectifier diode conducts on the other half cycle (but does not light up.)  A typical rectifier diode has only a fraction of a volt across it when it is conducting so there is never more than a fraction of a volt applied in reverse to the LED.  Best of all, the reverse voltage seen by the LED does NOT depend on leakage in the rectifier diode so you can use virtually any diode that comes to hand.

Another solution is to use a two lead, bicolour LED.  These LED's light up green or red depending on which way the current flows through them.  Internally, such an LED contains a red LED connected in reverse parallel with a green LED.  Apply ac track power to such a bicolour LED, through a resistor, and both the internal LED's light up.  Better still, each protects the other from excess reverse voltage.  Best of all, they are cheap, about two bits each in quantities of one or a little over half that in quantities of one hundred.  And as a side benefit, when used to monitor track voltage, they will tell you whether you are using straight DCC or whether you are using zero stretching to run an analogue locomotive and if the latter, which directions.  The link below is to such a bicolour LED.

http://search.digikey.com/scripts/DkSearch/dksus.dll?Detail&name=754-1469-ND

Jim
Growing older is mandatory but growing up is optional.

richg

Suggestion to all. Copy the info into a Word document and store it in you PC for future reference. You can probably store the link to this page in Favorites to give to others. If the site does not change, the link should always be available. Like I said before, I see this question at times and many are not familiar with the electronics involved. DC and a 12 volt bulb are all many are familiar with.

I use the two lead red/green for a "yellow" when AC is applied via a resistor.  Not quite real yellow but good enough for me.

Rich

on30gn15

Am a rank rookie at DCC, but my brain says, wouldn't sensible decoder manufacturers have figured this in to their decoders? 
When all esle fials, go run trains
Screw the Rivets, I'm building for Atmosphere!
later, Forrest

richg

Quote from: on30gn15 on February 18, 2013, 04:50:50 PM
Am a rank rookie at DCC, but my brain says, wouldn't sensible decoder manufacturers have figured this in to their decoders? 

Pay attention, the circuit has nothing to do with a decoder. Decoders send 12 VDC to an LED or light bub.
What I showed is the LED used to indicate that a track has DCC applied to it.

Rich

jward

rich,

did you know you can adjust the colour of a bipolar led? add a set of reverse parallel diodes in series with your bipolar, with a resistor on one of the diodes. by varying the value of theresistor you can shift the colour of the led.
Jeffery S Ward Sr
Pittsburgh, PA

richg

Quote from: jward on February 18, 2013, 09:31:54 PM
rich,

did you know you can adjust the colour of a bipolar led? add a set of reverse parallel diodes in series with your bipolar, with a resistor on one of the diodes. by varying the value of theresistor you can shift the colour of the led.

Yes but never got into trying it out. I have used a bipolar red/green LED to simulate yellow but not quite yellow as I would like. I just used an 5 volt oscillator circuit with a 555 IC for some signal circuits.

Rich

jward

i think if you put the resistor on the diode of the same polarity as the green it will add more red to your yellow, and probably give you a more accurate colour.
Jeffery S Ward Sr
Pittsburgh, PA