Go Down

### Topic: Understanding current limiting resistors (Read 2215 times)previous topic - next topic

#### redfuse

##### May 08, 2012, 12:04 pm
Hi all,

I have a question which is probably quite newbie, but have never really understood current limiting resistors for LED's. I am designing a stripboard prototype that needs to be as small as possible. I am working with shift registers (74hc595) and 3 x single segment led's, and I would like to know what the minimum amount of resistors is I can get away with. To understand this I made a very simple version of what I want to do with just LED's (see image below). In general I was wondering whether you have to use a resistor on each led (as on the left), or if you can get away with putting one resistor in series with all the led's (as on the right). Can anyone advice?

#### nickgammon

#1
##### May 08, 2012, 12:22 pm
The problem with the single resistor is that it will pass a fixed amount of current. But if you have more than one LED alight that will be shared. So if you configure the resistor to let 20 mA through, then one LED will get 20 mA, but two will get 10 mA each, and 4 will get 5 mA each, and so on.
Please post technical questions on the forum, not by personal message. Thanks!

#### MarkT

#2
##### May 08, 2012, 12:26 pm
There are two issues really - one is that different colour LEDs have very different forward voltages (so you cannot parallel them, period).

Secondly with identical LEDs from the same batch then the forward voltages are likely well matched.  So when in parallel they will all light up - but the currents are not shared very equally because the current is an exponential function of voltage and individual devices vary slightly (in voltage - thus the currents vary a lot, perhaps a factor of 2 or 3 - due to the sharp exponential)

Because of this extreme sensitivity of current to voltage and because there is usually no guarantee your LEDs come from the same batch the standard advice is separate current limiting resistors - this means the currents will be well matched and you can run all the LEDs at full current safely.

With LEDs in parallel the variation in current means some get a lot more than the average so you can't run them at full brightness without overloading some of them - so you derate the average current and you are wasting LEDs - basically its rough-and-ready engineering.

There is a further reason not to parallel devices and that's self-heating.  With high-power LEDs the LED chips heat up a lot, and at higher temperatures the current for a given forward voltage increases dramatically (forward voltage decreases with temperature).  This can lead to secondary thermal-runaway - the hotest LED steals all the current available and gets even hotter, takes more current and ultimately melts - there is now more current available to the others and the process repeats till all fail.  Sharing a heat-sink can reduce the severity of this effect, but its not a sensible way to design LED lighting...

The ideal way to power LEDs is through a constant-current source/sink for each string of LEDs.  Then we know the current for each LED is set just as wanted - this is particularly useful if the power supply voltage can vary.

Using a fixed voltage supply and current-limiting resistor is a cheaper and nearly-as-good alternative, so long as some voltage is wasted across the resistor - variations between devices and in temperature do cause some current variation, but its not a problem (except for semiconductor lasers).

If you parallel LEDs then you have less control over the current variations, you have to derate them, and you need to use identical devices.  This is generally a sub-standard approach (if you are powering the LEDs from a coin cell, note, then the battery itself is a current-limiting device so you can potentially guarantee no LED can overload).  If you are just prototyping something and don't care that's fine by me, but think of it as a dirty short-cut!
[ I DO NOT respond to personal messages, I WILL delete them unread, use the forum please ]

#### Eriba

#3
##### May 08, 2012, 01:08 pm
Quote
I am designing a stripboard prototype that needs to be as small as possible.

Instead of using discrete resistors you could fit resistor packs.

These are available in SIL (single, in-line) and DIL packages and will take up much less real-estate than individual resistors.

You just need to be aware of the power ratings.

#### redfuse

#4
##### May 08, 2012, 02:38 pm
@Eriba: thanks, I hadn't heard of that yet; it seems very useful.

@Mark and Nick: Thanks for your insightful replies. I understand what you're saying, but then I don't really get how a 7-segment LED could work. I have one that has a common anode to which you attach one resistor, and current can then flow to between one and seven different led's (datasheet: http://www.sparkfun.com/datasheets/Components/YSD-160AR4B-8.pdf). So how can the led's in this display work in parallel with just one resistor? According to the datasheet there don't seem to be any internal resistors?

#### Grumpy_Mike

#5
##### May 08, 2012, 05:18 pm
Quote
but then I don't really get how a 7-segment LED could work.

Because you have to have a resistor in each of the LEDs.

Quote
I have one that has a common anode to which you attach one resistor,

If you do you have the same problem, the segment's brightness is dependent on how many segments are on.

Quote
So how can the led's in this display work in parallel with just one resistor?

It can't. Not properly.

Quote
According to the datasheet there don't seem to be any internal resistors?

Yes but why should there be any internal resistors in this part? I have never known a 7 segment display with built in resistors. Remember resistors are only one way of limiting the current, you can also use a constant current driver.

#### redfuse

#6
##### May 08, 2012, 05:45 pm
Thanks Mike, I had been going on this tutorial here (http://allaboutee.com/2011/07/09/arduino-4-digit-7-segment-display-tutorial/), which only has one resistor per digit (circuit in second image).
So then I should put in a few more resistors...

#### Grumpy_Mike

#7
##### May 08, 2012, 06:17 pm
Yes there are many crap circuits pretending to be tutorials on the net. That is one of them. I would be surprised if you can see all 7 segments with a 1K resistor. It is not too bright in both senses of the word.

#### pwillard

#8
##### May 08, 2012, 07:27 pm
Quote
Yes there are many crap circuits pretending to be tutorials on the net.

Amen, bruddah.

#### nickgammon

#9
##### May 08, 2012, 10:29 pm

I understand what you're saying, but then I don't really get how a 7-segment LED could work.

I have an alarm clock circuit:

http://www.gammon.com.au/forum/?id=11165

I only put one resistor per 7-segments. The brightness of the digits varies depending on how many light up. So 1 is brighter than 8.

I realize the error of my ways now. So it works, but noticeably imperfectly.
Please post technical questions on the forum, not by personal message. Thanks!