This instructable documents the design and construction of a giant RGB LED ceiling light, controlled by a hacked GE remote control.

After building a couple smaller RGB lamps, I decided I wanted to see how far I could take the concept.  The control circuitry is basically the same, it's just a matter of using a beefier LED driver!

My finished lamp measures 30"x30" square and is 3.5" tall.  It hangs 5.5" off the ceiling, and uses 9x 3W RGB LEDs controlled by a PIC 16F1829 microcontroller.

Originally the lamp had an attached control panel for color and speed adjustment.  Then one day I found a perfect IR remote control with Power, R/G/B, and Up/Down buttons and even a built-in switchable backlight!  I decided this would be a fun and functional addition so I wasted no time hacking the IR output signal and interfacing it to the controller.

The lamp starts out in white-light mode (like a normal ceiling light).  At the press of a button, it switches to RGB Color Fading.  From here, you can adjust the speed with the Up/Down buttons or even pause the color at any point in the RGB fading cycle.

Hopefully this instructable will give you some construction ideas or inspiration for your own large-scale RGB LED project!

Step 1: Parts List

Lamp Materials:
Single-wall corrugated cardboard
Plastic sheet rock corner bead
Rivets and Riveting tool
White Paint (optional)
Hot Glue

Control Circuitry:
Qty 1 - PIC16F1829
Qty 1 - 16MHz TTL Oscillator
Qty 1 - IRM 8410 or GP3U10X IR Decoder
Qty 1 - LM7805 +5V Linear Voltage Regulator (or equivalent +5V supply)
Qty 1 - 12.1V Zener Diode >= 1W Power rating
Qty 1 - 4.7k Ohm, 1/4W, Resistor
Qty 3 - 1k Ohm, 1/4W, Resistor
Qty 3 - TIP121 Darlington Transistor
Qty 9 - 3W RGB LEDs (1W per color) (Buy 'em on Ebay, search for "3W rgb led", ~$6/ea)
Qty 1 - Power supply(s) (See Step 3) (I used Part# 418-CFM60S300 30V 2A supply from Mouser for $34.25)
Qty 3 - Current Limiting Resistors (See Step 3)

GE AREM4000-X Executive Remote (Ebay)

Riveting tool
Hot Glue Gun
Paintbrush (Optional)
Storage Oscilloscope (Optional, but VERY helpful!)

Step 2: Building the Lamp

The lamp itself is built out of single-wall corrugated cardboard reinforced with sheetrock corner bead and held together with rivets.  I found the plastic corner bead from lowes was very convenient, because the holes in the bead were perfectly sized to accept a 1/8" size rivet!

My lamp measures 30"x30" square and is 3.5" tall.  This size was arbitrary, you can adjust it based on the size of the room or number of LEDs.

Assembly Steps:

1) To start with, cut 4 pieces of the sheetrock bead 30" in length.  Using these pieces, form a box as shown in the picture and install a rivet in each corner.  I recommend using a square to make sure all the corners are even.

2) Next, cut 4 pieces 3.5" in length for the vertical wall supports.  Again, the height of the walls was arbitrary.

3) Place one 3.5" piece in each corner and rivet into place.  This adds rigidity to the square, as well as vertical support for the walls.

4) Now cut cardboard pieces to fit in the bottom of the square and the four walls.  The cardboard can also be riveted to the sheetrock bead.  Just poke a little starter hole through the cardboard before inserting the rivet, and be sure to use a washer on the side of the rivet that presses against the cardboard (otherwise the rivet will pull through).

5) (Optional step) Paint the inside of the lamp a bright color to help reflect the light.  I used white semi-gloss paint since I had it on the shelf.

6) Finally I suggest wrapping the outside of the lamp with your fabric of choice.  I chose a flat black fabric to match the room decor, but you could really pick any fabric.  Just pull the fabric tight and affix it with hot glue!

Step 3: Control Circuitry

Circuit Details:
The control circuitry is about as simple and it gets (See the attached schematic).  There is a PIC 16F1829 microcontroller with three PWM outputs, and each output uses a bipolar transistor driver and current limiting resistor to interface to the LED strings.  If you're looking for more electrical efficiency, you could try using a specialized LED control IC like the ZXLD1350.

I opted to run each LED string in series for ease of wiring, ease of control, and greater efficiency (only one current limiting resistor for 9 LEDs).  You do give up some freedom, since now you can only control each color channel instead of each LED individually.

I used a crystal oscillator to provide the microcontroller clock because a) I had one laying around, and b) I wanted to make sure I had accurate timing for the remote control decoding.  There is an internal oscillator in the PIC 16F1829 that you could potentially use to reduce parts count.

The IR detector/decoder is one I found in the parts bin.  You could use any type of IR detector, but I like the can type since they have built-in filters and amplification.

Power Supply and Current Limiting Resistors:
You want to select a power supply voltage for the series LED strings that is as close as possible to the total series voltage of the LEDs to minimize power dissipated in the current limiting resistors.  Once you have selected a voltage, use Ohm's Law to calculate the resistance needed for each LED string.  According to the LED datasheet, each LED can handle 0.35A of current for full brightness and the TIP121 Collector-Emitter saturation voltage is 0.75V.  Remember that the LED voltage drop for each color will be different. 

Calculate resistance:
R = (Supply_Voltage - (9*LED_Voltage_Drop) - 0.75V))/(0.350)

And, calculate power dissipated:
P = R^2 * 0.350

I used a 30V power supply, so this required a 29 Ohm 3.6W resistor for the Red string and 6.3 Ohm, 0.7W resistor for the Green/Blue strings.  I dug around in the junk box and ended ended up with 30 Ohm 10W and 6.8 Ohm 2W respectively.

If you can find a power supply with an additional +5V output then you can eliminiate the LM7805 linear regulator and power the digital circuitry directly.

I assembled the final circuit on perfboard (See picture in step 6).

Step 4: Hacking the Remote

I bought a big old GE component video monitor at an auction about 10 years ago.  Earlier this year I finally found a use for the monitor, but lo and behold when I hooked it up the thing was dead.  The good news is that the monitor came with this awesome remote control!

Measuring the IR Signals:
To understand the remote control I hooked up my IR detector to a storage oscilloscope and started pressing buttons.  The nice thing about a storage scope is that it saves the IR code on the screen for you to analyze.  Taking it a step further, I actually saved the traces for each button as a .CSV file to import into an Excel or OpenOffice Calc Spreadsheet.  See the attached file for my IR signal spreadsheet for the Power button.

Analyzing the IR Signals:
To use the remote, I wasn't necessarily interested in decoding the whole message structure.  Mainly, I wanted to find the differences in the signal for each button press.

Using the spreadsheet and the time-stamped scope data, I discovered each IR signal had three parts - a start pulse, a 16-bit Remote ID (which is the same for all buttons), and then a 16-bit Button Code which is unique for each button.  By looking at the last 16-bits of the IR signal, we are able to discern which button was pressed.

The one tricky part to using the remote code is when you hold down any button, the remote sends out an identical "repeat code" until the button is released.  This repeat code is very similar to the start pulse, but with different time durations.

Using the IR Signals:
I have the IR signal connected to the PIC Interrupt-On-Change pin.  Using the internal Timer 0 module, we can count the time period between falling edges on this pin.  Everytime there is a falling edge, the PIC saves the state of the TMR0 register (to record the previous period) and then restarts TMR0 (to record the next period).  Using this information, we can determine whether a 1, 0, Start pulse, or Repeat pulse was received.

Step 5: Writing the Code

The code for this project was written in Microchip's Assembly language.  Both the commented source code and compiled hex file are attached.  A rough flowchart of the program flow (related to each button) is attached in the pictures below.  

The program consists of three main parts:

1) IR Code Buffering
2) IR Code interpretation
3) PWM Control (RGB Fixed color, color fading, and white-light mode).

IR Code Buffering:
Using the process described in Step 4 - "Hacking the Remote" I learned that the length of a 0, 1, Start Pulse, and Repeat pulse were all unique and repeatable values.  Every time the PIC sensed a falling edge on pin 17 (Interrupt-on-change) it would record the time since the last falling edge and then compare that value to a series of time "windows" to determine which type of pulse just came in.  You can see a rough flowchart of this process in the images below.  The window comparison code is not original, I found it at the excellent PICLIST Website (http://www.piclist.org/techref/piclist/index.htm).  If the length does not fall into any window, I set a Bad Code (BC) flag and ignore everything until the next start pulse.  

IR Code interpretation:
Every time a 1 or 0 is detected, the PIC pushes that value into an 8-bit FIFO register.  Even though the pulse train from the remote is more than 8 bits, we always end up with the last 8 in the register, which happens to contain a unique value for each key of interest.  I compare this code to the known digital value for each key (these were measured on the oscilloscope in Step 4) to figure out which button was pressed and which action to take (White light mode, RGB mode, Increase Fader Speed, etc).  This 8-bit value is saved into a second register so that if the repeat pulse shows up, we will know which command is being repeated.

PWM Control:
The PIC 16F1829 has 4 10-bit hardware PWM registers which makes it ideal for RGB color control.  By using the hardware PWM modules the PIC is free to do other stuff while the PWM is going in the background.

The intensity of each color is controlled by 10-bits.  When the lamp is turned on, each value is at max to give white light.  When the "CONV" button is pressed, a 3-part loop begins in the software.

Part 1) Red Decrementing, Green Incrementing, Blue = 0
Part 2) Green Decrementing, Blue Incrementing, Red = 0
Part 3) Blue Decrementing, Red Incrementing, Green = 0

The program continues to loop through these three parts until either white light mode is selected, or the "STATIC" button is pressed to pause the lamp at the current color.

Step 6: Putting It All Together

Now that we have covered the major pieces of this project, it's time to put it all together.

You are going to want to attach the LEDs to some sort of heatsink, as they tend to get hot.  I mounted them onto spare TO-3 size transistor heatsinks, and then press-fit the fins of the heatsink onto another piece of drywall corner bead hot-glued to the base of the lamp. This gives the LED light a good exit angle for getting out of the lamp (so the light disperses around the room).

Stash the power supply in the corner or on the edge of your lamp where you have the best frame strength.  The circuit card is pretty light, and can be hot-glued anywhere.

I mounted my IR sensor in the middle of the lamp by cutting a hole in the cardboard and hot-gluing it in place.  I didn't have to cut a hole in the fabric outside because it was so thin the IR light went right through it.

Attach a piece of string to each corner of your lamp, tying it through a couple holes in your corner bead frame.  

How you attach it to the ceiling is a matter of personal preference.  Make sure you mount it to the solid ceiling joists so it doesn't fall down and break!  See the attached picture for my method - I made four custom hangers which I nailed into the ceiliing, then tied the string onto a washer which catches on the hanger.

You will also need to get power to your lamp.  For a long time I used an extension cord run discretely up the wall.  Recently I installed an always-on AC outlet above the lamp.

Put it all together, and there you go - a giant ceiling-mounted  remote-controlled RGB LED moodlight!

Watch a video of the lamp in action here: http://www.youtube.com/watch?v=BINE3xcdq_M
<p>Very clever. Can you tell me how to replace the remote contol with a timer that will very slowly change the color. when I say very slowly I mean over periods of days. I am building a Little Free Library for my neighborhood the frount door of which is plexiglass engraved with the Door of Moria back lit by 12v LED strip. I would like for it to occasionally &quot;magically&quot; change color. My knowledge of electronics is very limited so any help you could give me would be greatly appreciated. </p>
<p>Hi, thanks for looking! The easiest way to do what you want might be to purchase a pre-built RGB controller, like this: </p><p><a href="https://www.adafruit.com/products/678" rel="nofollow">https://www.adafruit.com/products/678</a></p><p>I see this one offers speed and brightness control, but you'll want to check with them to see whether the slow speed will actually get you down to the &quot;days&quot; timeframe. Sounds like a cool idea - Good luck!</p>
Excellent instructable! I'm thinking about building something similar. Quick questions before I jump into getting the parts together: are you able to properly illuminate your room with this setup or is it more of an ambient light? How big is your room? How's the colour temperature on full brightness? Is it very &quot;sterile&quot; or can you produce comfortable lighting for, say, a living room?<br>Thanks, Tobias
<p>Hi, Thanks for looking! To answer your question - the light from my lamp is pretty &quot;sterile&quot;, although I didn't spend a lot of time trying to optimize for color temperature. I use this daily in a 14x16 ft. bedroom for getting dressed, etc and it works well. When it comes to reading, though, I prefer a desk lamp. I think it could work for a living room with more time/care spent on tweaking the color temperature more LEDs or better positioning. You can also use two sets of LEDs - buy some nice &quot;Warm&quot; ones for white-light mode, and use cheap RGB oness for different colors.</p>
Thanks for your quick reply. Actually I don't really need RGB LEDs so white only is a good idea.<br>Again, thank you.<br>Tobias
Nice instructable, gonna try this one out. I get how the power supply works for the led's but how to you power the ic circuit?
Hey, thanks for the comment! You're right, I distinctly left out details of how to power the logic... I went back and updated the schematic and instructable just now. I used the +30V power supply to power the LEDs, and for the logic +5V I used an LM7805 linear voltage regulator with a 12V zener diode (reverse biased) in series with the input. The zener knocks the 30V down to 18V for the input to the LM7805, which makes the regulator happier. Good luck, and have fun!
this is so cool ! must have video please !!
Hello, thanks for the comment! I have a video up on youtube, you can check it out here: http://www.youtube.com/watch?v=BINE3xcdq_M <br>
thanks ajax =)
Definitely this serves as great inspiration :) Nice job!
This looks like a great add-on to a tv. Is there an interface for tv signal to change the mood lighting?
After rearranging the code, you could make it respond to any type of IR signal... It would be cool to have a &quot;secret&quot; button on your TV remote that puts it in mood lighting mode.
If am not wrong one can cut own the budget. <br>One uses LED strips (multicolor) : Rs.100 /meter <br>IR Remote + its receiver : Rs. 250 <br>LED Strip Driver : Rs.250 <br> <br>Total Rs. 600 (padding amount to Rs.400) total Rs.1000 <br> <br>We can Get these Lighting Except the frame for $20 MAX isnt it ?
very good
Absolutely beautiful light. Sure is complicated, but you explained it very well. <br>Awesome skill!
Couldn't we just buy RGB LED strips for the underside of cars, hook up a power adapter? Also are you sure cardboard is a wise choice? I suppose if the LED's don't produce a lot of heat (some do) it would be alright.
Hi TXTCLA55, I wanted to make sure I had enough light output to make this a functional ceiling light, so that's why I went for the super high brightness LEDs. I have never used the automotive LED strips, so I can't really say how well they'd work... <br /> <br />Corrugated cardboard actually did work well because it is fairly rigid and also very lightweight. To reduce heat concerns, the LEDs were each mounted on to heatsinks and elevated above the cardboard on plastic spacers to allow for airflow (see pics in Step 6).
How much did this cost for all the parts?
The most expensive parts are the LEDs ($6/ea on Ebay) and the power supply ($32). Everything else is pretty inexpensive or free depending on how hard you look. <br /> <br />I'm guessing in total you'd be looking at around $100-$125, not including the remote. (There is one of these GE remotes on Ebay right now, but it is priced at $84. That seems a little steep...)
Great job!! what kind of power supply did you use? how much current can it supply?
Hey, thanks. <br /> <br />I ended buying a power supply from Mouser (www.mouser.com). It is: <br />30V, 2A, 60W <br />Part# 418-CFM60S300 <br />Price: $34.25 <br />(Instructable edited with this info) <br /> <br />Most of the supplies out there are 28V or 32V, but this one was right in the middle. Plus, it was very lightweight. <br /> <br />
The results look great!
This is a pretty sweet project! Can you get the led's to change to any color in the spectrum, or can the micro controller only handle primary's?
I think says right here in Step 1, Either it's white, or fading through the colours, and can be paused at anytime. <br /> <br />I would love to do this, great one! But, Im not sure if I know enough about micro controllers and circuits to attempt such a project yet <br /> <br />
i just wasn't sure if just faded through the primary's or if it had all the colors along the way. The reason i ask is i know it takes considerably more work to make it fade smoothly through all the colors.
Thanks for the comments, guys!<br /> <br /> The lamp is <em>capable </em>of individual 10-bit brightness control for each color, so it can potentially produce millions of colors. <em>Currently, though</em>, the lamp color fade routine uses only 2 out of the three primary colors at any given time (see &quot;PWM Control&quot; section of step 5).&nbsp;<br /> <br /> nerd1701 - you got me to thinking... I could potentially add another 10-bit counter to the code that will cycle the third color through the full 10-bit brightness scale. This would unleash the full potential of individual 10-bit RGB brightness control. &nbsp;I might just do that... I'll be sure to update the instructable if I do!<br />
BTW - Since a picture is worth a thousand words, how many words is a video worth?<br /> <br /> This should do a good job explaining the current color fade routine:<br /> <a href="http://www.youtube.com/watch?v=BINE3xcdq_M" rel="nofollow">http://www.youtube.com/watch?v=BINE3xcdq_M</a><br /> <br /> <br />

About This Instructable




More by ajax_electronics:Ford F150 Memorial Truck Collage (Manly Crafts) Bicycle Pizza Carrier built from scrap materials Tim the Enchanter Hat with Real Ram Horns 
Add instructable to: