PWM LED Array

Do you have a question? Post it now! No Registration Necessary

Translate This Thread From English to

Threaded View
Hi all,

Mostly a beginner here looking for some advice. I'm trying to create an array
comprised of 63 vanilla (T1) single color LEDs connected in one manner or
another to a PIC32. Some of the considerations that I'm facing are that:

1. I'd like to avoid resistor arrays if possible.
2. It should be PWM dimmable.
3. It should consume as little power as possible, as it will likely share a
500mA usb connection with a few other components, including the PIC itself.
4. Be relatively simple to design schematic/code-wise.
5. Cost is of relatively minor consideration, but I'd like to avoid $ludicrous
drivers and LEDs if possible.

Is this even realistic? I've been looking at some LED drivers that might be able
to fit the requirements, but I'm unsure of the exact specs that I'd need. Any
and all advice/examples/rebuke/etc would be highly appreciated :)

Re: PWM LED Array
Quoted text here. Click to load it
comprised of 63 vanilla (T1) single color LEDs connected in one manner or
another to a PIC32. Some of the considerations that I'm facing are that:
Quoted text here. Click to load it
500mA usb connection with a few other components, including the PIC itself.
Quoted text here. Click to load it
drivers and LEDs if possible.
Quoted text here. Click to load it
able to fit the requirements, but I'm unsure of the exact specs that I'd need.
Any and all advice/examples/rebuke/etc would be highly appreciated :)

Do you want them individually dimmable ? Or just turn them on/off, and
have a common dimmer ?

Re: PWM LED Array
Quoted text here. Click to load it

For the sake of simplicity, a common dimmer and on/off is enough.

Re: PWM LED Array
Quoted text here. Click to load it
 or another to a PIC32. Some of the considerations that I'm facing are that=
:
Quoted text here. Click to load it
lf.
Quoted text here. Click to load it
 need. Any and all advice/examples/rebuke/etc would be highly appreciated :=
)

Are they individually addressable?  If so, i guess you PICked a PIC
with 63 PWM I/Os?

Re: PWM LED Array
Hi Gene,

[grrr... how about learning to break your lines at something like
70 characters??  I've taken the liberty to *chop* off everything that
extends beyond the width of my window... no fun, eh?  :>]

On 5/22/2011 1:51 PM, Gene wrote:
Quoted text here. Click to load it

Is this a 1x63 array?  3x21?  How many lamps do you intend to
have lit concurrently?  how many "intensities" do you seek?

Re: PWM LED Array
Quoted text here. Click to load it

Sorry; my netiquette has gotten rusty it seems :(

Quoted text here. Click to load it

The array configuration is one of the things that I'm uncertain on.
I would think that it'd be configured based on the end method of
driving said array. I'd need all on at the same time, with at least
a few intensity levels (5 or so would be plenty) for all LEDs.

Re: PWM LED Array
Quoted text here. Click to load it

You want USB powered, right?  Just connect each with a 470 ohm
resistor or something.  Might need some transistor current buffers.

Re: PWM LED Array

Quoted text here. Click to load it

Well, let's back of the envelope this. Figure a nominal 2 V drop per LED
and you've got 5 V to work with so run two in series, 32 times. You want
to PWM so figure a BJT switch with, say, 0.5 Vce at saturation, so a
swag is 4.5 V per pair, and 32 pairs. (If you really want 63 and not 64,
put some electrical tape over the 64th, or throw some regular diodes
there in its place.)

For 500 mA max at the USB port, assuming a proper dialog with the port
to get permission to draw more than 200 mA, you can push about 15 mA
through each pair. Less, really, since the processor will want some and
some will be lost in other ways. So, say you look for LEDs that are
adequately bright at no more than 10 mA. A 47 ohm current limiting
resistor for each pair might be a starting point.

Wiring it all up as a current mirror would be another option, though
PWMing that would add another drop, wouldn't it?

--
Rich Webb     Norfolk, VA

Re: PWM LED Array
Quoted text here. Click to load it

PIC32 (min 64 pins) has only 5 PWM outputs.  So, you need transistors
to buffer more than 18mA (max) per port.  PIC24 has 9 PWM, BTW.


Re: PWM LED Array
Quoted text here. Click to load it

If the OP is only interested in 5 light levels, you don't
need a "real" PWM channel (do it "old school")

Re: PWM LED Array
Quoted text here. Click to load it

I too was wondering why so many PWM channels were required for a
non-linear output.
Even a multiplexed array of diodes can get every LED a different level
of intensity.
Just limit the number of levels, as D Yuniskis stated.

hamilton

Re: PWM LED Array
On Sun, 22 May 2011 17:19:34 -0700, D Yuniskis

Quoted text here. Click to load it

[Crazy usenet. I can see posts from linnix timestamped before and after
that one but... not that one. %!#$!  ::sigh:: ]

Yes, I was imagining one PWM channel driving one transistor that then
tickled the bases of all of the 32 LED string transistors in parallel.
Rather a brute force approach, of course. Since they're operating as
saturation switches, minor differences in the transistor characteristics
should be mostly a wash.

--
Rich Webb     Norfolk, VA

Re: PWM LED Array
Quoted text here. Click to load it

Just one channel.  The issues were unclear before.

Quoted text here. Click to load it

I was thinking just one tiny metal can (2N2222) that can handle 500mA
collector current.  One of my first transistor and still as good as
any.

Re: PWM LED Array

Quoted text here. Click to load it


Would work, but I'd be concerned with process variations between the
LEDs leading to the pair with the lowest forward voltage drop hogging
all of the current. Less of a problem (and likely a non-problem) if
they're all from the same batch, of course.

A current mirror is probably the best approach for balanced control.
Also opens the possibility of controlling the brightness by controlling
the current directly (and avoiding flicker or beat frequencies).

--
Rich Webb     Norfolk, VA

Re: PWM LED Array
Hi Rich,


Quoted text here. Click to load it

If the OP wants to treat them as *one* lamp, I would seriously
consider a small DC-DC converter to kick the 5V (assuming it wants
to be entirely powered off the USB) supply up to "whatever" @ 10mA.
Note that you could design the supply so that *it* does the intensity
control (current mode output that tracks something from the MCU).

I would be more concerned about having enough Icc from the USB
port to deliver what the lamps will consume.  (high efficiency
lamps?)

Re: PWM LED Array
Hi Gene,

Quoted text here. Click to load it

Wait -- you want to treat them all AS IF they were a single lamp?
I.e., two states:  all on (at some "dimness level") or all *off*?
*Not* 1 on, 2 on, 26 on, etc.?

(which begs the question, why not use "some number on" to give you
your variable intensity?  unless you need illumination over a
wider area, etc.)

Re: PWM LED Array
Quoted text here. Click to load it

Sound like LCD backlite.  It he said so originally, we wouldn't have
to go through all those guessings.

Re: PWM LED Array

Quoted text here. Click to load it

<grin>  Welcome to USENET!

Re: PWM LED Array
Quoted text here. Click to load it
 or another to a PIC32.

BTW, why PIC32?  There must be other reasons than just driving LEDs.

Re: PWM LED Array
Quoted text here. Click to load it

It will also have a key matrix and a 16 bit lcd attached. There won't
be a whole lot of pins left, ergo my thought about using a driver
via i2c/spi or similar, perhaps.

Site Timeline