SBoyle.com

Home Automation

Home

Overview Hardware Software Applications

Download

Contact

 

HomeVision
Alarm
Tini
Network
Telephone
HVAC
Entertainment
LEDs
QProx
Other


RGB LEDs

My usual MO is to acquire new toys and then try to figure out a [semi] practical use for them. 

And so it goes with RGB LEDs.

The LEDs are from superbrightleds.com . They have three elements [red, green, and blue], a common cathode, and come in both a clear and frosted enclosure. True to their name, the LEDs are bright and the only complaint I have about them is that the colors don't mix that well. I pretty much expected that, and I've been thinking of ways to overcome the problem.

I've experimented a bit, and I think the way to go is to use the clear LEDs and reflect the light off of a smooth white surface. My main project for these LEDs is going to be garden lights. The current plan is to build 10-12 lantern-style garden lights. Each of them will have three of these LEDs in them aimed at the top which will be painted white and, hopefully, I'll get a nice even-colored reflection to light up the backyard.

PWM

To control the color of the LED you need to control the relative brightness of each individual element, and the best way to do that is with Pulse Width Modulation. In my search for an easy way to do PWM I came across this great chip. It's called a PAK-V and is available here . It has an RS-232 interface and 8 outputs. All you do is send it two bytes. The first byte is the pin and the second byte is the duty cycle for that pin. And then it will just sit there and generate PWM for you. The only problem I had setting it up was not reading the manual properly and accidentally setting the chip for inverted serial I/O. Once I cleared that up everything worked perfectly.

The PAK-V also has an enable pin to let you connect more that one chip to the same RS-232 port. Just set the pin for the right chip and send the command. I'll probably end up with two or three of these things connected to the Tini and running a program to control the garden lights [take some of the load off HV]. And then one connected to HV to do miscellaneous stuff.

All in all a very easy way to add variable voltage output to HV.


Quick setup to test the PWM chip and RGB LEDs. Please note the enormous "My First Power Supply" that I built a couple of years ago. [Click to enlarge.]


Close-up of the [crowded] breadboard. [Click to enlarge.]


The clear LED projecting onto a wall.


The frosted LED projecting onto a wall.


A short .mpg file of the LED shifting colors using a small Perl script sending commands out COM1 of my PC.
[Click to view. Opens in new window. 1.5 MB]