Hi All -
I'm looking at a project that will require control over at least 15 bi-color LEDs, common anode type probably. For flexibility, they will be treated as two sets of 15 LEDs, all individually controlled. Need pwm control of brightness as well.
Size and parts cost are an issue, need to keep it small and cheap. Hrm - when is this ever NOT a requirement ? I can think of a few ways of doing this ...
1) Simple. An ATTiny2313 or similar, a couple of transistors/fets to act as switches and a couple of resistor packs. Two pins to switch Vcc via the fets to the common anodes, one for each set. 15 pins for the cathodes, via the resistor packs. Code is simple and straightforward.
2) Charlieplexing - basic. Need an AVR with 6 pins and 6 resistors. Basic charlieplexing isn't too tough, though the brightness pwm control complicates things a little. Might be able to do away with the resistors and rely on the AVR pin source limits, so it would just be the AVR and LEDs. Would this work ?
3) Charlieplexing - full Vcc. Need an AVR with 6 pins, 6 PNP and 6 NPN transistors and base resistors for them all. This would allow for full-on voltage/current through the LEDs to get best brightness. Nice if I can find NPN/PNP pairs in a single package along with appropriate resistor packs (or single resistors).
I like (2) best I think, if it will work. (3) would give best/brightest control over the LEDs, but has a lot of extra small parts. Not expensive, but fiddly.
Any ideas ?