Meshed Network Light Suit Technical Details (part 4)

OK, it’s finally time to talk about the hardware on this project.  I had originally planned two write one post about software and one about hardware, but I found I had a lot more to describe on the software side. Hopefully my description of the hardware will be more succinct.

In the past, for the light suit I’ve been using a simple light sequencer that I made by getting one of these fancy strings of snowflakes which has a little controller attached to it that flashes in six or eight different patterns. I basically chopped it off and grafted plugs onto the leads into which I could plug strings of LED lights. I power the whole thing with a small power inverter connected to 12v batteries.  Originally I borrowed the lead-acid battery out of the UPS that Grande Cable mounted to my wall, but have recently switched to packs of AA NiMH rechargeables.   AustinLightSidekick has a similar setup, although he uses an off-the-shelf sequencer he got at Home Depot or something which you normally stake in the ground outside to flash your house lights. He still uses a lead-acid battery, which is simpler and less of a hassle, but lots heavier.

As I mentioned at the start of this series, I’m kicking the whole light suit concept up a couple of notches this year – creating a wireless meshed network of device that will flash in synchronization with a sound track. I’ll have a small laptop in a backpack that will play the music via either my EverSequence sequencer program or via Windows Media Player with my custom-written plugin. In either case, as I described last post, signals will be sent over the serial (actually, USB) port to an Ardiuno micro-controller.

The Arduino has 14 digital I/O pins that can be used to control external devices (like Christmas lights :- ). Of the 14, 12 will be usable in my case, since two are shared by the serial send and receive lines. I’ll use four lines to drive my suit, four to drive Sidekick’s, two to drive the Autonomous cape, and two to drive the two new Autonomous Staffs.

Pinout of Master controller, and slaves driving more Triacs boards

In the main controller for my suit, the four Arduino digital out lines 9-12 are wired to opto-isolated triacs, which is what you need to switch 120V current on and off.  Rather than build my own, I just wound up using some nice little controller boards I found here.  The author, Mark Borden, has a whole bunch of them and will sell you some if you email him. Here’s a photo of the assembled results.

Fully assembled Master controller

The eight remaining digital out pins are wired to the digital I/O pins 0 – 7 on an XBee 802.14.5  mesh-networking module. The XBee modules are very cool little self-contained daughter boards the allow you to easily create point-to-point or mesh networks incorporating wirelessly connected nodes.

Calling my light suit setup a mesh network is really a little bit of false advertising. I’m actually using one XBee in broadcast mode on a specific “personal area network” ID (PAN), with others (one in each remote light costume component) listening for broadcasts on the same PAN. Strictly speaking, this is a point-to-multipoint network, since nodes are not forwarding data from other nodes in a peer-to-peer fashion, but mesh network sounds cooler. A good introductory tutorial to XBee modules is here.

Anyway, Arduino pins 2-8 and 13 are wired to pins Digital IO 0-7 on the transmitting XBee module, which I call the “Master”. I added 13 to the scenario near the end, when I realized I didn’t need the CTS pin on the XBee. Pin 12 on the XBee can be configured for CTS_FLOW_CTRL if you’re doing serial data transmission, or can be used as a Digital Out pin. I’m actually configuring the XBees to operate in “virtual wiring” mode, not serial transmissions mode. With “virtual wiring”, you basically configure the XBees such that, when an Input pin’s state changes on the “Master”, the state is transparently transmitted to all the “Slaves”, which then change their corresponding Output pin’s state to match. Since I’m not using the XBees in serial mode, I don’t need CTS_FLOW_CTRL, so I have another pin to play with. I also connected a button to Analog In Pin 0 which controls the ‘mode’ the Arduino runs in (see last post).

For the controller for AustinLightSidekick’s suit, I use another of the Triac boards,

Secondary Suit Controller

but connect it to DIO 0-3 on one of the XBee’s. I actually mounted the Xbee on a Lilypad Xbee breakout board, which has convenient solder pads and an on-board 3v regulator to supply the XBee.

Component view of Autonomous Cape controller

The Autonomous Cape also gets it’s own controller, but I’m only driving it with a couple channels, so I don’t need a full triac board. I also want to keep the controller a little smaller for the cape, so for it, I simply cut out the circuitry for two of the four triacs on one of Mark’s daughter boards and wired them to an XBee daughter board.  Actually, I tried building a two-circuit triac board from scratch (the circuitry is very simple), but for some reason, it didn’t work – it’s posible I blew out the opto-isolators early on by driving too much voltage through them or something. Whatever the issue, I didn’t want to blow a lot of time on it, so I just bought a couple more boards from Mark. I wired the opto-isolator input side to a different break board, an “USB XBee Adapter” kit from, soldered to some prototype board. That board includes a USB serial adapter, which lets this box double as my XBee programmer.

Xbee driving Staff lights

For the staffs, I once again mounted XBees on a breakout boards, the somewhat simpler (and cheaper) “XBee Adapter Kit” from AdaFruit, soldered to prototype board.  The Xbees are powered by a couple of AA’s in each staff. They’re wired through resistors to a couple of transistors that drive 12V LED strings which are really partial-length strings I cannibalized from a full 120V LED string. The 12V comes

"Plain" Staff

from some little, flat, 3.7V lithium batteries I had around. I wired 3 in series for each staff. Since the 3V and 12V supplies are separate, I have two jacks in each staff for charging.

One staff is “Plain” – it contains just lights and an XBee, the other contains the same light circuitry, plus the Bluetooth Speaker-based sound rig I mentioned in Part 1.  I basically bought one of the cheapest set of Bluetooth speakers I could find, cannibalized it, and mounted the parts in the staff.

Cannibalized Bluetooth speakers

I mounted the circuit board in a plexiglass jar mounted on the top of the staff, and mounted the speakers in the shaft (which reverberates some, making the sound a bit more impressive).

Circuit board housing

The speakers took 3 AA’s originally, but would work on two. Originally, I made the mistake of trying to power the speaker circuitry off the regulated 3V supply provided by the XBee breakout board.

Bluetooth circuitry

I think there was a problem with that configuration, where the power available from the regulator was insufficient. The volume was low, and if I turned it up to high, I think it was starving the Bluetooth circuitry, which would reset. Instead, I connected it in parallel straight to the AA’s and EUREKA! Rocking loud Bluetooth sound coming out of the staff!

Rocking Bluetooth Speaker Staff

I gotta say, the total effect, now that all this stuff is working, is pretty awesome. With two light suits (four light channels each), a Light Cape (two channels), and two Light Staffs (sharing two channels each) all flashing in synchronization with music blasting out of the sound staff, the cumulative effect is pretty impressive.

If you’re in Austin and want to get a glimpse this holiday season, follow me on Twitter @acoulson2000 where I’ll announce appearances of myself and/or AustinLightSidekick in advance.

About these ads
This entry was posted in Christmas, Technical. Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s