N Gauge Forum

Your Layout and Models => Electronics => Topic started by: Jimbo123 on October 27, 2019, 04:17:26 PM

Title: How to wire up 50 LEDs
Post by: Jimbo123 on October 27, 2019, 04:17:26 PM
Hi all, I bought myself an N gauge layout 6x2 which was almost finished. It has about 12 Metcalfe cardboard buildings glued on, I think the previous owner used superglue. I have noticed that the building do have floors in them. So, some buildings may have more than one LED fitted inside. My plan is to fit 3 volt LED lights inside the buildings, with resistors as well. I also plan on fitting platform lights and street lights. I would guess between 40-50 lights in total. What I need is suitable power supplies, which would powerful enough, but try to be as least as possible to keep the cost down also keep the wiring down a little. Any bright ideas? Cheers
Title: Re: How to wire up 50 LEDs
Post by: ntpntpntp on October 27, 2019, 04:48:19 PM
It would be more efficient to run two or 3 or 4 LEDs in series from - say- a 12V or 15V DC supply, with a suitable resistor in series with  each string.

I use the LED calculator below for calculating resistors for a single LED.  If you have multiple LED in series just add up their total forward voltage.  Remember with LEDs you must always allow a higher voltage supply than the total forward voltage drop, and always include a resistor (the primary function of the resistor is to limit current not drop voltage).

http://led.linear1.org/1led.wiz (http://led.linear1.org/1led.wiz)

So... lets say you have a 12V supply and your LEDs  have a 3V forward voltage drop. Let's assume 15mA  (which is quite a lot for a modern LED so you may get away with less):  For a string of 3 LEDs the calculator wold suggest a 220 Ohm resistor. 

If you have  48 LEDs in 16 parallel strings of 3, the total current requirement at 15mA per string would be 240mA (or about 0.25A).

If you buy a supply capable of 0.5A that gives you plenty of headroom, and if you can find a 1A supply that's even better as you have loads of headroom in case you need to run some strings with just 1 LED (and a suitable resistor) and/or some other 12V lights.


Just as a comparison, if you were to wire those same 48 LEDs individually in parallel with a 12V supply each would need a 680 ohm resistor and the total current draw at 15mA per LED would be 0.72A.    (3x as much power).  That's why running LEDs in series wherever you can is more efficient.
Title: Re: How to wire up 50 LEDs
Post by: Jimbo123 on October 27, 2019, 05:01:12 PM
Hi, I was supplied with these resistors.. 470ohm 1/4W 0.25W Metal Film Resistor 1% 1 Ohm to 1K Ohm. I get a bit lost with all the technical jargon, which would be the best way to use these with the 3mm led I have? here is a link https://www.ebay.co.uk/itm/200pcs-3mm-5mm-LED-Emitting-Diodes-Assortment-Kit-White-Yellow-Red-Blue-Green/233330882048?ssPageName=STRK%3AMEBIDX%3AIT&_trksid=p2057872.m2749.l2648 (https://www.ebay.co.uk/itm/200pcs-3mm-5mm-LED-Emitting-Diodes-Assortment-Kit-White-Yellow-Red-Blue-Green/233330882048?ssPageName=STRK%3AMEBIDX%3AIT&_trksid=p2057872.m2749.l2648) thanks for helping.
Title: Re: How to wire up 50 LEDs
Post by: ntpntpntp on October 27, 2019, 05:10:31 PM
@Jimbo123 (https://www.ngaugeforum.co.uk/SMFN/index.php?action=profile;u=7963)   OK, so a 470 ohm resistor would be about right for a 12V supply feeding 20 mA through each LED  (try it in that resistor calculator link to confirm).

I would have 2 comments: 

i) Different colours of LED have different forward voltage - for example off the top of my head I think red is more like 2V
ii) I think you may find 20mA may be too bright in some cases.  Quite often 15mA or even 10mA is plenty. 

This is where you need to get a suitable power supply and experiment with different resistors and different colour LEDs to find what looks best in your buildings. It helps to have some different resistor values to play with.  Make sure you don't go above 20mA though!  As a starting point, if you think the LED is too bright using one of your 470 ohm resistors, try it with two resistors in series which will drop the current down to more like 10mA.

Title: Re: How to wire up 50 LEDs
Post by: Nigel Cliffe on October 27, 2019, 05:13:40 PM
I'd put a resistor on every LED, and wire them in parallel to a power supply.   The reason being its easier to swap a single resistor to get the brightness level required for each LED.    However, if wiring in series, make sure that similar brightness is appropriate for them in each installation. 

3mm LEDs are rather big for streetlights, etc.. 

(I'd be enormously tempted to do it a different way: a string of addressable LEDs and an Arduino (under 10) to control them.  Thus, only three wires which daisy-chain around everywhere (can cut string of LEDs and extend with three wires), and every LED can be remotely controlled for colour and brightness, turned on/off individually, etc..    ). 

- Nigel

Title: Re: How to wire up 50 LEDs
Post by: ntpntpntp on October 27, 2019, 05:16:29 PM
Hi, I was supplied with these resistors.. 470ohm 1/4W 0.25W Metal Film Resistor 1% 1 Ohm to 1K Ohm.

Just reading that again, so what have you actually got? are they all 470 ohm resistors or have you got a range of values?  I'm concerned about the "1 Ohm to 1K Ohm" bit??? ( I suspect they may mean the 1% tolerance range is available from 1 Ohm to 1K Ohm)
Title: Re: How to wire up 50 LEDs
Post by: Phoenix on October 27, 2019, 05:23:11 PM
Hi Jimbo,

If the lights are in buildings, perhaps this might be an idea .....

https://www.festive-lights.com/5m-white-indoor-christmas-tree-lights-50-leds-green-cable (https://www.festive-lights.com/5m-white-indoor-christmas-tree-lights-50-leds-green-cable)

For 4.25, 50 lights wired up with a power supply supply sounds a pretty good bargain  :D

With all best wishes

Kevin

 :beers:
Title: Re: How to wire up 50 LEDs
Post by: Jimbo123 on October 27, 2019, 05:28:01 PM
I'd put a resistor on every LED, and wire them in parallel to a power supply.   The reason being its easier to swap a single resistor to get the brightness level required for each LED.    However, if wiring in series, make sure that similar brightness is appropriate for them in each installation. 

3mm LEDs are rather big for streetlights, etc.. 

(I'd be enormously tempted to do it a different way: a string of addressable LEDs and an Arduino (under 10) to control them.  Thus, only three wires which daisy-chain around everywhere (can cut string of LEDs and extend with three wires), and every LED can be remotely controlled for colour and brightness, turned on/off individually, etc..    ). 

- Nigel

The 3mm leds are to be hidden in the buildings, the street lamps are the ones you buy that look like.. well.. street lamps, tho most suppliers try to sel you ones way to tall. :-( Have you got a diagram to do it the way you say.. Daisy chain them? thanks
Title: Re: How to wire up 50 LEDs
Post by: Jimbo123 on October 27, 2019, 05:31:01 PM
Hi, I was supplied with these resistors.. 470ohm 1/4W 0.25W Metal Film Resistor 1% 1 Ohm to 1K Ohm.

Just reading that again, so what have you actually got? are they all 470 ohm resistors or have you got a range of values?  I'm concerned about the "1 Ohm to 1K Ohm" bit??? ( I suspect they may mean the 1% tolerance range is available from 1 Ohm to 1K Ohm)

These are what I have  https://www.ebay.co.uk/itm/1-4W-0-25W-Metal-Film-Resistor-1-1-Ohm-to-1K-Ohm/262472631890?ssPageName=STRK%3AMEBIDX%3AIT&var=561277847931&_trksid=p2057872.m2749.l2649 (https://www.ebay.co.uk/itm/1-4W-0-25W-Metal-Film-Resistor-1-1-Ohm-to-1K-Ohm/262472631890?ssPageName=STRK%3AMEBIDX%3AIT&var=561277847931&_trksid=p2057872.m2749.l2649)
Title: Re: How to wire up 50 LEDs
Post by: Jimbo123 on October 27, 2019, 05:33:49 PM
Hi Jimbo,

If the lights are in buildings, perhaps this might be an idea .....

https://www.festive-lights.com/5m-white-indoor-christmas-tree-lights-50-leds-green-cable (https://www.festive-lights.com/5m-white-indoor-christmas-tree-lights-50-leds-green-cable)

For 4.25, 50 lights wired up with a power supply supply sounds a pretty good bargain  :D

With all best wishes

Kevin

 :beers:

Nice one, saves a lot of soldering
Title: Re: How to wire up 50 LEDs
Post by: ntpntpntp on October 27, 2019, 05:36:29 PM
Hi, I was supplied with these resistors.. 470ohm 1/4W 0.25W Metal Film Resistor 1% 1 Ohm to 1K Ohm.

Just reading that again, so what have you actually got? are they all 470 ohm resistors or have you got a range of values?  I'm concerned about the "1 Ohm to 1K Ohm" bit??? ( I suspect they may mean the 1% tolerance range is available from 1 Ohm to 1K Ohm)

These are what I have  https://www.ebay.co.uk/itm/1-4W-0-25W-Metal-Film-Resistor-1-1-Ohm-to-1K-Ohm/262472631890?ssPageName=STRK%3AMEBIDX%3AIT&var=561277847931&_trksid=p2057872.m2749.l2649 (https://www.ebay.co.uk/itm/1-4W-0-25W-Metal-Film-Resistor-1-1-Ohm-to-1K-Ohm/262472631890?ssPageName=STRK%3AMEBIDX%3AIT&var=561277847931&_trksid=p2057872.m2749.l2649)

OK so you do have a bunch of 470 ohm resistors.  Worth clarifying!
Title: Re: How to wire up 50 LEDs
Post by: Jimbo123 on October 27, 2019, 05:38:54 PM
Hi, I was supplied with these resistors.. 470ohm 1/4W 0.25W Metal Film Resistor 1% 1 Ohm to 1K Ohm.

Just reading that again, so what have you actually got? are they all 470 ohm resistors or have you got a range of values?  I'm concerned about the "1 Ohm to 1K Ohm" bit??? ( I suspect they may mean the 1% tolerance range is available from 1 Ohm to 1K Ohm)
yes, 200 of them

These are what I have  https://www.ebay.co.uk/itm/1-4W-0-25W-Metal-Film-Resistor-1-1-Ohm-to-1K-Ohm/262472631890?ssPageName=STRK%3AMEBIDX%3AIT&var=561277847931&_trksid=p2057872.m2749.l2649 (https://www.ebay.co.uk/itm/1-4W-0-25W-Metal-Film-Resistor-1-1-Ohm-to-1K-Ohm/262472631890?ssPageName=STRK%3AMEBIDX%3AIT&var=561277847931&_trksid=p2057872.m2749.l2649)

OK so you do have a bunch of 470 ohm resistors.  Worth clarifying!
Title: Re: How to wire up 50 LEDs
Post by: Jimbo123 on October 27, 2019, 05:50:03 PM
Hi Jimbo,

If the lights are in buildings, perhaps this might be an idea .....

https://www.festive-lights.com/5m-white-indoor-christmas-tree-lights-50-leds-green-cable (https://www.festive-lights.com/5m-white-indoor-christmas-tree-lights-50-leds-green-cable)

For 4.25, 50 lights wired up with a power supply supply sounds a pretty good bargain  :D

With all best wishes

Kevin

 :beers:

Nice one, saves a lot of soldering

That would solve the problem with the building lights but not the street lights, maybe I should just use trial and error and see how bright they are with different power supplys
Title: Re: How to wire up 50 LEDs
Post by: Jimbo123 on October 27, 2019, 06:03:53 PM
@Jimbo123 (https://www.ngaugeforum.co.uk/SMFN/index.php?action=profile;u=7963)   OK, so a 470 ohm resistor would be about right for a 12V supply feeding 20 mA through each LED  (try it in that resistor calculator link to confirm).

I would have 2 comments: 

i) Different colours of LED have different forward voltage - for example off the top of my head I think red is more like 2V
ii) I think you may find 20mA may be too bright in some cases.  Quite often 15mA or even 10mA is plenty. 

This is where you need to get a suitable power supply and experiment with different resistors and different colour LEDs to find what looks best in your buildings. It helps to have some different resistor values to play with.  Make sure you don't go above 20mA though!  As a starting point, if you think the LED is too bright using one of your 470 ohm resistors, try it with two resistors in series which will drop the current down to more like 10mA.
The LEDs I`ll be using will all be white. If for instance I had a 24volt DC regulated power supply, could I wire up 9 of the LEDs in series without using a resistor? Thanks
Title: Re: How to wire up 50 LEDs
Post by: ntpntpntp on October 27, 2019, 06:10:57 PM
@Jimbo123 (https://www.ngaugeforum.co.uk/SMFN/index.php?action=profile;u=7963)   OK, so a 470 ohm resistor would be about right for a 12V supply feeding 20 mA through each LED  (try it in that resistor calculator link to confirm).

I would have 2 comments: 

i) Different colours of LED have different forward voltage - for example off the top of my head I think red is more like 2V
ii) I think you may find 20mA may be too bright in some cases.  Quite often 15mA or even 10mA is plenty. 

This is where you need to get a suitable power supply and experiment with different resistors and different colour LEDs to find what looks best in your buildings. It helps to have some different resistor values to play with.  Make sure you don't go above 20mA though!  As a starting point, if you think the LED is too bright using one of your 470 ohm resistors, try it with two resistors in series which will drop the current down to more like 10mA.
The LEDs I`ll be using will all be white. If for instance I had a 24volt DC regulated power supply, could I wire up 9 of the LEDs in series without using a resistor? Thanks

No you must ALWAYS include a resistor, it's to limit the current as I mentioned earlier. 

White LEDs seem to be typically around 3.2V - 3.5V forward voltage.  So, plug 24V source, 21V forward voltage (6 x 3.5), 15mA current into the resistor calculator and it recommends a 220 ohm resistor.  Your 470 ohm resistor would limit the current to around 7mA in that situation, might not be bright enough but you need to experiment.    Or you could try 470 ohms with only 5 LEDs instead of 6, that works out at 15mA.

[edit] Here's a table giving typical forward voltage for difference LED colours
(https://kithub.cc/wp-content/uploads/2015/11/LED_FWD_Volts1.png)
Title: Re: How to wire up 50 LEDs
Post by: Jimbo123 on October 27, 2019, 06:16:34 PM
@Jimbo123 (https://www.ngaugeforum.co.uk/SMFN/index.php?action=profile;u=7963)   OK, so a 470 ohm resistor would be about right for a 12V supply feeding 20 mA through each LED  (try it in that resistor calculator link to confirm).

I would have 2 comments: 

i) Different colours of LED have different forward voltage - for example off the top of my head I think red is more like 2V
ii) I think you may find 20mA may be too bright in some cases.  Quite often 15mA or even 10mA is plenty. 

This is where you need to get a suitable power supply and experiment with different resistors and different colour LEDs to find what looks best in your buildings. It helps to have some different resistor values to play with.  Make sure you don't go above 20mA though!  As a starting point, if you think the LED is too bright using one of your 470 ohm resistors, try it with two resistors in series which will drop the current down to more like 10mA.
The LEDs I`ll be using will all be white. If for instance I had a 24volt DC regulated power supply, could I wire up 9 of the LEDs in series without using a resistor? Thanks

No you must ALWAYS include a resistor, it's to limit the current as I mentioned earlier. 

White LEDs seem to be typically around 3.5V forward voltage.  So, plug 24V source, 21V forward voltage (6 x 3.5), 15mA current into the resistor calculator and it recommends a 220 ohm resistor.  Your 470 ohm resistor would limit the current to around 7mA in that situation, might not be bright enough but you need to experiment.    Or you could try 470 ohms with only 5 LEDs instead of 6, that works out at 15mA.
So.. could I then run another 5 LEDs in series with the 470 ohms resistor off the same power supply? Also could I run more than two lots? Thanks.
Title: Re: How to wire up 50 LEDs
Post by: ntpntpntp on October 27, 2019, 06:20:53 PM
[with a 24V dc supply] ...or you could try 470 ohms with only 5 LEDs instead of 6, that works out at 15mA.
So.. could I then run another 5 LEDs in series with the 470 ohms resistor off the same power supply? Also could I run more than two lots? Thanks.
Yes you can run as many parallel strings of 5 LED (each string with its own 470 ohm resistor and each drawing 15mA)  as your 24V DC supply can comfortably handle, so that depends on the current supply capacity of the power supply?  Remember to leave plenty of headroom - I prefer to draw only 50% of the rated maximum.   What is the current rating of your supply?

Nigel is correct with his earlier comment that if you do simply give each LED its own resistor and wire in parallel to the supply you do get more individual control (you can use a higher value resistor if you want some LEDs to be more dim than the others). At 24V DC you'd be looking at 1.5K ohm resistors for 15mA (or higher for dimmer LEDs) and you're still drawing more load from the power supply, as I mentioned in my first reply.

[ps] The "individually addressable LEDs" Nigel also mentioned are different things entirely, in that they have additional integrated control circuitry with each LED.
Title: Re: How to wire up 50 LEDs
Post by: Jimbo123 on October 27, 2019, 06:28:48 PM
[with a 24V dc supply] ...or you could try 470 ohms with only 5 LEDs instead of 6, that works out at 15mA.
So.. could I then run another 5 LEDs in series with the 470 ohms resistor off the same power supply? Also could I run more than two lots? Thanks.
Yes you can run as many parallel strings of 5 LED (each string with its own 470 ohm resistor and each drawing 15mA)  as your 24V DC supply can comfortably handle, so that depends on the current supply capacity of the power supply?  Remember to leave plenty of headroom - I prefer to draw only 50% or the rated maximum.   What is the current rating of your supply?

Nigel is correct with his earlier comment that if you do simply put each LED in parallel with its own resistor you do get more individual control (you can use a higher value resistor if you want some LEDs to be more dim than the others). At 24V DC you'd be looking at 1.5K ohm resistors for 15mA (or higher for dimmer LEDs) and you're still drawing more load from the power supply, as I mentioned in my first reply.
Darn thing keeps logging me out.. I think the power supply is either 2.5 amps or 3 amps. It`s in the shed at the moment, to dark and wet to try and find it lol I don't want to buy many more resistors, they cost more than I use.. If you get mt drift.
Title: Re: How to wire up 50 LEDs
Post by: ntpntpntp on October 27, 2019, 06:34:41 PM
I think the power supply is either 2.5 amps or 3 amps. It`s in the shed at the moment, to dark and wet to try and find it lol I don't want to buy many more resistors, they cost more than I use.. If you get mt drift.
Oh that sounds fine.

Resistors cost peanuts, it's worth having a set of different values in stock to play with.

https://www.ebay.co.uk/itm/600pcs-30-Values-1-4W-Metal-Film-Resistors-Resistance-Assortment-Kit-Set-1-JT/123954360854 (https://www.ebay.co.uk/itm/600pcs-30-Values-1-4W-Metal-Film-Resistors-Resistance-Assortment-Kit-Set-1-JT/123954360854)
Title: Re: How to wire up 50 LEDs
Post by: Jimbo123 on October 27, 2019, 06:46:58 PM
@Jimbo123 (https://www.ngaugeforum.co.uk/SMFN/index.php?action=profile;u=7963)   OK, so a 470 ohm resistor would be about right for a 12V supply feeding 20 mA through each LED  (try it in that resistor calculator link to confirm).

I would have 2 comments: 

i) Different colours of LED have different forward voltage - for example off the top of my head I think red is more like 2V
ii) I think you may find 20mA may be too bright in some cases.  Quite often 15mA or even 10mA is plenty. 

This is where you need to get a suitable power supply and experiment with different resistors and different colour LEDs to find what looks best in your buildings. It helps to have some different resistor values to play with.  Make sure you don't go above 20mA though!  As a starting point, if you think the LED is too bright using one of your 470 ohm resistors, try it with two resistors in series which will drop the current down to more like 10mA.
The LEDs I`ll be using will all be white. If for instance I had a 24volt DC regulated power supply, could I wire up 9 of the LEDs in series without using a resistor? Thanks

No you must ALWAYS include a resistor, it's to limit the current as I mentioned earlier. 

White LEDs seem to be typically around 3.2V - 3.5V forward voltage.  So, plug 24V source, 21V forward voltage (6 x 3.5), 15mA current into the resistor calculator and it recommends a 220 ohm resistor.  Your 470 ohm resistor would limit the current to around 7mA in that situation, might not be bright enough but you need to experiment.    Or you could try 470 ohms with only 5 LEDs instead of 6, that works out at 15mA.

[edit] Here's a table giving typical forward voltage for difference LED colours
(https://kithub.cc/wp-content/uploads/2015/11/LED_FWD_Volts1.png)
OK, that lot just goes over my head. Lets simplify things. I mostly have 12 volt power supplies going spare. Using these LEDs that I have, what would be the best way to wire them up, so that the bulbs are of reasonable brightness and what resistors would I need?
Title: Re: How to wire up 50 LEDs
Post by: ntpntpntp on October 27, 2019, 07:05:46 PM
@Jimbo123 (https://www.ngaugeforum.co.uk/SMFN/index.php?action=profile;u=7963)
The simplest way is to put one 470 ohm resistor in series with one LED and hook it to the 12V power supply. 
Do the same with the next LED and hook it to the power supply in parallel.
... and so on....

Using 470 ohm resistors might mean the LEDs are very bright at 20mA current (try it and see what you think?)and the power supply won't be able to handle as many LEDs in total as it could with a bit of re-jigging to run LEDs in series as I suggested right back at the beginning. 

You do need to be aware of the maximum current the power supply can provide. Add up all the LED's 20mA requirements and try not to go beyond about half the maximum current the supply is rated for - especially with unregulated supplies as the voltage will simply drop as you add more load.

If the LEDs are too bright, and you don't want to bother buying some other different resistors, then you have two simple things you can try: two LEDs in series with one resistor (make sure you get the polarity corrrect) or two resistors in series with one LED. The first option will halve the voltage the LED sees (so they might refuse to light at all), the second option will halve the current (should just make the LED less bright).  Neither should cause any damage, so again try it and see what happens?

Personally I would probably get 680 ohm, 820 ohm, and 1k resistors to try.  1k is commonly used for LEDs being driven from 12V-15V
Title: Re: How to wire up 50 LEDs
Post by: Jimbo123 on October 27, 2019, 07:28:36 PM
@Jimbo123 (https://www.ngaugeforum.co.uk/SMFN/index.php?action=profile;u=7963)
The simplest way is to put one 470 ohm resistor in series with one LED and hook it to the 12V power supply. 
Do the same with the next LED and hook it to the power supply in parallel.
... and so on....

Using 470 ohm resistors might mean the LEDs are very bright at 20mA current (try it and see what you think?)and the power supply won't be able to handle as many LEDs in total as it could with a bit of re-jigging to run LEDs in series as I suggested right back at the beginning. 

You do need to be aware of the maximum current the power supply can provide. Add up all the LED's 20mA requirements and try not to go beyond about half the maximum current the supply is rated for - especially with unregulated supplies as the voltage will simply drop as you add more load.

If the LEDs are too bright, and you don't want to bother buying some other different resistors, then you have two simple things you can try: two LEDs in series with one resistor (make sure you get the polarity corrrect) or two resistors in series with one LED. The first option will halve the voltage the LED sees (so they might refuse to light at all), the second option will halve the current (should just make the LED less bright).  Neither should cause any damage, so again try it and see what happens?

Personally I would probably get 680 ohm, 820 ohm, and 1k resistors to try.  1k is commonly used for LEDs being driven from 12V-15V
Thanks, I have just found all those resistors on Ebay, I`ll order them now. That will sort out the street and platform lights. I am tempted to buy those fairy lights, they would save a lot of soldering, time and look neater under the board. Thanks for your help, Jim
SimplePortal 2.3.5 © 2008-2012, SimplePortal