Go Down

Topic: How to drive dozens of LEDs from an UNO R3 for a Christmas project (Read 1 time) previous topic - next topic

cat6

I'd like to replicate in miniature a big Christmas light display my dad did in front of out house when I was a kid.  He's in his 70s now and I think it'd be cool to show him his work had impact.  Anyway, that means I have to build a miniature 1-2' tall replica of the display (a tree with a star on top) using dozens of LEDs.  My dad used an ancient microcontroller computer back in the day (about half the size of a cinder block if memory serves!) to turn the tree, "lights" on the tree, and star on and off in sequence.  I even remember the sequence and I'm all ready to go....with just one problem.

Each output from an Arduino only powers 1-2 LEDs each.  I need to drive dozens, and I need to do it as simply and inexpensively as possible.  The local arduino retailler sold me a SparkFun TLC5940 on his recomendation, but it only seems to drive up to 15 extra outputs; when I got home I checked the specs and it also seems more suitable to things like servo motors?

Where would you go from here if you were me?

Hippynerd

With muliplexing, or charlieplexing you can control many leds with just a few pins. You can really reduce the number of pins by incorporating an LED driver, or shift register, basically converting parallel data into serial data.

The 5940 chip is a very popular choice, and you could use it, but you could also control many leds without adding chips to your design.

I have a LED cube that runs 64 LEDs running on 20 pins, If it were setup in an 8x8 matrix, it would only require 16 pins to control those 64 LEDs.

Depending on how many LEDs you have to light up at a time, or how bright you need them, you may need to use a driver chip, but you may also be able to just multiplex.


cat6

I understand the theory of multiplexing and how it can communicate one source of data rather than the other, but how will this somehow introduce more power into my circuit?  I simply can't attach a bunch of LEDs to a bus run by an arduino output--there won't be enough power to light them all up.  Are you saying I should instead control a higher source of power (like a 9v battery?), turning it on and off using the 5v data signal from my arduino?

Hippynerd

When you multiplex the LEDs, they are not on, like they are in a simple circuit. They turn on and off very rapidly, in patterns that appear to be on. Any matrix, or cube uses Persistence Of Vision to make the illusion of what you see.

An 8x8 LED matrix will light up to 8 leds at one time, so its max draw is actually 160ma from 8 20ma LEDs, not 64 x 20 1280ma!

cat6

Ohhhhhhh...that's really cool.  So the way it must work is that you have the ability to power x LEDs at a time from your output, and as such set up an array Y elements long with x LEDs each, then you provide current to each element in the array in turn for...how long?

I guess the code for that wouldn't be too bad at all.  One output of the MUX is always on and the other alternates between...well...HIGH and LOW I guess...?  Is there an example circuit out there you can link me too?

Go Up