home     about     portfolio     shop     sponsor    

Wearable Soft-Circuit Music Visualiser

This project was meant to be a continuation of my last project, the hanging wall music visualizer. My goal was to work out some of the problems I ran into on the wall visualizer.The main issue I wanted to solve was finding a way to power a large amount of LEDs all at the same time.

Creating the Design


Powering the LEDs

My first step concerning the circuitry was googling “how to power many LEDs with an Arduino”. I came across a few different solutions and thought that this one at umass.edu might work for me. I tested two sets of 4 LEDs out on the breadboard and they all lit up fully at the same time. This seemed promising so I started planning out how I would sew it onto the corset.

I sewed one LED on in this fashion, tested it and it worked. I attached the rest of the 4 LEDs in the row, tested it and none of them worked.

At this point I was frustrated with my lack of knowledge or experience in circuitry. I finally went in to see my new media advisor and he guided me in the right direction. He told me the basic order I should try to figure my circuit out:

  1. What circuit and power source do I need for the 50 LEDs?
  2. What relay and circuit should I implement to let the Arduino control the flow of power to the LEDs.
  3. Build one rib circuit and test it.
  4. Build the rest of the ribs.

I was so relieved to find someone that I could go to for help on electronics projects! This helped me so much. He told me which method to use to get my circuit working: use the Arduino to control transistors (as switches) to let the outside power source flow through the LED circuit.

I set out to find a good circuit to power 40+ LEDs. After looking at a Instructables for wiring LEDs in Parallel and as Series, I ended up designing my circuit as 10 series (of 5 LEDs) wiried in parallel.

This is one of the rare occasions where I actually calculated voltage and current! :o You can tell how much I really wanted this to work, haha..

Here are some of my calculations:

  • Each LED: 2.2-3.8 volts (average of 3V), 0.044-0.076 watts (average of 0.06 watts)
  • R = (9V -(4x2.2))/0.044A to R = (9V -(4x3.8))/0.076A
  • At most I would need a 4.545 ohm resistor

After searching through many many examples of using tranistors as switches (and burning myself a couple of times), I finally ended up using this page by Paul’s Electronics. I think my main problem was not knowing which end of the transistors to connect to ground and which to power..

Here’s a photo with all 10 series, in parallel, each with a transistor connected to an output pin.

Laying the Circuit Out

Now that I knew what type of circuit I was constructing, I had to figure out a way to sew it as a soft circuit. This meant that I wanted to find a way to have minimal overlapping of connections, as well as have traces far enough apart so that they don’t accidentally touch eachother when the corset moves, otherwise the circuit might short.

I went through quite a few drawings.. here’s my initial drawing (from before I figured out the circuit with an outside battery source):

Finally I reached a point where I was pretty sure of what I was doing. ;p

I couldn’t completely avoid crossing any threads, so I used normal insulated wire to cross over the thread when it was necessary.

Arduino Code

I used this Led VU Meter code as a base and modified it to fit my ribcage design. My main alteration was to map different volumes to different ribs.

// EDITED version of Led VU Meter Example (Written by

//James Newbould)

int led[10] = { 3, 2, A3, A4, A2, 6, 8, 9, 12, A0}; // Assign the pins for the leds
int leftChannel = 5;  // left channel input
int left, i;

void setup()
{
for (i = 0; i < 10; i++)  // Tell the arduino that the leds are digital outputs
  pinMode(led[i], OUTPUT);
  Serial.begin(9600); // Uncomment to enable troubleshooting over serial.
}

void loop()
{
left = analogRead(leftChannel);  // read the left channel
//Serial.println(left);  // uncomment to check the raw input.
//left = left / 10;    // adjusts the sensitivity
Serial.println(left);  // uncomment to check the modified input.
//left = 1500;  // uncomment to test all leds light.
// left = 0;    // uncomment to check the leds are not lit when the input is 0.

/*
  if (left == 0){  // if the volume is 0 then turn off all leds
   for(i = 0; i < 10; i++){
     digitalWrite(led[i], LOW);
     }
  }
  else{
   for (i = 0; i < left; i++){ // turn on the leds up to the volume level
     digitalWrite(led[i], HIGH);
    }
    for(i = i; i < 10; i++){  // turn off the leds above the voltage level
      digitalWrite(led[i], LOW);
     }
  }
  */

  if(left>100){
    left = 0;
  }

  if(left <= 0){
     for(i = 0; i < 10; i++){
     digitalWrite(led[i], LOW);
     }
  }
  if(left >0 && left <= 20){
    digitalWrite(led[0], HIGH);
    digitalWrite(led[5], HIGH);
  }
  if(left >20 && left <= 40){
    digitalWrite(led[0], HIGH);
    digitalWrite(led[5], HIGH);
    digitalWrite(led[1], HIGH);
    digitalWrite(led[6], HIGH);
  }
  if(left >40 && left <= 60){
    digitalWrite(led[0], HIGH);
    digitalWrite(led[5], HIGH);
    digitalWrite(led[1], HIGH);
    digitalWrite(led[6], HIGH);
    digitalWrite(led[2], HIGH);
    digitalWrite(led[7], HIGH);
  }
  if(left >60 && left <= 80){
    digitalWrite(led[0], HIGH);
    digitalWrite(led[5], HIGH);
    digitalWrite(led[1], HIGH);
    digitalWrite(led[6], HIGH);
    digitalWrite(led[2], HIGH);
    digitalWrite(led[7], HIGH);
    digitalWrite(led[3], HIGH);
    digitalWrite(led[8], HIGH);
  }
  if(left >80){
    digitalWrite(led[0], HIGH);
    digitalWrite(led[5], HIGH);
    digitalWrite(led[1], HIGH);
    digitalWrite(led[6], HIGH);
    digitalWrite(led[2], HIGH);
    digitalWrite(led[7], HIGH);
    digitalWrite(led[3], HIGH);
    digitalWrite(led[8], HIGH);
    digitalWrite(led[4], HIGH);
    digitalWrite(led[9], HIGH);
  }
}

That’s all the info for now, I’ll try to fill in with more details later! :] Here’s a photo of me wearing the corset at Engineering Open House last weekend. c;

Blog comments powered by Disqus