Introduction: How to Make a Heating and Cooling Jacket
Diana George, Jenna Sobieray, Alex Cossoff and Chris Francklyn
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
* 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
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
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
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
Step 12: Assembling Your Fan "Sandwiches"
Step 13: Preparing Your Shell Holes
Step 14: Sewing the Assembly Into the Jacket
Step 15: Code
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
Step 17: Heating System
- 3 feet of insulated Teflon wire (or a cheap/old heating pad)
- 1 model airplane battery, 15 volts
- 1 solid-state relay
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
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.
- You can also try to contact us if you are having problems at: heatingncoolinginfo@gmail.com
- GOOD LUCK:)
HOPE YOU ENJOYED OUR PROJECT! PLEASE LET US KNOW OR SEND PHOTOS OF COMPLETED JACKETS!