DCC and LED wiring basics - Book

Does anyone have a suggestion for a relatively inexpensive DCC / LED wiring book?
I would like to use LED lighting along the rails and throughout my
first module in buildings, etc. A book on wiring basics for DCC and LED/resistors is a must item going forward for me - preferably one with some color images, etc. of the examples being discussed and explained.
Question 1: Do you recommend using a secondary power supply for LED lighting and leave the rail power to its own power supply???
Question 2: NCE has a 5 amp power transformer. Can someone please tell me how many volts = 5amps. I am only familiar with the R = E / I equation (where E = Power Supply Voltage - Voltage across LED). I am unsure how to make use of 5amps in this equation.
Thanks Many Times Over!!! Matt
Add pictures here
✖
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
mc snipped-for-privacy@yahoo.com (mc snipped-for-privacy@yahoo.com) said...

That's a matter of personal decision. The size of your railroad will be a major factor. If your DCC system provides enough power for all your locomotives with room to spare, then why not power lighting with it?
One fantastic benefit of LEDs is that they use a small fraction of the power of incandescent bulbs. I have some 2-lamp street lamps that came with incandescent bulbs that required about 160 mA of current to operate. When I replaced each bulb with a surface-mount white LED, the current draw was only about 10 mA. I could now power 16 of these lamps with the same power supply requirements as one with incandescent bulbs. Your mileage may vary!
I use a separate power supply for building lighting, but that is mainly because I use a separate control system that is computer driven, so it is easier to power it off the same 5 volt supply as the computer system. That's a factor that affects my choice.

A common analogy used is to think of water in pipes, as this works well for direct current circuits or alternating current circuits with resistive loads (compressed gas in pipes is a better analogy if you are dealing with AC circuits with capacitance, but we don't need that here).
Voltage is like the pressure, while current is the actual amount flowing.
DCC systems actually put out an AC voltage that is about 16 volts. The NCE system has an adjustment if you have a reason to change this slightly, but you likely won't. Regardless, it is best if it does not exceed 18 volts.
The current rating (5A) of the system is the maximum current it is capable of supplying. Think about the maximum flow of water - if you have a 'water saving' faucet that only allows 2.5 gallons per minute to flow, that's all you will get, regardless of how much you open the tap. You might get less if the tap is open just a bit, but 2.5 is the maximum.
With the DCC system, not only is it capable of no more than 5 amps, but it also has circuit breaker protection that limits the output to 5 amps. That way, if a short occurs and current flow exceeds the limit, it shuts off the output. Unlike a circuit breaker in your home, you don't have to reset it manually. The system will 'test' its output every couple of seconds, and if it sees that the load trying to draw more than its limit is not there, it restores the power.
Every device you connect to that DCC system will draw current. If you have an LED to light a building that draws 20 mA (see below for how you do that), then your 5 A power supply has the capability of powering 250 of these before you reach its limit. Of course, the big power draw will come from your locomotives. I model in N scale, so most locomotive decoders tend to be rated for 1 A of maximum current, though most of my locomotives only draw about a third of that. If not actually moving and with all lighting off, the locomotive's decoder will only draw a few milliamps. I've never actually measured it, but I use current sensing block detection and the detectors usually cannot detect a locomotive stopped with no lighting. Not a problem for me, as my rolling stock has detectable wheelsets, but it is something I need to be aware of.
Your Ohm's law equation (R=E/I) is useful to know, but turned around so that you can calculate I from the other two: I=E/R
Also, for LED calculations (see below), you will need to find out R from E and I, so your original equation will be needed.
Given a load of a certain resistance, R and a supply voltage of E, you can calculate the current it will draw.
Now, for LEDs, you cannot simply measure their resistance. In fact, if you just hooked them up to the power, they would be instantly damaged (unless they have internal current-limiting resistors). An LED requires a current flow through them, and a relatively-fixed voltage drop will occur across it. This voltage drop will vary from one type of LED to the next, but it is generally between 1 and 2 volts. I like to use 1.5 volts as a rule of thumb as a starting point for figuring out the resistor needed to limit its current. As for that current limit, LEDs have a maximum current and if you exceed it, it will be destroyed. I like to keep the current under half of its limit, if I know it. More likely, you may know a rating of its brightness at a certain current (e.g.: 120 MCD at 15 mA). This rating will be well below the maximum current, so don't worry about being too close for comfort.
For another rule of thumb, most LEDs tend to have maximum currents above 30 mA, but many recent LEDs, especially white ones, will provide all the light you need down at 10 mA.
So, here is how you go about figuring out the resistance you need:
1) Take the voltage of the power supply that will be powering it, and subtract 1.5 (the rule of thumb voltage drop the LED will take up). Let's say this is 16 volts, so you will have 14.5 volts from this.
2) Take that voltage and divide it by the current you want through the LED. In our case, we'll use 10 mA as the current, so divide 14.5 by 0.01 and you get 1450. Since resistors typically have a 5% or 10% tolerance, they make certain discreet values instead of exact values. Take the closest value that is just higher than what is calculated, so a 1500 ohm resistor will do the trick.
3) Use this resistor in series with the LED and connect it to your power supply. The first time you do this for a particular LED, I suggest you use an ammeter (milliammeter) to measure the actual current to see how close to the 10 mA you are. You can adjust the resistance value as needed (higher resistance draws less current and vice versa).
Now, one word about DCC power. It is actually an alternating current, which means that the LED is actually only lit half the time, compared to powering it with a direct current. You will not see the flickering from this, but you will see that it appears dimmer than if powered by DC with the same resistance value. If you want the brightness increased, a lower value resistor can be used, but you should re-measure it on a DC supply to be sure that its current flow is within its maximum limit. Measuring current with an AC meter will not tell you what the peak is when it is flowing!
Also, there may be an issue with the reverse voltage when powering an LED from an AC source. The reverse voltage limit is the maximum voltage that can be applied to the LED in reverse before it breaks down. For protection from reverse voltage, you can add a rectifier diode in series with the LED/resistor. Something like the 1N400x family of diodes works fine. Now, this diode will have a voltage drop of about 0.7 volts, so in your calculations above, this will have to be included. That means subtracting 2.2 volts from your supply voltage. In any case, if you do the calculation without the diode and later add it, it will lower the current through the LED, so no harm is done - it will be slightly dimmer when lit.
Some like to use a full bridge rectifier (4 diodes) to power LEDs from a DCC system, but this is a bit overkill. If you need a tiny bit more brightness, simply lowering the resistor value will do the trick. Furthermore, since this LED is only drawing current half the time, you can add a second one for something else connected in reverse polarity without affecting the total current being drawn on the system. One will draw power when the AC polarity is one way, and the other will draw power when the AC polarity is the other way.
Hope this helps!
--
Calvin Henry-Cotnam
"Unusual or extreme reactions to events caused by negligence
  Click to see the full signature.
Add pictures here
✖
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
Excellent write-up, thanks!
Cheers, N.F.
Add pictures here
✖
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
On Jan 4, 10:10 am, Calvin Henry-Cotnam

Outstanding!!!
Thank you!
I was just pouring through some online LED/Resistor articles before returning to this forum to read your reply. Your in-depth example(s) have helped a lot. I will now re-read those other articles with a much clearer understanding.
I very much appreciate the time you took to spell this out so well!
Add pictures here
✖
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
mc snipped-for-privacy@yahoo.com (mc snipped-for-privacy@yahoo.com) said...

No problem. I am doing all the lighting on my layout with LEDs (buildings, street lamps, and signals).
Aside from the low power consumption, white LEDs that have a somewhat blue colour (as opposed to the warm white ones that tend to be more yellow) come far closer to looking like flourescent lighting than any incandescent is able to.
--
Calvin Henry-Cotnam
"Unusual or extreme reactions to events caused by negligence
  Click to see the full signature.
Add pictures here
✖
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
I am very much looking forward to making the necessary purchases so I can begin to play with all of these items. I hope to budget a substantial purchase sometime following our April taxes. An NCE starter kit and their 5amp power supply, some LED's, some resistors, one Tortoise machine, and some 14-guage and 18-guage wire should keep me busy for a while. I have some Walthers Code 83 track and Walthers Code 83 switches for this testing.
Again, Thank you! Matt
Add pictures here
✖
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
mc snipped-for-privacy@yahoo.com writes:

By the way, you can find insane deals on LEDs on ebay, just a few cents apiece for superbrights, for example. I've ordered from this guy before: http://stores.ebay.com/Sure-Electronics and was very happy with how fast he shipped my stuff. The resistors he often includes for free are not usually the ones you want since he works from a different voltage than DCC, but he also has really cheap resistors too. *
--
* PV Something like badgers, something like lizards, and something
like corkscrews.
  Click to see the full signature.
Add pictures here
✖
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
Thanks so much for the link.
I do anticipate some LED bulk purchases once I get things moving forward.
:Matt
Add pictures here
✖
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
PV (pv+ snipped-for-privacy@pobox.com) said...

Thanks for the link - I'm usually looking for sources for parts that I need.
I don't mean to be self promoting, but I have been doing some cleaning over the holidays and have a number of components to get rid of, and have put them up on Ebay. I'm not in the business of selling parts, so I'm just looking to cover the costs of the auction and running around to get them out with the lowest possible shipping price.
If anyone's interested, see http://www.ebay.ca/sch/calvinhc/m.html?_dmd=1&_ipgP&_sop &_rdc=1
I will make up a custom auction with the parts and quantites you want with an even better price. I just want to get rid of what I'm not using to make room for what I need. I may even have some small quantities of something you are looking for.
Now, back to our regular discussion! ;-)
--
Calvin Henry-Cotnam
"Unusual or extreme reactions to events caused by negligence
  Click to see the full signature.
Add pictures here
✖
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
On Jan 4, 10:10 am, Calvin Henry-Cotnam

I re-read your post, again. It is a terrific tutorial on LED lighting and resistors! Thanks Again for talking the time to put something together as in- depth as this post!!!
I am too far off from wiring to make any purchases at this time. Otherwise, I would be very happy to buy in bulk from your auctions. It is just impossible to even begin to assess what I will need, including quantities. I just wouldn't know how to make such determinations at this juncture.
BTW, once I buy the NCE starter kit with separate power, if I just connect the two bus wires and turn it on, would a multimeter, set to voltage, give me the actual voltage reading that is stated on the power transformer itself? I ask because I have a Fluke multimeter on my "to get list". I have never used one, but the many Youtube videos that I recently viewed certainly confirmed the importance of having a multimeter for this hobby.
If I can get accurate voltage readings from the bus wires and/or from the terminal strips using a multimeter, the whole resistor calculation process would be quite straight forward. The equations are fine for me if I know the inputs. And, voltage is the one that I will need. I believe that the resistor packaging includes Voltage across the LED and the mA.
Confirmation example:
Power 5V LED 3.7 V LED 20mA
(5V - 3.7V) / (20/1000) = 65 ohm (*select the next highest resistor made*)
Add pictures here
✖
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
mc snipped-for-privacy@yahoo.com (mc snipped-for-privacy@yahoo.com) said...

You will have to use an AC voltage setting, because the output for your track bus is a square wave AC. The meter will read the RMS voltage, not the peak.
What this means, more or less, is that the value when used with ohms law on a resistive load will allow you to calculate the RMS current, and when used with power calculations (P=E*E/R) will give you actual power.
It won't be the same voltage you would read if you measured the output of the transformer. I use NCE's system with a transformer rated at 15 volts and 5 amps.
The actual voltage I read on the output of the transformer is 16.5
The track output of the DCC system is 19.4 volts. Why is this voltage higher? The simple answer is that the meter is measuring RMS voltage and the input is a sine wave, making the RMS about equal to the peak voltage divided by 1.4 (or the square root of 2, if you want to be exact).
The output of the DCC system is a square wave, which has a higher RMS voltage than a sine wave with the same peak.
I have never adjusted the output voltage of my DCC system. The power from the bus has to pass through a detection circuit that drops it about 1.5 volts, so when measured at the track, it is about 17.9 volts.

While it would be nice to have the actual system to measure the actual voltage you will have, you don't have to be that accurate. Using 18 volts would be perfectly fine, after all, resistors are not perfect and have a tolerance of either 5% or 10%, so even with measurements, the resulting current through the LED will be out by this tolerance any ways.
Since you are not likely planning to push the LED to its maximum, and are probably limiting its current to only about a quarter of that limit, being out by 20% is no big deal. If you are out by 10% on the voltage, and the resistor has a 10% tolerance, you are within that 20% variance!

That is correct, so you would use a 68 ohm resistor.
If you have 10% tolerance resistors (silver is the last stripe), the values available are multiples of:
1.0 1.2 1.5 1.8 2.2 2.7 3.3 3.9 4.7 5.6 6.8 8.2
If you have 5% tolerance resistors (gold is the last stripe), the values available include the above, plus values roughly half way in between:
1.0 1.1 1.2 1.3 1.5 1.6 1.8 2.0 2.2 2.4 2.7 3.0 3.3 3.6 3.9 4.3 4.7 5.1 5.6 6.2 6.8 7.5 8.2 9.1
--
Calvin Henry-Cotnam
"Unusual or extreme reactions to events caused by negligence
  Click to see the full signature.
Add pictures here
✖
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
mc snipped-for-privacy@yahoo.com writes:

You're going to laugh at the obviousness of the name, but www.wiringfordcc.com is a pretty good site.

LEDs are pretty easy to work with. They are a current-based device - you can run them at almost any voltage (above about 3 volts anyway) - all you need is the proper resistor. Most LEDs pull about 20 milliamps (.02a), so you can feed that into ohm's law to figure out the resistor.
A nice calculator: http://ledz.com/?p=zz.led.resistor.calculator
If you can't figure out the voltage drop or current requirements from a datasheet, it's fairly safe go with 2 volts for red, 3.5v for other colors, and 20ma (.02a) current. But if you can get the right numbers, do so! Some superbrights have different requirements.
A couple other things to remember: - LEDs only emit light when the current is running in the proper direction when fed from DC. Make sure you know which leg is which, and test before you seal everything up! - Put the resistor on the positive, not the ground leg, of the LED. That way, an accidental short to ground won't fry the LED.

It depends how many LEDs you want to run. If you're going totally hog wild, go with a seperate power supply. One or two here or there, feel free to leech off of track power - LEDs individually pull very little current.

DCC can run at several different voltages depending on scale - it's likely to be 16 or 18 volts AC, and almost definitely will be printed somewhere on on the transformer. There's always a voltmeter if you're not sure. Note however that reading voltage from the track (instead of the supply) will give a different answer, possibly a wildly different answer because of the odd tricks DCC plays with power to send the signals to the decoders. A modern RMS voltmeter set to AC should work fine, but an ancient one (if it has a needle, forget it) will often give a misleading result. If you want to put a current meter in your layout (and that's actually a nice thing to do), attach it between the power supply and the booster, not between the booster and the track. *
--
* PV Something like badgers, something like lizards, and something
like corkscrews.
  Click to see the full signature.
Add pictures here
✖
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload

Polytechforum.com is a website by engineers for engineers. It is not affiliated with any of manufacturers or vendors discussed here. All logos and trade names are the property of their respective owners.