Serial Addressable RGB PWM LED Driver using PIC16F628A
Ever since I made the serial controlled RGB LED PWM driver I’ve had many requests for an addressable driver. Well I’ve finally got round to producing one. The code is now completed and tested and the prototype boards are fully working.
The design process behind this project was to enable anyone with a bit of electronics knowledge to build an array of cheap RGB LED drivers that they can control from a PC without having to spend lots of money on expensive hardware, software etc. I specifically didn’t want to go down the DMX512 route as there are hundreds of commercially available products out there; if you need DMX512 you probably won’t be trying to build RGB controllers on the cheap (however, if you do check out this site for a DMX512 RGB LED). The hardware for this project is designed around standard readily available parts and the serial interface uses a standard PC serial port and protocols. You should be able to put together a single controller and get it hooked up to a PC for under £10 (assuming you have a PC)
I originally wrote the code to run on a 16F88 but subsequently converted it to run on a 16F690 as these are about 30% cheaper. The ‘690 also has 2 extra I/O pins one of which has been used to enable the full version of the code to drive either common anode or common cathode 7-segment displays on the control panel. I’ve also taken the code for the free RGB PWM driver and ported it to the PIC 16F628A / 627A. Code and schematic can be found on this page.
The serial packet protocol is completely open so anyone can write their own software to control the drivers. It is described in detail on its own page here.
During development I had an enquiry asking if the PWM output could control a servo. I thought about this and came up with a three channel RC type servo driver that operates using the same serial control protocol. This makes it possible to put RGB Drivers and Servo drivers on the same serial bus and control them with a common command set. Using the same algorithm that controls fading on the RGB driver, the three servos can be made to move at different speeds from one position to another autonomously.
I’ve deliberately kept the Microcontroller board separate from any LED driver electronics because the type of LEDs it could be used to drive, from low power 5mm LEDs to high power 3 watt star LEDs, are wide ranging and the potential applications enormous. For the same reason, the control panel display on the full version is also optional and separated from the main MC board since it might be useful to some, while not to others.
While I primarily expect people to use a PC to send the control data to the drivers, there is a lot of potential for stand-alone controllers and interfaces using low-speed infrared or 433Mhz RF transceivers. In fact that’s one of the reasons for providing operation at bit rates down to 1200bps.
As time permits I’m am working on additional LED driver circuits and looking at PCB layouts as well as the PC software side of things and I’ll be making it available on this page.
If anyone can help out with PC software to share with other enthusiasts please contact me as I’m really struggling to find time to do all the work.
Update: Feburary 2008
I had intended to make two versions of the code available; a basic free version and a full feature version. I’ve given up on that so now the full feature version is available to download for free.
For more detail: Serial Addressable RGB PWM LED Driver using PIC16F628A
JLCPCB – Prototype 10 PCBs for $2 (For Any Color)
China’s Largest PCB Prototype Enterprise, 600,000+ Customers & 10,000+ Online Orders Daily
How to Get PCB Cash Coupon from JLCPCB: https://bit.ly/2GMCH9w