So, as I mentioned the other day, I'm trying to drive four green 20 segment bar graphs from an Arduino Pro Mini, in a manner not unlike a vu meter.
My experiments with a 10 segment LED bar graph have led me to determine that powering the equivalent of eight of them directly from the Arduino's pins isn't going to work.
For my first experiment, I wanted to see how bright my LED's would be if I lit them one at a time with 20mA of current. I calculated that with this setup, to update the entire array of 80 leds 60 times a second, I would need to keep each led lit for 208 microseconds. Unfortunately, the results if this experiment were less than stellar, and I ended up with an extremely dim array.
My next experiment was to see how the array would look if I split it into eight groups of 10 leds, and lit 10 leds at a time, putting 15mA of current through each for 2083 microseconds, again for a 60hz refresh of the display. This would require a total of 150mA of current, which the Arduino can supply, but not sink on a single pin, so I would have one transistor per group of leds through which I would sink that current safely. That was the plan anyway. But this test was also a bit of a let down. The array ended up being only half as bright as I'd like it to be.
At this point, I'm not sure what would be the best direction to go with this.
One option, I think, would be to use two sets of tansistors, one for the rows, and one for the columns, to source and sink the current. (Do I need to use two different types of transistor to do this?) But that option is unappealing because it would require way too much soldering. The last time I tried to solder 18 transistors point to point the resulting board was a mess and didn't work and I never figured out where the problem was.
The other option I have is to use a few IC's to drive the leds somehow. I'm not sure what the best option for this would be though.
Using a 4017 looks like it's right out. If I'm lighting the leds one by one, I'd have to pulse them with 120mA of current just to get them to the point I'm at now where I'm putting 15mA through 10 of them at once. And I'm certain the 4017 can't deliver that kind of current. I'm not even sure it can deliver 10mA.
I've also looked at the 74HC595 shift register. I'm not sure if it's best suited to this task though, or if it could handle even the 200mA needed to drive 10 leds at a time at 20mA each, nevermind the 400mA I'd like to put through it to pulse the led's to be brighter since I'd still be multiplexing them and running them 1/8th of the time. Also, since they only have 8 bits, I'd need two if I were to put them on the rows, and three if I have to put them on both the rows and columns. (And I don't even know if they can sink current.)
Then there's this that caught my interest just now. I wondered if there might be an IC which just has a bunch of transistors in it to make my life easier when wiring them up, and I came across something called a darlington transistor array.
Here's one I found which has eight inputs and outputs:http://www.st.com/stonline/books/pdf/docs/1536.pdf
I don't understand why these have two transistors for each pin, unless that just allows them to amplify the voltage more. I also don't know if they can both source and sink current.
But if they can both source and sink current, and they're set up to work like a switch that I can just turn on and off by applying voltage to the right pin, then these seem like they'd make wiring up my array really simple. I could just solder them up against each edge of the array and bridge the gap between the pins, (or maybe stick some resistors between if needed) and no crazy mess with 18 individual transistors with pins that have to be bent funny to get them to fit the holes in the perfboard.
Anyway, let me know what you think. I'd be really happy to hear that I can simply stick a few of those ULN2803A transistor arrays on there with a few resistors on the rows so I can get away with cylcing through 80 leds 10 at a time, and put 40mA through each of them this way.