Hacked Gadgets Forum

November 27, 2006

PIC based Serial Controlled RGB LED PWM Driver

at 5:24 am. Filed under DIY Hacks, Electronic Hacks

 

If you want to play around with some LEDs, why not hook them up to some brains (a PIC chip) and have some fun. Pete provides all the details you will need to create your own Serial Controlled RGB LED PWM Driver. The provided firmware will run on the following PIC chips: 12F629, 12F675 and 12F683.

“If you want to build your own multiple RGB LED display that you can control from either a PC or a dedicated controller then this project will let you do just that.

The project on this page came about when while I was developing a more complex intelligent driver. During that work I put together a simple Red/Green/Blue Pulse Width Modulation LED driver that has a serial interface. The RGB values to control the LED brightness are sent to the PWM driver over this serial interface.

With both the original and revised versions of the RGB PWM driver there was one big shortcoming when you want to have several drivers working together. Even when they’re running the same sequence, the small differences in the frequency of the internal RC oscillator cause some to run the sequence slightly faster, others slower. The result, well sometimes it’s quite effective, but mostly it just looks awful.

With the controller / driver presented here it is possible to connect multiple drivers to the same serial cable, all attached units then appear to operate synchronously since they’re all receiving the same control data. The PCB for the RGB PWM Driver has been designed so that it can be used with both the serial control firmware on this page, or the standalone firmware here

The serial data can be sent from the serial COM port of a PC or using a small dedicated controller that I’ve put together. The Controller code is based on the standalone RGB driver code described elsewhere on this website. The controller uses the same format for the sequence data as the standalone RGB driver so any SequenceData.inc files you have for the standalone driver can be used with the Serial RGB Controller.”