More Xmas Hacking

Saturday, December 11, 2010 by darco
Posted in ,

ybox2-and-xmas-lights/IMG_1392In my previous post, I elaborated on how I reverse engineered the low level protocol the GE Color Effects G-35 strings used. It seems to have been quite popular, and several people have taken that information to hack their own G-35 strings to do cool and amazing things. But what about me? What am I doing with my strings?

Well, it's a bit late in the year to start putting together some sort of advanced choreographed light show, so I'm staying somewhat simple for now. No music, just a few different algorithmic patterns. And here's the kicker: I want to be able to control them with the web browser my phone too. Sounds like a job for… the ybox2.

Behold, the networked Christmas light controller in an Altoids tin:

ybox2-and-xmas-lights/DSC_7746

In short: it works great. See for yourself:

The first thing to do was to replace the precarious wire-nuts I used for prototyping with something more permanent. I decided to use the stock power supply instead of supplying my own because I don't have a lot of five volt power supplies this small that can supply three amps of current. In the end, I wanted to have the control unit removed, have the black power cables connected directly to the outer green wires, and add a connector for data and a power connector that I can use to power whatever I end up using to control this thing. This is ultimately what the result looks like:

DSC_7754

And here is the schematic:

schematic

Hacking up a string to add these connectors isn't rocket science, but if you are careless you could cause yourself some grief.

ybox2-and-xmas-lights/IMG_1344The first thing to establish is what wire is what. If you are looking at the box with the bottom facing down (so you see the screw holes), the order of the wires is as follows, from left to right:

BLACK(+5V,GND) GREEN(+5V, DATA,GND)

Beware that neither of these wires have indications of their polarity, so after you cut them off the controller you will need to use whatever is on the opposite side of the wire for indications of polarity. I always end up carving a '+' and '-' on each side of the transformer plug, but as long as you have a good reference photo that shouldn't be necessary. Here are a few pictures which you can use as a reference:

ybox2-and-xmas-lights/IMG_1345 XMAS-Lights/IMG_1310

You'll also need an RCA cable, and a sacrificial wall-wart transformer to steal the barrel connector from.

ybox2-and-xmas-lights/IMG_1350 ybox2-and-xmas-lights/IMG_1362

Strip the end of the RCA cable carefully! The first thing you want to strip off if the outside layer, without damaging the shielding. You then pull away the shielding, twist it together, and then strip the inner wire. The inner wire is what we will use to transmit the data to the light bulbs.

ybox2-and-xmas-lights/IMG_1352 ybox2-and-xmas-lights/IMG_1356 ybox2-and-xmas-lights/IMG_1358 ybox2-and-xmas-lights/IMG_1360

While not absolutely necessary, I also also then add some small heat-shrink tubing to insulate the ground wire. This helps makes things cleaner when we start soldering everything together, but if you don't have heat shrink tubing this small then you can get away with skipping this step.

Stripping the auxiliary power cable is fairly trivial:

ybox2-and-xmas-lights/IMG_1364 ybox2-and-xmas-lights/IMG_1368 ybox2-and-xmas-lights/IMG_1370

In this case, our auxiliary power cable had some polarization indications on it. Usually the conductor with the white stripe refers to the center conductor (positive) and the conductor without the stripe is the outer conductor (negative). However, this may not always be the case, so you should always check with a multi-meter:

ybox2-and-xmas-lights/IMG_1372

Soldering

It would appear that I didn't take quite enough pictures when I was performing this modification, as I actually don't have any pictures of me soldering up the wires. Nonetheless, here are a few tips:

  1. ybox2-and-xmas-lights/IMG_1375Slip on the heat-shrink tubing BEFORE you start soldering. You won't be able to slip it on after you are finished soldering.
  2. Solder all of your joints and then isolate them by wrapping each individual solder joint with electrical tape.
  3. When you have the joints soldered and taped go ahead and test to make sure it works, because the next step is hard to reverse.
  4. Slip on the heat-shrink tubing and heat it up with a heat gun (or hair dryer).

I like to cut up a few pieces off a hot-glue stick and shove them in either side of the heat-shrink. When heat is applied, the glue will melt and help form a seal against moisture.

Bringing it all together

I chose the RCA and 5.1mm barrel connectors because:

  1. They are commonly available in most tinkerer's workshops (including mine).
  2. They allow me to connect the string very easily to a standard ybox2, using the TV-out port.
  3. These connectors allow me to easily prototype new control modules.

Now this does mean that if I hook a string up to a ybox2 that I lose the TV-out port, but since I have no need do both at the same time I found the convenience of this method more compelling than rigging up a hack to allow me to do both.

Also, if you really want to be able to switch back to the old stock controller, you can easily modify it to have these connectors. Then going back to the original programs is as easy as plugging in the original controller instead of a ybox2.

IMG_1401

Software

You can download the ybox2 widget I'm using here. Simply compile it using the Parallax Propeller Tool and then upload it to the ybox2 via the bootloader and you should be set.

Wrapping up

Over all, I'm quite satisfied with how this project has turned out so far. The response from the previous post has been a bit overwhelming. There are lots of very talented people out there who are hacking away at these lights, and if you happen to be one of them be sure to let me know in a comment with a link to your creation!


Trackback from your own site.