LED SKIRT
- Emilia Syvertsen
- Nov 13, 2023
- 4 min read
Updated: Jun 9, 2024
This post is going to be about...my LED SKIRT
Hi again.I'm so excited to show you how to make an led skirt.So there are 11 main parts. CHOOSE YOUR FABRICS, SEW THE SKIRT , VELCRO, CABLE SLOT, POCKET, ATTACH LEDS TO SKIRT, CONTROLLER AND POWER SUPPLY, PROGRAMMING, PROGRAMMING CONTINUED, UPLOAD THE CODE.
CHOOSE YOUR FABRICS
The skirt itself consists of 3 layers:
OUTER LAYER: Blue top layer of semi-transparent polyester for diffusion. The darker the color, the better it hides the LEDs when you it switched off.
MID LAYER: White cotton holding the LEDs and Velcro and guiding the cable.
INNER LAYER: White lining fabric to reduce resistance.
SEW THE SKIRT
A panel skirt design based on 6 panels is attached to a waistband. The waistband lays flat and close fitted on the waist. There’s a zipper on the side. The pocket for the electronic stuff is attached to the waistband on the back of the skirt. A panel skirt design is a good choice for this project; it’s easier to handle smaller pieces of fabric while preparing them for the LEDs.
VELCRO, CABLE SLOT, AND POCKET
For fastening the LED strips to the mid cotton layer, you’ll cut 24 pieces of Velcro 2cm×1cm. The soft, fuzzy “loop” side is sewed to the mid layer, 4 Velcro pieces per LED strip. Using the soft side here is important to avoid scratching the fabric during washing.
Depending on the length of your skirt, you can decide how many LEDs you want to integrate. We used 20 LEDs per strip, so each strip is about 33cm long. Two Velcro strips are placed at top and bottom, the other two in between. We attached the Velcro before assembling the full skirt, but it’s also possible to add it afterward if you use an already existing skirt.
ATTACH LEDS TO SKIRT
Place the LED strips on their desired positions and fasten with the Velcro. Route the cables through the waistband, and the guide the wires at the skirt’s hem in the closure.

CONTROLLER AND POWER SUPPLY, Connect the electronics as shown in the wiring diagram. The LED strip’s signal wire is soldered to pin A3 of the QT Py board.
The cable connectors that are originally pre-soldered to the LED strips can be reused to make it easier to unplug and remove the electronics from the skirt for washing.
To power the QT Py, you can use a standard USB power bank. 5000mAh seems to be more than enough for a full day’s use if you’re not using effects that light all the LEDs at the same time. The power bank and the QT Py and sensor nicely fit into the pocket at the back of the skirt. Plugging the QT PY’s USB into the power bank will power up the LEDs.

PROGRAMMING
You can use either CircuitPython or Arduino IDE to program the QT PY board. We used Arduino IDE in combination with Visual Studio Code and PlatformIO, so that we could include a special library which can easily divide an LED strip into multiple segments to control them as if they were wired as a single strip. It generates “virtual NeoPixel strips” so you can directly use existing lighting effect examples and libraries that are widely available for Neopixel LEDs.
Let’s take a look at the code. To show the use of the 6-axis sensor, we’ll look at the “bouncing ball” animation effect. Other effects like “meteor rain” or “fire” — and all future examples — are available at this project’s Github repository.
At the start of the code , libraries for the LSM6DSO32 sensor and the LEDs are included. Also, the QT Py’s pin A3 is defined as LED output as described above. If you have a different LED arrangement or number of strips, you can change MAXPIXELS and NSTRIPES accordingly.
Lines 15–20 define the virtual strips with a start and end pixel for each strip. For example, vNeo1 is the first strip of LEDs, with the start pixel 19 and the stop pixel 0 to address it from bottom to top, even if the signal comes from the top side. Because of the serpentine layout, vNeo2 as the second strip is oriented in the opposite direction, so start pixel is 20 and stop pixel is 39.
Line 23 defines an array bballs[] of the type npBouncingBall objects and assigns it to the different virtual strips. This is the effect object coming from the np.BouncingBall.h library.
After declaring the used variables, the sensor and LEDs are initialized in the setup() function. Sampling rate andange for the accelerometer are also set and can be changed here if needed.

PROGRAMMING CONTINUED
In the main loop(), line 57 updates the sensor data and the array diff[] is calculated as the absolute difference between the last acceleration sample and new sample for all three axes. We’re only interested in the acceleration change and don’t care about the static offset value based on the gravitational acceleration. Using all three axes also makes the calculation independent from the orientation of the QT Py board in the skirt pocket, so we don’t have to worry about that. Line 68 updates the effect continuously. If the effect with the shortest delay has finished, line 70 checks for a new trigger based on the sum of the axis’s differences and the previous defined motion threshold. If the threshold was hit, the effects are restarted on all bouncing balls. The code shown here changes the color continuously during the effect; if you prefer fixed colors, you can uncomment lines 72 and 78. This changes the color only for every new bouncing effect cycle.
Of course, this is a simple example of motion triggering because it’s using all the axes; you can trigger the effect by jumping, spinning, starting to run, whatever. If you prefer a single-axis trigger, you can fix the orientation of the sensor in the skirt pocket (or you can determine the orientation by software using the g-offset and doing some coordinate transformation to find the true z-axis).
UPLOAD THE CODE To flash the code to the QT Py microcontroller, just follow Adafruit’s guide. There you’ll also find all the information you need if you want to use CircuitPython instead of Arduino IDE.
here is the link to the pdf I used:
Commentaires