This post is will walk you through some important parts of making your own wearable textiles that light up. To start you'll need a few things. You'll need a microcontroller: for this project I used the FLORA from Adafruit. You will also need some conductive thread, LED sequins, and a slip or other fabric to sew on. It helps if you sew directly into a slip or undergarment, that way you can reuse your dress, just by layering different materials on top of it.

1 2 4 5 8 7 6 3
  1. LED sequins
  2. Slip
  3. Micro-USB cable
  4. Battery pack and batteries
  5. Conductive thread
  6. Embroidery hoop (optional)
  7. Flora (or other Microcontroller)
  8. Needles

Once you have all of your supplies, you can start planning for your garment. Planning it out before you start sewing will save a lot of pain.

It can be helpful to do a small sample circuit before you work on a larger piece to start to understand a bit more about your constraints. To start off we want to make the most basic circuit. I'm not going to go too far into detail here because there are plenty of other fantastic resources to explain how circuits work, and I'm not really an expert. A quick definition of a circuit is a closed loop of electricity allowing a current to pass through from a source of power to ground. When we introduce an LED into this loop, the electricity then passes through the LED and lights up.

Click on the star below to see some detailed instructions about planning your circuit.

Step 1

Place your microcontroller and an LED sequin.

int led = 10;   // Look at your flora, this number corresponds
                // to the positive pin you're connected to.
int brightness =  0;  // start with no brightness
int fade_amount = 5;   // adjust this number to taste
int delay_incr = 15;   // how long to wait between light incr/decr

// the setup routine runs once when you press reset:
void setup() {
  // initialize the digital pin as an output.
  pinMode(led, OUTPUT);
}

void loop() {

    analogWrite(led, brightness);
    brightness = brightness + fade_amount;

    if (brightness == 0 || brightness == 255) {
      fade_amount = -fade_amount;
    }

    delay(delay_incr);
}

Chances are pretty good that you're going to need to cross wires at some point in order to produce a more complex piece. Because conductive thread is not insulated itself (like many wires you may have used), you can put a piece of insulating material in between your thread so it doesn't touch (duct tape or a piece of fabric for instance).

Below is a more complex circuit you can use for yourself.

Step 1

Now you're set to make a much more complicated circuit. That means you'll likely encounter places where the wires must cross. Place an insulating material (like duct tape) between the layers of wire to make sure they don't touch.

I recommend drawing your circuit onto your garment with markers, using three different colors: one for each of your outputs, and a different color for ground. I chose to sew my circuit into a slip which I then wear underneath a dress because it diffuses the light nicely, and means it's versatile and can be worn with any garment. When drawing your circuit in marker be sure to mark the places you'll need to add insulated material so it's obvious when you are sewing. Once your planning is done sew on your first led. It's best to complete a full circuit at this point so that you can debug incrementally. Plug in the battery and flash the code for a single LED provided above. If something isn't working, try changing the LED number to be the onboard LED. If the onboard LED works, then you probably have a crossed wire that you'll need to attend to.

After you've successfully blinked once, chain your LEDs, to get a complex circuit for one individual frequency. Then you can do the same process to add in your second frequency, so that you have two steady pulses, or really whatever pattern you want!

I've provided some rudimentary code below to make the pattern that I use, but it's totally up to you! Now you're done, and now you sparkle!

  // Note: this is all simplified--you'll
  // probably have different output pin numbers
  // Make sure the pin numbers correspond
  // to the ones that you choose.
  int led1 = 1;
  int led2 = 2;

  int brightness1 =  0;   // Start the first frequency turned off
  int fadeAmount1 = 5;
  int brightness2 = 255;  // Start led2 out on full brightness
  int fadeAmount2 = -10;  // Have a different fade amount for
                          // leds 1 and 2 This allows the pins to change brightness at different speeds

  int delayIncr = 15;

  // the setup routine runs once when you press reset:
  void setup() {
  }

  // the loop routine runs over and over again forever:
  // tweak this as much as you want to get the desired effect
  void loop() {
      analogWrite(led1, brightness1);
      analogWrite(led2, brightness2);

      brightness1 = brightness1 + fadeAmount1;
      brightness2 = brightness2 + fadeAmount2;

      if (brightness1 == 0 || brightness1 == 255) {
        fadeAmount1 = -fadeAmount1;
      }

      if (brightness2 < 0){
        fadeAmount2 = -fadeAmount2;
        brightness2 = 0;

      }

      else if (brightness2 > 255) {
        fadeAmount2 = -fadeAmount2;
        brightness2 = 255;
      }


      delay(40);
  }
  

P.S. If you're looking for resources for flashing code onto your device, Adafruit has some great information on getting started with the Arduino IDE. Below is some sample code you can use for your basic circuit to blink from a single output pin.