Driving 20 LEDs from uC

Sep 20, 2006 34 Replies

Hello, I am looking for a relatively simple solution for driving 20 standard (20 mA) leds from AVR Attiny.



- I'd prefer to use some kind of IC (SIPO register?) or IC's instead of discrete transistors. It should be available in DIP package



- I want to use as low number of pins of the uC as possible - preferably serial connection



- It is may happen that all the leds will be lit at the same time so the components must withstand that.



Any recommendations?



lookup charlieplexing

formatting link

Colin =^.^=

20 LEDS with tiny11

formatting link

I'd use 74HC595's with ULN2803's for drivers. (3 x 74HC595 + 3 x ULN2803) Clock 24 bits serially from a pin, pulse the "latch" of the '595's and the '2803's provide the drive current for the LEDs. ... Donkey D...

How about another uC ? That'll do the job nicely. 1 wire serial I/F for unidirectional data example.

Graham

A ULN for a *LED* !!!!! ???? Talk about total overkill !

Graham

of

ULN2803)

the

True, but they're cheap and will do the job.

... Little Steve

What's wrong with using the 595 outputs directly ?

Graham

You're right, (therefore I'm wrong) - I just had a look at the datasheet. I didn't realise that the '595 could source 35mA per pin. I thought the output current capability was similar to the 4000 family. My mistake.

... Donkey

That'll save a few bob !

Graham

datasheet. I

output

Yep - a stupid mistake on my part. Thanks Graham.

To the OP, (docent), FWIW:- Forget the ULN2803, but the 74HC595 is probably still the best way to go. (3 x 74HC595A)

... Donkey D... (Steve)

I would not use standard leds with 20mA but high briteness led that only need a few mA. Then you don't need the ULN drivers but can drive the leds with the 74HC595.

Dipl.-Inform(FH) Peter Heitzer, peter.heitzer@rz.uni-regensburg.de HTML mails will be forwarded to /dev/null.

the

Hello Peter - although I didn't realise it when I first replied, the

74HC595A can source up to 35mA per pin, so a separate driver is not required even with standard 20mA LEDs. This was pointed out by Eeyore, (Graham).

... Steve (alias Donkey D...)

... note the abs. max. Vcc/GND current rating of ~ +/-70mA.

Best regards, Spehro Pefhany

"it\'s the network..." "The Journey is the reward" speff@interlog.com Info for manufacturers: http://www.trexon.com Embedded software/hardware/analog Info for designers: http://www.speff.com

ULN2803)

and

only

required

formatting link

formatting link

Hello Sperho, that crossed my mind shortly after my last post. If more than

3 LEDs are lit at once, a driver will still be required. ( e.g. ULN2803 or similar) ... Steve

On the power pins ?

Since I rarely drive a led with much more than 5mA that wouldn't be a concern to me.

Graham

ULN2803)

and

only

the

required

concern to

Still, if the OP wants to drive 8 at a time with more than about 8mA each, a driver of some sort isn't a bad idea. ... Steve

Read the data sheet, dumbass. 20mA * 8 LED = 160mA Absolute maximum current through Vcc or GND pins = +/- 70mA.

You\'re both wrong. The absolute maximum current through the Vcc or GND pins is only +/- 70 mA, and 8 LEDs 20mA LEDs would try to pull 160mA.

Join the Discussion

Have something to add? Share your thoughts — no account required.

Didn't find your answer?

Ask the community — no account required