Wednesday, April 7, 2010

RGB Colour Mixer

Well I couldn't make it to my local hacker space tonight, so I decided to "hack at home!" :)

This is a prototype of an RGB LED Light I'm designing for my 2 year old son at the moment. I thought I could work on the code design in processing while I am waiting for a new Arduino to arrive in the mail.


Tisham Dhar said...

You would have had plenty of arduinos to hack on if you came in. LED response is not linear usually so your colour mixing will have to make appropriate adjustments.

Dan Thompson said...

Yes.. such is the life of a Dad. My son likes me to put him to bed at the moment and well, I rather spend time with him now before he's all grown up and is too cool to hang out with me :)

Good to know about the not liniear LED thing. When I get to that part I may need to enlist on fellow hackers help for the "appropriate adjustments";)

Thanks Nick!

Jamie said...

Hey Dan,

I did exactly the same thing when I first plugged in an RGB LED. If you look at the datasheet for your LED it should say somewhere something about the different individual color intensities. From memory, I think green was the brightest by far, and then blue was slightly more bright than red.

What I did was to scale each of the RGB signals by their intensity (simply by dividing them and rounding to the nearest integer) and it seemed worked. I have a feeling there is probably a more professional way to do it however.

Big ups for hacking at home - I was doing the same. I got my first stepper motor moving around :)

BTW do you have an RSS feed for you blog?

Dan Thompson said...

Hi Jamie, I think nick may be refereing to how PWM fading works on the LED and weather you can map that variable linearly to the visual change in intensity of an LED.

The RSS feed for this blog is:

Nice work on the stepper too! Now it's time for "Robots to Take Over The World!" :)