Jump to content
 

LED resistor query


daz9284
 Share

Recommended Posts

morning all, I have searched the forum for a reply, but the serch function on the site isn't the greatest.

 

I have recently fitted a headlamp to a Hornby 08 and used a LED for the light source. as per the LED suppliers instructions I have fitted the resistor to the +ve leg. however on the instructions I have for the Hornby decoder it shows a wiring diagram with the green aux 1 wire and says the resistor is on the -ve leg.

 

which one do i go with?

 

many thanks

Darryl

Link to post
Share on other sites

  • RMweb Premium

It doesn't matter electrically.

 

The reason that they are different is that most circuits use the -ve as a common and feed devices from the +ve via a resistor

However DCC decoders have the +ve as a common, so generally feed the devices via a resistor from the -ve (i.e. the aux outputs)

 

As long as the +ve lead of the LED goes to the common +ve and the -ve to the aux output it will work

 

 

 

Edited by melmerby
  • Agree 1
Link to post
Share on other sites

It doesn't matter.    All that matters is that there is a resistor in series with the LED.    So, pick one approach and stick with it, so all your own wiring is done the same way.  

 

The Aux output of the decoder will be negative.   The positive is either the "blue" wire, or one of the pickups to the track (can be either, must NEVER be both). 

 

Nigel

  • Agree 1
Link to post
Share on other sites

cheers for the replies guys. another question, if I want two leds for headlights, does it matter if i wire them in parallel with a resistor each or wire in series with one resisitor? I am not after very bright lights hence thinking that in series would be ok.

 

many thanks

darryl

Link to post
Share on other sites

Ah, now you're getting into the dangerous LED theory area...

 

Dead simple is:  one LED, one resistor for that LED.   Works every time, you can adjust the resistor to get a suitable brightness before any tweaking in decoder CV values for output brightness. 

 

Two in series, will work,  you get two voltage drops (over the two LEDs).  At about 3v per LED, there is enough on the decoder output (say 12v to 15v) to cover it.    Theory calculations would then say a lower value resistor, but try the original one, and see what the brightness looks like.    

 

What is a bad idea is two LEDs in parallel with only one resistor  (could go into theory, but I'll stop at "bad idea" ). 

 

 

  • Agree 1
Link to post
Share on other sites

  • RMweb Premium
48 minutes ago, Stephen Freeman said:

I have read that theoretically the resistor should go on the positive, in practice both work, I take Nigel's Dead Simple approach, also when using LEDs with signals don't try to use the post as path for one of the feeds much safer to stick with 2 wires.

There's no theory that the resistor should go in any particular leg, electrically it makes absolutely no difference.

It's just normal practice to put series resistors in the lead that goes to the "supply" with the other leg going to ground/common.

The supply can be +ve with a -ve common or it can be -ve with a +ve common.

 

As the common connection on a DCC decoder is positive it is usual to put any resistors in the feed from the AUX (Function) output which is -ve.

Link to post
Share on other sites

Just follow the instructions, 80% of the time it will be fine. 
LEDs in series are a bad idea, even if you have the same colour make and batch of LEDs you can get variations in brightness, and fault finding becomes a nightmare, If you mix colours some combinations just won't work.

Its really easy to destroy an LED while soldering it and even easier to destroy it by applying 12 volts without a resistor.

Link to post
Share on other sites

  • RMweb Premium
57 minutes ago, DavidCBroad said:


LEDs in series are a bad idea, even if you have the same colour make and batch of LEDs you can get variations in brightness, and fault finding becomes a nightmare, If you mix colours some combinations just won't work.

 

That might have been the case when LEDs first became popular but these days you will not notice any difference in LEDS of the same type

It's quite normal to have LEDs in series in lighting applications. Check out 240v Bayonet capped lamps, the LEDs are in series connect clusters, typically 8 or more in each group.

The more you put in series the less voltage drop is necessary from the control circuit.

Link to post
Share on other sites

cheers for the replies, it is really appreciated. the main reason i was asking arout leds in series is that i'm just about to fit lights to a Hornby sentinel and space is limited. the resistors that were supplied with the leds are the large ones which are about 5mm long by 1mm wide and 1K-ohm.

 

many thanks again

darryl

Link to post
Share on other sites

You can get smaller resistors.   "Metal film" are usually a lot smaller body size than "Carbon film" as resistors with rigid wires on them.  Or there are surface mount examples, where you can get down to below 1*1*2mm.   Resistors cost, at most pennies at electronics suppliers, and often fractions of a penny. 

 

- Nigel

Link to post
Share on other sites

50 minutes ago, Nigelcliffe said:

You can get smaller resistors.   "Metal film" are usually a lot smaller body size than "Carbon film" as resistors with rigid wires on them.  Or there are surface mount examples, where you can get down to below 1*1*2mm.   Resistors cost, at most pennies at electronics suppliers, and often fractions of a penny. 

 

- Nigel

 

cheers mate, I know virtually nothing (apart from some basics) about electrocincs so sorry for sounding dumb. those surface mount resistors look tiny and very delicate to solder to.

 

the resistors I have are 1K ohm so to reduce the led brightness shall i buy various resistors with differing resistances, such as 10k, 20k, etc to 100k. or do you have another preference?

 

many thanks

darryl

Link to post
Share on other sites

Surface mount come in three common sizes;  small, just about visible, and need serious magnification.    Use them if really stuck for space, or if you're comfortable handling such small things.  Easier to use on scraps of thin printed circuit board (comes as thin as 0.3mm), though it is possible to attach them to wires if your techniques are good, and you can hold things down (blue-tac, cocktail sticks, etc.. all help with holding things).    

 

"Through hole" resistors, in metal film of 0.125W power handling are probably the balance between easy to handle and small size.      

 

I'd suggest having to hand for typical LED installations:   470ohm, 1k, 1k5, 2k2, 3k3, 4k7, 6k8, 10k.     Something in there covers most LEDs and sensible brightness for most model uses.   

 

eg, from CPC Farnell (of many suppliers)

https://cpc.farnell.com/webapp/wcs/stores/servlet/Search?catalogId=15002&langId=69&storeId=10180&categoryId=700000011452&pf=110075165,110093484,110019954,110019955,110078466,110086180,110005242,110102929,110073939,110105542,110034984,110005190,110005236,110005191,110086712,110078959,110090234,110064700,110034971,110035006,110019939,110072307,110103527,110066329,110063477,110054514,110096784,110005235,110079727,110033943,110156669

 

 

 

  • Like 1
Link to post
Share on other sites

19 minutes ago, Nigelcliffe said:

Surface mount come in three common sizes;  small, just about visible, and need serious magnification.    Use them if really stuck for space, or if you're comfortable handling such small things.  Easier to use on scraps of thin printed circuit board (comes as thin as 0.3mm), though it is possible to attach them to wires if your techniques are good, and you can hold things down (blue-tac, cocktail sticks, etc.. all help with holding things).    

 

"Through hole" resistors, in metal film of 0.125W power handling are probably the balance between easy to handle and small size.      

 

I'd suggest having to hand for typical LED installations:   470ohm, 1k, 1k5, 2k2, 3k3, 4k7, 6k8, 10k.     Something in there covers most LEDs and sensible brightness for most model uses.   

 

eg, from CPC Farnell (of many suppliers)

https://cpc.farnell.com/webapp/wcs/stores/servlet/Search?catalogId=15002&langId=69&storeId=10180&categoryId=700000011452&pf=110075165,110093484,110019954,110019955,110078466,110086180,110005242,110102929,110073939,110105542,110034984,110005190,110005236,110005191,110086712,110078959,110090234,110064700,110034971,110035006,110019939,110072307,110103527,110066329,110063477,110054514,110096784,110005235,110079727,110033943,110156669

 

 

 

many, many thanks mate. just before you posted i was looking at metal film resistors on ebay and i was going to ask what wattage would be best.

 

thanks again for all your help and advice

regards

darryl

Link to post
Share on other sites

  • RMweb Premium

I assume the decoder is the Basic Hornby R8249, then you will have to adjust the brightness of the LEDs solely with the resistor.

However If you had a better decoder there would likely be a CV adjustment for brightness which makes the task a lot easier.

 

50 minutes ago, daz9284 said:

just before you posted i was looking at metal film resistors on ebay and i was going to ask what wattage would be best.

 

regards

darryl

I would check prices of several suppliers as ebay may not be the cheapest.

When I wanted a bunch of resistors I found Radiospares to be the best. It all depends on quantity and current prices.

Link to post
Share on other sites

5 hours ago, daz9284 said:

many, many thanks mate. just before you posted i was looking at metal film resistors on ebay and i was going to ask what wattage would be best.

 

thanks again for all your help and advice

regards

darryl

To calculate the wattage the following formulas are used V=I*R & P=I*V, from these we get P=V*V/R

If you are not sure of the voltage drop across the LED then for a rough calculation just forget it (by it I mean the LED voltage :))

So a 1K resistor across 12V consumes 0.144W or 144 mW

 An 1/8 W  (= 0.125 W = 125mW) resistor is a bit underrated, a 1/4w (=0.250 = 250mW) would be OK

If you allow 2V drop across the LED  the power consumed by the resistor drops to 100mW. The 1/8W resistor would now be ok

 

With higher resistor values the power consumption drops

EG 5K resistor at 12V consumes 0.0288W or about 28mW

 

If your starting voltage is 16V & your LED drops 3V & you use a 1K resistor then the power consumed by the resistor is 169mW so a 1/4 W resistor is required

 

Long story short a 1/4w resistor would be ok in most cases

if your resistor is 2K2 or greater then 1/8W would work

 

Hope this helps

John

Link to post
Share on other sites

I'm dumb when it comes to LEDs and resistances - can someone just expand why it is that LED in series with one resistor is a 'bad idea' before I launch myself into some signal lighting? An enquiring mind should like to know ........

 

Cheers,

 

Philip

  • Like 1
Link to post
Share on other sites

1 minute ago, Philou said:

I'm dumb when it comes to LEDs and resistances - can someone just expand why it is that LED in series with one resistor is a 'bad idea' before I launch myself into some signal lighting? An enquiring mind should like to know ........

 

 

I don't think anyone has said that in the thread.   LED + resistor in series is the simplest way to be sure stuff works correctly.   If you have the space, use that approach. 

 

Earlier I said that several LEDs in parallel sharing a single resistor is a bad idea.

 

 

 

Link to post
Share on other sites

6 hours ago, John ks said:

To calculate the wattage the following formulas are used V=I*R & P=I*V, from these we get P=V*V/R

If you are not sure of the voltage drop across the LED then for a rough calculation just forget it (by it I mean the LED voltage :))

So a 1K resistor across 12V consumes 0.144W or 144 mW

 An 1/8 W  (= 0.125 W = 125mW) resistor is a bit underrated, a 1/4w (=0.250 = 250mW) would be OK

If you allow 2V drop across the LED  the power consumed by the resistor drops to 100mW. The 1/8W resistor would now be ok

 

With higher resistor values the power consumption drops

EG 5K resistor at 12V consumes 0.0288W or about 28mW

 

If your starting voltage is 16V & your LED drops 3V & you use a 1K resistor then the power consumed by the resistor is 169mW so a 1/4 W resistor is required

 

Long story short a 1/4w resistor would be ok in most cases

if your resistor is 2K2 or greater then 1/8W would work

 

Hope this helps

John

thanks for the reply, but now I am even more confused to be honest.

 

I don't know the voltage drop across the LEDs, and I don't know the voltage from the decoder. is the resistor wattage the maximum they can handle? so in your scenario where a 1K resistor across 12V where the led drop is 12V, you say the power consumed by the resistor is 100mW, so a 1/4W resistor would still be ok?

 

many thanks

darryl

Link to post
Share on other sites

20 hours ago, DavidCBroad said:

LEDs in series are a bad idea, even if you have the same colour make and batch of LEDs you can get variations in brightness, and fault finding becomes a nightmare, If you mix colours some combinations just won't work.

 

@Nigelcliffe This was quoted above, but there was also the 'bad idea' of parallelism - why is this so? Is it if one LED burns out, then the resistance (if one is provided) is no longer up to the job and the others burn out in rapid succession - or that too simplistic?

 

Cheers,

 

Philip

Link to post
Share on other sites

3 minutes ago, Philou said:

 

@Nigelcliffe This was quoted above, but there was also the 'bad idea' of parallelism - why is this so? Is it if one LED burns out, then the resistance (if one is provided) is no longer up to the job and the others burn out in rapid succession - or that too simplistic?

 

 

Yes, that happens, and yes that's too simplistic.   We're off into LED theory, which is usually a source of confusion.... however.

 

Any LED has a "forward voltage", which is the voltage it drops.  Treat it as a constant (approx, it isn't a constant).   Whilst two LEDs of the same specification will be remarkably similar, they may have a difference in manufacture.   Two LEDs to different specification (possibly size/maker, definitely colour) will have different forward voltages.   
LEDs also have a maximum current they can handle before burning up, and a LED will burn up if given the forward voltage and no limits on the current.   So, resistors are used to *limit the current* which flows through the LED - ie, whilst the resistor also takes some of the voltage from the supply, its primary role is current limitation. 

 

If two LEDs are in parallel, and each has a different forward voltage, then, as the voltage is applied to the circuit, the lower forward voltage is reached.  That LED is now fully taking all the current available (and possibly at overload if the resistor was calculated for half the current to each LED).  It holds the voltage at its own forward voltage unless it burns out.  The other LED hasn't reached its forward voltage and therefore isn't conducting much, if any, current.   

 

In practise, with two same-specification LEDs, they are close enough in manufacture and have enough operating margin that they will probably light, and probably mostly share the current equally.   But its not a given and not certain.   And should one LED fail, then yes, as you say, the remaining one gets all the current and may burn out due to overload. 

 

 

Like a lot of areas of electronics, there are things one could get away with in practise which are not the best way to do things.    That happens a lot in model railways, and more so with DCC stuff,  even some commercial makers do a fair bit of "get away with it" design. 

 

 

 

 

 

  • Like 1
Link to post
Share on other sites

@Nigelcliffe Nigel, thank you for the comprehensive reply - at least I understand now that the resistor is used as a current limiter - this I didn't know as I always understood it to be a voltage limiter.

 

I need to check what I have set up elsewhere.

 

I'm glad I asked the question. Thank you.

 

Cheers,

 

Philip

  • Like 1
Link to post
Share on other sites

  • RMweb Premium
2 hours ago, Nigelcliffe said:

If two LEDs are in parallel, and each has a different forward voltage, then, as the voltage is applied to the circuit, the lower forward voltage is reached.  That LED is now fully taking all the current available (and possibly at overload if the resistor was calculated for half the current to each LED).  It holds the voltage at its own forward voltage unless it burns out.  The other LED hasn't reached its forward voltage and therefore isn't conducting much, if any, current.  

 

In practise, with two same-specification LEDs, they are close enough in manufacture and have enough operating margin that they will probably light, and probably mostly share the current equally.   But its not a given and not certain.   And should one LED fail, then yes, as you say, the remaining one gets all the current and may burn out due to overload. 

 

Like a lot of areas of electronics, there are things one could get away with in practise which are not the best way to do things.    That happens a lot in model railways, and more so with DCC stuff,  even some commercial makers do a fair bit of "get away with it" design.

 

However in real life LEDs are used in parallel and quite extensively.

Look at these "Multi-LED" work lights and such. They can have 48 or even 72 LEDs all in parallel and one current limiting resistor of maybe 0.5 ohms and a 3v battery supply.

 

But in model land putting LEDs in parallel, especially if you can't be sure they are exactly the same should be avoided.

  • Like 1
Link to post
Share on other sites

2 hours ago, daz9284 said:

thanks for the reply, but now I am even more confused to be honest.

 

I don't know the voltage drop across the LEDs, and I don't know the voltage from the decoder. is the resistor wattage the maximum they can handle? so in your scenario where a 1K resistor across 12V where the led drop is 12V 2V, you say the power consumed by the resistor is 100mW, so a 1/4W resistor would still be ok?

YES &  in this case a 1/8w resistor would also be OK

many thanks

darryl

What I was trying to explain is a quick & approximate way to calculate the power consumed of the resistor 

Knowing the forward voltage of the LED is not necessary to get an approximate resistor power consumption. 

 

if you have 12V (approx. voltage between blue wire and a function wire on DCC ) & connect a resistor across that 12V then the power consumed by the resistor = V*V/R

In the example  a 1K resistor consumed 144mW

 

The power rating of the resistor is the maximum it can safely dissipate, so you will need a resistor rated at greater than 144mW

The closest rated resistor is 1/4W or 250mW

 

When you add a LED in series with the 1K resistor then the power consumed by that resistor will less than 144mW  (a 1/4W resistor is still OK)

 

If you know the forward voltage of the LED(say 3V) then subtract that from the supply voltage (say 12V)  & do the sums (9*9/1000=81mW) to get the exact power consumed by the resistor 

in this case an 1/8W or higher power rated resistor would be ok

 

Hope I have explained things a bit better

John

 

 

 

  • Like 2
Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...