Want to build an RGB LED controller that you can program with your own custom sequences and effects? Then read on.Β
The RGB LED controller has proved to be very popular project and has been the most frequently downloaded code on the site since it was made available.Β Iβve been contacted by people who have incorporated this project into all kinds of things including mood lamps, lighting for a sculpture, accent lighting for rooms and an illuminated prize trophy.
For 2006 IΒ completely rewrote the application making it much easier to add, edit and change the sequence data.Β I also added a sleep function so a battery operated version can be built that doesnβt need a power switch.Β
For 2008 Iβve released version 3 of the code which now allows you to stop the running sequence at any point so you can βfreezeβ a colour.
All code runs on the 12F629, 12F675 and the newer 12F683 which, with 2K of program memory has plenty of room for user sequences.
Description
The original RGB PWM driver application that I wrote in 2004 had a few shortcomings. Probably the biggest was that it was not easy to add to or change the sequences.Β This new version addresses that problem, is more flexible and now includes the ability to put the PIC to βsleepβ and βwakeβ it again using the sequence select switch, eliminating the need for an on/off switch in battery powered applications.
The circuit uses (RGB) Red, Green and Blue high brightness LEDs that are pulse width modulated (PWM) to vary the intensity of each colour LED.Β This allows effectively any colour to be generated with rapid changing strobe effects, fast and slow colour fades as well as static colours.Β Β The data used to set and change the colours is held in an easy to edit file so if you donβt like the sequences provided with it, you can modify the sequence data include file yourself and reprogram with your own sequences.
The code can be assembled for use with the following PICs: 12F629, 12F675, 12F683.Β Just select the correct processor in the MPLAB IDE before assembling.
How bright are the LEDs
That depends on the specific LEDs you use, the current you drive them with, the angle your view them from etcβ¦β¦..
If you want to know I suggest the best thing to do is buy the LEDs youβre planning to use and connect them up directly to a power supply using a suitable current limiting resistor.Β If the brightness meets your expectations than go ahead and build this project, but if they donβt they arenβt going to be any brighter in this circuit so you probably need to look at an alternative solution like a large array of LEDs driven with the Power MOSFET Driver projectΒ Β
Since I do not know exactly which LEDs you will use Iβve specified the LED current limiting resistors on the conservative side.Β You may want to change the value of these resistors to suit the actual LEDs used.Β Keep the current per channel to under 40mA maximum.
LED resistor calculator http://led.linear1.org/led.wiz
If you wish to etch your own board, you can download the PCB artwork as PDF
For the component overlay, please refer to the photoβs below
For more detail: RGB LED PWM Driver Standalone PWM controller forΒ RGB LEDs using PIC12F629