LED and Resistor Wiring

One of the questions that members regularly ask is about the value of the resistor needed when wiring in an LED. For the majority of us, we have a 12V supply on the layout available for lighting and in that instance, the easy answer is you need a 1K resistor as a general rule of thumb. However, not all LEDs are the same and some even have the resistor already built in, so you really need to know a little bit about your LED and your electricity supply - in this example 12V DC.

Why we need a resistor

LEDs need protecting. On their own they are very low resistance and a high current flow will result if you simply connect it between +V and 0V. You might get away without one if you are connecting to a battery but beyond that, you run the risk of releasing the magic smoke!

How much resistance?

Well, here's where we can get technical, briefly. If maths is not your forte, skip to the next section!

Most common led's have around a 2V difference between their pins when working and consume about 20mA.  Now we know that we are supplying 2V to the LED and so we need to 'drop' the other 10V out of our 12V, across the resistor. Ohm's law tell us that Volts (V) is equal to Amps(I) multiplied by the Resistance (R). Swapping that round tells us that

R = V / I

So if we know that we have 10V to drop and the LED current should be  (no more than) 20mA

R = 10 / 0.02

which yields the result 500 Ohms

It can shorten the life of your LED to drive it at full current all the time and you won't find a 500 Ohm resistor anyway, so the general compromise is to use a 1K resistor as initially stated but this won't be at full brightness. If you want full brightness, then a quick reference to an E Series resistor chart will reveal that you could use a 510 or 550 Ohm resistor, if you happen to have one. Using a 550 Ohm resistor we can calculate the current thus

I = V / R

I = 10 / 550

I = .018 Amps or 18 mA

which is within our specification of 20mA

More than 1 LED?

Not a problem! Obviously, if you want to drive more than one LED, then the maths becomes more complicated and you need to know whether you are wiring them in Series or Parallel. Here's where we turn to the internet for help. If you look on our Weblinks menu on the Home Page and click 'Electrics', this will take you, not surprsingly, to a whole host of links all to do with, well, Electrics! Part way down is a link to 'LED Resistor Calculator'. This link will take you to a website called Hobby Hour.com with whom we have no affiliation but who provide a very easy to use LED Calculator. All you have to do is enter some basic information and press Calculate. This site is also very useful in that it provides a whole host of information and explains all the terminology.

So suppose you have a handful of LEDs that you acquired off a stand at a show and you want to wire in two yellow ones to a 12 volt DC supply. Apart from the colour, you may not know anything else about them other than that they do not have the resistor built in.

LED calc 10 percent

The information given in the above example was

  • that the supply was 12V (DC by the way, not AC)
  • the LED current was 20mA (milli - amps). Sometimes called the forward current. This is an approximation but if you know the current for your led, type it in.
  • Selecting the colour, selects an approximate voltage drop, again change it if you know the actual value.
  • Enter the number of LEDs - in this case two
  • Resistor precision: 10% is accurate enough for most people and means you will be using an easily obtainable, common value.
  • Series or Parallel? - Here we chose Series, i.e. one after the other in the circuit.

Press the Calculate button to reveal a circuit diagram and the fact that in this instance you need a 330 ohm resistor in series in the circuit. It even provides a picture of what the resistor will look like. The stripes on your resistor should be (in this case) Orange, Orange and Brown. The Gold stripe indicates that this is a 10% resistor meaning the actual resistance could be anything within 10% of 330 ohms

330 ohm resistor

A quick search on your favourite search engine will reveal a whole host of suppliers but be careful to ensure that your are ordering a 1/4 watt (or more) resistor. Anything lower could represent a fire hazard. Alternatively have a look at some of the suppliers listed on our website at https://www.mdmrc.org/commercial.html

 

There are, of course, other calculators out there and again a quick search for something like 'LED calculator' should be successful.

 

Wiring Up Your Components

led picOk, so you have your LEDs and resistors of choice. Where next?
Well, you will probably have two wires, a +12 volt and a 0V or ground. 
An LED is a Light Emitting Diode, the important bit here being that it is a diode. A diode only allows electricity to pass in one direction - from positive to negative, so you need to know which of your wires is which. A quick check with a voltmeter should sort that out for you.

 

Once you have that sorted, join the +12V to the resistor which can be soldered either way round. Join the other end of the resistor to the long leg (Anode)of the first LED. Then join the short leg of the first LED to the long leg of the second. You might want to do this using a spare piece of wire. Finally, join the short leg (Cathode) of the LED to the 0V wire and you should be rewarded with a glowing LED. Congratulations! An alternative method for identifying the anode from the cathode is to note that most 3mm and 5mm LED's have a small flat on one side of the lip at the base of the bulb.


Finally, if you have found this article useful, and we hope, interesting, you might like to know more about MERG which stands for the Model Electronic Railway Group. MERG is an international, UK based society promoting interest in the application of electronics & computers to all aspects of railway modelling and whether you are a complete novice or an expert, they will have something of interest to you. As a starter, you might like to download their FREE book, Electronics for Model Railways written by member Davy Dick and updated in 2020.

This is one of what we hope will become a growing library of Advice articles relevant to the Railway Modeller and if you would like to see further articles, please email us on This email address is being protected from spambots. You need JavaScript enabled to view it.  telling us the subject you are interested in.

Please note that all information in this article is given in good faith and without liability on behalf of the Charity or its members. If you do not feel confident in applying the information or techniques described, seek help or better still, join your local model railway club or modelling association. The link given is to the Chiltern Model Railway Association's list of affilliated clubs of which we are one.

This information is issued as, without any warranty of any kind, either express or implied,  including but not limited to implied warranties for performance or fitness for any particular purpose. Neither the author, the Club or the Charity shall be liable to the reader or any person or entity with respect to any liability, loss or damage caused or alleged to be caused directly or indirectly by this article. All trade names and product names are the property of their owners.