PWM LED Array

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.
  1. Be relatively simple to design schematic/code-wise.
  2. 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 :)

Reply to
Gene
Loading thread data ...

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:

500mA usb connection with a few other components, including the PIC itself.

drivers and LEDs if possible.

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 ?

Reply to
Arlet Ottens

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= :

a 500mA usb connection with a few other components, including the PIC itse= lf.

crous drivers and LEDs if possible.

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?

Reply to
linnix

Hi Gene,

[grrr... how about learning to break your lines at something like 70 characters?? I've taken the liberty to *ch> Mostly a beginner here looking for some advice. I'm trying to create an a

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

Reply to
D Yuniskis

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

Reply to
Gene

Sorry; my netiquette has gotten rusty it seems :(

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.

Reply to
Gene

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

Reply to
linnix

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.

Reply to
linnix

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
Reply to
Rich Webb

t

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.

Reply to
linnix

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.

Reply to
Gene

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.)

Reply to
D Yuniskis

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

Reply to
D Yuniskis

I2C: Check TI's TLC59116, NXP's PCA9635, etc. They control 16 LEDs, could be coerced to control 32 by multiplexing the common side of the LEDs with a couple of transistors.

-- Roberto Waltman

[ Please reply to the group, return address is invalid ]
Reply to
Roberto Waltman

Actually, you can probably drive all of them with a single pin and power transistor. I2C/SPI would need more than one pin.

Reply to
linnix

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

Reply to
linnix

Next time, try something like this:

Question:

What is the best way to drive 63 backlite LEDs for the LCD panel of a PIC32, with upto 5V 500mA USB bus power.

Answer:

PWM the base of a 2N2222, with 32 pairs of LEDs tied between collector and a 10 ohms resistor from 5V VBUS.

Reply to
linnix

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

Reply to
hamilton

[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
Reply to
Rich Webb

that

LED

ant

64,
t

nd

s

Just one channel. The issues were unclear before.

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.

Reply to
linnix

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.