5

I'm planning to build an aquarium lightning system with individually controllable LED's, I don't have much experience with electronics except from the irregular tinkering, but I'm a programmer and I think I'll be able to put something decent together.

The system will consist of about 30 * 3W LEDs, I already have those as well as heat-sinks, lenses, thermal glue and a couple of PWM-boards similar to this. My initial plan was to build some kind of simple transistor switch between each individual LED and the power supply, a switch that I could control with the PWM-board, which in itself is controlled by an arduinio/raspberry pi.

Then I read on and discovered that LEDs are supposed to be current regulated, not voltage regulated. So now I'm not sure about how to move on.

I've considered just buying a bunch of individual constant current drivers like these, but I don't see how I'd be able to pwm those properly. (I realized that most of my LEDs aqually are in the 700mA range instead of the 300mA that I first thought, now it's starting to get unreasonable expensive to buy one of these for each single LED, in an otherwise quite cheap system...)

What I really would need is some kind of variable current driver, from between 0(?)-800mA (I've understood that very dimmed LEDs draws very little current, so I need a big range there), that I can control with pwm, but that does not seem to be a thing I can buy like the regular constant current circuits.

Any ideas? I've considered to buy a current sensor for each LED and to use this data to properly modulate the individual LED's myself. But I'm not sure I can find some that reliably can measure the low currents that I need. Or does the spec sheet for that MAX471-chip really say that it has a resolution of 0.5 mA per A (Current-Sense Ratio)?

Clarification on functional needs

  1. I need a lot of light in order for the plants in the aquarium to thrive. I need as much white light as I can get from each watt.
  2. I want to be able to control the light in aspect of intensity as well as tone/temperature (I have different temperature LED's).
  3. I want to be able to control exactly what parts of the tank are lit and how those parts are lit. E.g., I want to able to simulate similar dynamics as to clouds passing by or lightning, or just to selectively light certain parts of the landscape.
  4. Not critical but valuable: Scalability. The ability to easily to add or remove LEDs.
JRE
  • 67,678
  • 8
  • 104
  • 179
Alex
  • 158
  • 6
  • @Alex sorry about that -- missed the 3W LED part. Case of the Mondays. – calcium3000 Jan 09 '17 at 15:04
  • Some LED constant current drivers will accept an analog/PWM signal and drive the LED proportionally. They are generally more suited for a few LEDs in series though (3+). I don't recall seeing such a solution for individual LEDs. – Wesley Lee Jan 09 '17 at 15:46
  • To make the question easier to answer, you should explain the purpose of this control function. More of a higher level description. – Sean Houlihane Jan 09 '17 at 16:02
  • @SeanHoulihane Ok, I'll try to do that. – Alex Jan 09 '17 at 16:16
  • 1
    Since this is a planted tank -- have you considered just adding more macros and CO2 when your LEDs bleach the chlorophyll right out of the leaves? That's my plan when I finish my lightbar :) – Bryan Boettcher Jan 09 '17 at 20:35
  • @WesleyLee Wow, thanks to you I actually found [this](https://www.aliexpress.com/item/3W-5-35V-LED-Driver-700mA-PWM-Dimming-DC-to-DC-Step-down-Constant-Current/32699983693.html), I think this is very very interesting. – Alex Jan 09 '17 at 20:56
  • For efficiency, you might consider a switched-mode constant current source driver. But you'd need one for each LED (or series chain of LEDs.) And it would need to support PWM. – jonk Jan 09 '17 at 20:56
  • @jonk Like the one I just found and linked to just above your comment? – Alex Jan 09 '17 at 21:02
  • @Alex Yes. On ebay, they can be had for $15 for 10, or about $1.50 each. If you need 30, that's $45 total. You also need all the I/O pins, though, or else a _very fast_ serial chain to an I/O expander of some kind. PWM on 30 channels is hard to find in a single controller. But I think you already found 16 channel expanders. So perhaps that's okay if you don't need to update them often. Perhaps you have a solution now. Just be aware that \$700\:\textrm{mA}\$ probably won't get you a full \$3\:\textrm{W}\$ output at the LED itself. (Perhaps almost a watt less.) – jonk Jan 09 '17 at 21:12
  • @jonk Really? The spec on all the 3W LEDs I bought say 700mA forward current, aren't they supposed to actually be 3W at 700mA then? – Alex Jan 09 '17 at 21:28
  • Most of them are 3.2-3.4V though. – Alex Jan 09 '17 at 21:29
  • 1
    @Alex It all depends on your LEDs, I suppose. Ones I've used (only a few, I admit near this power) were \$3.2\:\textrm{V}\$ at \$700\:\textrm{mA}\$ so only about \$2.2\:\textrm{W}\$. But who cares? If it gets you close, that's probably good enough. Just wanted to mention it as something to consider. When you test these, measure the voltage across the LED when operating them with those boards or with a resistor paired with a bench supply you may have. That will tell you the full truth of the situation. In any case, its more about efficiency converting power into light. Different thing. – jonk Jan 09 '17 at 21:34
  • I learned a trick I'd not have considered looking inside household LED replacement bulbs. I already knew the more LEDs you put in series, the easier it becomes to waste less power with a dropping resistor, starting from a higher voltage. What surprised me was to see a capacitor used instead of a complex switcher or even a dropping resistor. The capacitor was followed by what seems to be a full wave diode matrix, and a final larger capacitor acted as a filter to avoid flicker. Food for thought maybe? It certainly solved the mystery of how they made these bulbs sell so cheap. – Randy Jan 09 '17 at 23:25

5 Answers5

2

To answer your question about current regulation, a handy feature of LEDs is that the forward voltage across them is approximately constant, regardless of the current. So a red LED drops about 1.5V, a blue LED about 3V, and the other colours are in between.

Knowing that, it's possible to use a simple resistor to limit the current through the LED to a suitable value. The resistor value will depend on the supply voltage. If the supply voltage is well above the voltage of one LED, consider wiring a few LEDs in series, otherwise you'll have to deal with a bunch of unnecessarily hot resistors.

Simon B
  • 18,609
  • 1
  • 29
  • 55
  • 2
    This. This is how to drive a LED. You emphatically do ***NOT*** want constant-current drivers, current sensors, or all the other stuff you mention - I'm afraid this is a case of a little knowledge being a very bad thing! Except for some very specific niche applications, you always set the current through the LED using a current-limiting resistor. A good little calculator for the resistor value you want is here: http://led.linear1.org/1led.wiz And then you do PWM to set the brightness, and everything just works. – Graham Jan 09 '17 at 17:41
  • 1
    At 3 watts, that's ~1 amps per LED. Even with 0.5 ohm resistors, that's a lot of power wasted overall and it still doesn't give a very good current control with a resistor that small. If you increase the resistor, you end up with even more wasted power. What you state applies better to smaller LEDs. PWM or PWM with an inductor on power LEDs is often the better way to go since the current/voltage relationship isn't super steep. – horta Jan 09 '17 at 19:08
  • 4
    @Graham I worked professionally for Siemens/OSRAM and we definitely did use constant current drivers and did NOT use current limiting resistors. One I worked on was an \$80-100\:\textrm{W}\$ RGB LED module. A fixed voltage rail was supplied to each of three rails, which each had a low-overhead constant current driver. These were tweaked to provide 100% drive. Then PWM was used within that to set the brightness of each color. Widely used modules (millions sold), too. Just a note. – jonk Jan 09 '17 at 19:23
  • Hmm... The simplicity of this is very attractive, I just so happen to have these star-shaped cylindrical heat-sinks that I've planned to use, that just so happens to have a center hole in them where I probably could fit a quite beefy resistor which I could embed in thermal glue... Although when I enter my numbers (6v supply, 3.5v drop, 700 mA) [here](http://ledcalc.com/), it looks like the resistors are going to consume almost half of the total power consumption (1.6/2.2 W). That does not feel so attractive. – Alex Jan 09 '17 at 19:45
  • Unless maybe if I find a more efficient way to bring down the supply voltage to like 4v instead, and take that as my mains... Then I'd probably could buy a regular 12v supply that is easier to find. – Alex Jan 09 '17 at 20:11
  • @jonk Thanks for the prompt on that. If you're doing this professionally with high-power LEDs, of course you know what you're doing and how to set up a constant-current driver to match the LED. For the OP who's probably not yet familiar with Ohm's Law, I suggest he probably wants to keep it a lot simpler! :) – Graham Jan 10 '17 at 10:53
1

I would matrix them into a 5X6 array as your title suggests using time division multiplexing. This works by turning on one set of 5 on at a time for 1/6th of the time. Then you switch to the next set of 5 for 1/6th of the time. If you do this fast enough, higher than 30hz, to the human eye, it will look like it's always on, just dimmer. You can increase power to some degree to compensate for the 1/6 dimness.

Use 5 or 6 transistors to power the low side of the LEDs. Control the transistors with PWM or PWM filtered with an RC filter. Since 3 watt LEDs don't have a vertical voltage/current relationship (it has some slope to it), you can use a regulated supply voltage to get you within a region that won't damage them.

If you need more accuracy/control than what a PWM with a transistor would give you, you can add in 5 or 6 low side current sense resistors. Then use the ucontroller's analog input capability to determine how much current is flowing and adjust the pwm accordingly.

horta
  • 12,738
  • 22
  • 45
  • Thank you, I'll try to make sense of what you wrote and see if that is something I can do. I'll get back to you. – Alex Jan 09 '17 at 16:14
  • Just as you know, I realized that the matrix itself might be an implementational detail so I removed that from the title, even though it might be an excellent solution. – Alex Jan 09 '17 at 16:32
  • @Alex matrixing your LED's is a sure way to simplify your circuit design needs and reduce your BOM(build of materials) size and cost. – horta Jan 09 '17 at 16:33
  • 1
    I suspect that despite fooling the human eye for a brighter effect, multiplexing would not be the actual light energy equivalent of all the LEDs being lit simultaneously, as far as the plants are concerned. – Randy Jan 09 '17 at 23:30
  • @Randy It wouldn't be. You have to overdrive the LEDs for a shorter time which has diminishing returns. Still, it's a much more scalable than a non-matrixed solution. – horta Jan 09 '17 at 23:55
  • Research has found plants do not like flashing light. And you need 16X more LEDs if the light is on 1/16th the time. TDM is not the way to go. – Misunderstood Dec 01 '18 at 16:18
1

Assuming that the goal is decorative rather than functional, you could consider using digitally addressable individual LEDs, like neopixels (the bare LEDs are available if you want to assemble something. These are RGB, but a bit less than 3W (probably less than 1W). In this case, you'd need several high-current 5V supplies rather than constant current power supplies. A microcontroller can drive quite a large number of these (the digital signal is daisy-chained).

If you really want to PWM 30 individual LEDs, you do need 30 individual current regulators. If its OK to arrange them in strings, each string can be PWM with a single switch, but you risk generating electrical noise. Depending on the scenario where you want to use this, it could be a problem.

The PWM driver which you identified can only supply about 10mA per channel (at best), so would be OK with small LEDs, not your 3W target.

Sean Houlihane
  • 3,733
  • 1
  • 16
  • 25
  • Thank you for your answer. There are actually some functional needs here: I need a lot of light. It's a planted thank, and my aim is to give them as much I can. And I generally need white light, I already have a mix of different LEDs with temperatures 2.5-10.000K, and a random bluish and a redish, and a couple of UVs. The light strips would be very convenient but I'm not sure that is what I'm looking for here. And my plan with the PWM was to drive a power circuit that powers a LED, not to power the LEDs themselves. – Alex Jan 09 '17 at 16:13
  • @Alex Are you aware that the spectral output of white LEDs may not be what's better for such plants? See: https://en.wikipedia.org/wiki/Light-emitting_diode#/media/File:White_LED.png for an example. – jonk Jan 09 '17 at 19:26
  • @jonk Yeah, I'm kinda aware of that the plants have some special preferences for a certain wavelengths, although my primary goal will probably be to start with the regular white LED's in different temperatures and experiment with appearance and growth. Then maybe adapt when I see how stuff works. Thanks for the heads-up. – Alex Jan 09 '17 at 20:03
  • @Alex Okay. Just wanted to be sure you had at least some information. Old incandescent lamps emit black body radiation, shifted to lower wavelengths than the sun itself of course, so they weren't perfect, either. I think careful formulation of the phosphors might make some good plant lights. So look for LEDs that have been crafted for that purpose, I think. Research is a good thing. – jonk Jan 09 '17 at 20:12
0

Thank you all so much for your invaluable suggestions. You helped me find these cheap constant current drivers with built in PWM support at the 700mA that I need. That feels like the perfect solution for me, it's basically just plug n' play into my power supply, PWM-driver and my LED.

Not as sophistical as building my own matrix, but definitely easier and a safer bet considering my inexperience in the field of electronics. Not as simple as just using a resistor, but more efficient and hopefully cheaper long-term.

Alex
  • 158
  • 6
0

10-bit control of each LED in a string of 12 programmable via UART: Texas Instruments TPS92661

LED Matrix Manager

M D
  • 1,277
  • 8
  • 8