Neopixel LED Skirt (motion Triggered)

by maketvee in Circuits > LEDs

48924 Views, 465 Favorites, 0 Comments

Neopixel LED Skirt (motion Triggered)

title.jpg
LED skirt twitter.gif
LED Skirt Neopixel WS2812 DIY Arduino motion detection
fire_wide.jpg

After searching for quite a while for a joint project together with my girlfriend, who is a pro in sewing, we finally made this Neopixel skirt together and it came out great. So it's time to share it with the instructables community.

The skirt has the following features:

  • 120 addressable LEDs arranged in 6 vertical strips (20 each)
  • all LEDs are controllable with only one data pin by an Arduino controller
  • 6-axis motion sensor to detect movements and rotations
  • powered by a USB battery pack for full day usage
  • Electronics are invisible when turned off
  • only LEDs installed at the front of skirt to make it daily usable (sitting, driving, etc.)

This project was inspired by Debra Ansell (https://www.geekmomprojects.com) and Becky Stern (https://beckystern.com/).

Supplies

Sewing part:

  • 3 sorts of fabric, amount depends on sewing pattern and size
  • Velcro (0.5 m), approx. 10mm wide

LEDs and electronics:

Material Selection and Pattern Design

P1000636.jpg
P1000242.jpg
P1000243.jpg
P1000244.jpg
P1000245.jpg

There are different options for the skirt itself. Either you can use an existing skirt and add LEDs, or start with a sewing pattern (3rd party or your own) and adapt it to the needs of the LEDs. Because body sizes and color tastes are different, it is not possible to provide an all purpose skirt pattern, but I will share the design ideas used for this skirt project.

A panel skirt design with 3 textile layers was used:

Top (outer) layer:

Semitransparent textile out of polyester for LED diffusion, in this case it's a blue textile with some nice structure increasing the diffusion effect. The darker this layer is, the better it hides the LEDs when they are switched off.

Mid layer:

Simple white cotton (color doesn't really matter) holding the LEDs and Velcro tape and guiding the cable in the waistband. This layer also is used for the back pocket inside the waistband.

Inner layer:

White lining polyester fabric to reduce resistance esp. during walking so the mid layer with the LEDs is less folded.

Sewing

P1000250.jpg
P1000252.jpg
P1000319.jpg
P1000321.jpg
P1000326.jpg
P1000325.jpg
P1000327.jpg
P1000324.jpg
P1000605.jpg

6 panels are sewed together for all 3 layers and are attached to the white dual layer waistband. Inside this waistband the cables are guided. To hold the cables in place, snap fasteners are used to hold the waistband together. A color matched zipper on the of the waistband helps with putting the skirt on.

The pocket at the back of the skirt for the battery, controller and sensor is attached to the waist band and a button hole inside the pocket is used to guide the cables inside the inner part of the waistband.

The panel skirt design is an ideal choice for an LED project, because it is easier to handle smaller pieces of fabric while preparing them for the LEDs. To hide the cables and LEDs, the outer layer should be approx. 1 cm longer than the mid and inner layer to hide the white fabric at the skirt’s hem during walking.

LED Integration

P1000587.jpg
P1000329.jpg

First of all, the LEDs are only installed at the front of the skirt to make it more usable. Especially sitting down or using the restroom is much easier without breaking LEDs or cables. The LED strips will bend over time, but if they are only placed on the front, it is much easier to bring them back into shape.

Nevertheless if you want to build a skirt with a 360° coverage, just add strips and fasteners at the back and follow the described wiring and installation procedure. It could be also an option to have a removable part at the back to either use it in a front-only daily configuration or a full coverage party configuration.

Standard addressable LED strips have double sided tape at the backside to glue them directly on the surface. For the skirt integration, this wasn't an option because the skirt itself should be washable. The LED strips including the cables should be removable to take them out before putting the skirt into the washing machine.

Therefore, small pieces of Velcro were used to attach the strips to the skirt. The Velcro is sewed to the mid layer of the skirt using the softer side of the Velcro to take care of the outer textile during washing.

The Velcro is cut into 2x1 cm pieces and 4 pieces are used for every LED strip. The LED strips for this skirt are approx. 33 cm long (20 LED of a 60 LED/m strip). Depending on your skirt design and length, you have to adapt the number of LEDs and positions of the Velcro accordingly. The 4 Velcros were placed at the 1, 7th, 13th and 20th LED and marked at the white mid layer.

Either you can sew the Velco to the panels before or after sewing them together.

LED Stripe Preparation

figure_e.png
P1000334.jpg
figure_g.JPG
P1000579.jpg

Main concept is to use as less cables as possible and especially use only one data line for all 120 LEDs because they are addressable. So the easiest way for such a design is to wire the LEDs in a zig-zag pattern. This means, that every end of a LED strip is connected to the beginning of the next strip starting from the upper left, then bottom-up and so on. Most addressable LED libraries support such kind of wiring, so it is easy to compensate this zig-zag pattern inside the software. For the skirt the only drawback is the need of placing some wires in the skirt's hem. If you want to avoid this, you have the option of using multiple IO-Pins of the Arduino and drive the strips separately from the top (waistband).

For different reasons it is preferred to solder the LEDs together before installing them to the skirt, you can test them before the installation and also handling is much easier. Wire length has to be adapted to the skirt design, but the wiring diagram shows the simple wiring where all strips are connected to the power lines at the top and only the data line goes zig-zag as described. Shrinking tube is added at the top to prevent the wires from binding at the solder points.

Testing can be done with any Arduino board and e.g. the Neopixel library from Adafruit. There is a great guide how to control addressable LEDs (Neopixel): https://learn.adafruit.com/qt-py-and-neopixel-leds

Finally, the Velcro is attached to the LED strips at the 1st, 7th, 13th and 20th LED matching the positions described in the previous step. Just remove the protection of the double sided tape in the region, where you want to attach the Velcro, and cut out 2 cm for attaching it to the strips. On the strip side, the rough Velcro side is used.

LED Cabling and Installation

P1000576.jpg
P1000583.jpg
P1000586.jpg
P1000613.jpg

All six strips are now fastened with the velcro tape and the cables are guided to the waistband. The connector end of the cable is threatened through the buttonhole in the back pocket. At the skirt's hem, the three bottom connections are fastened by folding the end of the mid layer to the outside and sew it together to hold the cable. These cables should be long enough to bend during walking without pulling the strips.

Controller and Sensor

figure_i.png
figure_j.JPG

Driving 120 addressable Neopixel LEDs can be done with pretty much every Arduino board available. And even if most of them are using 3.3V and addressable LEDs are rated for 5V, it works fine in most of the cases powering the LEDs with 5V from the USB and using the 3.3V level output of the Arduino. If this doesn't work for you, you can use either a 5V Arduino board or a level shifter IC.

Because of the limited space in the skirt, a small Arduino board is preferred. In this case, a QT Py board from Adafruit was used, which can be either programmed with CircuitPython or Arduino IDE. The examples here are based on Arduino IDE, so they can be used with other board and LED strips with minor changes.

To trigger LED effects with motion or rotation, a sensor board is connected to the QT Py using the STEMMA/Qwiic connector. You can buy pre-crimped cables for this connector. It is using the I2C protocol and the used sensor LSM6DSO32 provides a 3-axis accelerometer and 3-axis gyro supported by Arduino-IDE via the Adafruit library.

The LED strip is connected to PIN A3 of the QT Py board (Figure I). As a connector the cable, which was originally pre-soldered to the LED strips, is used. This makes it easier to unplug and remove the electronics from the skirt for washing. So, no additional connectors are necessary to solder and finalize the electronics for pocket installation.

Battery

P1000589.jpg
P1000592.jpg
figure_k.JPG

The QT Py and LEDs are powered by a standard USB power (this one has 5000 mAh capacity). This seems to be more than enough for a full day use if you are not using effects lightning all LEDs at the same time and by adapting the brightness of the LEDs. The pocket size at the back of the skirt is designed to nicely fit the power bank and the QT Py/sensor. For turning the LEDs on, you just have to plug in the USB into the power bank.

Programming and Source Code

Bildschirmfoto 2021-07-04 um 17.28.58.png
title.jpg
figure_o.png

As mentioned, Arduino C++ environment is used instead of Circuit Python, but depending on your background and preferences, both will do the job. If you use Arduino C++, you can either use Arduino IDE or PlatformIO combined with Visual Studio Code. In my Github, there are examples for both environments available.

To address the 6 strips as single virtual strips the library from ArminiusM was used. It also has a great set of effects like the meteor effect and the bouncing ball effect which works absolutely great with the motion sensor.

To setup your Arduino IDE for the QT Py, please follow the instructions on the Adafruit website.

Examples

sequence.jpg
Bildschirmfoto 2021-07-04 um 18.00.12.png
figure_q_1.jpg

As mentioned, the source code for the examples is available at my Github.

Meteor:

Meteor rain with color change. The 6 strips are defined as virtual strips and a meteor effect is assigned to every strip. Effects are restarted continuously and the color is changing with every cycle. Color is synced between all strips.

Fire:

Just a nice fire effect starting from the bottom of the skirt and generating some hot and dynamic illumination. Sets you on fire ;-)

Bouncing ball:

Again, every strip is used as a single virtual strip and bouncing ball effects with different delay are assigned to the strips. The accelerometer is used to trigger the start of the effect, so every time you are jumping up, the bouncing balls are started until they bounced back to the bottom of the skirt. With every trigger, color is changed or a rainbow configuration coloring is used.

Final Result

LED Skirt Neopixel WS2812 DIY Arduino motion detection

Just check out the video. Already working on rotation effects, but still not finished yet. So check my Github or follow me on twitter to get updates about this projects. And if you have any questions, just leave a comment or send me a message.