A remote controlled RGB light bulbs lamp

December 2nd, 2007 · 10 Comments ·

Remote controlled light bulbs RGB mood lamp

This RGB light I designed and built a while ago. A large spectrum of coloured light can be made mixing light from bulbs coloured in red, green and blue.
So, this one is not based on LEDs but it’s based on 3×60W 220/110Vac light bulbs.
Also, it has a remote controller to change intensity of the three bulbs, store and recall
preferred hues, turn the thing on and off.

Danger !Before attempting to work on this project yourself you must be absolutely aware that this thing is powered from the mains and as such it could kill you, cause damage or injuries.

If you are not very well skilled with mains powered electronics and related safety building practice and you are not well aware of the risks related, you are absolutely required just to enjoy the pictures and the video or get assistance by a very skilled friend.

No part of the circuit can be considered safe to touch when the circuit is powered on.

This project is intended only for very experienced adults.

The author of this document is not responsible for any death, injury, or property damage resulting from or relating to the procedures shown or devices described in this document.

The bulbs: I looked for both 40W and 60W bulbs and found them from Philips and Osram.
They are reasonably priced (4/5 Euro) and provide pretty good a spot of light so that the three beams can be superimposed and the three colours mixed. Other light bulbs could do well. They must be filament types, no ballasts or fluorescent tube, just good old filament types.

Dimming the lights cannot be done via PWM as LEDs are. The lamps must be phase controlled, that is they must be turned on with a delay with respect to the zero crossing of the mains phase. The delay ranges from 0 (no delay, lamp immediately turned on -> maximum light) to 1/2 of the mains period (20ms for 50Hz, 17 ms circa for 60Hz -> minimum light, dark). In the pictures below, the light intensity is strictly related to the area enclosed by the X axis and the curve. Top trace shows the mains, the lower one is the output to the green lamp (green light visible on wall in the background)

Oscilloscope view

The delay with respect to zero crossing is quite large and the lamp is dim.

The TRIACs

Driving the bulbs is done via TRIACs. They are cheap and well proven. Some RC network is necessary to reduce interferences produced by triggering of the TRIACs. The filter should be compliant so as not to disturb any electronic device around. The filters provided reduce interference pretty much but I have no idea if FCC or other regulations are really met.
Notice the heat sinks: they should not really be necessary as long as TRIACs are loaded with 60W each. But heat sinks look cool. Remember consider any part of the circuit dangerous when powered on: do not touch any part of it (to check for heat, as an example…) under any circumstances.
No part of the circuit is safe to touch to anyone. And I mean you !Optocoupler

Safety first: Optocouplers provide isolation between low voltage (safe) side and high voltage(the mains) side.

The low voltage side is connected internally to an LED facing an opto sensitive device (OPTODIAC) which is connected to the high voltage side.

Lighting the LED makes the OPTODIAC conduct and trigger the TRIAC wich in turn turns on the lamp.

The low voltage and high voltage sides must be well separated electrically so has to guarantee isolation. The minimum requirement is to Dremel out the copper between the two sides. A much better practice is to dig a hole between the two side. For no reason interconnection should pass between the two sides.

The circuit must be powered via a low power transformer. This provides the added feature of isolation from the mains. As I said, isolation is a safety feature no one should underestimate. Even though the circuit does not have any pushbutton which might break and let electrical contacts become touchable by a hand and the circuit can be safely enclosed in an all-plastic case (special care must be taken for metallic screws), the transformer and the OPTODIACS provide added safety.

Remote control receiver

The IR receiver was taken from a dead TV set together with its remote control. The case is metallic and it is connected to the low power ground. Even if there is isolation, take precautions so as no metallic part (IR case also) can be touched. A transparent plastic for the circuit case would help.The controller is a PIC16F627A which receives the remote control signals. The software attached is commented and should be easily understandable by those who have some understanding of PIC assembler.
I tested the thing with 220Vac 50Hz. Could not test it against 110Vac 60Hz. The only difference relates to the transformer and the delay generating routine inside the micro (and the light bulbs ratings).
Selection between 50Hz vs 60Hz timing is done connecting shown pin to ground for 60Hz.
I would appreciate some feedback by anyone whom may realise and test this thing in the USA.

Source code is here.

Hex file ready to burn is here.

Schematic is here. Please note: for ’some reason’ [ it's usually called 'a mistake' I know :) ] 50/60Hz selection bit is depicted on PORTB, bit 1 : it must be on PORTB bit 0 to reflect source code and hex file. I’ll correct ASAP.

The remote I used is an RC5-standard no-brand one. I incidentally noticed that a Philips TV remote works fine.
I think that any universal remote control should work as well as long as Philips TVs are supported.

Some feedback here appreciated.

Tags: Microchip PIC · RC5 · RGB

10 responses so far ↓

  • Dainaccio // Jan 19, 2008 at 5:44 pm

    Very nice !

  • Electronics-Lab.com Blog » Blog Archive » A remote controlled RGB light bulbs lamp // Sep 19, 2008 at 9:11 am

    [...] A remote controlled RGB light bulbs lamp – [Link] [...]

  • shefali rai // Sep 24, 2008 at 7:23 pm

    is this project really dangerous.

  • A remote controlled RGB light bulb lamp - Hack a Day // Sep 29, 2008 at 1:30 am

    [...] just got a lot brighter by using 3×60Watt flood lights instead of an LED. The bulbs are driven via TRIACs and the whole thing uses a remote control to [...]

  • miked // Sep 29, 2008 at 2:49 am

    >Dimming the lights cannot be done via PWM as >LEDs are. The lamps must be phase controlled…

    Phase control is a type of PWM, so they actually are dimmed via PWM.

  • thijs // Sep 29, 2008 at 8:07 am

    Please, don’t put those bulbs in a cardboard box! I really like the project, but to keep it safe, you really shouldn’t put those fairly hot bulbs in a flamable box!

  • Brett // Sep 29, 2008 at 7:45 pm

    A couple idea for a future revision (if any).

    1) Move the IR receiver to RB0 (pin 6) This frees up RB6 and RB7 for firmware updates (the LED on RB6 can be left as-is.) You don’t really need the interrupt on RB0, but it might be handy for decoding the received data.

    2) With a crystal timebase, the controller should be able to very accurately determine the mains frequency. Measure the period between rising edges. This would eliminate the jumper on RB1, and could be used for RS-232 control through an opto-coupled input.

    3) There is a configuration bit that disables MCLR as a reset input. (See MCLRE CONFIG – Vpp input is not affected.) This frees RA5.

    4) C4, R1, D7 are not required. ESD clamp diodes on the controller inputs will limit voltage excursions beyond Vss-Vdd as long as the current is limited (by R8 in this case). RA1 can be used as a digital input.

  • Tuckie // Oct 1, 2008 at 4:40 am

    do you have a partslist for this project? (mainly the opto –> lights side of things) I’m looking for a good way to dim some lights for some Halloween effects, and this looks like it will fit the bill.

  • admin // Oct 1, 2008 at 3:59 pm

    Thank you all for your appreciation. Yes, this is a dangerous project as is everything that works on 220Vac. The caveats at the beginning should be quite clear !
    The modification suggested for a future revision are absolutely good.
    For the TRIAC any 400Vac 3-4 Amps model should be sensitive enough to be driven by the micro. The capacitors on the ac side must be rated for 400Vac minimum, the resistors are 1/4W or 1/2W power dissipation. The rest of the parts should be on the schematic. In doubt, just ask.
    Ciao

  • admin // Oct 1, 2008 at 4:04 pm

    Almost forgot : yes, cardboard is not a great installation material for definitive layouts ! Regular lamps are the one to be selected in such case. The circuit MUST be encased in metal or plastic, either case any metal part (i.e. the case if metallic) the user might touch from the outside of the case must be grounded properly. If using plastic case, use plastic screws as well.
    Ciao
    5Volt

Leave a Comment

Spam Protection by WP-SpamFree