Today I’ll show you an RGB LED table lamp, an object that it’s only useful but it’s scenographic too. Thanks to a few high luminosity white LEDs this lamp can make a little lighting, useful if you watch at your TV, but it’s more interesting when you use it as a colored lamp: the light effects are innumerable, limited only by the user’s skill: in fact you can edit the code to add your own ones.
The circuit is based on an Atmel Atmega328P and on a TLC5940, used to drive the RGB LEDs. These ones must be with COMMONDE ANODE. There’s also an NPN transistor (a common 2N2222) to drive 5 white LEDs, that can be lighted on both in conjunction with the RGB ones or alone.To power the circuit you need a 5V, regulated, external supply. Be sure to have a 5V voltage otherwise you could damage the circuit (there’s no protection).
To change the light effects I used a capacitative sensor so a simple piece of wire can be put inside the lamp, requiring no holes through the glass of the lamp.
The sketch has been written with Arduino IDE v. 0022 but you should be able to compile it with v. 1.0 too. You need 2 external libraries, CapSense & Tlc5940: both links are available into the package at the bottom of this article.