Make clothing that lights up when you move! This is a sewing (no soldering) FLORA project using 12 color-changing NeoPixels and the FLORA accelerometer/compass module.
Spikes in the sensor readings cause the pixels to flash and sparkle. The pixels are sewn to the skirt’s lining and are diffused by the outer layer of fabric, whether it be a sheer overlay or a cutout lace design. If a skirt doesn’t appeal to you, use this circuit and code on a hat, a belt buckle, or even a blinky dog collar.
Note: This project was excerpted and modified from the book Getting Started with Adafruit FLORA.
Select a skirt and start planning where your pixels will go. The Sparkle Skirt diagram shows how you can connect all the parts of this circuit.
Each component connects to the FLORA main board as follows:
Accelerometer:
- GND → GND
- SCL → SCL
- SDA → SDA
- 3.3V → 3.3V
Array of NeoPixels:
- Vcc (Power) → FLORA VBATT
- IN (Data Input) → FLORA D6
- Gnd (Ground) → GND
Since the conductive thread has nontrivial resistance, pay close attention to the extra connecting power and ground lines on either side of the skirt—they will help your colored lights shine to their full potential.
Lift the outside layer of the skirt away from the lining (The pixels will shine through the laser-cut top layer). If the layers are attached with small threads, snip them.
Place your components on the front of the skirt lining according to the diagram. We’ll do the back pixels separately, after all six of the front pixels are working.
Lift each component and make a mark with a water-soluble marking pen (or just use a very fine tip permanent marker to make a tiny dot), as shown in Figure 6.
Begin by tacking the FLORA main board to the skirt lining with regular thread (Figure 7), using two unused pads (3.3V and the GND opposite it are good choices). Set up the fabric in a large embroidery hoop.
Stitch the four connections between the FLORA main board and the accelerometer board (Figure 8).
Seal your knots and trim the thread tails at the back (Figure 9).
Then begin stitching to connect your pixels’ data pads (marked with inward- and outward-facing arrows) from FLORA pad D6 (Figure 10).
Knot, seal, and clip the ends of the threads, being careful to avoid unintended connections (aka shorts), as in Figure 11.
Using one extra-long piece of conductive thread, stitch the power bus for the six pixels on the front of the skirt (Figure 12). Repeat with another for the ground line (Figure 13). Make sure to test these pixels first, as described in the next section, before connecting more on the back.
Don’t power up your skirt until you’ve checked for shorts! Double-check that your tails are clipped and your skirt is lying flat on a nonconductive surface. Never stitch pixels with the power connected, and never connect power with the skirt bunched up in your lap!
Code and BatteryTriple-check that all your conductive thread tails are trimmed and your skirt is lying flat on a nonconductive surface, and then connect your FLORA main board to your computer with a USB cable, as shown in Figure 14.
Open the Adafruit Arduino IDE. You will need the NeoPixel library for this next step, which comes preloaded with the Adafruit Arduino IDE and Codebender.
First, test out all six pixels by uploading the sketch in: File→Examples→Adafruit_NeoPixel→strandtest. If all of your pixels light up and change color, you’re good to continue to the back! Disconnect the USB cable before stitching more pixels on the back of the skirt.
To test the accelerometer, you’ll need to install the Adafruit Sensor library as well as the unified LSM303DLHC library. You can test out the accelerometer by uploading the sketch in File→Examples→Adafruit_LSM303→Test. Open up the serial monitor and watch for changing motion values.
When you have pixels on the front and back of the skirt, place a piece of scrap fabric in between them for testing (so they don’t touch and short each other out), or put the skirt on a (nonconductive) dress form. When you’re wearing the skirt, your body will keep the front and back from touching.
If your skirt has lots of folds, you may have trouble with your pixel connections shorting out against each other. You can insulate them under a piece of ribbon, wear a slip under the skirt, and also add some wobble to your pixel line so when the skirt folds, traces aren’t up against each other.
To add sparkle to your skirt, copy the following code into your Adafruit Arduino IDE and click Upload. You can specify the colors in the myFavoriteColors
array, and if you’re not getting any reaction to your movement, you can adjust the sensitivity by setting MOVE_THRESHOLD
to a lower number.
You can also download the code from Adafruit; there are two versions of the code on that page. The first one uses the older Adafruit_LSM303 driver. The second one requires you to install the drivers listed earlier in this section. Make sure you use the version that matches the libraries you’ve got installed. The second version is attached to this project.
Use a scrap piece of coordinating fabric to sew a small battery pouch. We doubled ours over, used the sewing machine to stitch in an L, then clipped the corner and turned the pouch right-side out (Scrap fabric battery pocket).
Stitch the battery pouch to the skirt lining with regular thread in a place nearby the FLORA main board.
Wear It!
Wear your new flashy skirt to your next party or out dancing, make one for each bridesmaid, and be sure to document and share your creations online! Change the colors to match the rest of your outfit or suit the occasion.
Becky Stern

Comments
Please log in or sign up to comment.