Forums

PWM LED Array

Started by Gene May 22, 2011
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 :)
On 05/22/2011 10:51 PM, Gene wrote:
> 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 :)
Do you want them individually dimmable ? Or just turn them on/off, and have a common dimmer ?
On May 22, 1:51=A0pm, Gene <profii...@gmail.com> wrote:
> Hi all, > > Mostly a beginner here looking for some advice. I'm trying to create an a=
rray 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 itse= lf.
> 4. Be relatively simple to design schematic/code-wise. > 5. Cost is of relatively minor consideration, but I'd like to avoid $ludi=
crous 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 := ) Are they individually addressable? If so, i guess you PICked a PIC with 63 PWM I/Os?
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:
> Mostly a beginner here looking for some advice. I'm trying to create an a > > 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 > 4. Be relatively simple to design schematic/code-wise. > 5. Cost is of relatively minor consideration, but I'd like to avoid $ludi > > Is this even realistic? I've been looking at some LED drivers that might
Is this a 1x63 array? 3x21? How many lamps do you intend to have lit concurrently? how many "intensities" do you seek?
On Sunday, May 22, 2011 4:56:36 PM UTC-4, Arlet wrote:
> Do you want them individually dimmable ? Or just turn them on/off, and > have a common dimmer ?
For the sake of simplicity, a common dimmer and on/off is enough.
On Sunday, May 22, 2011 4:58:42 PM UTC-4, D Yuniskis wrote:
> [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? :>]
Sorry; my netiquette has gotten rusty it seems :(
> Is this a 1x63 array? 3x21? How many lamps do you intend to > have lit concurrently? how many "intensities" do you seek?
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.
On May 22, 3:34=A0pm, Gene <profii...@gmail.com> wrote:
> On Sunday, May 22, 2011 4:58:42 PM UTC-4, D Yuniskis wrote: > > [grrr... how about learning to break your lines at something like > > 70 characters?? =A0I've taken the liberty to *chop* off everything that > > extends beyond the width of my window... no fun, eh? =A0:>] > > Sorry; my netiquette has gotten rusty it seems :( > > > Is this a 1x63 array? =A03x21? =A0How many lamps do you intend to > > have lit concurrently? =A0how many "intensities" do you seek? > > 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.
You want USB powered, right? Just connect each with a 470 ohm resistor or something. Might need some transistor current buffers.
On May 22, 1:51=A0pm, Gene <profii...@gmail.com> wrote:
> Hi all, > > Mostly a beginner here looking for some advice. I'm trying to create an a=
rray comprised of 63 vanilla (T1) single color LEDs connected in one manner= or another to a PIC32. BTW, why PIC32? There must be other reasons than just driving LEDs.
On Sun, 22 May 2011 15:34:58 -0700 (PDT), Gene <profiiprk@gmail.com>
wrote:

>On Sunday, May 22, 2011 4:58:42 PM UTC-4, D Yuniskis wrote: >> [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? :>] > >Sorry; my netiquette has gotten rusty it seems :( > >> Is this a 1x63 array? 3x21? How many lamps do you intend to >> have lit concurrently? how many "intensities" do you seek? > >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.
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
On May 22, 4:22=A0pm, Rich Webb <bbew...@mapson.nozirev.ten> wrote:
> On Sun, 22 May 2011 15:34:58 -0700 (PDT), Gene <profii...@gmail.com> > wrote: > > >On Sunday, May 22, 2011 4:58:42 PM UTC-4, D Yuniskis wrote: > >> [grrr... how about learning to break your lines at something like > >> 70 characters?? =A0I've taken the liberty to *chop* off everything tha=
t
> >> extends beyond the width of my window... no fun, eh? =A0:>] > > >Sorry; my netiquette has gotten rusty it seems :( > > >> Is this a 1x63 array? =A03x21? =A0How many lamps do you intend to > >> have lit concurrently? =A0how many "intensities" do you seek? > > >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. > > 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.
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.