(Pictures are forthcoming: Apparently they’re hard to find. Also, if anyone wants to upload the video to YouTube please feel free as long as you send me a link. My host is dreadfully slow and I have limited bandwidth. You’ll have my appreciation.)

This all started about a year ago, but first, you may be interested in the video of what happened a little over a month ago. It’s large and not streaming (shame on me), and it doesn’t really do the project justice, but it’s what I have available right now:

About a year ago, a friend of mine came to me and asked me if I was familiar with the new Battlestar Galactica and the Cylons it contained. I said I was, and she told me that it was her desire to replicate the glowing back effect of Cylons at the next convention she would attend. I was quick to point out that there would be hard limits to a project like this, that BSG had the advantages of tons of CG and no “live” shots, but that it was certainly within the realm of technology, given certain assumptions. I was recruited on the spot, and have since learned it is much easier to say something cannot be done than to say it can be done and be stuck having to prove it.

For those who aren’t familiar, the glowing back effect resembles a chasing Christmas lights, running from just shy of the nape of the neck to just shy of the base of the spine. The lights fade in and out during the chase, with a run time of about a second and perhaps a 1-2 second off time. I didn’t capture more specific timing information because when the tolerances of the project were discussed precise timings were considered unimportant.

What was important, though, was miniaturization. My friend wanted to wear this device and not have it look like a person hauling around an electronics project on their back. Fortunately, we were able to settle on modest requirements: The timing wasn’t critical, the battery only needed to have a few hours run time between charges and we agreed that six different fading channels were sufficient for the prototype. This allowed me to use the venerable ATMega168 line of microprocessors, which not only had all the features I needed but was the micro I was most familiar with at the time. It can symmetrically drive 40mA per channel and had a maximum chip current of 200mA. With six channels and one LED per channel that amounts to 20mA per pin and 120mA in lights if they are all on full power, which leaves plenty of current overhead for the micro. Still, if the project grew the 200mA chip current could be reached quickly. This was an easy limit to skirt, however, as the micro could be wired to drive transistors instead of LEDs.

From the start, it was clear that the project would need to be broken down into multiple physical elements: The human back is a curvy, stretchy surface in flux. I decided that it would be best to use PCBs to support the electronics (for consistency) and wire them together. This would not only allow the body to move more freely while maintaining the alignment of lights along the spine, it would allow additional channels to be added or extra lights to be added to existing channels. Each of these light boards were given an LED, a current-limiting resistor and a spot for a MOSFET, in case I ran in to current issues down the road. I designed the light boards with multiple signal traces and jumper points, so that all the light boards could be built off of one PCB pattern. The intention was to save money on the prototype: I wouldn’t be charged for multiple designs, and I could order fewer extra boards for spare parts if they were all interchangeable. As it would later turn out I could have made each board unique and it wouldn’t have cost me extra, but making the spare parts universal is still compelling. We chose to use a 9V battery, because it was easy. The design could just as well have been based off of, say, four AA batteries (and it would have been better) but I had 9V batteries and terminals lying around, so it was the most convenient prototype choice.

The light boards flank the driver board, which itself contains an LED and current-limiting resistor. The driver board also housed the ATMega168, signal, +5V and ground breakouts for the other boards, an ICSP programming jack, power and reset switches and 5V power regulation circuitry with a PTC for current limiting should a short occur while the device was on my friend. I was concerned with keeping the device from frying, but as it would turn out there are certainly human risks to even 9V battery powered applications. All of the parts were through-hole parts, as I was not adept at surface-mount techniques and I wanted to be able to work with the prototype at Con and repair or replace parts if necessary. Because of the last-second nature of the final design work, this turned out to be invaluable. If it weren’t for the micro being a chip in a socket, I would never have been able to make the project light up for the Con. That did mean I was stuck soldering wires to chips at a small table in a hotel room full of people, but where’s the challenge in working in my ideal shop?

Originally, the plan was to put the whole thing on an insulative, flexible material so it would serve as a single-unit prosthetic. We looked at several materials, including Kevlar, but in the end the prototype came down to the wire and the boards were each affixed directly to my friend’s back with latex. Since the boards were populated with through-hole electronics, the insulative material was intended to prevent the wearer’s back from creating alternative paths for the electricity, especially as the back got sweaty. Honestly, this was more intended to conserve battery life and prevent conditions dangerous to the electronics. However, as it turned out this is also a safety concern for the wearer.

As far as making the lights blink, I decided to use the 6 PWM channels in software. I had originally designed some pseudocode that would adjust for the nonlinear eye response to light levels and permit careful time adjustment. I had even considered using an ADC and a small pot to adjust the length of the run and the duty cycle of the effect, but my friend assured me this level of accuracy was not required and she wouldn’t be taking the time to make the lights perfect. So, I fell back to a simple loop which kicks off the first light, and at a predetermined point in the cycle of the first light kicks off the second light. This cascades all the way down until the sixth light is started. Then, after the sixth light fades out a delay timer is run to keep the lights off for a brief period of time, roughly one second. For diagnostic purposes, at power-up (or on reset) the driver board sets all lights to full brightness for one second.

Having a solid design, I went to the work bench and tried to put together a breaboard prototype. The first task was to replicate some sample circuitry I had to program the chip and make sure that none of the ICSP signals would have an impact on the operation of the circuit and vice versa. Fortunately, the spec sheet seemed to indicate everything would play nicely in my application, and I was able to move on to wiring up some LEDs and writing the actual code in C. As you may know, making lights blink isn’t the most difficult thing in the world. I did spend some time tweaking the timing of the cascade effect, length of period and duty cycle, but nothing crazy. It was all rough guesstimates based on the micro’s internal clock and minor adjustments to get it in the middle of our very loose tolerances. I sent a video to my friend, and got a quick, excited thumbs up to proceed.

I designed the prototype with components lying on my bench. Most of these components ended up being used in the final product, but I made a particularly spirited search for better LEDs. I wanted a set high-brightness (high-efficiency) red LEDs with a wide angle along the spine. While it wasn’t hard to find what I wanted, I did have to narrow my selection down from the 24,000 LEDs Mouser had in its catalog. I settled on one that looked particularly promising, and picked up some spare parts (a few extra micros, a oltage regulator and some header pins). The new LEDs were awesome, much brighter than the ones I had gotten for some ridiculously low price by the handful at some hamfest or another. Also, they distributed their light in a way that was a much better fit for the project. With my component choices made, I moved on to the PCB design.

I designed the boards and sent them off for production through BatchPCB. When I received the boards a month later I realized I had used vias far too small for solder points. This turned out to be a major problem when attempting to wire the boards together and prevented me from making good mechanical joints the way I had intended. However, everything else on the boards came out as intended and I was able to throw together a prototype to ship out to my friend. For reasons still unknown to me (perhaps not enough sleep and/or coffee) I used solid wire to rig the boards together. This coupled with the poor mechanical connections and the flexibility requirements of the boards caused constant frustration, though small-gauge (I think I used 26 AWG) wire fixed that problem. I took a video of the working rig, and shipped it off.

The video was a hit, and I was glad to have the rig off of my desk. Of course, the problem with the solid wires reared its ugly head as soon as the rig was unpacked from the box. I was on the other side of the country, and when I was told about the rig being broken my heart sank. I knew that I had used the wrong type of wire, and that my friend wasn’t going to get to enjoy it until that was fixed. I suggested resoldering it with stranded wire, but the help she was able to recruit stuck with the solid wire that came in the box. I’m not sure if it was laziness or cheapness that spurred that decision, but getting someone to volunteer to fix something they didn’t make is a pretty big accomplishment and so I can’t be too harsh a critic. Besides, if I had just taken five minutes to think about it, I could have avoided the entire problem by choosing the right wire from the get-go. This became a significant problem, because the rig kept breaking and my friend was not able to do any trial runs with it. I had to pack up my workbench and work on it in the hotel room at the convention, and that was the first time it ran for anyone except me. The design considerations allowed me to fix a bunch of things and choose more significant solder points, but it did mean some judgement calls had to be made. For example, the boards were applied directly to my friend’s back with latex instead of to an intermediate, insulative material. I cautioned that it could have an adverse effect on battery life, but we had extra batteries and were losing valuable Con time.

Once the rig was attached and running, and the model “made up” for Con, the result was amazing. The video we took does not do it justice, and it garnered attention for nearly twelve hours straight. The nice yet frustrating part about the costume was it went by without notice most of the time. The idea was to make something that blended in, that the person pretending to be a Cylon would never be noticed if the lights were off and would only be noticed by those who knew what to look for. To that end, it was a success, but it’s always nice to have your work recognized. Blending in and standing out were at odds, but I was still happy with the result.

We were able to take a lot away from running the prototype, and are well on the way to producing a full-fledged version. This new, improved version will use all surface-mount components, more permanent connectors and all of the knowledge we put together in building and running the prototype boards. As more progress is made and the final product is eventually unveiled, I will try to keep everyone posted.

I do want to take this time to give a word of warning, however. Electronics, even microelectronics, and bare skin do not mix. You may be familiar with licking 9V battery terminals and think that placing an electronics rig on your back may not be a big deal. After all, your tongue probably survived with no discernible damage. Electricity is a fickle mistress, however, and it can bite hard. My friend got a really nasty, although small and not painful, burn on her back where she provided a relatively low-impedance path near the power connections on the board. While it doesn’t prevent my friend from doing…well, anything, really, it still is likely to leave a permanent scar. This was a series of bad choices, and in the next version we are taking special care to address those choices with multiple levels of failure safety. Even in the event of a short-circuit, the new version has no more chance of carrying a current through the user than an average wristwatch (and probably less). We took our chances on safety, and my friend got burned. This is why you shouldn’t play around with electronics if you don’t understand them, and you should be careful and play it safe even if you do. No shortcuts. That is, also, why I will not post the actual schematics or code for this prototype. If you understand electronics, the information here should be more than sufficient to replicate this in short order. If you don’t understand electronics, you really should be waiting for someone to develop a solid product before strapping batteries to your skin. Prototypes, especially prototypes where safety shortcuts were inentionally taken, are not solid products.

Thanks for reading, and I hope you enjoyed seeing how I built the prototype costume. I will be happy to answer any and all questions by e-mail or IM, but please read the FAQs first. There aren’t many of them, and it really puts me in a sour mood when I have taken the effort to make the answers so readily available.