Jump to content
43oh

How to drive multiple LEDs without sacrificing brightness


Recommended Posts

I want to drive up to 16 LEDs (not in a matrix form) from an MSP430. I've played with an G2211 on a breadboard/Launchpad combination to successfully do something with 6 LEDs, but I need to step up to 16 of them. My background is software development, but I'm new to microcontrollers and my knowledge of electronics is sadly no more than basic.

 

My requirements are that although normally only a few LEDs will be on, occasionally most of them could be, and they need to be bright enough to seen in daylight, even sunlight. Also the brightness should be relative to the ambient light level so they're not ridiculously bright at nighttime.

I've spent quite a bit of time looking around and found various approaches using driver chips and shift registers, but I get the impression that these are all some form of multiplexing such that the LEDs will not end up being very bright. I'm a real beginner with electronics, so I could well be not fully understand what I'm reading.

Current seems to be the real problem, and while I understand I could use a transistor to drive each LED at maximum current, using discrete components here would make the resulting solution too big. The package (without LEDs) has to be as small as possible. And I have no idea how to handle the relative brightness issue.

I would really appreciate some advice on the best way to do this.

Link to post
Share on other sites

So are you looking to control them individually or just have a set of 16 that are all on but dimmable? Do you have any special needs for input power like a battery? I think that the most simple implementation could be using a higher voltage wall wart and then using a low side transistor to pwm the LEDs to control brightness. Then just a 3.3v LDO to power your micro. If you do want to go low voltage, you could use the same approach with a boost converter or use a shift register which would allow individual control.

Link to post
Share on other sites

Try TLC5940

 

Thanks - this does look exactly like what I asked for, but...

 

So are you looking to control them individually or just have a set of 16 that are all on but dimmable? Do you have any special needs for input power like a battery? I think that the most simple implementation could be using a higher voltage wall wart and then using a low side transistor to pwm the LEDs to control brightness. Then just a 3.3v LDO to power your micro. If you do want to go low voltage, you could use the same approach with a boost converter or use a shift register which would allow individual control.

 

This is supposed to be a low voltage, low power application, portable, battery driven - so the sort of power consumption I was suggesting is probably out of the question.

 

As I said, I'm a electronics beginner, so perhaps someone can put me straight. Is a shift register solution (in other words PWM) the only low power option I have? How much brighness do I sacrifice by using this method? Can someone possibly point me at a diagram that shows me how to hook up, for example, 2 x 74HC164 to drive the LEDs?

 

You also mentioned an LDO (I had to look that up!) - do I need a voltage regulator if I use a battery?

Link to post
Share on other sites

You don't need an LDO if your battery is under 3.6V, 2 AA for example.

 

Because of the way human eye works, using PWM may actually lower power consumption while preserving (perceived) brightness.

 

There are many examples of using shift registers on 43oh, just search for 74hc595, 74hc164, TLC5916, TPIC6C595, etc.

 

Here's one 595 example.

 

If you want to experiment with shift registers, check this out.

Link to post
Share on other sites

Shift register is not required, it is just a nice cheap method for driving many LEDs with a few pins of your microcontroller. The other nice thing is that the output pins of these logic devices have very robust drivers which can source or sink 20ma. For a shift reg though you will need a resistor to limit the amount of current through the led so 16 LEDs means also 16 resistors in parallel. Like I was saying before if you use a higher voltage then you can hook up the LEDs in series and save some resistors but a High enough voltage is required. About 2v per led if wired in series.

 

Since the device is battery powered, I would recommend 2 alkaline cells and then that ti part suggested earlier in the thread. That part includes current control for each led so resistors are not required and you can use the low voltage supply provided by the batteries. Very easy to bread board with dips and th LEDs too. Good luck!

Link to post
Share on other sites

Shift register is not required, it is just a nice cheap method for driving many LEDs with a few pins of your microcontroller. The other nice thing is that the output pins of these logic devices have very robust drivers which can source or sink 20ma. For a shift reg though you will need a resistor to limit the amount of current through the led so 16 LEDs means also 16 resistors in parallel. Like I was saying before if you use a higher voltage then you can hook up the LEDs in series and save some resistors but a High enough voltage is required. About 2v per led if wired in series. Since the device is battery powered, I would recommend 2 alkaline cells and then that ti part suggested earlier in the thread. That part includes current control for each led so resistors are not required and you can use the low voltage supply provided by the batteries. Very easy to bread board with dips and th LEDs too. Good luck!

 

Sorry - I failed to say that each LED needs to be individually controlled. I know I could use a 2 port MSP430 variant to address them all directly but I still have the problem of a total of around 50ma to play with - so with say 10 LEDs lit that's only 5ma each. How bright would they be? If I understand correctly, PWM would make them appear brighter. I believe I could do PWM from the 430 itself but I'd have to code it myself - using shift registers is easier.

Link to post
Share on other sites

Be a little careful because with a shift register, you will have to develop code that might be a little more complicated because there is the code to generated each individual led pulse width and then on top of that code that shifts the data into the register. Would that tlc5940 part work for you because with the need to control each led independently, it's probably the easiest and most robust to implement.

 

How did you come up with your budget for current? Do you have a battery selected or a specific size constraint that you are looking to deal with?

 

Also what color led, each one has a different efficiently for how much power per lumen and also the required voltage drop.

Link to post
Share on other sites
  • 1 month later...

"This is supposed to be a low voltage, low power application, portable, battery driven - so the sort of power consumption I was suggesting is probably out of the question."

 

If so, you should rethink your battery supply.

A coin cell won't last long because LEDs still use a relatively high amount of power.  I only got an MSP to live about a month and that wasn't even blinking the LED for very long pulse duration....

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...