loading
I made a Duck Dynasty themed hoodie with a LilyPad Arduino that has 3 zipper sensor switches to activate 3 different actions/programs on the back of the hoodie. The zipper is the key to activating these switches so when the zipper is touching a switch it triggers that specific action/program. The First switch triggers an RGB light that is underneath the "D" on Duck Dynasty, The second switch triggers a a series of blinking LED lights under the 4 characters, and the third switch triggers the LilyPad speaker that is plays the Chorus of the Duck Dynasty theme song (Sharp Dressed Man).

For more information on how to stitch a zipper switch click here

I've attached below 3 short videos for you to watch to get the full effect of each zipper switch in action.

Step 1: Materials List

Crafting Materials:

• Hoodie with a medal zipper (note: be sure your zipper is truly conductive)
• Large or X-large Duck Dynasty T-shirt (I got my t-shirt at Walmart and cut out “Duck Dynasty” and the image of the four Roberson men (faces). You'll want a larger size shirt so when you cut out the image and place it on your hoodie it will fit accordingly to the amount of space you'll have on the back of your hoodie)
• Sewing Needle
• White Crayon
• Scissors
• Sewing machine (or sew cut-up t-shirt pieces by hand if you don't have access to one)
• Thread (any color)

Electronic Materials:

LilyPad Arduino Simple Board
• 20 White LilyPad LEDs
Li-Po Battery
LilyPad Buzzer
Conductive Thread (I can't tell you exactly how much you'll need it’ll depend on the size of your hoodie and where you’ll place your zipper switches and Arduino Lilypad. I used about 30 plus more ft.)
LilyPad FTDI Basic
LilyPad Tri-Color LED
USB Mini-B Cable
FTDI driver and Arduino IDE should be installed on your computer


Step 2: Diagram: RGB Light

I first cut out the pieces on the t-shirt I was going to use and placed them on the back of the hoodie where I wanted them. I started out with making my RGB light plan. I sketched out out a diagram of where I was going to sew the pieces of my LilyPad and attach them via conductive thread for my RGB light. The point of the sketch is to ensure no "wires" (stitches) are crossed, because then the final product won't work so it's a nice guide to follow.

This first diagram is specifically for the circuits for the RGB light and the first zipper switch for it. The left side of the map shows the circuit plan for the zipper switch (The circle with the "+", "-", and "A2" is the Arduino LilyPad. Where I've marked resisters this is only optional to add. They only serve the purpose of a stronger connection but you can sew a solid conductive thread line without it and it'll work just fine). The right side of the diagram is the circuit plan from the RGB light to the LilyPad. 

Step 3: Sew RGB Light Circuits

Using the diagram from step 2 layout your RGB light and LilyPad and single stitch your circuits from your Lilypad board on the right pins   to your RGB lights.

(RGB light) R11 connects to 9 on LilyPad
(RGB light) B10 connects to 6 on LilyPad
(RGB light) G9 connects to 5 on LilyPad

Once this is sewn then sew your zipper switch:

Negative side of switch connects to negative on LilyPad
Positive side of switch connects to A5 on LilyPad

This will be zipper switch #1. When you sew the switch by the zipper make sure you sew as close to your zipper as you can so that your metal zipper touches the thread on your switch in order for it to work. Sew back and forth many times for your switch for a stronger connection.

Then I sewed on the Duck Dynasty title with a sewing machine and regular thread along the edges.

Step 4: Diagram: LilyPad Buzzer (Speaker Pin)

Map out your circuits for the LilyPad Buzzer. I just added on to my RGB diagram and sketched out my positive and negative circuits from my buzzer to my LilyPad:

Negative side of buzzer will connect to your negative on the LilyPad
Positive side of buzzer will connect to A2

Map out zipper switch #2:
Negative side of switch will connect to the negative of the first zipper switch. 
Positive side of switch will connect to the A3 on LilyPad


Step 5: Sew LilyPad Buzzer (Speaker Pin) Circuits

Follow your diagram from step 4 to sew your circuits to from the buzzer the Lilypad:

Negative side of buzzer will connect to your negative on the LilyPad
Positive side of buzzer will connect to A2

Then sew your zipper switch #2:

Negative side of switch will connect to the negative of the first zipper switch.
Positive side of switch will connect to the A3 on LilyPad

Step 6: Diagram: LED Lights

I sketched out where I wanted all my LED lights. The pattern is aligned parts of the outline of the hats of each character on the second cut out of the Duck Dynasty men. I planned out where the positive and negative sides were going to be. NOTE: LED negative side of all lights are facing the top in my diagram making the positives all facing the bottom.  

All the positive sides of LED lights connect to 10 on LilyPad
Negative sides of LED lights connect to negative on LilyPad

Map out zipper switch #3:
Negative side of switch will connect to the negative of the first zipper switch.
Positive side of switch will connect to the A4 on LilyPad

Step 7: Sew LED Lights Circuits

First I took my Duck Dynasty character cut out and placed it on the back of the hoodie and with a white crayon drew a outline on the hoodie of where I needed to sew the LED lights. I used this as my guide to first sew all the positive circuits of the LED lights that connect to 10 on the LilyPad. Then I completed the sewing of all the negative circuits on the LED lights to the negative on the LilyPad. 

NOTE: Because this is a long connection through all 20 LED lights double your stitching with the conductive thread. You may even have to go over both the positive and negative circuits a couple more times to make the connections stronger so that your lights will light up clearer instead of dim.
  
Sew zipper switch #3: 
Negative side of switch will connect to the negative of the first zipper switch.
Positive side of switch will connect to the A4 on LilyPad

Then I sewed with a sewing machine with regular thread on the cut out of the characters lining it up with the LED lights.

Step 8: Programming

This is where all your coding needs to be written up for the RGB light, LilyPad Buzzer to play the Duck Dynasty theme song (Sharp dressed man), and the LED lights to have a blinking pattern. These are only activated when their specific zipper switch is touched by the zipper so that also needed to be written in my code.

To program the Duck Dynasty theme song I had to look up online piano chorus music to get the exact the notes. From there I had take those notes and translate them into code I did this at Arduino.cc/ed/tutorial/tone. Then I had to write the note duration's (How fast each note was to be played). 

Here's all my written code:

int whiteLeds = 10;
int redLed = 9;
int greenLed = 5;
int blueLed = 6;
int zipperswitch = A5;
int zipperswitch2 = A3;
int zipperswitch3 = A4;
int speakerPin = A2;
int r;
int g;
int b;
int fadeSpeed = 1;              


#include "pitches.h"

// notes in the melody:
int melody[] = {
  NOTE_DS4, NOTE_DS4, 0, NOTE_DS4, NOTE_DS4, 0, NOTE_DS4, NOTE_DS4, NOTE_DS4, NOTE_C4, NOTE_DS4,
NOTE_F4, NOTE_FS4, NOTE_FS4, NOTE_FS4, 0, NOTE_B4, NOTE_B4, NOTE_B4, NOTE_B4, NOTE_B4, NOTE_B4,
NOTE_B4, NOTE_B4, NOTE_G3, NOTE_C4, 0, NOTE_C4, NOTE_FS4, NOTE_G4, NOTE_G4, NOTE_DS4, NOTE_C4, NOTE_C4,
NOTE_G3, NOTE_AS3, NOTE_C4, NOTE_C4, 0, 
};

int noteDurations[] = {
  4, 4, 2, 4, 4, 2, 8, 2.7, 8, 8, 8, 8, 4, 4, 8, 8,
8, 4, 8, 8, 8, 8, 8, 8, 8, 4, 4, 4, 8, 8, 4, 8, 8, 8, 8, 4, 4, 2, 1 };
it to go faster or slower
void setup() {
  pinMode(whiteLeds, OUTPUT);
  pinMode(redLed, OUTPUT);
  pinMode(greenLed, OUTPUT);
  pinMode(blueLed, OUTPUT);
  pinMode(speakerPin, OUTPUT);
  pinMode(zipperswitch, INPUT_PULLUP);
  pinMode(zipperswitch2, INPUT_PULLUP);
  pinMode(zipperswitch3, INPUT_PULLUP);
}


void loop() {
        
    if((digitalRead(zipperswitch)== 0)){
  
        colorFade();
         
        rLEDFade();
       gLEDFade();
       bLEDFade();
 
      }else {
        digitalWrite(redLed, 1);
       digitalWrite(greenLed, 1);
        digitalWrite(blueLed, 1);
      }
       
       
      if((digitalRead(zipperswitch2)== 0)){ 
        DuckDynasty (); 
       
      }else {  
        digitalWrite(speakerPin, LOW);
      }       
     
    if((digitalRead(zipperswitch3)== 0)){ 
     digitalWrite(whiteLeds, HIGH);
     delay(500);
     digitalWrite(whiteLeds, LOW);
     delay(500);
    
       
      }else{  
        digitalWrite(whiteLeds, LOW);
       
      }
 
void digitalColor () 
              
{
  digitalWrite(redLed, LOW);
  digitalWrite(blueLed, HIGH);       
  digitalWrite(greenLed, HIGH);
  delay(500);
  digitalWrite(redLed, HIGH);
  digitalWrite(blueLed, HIGH);       
  digitalWrite(greenLed, LOW);
  delay(500);
  digitalWrite(redLed, HIGH);
  digitalWrite(blueLed, LOW);        
  digitalWrite(greenLed, HIGH);
  delay(500);
  digitalWrite(redLed, HIGH);
  digitalWrite(blueLed, HIGH);       
  digitalWrite(greenLed, HIGH);
  delay(1000);
}




void analogColor ()                  

{
  analogWrite(redLed, 0);
  analogWrite(blueLed, 255);  //red
  analogWrite(greenLed, 255);
  delay(1000);
  analogWrite(redLed, 255);
  analogWrite(blueLed, 255);  //green
  analogWrite(greenLed, 0);
  delay(1000);
  analogWrite(redLed, 255);
  analogWrite(blueLed, 0);    //blue
  analogWrite(greenLed, 255);
  delay(1000);
  analogWrite(redLed, 0);
  analogWrite(blueLed, 0);     //purple
  analogWrite(greenLed, 255);
  delay(1000);
  analogWrite(redLed, 0);
  analogWrite(blueLed, 255);   //orange
  analogWrite(greenLed, 0);
  delay(1000);
  analogWrite(redLed, 255);
  analogWrite(blueLed, 0);     //teal
  analogWrite(greenLed, 0);
  delay(1000);
  analogWrite(redLed, 255);
  analogWrite(blueLed, 255);     //off
  analogWrite(greenLed, 255);
  delay(1000);
}




void rLEDFade()                       

{
analogWrite(blueLed, 255);
analogWrite(greenLed, 255);          
analogWrite(redLed, 255);
for (r = 255; r > 0; r--) {          
    analogWrite(redLed, r);
    delay(fadeSpeed);
}
for (r = 0; r < 256; r++) {          
    analogWrite(redLed, r);
    delay(fadeSpeed);  
}
}



void gLEDFade()                       

{
analogWrite(blueLed, 255);
analogWrite(greenLed, 255);
analogWrite(redLed,255);
for (g = 255; g > 0; g--) {          
    analogWrite(greenLed, g);
    delay(fadeSpeed);
}
for (g = 0; g < 256; g++) {          
    analogWrite(greenLed, g);
    delay(fadeSpeed); 
}
}



void bLEDFade()

{
analogWrite(blueLed, 255);            
analogWrite(greenLed, 255);
analogWrite(redLed,255);
for (b = 255; b > 0; b--) {           
    analogWrite(blueLed, b);
    delay(fadeSpeed);
}
for (b = 0; b < 256; b++) {           
    analogWrite(blueLed, b);
    delay(fadeSpeed);  
}
}
 


void colorFade ()                      

{
  analogWrite(blueLed, 0);             
  for (r = 255; r > 0; r--) {          
    analogWrite(redLed, r);
    delay(fadeSpeed);
  }
                                       
  for (b = 0; b < 256; b++) {
    analogWrite(blueLed, b);
    delay(fadeSpeed);
  }
                                       
  for (g = 255; g > 0; g--) {          
    analogWrite(greenLed, g);
    delay(fadeSpeed);
  }
                                       
  for (r = 0; r < 256; r++) {          
    analogWrite(redLed, r);
    delay(fadeSpeed);
  }
                                       
  for (b = 255; b > 0; b--) {          
    analogWrite(blueLed, b);
    delay(fadeSpeed);
  }
                                       
  for (g = 0; g < 256; g++) {          
    analogWrite(greenLed, g);
    delay(fadeSpeed);
  }
  analogWrite(blueLed, 255);           
  delay(500);
}

void DuckDynasty ()

{
  for (int thisNote = 0; thisNote < 40; thisNote++) {

    int noteDuration = 1500/noteDurations[thisNote];
    tone(speakerPin, melody[thisNote],noteDuration);

    int pauseBetweenNotes = noteDuration * 1.30;
    delay(pauseBetweenNotes);
   
    noTone(speakerPin);
  }

Step 9: Upload the Code

Now that you've written your code, attach the battery to the LilyPad board so it can charge when you are attached to your computer. Using the FTDI breakout board, connect your LilyPad board to your computer via the mini USB cord. There will be an orange light when the battery is charging, so you will know the connection is working.

Import (or copy and paste) your code into the Arduino IDE and upload the code to your board. It should work!

Step 10: You've Finished!

Voila! You're all finished now with a now decked out Duck Dynasty Hoodie with 3 zipper switches that activate 3 different actions/programs! Enjoy it or you can give this as a gift to someone you know is a huge fan. This may have been a long process of sewing, sketching diagrams, and coding but I found this to be both fun and challenging project.

Attached below are videos of each zipper switch their light and sound actions.

Switch #1: RGB light
Switch #2: LilyPad Buzzer- Duck Dynasty Theme Song  
Switch #3: Blinking LED lights




About This Instructable

1,316views

4favorites

License:

More by CaitJohnson:Arduino LilyPad Duck Dynasty Hoodie with sound and LED lights 
Add instructable to: