Author Topic: Current/voltage limiting of a large array of LEDs ... without LED driver ICs?  (Read 2494 times)

0 Members and 1 Guest are viewing this topic.

Offline I wanted a rude usernameTopic starter

  • Frequent Contributor
  • **
  • Posts: 662
  • Country: au
  • ... but this username is also acceptable.
Let's say you want to run an 8 x 8 array of LEDs from a microcontroller (either directly attached rows and columns, or using shift registers), and you want the brightness to remain more or less constant at any voltage between 3 V and 5 V. How would you do it without using expensive LED drivers which provide constant current outputs?

PWM would work and is easy, but LEDs are more efficient when run at 100% duty cycle at a lower voltage.
 

Offline fcb

  • Super Contributor
  • ***
  • Posts: 2135
  • Country: gb
  • Test instrument designer/G1YWC
    • Electron Plus
Have your microcontroller monitor it’s supply voltage and then adjust the duty cycle to suit brightness requirement.

If you are directly driving the matrix from the microcontroller pins then you’ll probably want some resistors in-line (unless you can rely on the impedance of the microcontroller output driver).

Depending on your scheme (8x, 64x) your adjustment could be a simple LUT, 8 LUTs or some polynomial expression.
https://electron.plus Power Analysers, VI Signature Testers, Voltage References, Picoammeters, Curve Tracers.
 

Offline I wanted a rude usernameTopic starter

  • Frequent Contributor
  • **
  • Posts: 662
  • Country: au
  • ... but this username is also acceptable.
Those are all solid suggestions which I've used on other projects, but was hoping for a means to control brightness via current or voltage instead of PWM.

Leading idea so far is having the shift register powered by a buck converter with a fairly precise voltage. That should be more efficient than current-limiting resistors and/or PWM, but seems to risk uneven lighting due to variations even within binned LEDs ...
 

Offline fcb

  • Super Contributor
  • ***
  • Posts: 2135
  • Country: gb
  • Test instrument designer/G1YWC
    • Electron Plus
As we don't know much about your application (other than it needs to be cheap and power efficient), it's difficult to suggest to much more.

Is size an issue (!) and what are you displaying - video? What colour(s) of LED? My experience of LED's is that temperature will have more of an effect on Vfd than manufacturing variations.

Either way - you will probably want some sort of current control scheme if you need even brightness.
https://electron.plus Power Analysers, VI Signature Testers, Voltage References, Picoammeters, Curve Tracers.
 

Offline mariush

  • Super Contributor
  • ***
  • Posts: 5171
  • Country: ro
  • .
Let's say you want to run an 8 x 8 array of LEDs from a microcontroller (either directly attached rows and columns, or using shift registers), and you want the brightness to remain more or less constant at any voltage between 3 V and 5 V. How would you do it without using expensive LED drivers which provide constant current outputs?

PWM would work and is easy, but LEDs are more efficient when run at 100% duty cycle at a lower voltage.

You'll have to define what expensive means to you.
A led driver can be as cheap as 3 cents.

Here's for example a 3 cents 8 channel led driver which works like a shift register (you'll find these from multiple companies, but this one's available in 220k units, so you could buy a few thousands if you want): https://lcsc.com/product-detail/LED-Drivers_Shenzhen-Sunmoon-Micro-SM74HC595D_C93838.html
You can either use one for each row (so around 25 cents for everything) or you could use microcontroller pins to send power to one row at a time (or use micro to turn on a transistor which sends power to a particular row)

For 10 cents, you can get TM150, a chip designed to drive 4 seven segment + dot  LED digits, but which can be rearranged into 4 x 8 matrix (see page 8 of datasheet) : https://lcsc.com/product-detail/LED-Drivers_TM-Shenzhen-Titan-Micro-Elec-TM1650_C44444.html
So 2 of these would be enough.
 
27 cents (@100pcs) gets you a 16 x (seven segment + dot) led driver : https://lcsc.com/product-detail/LED-Drivers_TM-Shenzhen-Titan-Micro-Elec-TA6932_C113719.html

 

Offline I wanted a rude usernameTopic starter

  • Frequent Contributor
  • **
  • Posts: 662
  • Country: au
  • ... but this username is also acceptable.
It's a Conway's Game of Life display, with a matrix of white LEDs. Doesn't really need to be super efficient, but it's an interesting exercise ... because the processing demands are so low, the microcontroller will be able to run at a very low speed, and the LEDs will use by far the largest fraction of the power.

You'll have to define what expensive means to you.
A led driver can be as cheap as 3 cents.

Those don't seem to have current limiting, do they?

When reviewing the drivers available through JLCPCB/LCSC, it seemed like there are several varieties: the budget ones like the 74HC595 are just generic shift registers ... then some about the 20¢ level have 8-level PWM brightness ... and there's a big jump in price to the >$1 drivers which have per-channel current control.

If there's no obvious easy option, I'll just use one of the proper drivers like the IS31FL3236A (too many channels but it has current control and costs < 60¢ in volume).
 

Offline tszaboo

  • Super Contributor
  • ***
  • Posts: 8218
  • Country: nl
  • Current job: ATEX product design
Onsemi has these current limiting "diodes" that have a fixed 20mA (or other) current limit. Like NSI45020.
 

Offline mariush

  • Super Contributor
  • ***
  • Posts: 5171
  • Country: ro
  • .
Yeah, I didn't notice those have explicit current limit per led. Some are limited to 20mA per pin, or 150 mA across all pins (so 150mA / 8)... my bad. Yeah, there's those ISL chips which are good value considering they're 36 channel and have pwm and all that and they're easy to use with i2c control.

You could also do something else... add a 3v / 3.3v switching regulator to your board. Then you could have one current limiting resistor for each led, or you could use resistor networks.

MIC2350 is 30 cents in 100pcs order and it's up to 93% efficient, 2.7v..5.5v in, up to 3.3v out 600mA: https://www.digikey.com/product-detail/en/microchip-technology/MIC23050-SYML-TR/576-3351-1-ND/1980906
As its synchronous regulator, only a surface mount cheap inductor and some ceramic capacitors/resistors required ... also has enable pin so you could run the micro directly from batteries and enable regulator only when you want to turn on the leds or whatever, to save power.



 
The following users thanked this post: fcb, I wanted a rude username

Online Zero999

  • Super Contributor
  • ***
  • Posts: 20364
  • Country: gb
  • 0999
BJTs and resistors are quite cheap.
 

Offline paulca

  • Super Contributor
  • ***
  • Posts: 4367
  • Country: gb
Those don't seem to have current limiting, do they?

The 595D does have have current limiting.  You set it by providing a resistor.  The datasheet has look up tables for the value of R to a given current.

It's 8 channel (There are 16 channel variants available), and I believe it's low side (- side of the LEDs) however, you could use another normal shift register (or a multiplexer) to switch the other end of the LEDs giving you a grid.  Then "charly plex" the grid, takes more effort programming, but gives you 64 LEDs to play with to display anything you want and not much power required.
"What could possibly go wrong?"
Current Open Projects:  STM32F411RE+ESP32+TFT for home IoT (NoT) projects.  Child's advent xmas countdown toy.  Digital audio routing board.
 

Offline mariush

  • Super Contributor
  • ***
  • Posts: 5171
  • Country: ro
  • .
Those don't seem to have current limiting, do they?

The 595D does have have current limiting.  You set it by providing a resistor.  The datasheet has look up tables for the value of R to a given current.
If you're referring to the 3 cents one I linked to above, I don't see any way to set a register in the datasheet.

I am aware of such 8 channel led drivers that do allow you to set the current by using a resistor, only they're a bit more expensive

Here's led drivers with resistor for as low as 20 cents : mile long tme.eu led drivers link

ex cheapest is 16 channel 5..45mA per channel serial (like a shift register): https://www.tme.eu/ro/en/details/sct2024cssg/led-drivers/starchips-technology/
It's pin compatible with other chips like
https://www.digikey.com/product-detail/en/stmicroelectronics/STP16CPC26PTR/497-11923-1-ND/2757659
https://www.digikey.com/product-detail/en/texas-instruments/TLC59284DBQR/296-39245-1-ND/5143238
etc

8 channel models are about the same price, but gets you cheaper alternatives on digikey and other bigger stores, if you can't wait a week or whatever it takes for parts to come
ex. https://www.tme.eu/ro/en/details/sct2168cssg/led-drivers/starchips-technology/


 

Offline I wanted a rude usernameTopic starter

  • Frequent Contributor
  • **
  • Posts: 662
  • Country: au
  • ... but this username is also acceptable.
Thanks for the advice, everyone!

The best option seems to be a buck converter plus PWM. This won't be as efficient as magically powering each row/column at the exact voltage it needs for the desired brightness, but is practical.

LED drivers with current control don't seem particularly efficient, especially at higher input voltages, because they regulate linearly. 60% efficiency at 5 V is normal. Some also have significant quiescent current (9 mA for the IS31FL3236A) and talking I2C would be less efficient than just bumping a shift register.

So, I thank you all for adjusting my expectations.  ;D
 

Offline paulca

  • Super Contributor
  • ***
  • Posts: 4367
  • Country: gb
If you're referring to the 3 cents one I linked to above, I don't see any way to set a register in the datasheet.

I was thinking of the TI TLC chips sorry.
"What could possibly go wrong?"
Current Open Projects:  STM32F411RE+ESP32+TFT for home IoT (NoT) projects.  Child's advent xmas countdown toy.  Digital audio routing board.
 

Offline paulca

  • Super Contributor
  • ***
  • Posts: 4367
  • Country: gb
The best option seems to be a buck converter plus PWM. This won't be as efficient as magically powering each row/column at the exact voltage it needs for the desired brightness, but is practical.

Correct me if I'm wrong, but if you pulse PWM through a buck convertor into an LED it will still fry the LED as for that instant the LED will be seen as a short on the buck converter so it will get the full current of the output cap discharging through it PWM or not the cap will discharge nearly instantly..  So you still need current limiting though each LED in parallel. 

Both Boost converters are not that highly efficient either mind.  Maybe 90-95% in their optimal point and as low as 60% outside of it.
"What could possibly go wrong?"
Current Open Projects:  STM32F411RE+ESP32+TFT for home IoT (NoT) projects.  Child's advent xmas countdown toy.  Digital audio routing board.
 

Offline I wanted a rude usernameTopic starter

  • Frequent Contributor
  • **
  • Posts: 662
  • Country: au
  • ... but this username is also acceptable.
Sorry, I wasn't clear: use a buck converter to power a 74HC595 shift register, then PWM the register via its output enable pin. The register will source to the LEDs and the microcontroller will sink.

As fcb noted, the impedence of the microcontroller's (and in this case also the 74HC595's) drivers limits current. In practice you can drive LEDs without resistors even at 5 V ... as long as you PWM them at a high enough frequency and low enough duty cycle. I might still end up doing that if, as you point out, the buck converter can't be made to run efficiently.
 

Online Zero999

  • Super Contributor
  • ***
  • Posts: 20364
  • Country: gb
  • 0999
I don't see how this is going to be that efficient.

What colour are the LEDs? If they're blue, white, violet or any phosphor converted chemistry, then a supply voltage of 3V, is close to the normal forward voltage and won't guarantee constant brightness, over the temperature range and life time of the LEDs.

The 74HC595 has a fairly high output impedance with a supply voltage of 3V and it will probably have a positive temperature coefficient, like all CMOS devices do, so the output voltage will drop more, at higher temperatures.

You say the supply voltage can vary between 3V and 5V, so what voltage are you going to set the output of the buck converter to? If you use a controller which can run at 100% output duty cycle then you could set it to 3V and accept there will be a small voltage drop, when the supply voltage falls to just over 3V.
 

Offline I wanted a rude usernameTopic starter

  • Frequent Contributor
  • **
  • Posts: 662
  • Country: au
  • ... but this username is also acceptable.
what voltage are you going to set the output of the buck converter to? If you use a controller which can run at 100% output duty cycle then you could set it to 3V and accept there will be a small voltage drop, when the supply voltage falls to just over 3V.

That's the idea. Set the voltage just above the point at which the white LEDs show significant variance in brightness. Test power consumption against a more aggressively PWMed unregulated solution at the same perceptual brightness level and see which is more efficient at various input voltages.

Basically the buck converter method seems like the best option, and is easily tested and easily bodged out if it doesn't deliver benefits, so pursuing it is low risk.
 

Offline I wanted a rude usernameTopic starter

  • Frequent Contributor
  • **
  • Posts: 662
  • Country: au
  • ... but this username is also acceptable.
PWM would work and is easy, but LEDs are more efficient when run at 100% duty cycle at a lower voltage.

Bump voltage up to 5V wastes some power

The entire point of this quixotic quest is to minimise power consumption. A good buck converter like the TPS62120 isn't super cheap (50¢), but is about 90% efficient in the target voltage and current range so it's definitely worth investigating. If it doesn't work, the plan is indeed to run everything straight off the battery and aggressively PWM the LEDs.
 

Offline I wanted a rude usernameTopic starter

  • Frequent Contributor
  • **
  • Posts: 662
  • Country: au
  • ... but this username is also acceptable.
You're concerned that it won't run properly once the battery discharges to near 3 V, right? I'm OK with that ... not sure what the power supply will be yet, but if it's a Li-ion it won't get that low. Thanks for the reminder!

By the way, empirically I've found that the true green LEDs run pretty well down to about 2.5 V.
 

Offline I wanted a rude usernameTopic starter

  • Frequent Contributor
  • **
  • Posts: 662
  • Country: au
  • ... but this username is also acceptable.
Even better: here's a graph of such an analysis I did on a 1 W LED a few months ago, but in 50 mV increments. Power increase is clearly exponential with voltage. Note the discontinuity above 3.2 V ... the LED's heatsink was small and it was overheating.

 

Online Ian.M

  • Super Contributor
  • ***
  • Posts: 13218
Add as many chokes as your LED matrix has anode lines, and PWM the currently active cathode line in your multiplexing sequence, and you can maintain a constant If (averaged over the multiplex time slot) by reducing the duty cycle proportionally by excess Vcc above Vf, without the usual series resistor for current limiting, so with *MUCH* lower I2R losses at higher Vcc.   Here's a LTspice proof of concept. 

N.B. you *NEED* the 10K resistors across the chokes for damping + you also need some blanking time with all anode lines off before selecting a new cathode line.   
« Last Edit: February 08, 2020, 12:03:09 pm by Ian.M »
 
The following users thanked this post: I wanted a rude username

Online Zero999

  • Super Contributor
  • ***
  • Posts: 20364
  • Country: gb
  • 0999
What is your LED color? GaN-based ones (true green, amber, blue, white) require 2.6V+, most likely 3V+, so you won't reliably drive them at 3V.

Get a boost converter, set voltage to 5V, then drive the LEDs with constant 5V.

Most logic chips with (LV)TTL input can be driven with 3V logic regardless of supply voltage.

Driving a LED array with resistive ballast under low voltage (close to Vf) is bound to give inconsistent result. Bump voltage up to 5V wastes some power, but gives a much better brightness uniformity.
Not all amber LEDs are GaN based. Only the phosphor converted type and confusingly some yellow and grass green LEDs are really deep blue/violet dies, with a phosphor.

Here's one with a forward voltage of under 2.4V
http://www.farnell.com/datasheets/2343228.pdf

Here's a lime green one with a forward voltage of 3V and will be a deep blue/violet die with a phosphor.
https://www.tme.eu/Document/59786a08ee3140c896513dd43bcadf0b/osc64l5111a.pdf

And a nice bright yellow LED, with a forward voltage of 3V.
https://static.rapidonline.com/pdf/55-9182.pdf

If the LED has a clear lens you might be able to see the phosphor, so if the die appears to be the same colour as the emitted light, it's probably a deep blue/violet LED plus phosphor, but it's better to check by connecting it to a power supply, via a suitable current limiting resistor.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf