4

I have a bunch of LEDs. As I understand it, despite being the same part number, their behavior (in terms of brightness) can vary significantly.

If I'm going to use a whole bunch and would like them to have similar brightness, and I can't drive them in series (e.g. an LED strip that can be cut between individual LEDs), is it better to use a 2-pin inline constant current regulator (e.g. as mentioned here), or a boring old resistor? More interestingly, please explain the trade-offs of each. (Obviously "price" is going to be one of those, but which behaves better in terms of brightness uniformity, and why?)

If there's a [performance] difference between a constant current regulator and a constant current diode, feel free to address both in an answer.

(Related to, but not the same as, How to wire mixed-count groups of LEDs?, which didn't get a satisfactory answer. Also similar to How to choose a perfect resistor to LEDs to get same brightness?, but the answers there have very little in the way of explanation. I don't just want to know "what works better", I want to know why it works.)

...and yes, I'm aware the "best" answer is to start with LEDs with similar performance in the first place. Best case, I can avoid that. Worst case, I do that anyway but still want to know how to best hedge my bets.

Matthew
  • 572
  • 3
  • 13
  • 1
    Don’t get too worried about matching - the human eye is quite insensitive to moderate variations in brightness, as its operating range covers several orders of magnitude. – Frog Oct 12 '23 at 18:24
  • 1
    @Frog that's true, but only helps if there's also that high dynamic range where you point your eyes. A 10% difference in backlight brightness on a laptop screen is quite annoying,. – Marcus Müller Oct 12 '23 at 18:35
  • @Frog, if we were talking a difference of 25%, you'd probably be right. However, the data sheet for the particular LED I'm considering says 112 mcd - 450 mcd. Does a 4x difference fit your criteria of "moderate variations"? – Matthew Oct 12 '23 at 18:35
  • 1
    @Matthew The real variation is probably much smaller than that and a large value is being given because they aren't characterizing brightness. In this case it sounds like you're looking at an inappropriate product. You can get tightly binned diodes easily enough. – user1850479 Oct 12 '23 at 23:04
  • 1
    @user1850479, oh, sure, the data sheet is probably pessimistic. What would you consider an "appropriate" product, though? (And do they cost less than $20/100?) I'm looking for "white", and ideally ~3216/1206, ~6000k. Brightness is one thing I'm really not sure about, but this is for an indicator, not a light bulb. My guess would be somewhere in the 100 mcd - 1500 mcd range. (Feel free to reply in chat...) – Matthew Oct 13 '23 at 04:34
  • @Matthew that’s probably pushing it – Frog Oct 13 '23 at 04:59
  • if they are all switched, you could use PWM to "calibrate" them; do a baseline 75% duty cycle, then notch each one up or down to match the brightness 75% yields on the most chips of your group. – dandavis Oct 13 '23 at 06:33
  • @Matthew Are those 112-450mcd given for the same operating conditions, or does the range reflect the whole operating range of the LED (min/max current, non-pulsed/pulsed)? – mow Oct 14 '23 at 14:50

3 Answers3

10

An LEDs brightness is mostly dependent on current, and their junction voltages can vary from batch to batch or even device to device, so to get consistent brightness from LEDs (of the same model) you need to get the same current through each LED, it's just a matter of how best to do this.

One common way is to connect them in series, which forces them to all carry the same current. The problem with this is that you need enough voltage to overcome the sum of the junction voltages. Ten 3 V LEDs in series will need at least 30 V. If only lower voltage is available they would need to be connected in parallel, or series parallel, so each parallel branch will need it's own current limiting / regulating.

Resistors will give you some consistently in current, and the higher the voltage and resistance, the more they will act like a constant current source. How constant it will be will depend on the ratio of voltage across the LEDs to the voltage across the resistors. Unfortunately high voltage is probably not going to be available. Back when 7 segment LED displays were common, running the segments from 5 V through a 470 \$\Omega\$ resistor was generally good enough.

If you want something better than what a resistor can do you need active current sources (or sinks), these could be CCS diodes or current sources made with transistors. A cost effective way of doing it might be to use a current mirror, with one transistor per LED driven from one reference current.

Here's a quick simulation I did of resistors vs. a current mirror, the traces at the top, middle and bottom are with resistors, the second, third and fourth from the top are with the current mirror and are grouped more tightly.

enter image description here

The measured values from the simulation are with resistors:

  • i_led1: AVG(i(led1))=0.00806672 FROM 0 TO 1
  • i_led2: AVG(i(led2))=0.00796692 FROM 0 TO 1
  • i_led3: AVG(i(led3))=0.00786719 FROM 0 TO 1

with current mirror:

  • i_led4: AVG(i(led4))=0.00805038 FROM 0 TO 1
  • i_led5: AVG(i(led5))=0.00804305 FROM 0 TO 1
  • i_led6: AVG(i(led6))=0.00803573 FROM 0 TO 1

For many cases resistors are close enough, but the current mirror does improve on them.

Or you could look for a dedicated LED driver IC that will do what you want.

GodJihyo
  • 22,826
  • 1
  • 20
  • 58
  • 2
    "As you know"... actually, I don't know; that's why I'm asking! I do know, or at least think I do, that the more voltage is dropped by the resistor, the more the current will be consistent, which means using a resistor to drive a 3V LED will "work better" at 12V than at 3.3V. If you could mention/expand on that in your answer, and also why regulating the current improves brightness consistency, that would be much appreciated! – Matthew Oct 12 '23 at 19:00
  • 3
    Hi @Matthew, can I recommend you stop using so much emphasis in your posts (bold, italic) and exclamation marks. They read as over-emotional, angry and shouty, which isn't all that pleasant to read and respond to. Words emphasise themselves just fine without that extra decoration/punctuation. Read in that way, ["As you know"... actually, I don't know; that's why I'm asking!] doesn't seem to me a fair response to someone who's put a lot of effort into writing you a long and detailed answer for free, it reads like an angry retort. I'd like to think that's not what you intended. Thanks. – TonyM Oct 12 '23 at 19:32
  • @Matthew Edited. Not sure that's exactly what you want, if you're asking why the brightness is current based you'd have to get into the physics of LEDs, which isn't really my area of expertise. – GodJihyo Oct 12 '23 at 19:37
  • BTW, my problem, as you'll see if you're curious enough to look at https://electronics.stackexchange.com/questions/684558, is that I don't have a convenient way to control a multi-channel driver (unless you know one that takes parallel inputs?)... unless I can find something that does the same job that I can plausibly use one per LED. Fortunately, a CCR seems to be exactly that. Thanks for the information on current mirroring! Since I'm probably going to prioritize uniformity and board space over cost, I'll probably stick with CCRs, but it's still interesting and informative. – Matthew Oct 12 '23 at 19:47
  • 4
    @TonyM, sorry, I'm not an emotionless automaton. I'm not sure what it says that you interpret my attempts to express cheerfulness as hostility. It's also my experience that folks here often ignore important information or sometimes don't even answer the question I'm asking. Accordingly, I've gotten into the habit of using bold to highlight the actual question. To be fair, I'm not sure it actually helps. Overall, though, I have to say my impression of this community is extremely mixed. – Matthew Oct 12 '23 at 19:50
  • 1
    @Matthew You are right that using a larger voltage drop across the current limiting resistor leads to a more predictable current in the LED. Sensitivity analysis leads to this: $%, I_\text{LED}=\frac{%, V_\text{CC}}{1-\frac{V_\text{LED}}{V_\text{CC}}}-\frac{%, V_\text{LED}}{\frac{V_\text{CC}}{V_\text{LED}}-1}$. (See here for its development.) Like you, I'm also not an emotionless automaton. But if enough detail gets pulled out over time where I feel I fully understand your goals, I may respond constructively. Just not beforehand. – periblepsis Oct 12 '23 at 20:13
  • @Matthew, it's just a friendly observation :-) "sorry, I'm not an emotionless automaton" That's going from one end to the other extreme - there's a long stretch in the middle where most people here live. "I'm not sure what it says that you interpret my attempts to express cheerfulness as hostility" Too deep, I don't think it's some lone view of mine - have a read of what you'd written before, and see if you now see it. But your comments since I posted that above read much friendlier. If that's what you always intended then your newer style, (emphasis/!'s gone) is certainly doing that :-) – TonyM Oct 12 '23 at 20:17
  • @Matthew I worked directly for a very large LED manufacturer tackling/improving on their binning of LEDs for similarity in both color (usually called hue) and brightness, as well as CIE color calibration for RGB LEDs used in large panels with separations as large as 3mm and 5mm in their gridding down to much smaller spacing in tiny displays. When I feel I have the boundaries of your goals in mind, I may be able to relate some info about how certain pros achieve their results. – periblepsis Oct 12 '23 at 20:31
  • @periblepsis, let's continue this in chat... – Matthew Oct 12 '23 at 20:38
  • @Matthew Attempt to find and buy binned LEDs if this is a one-off or few-off project. Manufacturers will offer LEDs that have been binned in two ways at once -- both hue and brightness. I know so, because I worked in Penang binning LEDs in just that way for customers so they could make displays work in the way you want. Think of it as a matrix with hue on one axis and brightness on the other axis and thousands of boxes. With binned LEDs, operated by their specified current, you will get sufficient similar results that should be satisfying. (Or you can buy lots of LEDs and do your own binning.) – periblepsis Oct 13 '23 at 05:44
  • @Matthew The issue with regard to compliance voltage required (differing numbers of LEDs in a series string) is something you will just have to solve. Same with respect to ensuring repeatable current sink/sources over temperature. There are ICs that do this very well for you. But you can do it with discretes, either matched to some degree or not. Check this link here on EESE for some thoughts about discrete parts design. You will have to expand on those thoughts, though. – periblepsis Oct 13 '23 at 05:48
2

LED brightness is dependent on current, which you are well aware of.

When an LED is wired up to a supply and a load resistor, what sets the current? The LED forward voltage, or Vf, together with the load resistor and supply voltage.

That is,

  • I (LED) = (Vsupply - Vf) / Rload

Now, what varies from LED to LED? The LED's forward voltage characteristic, that is, its I-vs-Vf relationship. This characteristic shifts with both manufacturing tolerance and with temperature This chart illustrates the relationship of current to Vf:

enter image description here

From here: https://www.allaboutcircuits.com/technical-articles/the-basics-behind-constant-current-led-drive-circuitry/

Given the same load resistor and voltage, an LED with a low Vf will be brighter than a one with a higher Vf. That's the variation that you're trying to avoid.

Now here's the thing. The ratio of Vf to load resistor IR drop determines how sensitive the LED brightness (that is, current) will be to variations in Vf. Small IR drop = very sensitive; large IR drop = not so sensitive.

This issue is why it is so difficult to run 3.1V LEDs on 3.3V: not enough IR drop overhead to ensure consistent brightness.

So one brute-force method to even out LED to LED brightness is to use a higher voltage and larger load resistance for each LED. The drawback of course is more power shed in the load resistors.

Can't do that? Then you need a current regulator per LED. An efficient way to do that is to use a current mirror, where one current source sets the current for multiple devices. Current mirrors can be constructed from bipolar transistors or FETs. Read more about them here: https://wiki.analog.com/university/courses/electronics/text/chapter-11

A convenient way is to use an LED driver IC that includes a current mirror. Here's one that supports 12 channels from a common reference, and has a programmable (via I2C) PWM brightness control: https://www.onsemi.com/pdf/datasheet/ncv7684-d.pdf

Here's a 24-channel one that uses SPI, on a PC board: https://www.adafruit.com/product/1429. It's based on the TI TLC5947

hacktastical
  • 53,912
  • 2
  • 49
  • 152
  • BTW, as elsewhere noted, using a multi-channel driver (unless you know one that has parallel inputs) is hard for my application. Ignoring the extra features, how much difference is there between a "fancier" driver and a 2-pin CCR? If you have any thoughts on that, it would make a great addition. – Matthew Oct 12 '23 at 20:31
  • I disagree. A multichannel constant-current driver can be initialized by a low-cost microcontroller, such as an AVR Tiny. This is fewer components (and probably lower cost) than using individual limiters. Then you have a two-chip solution that can support dimming. Meanwhile, an issue with making a multi-channel current mirror as suggested elsewhere (and in my answer too) with discrete components is that current mirrors require matched transistors. – hacktastical Oct 12 '23 at 21:07
  • That said, are you really constrained such that you can't wire the LEDs in series? If you have access to all the LED terminals you can do whatever you want. Boost CC LED drivers are cheap and efficient. – hacktastical Oct 12 '23 at 21:08
  • If your truly working with a strip of parallel LEDs, the cheap-and-cheerful way to improve matching would be to replace the resistor that's on each LED with a higher value and increase the drive voltage. – hacktastical Oct 12 '23 at 21:25
1

If you have plenty more LEDs than are required, test them on a breadboard with power from a bench PSU and one suitable resistor per LED in parallel. Then, set aside the LEDs that are visibly the wrong brightness. This will also weed out any dead ones before you've gone to the effort of soldering them.

If you do them in batches of, say, ten, you can be fairly sure that you will end up with a reasonably matched set of LEDs.

You might want to check the resistors with a multimeter first.

Andrew Morton
  • 2,632
  • 1
  • 18
  • 27
  • After watching bigclive's video, checking the LEDs with a DMM first is probably also a good idea. BTW, any tips for how to test SMD LEDs? – Matthew Oct 13 '23 at 20:33
  • @Matthew Ah, I should have read your question more carefully :( But don't LED strips tend to be fairly well matched between the LEDs in the strip anyway? As long as you don't pay the very lowest price, anyway. – Andrew Morton Oct 13 '23 at 20:41
  • @Matthew I suppose that if instead of testing in parallel you test in quick succession, you may be able to spot differences in brightness. – Andrew Morton Oct 13 '23 at 20:44
  • I think you have that backwards; I'm not cannibalizing LED strips, that was just an example where wiring in series isn't possible (e.g. if I was building my own LED strip). I think your answer is useful, aside from it being a bit awkward to connect SMD components to a breadboard. However, I feel confident there are good solutions for that; I'm just not sure offhand what they are. – Matthew Oct 13 '23 at 21:08