This device will control the brightness of three LEDs, a Red, Green and Blue, via a PC comport. If the light from the three LEDs are combined then a range of colours can be produced including white. The LEDs can be separate devices or a single tri-colour device.
The brightness is controlled by a small micro-controller (IC1 a microchip PIC 12F675 ). The PIC directly drives each LED (LED1a,b,c) from its outputs, the current to each LED is controlled by pulse width modulating the output.

One of the PICs pins serves as a serial input, taking commands from the PC comport. A Visual Basic program allows the user to set the levels of the LEDs, so selecting a colour, or set the speed of a two colour fade effect programmed into the PIC. The users selection can be saved to the PIC’s internal flash EEPROM.
Tri-colour LEDs (a single package containing Red, Green and Blue devices) are available in common anode (as above) or common cathode (below), the VB application has an Invert function in the file menu to deal with the different versions.
Mixing the colours is critical to the success of the colour generation. The tri-colour LEDs tend to output the Red, Green and Blue light in three different directions, it is best to shine the led into an opaque plastic to get the best effect.
Click to see larger version
Click here to view DIVX movie of two colour roll in action
Last updated 08 January 2006