Bartosz Tomeczko varia

Remotely controlled RGB LED light

Recently I had some time to make a simple LED lamp based on RGB LEDs. So in this article I would like to present remotely controlled RGB LED night lamp.

 

This night lamp uses 1m of RGB LEDs mounted (simply glued) on 1m aluminium flat. As a remote controller, simple TV/SAT/whatever IR controller is used (in this case at 36kHz carrier). Construction allows to bind up to 6 buttons to different functionalities (programmable) like turn on/off, change of color, dimming, etc. Whole devices uses one Atmel's AVR Mega8A. This microcontroller is just an another release of Mega8 chip.

Here you can find some pictures of LED lamp in early development phases ;) 

Paths-on-transparent-foil.JPGDrilled-PCB.JPGPreliminary-phase---first-programming.JPG

Here you can see how the lamp behaves in darkness: 

Schematic/circuit:

schematic.png

Whole circuit is quite simple. Power supply for Atmega8A is LM7805 in its classical implementation. Only (of course) logical part has stabilized +5V power supply. LEDs are driven directly from wall adapter (+12V, 1,25A in my case, pulse PSU). SFH5110 infrared receiver (may be 36kHz or 38kHz depending on requirement: SFH5110-36 or SFH5110-38) is connected to PD2 (interrupt 0) pin. Port C (pins 0 to 5) is used for programming buttons for specific reaction. Six buttons may be assigned to different actions (change color, dimming, etc). This is jumper JP2. On jumper JP5 ISP programmer can be connected (2x5 pins). There is also RS232 (TTL levels of course) port provided for debugging, but in some applications device might be used simply as a RC receiver for PC;). On the "power stage" there are three IRL540N MOSFETs (N-channel) driven by Atmega8A. 5 volts is definitely enough to open them fully (see IRL's datasheet if in doubt). In my case LED tape is common anode (hopefully!), so driving it was quite easy. In case of common cathode (I don't recommend) some changes in power supply must be done, however this is still possible to make it working.

Layout of PCB looks somehow like this (for common anode of course):

layout.png

And, since I am a nice guy, I am providing source code and ready to use binary for Atmega8A. Binary is in default directory and in HEX format.
Fuse settings: Atmega8A should work @8MHz, so please set to 8MHz internal oscillator and disable (if possible) internal /8 divider.

Have fun!

 


AdmirorGallery 4.5.0, author/s Vasiljevski & Kekeljevic.