Introduction: How to Make a Heating and Cooling Jacket

About: CU Boulder Craft Technology Lab, Institute of Cognitive Science, University of Colorado, Boulder.
Project by CU Boulder GEEN 1400 Engineering Projects students:
 Diana George, Jenna Sobieray, Alex Cossoff and Chris Francklyn

Have you ever dreamt about having a jacket that kept equilibrium?

Well today is your lucky day! Now featured on Instructables.com is a jacket that both heats and cools based on one’s body temperature. Incorporated into this jacket is a heating and cooling system that is all powered by something called the Lilypad Arduino. The Lilypad is a microcontroller board used for wearables and e-textiles and is quite simple to use. All you will need is a little sewing background, some materials, and a whole lot of time. With all three, you will be able to have your own equilibrated jacket!

Materials
1 winter jacket
1 zip-in liner
1 Lilypad Pro Kit (http://www.sparkfun.com/commerce/product_info.php?products_id=8873)
1 E-sewing kit (http://www.sparkfun.com/commerce/product_info.php?products_id=8797)
6 temperature sensors (http://www.sparkfun.com/commerce/product_info.php?products_id=8777)
6 tri-colored LEDS (http://www.sparkfun.com/commerce/product_info.php?products_id=8467)
1 flexible solar panel (optional)
1 rechargeable battery (http://www.sparkfun.com/commerce/product_info.php?products_id=339)
1 battery charger (http://www.sparkfun.com/commerce/product_info.php?products_id=8786)
3 ping-pong balls
About a yard of iron-on fabric

**This Instructables only is part 1 of the jacket. See part two for more materials used.**

Step 1: Preparing

1. Order all of your electronics from the web including: Lilypad Pro Kit, E-sewing kit, temperature sensors, tri-colored LEDS, solar panels, and whatever else you think you can get for cheap from the web.
     * Order these first so you will be able to start once you get your jacket

2. Purchase a ski type jacket with or without a zip-out liner jacket. The jackets do not have to be new—buying used will help your budget and make fatal mistakes less painful to your pocket.
       * If the jacket does not include a liner that zips out, you will need to buy one. Make sure to purchase either a fleece or some type of liner that FITS into your shell, the outside jacket. You will need to check this out before buying.

3. You will want to wash you jackets before so that they will be ready to wear when finished.

4. Once you have completed these steps, you will be ready to start fabricating your jacket.

Step 2: Creating Your Liner

 
Most important phase of the jacket: sewing the liner (a.k.a. your control center)

1. Sew on your Lilypad Arduino to a safe spot. We placed ours on the front right side of the liner, right above the pocket.
      * Connect Lilypad to computer with the cable and USB given in the Pro kit. This way you will know if your lilypad is working, and you will be able to become familiar with it.

2. Sew in your on/off snaps and battery close to your Lilypad. Placing the battery inside of a pocket would be best, so if it falls off it will not get lost. Put the snaps inside the liner, between the battery and the Lilypad. 
     * Put the snaps in first, before sewing in the leads to the battery. This is important because this is how you will be able to turn your jacket on and off. SEE PHOTO

3. Connect your battery to your Lilypad. Sew on lead directly to Lilypad from the battery. Sew the other lead to the snaps. Then from the snaps sew to the Lilypad.
       * Make sure to connect the negative of the battery to the negative of the Lilypad and the positive of the battery to the positive of the Lilypad. (Labeled with a positive and a negative).


-Once you have you completed this it is time to put in your temperature sensors-

Step 3: Temperature Sensors

 
Use no more than 6 temperature sensors to get a good reading of the body temperature.

1.  Evenly space the temperature sensors throughout the liner. Good places are towards the sides and in the armpit areas. 
        *see photo for more ideas

2. Once you have an idea where all your sensors will be located, it is time for the conductive thread and some sewing. (The thread will be from your E-sewing kit. Try not to get frustrated--it is difficult to work with). 

3. On the sensors are +, -, and s symbols. Sew in the - of the sensor to the jacket, BUT DON'T STOP THERE.  Take the same thread from the negative to another temperature sensor's negative port, and connect them all in one parallel circuit. When they all are connected you will need to finally attach them to the (-) port on the lilypad.
          *It is helpful to sew in all the temperature sensors first. In each of the ports, you must sew in separate thread, but do not cut the thread when done. Leave a long strand to the side so you will be able to connect the sensors together.

4.  Once you have all the negatives connected you will need to connect all the positives in the exact same way. When they are all connected, you will need to finally attach them to the (+) port on the Lilypad (like you did with the -).

5.  Then notice that each sensor has a port labeled with a (s). This is the information transformation port. You will need to sew each of the sensor’s (s) port to its own analog port on the Lilypad. These are the analog ports labeled (A0 - A5). MAKE SURE THAT THE CONDUCTIVE THREAD DOES NOT TOUCH YOUR OTHER CIRCUITS ALREADY SEWN IN!
THIS WILL MAKE YOUR JACKET SHORT CIRCUIT! CHECK OUR PICTURES FOR MORE INFORMATION.

Step 4: The Schematic

Follow the design pattern of this schematic when doing the circuitry of the liner.

Step 5: Writing the Code


Once you have all your sensors in the jacket you must write the code to get the LEDs to fade according to the temperature of the body.

1. Download the Lilypad program from

http://www.arduino.cc/en/Main/ArduinoBoardLilyPad

Then you will be able to program your Lilypad.

2. Plug in your Lilypad to the computer and make sure the settings in the Arduino program are selected for the right board. It should be the Lilypad Aurdino with ATmega328.

3. Copy and paste this code into the program:
 
int ledPin = 13;	// LED is connected to digital pin 13
int sensorPin0 = 0;	// temperature sensor is connected to analog pin 0
int sensorValue0;	// variable to store the value coming from sensor a0
int sensorPin1 = 1;	// temperature sensor is connected to analog pin 1
int sensorValue1;	// variable to store the value coming from sensor a1
int sensorPin2 = 2;	// temperature sensor is connected to analog pin a2
int sensorValue2;	// variable to store the value coming from sensor a2
int sensorPin3 = 3;	// temperature sensor is connected to analog pin 3
int sensorValue3;	// variable to store the value coming from sensor a3
int sensorPin4 = 4;	// temperature sensor is connected to analog pin 4
int sensorValue4;	// variable to store the value coming from sensor a4
int sensorPin5 = 5;	// temperature sensor is connected to analog pin 5
int sensorValue5;	// variable to store the value coming from sensor a5

// Output

int bluePin  = 10;  // Blue LED,  connected to digital pin 10
int redPin   = 11;   // Red LED,   connected to digital pin 11


// Program variables
int redVal   = 255; // Variables to store the values to send to the pins
int greenVal = 0;  // Initial values are Red full, Green and Blue off
int blueVal  = 0;

int wait = 10; // 50ms (.05 second) delay; shorten for faster fades


void setup()	 
{	 
         pinMode(ledPin, OUTPUT);	                         // sets the ledPin to be an output
         Serial.begin(9600);	                                 // initialize the serial port
         digitalWrite(ledPin, HIGH);	                         // turn the LED on
         pinMode(redPin,   OUTPUT);                              // sets the pins as output  
         pinMode(bluePin,  OUTPUT); 
}	 
 	 
void loop()	                                                 // run over and over again
{	
          Serial.println(" ");
          Serial.println(" ");
          Serial.println(" "); 
          Serial.println("Values");
          sensorValue0 = analogRead(sensorPin0);	// read the value from the sensor
          Serial.println(sensorValue0);	                // send that value to the computer
          sensorValue1 = analogRead(sensorPin1);	// read the value from the sensor
          Serial.println(sensorValue1);	                // send that value to the computer
          sensorValue2 = analogRead(sensorPin2);	// read the value from the sensor
          Serial.println(sensorValue2);	                // send that value to the computer
          sensorValue3 = analogRead(sensorPin3);	// read the value from the sensor
          Serial.println(sensorValue3);	                // send that value to the computer
          sensorValue4 = analogRead(sensorPin4);	// read the value from the sensor
          Serial.println(sensorValue4);            	// send that value to the computer
          sensorValue5 = analogRead(sensorPin5);	// read the value from the sensor
          Serial.println(sensorValue5);                 // send that value to the computer
          
             
          int sensorAverage = (sensorValue0+sensorValue1+sensorValue2+sensorValue3+sensorValue4+sensorValue5)/6;       // average the sensor values
          Serial.println("Sensor Average:");	        // send that value to the computer
          Serial.println(sensorAverage);	        // send that value to the computer
         
         
  if (sensorAverage < 175) // Cold phase of fades
  {
    if (redVal < 175) redVal     +=5; // Red down
    if (blueVal > 0) blueVal     -=5; // Blue up
  }
  else if (sensorAverage > 175) // Warm phase of fades
  {
    if (redVal  > 0) redVal      -=5; // Red up
    if (blueVal < 175) blueVal   +=5; // Blue down
   
  } 
   
    Serial.println("check color value:");
    Serial.println(redVal);
    Serial.println(blueVal);
    
  



  analogWrite(redPin,   redVal);   // Write current values to LED pins
  analogWrite(bluePin,  blueVal);  

          delay(1000);	                                        // delay for 1 second
          
          
}
       




4. Once you have the code, things get tricky... You will need to import the code to the Lilypad. Notice the UPLOAD button on the top of the program and the little button on the Lilypad. You will need to press down the button on the Lilypad. It should start blinking red and green. Soon after press the upload button and see if it successfully uploads.

*This may take a few tries: it is quite touchy.

5. Once it successfully uploads, you can click on the serial monitor and be able to read the temperature sensor readings.



 

Step 6: LEDs


You will be using the tri-colored LEDs to help tell you the temperature of the body.

Sew three LEDs on the outside of each of the arms of the actual jacket shell.

1. Sew all the positives to the positives of the three LEDs on the arm

2. Sew all the blues to the blues and then all the reds to the reds. You do not need the green port.
     • See the photo for more information

3. Then to connect the LEDs to the Lilypad.  You will need to sew in snaps to the inside of the liner and shell of the jacket. This way they will snap together. Each snap should correspond with its own lead. 

4. One side of the snap will be connected to the Lilypad in the liner, and the other side of the snap will be connected to all the LEDs on the arm. Use a set of snaps for the blue, one for the red, and one for the positive.
   • See the photo for more information, the larger snaps on the bottom of the collar are the three used to connect the LEDs. The two others are for the solar panel.

5. For the purpose of protection and light diffusion, sew on top of each LED a half of a ping-pong ball. It is easiest to pre-poke the holes with a thumbtack. In addition, a sewing hoop will help you keep the fabric taut.
      • See the photo for more information

Step 7: Solar Panel (optional)


Adding a solar panel to the jacket is optional , but it will help with powering the jacket. 

It is recommended that you use a flexible solar panel, so that it is more bendable with the clothing and will be more comfortable to wear.

1. Purchase a solar panel that has more voltage than the battery that powers your Arduino. The solar panel in the picture gives about 8 volts. No more than 8 volts is needed to charge the battery to the Arduino. Also purchase the LiPower charger and 3.5 volt lithium polymer battery. Both can be found on sparkfun.com

-These are instructions for using a flexible solar panel; any others may not be the same-
 
2. The positive end is the side where the white lines are pointing out and the negative is the side the white lines are pointing towards. 

3. On the ends of the solar panel, where the leads are located, there is a plastic covering. You will need to peel it back to access the (+) and (-). Be careful to not rip the solar panel or ruin it.
   * Once you have the sides back you should test the voltage of the solar panel with a volt meter.

4. Attach a little conductive fabric inbetween the plastic and the lead. Then secure them together; we used duct tape, because it is strong and easy. 
    *See photos for more information; also check the voltage agian when it is in the sun.

5. With the conductive thread, you should sew through where the duct tape and fabric meet, but try to avoid puncturing the solar panel. 

6. Then sew the solar panel to the hood, or the place of choice, with the conductive thread. Keep sewing down the positive and negative leads from the hood all the way till you hit the bottom of the hood. This where you will connect it to snaps.

-Now it is time to connect the solar panel to the battery-


Step 8: Solar Panel (continued)


 1. Put the sew-on conductive snaps on the hood of the shell that snap to the shell. Also put another set of the same snaps on the inside of the shell that snap into the liner. 
    *Make sure that you keep the snaps connected all positive or all negative. See photos for more information.

2. The snaps on the inside of the liner will need to be circuited down to the LiPower charger. The charger should be placed by the Arduino.

*** Make sure not to touch any of the other circuits, since there are so many at this point.***

3.One snap should be the positive and the other should be the negative from the solar panel. Then sew in the circuit to the chager. You will notice that one side of the LiPower charger is labeled (-) & (c); the other side (right side) has a (-) & (+).

4. The left side, or the side with the (-) & (c), is the side you connect the circuits of the snap too. The (c) is the positive snap and the (-) is the negative snap. Sew them into there. You are now done with the snap circuit.

5. Now you need to connect the charger to the Lilypad so it is able to get power. The right side, or the side with just the (-) & (+), will connect to the corresponding symbols on the Lilypad. Once you have that circuited, you have connected your charger to the Lilypad.

6. There is a place for you to connect the charger to the lithium battery. The battery simply plugs in; it should be quite easy.

-The solar panel should now be connected and working. The charger directs the current, so it should flow in the right direction. You should not havany problems with this.-

 

Step 9: Trouble-shooting

  •         Place Iron-on fabric over the circuits to prevent shorting
  •          Use the volt meter to trace the leads if the circuits are not working
  •          Keep leads as far apart as possible, so they do not short by touching
  •          KEEP IT ORGANIZED! If you are not able to tell apart the threads, you will face many   problems
  •         Make sure to turn off your power with the snap
  • *** THE WHOLE CIRCUIT WILL BE MUCH EASIER IF YOU JUST USE WIRE, THE CIRCUIT IN THE SECOND PART GETS MUCH MORE DIFFICULT WHEN USING CODUCTIVE THREAD***

*Now you have completed the temperature-sensing portion of the jacket.



Step 10: PART 2- Heating and Cooling

We will now go into part 2 of How to Make a Heating and Cooling Jacket!
 

  • Part 2 is seperated into two parts (the heating portion and the cooling portion). It does not matter which you do first, but make sure to check the materials for both before you order anything. You may need to order multiples of certain materials. Ordering them all at once will help with shipping costs and time effieciency.

Step 11: Cooling System

Fan Cooling System

Materials:
·         4 computer fans, 5 volts each
·         1 model airplane battery, 15 volts
·         1 solid-state relay
·         8 mesh squares, sized to cover fans
·         8 stiff felt squares, slightly larger than mesh squares
·         4 flexible felt squares, same size as above
·         Velcro:
o   Enough sew-on fuzzy type to go around the circumference of four fan holes
o   Enough sticky loop type to cover four of the felt squares
·         Conductive Thread or wire
·         Strong normal sewing thread and needle
·         Gorilla glue (or other glue that will bond to felt, plastic, and grating)

Step 12: Assembling Your Fan "Sandwiches"

 
        First, you will need to prepare the fans for the jacket before they can be sewn in. To do this, the felt, supports, mesh, and fans must all be assembled together. 
1.       Trace and cut out one large circle, with a diameter as close as possible to that of the fan’s, on each of the felt squares.
2.       Sew on a mesh square to cover each of the felt circles using regular sewing thread. Trim excess mesh around the circle after sewing. Be careful not to cut the mesh too close to the thread, however, because the mesh can come apart easily. Leave a gap of about one centimeter between the thread and the edge of the mesh all the way around the circle.
3.       Optional: If your fans only have support on one side, you will need to create a frame for the fans. This will not allow any interference with the blades so that the work properly. You can make some type of frame from wood or plastic that matches the border of the fan. Also, cut holes at each corner to match up with the holes in the fan corners that were meant for screws. (*see photos)
4.       Piece together the sandwiches, with one felt square on each side of the fan, and a support ring between fans and felt if necessary. Orient the felt squares so that the side with the extra mesh faces inward. 
5.       Using Gorilla Glue or similar product, glue the pieces together. MAKE SURE NOT TO GET ANY GLUE IN THE WAY OF THE FANS!!! This will prevent them from spinning and will be difficult to fix. Also, try not to get glue over the screw holes. This way you can sew through them later.
6.       After glue has dried, trim the felt squares around the edges. Make sure to leave about one to two centimeters of felt all the way around in order to sew to the jacket. 
7.       Sew the sandwiches together to reinforce the glue. Using regular thread, sew through all materials where the screw holes are in the corners. Also, in the middle of each side, sew a few strands of thread between the two felt squares in order to help keep the middle areas together. The thread will show on the outside of the fan casing. See photo for a better idea of what this looks like. 
8.       Stick the loop Velcro onto one side of each of the fans, covering the surface of all of the felt. You should reinforce them with super glue or sewing, so the Velcro will not peel off. Make sure that, on two of the fans, the Velcro is on the side that blows air out, and on the other two it is on the side that does not blow air out, rather pulls air in.

Step 13: Preparing Your Shell Holes

You now need to make holes in the shell, sew felt to the outside, and attach Velcro to the inside for the fans.
1.       Cut four holes, each the same diameter as before, in the liner where you would like to put your fans. We placed two on the chest and two on the lower back.
2.       Zip the liner and shell together and cut the four holes in the liner. Zipping them together before cutting will insure that the holes line up well.
3.       Out of the flexible felt squares, cut four felt rings—make each one two centimeters thick with the inner diameter the same as or a little less than the fans. Sew these rings to the outside of each of the shell holes in order to keep the two shell layers together.
4.       On the inside of the shell, sew the fuzzy Velcro around the circumference of the holes. I found it easier to cut slits about every two centimeters so that the Velcro lays flat in a circle. Make sure to sew it on very well—otherwise it could rip off later on.

Step 14: Sewing the Assembly Into the Jacket

To the outside of the liner, you will now sew the two fans the blow air in on the chest and the two that blow air out of the jacket located on the lower back. This is the design of the circulation system that helps with the cooling process.
1.       First, place each fan where you want it to go. Be careful of the way it blows air and where the wiring leads are.
2.       With regular thread, sew one round between the felt and the liner all the way around the fan. Try to get as close to the glue as possible. Trim any excess felt that is hanging over the holes when you are done.
3.       Again, with regular thread, sew between the felt and the liner. For this round, sew as close to the edge of the felt as you can. This way there are two connections holding the fan down. 

Step 15: Code

You will need to test out your circuit with the code to make sure you have it working before you put it all in. This code should run both of the circuit switches; you will have to modify it to run just one system at a time. For help on this you can look on the Arduino website.


int ledPin = 13; // LED is connected to digital pin 13
int sensorPin0 = 0; // temperature sensor is connected to analog pin 0
int sensorValue0; // variable to store the value coming from sensor a0
int sensorPin1 = 1; // temperature sensor is connected to analog pin 1
int sensorValue1; // variable to store the value coming from sensor a1
int sensorPin2 = 2; // temperature sensor is connected to analog pin a2
int sensorValue2; // variable to store the value coming from sensor a2
int sensorPin3 = 3; // temperature sensor is connected to analog pin 3
int sensorValue3; // variable to store the value coming from sensor a3
int sensorPin4 = 4; // temperature sensor is connected to analog pin 4
int sensorValue4; // variable to store the value coming from sensor a4
int sensorPin5 = 5; // temperature sensor is connected to analog pin 5
int sensorValue5; // variable to store the value coming from sensor a5
int fanRelay = 7; // fan relay is connected to digital pin 7
int heatRelay = 3; // heating coil relay is connected to digital pin 6

// Output

int greenPin = 9; // Green LED, connected to digital pin 10
int bluePin = 10; // Blue LED, connected to digital pin 11
int redPin = 11; // Red LED, connected to digital pin 9


// Program variables
int redVal = 255; // Variables to store the values to send to the pins
int greenVal = 0; // Initial values are Red full, Green and Blue off
int blueVal = 0;



void setup()
{
pinMode(ledPin, OUTPUT); // sets the ledPin to be an output
Serial.begin(9600); // initialize the serial port
digitalWrite(ledPin, HIGH); // turn the LED on
pinMode(redPin, OUTPUT); // sets the pins as output
pinMode(greenPin, OUTPUT);
pinMode(bluePin, OUTPUT);
pinMode(fanRelay, OUTPUT);
pinMode(heatRelay, OUTPUT);
digitalWrite(fanRelay, LOW); // sets fan relay to off
digitalWrite(heatRelay, LOW); // sets heat coil relay to off

}

void loop() // run over and over again
{

Serial.println("Sensor Values:");
sensorValue0 = analogRead(sensorPin0); // read the value from the sensor
Serial.println(sensorValue0); // send that value to the computer
sensorValue1 = analogRead(sensorPin1); // read the value from the sensor
Serial.println(sensorValue1); // send that value to the computer
sensorValue2 = analogRead(sensorPin2); // read the value from the sensor
Serial.println(sensorValue2); // send that value to the computer
sensorValue3 = analogRead(sensorPin3); // read the value from the sensor
Serial.println(sensorValue3); // send that value to the computer
sensorValue4 = analogRead(sensorPin4); // read the value from the sensor
Serial.println(sensorValue4); // send that value to the computer
sensorValue5 = analogRead(sensorPin5); // read the value from the sensor
Serial.println(sensorValue5); // send that value to the computer


int sensorAverage = (sensorValue0+sensorValue1+sensorValue2+sensorValue3+sensorValue4+sensorValue5)/6; // average the sensor values


if (sensorValue0 < 215) // cold phase of fades
{
if (redVal < 255) redVal +=15; // Red down
if (blueVal > 0) blueVal -=15; // Blue up

}
else if (sensorValue0 > 215) // warm phase of fades
{
if (redVal > 0) redVal -=15; // Red up
if (blueVal < 255) blueVal +=15; // Blue down
}
if (sensorValue0 < 215) // active cold phase
{
digitalWrite(heatRelay, HIGH); // activate heat
digitalWrite(fanRelay, LOW); // deactivate fans
delay(2000); // wait

}
if (sensorValue0 > 215) // active warm phase
{
digitalWrite(heatRelay, LOW); // deactivate heat
digitalWrite(fanRelay, HIGH); // activate cold
delay(2000); // wait

}


//Debug

Serial.println("Sensor Average:"); // send that value to the computer
Serial.println(sensorAverage); // send that value to the computer
Serial.println("Check Color Value:");
Serial.println(redVal);
Serial.println(blueVal);



analogWrite(redPin, redVal); // Write current values to LED pins
analogWrite(greenPin, greenVal);
analogWrite(bluePin, blueVal);


}

Step 16: Sewing Your Circuit Together

 
                Once you have all the fans sewn in, the code working, and the Velcro attached, it is time to sew the circuit together. The fans will be connected in a parallel circuit.
1.       Sew all of the positive leads of the fans together using conductive thread or wiring. Using wire is much better. Not only is it easier but it also allows a higher current to travel through that circuit. If you want to use thread, you can. With thread, make sure to double the thread so that the current can be greater when you sew long distances. You can also use the thread to tie a connection between wires; it works really well at keeping them connected.
2.       Exactly like before, wire or sew all of the negative leads of the fans together.
3.       Sew your relay down to the jacket using regular thread
4.       Wire/Sew one connection from an open digital port on the Lilypad Arduino to the positive control of the relay.
5.       Wire/Sew another connection from the positive of the battery to the positive load of the relay.
6.       Wire/Sew another connection from the negative of the battery to the negative of the fan circuit.
7.       Wire/Sew another connection from the positive of the fan circuit to the negative load of relay.
8.       Wire/Sew a final connection from the negativeof the Lilypad Arduino to the negative load on the relay.

 
*See trouble shooting at end or heating system circuitry or photos of the two different relay schematics if you need help.

Step 17: Heating System

Materials
  •  3 feet of insulated Teflon wire (or a cheap/old heating pad)
  •  1 model airplane battery, 15 volts
  •  1 solid-state relay
 
Creating the Heating System

1.      
You will need to purchase either a cheap heating pad or some insulated Teflon wire. In our case, we took apart a heating pad and worked from there.

2.      
Testing for the correct length of wire that will heat your jacket is key. You want to run about 15 volts (or however many volts your battery is) through certain lengths of wire. We found that a 30-inch section of Teflon wire was heated well by a 15 volt battery. Be sure that you change this to your liking, making sure it is not too cold or too hot to burn.

3.       Once you have an appropriate length you should create ends on the wire that will be possible to sew. We did this by soldering on metal loops to the ends and heat shrinking them together to give us a secure and sew-able heating wire.

Step 18: Putting in the Heating Wire


1.      
Place your heating wire into the jacket and safety pin it in before sewing to help plan where you want it to go. Make sure to have both of the ends close to the Lilypad and battery. This will be helpful when doing the circuit.

2.      
Once it is pinned in where you want it, sew the coil down using nonconductive thread. Do this by sewing loops around the wire along the whole length.

3.      
Now it is time to do the relay. It is best if you first test this step out with alligator clips or wires, so that you can make sure the connections are working. (*see diagram of relay for circuit)

Step 19: Sewing Your Heating Circuit

The relay acts like a switch, turning the circuit on or off as needed. The code we have written will open or close the relays, which will allow the different systems to run at different times. The diagram of the relay is helpful. When you order your relay, look at the website's diagram to see the functions of the different relay prongs and make sure you have the right connections. You can also look at our diagram to get more help.

1.      
You will have both a positive and a negative prong on the relay that you will connect to the battery and to the Lilypad.

2.      
Wire/sew the positive of the load (battery) on the relay to the positive on the battery.

3.      
Wire/sew the negative of the load (battery) on the relay to one end on the heating wire.

4.      
Wire/sew the other end of the heating wire to the negative on the battery. This will connect the heating into a loop that will either be turned off or on by the relay.

5.      
Wire/sew the positive to the one of the analog ports on the Lilypad. For the heating system, we used port 3, which is also used in our code.

6.      
Wire/sew the negative to the negative on the Lilypad. A trick that you can do is connect it to the negative of your temperature sensors, since they all go to the same spot. This way you can use less thread.

7.      
You should have a working circuit now, but remember this circuit may be different if you used a different relay than we did. You then should base your wiring off the diagram given for your specific relay.

Step 20: Trouble Shooting


 
  • Make sure your connections are working with help from a voltmeter. Test to see where the voltage of your battery has dropped.
     
  •  Retry connecting your relay with alligator clips because they are easier to change than threads and wires. This also allows you to find which connections are wrong or broken.
     
  • Hooking an L.E.D. up to your relay helps you know when it is turning off or on.

  • Make sure you have edited the code to your design. If you have the wrong analog ports written in, your relay will not work.

  • DO NOT LET BATTERIES TOUCH! This causes shorts, sparks, smoke, and possibly fire. You should separate them for the two systems. We even went to the extent of covering the leads with felt so they cannot touch anything.



  • GOOD LUCK:)



HOPE YOU ENJOYED OUR PROJECT! PLEASE LET US KNOW OR SEND PHOTOS OF COMPLETED JACKETS!