visit sierrawestscalemodels.com

Realistic Lighting Using Light-emitting Diodes (LEDs)

I came to a mental roadblock on Dueling Shacks, and as I've looked at starting on either E J Whiley or Quincy's Salvage. I like having a plan as to how I will do something, and in each case, I've wimped out when it comes to lighting. So I figured that I needed to grab the bull by the horns and figure this out. One of the big stumbling points is that when a LED is hooked up it is unrealistically bright for most normal applications, and I was uncertain as to how to grapple with predictably reducing the intensity of the lighting. So I decided to turn to a knowledgable source of information to ask some questions.

I have done most of my research through information at ngineering.com. I talked with them and got some very good clarifying information that set me on this path. What I would like to share is some of the practical application information to hopefully demystify the application of LEDs in our models. I will also share how I have constructed an LED test and intensity-adjustment platform.

To get to the application end of this subject, it is necessary to wade through some theory to understand the application, especially when it comes to adjusting the brightness of the LEDs.

I hope you will let me know if this subject is of interest, or if you have any knowledge to add to the subject. I'll continue with the subject in another entry.

Mark
«1

Comments

  • Many are intimidated with anything electrical. As you now know, with a few easy basics, LED's can really add to a model. Please, bring it on. Rick
  • I will not build another diorama that does not have lights. You are on the right track asking Tim at nGineering. Great guy and very helpful. I consult with him on my installs just to make sure I don't short anything out.

    I put a dimmer on a string if lights in my shadow box diorama. I really like the effect. It is a plug-in vs battery operated though.

    I don't fully understand the theory either but when I want to do a project. I get the basics down of what I want to do then email Tim.

    Post specific questions and I'll bet you can get some good answers...or at least a starting point.
  • The Evan Design LED lights are pretty simple...and available in multiple sizes and "warmth's".....I'm looking at those now....they run off the 3v button batteries...
  • Mark, I appreciate your willingness to explore this subject. Bring it on and educate me!!! Phil
  • As some of you know, engineers have a reputation for making things more complicated than need be. Hopefully, I may be able to avoid that in this discussion that has some technical knowledge as its foundation.

    Let's start with a discussion of some basic electrical concepts that will help us all understand some of the unique aspects of LEDs. A simple analogy may help the non-electrically minded modeler. Let's consider a water hose that has one sprinkler at the end of the hose that we are using to water our lawn. As we turn the water on at the faucet, water starts flowing, filling the hose, and we see some water coming out of the sprinkler. As we keep opening the faucet, the pressure in the line increases, more water flows, and the sprinkler puts out more water covering a greater area. There are direct parallels to this example and a circuit with an LED in it.

    In our example, the water pressure in the hose is equivalent to the voltage at any point in the wire. The flow of water in the hose is analogous to the flow of electricity or current in the wire. The spray of water out of the sprinkler is equivalent to light coming out of the LED. I'll let you think about that for a minute.

    Now let's add a wrinkle. The sprinkler is near my kid's sandbox and I don't want to get the sand wet, so I can only run the sprinkler to cover a certain area. If I kink the hose, It puts resistance in the line reducing the pressure and flow of water, so I can adjust it to just cover the area I want. A resistor in a circuit does the same thing as that kink, it reduces the voltage (pressure) and current (water flow) to reduce them to the level we need to operate an LED. This is exactly the concept we will use to reduce the intensity of the LEDs to a level that is realistic for our models.

    Now as we will find out voltage and current (water pressure and flow) are directly related: more voltage -> more current, less voltage -> less current. Really, the whole crux of the issue with LEDs is that if we pass more current (water flow) through them than they are designed for, they fail.

    Keep this simple illustration in mind as it will help you understand the technical details.

    Terms we need to know:
    Voltage - the electrical potential in our system, expressed in volts (V)
    DC Volts - direct current voltage, think of a battery, with + and - terminals. The electricity only flows in one direction (VDC)
    Current - a measure of the flow of electricity, expressed in amperes, or amps (A)
    Milliampere, or Milliamp - 1/1000 of an amp (mA)
    Resistance - opposition to the flow of electrical current, expressed in Ohms (Ω)

    So here is the diagram of a simple circuit with the following components:
    A power source (power supply or battery) shown at the bottom of the diagram
    A simple switch, shown on the left side of the diagram
    A resistor, shown by the zig-zag symbol
    An LED (A = anode, C = cathode)
    circuit
    I want to pause a minute and give thanks to Tim Anderson at Ngineering.com who has been an amazing help. I have his permission to share information from ngineering.com. There are many sources of LEDs, but I use his products so those are the only ones of which I have any real knowledge.

    Coming up: Some of the technical details. I hope this is proving interesting to some. Please let me know if I am missing the mark or if you have any questions as we go along.

    Mark
  • "Missing the mark"!..nice. My only comment is, if you're going to do this tutorial...pull out the stops and school us properly...don't leave anything to chance. Love the the idea you have here so include pics, diagrams, products, etc...thumbs up.
  • Mark, great start to the tutorial. Keep it coming. Phil
  • Mark,

    I have a reserved seat in the lecture hall front and center. Looking forward to each installment.

    Later, Dave S. Tucson, AZ
  • I think that Ken thinks you are getting to technical and sounding like an engineer. I know I do. And my problem thru this whole process over the last year, depending on what web site you go to, you are going to find different answers to how to wire the LED's. You can go to Evan's site, and they will tell you something else than what Tim will tell you. Very confusing,
  • I am going to post more later guys but have a meeting the next couple of hours. Steve, I too was confused and even asked Brett if I should venture into this. My hope is that this will give everyone enough information to be able to take any system on with a good understanding of what they are doing.

    The test platform I laid out will let you test LEDs and even test them in the model for the desired effect. It will just take me a little time to wander down that path.

    Thanks all, for coming on the journey.

    Mark
  • no, thank you for putting on this clinic. its very timely for me as i have some leds being delivered this week, looking forward to future installments.
  • All right, rolling up the sleeves. Time to dust off some of the dust from the math or physics books as you choose. There was a guy named Ohm, electrician, not Maharaji, who came up with some relationships about the different elements of an electrical circuit. This equation will be used in different forms to help us identify the unknowns we will be looking for.

    I = V /R
    where:
    I = Current in Amps
    V = Voltage in Volts
    R = Resistance in Ohms
    This is the equation we use when we know voltage and resistance and are looking for the current.

    If we are looking for the voltage drop, and know the resistance and current, the equation is:
    V = I x R

    If we want to find the resistance across a device and know the voltage drop across it and the current flowing through it. then the equation is:
    R = V / I

    A practical example:
    These specifications are typical for LEDs we might be using.
    LED Specs

    The key values we are looking for in these specs are the recommended forward voltage (3.2 V) and the recommended operating current (20 mA).

    Let's use the examples that have been mentioned in this thread to identify the components on in our simple circuit.
    circuit

    Depending on our system, we will know our power supply voltage, but we need the value for the resistance to drop the voltage down to the level needed for the LED we are using. So we know the LED voltage (Vd) and operating current (I), and power supply voltage (Vps) so let's find the resistor we need for full intensity.

    For a 12 VDC power supply
    R = Voltage Drop Required/Current = (Vps-Vd)/I
    R = (12 - 3.2) / 0.020 = 8.8 / 0.020 = 440 Ohms
    The required power is determined by multiplying the current times the voltage:
    Power = Vps x I = 12 x 0.020 = 0.24 watts
    If there is not a resistor that exactly matches this, we want to use a standard resistor with the next highest available resistor.
    For Ngineering, this would be a 453 Ohm, 1/4 watt resistor.

    For an 18 VDC power supply
    R = (18 - 3.2) / 0.020 = 14.8 / 0.020 = 740 Ohms
    Power = 18 x 0.020 = 0.36 watts
    For Ngineering, we would use a 750 Ohm resistor, 1/2 watt resistor

    For a 9 VDS power supply
    R = (9 - 3.2) / 0.020 = 5.8 / 0.020 = 290 Ohms
    Power = 9 x 0.020 = 0.18 Watts
    For Ngineering, we would use a 301 Ohm 1/4 watt resistor

    So now we have seen how we can identify the resistor in a single LED circuit. These calculations will work with any manufacturer's LEDs and resistors, you simply need to know the recommended forward voltage and recommended operating current for the LED, and the voltage of the power supply you are using.

    Please ask any questions you might have.

    Next Installment: What if I have more than one LED in the circuit?

    Take care,
    Mark
  • Thanks Mark, very good explaination . Makes me go back to my teenage years at school. The only thing, led didn,t exist.... :smiley:
  • Mark, let me see if I understand. If I'm using a 9 volt battery as the power supply and I don't used the recommended resistor of 290 Ohms, I would blow out the led - right? Also, I don't entirely understand the math, but is the voltage required for most leds 3.2?
  • I am in the process of adding LED's to my sawmill. I will wait until Mark has completed his tutorial before I post anything.
  • Phil, thanks for the question. You'd have to look at the specifications for your LED. The ones I've looked at all have a Recommended Forward Voltage of 3.2 -3.6 VDC, so yes, it appears likely that your LED is in that range. The key is the recommended current rating, which for these is 20 mA. The maximum current is 30 mA. So unless you are using a really large LED, yes, the LED will fail.

    The 3.2 Volts for the LED is what is required for it to turn on. That really is the voltage drop across it. So if we have less than that, it simply will not light. If we have more than that, we will push more current through it, and if it is above the maximum current, it will fail. (It doesn't really blow up, the light just goes out permanently.) So what we really need to look at is to provide the voltage necessary to supply the voltage drop across the LED, and calculate the resistance we need to provide 20mA to properly power the LED to full illumination.

    So looking back at our example of a 9 V power supply, If we going to lose 3.2 V across the LED, then we need to add a resistor to dissipate the remaining voltage (9 - 3.2 = 5.8V) at 20mA (the desired operating current for the LED). By the way, 20mA = 0.020 A. This gives us the formula:

    5.8/0.020 = 290 Ohms.

    A standard resistor is not available in this size, so we choose a resistor with a higher resistance that is closest to this value. In the example above, that would be a 301 Ohm resistor.

    I did some checking and found a listing of common resistor values, so these should be available pretty much through any source.
    Resistor 1
    Resistor 2

    In my previous post, I said the next subject we would look at would be what we do if we need more than one LED. As I look at Quincy's I am looking at lights in the garage, maybe one in the shed, and then likely a couple of exterior lights for illumination after dark. In all likelihood, I would want these to be turned on at different times and certainly would want different intensities of illumination between the internal and external lighting.

    So that brings us to a discussion of wiring architectures. As I mentioned before, I'll use Tim Anderson's drawings from Ngineering as he has given me permission to do that and they are really quite good.

    If they are wired so that they branch from a common wire and all land on the same return wire, that is called a parallel circuit as can be seen in the drawing.
    Parallel

    As you can see from the diagram, each branch has the same beginning and ending voltage, but as you add branches the current for each branch is added so that you are drawing the sum of the branch currents from the power supply. This also is important from the perspective of wire size.

    If all multiple LEDs are wired one right after the other on the same wire, that is called a series circuit.
    Series

    Reflecting on the example of water, you will get more flow through a garden hose than you will through a drinking straw. But if you are only drinking from a glass, the extra capacity of the hose is meaningless. Similarly, when you look at the really small amount of current being carried for the LEDs, you really only need a really small wire. Just for a comparison, 18 AWG is 0.04" diameter and can carry 10 amps. 38 AWG is about 0.004" in diameter (.19" O Scale, 0.35" in HO Scale )and can carry 31.4 mA which is easily enough to carry the current for a series circuit providing 20mA to the LEDs. So we can use really fine wire for wiring our lights. If you've seen some of the threads here, the wiring for LEDs can easily be hidden in the model.

    There are some general rules for implementing these circuits:
    1. In a parallel circuit, the voltage is the same through all components (LEDs), but the current is divided through each.
    2. In a series circuit, the current is the same, but the voltage is divided.
    3. In a series circuit, the sum of all LED voltages should not exceed 90% of the supply voltage to ensure stable LED light output.
    4. In a series circuit, all LEDs should have the same voltage (Vd) and current (I) properties.

    As we look at each of these two architectures, presuming we are using our same LED from before, each branch in the parallel circuit would have one 301 Ohm resistor and one LED with a forward voltage of 3.2 V.

    But the series circuit presents a different issue as we have three devices all in a row, so we need to count the total of their voltages in determining what resistor we need to use.
    I use a 12 regulated power supply, and LEDs with 3.2 V forward voltage. Our equation for resistance then becomes:
    R= (Vps - (Vd1 + Vd2 + Vd3) / I = (12 - (3.2 + 3.2 + 3.2) / 0.020 = (12 - 9.6) / 0.020
    R = 2.4 / 0.020 = 120 Ohms. So from the resistor listing above, we see that we would use a 121 Ohm resistor in this series circuit.

    So that really is the basics that will underpin all wiring that we do.

    I got everything up to this point pretty readily. If it is a bit heady for you, don't worry, I R an ingineer so I'm supposed to be able to figure these kinds of things out. But I don't want the LED's full-on intensity for a 1930s era railroad. I get that I will need to add a larger resistor to give less current to dim them, but how much?

    When I asked Tim Anderson this question, he said, "It depends on how bright you want them, and only you can tell that." Tim also said one thing was really important, and that was to test, test, and test at every stage of construction. Because it is far better to find out that something doesn't work before you button everything up.

    And from that, came the idea to construct a test stand for testing the wiring of individual LEDs and to be able to dynamically adjust the current to the LEDs to get the intensity of illumination I wanted.

    And so that is where we will go next.

    Mark
  • I wish to add my thanks for Mark’s tutorial. I’ll resist (!) the temptation to call it electrifying or shocking. Hang in there guys, I studied all this stuff too. The difference is, Mark passed the courses! This can be dense science, but it is very much worth your study. There’ll be a lightbulb (LED) moment and it will become clear(er) and natural to your planning. Experimenting with cheap (and disposable) LED’s and cheap (and bombproof) resistors is entirely similar to the A+I/chalk+alcohol/paint+mineral spirits tests we do with our stripwood.

    I’m looking forward to subsequent installments. Thank you, Mark.
  • Thanks, Tom,

    My hope with this thread is to demystify this subject so everyone is willing to give it a try. Tim Anderson has prepared loads of documentation on his site with the intent of helping everyone. He really is a pioneer in this field and entered into it through model railroading. Just for a starter, if anyone wants to jump into a real treatise on this, you can see the document I have referred to for this at: https://ngineering.com/led_circuits.htm

    My next post may be delayed a bit, as I have to either scan my hand drawings or create a CAD drawing of my plans for the test station. I have it partway assembled, but decided to start the thread midway so I could fairly convey some of my wonder, frustration, or successes as they happen.

    I want to extend my deepest gratitude to all who contribute to this forum. It has been invaluable to me.

    Mark
  • Hi Mark,
    Wow, this is a great tutorial and hitting all of the right points. I add lights to my dioramas as well and thought I'd add a few things I have learned to add to your work. The last diorama I wired was Brett's HO Deer Creek Mine, which had about 12 Led's throughout, as well as a flickering burn barrel. There are pictures in an old thread of the build and lighting.

    1) Managing the light colour/brightness: I use "Amber Gallery Glass" directly on top of the LED once I have wired and installed them into the shade. You can vary the amount of GG applied to get the desired colour/ brightness. It takes away the brightness and leaves an amber tint similar to incandescent bulbs.

    2) Series vs Parallel: I run single LED circuits back to a perf board (usually 2" x 3" board) under each diorama. I never couple leds in series or parallel. Although I have done the math work for both scenarios I prefer to have a single resistor for each led so that I have the option of tinkering with voltage. It's also the simplest approach to both wiring and testing things for me.

    3) Wire: 38GA magnet wire from Ngineering.

    4) LED's of choice: Size: 0603, Colour: Warm White, Rated voltage: 3.0 - 3.2V

    5) Resistors: I have found that using higher value resistors provides a closer/more accurate colour and brightness. Greater than 1K Ohm. On my current build I have used 4.7 K Ohm and 10 K Ohm.

    6) Testing: I do many lighting tests throughout my builds to make sure brightness and colour are right for the setting/light type.

    7) Terminal Blocks for Perf Board: I purchased about 100 small screw type terminal blocks that are invaluable to use as you build your diorama electrical circuit. You can find them anywhere but mine are "5.08mm Pitch Panel KF301-2P KF301-3P Screw Terminal Block PCB Connector". I mount these to the perf boards which allows for flexibility during your diorama build and testing.

    I am really Looking forward to the rest of your thread Mark.

    Mike

  • Thanks for the kind comments. I hope it is clear that I am writing this from the perspective of someone wandering into this grasping the technical, but wanting to grasp the practical before goofing up and having to tear something out. Been there, done that, have the t-shirt.

    I really want a test stand that can be adapted to a number of different applications. So here are some of the criteria that I selected:
    Able to be adapted to different power supplies
    Easy to replace any component
    Designed so as to protect the LEDs
    Be able to vary the intensity of the LEDs
    Be able to measure the resistance needed to achieve the desired intensity
    Be able to measure current in the circuit at the desired intensity
    Have the ability to test an LED installed in the model

    It is always easier to sketch out plans ahead of time in order to modify something on paper before it is built, which is normally cheaper and faster as well. I had originally intended to use one of the Ngineering power distribution boards to experiment with wiring it, but as I was drawing things out, I realized it was unnecessary for the test stand, but I left provisions in the design to accommodate one in the future if desired.

    Here is the schematic of the test platform now:
    Test Circuit
    As you can see that the circuit has five fixed elements in the circuit: a power supply, protective resistor, potentiometer, current test switch, and on/off switch. The LED shown is the LED to be tested.

    Power supply - use a well regulated, switching power supply, not just the cheap wall mount battery replacers. Any power supply between 9 and 18 VDC should work well. It makes sense to use the same power supply that you will use to power your LEDs, whether on a layout or diorama.

    Resistor - This resistor should be sized to reduce the voltage to the recommended forward voltage of the LED being tested. This will protect the LED to ensure that we will never provide more voltage than what is needed for full intensity. In general, the sizing we discussed previously should work well. Remember, the resistance will be dependent on the voltage of the power supply used:
    9 VDC - Use a 301 Ohm 1/4 watt resistor
    12 VDC - Use a 453 Ohm 1/4 watt resistor
    18 VDC - Use a 750 Ohm 1/2 watt resistor

    Resistance Test Points - These two terminals allow you to easily measure the resistance across both the resistor and the potentiometer to determine the resistance needed for a desired level of intensity in the LED.

    Potentiometer - This is a fancy term for a variable resistor, like a temperature control switch on a heating element. I would recommend using a 5K Ohm, wire-wound potentiometer. I have both multiturn and linear potentiometers that I will see which one works best. This will add a resistance above the base level for the LED and will reduce the current through the LED to lower the intensity.

    Resistance Test Points - These two terminals allow you to easily measure the resistance across both the resistor and the potentiometer to determine the resistance needed for a desired level of intensity in the LED.
    *Note: the On/Off switch should be turned off when measuring resistance, so as to get the correct reading.

    Current Test Switch - This is a single-pole, double-throw (SPDT) switch that is used to switch the circuit so that the current in the circuit can be measured with a multimeter connected to the two test terminals.

    On/Off Switch - This switch energizes the LED. It also is used to isolate the circuit from the LED to accurately measure the resistance across the resistor and potentiometer.

    Connection to LED - I concluded that instead of hooking the LED to terminals, I would include test leads with alligator clips which would give me the ability to connect to a circuit on a model in case I wanted to test the lighting effect in place.

    Please ask any questions you might have. The next stop will be the layout of the actual test stand and wiring schematic.

    Mark
  • You really are welcome, Ed. As I think through this, this testing platform will let you measure the right resistance for one LED, it will also give the correct current to use if you are calculating the proper resistance for a series circuit with multiple LEDs.

    I am about 1/2 way through constructing the test stand, but will finish it up likely on Saturday, and will be able to show some pictures and results then.

    My hope is to post a sketch of the actual wiring diagram I'm using for the test stand so it should make it easier for someone unfamiliar with electronics to wire it together.

    Thanks again for the kind remarks.
    Mark
  • I've been using the Evans Design lights for a few projects....one of which will be my Repair facility diorama.....they are available for several different power sources....from 3V to 5-12V to transformer. They are available with the correct resistor already wired in...even switches....also available in warm and cool white intensities....
  • Are the resistors for full or dimmed intensity?

    Mark
  • The Evans Design LED's have a resistor for max brightness at 12V. Since they have the resistor already in circuit, I start adding more resistance until I get the desired intensity. Being prewired is the biggest advantage, since soldering wires to a SMD (surface mount device) LED is beyond most modelers ability. Rick
  • My experience so far leads me to agree with you, Rick. My thought was that buying a pre-wired LED without the resistor would make it easier to mount in the model, and then all you are left with is adding a resister of the right size for the intensity you are looking for. That formed the basis of this design. It is totally manufacturer/supplier neutral and will even work for grain of rice light bulbs if desired. None of the components in the test stand are manufacturer specific. As a matter of fact, I ordered the potentiometers from an electrical parts house which also carries resistors.

    Hopefully this approach makes it simple and flexible. Thanks for the ongoing input.

    Mark.
  • waaaaay beyond my abilities but I am so appreciative of your efforts here Mark. What an amazing amount of information. Thank you!
  • engine909 said:

    Brett, I believe nothing is beyond your capabilities. We maybe rooting for the Braves.

    The Who?????

  • I hope everyone had a really good weekend. In typical engineering fashion, I looked at what I had laid out for a schematic, and thought, "Man, you've made this more complicated than you had to, Mark!" So I went back to the drawing boards to simplify it. Then I figured I had better make sure it really worked before telling anyone how to wire or construct it. So I will show you where things are and then backtrack if there is an interest.

    Also, I started this off commenting on how this really was my first exposure to wiring LEDs. I've got to tell you, that if you simply follow the directions, it really is quite straight-forward. I can see where wiring your own gives you some level of flexibility and frankly, it really isn't hard. Here is a picture of the very first LED I've ever wired.
    smLED

    And guess what? It worked the first time! No problems.

    So I actually completed the schematic and wired the test stand. Here is a picture of it as it looks.
    smTest Stand

    The first knob adjusts the intensity of the LED, the switch that is next, allows you to switch the circuit over to measure current, the second switch is used to either turn the LED on or to turn it off. You measure the resistance in the circuity with the LED off.

    The clothespin is what I chose to use to hold the LED. You can see the two leads for connecting to the LED. They are over 21" long each which should allow easy connection to a model sitting nearby. The four-terminal block on the front of the test stand is where you connect a multimeter to measure resistance or current. The left two are for resistance, the right two are for current.

    It was really hard to effectively photograph the LED to show intensity when I took a photo of it directly, so I placed it inside of a wire spool to see the effect of the changes more indirectly. The next three shots show differing intensities of the LED.

    Full Intensity
    SMHigh Intensity

    Medium Intensity
    smMedium Intensity

    Low Intensity
    smLow Intensity

    I measured the resistance and current flow for each of the three intensities:
    Intensity Resistance Current
    High 453 Ohms 19.47 mA
    Medium 1440 Ohms 6.4 mA
    Low 2760 Ohms 3.37 mA

    I'm happy that this works and should be really helpful. With this information, you can determine what you need to do to properly wired LEDs in series, such as a string of streetlights, or a series of lights illuminating the inside of a terminal or work area.

    I'd like to continue on with that discussion in the next post. Also, I'm happy to share the schematic and give a list of materials if that will be of interest. I took some in-process photos showing how I mounted components, wired them individually, and then photos showing how to wire the components together on mounted terminal blocks.

    With a little bit of time and some simple electrical wiring, you can do this too.

    Thank for following along.
    Mark
  • Your solder job looks a lot neater than mine usually do.
  • Hi Brian
    I learned some things and just followed the techniques that are on the ngineering website. It's kind of like reading Brett's construction manuals. You come out doing better than you thought you could do. :)
    Mark
Sign In or Register to comment.