Jump to content
 

LEDs on DCC


Shropshire Lad

Recommended Posts

You can connect a LED and resistor in series directly across the track. You should really also have a reverse protection diode across the LED, but this can be another LED.

 

So the final circuit is two LEDs in parallel but connected anode-to-cathode and cathode-to-anode in series with a resistor.

Link to post
Share on other sites

Colin you don't even need that (the bridge rectifier).

The LED is a diode and will handle the voltage in one direction only, "technically" it will flicker with the amplitude of the DCC but it's so fast you'll not notice it.

All you need as a minimum is the limiting resistor.

 

In the perfect world you could add a diode in inverse polarity parallel with the LED, an 1N4148 would be appropriate, and the limiting resistor but not really necessary. I've got several DCC driven LEDs on the layout and although over time they may diminish or fail due to high reverse voltage, I suspect that is relatively unlikely even with several years of intense use.


EDIT: Ahhh - I type too slowly obviously :O

Link to post
Share on other sites

  • RMweb Premium

Colin you don't even need that (the bridge rectifier).

The LED is a diode and will handle the voltage in one direction only, "technically" it will flicker with the amplitude of the DCC but it's so fast you'll not notice it.

All you need as a minimum is the limiting resistor.

 

In the perfect world you could add a diode in inverse polarity parallel with the LED, an 1N4148 would be appropriate, and the limiting resistor but not really necessary. I've got several DCC driven LEDs on the layout and although over time they may diminish or fail due to high reverse voltage, I suspect that is relatively unlikely even with several years of intense use.

EDIT: Ahhh - I type too slowly obviously :O

 

White LEDs are quite susceptible to reverse voltage damage, reds are more robust. I learnt the hard way.......

 

Cheers,

Mick

Link to post
Share on other sites

White LEDs are quite susceptible to reverse voltage damage, reds are more robust. I learnt the hard way.......

 

Cheers,

Mick

Mick,

  Maybe why I've not seen any "issues". The LEDs run from my DCC track bus are the red ones mounted on buffers.

Most all my white/off-white/yellow ones are building lighting and are run off a separate DC bus. :)

Link to post
Share on other sites

  • RMweb Gold

Oh dear - The Stationmaster said my reds on buffer stops - which have been good for 5 years with just a resistor - should be white ones as they are next to a running line!

 

Could be trouble looming?

 

Phil

Link to post
Share on other sites

This is interesting, I too have red led's on buffer beams, with a current limiting resistor in series.

 

I thought, in my ignorance, that a diode in series with the LED would alter/rectify/whatever the  DCC 'AC' to about 8 or 9v DC and all would be fine. - It was, and it works, but there does appear to be a difference in this approach to the correct way.

 

It's certainly not too late to alter things, and will if it's wrong, but I'm just interested why my bodge method is unsound, but works. Is it along term issue?  - I've always held that on this, and many other subjects, that I know enough to be dangerous, but not enough to be of any use. :yes:

 

Peter

Link to post
Share on other sites

  • RMweb Premium

This is interesting, I too have red led's on buffer beams, with a current limiting resistor in series.

 

I thought, in my ignorance, that a diode in series with the LED would alter/rectify/whatever the  DCC 'AC' to about 8 or 9v DC and all would be fine. - It was, and it works, but there does appear to be a difference in this approach to the correct way.

 

It's certainly not too late to alter things, and will if it's wrong, but I'm just interested why my bodge method is unsound, but works. Is it along term issue?  - I've always held that on this, and many other subjects, that I know enough to be dangerous, but not enough to be of any use. :yes:

 

Peter

 

If a diode is in series - with the same polarity as the LED, it will reduce the voltage by a couple of volts or so. It's more likely that it's a resistor in series. If the diode was the opposite way round in series, nothing would work at all.

 

Diodes have a forward voltage and reverse voltage. The forward voltage is that required for it to start passing current - similarly for the reverse voltage. When the reverse voltage is exceeded, the diode will eventually break down.

"Normal" diodes such as the 1N4xxx range are designed to act as rectifiers and usually have high reverse voltages (The widely and cheaply available 1N4001 has a reverse rating of 50v for example).

 

LEDs usually have far lower reverse voltage capability - often in low single figures 2-5v is not uncommon. Subjecting a LED to AC will eventually kill it unless protected with an inverse parallel diode (normal or LED type) or very large resistor to limit the overall voltage.

White LEDs seem to be more susceptible to higher reverse voltages than reds.

 

Cheers,

Mick

Link to post
Share on other sites

  • RMweb Gold

You can connect a LED and resistor in series directly across the track. You should really also have a reverse protection diode across the LED, but this can be another LED.

 

So the final circuit is two LEDs in parallel but connected anode-to-cathode and cathode-to-anode in series with a resistor.

 

As a number of people warn in this thread, reverse voltage protection is very important for LEDs - any diode (light emitting or otherwise) that isn't conducting ("on") when connected to "juice" is effectively getting the whole supply voltage across it, which could easily exceed its reverse voltage rating.

 

Extra LEDs connected in inverse parallel are excellent for providing this protection.

 

This concept is effectively the basis of a number of DC track wiring testers - some sold commercially (eg TrainTech) - and a number of homebrew examples.

 

 

Huw.

Link to post
Share on other sites

Another 'consideration' is that 'what looks like a simple LED', may not be:  If it is a flashing LED, it is really an integrated circuit, with LED built in - it may not require a resistor, for use on 12.00V BUT it may also be destroyed with as little as 0.5V reverse polarity.  It will also run 'hot' if your '12V' is not regulated to 12.00V, but is actually eg 13.8V .- 14V  (eg a car's '12V' )

 

Simiarly, LED STRIPs which are designed for 12.00V (usually 20mA per 50mm of strip .. upto a maximum of eg 5m (= 2.00Amps)), may well be taking DOUBLE the current if the voltage rises to 14V.

 

With LEDs (and other diodes) it must be remembered they are 'non-linear' devices - they do not simply follow 'ohms law' like a resistor.... and that especially applies at the breakdown voltage !!)

Bought in bulk, a 1N4148 diode - which is physically quite small, and easy to add - can cost less than 1p   (or reasonably in small quantities on Ebay from many places)

This is a cheap insurance policy to protect a more expensive LED ..particularly white/ ultraviolet. - it is much easier to include at the time of initial assembly.

 

For examle - with a bufferstop LED ... instead of using any 'wire'', I use a resistor on one side, and the 1N1418 diode on the other, to make the connections to the rails.

(I also use a side-facing Red LED which has a 'point source/lens' on the side, within a small clear square - this needs painting black, and then the required top colour)  - it looks like a small lamp mounted on a square wooden board.  smd leds are an obvious alternative.

 

And finally - when considering what voltage you are sending to the LED ...  remember the PEAK voltage, as well as any average calculation ... does the PEAK exceed the breakdown voltage?

What current flows during the peak voltage?   Half-wave rectification or shorter on-time-pulses (strobing) allow an LED to have a larger current for a short time ... as long as the average (heating effect) is low enough.  However, photography / videoing the layout may show unexpected effects compared to dc lighting.

Link to post
Share on other sites

I have been using those little side looking red LEDs with a 1k resistor in series but no reverse protection diode for my buffer stops for the past 5-6 years and not a failure to date.

 

You can squeeze the resistor into the Hornby buffer u channel and the led sits nice in a recess on the front of it. Bit of black paint to hide the resistor and wires then trap the wires to the rails with the buffer.

Link to post
Share on other sites

So, the technical detail. A LED connected with a reverse voltage will act like a zener diode and start conducting, that's what is meant by "breakdown". So long as the reverse current is within the data sheet specification then the LED will survive without harm. The resistor used to limit the current in normal operation may also limit the current to a safe level when reverse biased.

 

Given the low level of electronics knowledge of many modellers, it's easier just to tell people to use a protection diode as that will always work.

 

It's just the same as "correct" or "DCC friendly" point wiring. There's best practice that will ALWAYS work and there's the misguided "it works for me, so it must be OK" attitude.

Link to post
Share on other sites

Many thanks gents for the advice, I think I fall into a third category  "it works for me, but why, and what will happen if I leave it alone?"

 

I am trying to get to grips with correctly wiring LED's up, I fully understand the need for the resistors, and have a large collection of black LED's and smoke that prove their need, so I can tick that one off. - Using the water instead of electricity analogy if I connect a fire pump outlet up to my domestic plumbing system without some sort of flow regulation it will blow all the valves and fittings to kingdom come?

 

Keeping with the water analogy I believed diodes to be one way valves,which prevent the flow in one direction. In the case of LED's the valve isn't very strong in the flow stopping direction, so while it might work without the second diode it's potential to fail is increased, so better safe than sorry. - I think I now get that bit.

 

Now comes the bit where you experts roll your eyes and wonder where (or even if), us mere mortals were educated. :banghead:

 

The reason I came up with the 'thickies' solution of a further diode in series was because I thought that as a one way valve it would let electricity flow in one direction and not the other, effectively converting the AC to a crude form of DC by stopping half the flow.

 

In the case of DCC at 16V on the track, a diode connected produced a measured DC voltage of around 9V. In my ignorance I thought that connecting the resistor and LED into this 'DC' supply would then work fine. - And it did. - I assumed the diode would provide a better block to the reverse current, and protect the LED.

 

So today, following your advice on a diode connected as reverse polarity across the LED I had a bit of a play to see if I could detect where my logic had failed, even though things were working (for the present anyway). It didn't take long to discover that in addition to the 9VDC I could measure across the LED/resistor combination I was also still getting 16V AC, something I had not previously thought to measure, or was possible.

 

So yes 'my solution' works, but there is still a dangerous level of reverse current I'm still not dealing with that the correct solution does. (Am I right so far??)

 

If so we now have moved on to a stage where I understand what's going on with one exception. If the Diode is a one way valve, how come with one in series to my LED/Resistor combo it appears to be doing nothing, and I'm still getting 16V AC?

 

I think that's the last link in the chain I don't understand. If any of you learned gents have followed this far without attempting suicide, can you enlighten me? After that I promise I'll go away.

 

Peter

 

P.S. No I won't, - one supplementary question, in the correct solution you guys have provided, and for a 16V DCC supply is that the voltage you use to calculate the current limiting resistor value? (I had been using 9V which now appears also to be incorrect, and is presumably also shortening the LED life.)

 

Thanks in advance, and sorry to be a pain, but I am trying to learn!.

 

PPS - Sorry to hijack the thread.

Link to post
Share on other sites

Your water analogy is good, as far as it goes. Imagine a one way valve allowing the sewage out of your house.  When the flow reverses a normal diode takes time to react and causes a momentary short circuit. In your analogy, a slow acting one way valve allows raw sewage to flow back into your house :)

 

So, if you want to use a "bridge rectifier" make your own out of "ultrafast" types such as UF4001 rather than the normal 1N4001 or buying a bridge rectifier in a single package.

 

For a single diode (or LED) with a resistor in series it's less critical as the current is limited.

 

Hobbyist DVMs are designed for sine waves at low frequency. When you measured 9V you were hampered by your DVM not being ideal for measuring DCC which is a square wave, and much higher frequency.

 

If you calculate the resistor value to drive the LED with 10mA current with a 9V DC supply then you will get a certain brightness. If you then connect it to your 16V DCC track then the current will increase, as will the brightness and the power dissipated by the LED (which leads to heating), but the current flow (and power dissipation) is only there for half the time. So long as the average power is not too high then everything will be OK but your LED might look too bright (due to the way the eye works bright pulses can look brighter than a constant source using the same average power). 

Link to post
Share on other sites

I'm not sure that a std diode across the LED was being advocated  - but the Series diode, as I think you used previously, and I descibed, is a  better general solution!

The 'standard diode' is offering the protection against reverse voltage/current because it is harder to break.

 

For the LED: The current only flows 50% of the time .... this reduces the power consumption by 50%,

 

A diode placed the inverse way across the LED does stop the reverse voltage rising to breakdown levels, BUT wastes current through the std diode and resistor, because it is flowing through the resistor in both half cycles ... just that one gives out no light !   Therefore a higher power rating resistor may be needed.

 

(THIS CAN be used to allow LEDs to work on a higher than spec voltage - eg 12.00V LED light strips ... can be run safely at 14-16Vdcc because they are only powered 50% of the time... although I still add a series diode or two because I use 16Vdcc!. 

(My measurements have shown that at 14.00V the current is doubled compared to the 20mA per 50mm typical of a 12.00V LED light strip - LEDs are non-linear)

FYI: LEDs in Infra Red Remotes use high currents for a very short duty cycle to give highly effective output, whilst using a battery supply -)  

 

If you multiply this up on a larger layout, the inverse-parallel std diode method  becomes a considerable amount of wasted  power;  heating resistors without any lighting benefit. ..requiring in turn, heavier wiring and power supplies....    (My Storage Area takes 0.65 Amps for the coach lighting alone, with what is parked there today)

 

THE INVERSE parallel DIODE is best when  it is an LED too .... so the 2 LEDS alternate which is on, and being similar types (presumably) have similar brightness, and it is hoped that the forward voltage is lower than the reverse breakdown voltage -  BUT the resistor is 'on' 100% of the time, and requires double the power rating of 1/2 cycle use 

[ Caution FLASHING LEDS which contain an IC flasher, and LED combined may have a reverse breakdoen of ONLY 0.5V !!! . but usually have a forward volage of 9-12V]

 

Concerning Voltage/Current calculations:  I tend to use an LED tester to find what current I want for a particualr LED ( they cost less than 10GBP and save lots of time )

Then use Ohms law  V=IR  and P=IV - ignoring the 2-5V drop across the LED, eg 16Vdcc and  10mA  x R =>  1600 ohms = R  then go UP to the next standard value, or perhaps down to the next  nearest value if using 50% duty cycle.  Modern LEDs work well with 2-3k as resistors .. they are much brighter than they use to be..

so ytou can probably double the resistor value.    Always base your voltage calculations on the FULL voltage which could occur  ... eg with a sinewave and rectification which is then smoothed by capacitors, you need to consider the PEAK voltage  .. because that is what can actually be presented 

 

Eg on an 'older Roco DCC System - supplied with a 50Hz transformer 230:15Vac - and NOT THE PRESENT 18Vdc SMPS - when no current was flowing, the track voltage could rise to 22V ... bulbs in coach lighting were noticeably brighter !! (when no trains were running).  This problem no loinger accurs with the SMPS !!

A Bachmann Voyager with bulb headlights in a pastic frame melts easily under those circumstances !  especilaly if they were only 12bulbs - most european equipment has been fitted with 16V bulbs for years (and ac compatibility) before changing to LEDs

 

If you doubt the heat coming off LEDs ... rest your hand on a coach or tram which has internal lighting.

Link to post
Share on other sites

Rapid Electronics sell LED,s that run off of an AC supply . Simples ?

 

 

Only if they fit into O Gauge buffer lamps!

 

post-18627-0-40891300-1458415504.jpg

 

The only reason I wasn't using the 12V DC supply to the rest of the layout :)  the 2mm Tower lights are just right.

 

 

Peter

Link to post
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...