Go Down

Topic: Using Resistors with LEDs (Read 8011 times) previous topic - next topic

legonick22

Mar 12, 2015, 03:13 pm Last Edit: Mar 12, 2015, 03:14 pm by legonick22
I often see people online attach a resistor to each individual LED when connected to the Arduino.

Whenever I use multiple LEDs, I tie them all to common ground with a single resistor, since I only have a few 1k resistors.

Either way, it seems to work the same for the LEDs. Is there any problem with the common-ground solution I have found?


My mother said I could be anything I wanted. But I don't want to be anything I wanted. I want to be an engineer!

russellz

OK if you only light one LED at a time.  If you light all three they will be significantly less bright - perhaps that's what you want.

Russell.
Retired after 40 years as a chartered engineer working mostly with RF and analogue electronics.

legonick22

Lower brightness is kind of a good thing for me--my LEDs are blinding!

Why would it make them all dimmer?
My mother said I could be anything I wanted. But I don't want to be anything I wanted. I want to be an engineer!

Grumpy_Mike

Quote
Either way, it seems to work the same for the LEDs.
No it doesn't.
If you think it does then you are not testing it correctly.

You will get no sympathy or support for such an idea round here because we know what we are talking about on this forum and that idea is just unbelievably wrong.

Quote
I often see people online attach a resistor to each individual LED when connected to the Arduino.
That is because these people know what they are doing unlike you.

Quote
since I only have a few 1k resistors.
Well at $0.01 each they are expensive ain't they.

legonick22

If you don't mind, please explain to me why I am wrong, instead of talking like that.
My mother said I could be anything I wanted. But I don't want to be anything I wanted. I want to be an engineer!

Grumpy_Mike

#5
Mar 12, 2015, 04:19 pm Last Edit: Mar 12, 2015, 04:20 pm by Grumpy_Mike
Quote
instead of talking like that.
For what you say I will talk how I like. You should not try and propagate your totally wrong ideas here trying to mislead beginners. Especially so when the slightest research into this would have pointed to the error of your ways, but no you were too lazy and thought that you had invented something that had eluded electronic engineered for 40 years. I see you have 48 posts so you are not entirely a stranger to how things work here. If you are going to give advice here, it has to be correct or people will jump on you like a ton of bricks.

Quote
please explain to me why I am wrong
1) Just try having one red LED and the others a different colour. Light up the red one then see none of the others will light when the red one is on. This is because it takes a certain voltage before an LED can come on and the red LED is the lowest voltage and it prevents any of the others coming on.

2) Do you know the voltage / current characteristics of an LED? They are non linear devices. Read this to see.
http://www.thebox.myzen.co.uk/Tutorial/LEDs.html.

3) The current in an LED circuit is controlled by the resistor. If you have one LED on then that gives you a certain current. Two LEDs with just the one resistor gives you the same current but now split between two LEDs, so it will not be as bright. But worse than that the LEDs will not share current equally so one will get more current that the other and so they will not be the same brightness. This inequality will change with the age of the LED and with the temperature. It will also be different on different individual LEDs.

DBW1341

Quote
Either way, it seems to work the same for the LEDs. Is there any problem with the common-ground solution I have found?
Legonick, while the setup you have "seems" to work for you, without knowing the specs, you just had good luck.  Whether you set up your LEDs in series or parallel just depends on your hardware and your needs.  A really good site for determining a good and workable setup for your LEDs is led.linear1.org/led.wiz.  You should also listen to surly, I mean Grumpy_Mike, and purchase more resistors.  Grab a lot and many different values because no matter how many you have, you'll find you never have quite the one you want.

JoshD

Think of it this way.  If you have 3 LEDs that are rated for 20ma, you could choose a resistor that'll allow 60ma to flow through.  That'll power all 3 LEDs just fine using one resistor (assuming they're perfectly matched and draw exactly the same amount of current each).  Then you turn one LED off, and suddenly the other two are getting 50% more power than they're rated for.  Then you turn another LED off, and the last remaining one will be drawing double what it's rated for.  Well, it will for a split second before it burns out, anyways.

polymorph

Think of Grumpy_Mike as a hazing that is rarely incorrect.

I have found it expedient to buy mixed packs of resistors. And then when I notice I am using a lot of a few values, I may order large-ish quantities of those resistors.

It is when you only buy a few at a time that they seem expensive.

Same for bypass capacitors in the range of 1nF to 100nF.
Steve Greenfield AE7HD
Drawing Schematics: tinyurl.com/23mo9pf - tinyurl.com/o97ysyx - https://tinyurl.com/Technote8
Multitasking: forum.arduino.cc/index.php?topic=223286.0
gammon.com.au/blink - gammon.com.au/serial - gammon.com.au/interrupts

aarg

Lower brightness is kind of a good thing for me--my LEDs are blinding!
Many of today's LEDs are vastly more efficient than the original 20th century ones. But a lot of "circuit recipes" are from the old days. People wanted to get as much brightness out of them as possible because they weren't very bright to begin with. So the circuit values reflected a close to maximum "safe" value. 20 mA was very common, since a lot of LEDs had max current of 25 or 30 mA.

As the efficiency of many LEDs now allows outputs in the range of 1000-2000 mcd (even for a 3mm), the old circuits produce a somewhat blinding light if those are used. Sometimes this is a good thing. If it's just an indicator light, sometimes that's overwhelming.

I got on my thinking hat, and started using less current. It worked so well, I started to aim for the most efficient LEDs I could find. It really benefited some circuits by using less power, and loading outputs less. Sometimes I could even get away with a 10k resistor at 5V, and get about the same brightness that a 1984 LED gave with 270 ohms (in fact, that was for a 1984 computer restoration project).

People should stop blindly copying old circuits and look around at what's available today.
  ... with a transistor and a large sum of money to spend ...
Please don't PM me with technical questions. Post them in the forum.

charliesixpack

If I understand you correctly, you are putting several LEDs in parallel and connecting them in series with only one resistor.  If you can live with the LEDs being of unequal brightness this is perfectly OK. 

There is a reliability exposure if a significant fraction of the LEDs stop conducting (burn out) in which case the remaining LEDs will carry additional current.  For hobby applications, no problem.

aarg

#11
Mar 13, 2015, 01:06 am Last Edit: Mar 13, 2015, 01:07 am by aarg
If I understand you correctly, you are putting several LEDs in parallel and connecting them in series with only one resistor.  If you can live with the LEDs being of unequal brightness this is perfectly OK. 

There is a reliability exposure if a significant fraction of the LEDs stop conducting (burn out) in which case the remaining LEDs will carry additional current.  For hobby applications, no problem.
No you don't understand. legonick22 is switching the LEDs on and off.
  ... with a transistor and a large sum of money to spend ...
Please don't PM me with technical questions. Post them in the forum.

Grumpy_Mike

For hobby applications, no problem.
Would you cair to defend that remark? Last time I looked the laws of physics were the same if you are doing a hobby or not.

JimboZA

Would you cair to defend that remark? Last time I looked the laws of physics were the same if you are doing a hobby or not.
I think he means that in a hobby project it migth not matter if an LED fails, not that some parallel set of hobby-laws will prevent it burning out. In the real world, it could literally be a train smash if an LED failed although one would hope there was some redundancy.
Johannesburg hams call me: ZS6JMB on Highveld rep 145.7875 (-600 & 88.5 tone)
Dr Perry Cox: "Help me to help you, help me to help you...."
Your answer may already be here: https://forum.arduino.cc/index.php?topic=384198.0

Grumpy_Mike

#14
Mar 13, 2015, 10:39 am Last Edit: Mar 13, 2015, 10:40 am by Grumpy_Mike
Ah the casual indifference to component abuse and destruction. Never could get into that mind set myself.

A bit like saying my toadstool pizza is fine as I am not selling it, it's only a hobby.

My last wife I beat to death because she wouldn't eat her "miniature mushroom" pizza. 

Go Up