Monthly Archives: November 2013

RGB Strips Construction

With the electronics done on my RGB project, I moved on to the physical construction.

As a veteran of a number of these projects, I’ve learned that the electronics part is always the easy part; it’s all of the physical construction (wiring/cabling/support) that takes the time. I’ve also learned the new projects need to be quick to put up; it already takes too long for me to put up the current displays.

The LED strips that I’m using are quite flexible, so they need some support. I chose 1/2” EMT electrical conduit as my mounting method. I have 67’ to cover, so I bought 7 lengths of the tubing for about $3.50 each. The strip has an adhesive backing on it (it claims to be a 3M adhesive, but counterfeiting is rampant in China, so I’d be surprised if it is…), so it’s a simple matter of attaching the strip.

The first step is to mark a straight line along the conduit.

To do this, you need a way to hold the tubing so it won’t spin. I used a 8’ cutting guide that I have, and a sharpie to mark the edge. If you don’t have that, a baseboard in a room that has hard flooring would work just as well.

Next, slowly peel of the adhesive of the strip as you move along the tubing, and stick it down. The strip is made to be attached to a flat surface, so it won’t adhere perfectly. I used zip ties to give some extra security.

I needed a nice way to joining the pieces of conduit together. I originally just wanted to use conduit connectors, but they don’t really hold the joint very straight and they make the tubing wider, so I did some searching in my hardware store, and found some connectors for flexible pipe that worked just fine. One end is a tight fit, and I ground down the connector so the others just slide on. I’ll note in passing that inside diameter of 1/2” EMT is 0.6 inches, and the outer diameter is around 0.7 inches. Here’s a picture of them.

This shows a tactical error I made; the strips can only be cut on the segments between them, so I let them run long, and made sure they overlapped correctly. It was a bit of a pain. On the second set, I got smart and trimmed the conduit to the length that I needed. Here’s what the completed sections look like:

There are connectors at both ends because I need to feed power from both ends to keep the voltage constant; they are Molex connectors that took a long time to put on; each one gets crimped and soldered.

I bought a 250’ spool of 12-gauge landscape wire, and then soldered on some more connectors. I used hot glue to insulate the connections and hold everything together.

After a lot of work, I got it done, and then surveyed the carnage:

 

and here are a couple of shots of the final result:

That intense red line is the RGB strip. Note that it’s really hard to take crisp pictures of lights, as they tend to bloom.

 

Here’s a closer picture; you can sort-of see the individual leds. At this distance – 20 feet or so – you can see the individual light sources pretty easily.


Trinket debugging…

One of the nice things about debugging code on the Arduino is that you can send debugging information back out the serial port. The arduino can do this because it has a separate microcontroller to handle the USB communication duties.

The Trinket, however, does not have a separate microcontroller – the USB communication is handled by the same microcontroller your code runs on.

I needed to do some debugging, and decided to do something very old school. I wrote some code like this:

temp = valueIWantToView

digitalWrite(0, HIGH);
digitalWrite(0, LOW);

for (int I = 0; I < 8; i++)
{
    if (temp & 080)
    {
        digitalWrite(0, HIGH);
    }
    else
    {
        digitalWrite(0, LOW);
    }
    temp <<= 1;
}

I ran this on a timer interrupt, hooked up my scope to pin 0, and I could then read the bits directly off the scope.


Trinket RGB shield lives

Yesterday, the PC boards for my trinket RGB shield showed up from OSH Park. Also, the solder paste stencil that I ordered from OSH Stencils showed up as well. The stencil cost $5, so I’m out $8.70 for the stencil and three boards. Here’s the stencil:

My original intention was to try different techniques of soldering. I had some decent luck with solder paste on a soldering iron with my last board, but when I started pulling out the components, I found that there was a problem.

The diode that I had chosen was in a SOD523 package, which measures 0.8mm x 1.2mm. That’s really, really tiny. Like, small. I could pick it up with the tweezers, but I didn’t see how I could solder it without moving it around, so I decided to go straight to “plan b”, which is to reflow the board. I got out the stencil that I bought, figured out how to hold it in position over the board with one hand. Here’s what it looks like:

I squeeze out some solder paste onto a piece of paper, pick it up with the “solder paste applicator” from Osh Stencil (really just a credit card blank), and carefully scrape it over the holes in the stencil to evenly fill the holes in the stencil. The results are pretty good:

One of the cool things about pc boards is the solder mask that is printed over all the parts that aren’t meant to be exposed copper. The solder paste does not stick to the solder mask, so even if the paste isn’t perfect, it will clean things up. That looks just fine.

Now, onto component placement. I started with the diode because it’s going to be the hardest. I pull one out of the strip and drop it on the paper.

That tiny little black spec at the top of the picture is the diode. To place it, I need to figure out which end is the cathode, which is typically denoted by a band across that end. I look closely, but I can’t identify the band with my reading glasses. Nor can I identify it with my reading glasses plus my flip-down magnifier. A bit of thought, and I dig out the 8X Loupe that I use to proof slides on a light table, and then I can finally identify the end of it, and place it on the board. The resistors are next; in M0805 packages that are about 1.25mm x 2mm, they are a lot easier to place than the diode. They also aren’t polarized, so the direction doesn’t matter. The three 10K resistors go on well. Finally, there are three MOSFETs to go on in either SOT23 or SO8 packages (I had to do a custom part for this one). They are a bit more finicky, but I find that if I hold the tweezers steady and rotate the board underneath, I can get them mostly aligned correctly.

The next step is to reflow the board – to heat up the solder paste so that it melts and solders the components to the board. In production situations, this is done with an expensive reflow ovens. In the hacker world, some people use toaster ovens, some people use electric skillets, and some use their hot-air reflow station. I own none of these (well, I *do* own a toaster oven, but contaminating it with lead vapor is a bad idea), but I do have a wagner heat gun out in the garage, so I pulled it out and went searching for a decent platform on which to place the board. A recently replaced license plate from my truck was a great choice; metal, nice and thin, and the embossed letters raise it off of the surface.

I clean a space on my bench, put the board on the license plate, and turn the heat gun on low. There are very specific reflow heat profiles that are used in production ovens, but the simple goal is to get the board evenly warm, and then concentrate on specific areas until the solder melts, and then cool it off quickly so you don’t fry the components. I get the board kindof warm (it might have been a good idea to grab the IR thermometer before I started), and then concentrate on one of the MOSFET & resistor sections of the board, getting the heat gun close. It reflows fairly quickly, and I move on to all the other components. They reflow quickly as well. Here are the results:

 

It’s a bit hard to see in the picture, but a bit of examination with the loupe shows that I got good reflow on all of the components, and there are no solder bridges. The next step is to test the board; I hook it up to 12V, verify that the diode is in correctly, and then apply 12V to the pads where the trinket pins will connect. Success! Everything works the way that I expected.

I cut down an arduino header set with an abrasive wheel in my dremel to get two 1×5 headers, and solder them into the holes. Here’s a picture of the shield with the Trinket:

I made the shield stackable because I need two shields to drive the two separate circuits; the diode in the power line functions both as a polarity protection device and to keep the two power supplies from fighting with each other. The header on the left end of the shield is temporary; I’m using it to plug the shield into a breadboard so that I can easily connect to the shield for testing. It is *just* possible to plug the shield into the edge of the breadboard and stack the trinket underneath it.

I hook up a 5 meter strand of LEDs, plug in the power, and it starts animating through the colors.