Introduction: RGB LED Track Lighting From Cardboard Tube

View this and other projects on my site: http://adamofsutton.com

This project was made entirely of items I had laying around, with the exception of the 100 diffused RGB LED's which I purchased on ebay for $9.84. Even if you have to purchase all of the components it would be difficult to spend more than $30. The lights are actually two identical ~3.2 watt systems with red, green and blue controlled individually by potentiometers. My design is entirely analog, but an engineer better than I could easily add a microcontroller and implement PWM allowing the LEDs to become several times brighter. However, this analog setup lights my 200 square foot workshop very well. The white light produced when pots are set appropriately is much warmer and more relaxing than the light produced by CFL's.

If you are interested in building this project then gather the following materials, and let's delve into the steps.

Necessary Components:
-100 5mm Diffused common anode RGB LED's (You definitely want diffused. If the LED casing is clear you will see the colors separately, and looking directly into the lights is very uncomfortable)
-Cardboard Shipping Tube (Mine was just over 6' long, with 10 inch circumference, or 3.18" diameter)
-6 - 10k ohm potentiometers
-200 - 90 ohm resistors for green and blue leads(This value can be a little difficult to find, but it is readily available. Look to the resistor step on how to calculate resistance value)
-100 - 150 ohm resistors for red leads (Look to the resistor step on how to calculate resistance value)
-2 - 5V 1A Power Supplies (Increase the amperage if you implement PWM)
-6 Mosfets (I used the IRF840 rated at 8 amps, but reccommend one with a lower amperage rating for more precise adjustment. Such as the IRF9610 or IRF610
-2 Switches
-Enclosure (I used an emptied out thermostat casing, but I do not reccommend it. It looks interesting, but finally closing it up was a little difficult and forced me to take it apart a few times to fix connections.)
-Lots of wire

Mounting Components:
-String
-Small Round Hooks (come in packs of 100)
-Insulated Staples (White Staple in picture. This is for tacking up the wire, there are many many alternatives.)

Optional Components:
-White Paint (Improves Light Spread and intensity)
-Black Paint (For covering the drab brown on the back of the cardboard tubes)
-Electrical Tape (Serves the dual purpose of securing LEDs in place, and preventing upward light leakage. Much more important for the latter)
-24 Bullet Connectors (I used a set of 4 for each track to allow me to easily take them down for maintenence)
-4 Pin LED Connectors (You will need sets of these, search "4 Pin LED Connectors" on ebay if you do not have these. You will find ones cooler than mine that cost only a few cents per piece.
-Perfboard/breadboard (For ease of transistor wiring)
-2 DC Jacks and 2 DC Plugs
-Knobs (As you can see mine are color appropriate and awesome, as well as a few cents each)
-Heatshrink Insulation (Everyone who works on any sort of electronics project should have lots of this on hand)

Tools:
-Soldering Iron and Solder
-Wire Stripper
-Box Cutter
-Drill & 5mm Drill Bit
-Hammer (For tacking up staples)
-Pencil
-Rulers
-Measuring Tape
-Sandpaper (A vast variety of grits will do just fine. Try to avoid grits that are extremely high or low. I'd say anything between 60 and 300)
-Caulk/Adhesive (You have many options here, see the next step for application)
Optional:
Aluminum Angle
Third Hand (Invaluable tool for soldering. I pity the engineer who lacks this tool)

Step 1: Forming Your Tube

     Cutting your tube into four equal pieces can be a little tricky, but patience will prove it a simple obstacle to overcome.  First and foremost, you do not want to use a tube less than 3" in diameter, otherwise your four resulting pieces will be too narrow.  Also important to note in your calculations is that with a 6' tube my LEDs are spaced approximately 3" apart, having 25 LEDs on each strip.
     In my first attempt to cut the tube I made a makeshift "table saw" out of a jig saw.  The cut was atrocious and ruined my original tube, but luckily that tube was too small.  If you have a real table saw you may be able to use it, but I anticipate it will be very troublesome and give you a shabby cut.

     The best method is to use a good sturdy box cutter.  Here is how to do it:

-Measure the exact diameter of your tube, and use it to find the circumference.  Circumference is Diameter multiplied by Pi (3.14).  You can avoid the math by using measuring tape.

-Divide your circumerence by 4.  Use a measuring tape to mark 4 spots, the distance of circumference divided by 4 around one end of the tube.  So, with a 10" circumference you would mark an arbitrary starting point, then measure 2.5" around, mark, 2.5" etc.  Remember, measure twice, cut once.

-Next you need to extend your four marks into straight lines which extend the full length of the tube.  The best tool I have found for this is an aluminum angle. The reason for this is that when you lay the two outer eges of the angle against the tube (with the connecting edge pointing out from the tube) it will always be perfectly straight.  It is easy to accidentally draw a line that isn't straight on the tube with a ruler especially with a smaller ruler.  A steady hand and a yardstick will make this marking possible with little trouble.  Ok, draw your four lines from end to and, check for accuracy by measuring distance between the lines at various points using your measuring tape.  Make sure you are as accurate as possible for pleasing aesthetics down the road.

-Now you want to cut the tube.  While holding your tube steady carefully slice down your line.  Use many strokes, and finish cutting one line before moving to the next.  Work in sections of about 2'.  Do not try to force the blade through too soon, and make sure your line is sliced all the way down the tube before you push the blade all the way through.

-After your first line is completely sliced do not move to either of its neighbors.  The second line you want to cut is the one opposite your first cut.  This second cut will likely be the most difficult, but again patience is a virtue.  The last two cuts will be the easiest as you will have two very workable halves.

-Ignore the rough edges for now

     Once our four pieces are cut we want to drill the holes for the LEDs:

-Position your tube quarters, curved side up, on a flat surface (opposite how they are seen in the picture).  You should all ready know the distace of the arc (circumference divided by 4), but if your cuts are real messy you may want to re-measure now.  Divide the length of the arc in half to find your center point, and mark it.
{NOTE:  I designed my light tracks to be curved side up.  You may want to do the opposite.  There are reasonable arguments for doing this.  If such is the case the make your markings on the inside to avoid marking up the visible side of your tube.  Especially if you are not going to paint}

-Use whatever tool you used earlier for making lines down the tube, and extend your midpoint mark into a straight line down the entire length of the tube quarter.  Repeat for each piece.  You now have a centerline on the back of each tube.

-Take the length of your tube and divide by 25 (or whatever amount of LEDs you want per track).  The resulting number is the distance to measure for marking where to drill your LED holes.  IMPORTANT -> You want to make your first mark HALF the distance calculated, measured from the edge.  Otherwise your last hole will be on the very end of your tube.  Obviously you're measuring along, and marking on the center line.  Make your 25 marks.

-ALERT Before you drill your holes, complete the next part of this step.  Before you screw in the hooks come back and finish the following two steps.

-Use your 5mm drill bit and bore out all of your holes.  I found using a pilot hole unnecessary.  You will likely have to move an LED hole or two on each tube to avoid intersecting with the mounting holes.  Drill the adjusted hole as far from the mounting hole as you are comfortable with.  This will make installing your LEDs easier down the road.

-Sand down your edges and your holes to make everything look nice.  The drill will cause the cardboard to 'peak' a little like a volcano.  You want to sand this all the way down to prevent the light being unnecessarily covered.  You are going to want to do something about the cardboard dust, as it is extremely annoying to breath in.  Wear a dust mask or ventilate well.

Now is the best time to install your hooks for mounting the tracks to the ceiling.  The process is simple:

Each piece will receive three hooks.  Less will cause the tubes to buckle and ruin your wiring.  More than three is unnecessary and will likely make mounting very tedious.

-Measure exactly halfway down your centerline, and mark.  This is the center of the length of your tube.

-Measure in from each edge a distance you feel will give the best stability to your track.  Make sure the distance you measure is identical on both sides.  I measured in one foot on each end.  Mark.  Repeat for each piece.

-Find the best narrow hole punch you can find (I used the needle on a compass, the circle-type, not the north-pointing type of compass) and punch holes through your tube in the three spots you have marked on each tube. 

-If you have not yet drilled your LED holes then do so now.  Once your holes are bored out screw your brass hooks into the three appropriate holes.

-My brass hooks were very firm when I installed them, but trust me, you want glue them in.  Some form of caulk is best.  My personal preference is loctite, what an excellent adhesive.

Step 2: Paint Optional

You do not need to paint the tubes of course, but a lack of white paint will notably cut down on the amount of light projected around your room.  Painting will also increase the strength of your tube.  I have hung up the tube pieces without paint, and it looks pretty tacky.

I use flat white spray paint, and flat black.  Spray or brush does not matter.  You want flat white, flat.  The only surface which will reflect better than flat white is mylar.  Any type of gloss will take away from your light.  (Mirrors also suck up light btw).

Setup an appropriate painting area and ventilate well.  You want to use 4 or 5 thin coats, letting them set as much as possible in between.  This will give much more strength to the tube than 1 or 2 thick coats.  Paint the side which will face the floor white, and the opposite side black.  If your hooks are conductive make sure to coat them well with paint to protect against short circuits.

Step 3: Resistors, Resistors, Resistors...

     First thing's first, we need to make sure you have the correct resistors.  This task is simple, but many websites inform you incorrectly, or overcomplicate it.  Note that since each LED will have its own resistors the wattage rating on each can be very low.  1/8 watt will be just fine.  Here's how to calculate resistance properly.

Calculating Resistance Values

-You need to know the voltage rating for each color of your LEDs, and the current rating which will be the same for all three colors.  The vast majority of 5mm RGB LED's are 3.2V for Green & Blue.  2V for Red.  20ma or .02 A for the whole LED.  Find the datasheet for your LEDs if possible.

-You also need to know the rating of your power supply.  As I said in the intro my design is actually two identical systems of 50 LEDs.  Both power supplies I used were 5v at 1 amp.  Only the voltage is important here, but make sure that the current does not exceed what your LEDs can handle or they WILL either short out or grow gradually weaker and weaker.  50 LEDs at 20ma (50x.02) is 1 Amp.

-With the above information gathered you are ready to calculate your resistance values.  Here's the formula:
   (Power Supply Voltage - LED Voltage Rating) ÷ LED Current Rating(A)
Make sure your current value is in Amps, so 20 ma is .02 A

Green & Blue
(5-3.2)÷.02=90 ohms
Red
(5-2)÷.02=150 ohms

Solder Solder Solder:

You have 300 resistors to solder, so be patient, take breaks and have fun.  You may elect to cut down the leads on your LED.  I chose not to because it is both easier to identify the colors of the leads and allows me to use less wire to connect them.  You will almost definitely want to cut the leads on your resistors.  Leave your positive leads alone.

Step 4: Putting Lights in the Tube

Before I begin, please ignore the fact that some photos show me installing LEDs before painting.  I did this to one piece before realizing my mistake.  Having said that, let us begin our next bit of tedium. 

-Begin by popping a few LEDs into their holes and enjoy the satisfaction of that perfect snug fit.  Don't pop them all in at once, work three at a time or risk painfully stabbing yourself!

-I should let you known now that the LEDs are wired in parallel.  As far as I know (and I know well) it is impossible to wire RGB Leds in series.  The LEDs therefore must be arranged so that the appropriate colors line up with each other as you can see in the photos.  The leads are to be bent down to the tube surface toward the center.  So one half (yes I know you can't divide 25 by 2) of the LEDs are bent one way, and the other half(placed in their holes opposite the other half, so as to mirror them and keep the colors in one line down the tube)  bent the opposite way.

-I repeat, work three at a time!  Choose an end to start with and put three LEDs in their holes.  Press the back of the LED casing (diffused plastic)  securely into the hole as you bend the leads so that they hug the tube as closely as possible.  You want to tape them in both to make soldering easier and preventing light leakage (unless you want to light your ceiling).  I use two pieces of tape for each LED.  The first is laid across the exposed part of the casing (without covering any part of the leads) and stretched tightly enough to hold the LED securely in place.  The second tape covers the entire back of the LED to prevent light leaks. 

-Do not apply solder to an untaped LED.  If you do then the length of your wire will likely be wrong, and taping with wires in place will be more difficult.

-The pictures should make the soldering process obvious.  Each two LEDs have their own set of wires.  Cut your wires to the proper length as you go along.  Every wire will be slightly different, and cutting them all at once will leave most of them too short or too long to use.  Make sure to account for the length of wire that needs to be stripped as well.  You will likely feel the need to bend the outer resistors in slightly for neatness.  Remember you want the length as exact as possible, to prevent the wire from rising up and being visible from eye level.

-Work your way patiently soldering down to the center, don't forget to wire the positives too.  When you hit the center, flip your tube around and repeat from the other end until you again reach the center.  Solder your halves together in the center in the same manner, and voila! 25 LEDs in parallel.  Now, take a second to admire your wired train tracks and..

-Repeat for your three other tube pieces

The Option

     I highly suggest that you have a collection of bullet connectors.  I prefer to order a few hundred at a time as they are infinitely useful on projects that will need to be taken apart later.  Giving each length of tube its own set of bullet connectors will allow you to take them down without disturbing the others for whatever reason you may need.
     If you decide not to use bullet connectors, and make your tubes more permanent, then you can ignore this step and solder your long wire (to the control box) directly onto your tube after you have calculated and cut the length of that wire. 
     Anyway, here's how to do it:

-Lay out your bullet connectors and pop the rubber sheaths off of the female ends (this can be annoying, but you'll get it, I promise).  Take short wires, about 2" and solder them to the metal part of the connector (you were going to solder to the rubber right?).

-With your four (or 16 if you elect to do them all at once) females soldered slide the rubber sheaths back on, and crimp them shut.  You can use pliers for this.

-Solder the other end of the wires about one inch from either side of your center hook.  Red & Green on one side, Blue & Positive on the other

-Repeat for your other lengths of tube.

-Hurrah! Tubing complete.

Step 5: Building the Control Box

    I built my controls into the case of an old thermostat.  This was stupid, and added 4 days to my project (I've included a collage so that you may sympathize with some of my pain).  Do yourself a favor and find a nice enclosure on digikey, or grab one of those black ones they sell at radioshack. 

The Circuit

     As simple as possible.  Remember, two identical circuits.  Each color (negative) is connected to the Drain of a mosfet.  The mosfet source is connected directly to negative of a dc jack, or negative of power supply if you opt not to use DC jacks.  The positive lead of the LEDs is connected to the switch, which is in turn connected to the positive of your dc jack or power supply. 
    Originally I had resistors on the potentiometers, but found them useless.  The center lead of the potentiometer is the signal that you send to your mosfet.  Wire this center lead to the gate of your mosfet, one for each, six total.  This leaves two leads, one positive, wire this to the switch.  The other is negative, wire to dc jack's negative or power supply.  Remember that which lead you determine to be positive, and which you determine to be negative will in turn determine which direction you will need to turn the potentiometer to increase the power to your light's respective color, so test before you solder.

I have supplied a fritzing design (pictures) in case my description of the circuit is confusing.  Forgive me if it is.  It's my first fritzing, so for give me if that, as well, is confusing.

The Enclosure

    Of course your enclosure experience will be unique from mine.  Use what tools you need to get everything in there, and good luck.  I reccommend using four pin connectors like those at the top of my thermostat (see picture) for ease of use.  Good luck!

Step 6: Putting It All Together

Drawing the Grid

Before we can put this all together it is best to install the ceiling mounts.  This will make it easier to measure our lengths of wire so that everything will be taught when we put it together.  If you would like to hang your lights in the same pattern I've used then follow these instructions.  If not, I'm sure there are many interesting patterns you could create with great ease.

-Measure the length of the room for which you want the lights to hang perpendicular.

-Divide this length by four.

-Take half of that new number, and mark with a pencil on your ceiling.  Then measure the other length of your room (or the stretch of room you want the lights to be centered on.  In my case, the longer room measurement).  Once you know the length, divide it in half and measure that distance from one end.  Have your measuring tool intersect your original pencil mark.  Mark the length of half the room.  This is where you install your first hook.

-Small Hooks can sometimes be manually fastened into a surface.  If not, then use the smallest drill bit you have (must be smaller than the screwshaft of the hook) to drill a pilot hole in the point you just marked.  You can also use a finishing nail and a hammer for making a pilot hole.  Install hook in the first hole.  If it feels too loose then take it out, cover the shaft in caulk or appropriate adhesive, and re-insert.

-You now want to take the distance between two of the hooks on any length of tube (all are assumed equidistant).  With your two previous marks to guide you, measure that distance from the center hook in each direction and mark both.  Install hooks in each point.

-You can now use the original length of the room divided by 4 to measure the distance to the next set of hooks and use the second length of the room to square them.   Marking three more hooks is easy, and you continue until you have your four rows of three.

-Twelve hooks are installed.

Light Intensity

     You will need to decide how low you would like your lights to hang.  The lower they are the more effective the light will be.  Tackiness will also increase.  I went with 6". 
    The lengths of tube which are controlled together are separated by a tube of the other circuit. I have two wires of 4 (RGB+) connecting all the lights and running into the control box.  If you prefer this method then perform the following steps.

-Measure the distance between the center hook of your first row of three, and the center hook of your third row of three.  Then multiply the length that your lights hang by 2 and add it to the distance.  Use this number to measure your wire (twin-pair speaker cable is excellent).  Cut these lengths until you have four conductors.  Leave room for stripping the wire.

-Solder the end of each conductor to a female bullet connector.  You will have attached 8 bullet connectors. If not using bullet connectors, then you will now be soldering these ends between the appropriate leads on two lengths of tube.  Solder Red to Red, + to + etc. across two tubes.  You will have attached 8 bullet connectors.

-Measure the distance from previously mentioned third hook, to the wall where you will mount the control box.  Measure the rest of the distance to where your control box will be.  Add those two numbers to the length your lights hang, and you have the distance of your next set of conductors.

-Solder the four ends of the cable to four of the previous bullet connectors, or one of the previous lights.  To the other end of these cables attach your four pin connector.

-Use heat shring as you go along and you will have one neat bundle that goes the exact length you need it.

-Repeat for the other two lights.  Set these cables aside.

Mounting the Control Box

     My controller, being a thermostat was premounted to the wall. 

Rigging it Up

     If you do not know how to tie a knot, please look it up.  Otherwise, tie a knot around a single hook which is attached to one of your lengths of tube.  Once it is taught measure from your knot the length you want your lights to hang and mark it with a sharpie.  Tie a knot over that exact point, and repeat this for all the hooks.  You will have strings with one hanging knot, and one which holds the tube.
     Stand on a chair and hold the light tube by its center with one hand.  Use your other hand to sling the center string knot over the appropriate hook on the ceiling.  Do not let go of the tube, while carefully attaching the next knot.  You can let go before attaching the third.  Repeat this for the other three lights. 
     Now begin attaching your bullet connectors, using the ceiling hooks to temporarily suspend the wires.  Now everything is in place, and you can use your Insulated staples and a hammer to install the wires taught across the ceiling.  Be careful to leave slack for bullet connectors.  You can see in the photo that one of my LEDs is almost blacked out.  This is because the ceiling wire is holding it slightly out of its socket.
The Final Step
     Now you can, if you need to, test the + and - sides of your male DC connector.  Use alligator clips to connect it to your power supply and plug it into your control box.  Once you know which is which, solder it together, heatshrink it up, and enjoy.

Reuse Contest

Runner Up in the
Reuse Contest

Make It Glow

Participated in the
Make It Glow