Author Topic: Using an LED for the output on hard-wired decoder  (Read 1838 times)

0 Members and 1 Guest are viewing this topic.

OldEastRR

  • Crew
  • *
  • Posts: 3197
  • Gender: Male
  • Respect: +268
Using an LED for the output on hard-wired decoder
« on: March 25, 2017, 12:37:41 AM »
0
So a resistor is needed for every LED connected to the decoder wiring. There is no way to reduce the voltage output to the LED down to proper voltage. Figuring out which resistor to use with which LED takes a complicated formula and you need to know the exact values of the decoder output, the resistor, and the LED -- things not easy to find, since there are so many values from so many sources, even the material of the LED maker (try to find a table showing each LED by name/part number and the voltage needed).
It's a Digitrax DZ126. The material with the decoder says "see the big Digitrax manual for more information", but there I see multiple tables of all kinds of data but nothing I understand.
The LED is a Richmond Controls Golden-White LED. Apparently it could be rated at anything from 1.8 to 3.5v. Have no idea what the Golden White operating voltage is. And the LEDS used on the lightboards for DC locos are not suitable for DCC use?

jdcolombo

  • Crew
  • *
  • Posts: 2238
  • Respect: +924
Re: Using an LED for the output on hard-wired decoder
« Reply #1 on: March 25, 2017, 02:03:48 AM »
0
Don't overthink it.

Yes, you can try to use Ohm's law to give you a precise value for a resistor, but you can also just use a 1K, 1/8-watt for everything.  I've used 1K resistors for my Richmond Controls sunny white LEDs for years without issue; a 2.2K (2200 ohm) resistor will also work fine (the light output might be a bit dimmer, but these are so bright you won't notice it), and might give you a bit longer life on the LED by reducing the drive current, but it is likely we will all be dead long before any LED burns out with a 1K dropping resistor, given the amount of time these are actually on in an engine. 

Just use a 1/8 watt, 1K or 2.2K resistor and be happy.

John C.

peteski

  • Crew
  • *
  • Posts: 31687
  • Gender: Male
  • Honorary Resident Curmudgeon
  • Respect: +4529
    • Coming (not so) soon...
Re: Using an LED for the output on hard-wired decoder
« Reply #2 on: March 25, 2017, 02:57:02 AM »
0
Like John said, just use those resistor values. LEDs do not need certain voltage: it is the current that needs to be limited (by installing a series resistor). If the current is limited the LED will figure out its own voltage.   :) Seriously.

Like John said, the white LEDs running from a DCC decoder will be happy with resistors startign with about 560 ohms. On the higer end, you might even go as high as 5,000 or higher. The higher the resistor value, the smaller will be the current passed through the LED/resistor circuit. A 1,000 (or 1k) ohm resistor is a good safe starting point.

Calculations are a bit pointless since you really end up selecting the LED brightness by eye.   But if you are bent on calculations, there are many online calculates online. Just google for LED resistor calculator.  If you want to do it yourself, you only need elementary school level math.

You need the followng info first:
Vin - voltage measured between the common positive blue) and a function output in "on" state. That depends on your DCC system but it will generally be around 10-11V

Vf - forward voltage dropped by the LED under normal operating conditions. You need to get the technical specs of the LED you are using. But you can generalize and pick 3V for a white LED.

If - current you want to pass through the LED (this determines its brightness). The operating current is specified in the tech. specs of the LED, but in real-life you will run the LED at a lower current (to reduce its brightness to look more realistic).  With white LEDs you will probably beoperating them at less than 10mA (or 0.010A).  Probably more likely at 5mA (0.005A) or even less.

The resistor formula will be R = (Vin - Vf) / If

So in the above example it will be (10-3) / 0.005 = 1400 ohms.   That is not a standard resistor value, so pick the next higher value or 1500 ohm.  for power rating of the resistor just assume 1/8W for such a low current.  Not a rocket science, is it?  :)

Any LED (and even old-fashion incandescent light bulbs) will work with DCC decoders.  But the yellow LEDs used in the older models have Vf of 2V, so adjust your calculation accordingly.  They are also less efficient, so they might have to run at about 10-15mA. Adjust the above equation accordingly. Since more current will be passing through the circuit, use 0.25W resistors.
« Last Edit: March 25, 2017, 03:00:58 AM by peteski »
. . . 42 . . .

nscaler711

  • Crew
  • *
  • Posts: 752
  • Gender: Male
  • @frs_strelizia
  • Respect: +125
    • IG
Re: Using an LED for the output on hard-wired decoder
« Reply #3 on: March 25, 2017, 07:28:42 AM »
0
I've used 470ohm resistors on 3,5 mm LEDs and never had an issue, but could never figure out what to use on SMD LEDs. I would assume a 1k would work well for those as well?

I used to be able to do the math, then I got lazy when I found the calculators out there...
“If you have anything you wanna say, you better spit it out while you can. Because you’re all going to die sooner or later." - Zero Two

peteski

  • Crew
  • *
  • Posts: 31687
  • Gender: Male
  • Honorary Resident Curmudgeon
  • Respect: +4529
    • Coming (not so) soon...
Re: Using an LED for the output on hard-wired decoder
« Reply #4 on: March 25, 2017, 07:43:57 AM »
0
I've used 470ohm resistors on 3,5 mm LEDs and never had an issue, but could never figure out what to use on SMD LEDs. I would assume a 1k would work well for those as well?

I used to be able to do the math, then I got lazy when I found the calculators out there...

That results in around 20mA of current through a white LED (in DCC decoders). That is acceptable for a 3.5mm LED, but it will also make it mega-bright.
. . . 42 . . .

OldEastRR

  • Crew
  • *
  • Posts: 3197
  • Gender: Male
  • Respect: +268
Re: Using an LED for the output on hard-wired decoder
« Reply #5 on: March 26, 2017, 12:05:12 AM »
0
I assume all resistors needed are the tiny surface mounts. Which are only available in bulk and from online sources meaning shipping charges? Can't any of the little resistors from the old DC lightboards be salvaged for this?  And are the numbers on them a way to determine their rating?

RBrodzinsky

  • Crew
  • *
  • Posts: 1205
  • Gender: Male
  • Respect: +425
Re: Using an LED for the output on hard-wired decoder
« Reply #6 on: March 26, 2017, 12:30:11 AM »
0
Any resistor is fine. You don't have to use SMDs.
Rick Brodzinsky
Chief Engineer - JACALAR Railroad
Silicon Valley FreeMo-N

peteski

  • Crew
  • *
  • Posts: 31687
  • Gender: Male
  • Honorary Resident Curmudgeon
  • Respect: +4529
    • Coming (not so) soon...
Re: Using an LED for the output on hard-wired decoder
« Reply #7 on: March 26, 2017, 03:30:48 AM »
0
I assume all resistors needed are the tiny surface mounts. Which are only available in bulk and from online sources meaning shipping charges? Can't any of the little resistors from the old DC lightboards be salvaged for this?  And are the numbers on them a way to determine their rating?

The shape or type of the leads or package is irrelevent. Only the resistance and power rating are important. But having said that, in N scale space is at premium and it is usally easier to hide the leadless SMD resistors. But if you were somehow able to fit a huge 1K 10 Watt resistor in your loco it would work identically to a tiny 1K 1/4W SMD resistor.

Yes, most resistors have their resistor value identified on the package.  Either by a series of color stripes or by a number.
http://www.electronicsteacher.com/tutorial/finding-the-value-of-a-resistor.php
Most SMD resistors use similar system, but digits replace colors and the tolerance vaslue is omitted.
http://www.resistorguide.com/resistor-smd-code/

As far as the power rating is concerned, most of the factory-installed resistors are rated for 1/4W.
. . . 42 . . .

jagged ben

  • Crew
  • *
  • Posts: 3054
  • Respect: +408
Re: Using an LED for the output on hard-wired decoder
« Reply #8 on: March 26, 2017, 05:26:11 PM »
0
... And the LEDS used on the lightboards for DC locos are not suitable for DCC use?

No.  And LED is an LED.  Feel free to remove the LEDs from your DC lightboards and hook them up to a decoder.  Also, take the resistor from the DC lightboard if you want, and use that with the decoder. 

1K ohm is overkill for most small LEDs as far as protection.  It's probably fine if you're modeling steam or transition era and don't care about having a really bright headlight.  If you're modeling modern diesels and want brightness then use something in 500-600 ohm range if you aren't sure of the rating for a precise calculation.   470 will be fine for 3mm LEDs as has been mentioned above.

As was said above, don't overthink it. 


jagged ben

  • Crew
  • *
  • Posts: 3054
  • Respect: +408
Re: Using an LED for the output on hard-wired decoder
« Reply #9 on: March 26, 2017, 05:28:51 PM »
0
[470 ohms] results in around 20mA of current through a white LED (in DCC decoders). That is acceptable for a 3.5mm LED, but it will also make it mega-bright.

If you've got light tubes, then it's likely not going to appear too bright.    If you're directly mounting LEDs to a shell, say for ditchlights, then yeah maybe you want something a little less bright. 

peteski

  • Crew
  • *
  • Posts: 31687
  • Gender: Male
  • Honorary Resident Curmudgeon
  • Respect: +4529
    • Coming (not so) soon...
Re: Using an LED for the output on hard-wired decoder
« Reply #10 on: March 26, 2017, 06:33:46 PM »
0
Light-conduits or not, headlight brightness is a personal choice (especially when doing custom-installs of LEDs).
As far as what current is recommended, yes the 3mm LEDs (often used in older models) oftne have 20mA as the operating current, but most smaller SMD LEDs specs recommend lower currents (10 or even 5mA).  They also have absolute maximum current rating which is higher than the operating current (usual 20mA).  Then there is a peak current specification which is not something we are interested in.  :)
. . . 42 . . .