Goal

I ended up deciding to use the LED strip to liven up my shoes for the 99Fridays party organised this weekend. The LED strip has adhesive backing, allowing me to stick the strip on the shoes.

Electronics



Careful! When using the fab modules, because of widths on some traces, you will want to make the path suing a diameter of at least 0.25 mm.

In order to calculate how much power you need to light up segments of the LED Strip of a certain length, you first need to have the specs of the specific LED strip you're using. I bought mine from Amazon and traced it back to the original supplier LED Wholesalers. This allowed me to figure out which LED is being used and thus that is draws 20mA per section where each section has 3 LEDs. I wrapped the strip around my heel to estimate how many segments it would take. My heel used up 6 segments for a total of 120mA. I found information online that a typical 9V battery has ~500mAh. At a consumption of 120mA, the battery should last a little over 4 hours, an acceptable time for the use in mind. A helpful tip also is to cover the solder connections where wires for the battery and LED strip go with hot glue for strain relief. It is also important to include a current-limiting resistor ahead of the LED strip to avoid blowing out a portion of the circuit. Using Ohm's law we calculate the required resistance from a what we assume to be a 9V 500mA battery.

R = V / I = 9 / 0.5 = 18 Ohm

  • Annotated

Download

Programming

I found the following code from Bildr.org that recreates a simple sine wave on the PWM output pin of choice. The code is well commented and delightfully simple. I just mapped the correct pin number for the Arduino environment using the High-Low Tech guide that David Mellis put together. The sine wave makes fo a smooth pulsating effect that I was looking for.

//////////////////////////////////////////////////////////////////
//©2011 bildr
//Released under the MIT License - Please reuse change and share
//Simple code to output a PWM sine wave signal on pin 9
//////////////////////////////////////////////////////////////////

#define fadePin 0

void setup(){
  pinMode(fadePin, OUTPUT);
}

void loop(){
  for(int i = 0; i<360; i++){
    //convert 0-360 angle to radian (needed for sin function)
    float rad = DEG_TO_RAD * i;

    //calculate sin of angle as number between 0 and 255
    int sinOut = constrain((sin(rad) * 128) + 128, 0, 255); 

    analogWrite(fadePin, sinOut);

    delay(15);
  }

}