As I mentioned in my last post, this year I heard about the GE ColorEffects G-35 programmable light strings that a lot of people are hacking. I piggy-backed on work that Robert Quattlebaum (“Darco”) and Scott Harris have done to create an interface to the GE G-35 Christmas light strings via an Arduino using my light sequencer software, EverSequence.
In order to drive the string from EverSequence, I first had to tap into the data line. I decided to use a 1/8″ miniplug jack on the string and a miniplug attached to the Arduino. Here is a basic diagram of how I connected them.
Miniplug jacks typically have three pins. One is for the ground and the other two are normally connected when no plug is inserted. When you insert a plug, the tip is connected to one, and the other becomes disconnected – this permits me to use the built-in controller on the string when the Arduino is not plugged in.
Here are some pics of the actual build.
First, I cut the ground (-) wire coming out of the string’s controller. As described by Robert, this is the wire on the right, when looking at a bulb top-down where the three-conductor cable runs into it. The picture also shows the middle (data) line cut. I slipped short pieces of heat-shrink tubing around the wire ends before soldering them to the jack terminals so that they can be slid over the connection once I solder them. This provides a bit of assurance that things won’t go making contact with things they shouldn’t if terminals get bent or whatever later on.
Next, I connected the side of the data line that goes to the bulbs to the terminal that connects to the plug tip when it is inserted. The side coming from the controller connects to the remaining terminal – the one that connects through when no plug is inserted. I used a wide-diameter piece of heat-shrink around the whole plug assembly. You could also just wrap some electric tape around it or whatever.
Finally, I connected the plug to a fairly long, two-conductor wire that runs to my Arduino. Originally, I used an Arduino Uno, but I wound up going with a “USB Boarduino” Ardiuno clone from Adafruit. This board is a nicer form factor for a dedicated purpose like this one, it’s pin-compatible with the Arduino, it still has a USB connection for connecting to the PC, and it’s cheaper! I connected the plug’s sleeve to ground and connected the tip to Digital Out pin 4, which is the pin the driver software expects the G-35 data line to be attached to. In the picture, I have already mounted the board in an enclosure, with a hole exposing the USB connector.
Since some people expressed interest in what I was doing, I finally got around to packaging up a version of EverSequence which includes just the driver plugins for an Arduino-attached G35 string and, as a bonus, the a plain Arduino driving anything you want via digital out pins 2-12. You can download the installer here.
It permits unlimited use, and is licensed for free personal user. If you want to redistribute it, use it for commercial purposes, or would like a version that includes the plugins for X10, Insteon, EEIC Ar-16, or Pencom relay controllers contact me. Update: I’m now providing the full version with all device plugins for free download for personal use. Contact me for commercial licensing or source code.
There’s a fair amount of help available in the app in terms of how to use it, but I’ll go into a bit more detail about the Aduino and G-35 support here.
The plain old Ardiono plugin simply drives pins 2-12 on an Arduino board, turning the corresponding pins on or off as spans activate/deactivate in a running sequence. I actually wrote this plugin to drive my Light Suit and accoutrements (as described in this thread). Pins are mapped to sequence channels in the sequencer.ini file. You can map a sequencer channel to one or more pins on the arduino; typically you would use a one-to-one mapping with eleven channels but I have complex, preexisting sequences that have as many as 24 channels. I wanted the flexibility to be able to map many-to-one and choose which channel maps to which pin.
In order for the sequencer to communicate with the Arduino, you have to load some driver software (provided in the ArduinoDriver.pde sketch) onto your Arduino. See arduino docs for how to do that. The driver sketch basically listens on the serial port for signals from sequencer sent using a simple protocol I invented. A similar sketch is provided for the G35 plugin (G35_Driver_ALG.pde) an work similarly. It’s described in more detail in my last post.
In the case of the G35 plugin, at initialization time, it will actually poll the connect Arduino to see if the driver sketch has been loaded on it. If it finds an Arduino, but doesn’t detect the driver it will prompt for whether you want to load the driver sketch to the Arduino and will try to load the sketch if you select “Yes”. This has not been tested thoroughly, however, so you may have to load it manually. One thing I’ve noticed is that sometimes it seems to mistakenly think the driver hasn’t been loaded. Usually, shutting down EverSequence, disconnecting and reconnecting the Arduino, then restarting EverSequence makes this go away.
The G35 plugin supports the ability to set start, mid, and end colors in a span, and to adjust the ramp-up and down rates. This is new functionality I added this year for the G-35 and is currently only supported by that plugin.
Note that the G35 functionality is known to be a bit buggy. The Arduino driver is based on work done by Robert and code ported to the Arduino by Scott. When sending commands rapidly and changing intensity levels by more than one, as in the case of ramping colors up and down, the lights become”glitchy”. I’ll probably look at it again for Christmas next year (2011), but for now I just live with it.
If you read Robert’s post, you’ll see that, at startup, the string’s LEDs must be enumerated and given addresses. To do this, you should first power up the string, then power up the Arduino, which should already have the driver sketch loaded. The first thing the sketch will do is enumerate the bulbs, then it will go into “listen mode” and listen for signals from EverSequence.My driver sketch differs from Scott’s in that it assigns the bulbs only addresses 1-5, rather than1-50. This has the advantage of reducing the number of packets that have to be sent (every fifthbulb get’s the same packet) and thus the “glitchiness”. The disadvantage is that, while you can do chaser patters, alternating light patterns, or “all on” patterns, you can’t individually address each bulb. If I can solve the glitchiness, I might change this, although then you’d need a lot more channels in your sequence anyway.
I haven’t done a lot of testing with this packaged version of EverSequence. I can’t guarantee it will work on every system or OS. I’m running WinXP on a fairly fast, dual-processor box with 2 GB of memory and on a similar laptop. Also, it’s not commercial software (at least, not yet and it definitely has a bug or two that you just have to live with.