interfacing an LED bank to the Arduino Lilypad


I recently bought the Arduino LilyPad and wanted to start working on a fun project that creates an "LED picture" on a tshirt. I'll need a bank of LED's for this (the idea is to create different patterns by turning on certain LEDs in the bank). I see that the Arduino sources very little current so I want to use it to switch a transistor on and off at a high frequency perhaps using the PWM module). Has anyone ever tried this? Will this work?

Also, I want to use the Lily buzzer to play music? Is this possible with the current setup?

Thanks in advance for your help.

Yep, it should work and it's a good idea to use transistors (or some driver) if you're going to drive multiple LED's so the AVR doesn't source too much current overall.

This page has some ideas for how to driver higher currents. Your application might work well with the ULN2803 approach since a single chip can control 8 LED's. You don't need to PWM at too high a frequency...even something like 100 Hz will not lead to noticeable flicker.

...even something like 100 Hz will not lead to noticeable flicker

...unless you're moving around a lot.