Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Best way to connect LEDs to PCB - A complete novice

Status
Not open for further replies.

Jaga

New Member
Hi All,

I am a complete Noob when it comes to electronics so sorry for asking such a basic question. I have a model train set and want to connect some LED lamp posts to the MDF base board and then power them. In total I will have 10 lamp posts and the LEDs are 3V.

I have done some research and have decided on a plan. As I want to make it safe I am getting a case with a PCB in it. In there I am going to put a Micro USB interface breakout board that will output to the voltage I require (3.3V), which should mean I don't need any resistors. This will act as my 'PSU' if you like. I know I could use batteries but I would rather have it mains powered.

I understand the wiring I need to do to get them lit (I am going to use parallel as it seems the best option) but what I dont know is what option to use to connect the Power Supply to the LEDs.

I know I could obviously just solder the wires directly to the PCB but this wont work in practice, the wires are not long enough and I don't want the 'PSU' always connected to the Train Set. So what I would like is some sort of connector going form the 'PSU/PCB' to the Train Board, that I can plug in and out as needed. This should also make it a little safer.

So this is the bit I am stuck on, what do people suggest I use. As I don't want to do a lot of soldering or customer wire making (I dont have the tools) , I was thinking of putting a header on the PCB and a header on the MDF board and then using a pre-made wire/connector to join the two.

If I am correct (which I possibly may not be) then I would need 20 wires in total (10 positive and 10 negative). I cant really see any suitable 20 pin connectors so I was wondering if I could use 4 ICD10 Male pin headers (2 in PSU and 2 mounted on the MDF board) and then use 2 IDC10 Female to Female ribbon cables to connect it up. Would this be suitable or are Ribbon cables not sufficient for the job. Or am I looking at it in completely the wrong way and is there a much easier method?

As I said I am completely new to this so sorry for the ramble, I am sure it is very easy to do and I am probably making it more complicated than it needs to be.

Thanks in advance for all your help.
 
Welcome to ETO!
I require (3.3V), which should mean I don't need any resistors.
No! Because of manufacturing tolerances a nominally 3V LED may have a forward voltage drop of 2.9V, or 3.1V, or .......so with no resistors some LEDs would be over-driven and die. If you want individual control of the LEDs then I suggest you use a standard 5V supply (e.g. an old phone charger) with individual series resistors for the LEDs. The resistor allows for the tolerance. You will probably need only a few mA per LED, to avoid dazzle.

Edit:
If you want all LEDs, or groups of LEDs, to be on at the same time, then you can connect them in series in strings. If you used, say, a standard 12V supply then with "3V" LEDs you could have 3 (or 2) in series per string and still have about 3V 'headroom' to allow for tolerance.
 
Last edited:
Welcome to ETO.

Please tell us what country you are from. This helps with determining your mains voltages and possible parts location and availability.

Regards,
Inq
 
Thanks for the replies so far, very quick.

alec_t - The breakout board has a switch to select either 3.3V or 5V so I can just use the 5V and then use resistors (was hoping not to, but not a massive problem).

Inquisitive - I am form the United Kingdom
 
There's a resistor calculator here. Assuming 10mA per LED, can your breakout board supply 100mA @ 5V?
 
Hi All,
I understand the wiring I need to do to get them lit (I am going to use parallel as it seems the best option) but what I dont know is what option to use to connect the Power Supply to the LEDs.

If the lamps are wired in parallel, then you only need two wires, not 20, from the power supply. Then you need 9 segments for each pole (i.e., plus and minus) as interconnects between the led's. As proposed above, each led has its own resistor in series (i.e, you need 10 resistors).

Is that what you intend to do? Of course, you could run 20 wires from the supply, but that is bulky, unnecessary, and probably a waste of wire.
 
If the lamps are wired in parallel, then you only need two wires, not 20, from the power supply. Then you need 9 segments for each pole (i.e., plus and minus) as interconnects between the led's. As proposed above, each led has its own resistor in series (i.e, you need 10 resistors).

Is that what you intend to do? Of course, you could run 20 wires from the supply, but that is bulky, unnecessary, and probably a waste of wire.

Hi thanks for this (sorry for the late reply). Yes that's what I want to do, How stupid of me I did not think about using only two wires with a connector and then doing the separating the other end.

Anyway I now have a plan and have started fitting it together (it works well from a quick test). All I need to do is work out what resistors I need. The problem is that the only information on the LEDS I have is that they are 3V. I am going to use a power supply that outputs 5V & 750ma. Will this be enough to power all the LEDS and if so what resistors would I need assuming I have 10 LEDs wired in parallel in total. That all the info I have on the LEDS and the calculators is confusing me sorry :(

I have seen a calculation which says: (Voltage Supplied - Voltage Required) / (LED Amp x Number of LEDs) = Resistor Required.

So using this and assuming the LEDs use 10mA (is there a way I can check) it would be (5-3)/0.1 = 20 (or 200 Ohms). Is this correct are we saying I need 10 x 200 Ohms resistors?

Thanks again for all the help guys, I have learnt so much already and am really enjoying it.
 
assuming the LEDs use 10mA (is there a way I can check)
It's up to you to decide how much current you want through the LED, subject to the safe maximum (~30mA for most indicator LEDs).
it would be (5-3)/0.1 = 20
No. It would be (5V-3V)/0.01A = 200Ω. The nearest common standard values are 180Ω and 220Ω. You'd need 10 of either of those.
5V & 750ma. Will this be enough to power all the LEDS
Yes. 10 x 10mA = 100mA, so 750mA gives a generous margin, even if you later decide you need to increase the lamp brightness (which depends on the efficiency and beam angle of the LEDs you buy).
 
If your LEDs are the normal size of 5mm diameter then they have their spec's when the current is 20mA. Use 10mA if you want them a little dimmed.
Some of your LEDs "might" be 3V but some also might be 2.5V or 3.5V. The resistors should be (5V - 2.5V)/10mA= 250 ohms to (5V - 3.5V)/10mA= 150 ohms. Use 200 ohms.
The power rating for each resistor will be (2.5V squared)/200 ohms= 0.03W which is almost nothing.
 
Ok thanks Guys, starting to understand a little more. So lets assume I want 20mA to go through the LEDs if that is what their specs are for. I would have the following

(5V- 2.5V)/0.02A = 125Ω
(5V- 3V)/0.02A= 100Ω
(5V- 3.5V)/0.02A = 75Ω

So what resistor should I go for? I am trying to find standard sizes but cannot. I can see there are 130Ω ones so should I go for those?

EDIT - In Fact I have seen these. Would they be suitable? - **broken link removed**

Thanks Again
 
Last edited:
They'd do.
 
What color are the "LED lamp posts"? They are around 3V if they are white but are 1.8V and already have a resistor (to be used with a 3V supply) if they are red.

The 0.6W resistors are fairly expensive but who cares if you need only a few.
I would use less expensive 0.25W carbon film resistors.
 
The LEDs are plain white ones thanks. Yes they are a little more expensive (I can get 50 delivered form ebay for £1) but I can pick the ones up in the link on my way home and the price goes down the more you buy so its only 70p for 10 (hardly breaking the bank).
 
I almost said that the 0.6W resistors are too big then I saw that they have the same small size as normal 0.25W resistors. So they must have a very high temperature rating (hot enough to burn you and almost hot enough to desolder themselves). ebay resistors are cheap because some are factory rejects, fakes and plain wrongly marked.
 
Light is logarithmic, took me ages to understand this, we think in linear terms. As a rough rule, if the max for a LED is 20mA then drive it at 10mA. There is a big chance you wont notice the light drop by eye even though its running at 50% max. Most modern LEDS are so bright these days I tend to run them at 1mA, TBH you wouldnt know it to look at them. The other thing with modern LEDS, if you run at 20mA for models, they can look really false and out of place. its a strange effect
 
A cheap LED that is very bright uses a dim LED chip in a case that focuses the light into a very narrow beam. Good LEDs cost a little more and are bright and have a wide beam.
 
White LEDs appear VERY brite with 20mA. I suggest dropping down to below 10mA. Often times they can be seen with 5 mA and less. They will last forever that way also.
For a 5V source I recommend finding something like a 330, 390, 430, or even 470 ohm resistor. Most likely whatever the current is you will see them light fine. Even if your resistors are not all exactly the same you will never notice the difference.
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top