Safe and Sound – Winter Survival Suit Post 5
Here is where I am at so far. I am waiting for my temperature sensors to arrive (Taking a lot longer then expected). I do have everything else required to complete the project. For the past week, I have
been working on sewing the carbon fiber into the suit as well as programming the MSP-EXP432P401RMSP-EXP432P401R to regulate the suits temperature I will be using an 8 Relay Module to control the power going to the carbon fiber
For those of you interested in the Carbon Fiber, here is the link: http://www.carbonheater.us/
Below is the code I am using for the suit (Still more to add). I am using Energia 1.6.10E18 to program the EXP432.
//Winter Survival Suit Temperature
//Dale Winhold
//Deg C = (F – 32) / 1.8; Convert to celcius
#include "SPI.h"
#include "OneMsTaskTimer.h"
#include "LCD_SharpBoosterPack_SPI.h"
#define analogRead
LCD_SharpBoosterPack_SPI myScreen;
int llPin = A14; //Temperature sensor Left Leg
int rlPin = A13; //Temperature sensor Right Leg
int laPin = A11; //Temperature sensor Left Arm
int raPin = A9; //Temperature sensor Right Arm
int ltPin = A8; //Temperature sensor Left Torso
int rtPin = A6; //Temperature sensor Right Torso
int LLegValue = 0;
int RLegValue = 0;
int LArmValue = 0;
int RArmValue = 0;
int LTorsoValue = 0;
int RTorsoValue = 0;
int Settemp = 37;
String LLegStr;
String RLegStr;
String LArmStr;
String RArmStr;
String LTorsoStr;
String RTorsoStr;
String SettempStr;
// setup
void setup() {
Serial.begin(9600);
myScreen.begin();
// setup LCD
myScreen.clearBuffer();
myScreen.setFont(0);
myScreen.text(3, 1, "Set Temp: c");
myScreen.text(3, 14, "L-Leg c");
myScreen.text(3, 27, "R-Leg c");
myScreen.text(3, 40, "L-Arm c");
myScreen.text(3, 53, "R-Arm c");
myScreen.text(3, 66, "L-Tor c");
myScreen.text(3, 79, "R-Tor c");
myScreen.flush();
}
void loop()
{
LLegValue = analogRead(llPin);
RLegValue = analogRead(rlPin);
LArmValue = analogRead(laPin);
RArmValue = analogRead(raPin);
LTorsoValue = analogRead(ltPin);
RTorsoValue = analogRead(rtPin);
//Convert to celcius
LLegValue = (LLegValue - 32)/ 1.8;
RLegValue = (RLegValue - 32)/ 1.8;
LArmValue = (LArmValue - 32)/ 1.8;
RArmValue = (RArmValue - 32)/ 1.8;
LTorsoValue = (LTorsoValue - 32)/ 1.8;
RTorsoValue = (RTorsoValue - 32)/ 1.8;
LLegStr = String(LLegValue);
RLegStr = String(RLegValue);
LArmStr = String(LArmValue);
RArmStr = String(RArmValue);
LTorsoStr = String(LTorsoValue);
RTorsoStr = String(RTorsoValue);
SettempStr = String(Settemp);
myScreen.setFont(0);
myScreen.text(60, 1, SettempStr + "");
myScreen.text(60, 14, LLegStr + "");
myScreen.text(60, 27, RLegStr + "");
myScreen.text(60, 40, LArmStr + "");
myScreen.text(60, 53, RArmStr + "");
myScreen.text(60, 66, LTorsoStr + "");
myScreen.text(60, 79, RTorsoStr + "");
myScreen.flush();
//Heat on or off
if (LLegValue < 32)
{
digitalWrite(40, HIGH);
myScreen.setFont(0);
myScreen.text(85, 14, "H"); //Displays heat on icon
}
if (LLegValue > 39)
{
digitalWrite(40, LOW);
myScreen.setFont(0);
myScreen.text(85, 14, "L"); //Displays heat off icon
}
if (RLegValue < 32)
{
digitalWrite(41, HIGH);
myScreen.setFont(0);
myScreen.text(85, 27, "H");
}
if (RLegValue > 39)
{
digitalWrite(41, LOW);
myScreen.setFont(0);
myScreen.text(85, 27, "L");
}
if (LArmValue < 32)
{
digitalWrite(42, HIGH);
myScreen.setFont(0);
myScreen.text(85, 40, "H");
}
if (LArmValue > 39)
{
digitalWrite(42, LOW);
myScreen.setFont(0);
myScreen.text(85, 40, "L");
}
if (RArmValue < 32)
{
digitalWrite(43, HIGH);
myScreen.setFont(0);
myScreen.text(85, 53, "H");
}
if (RArmValue > 39)
{
digitalWrite(43, LOW);
myScreen.setFont(0);
myScreen.text(85, 53, "L");
}
if (LTorsoValue < 32)
{
digitalWrite(44, HIGH);
myScreen.setFont(0);
myScreen.text(85, 66, "H");
}
if (LTorsoValue > 39)
{
digitalWrite(44, LOW);
myScreen.setFont(0);
myScreen.text(85, 66, "L");
}
if (RTorsoValue < 32)
{
digitalWrite(45, HIGH);
myScreen.setFont(0);
myScreen.text(85, 79, "H");
}
if (RTorsoValue > 39)
{
digitalWrite(45, LOW);
myScreen.setFont(0);
myScreen.text(85, 79, "L");
}
delay(100);
}
Below is a picture of the code running on the MSP432 with the SHARP96 (ignore the suit temperatures as I don’t have the temperature sensors as of yet)

Top Comments