Shiny Shirt

Shiny Shirt

Ever since I found out about wearable Arduinos like the Lilypad and Flora, I knew I had to make _something_. I went around the internet and saw tutorials for all kinds of blinky LED things like tiaras, cyborg style face jewelery, and light-up skirts. So after some brainstorming the idea is to make a motion-sensitive dress, which does some dim ambient glowing when you’re sitting/standing still, and lights up brighter when you move faster. I have a black lace-based dress in the back of my closet that seems excellent for the first proof of concept. It has large opaque areas in the lace to hide the sensor, main board etc. while the LEDs can show through the gaps. And it has a pretty sturdy lining fabric that the electronics can be attached to.

Step 1: Shopping
Most projects I’ve seen use conductive thread as wiring, that is sewn into the fabric. I’m not entirely sold on it as it looks a little clunky, so I’m also ordering some regular black insulated wire that I could hand stitch onto the fabric if needed. An accelerometer (=movement sensor, kind of essential if you want to do a movement-based effect). Then of course LED sequins en sewable neopixels (these are really neat RGB LEDs that you can control individually through a single input if you string them together). And a microcontroller on a board; I didn’t know exactly what the final design would be, and I got a little carried away on my shopping spree, so I ordered the Flora (the ‘default’ wearable board from Adafruit), Gemma (a smaller, lighter, but also less advanced Flora), and a Circuit Playground Express (bigger, fancier, all kinds of on-board sensors and lights, but not as washing-proof as the others). Because, you know, I’ll use them all eventually? Right?

Step 2: Proof of concept
The first point to work out was the accelerometer. After alligator-clipping it to the Flora and installing the software library for it, I was able to get (e.g. if you hold the sensor upright it will show ~10 m/s of acceleration on the Y axis because gravity)
To detect movement I had the script run in a loop, each time remembering the previous round’s sensor values and calculating the difference with the new values. I just added all the differences together and called that my total ‘movement’, to be used to set the brightness of the lights. The values ranged from around 20 for relatively gentle movement to 70 for sudden jerks.

Testing the accelerometer with some LEDs and the onboard neopixel.

The brightness can be set as a value between 0 and 255, and on that scale, 20 is barely anything but 255 is blindingly bright. After some experimentation I settled on multiplying the movement by 2.5 to set the brightness. The LEDs just work out of the box, and for the neopixels there was another neat library to make controlling them a breeze. So I had a working proof of concept.

The main loop.

Step 3: Layout on the dress
Then I went to grab that lace dress I knew I had. And to my surprise it was white, not black. See, I had bought two of the same dress in different colors, and in my mind I had gotten rid of the white one and kept the black one but reality can be unruly sometimes. I remembered I had some black fabric dye in a drawer somewhere and had a go at bending reality to my imagined truth once more, but the fibers didn’t take the color very well and ended up a sickly greenish tint. Into the garbage bag and back to the drawing board, or rather, the closet.

Shiny Shirt
LEDs laid out on the shirt.

Step 3.1: Layout on the shirt
I found a shirt with an embroidered and sequined front and a slightly translucent fabric that was a perfect fit for the project, and a scrap piece of chiffon that would serve as the lining carrying the electronics. I scattered some LEDs around the embroidery and started to figure out where to put the board and sensor and how to wire everything up.

It became apparent that the movement sensor would likely end up quite far down on the shirt (to make the main board conveniently hide behind a large dot of sequins), and that this would mean it would be dangling and accidentally moving a lot more than I would like. I contemplated moving it up but there was no convenient spot centrally on the design of the shirt and running another 4 wires up somewhere else wasn’t particularly elegant either. This is when I realized that the Circuit Playground Express has an on-board accelerometer.

Step 4: Throwing the Flora out of the window
So using the CPE seems like a pretty good option. Time to transfer my code to it. Except the software library for the CPE that drives all the sensors is not the same as the accelerometer library I’d used on the Flora. There goes another couple of hours converting and then troubleshooting the code.
Overly detailed tip in case you ever need it: If you ever find yourself using the circuit playground library alongside the adafruit neopixel library, call circuitplayground.begin() before calling begin() on your neopixel strip. It won’t work the other way around… Took me a while to work that one out.

Looks very pro…

Step 5: The Final Plan (no, really this time)
Now that the best-idea-so-far proof of concept was working, it was time to work out how this was all going to be attached to the shirt. A couple of considerations:
Based on the layout of the LEDs it was most convenient if some lines were able to cross each other. But doing that with conductive thread isn’t great because it’s not insulated and could make contacts in places where it shouldn’t. So I decided on a combination between conductive thread and the silicone coated wire I also bought (thanks, past me, for hedging your bets).
Also since the CPE isn’t intended to be washable and it’s a fairly expensive board to be tied to only one piece of clothing I wanted it to be removable, using the metal snaps method I saw here ( After buying some snaps, it was finally time to get to work on the final article.

Step 6: Stitching
After marking the positions of the LED sequins on a scrap piece of chiffon I got to work on stitching them down, which was fairly easy. The conductive thread doesn’t hold knots very well though so I sealed those with some clear nail polish.

Gluing down the wire after looping it through the snaps.

Dealing with the coated wire was a bit more of a hassle. In an ideal world maybe I should have soldered them to the snaps but at this point in time the snaps were already stitched in place and heating them up with a soldering iron would have made some nice big melty holes in the synthetic fabric. Instead I stripped the ends and looped them through one of the holes in the snaps, then glued it down on itself and secured further with black electrical tape. Oh well. It works.

For connecting the wire to the neopixels I also decided against soldering and instead created a tiny gap in the coating (like stripping the ends, but in the middle instead). I then ran some of the conductive thread through the contacts on the neopixels and tied a knot into the stripped gap to make contact. I kind of fell in love with this method as it allows you to run insulated wire to your destination, and then easily secure it to both the component and the fabric without interfering with anything else. That also solved the problem of trying to wire on the back of the fabric while stitching the pixels onto the front.

Everything is attached to the fabric.

After the whole thing was attached to the chiffon, I powered it up and after some minor bugfixes (I’d written the proof of concept code with only 1 neopixel instead of the 2 I was using now), it WORKED! Hurray! Then all that was left was to attach it to the inside of the shirt. I secured each of the lights with some hand stitching to make sure that their position within the design on the front of the shirt didn’t change, and finally machine stitched the top of the fabric to the neckline of the shirt.

Step 7: The end result

Very shiny. Forgive the vertical video.

I wore it to a concert that evening and found out that my small battery pack (2x CR2032) would work for about an hour and a half before the voltage dropped too much and I was left with the 2 neopixels permanently stuck on red and nothing else.
I brought some spares, but I will look into better ways of powering this in the future.

Final judgement:

Learniness factor: 4/5 I learned a lot about the technical aspects (e.g. how many LEDs can you power off a single pin), I learned how neat the libraries for both the flora and CPE are, I learned to work with some new materials and how they combine well with old materials. There were some ‘why is it not working’ moments along the way but I always felt like I had realistic ways to troubleshoot or google my way out of the issue.

Coolness factor: 3.5/5 It isn’t a robotic red carpet dress or anything but the effect is honestly pretty neat and it looks intuitive enough that I’m sure it will also be appreciated by people who don’t know or care how it was achieved.

Value: All the parts I ended up using: ~€60. Fishing a battery holder out of my bra to provide my shirt with some extra juice: priceless.