Thursday, September 2, 2010

Side project: LED array

This is a minor side project I decided to build with the help of my niece and nephew, to show them something nifty. Motors that aren't that fast, aren't that interesting to them, on the other hand, lights are. Have a video:



This is the Duemilanove hooked up to a breadboard, on pins 1-5, and 8-13 to form a 2x5 array of LEDs, each LED is connected to ground via a 1k resistor to limit the current to about 5 mA so as to not burn the LEDs out. The reason the one in the upper left comes on is that I hit the reset in the middle of it (which is too dark to see). The software I wrote is potentially more general purpose than that, however, it is unfortunate that the Duemilanove has at most 19 (14 digital + 5 analog) that can be used for directly driving the LEDs, so at best if you want an even array, you could get a 4x4 array, or a 3x5 array, using this technique. (And I ran out of loose 1k resistors) I designed an i2c controlled 4x8 using eagle, as I finally figured out most of it. Unfortunately, to get it made it'd cost at least $20 for the chips and PCB. Maybe once the main project of a CnC machine is done it'll have enough resolution to accurately cut PCBs. (It should have a *theoretical* X and Y resolution of 8 micrometers, and a Z of 33 micrometers. I don't think it'll be quite that precise, on the first one, due to the construction method.)

After doing that, I noticed a new thing at Adafruit, the 'LoL Shield' which is an LED array using something I was unaware of until today of Charlieplexing, using multiple inputs and the fact that LEDs are diodes to drive the array. Pretty cool hack, and it seems very similar to what my library uses for animation (and let's face it, what anyone would use). I've got a whole bunch of LEDs I got cheaply off ebay, so if I can get just a PCB, it'd be cool, and I'd probably have the only amber one. Direct link to the maker's commentary on design: Part 1 and Part 2. Always seems to be the case that you find someone has done something a lot cooler after you make something.

No comments:

Post a Comment