# Arduino Forum

## Using Arduino => LEDs and Multiplexing => Topic started by: TanHadron on Jul 28, 2013, 03:39 am

Title: Do I need a resistor for each LED?
Post by: TanHadron on Jul 28, 2013, 03:39 am
I see this kind of circuit quite a bit:

Why is not done this way?

If I did it this way, what problems would I run into?
Title: Re: Do I need a resistor for each LED?
Post by: larryd on Jul 28, 2013, 03:42 am
Paralleling LEDS will not effectively work as the some LEDs turn on at lower voltages than others.

The 1st diagram is the correct one to use.
LEDs in series guaranties all the LEDs in that string will get the same current.
Title: Re: Do I need a resistor for each LED?
Post by: TanHadron on Jul 28, 2013, 05:11 am
So you're saying that some LEDs will be brighter than others?

But using resistors will give us the same problem, won't it?  I mean the 50 ohm resistor in the first circuit basically tries to arrange for there to be 4.0 volts across the two LEDs at 20 mA.  If the LEDs "turn on" at a higher voltage, won't that mean there will be less current, because of the greater voltage?

I'm looking at OVLG x0CyB9 Series high intensity red LEDs.  The spec sheet says at 20 mA current, they range between 1.8-2.4 volts, with the typical at 2.0.  Suppose I get two on the high end that need 2.4 volts to hit 20 mA.  With the 50 ohm resistor, they won't get that much.  The current they get isn't linear, like the resistor, and it's hard to see from the chart how much they would actually get, but maybe they would even out at 12 mA and 2.2 volts.  The resistor would get 0.6 volts at 12 mA.  So at 12 mA since the graph for brightness looks linear with respect to current, they'll be at 60% brightness.

I guess to guarantee brightness I either have to use a constant current circuit with each LED, or test them and match with a resistor?

But we use the "correct" first circuit with resistors all the time.  So is it usually acceptable, or does the second circuit compound the problem and make it unacceptable?
Title: Re: Do I need a resistor for each LED?
Post by: larryd on Jul 28, 2013, 05:35 am
We have to ensure the RED GREEN and BLUE current flow has to be the same for the intensities to be the same in all the LEDs.
If Vf of the LEDs are not perfectly matched then one path will have more or less current, hence the intensities will be different.
Using resistors and the first diagram ensures the current flow is the same for all 3 strings of LEDs.
Title: Re: Do I need a resistor for each LED?
Post by: Grumpy_Mike on Jul 28, 2013, 07:14 am
If you use the second circuit only the red led will be on because that has a forward voltage lower than the other two. So the red will get three times the current and will probbly blow. Try upping the resistor to say 220R and you will see only the red LED is on.
Title: Re: Do I need a resistor for each LED?
Post by: TanHadron on Jul 28, 2013, 07:47 am
I'm using 2 red LEDs and 4 yellow LEDs.  they're supposed to all have close to the same forward voltage.  I'm guessing LarryD put the other colors in there to illustrate his point.
Title: Re: Do I need a resistor for each LED?
Post by: 1ChicagoDave on Jul 28, 2013, 10:29 am
LEDs CANNOT be placed in parallel - until you read this:
LEDs "generate" or "possess" or "create" a voltage across them called the CHARACTERISTIC VOLTAGE-DROP  (when they are correctly placed in a circuit).
This voltage is generated by the type of crystal and is different for each colour as well as the "quality" of the LED (such as high-bright, ultra high-bright etc). This characteristic cannot be altered BUT it does change a very small amount from one LED to another in the same batch. And it does increase slightly as the current increases.
For instance, it will be different by as much as 0.2v for red LEDs and 0.4v for white LEDs from the same batch and will increase by as much as 0.5v when the current is increased from a minimum to maximum.
You can test 100 white LEDs @15mA and measure the CHARACTERISTIC VOLTAGE-DROP to see this range.
If you get 2 LEDs with identical CHARACTERISTIC VOLTAGE-DROP, and place them in parallel, they will each take the same current. This means 30mA through the current-limiting resistor will be divided into 15mA for each LED.
However if one LED has a higher CHARACTERISTIC VOLTAGE-DROP, it will take less current and the other LED will take considerably more. Thus you have no way to determine the "current-sharing"  in a string of parallel LEDs.  If you put 3 or more LEDs in parallel, one LED will start to take more current and will over-heat and you will get very-rapid LED failure.  As one LED fails, the others will take more current and the rest of the LEDs will start to self-destruct. The reason why they take more current is this: the current-limit resistor will have been designed so that say 60mA will flow when 3 LEDs are in parallel. When one LED fails, the remaining LEDs will take 30mA each.
Thus LEDs in PARALLEL should be avoided.
Diagram A below shows two green LEDs in parallel. This will work provided the Characteristic Voltage Drop across each LED is the same.
In diagram B the Characteristic Voltage Drop is slightly different for the second LED and the first green LED will glow brighter.
In diagram C the three LEDs have different Characteristic Voltage Drops and the red LED will glow very bright while the other two LEDs will not illuminate. All the current will pass through the red LED and it will be damaged.
The reason why the red LED will glow very bright is this: It has the lowest Characteristic Voltage Drop and it will create a 1.7v for the three LEDs. The green and orange LEDs will not illuminate at this voltage and thus all the current from the dropper resistor will flow in the red LED and it will be destroyed.
Title: Re: Do I need a resistor for each LED?
Post by: cjdelphi on Jul 28, 2013, 10:42 am
In short, not all LED's are made equal.

Some will be brighter some will be darker at exactly the same voltage, so by using 3 strings you'll get better results....
Title: Re: Do I need a resistor for each LED?
Post by: TanHadron on Jul 29, 2013, 12:46 am
1ChicagoDave, thanks for that information.  I ran some tests and it seems I can see some of what you are talking about, but there is something else that isn't adding up.

I tested 6 red LEDs and 6 yellow LEDs through a 150 ohm resistor and measured the voltage and current they were showing.

 red V red mA yellow V yellow mA 2.21 18.8 2.15 19.2 2.07 19.8 2.15 19.2 2.04 20.0 2.14 19.3 2.04 20.0 2.12 19.4 2.06 19.8 2.12 19.4 2.09 19.7 2.13 19.4

When I hooked up two or three in parallel, I didn't get the results I expected.  I got widely varying currents that didn't seem to have anything to do with the voltage I had recorded.  I hooked up the 2.21 V red one, one of the the 2.04 V red ones, and the 2.13 yellow one in parallel.  I thought the outlier 2.21 V resistor would get much lower current.  It turns out that was correct.  It was measuring 7.6 mA.  The other red one measured 16.5 mA, but the yellow one was giving me 27.5 mA.  What's up with that?!?

As I swapped in and out different LEDs it seems the ones that sucked most current and glowed brightest didn't have much to do with the voltages I measured with the 150 ohm resistor.  I can't explain it yet, but I'm still working on the pattern.  Maybe this CHARACTERISTIC VOLTAGE DROP is measured in another way?

The other thing is that my current numbers don't add up.  All three LEDs in parallel measured 53.5 mA, but 7.6 + 27.6 + 16.5 = 51.6.  I think when I use my ammeter to measure the current it interferes in some way and gives me different readings.  I tried it with two ammeters measuring at the same time, but they gave me totally different readings.  That's not even useful.  I'm working on a way to get more accurate readings as well.
Title: Re: Do I need a resistor for each LED?
Post by: runaway_pancake on Jul 29, 2013, 01:41 am
The quality of an ammeter can affect your results, and they're a mixed bag anyway (IMHO).
Assuming your source voltage is constant (regulated), measure the voltage across the resistor and divide that by the resistance to deduce the current.
The difference between the supply and what's across the resistor is, therefor, across the LED.
Title: Re: Do I need a resistor for each LED?
Post by: Grumpy_Mike on Jul 29, 2013, 05:18 am
The problem here is that once you change the resistor you change the voltage drop on the LED so your figures never will add up because the voltage current relationship is not a linear one.
Basically as others have said you can not connect LEDs in parallel because tiny changes in on voltage result in large cha he's in current.
Title: Re: Do I need a resistor for each LED?
Post by: polymorph on Jul 30, 2013, 09:03 pm
It isn't just differing voltage drop. The bulk resistance is different from LED to LED, and from color to color. That is the slope of the curve after you get past the turn-on knee. So maybe the yellow LED has a steeper curve, ie, lower bulk resistance than the red LED.

In addition, perfectly matched LEDs in parallel can go wrong. Voltage drops across an LED by -2mV/C, roughly, and I think bulk resistance goes up at the same time. These rarely cancel perfectly and even then it depends on where you are on the V/I curve, so if one LED starts to get a little warmer than the rest, it can cause thermal runaway.

If you want to get better measurements, forget using your ammeter scale. Put a very low ohms resistor in series with each LED. I found a bunch of 0.1 ohm 2% resistors at a surplus store and bought about 20 of them just to have for this sort of thing. Then just measure the voltage across the 0.7 ohm resistors. It will slightly affect things, but at least it'll stay the same from measurement to measurement.
Title: Re: Do I need a resistor for each LED?
Post by: Grumpy_Mike on Jul 30, 2013, 09:30 pm
Quote
If you want to get better measurements, forget using your ammeter scale. Put a very low ohms resistor in series with each LED. I found a bunch of 0.1 ohm 2% resistors at a surplus store and bought about 20 of them just to have for this sort of thing. Then just measure the voltage across the 0.7 ohm resistors.

Odd that, I thought that was exactly how a multimeter is wired inside for measuring current.
Title: Re: Do I need a resistor for each LED?
Post by: runaway_pancake on Jul 31, 2013, 02:35 am

Odd that, I thought that was exactly how a multimeter is wired inside for measuring current.

Mike,
Is it an actual "shunt" or is it the fuse?
Title: Re: Do I need a resistor for each LED?
Post by: retrolefty on Jul 31, 2013, 03:49 am

Odd that, I thought that was exactly how a multimeter is wired inside for measuring current.

Mike,
Is it an actual "shunt" or is it the fuse?

Most modern DMM have both separate resistor shunt(s) and separate fuse(s) for typically the two different current jacks.

Lefty
Title: Re: Do I need a resistor for each LED?
Post by: runaway_pancake on Jul 31, 2013, 03:13 pm

Most modern DMM have both separate resistor shunt(s) and separate fuse(s) for typically the two different current jacks.

Lefty

I have two of the same Fluke (70-series) meter.  I cleared the fuse in one of them (the mA) and replaced it with an "equivalent" rated fuse.  Then the readings were off.  I swapped the fuse with the other which still had its original and it was better.  I placed the "equiv" in the other meter and then it was off.

Title: Re: Do I need a resistor for each LED?
Post by: retrolefty on Aug 01, 2013, 06:25 am

Most modern DMM have both separate resistor shunt(s) and separate fuse(s) for typically the two different current jacks.

Lefty

I have two of the same Fluke (70-series) meter.  I cleared the fuse in one of them (the mA) and replaced it with an "equivalent" rated fuse.  Then the readings were off.  I swapped the fuse with the other which still had its original and it was better.  I placed the "equiv" in the other meter and then it was off.

If you check your Fluke user's manual I suspect it says there are no 'equivalent' fuses for the meter and to only use fluke 'approved' fuses designed for the model in question. They are hellishly expensive also.

Lefty
Title: Re: Do I need a resistor for each LED?
Post by: polymorph on Nov 27, 2013, 03:47 am
Sorry, I have a handful of meters with no current measurement. And before that, I had meters that had relatively high resistance on the lower current ranges. With 0.1 ohms (typo said 0.7 ohm) on the 200.0mV scale, I can measure down to 1mA.

Probably not an issue with newer DMMs with lower current shunt resistors.