Subtle Emergences was a massive undertaking and, as often happens, a lot of work went into features that didn’t quite make it into the final project. One such side project was the development of an Arduino shield to perform control of 1 watt-per-channel (3W total) RGB LEDs.
LED control is a relatively solved problem. LEDs need PWM controllers in order to fade in and out and a number of solutions. Both Sparkfun (https://www.sparkfun.com/products/10615) and Adafruit (https://www.adafruit.com/products/1411) make PWM shields that can control 16 PWM channels (more, actually, because they can be daisy-chained) from a subset of the available Arduino pins. The problem is power. The TLC5940, the chip upon which the Sparkfun shield is based, can only drive a maximum of 130 mA per channel, which is fine if you are driving a servo motor or a small LED, but not if you have a 1 W (400 mA @ 2.5 V) per channel monster LED.
Higher-power PWM can be achieved by using MOSFETs to quickly switch a high-current source (for example), but mounting 16 MOSFETs on a shield could be tedious as well as time- and space-consuming.
Fortunately, TI makes the ULN2803A, an 8-channel Darlington Transistor Array that has a rated collector current of 500 mA, well above our 400 mA requirement. Two of those arrays, attached to the outputs of the aforementioned TLC5940 would give us 16 high-powered PWMed slots, enough to drive 5 RGB LEDs (3 channels x 5 LEDs = 15 channels). I designed a breadboard circuits to test the design and then moved on to a shield layout, designed for SMD components. At this point, I still have to solder the components on to the shield board, but since the breadboard test circuit worked, I’m relatively confident that the shield will be good to go as soon as I get the components in the mail!
The nice thing is that because the shield uses the same chip as the SparkFun PWM Shield, the library from that shield works with this shield as well. That said, since this one is specifically designed for LEDs, I will likely extend that library to deal specifically with RGB LEDs.
I’ll post more pics and results as soon as I get the final shield together.