Tech

Arduino Uno

The Thermal Sense Glove uses an Arduino Uno board to send various outputs based on the reading from the temperature sensor. The Arduino Board is like the brain of the project. It handles code, sends information and reads information. In my case it reads values from the temperature sensor which my code converts to degrees Celsius and sends an Output to the correct LED.

TMP36 (Temperature Sensor)

The TMP36 is the temperature sensor that my project uses. It uses infrared radiation to collect data on heat around. It stores these in values which have to be converted into degrees using a unique formula. To get:


Voltage: reading * 5.0

voltage /= 1024.0;


Temperature in degrees Celsius = (voltage - 0.5) * 100 ;


The TMP36 has 3 legs, The first one is the V+ leg which is responsible of being connected to the positive terminal on a breadboard. The second one is Vout, which is basically the pin that sends/receives information. The final pin is Ground which is connected to the negative terminal on a breadboard.

Passive Buzzer (Piezo) and LED's

MY project also uses a Piezo, The Piezo is used to alert the user when something is too hot or cold and can be dangerous to the human being. The Piezo works along with the LED's as it only works when there are 3 LED's on in either color. The Piezo consists of two legs, one positive and one negative. The negative connects to the negative terminal and the positive connects to the output pin. My innovation also uses Light Emitting Diodes. I have them in different colours where green means normal and blue means cold and red means hot. The structure of the LED is very similar to the piezo, there is a positive side and a negative side.

Video Text

My innovation is a Temperature Sensing glove. Just like the name says, it is a temperature sensing glove which uses a temperature sensor (also known as the TMP36). The temperature sensor takes in infrared radiation given off by heat which then are converted into values. The Arduino than takes in these values and converts them into degrees celsius. Due to my coding, The arduino would send information to the corresponding digital and analog pins based on the temperature reading. If the temperature is between -10 degrees and 30 degrees, a green LED would light up indicating that it is normal. If it is between 30 - 35 degrees one red LED would light up, 2 red led’s for 35-40 degrees and 3 for 40 degrees and higher. For the one blue LED to light up the temperature would have to be between -10 and -28, 2 for -28 to -40 and 3 for -40 and up. Basically the LED’s have been coded based on severity depending on how hot or cold things are. It gives you an indication of how harmful the temperature can be to you body. If the temperature reaches higher than 40 or lower than -40. A piezo will sound. Alerting you that you may suffer serious damage to your body. As you can see, just some coding, wiring and effort can easily solve an serious issue in today's society


Code

// Glove for people who cannot feel with hands


int blueLED1 = A2; //blue LEDs (temperatures <-10C)

int blueLED2 = A1; //second blue LED analog pin

int blueLED3 = A0; //third blue LED anolog pin

int redLED1 = 10; //red LEDs (temperatures >30C)

int redLED2 = 8; //second red LED pin

int redLED3 = 7; // third redLED pin


int greenLED = 6; // green for safe touch


int piezo = 9; //piezo pin number


int piezodelay = 500; //amount of time the piezo stops for before making next sound

int sensorPin = 4; // select the input pin for the temperature sensor

int sensorValue = 0; // variable to store the value coming from the sensor

float temperatureC; //temperature in celcius


void setup() {

pinMode(blueLED1, OUTPUT); // declare the LED Pins as OUTPUTs:

pinMode(blueLED2, OUTPUT); //second blueLED pin as OUTPUTs

pinMode(blueLED3, OUTPUT); // third blueLED pin as OUTPUT

pinMode(redLED1, OUTPUT); //first redLED pin as OUTPUT

pinMode(redLED2, OUTPUT); //second redLED pin as OUTPUT

pinMode(redLED3, OUTPUT); //third redLED pin as OUTPUT

pinMode(greenLED, OUTPUT); //greenLED in as OUTPUT

pinMode(piezo, OUTPUT); //piezo pins as OUTPUT


Serial.begin(9600);

}

void loop() {

int reading = analogRead(sensorPin); // read the value from the sensor:

delay(500);


float voltage = reading * 5.0;

voltage /= 1024.0;


Serial.print(voltage); Serial.println(" volts");


float temperatureC = (voltage - 0.5) * 100 ; //converting from 10 mv per degree wit 500 mV offset

//to degrees ((voltage - 500mV) times 100)

Serial.print(temperatureC); Serial.println(" degrees C");

if (temperatureC >= -40 && temperatureC < -28) //lights three blue LEDs

{

digitalWrite(blueLED1, HIGH); //blue LED turns on

digitalWrite(blueLED2, HIGH); //blue LED turns on

digitalWrite(blueLED3, HIGH); //blue LED turns on

digitalWrite(redLED1, LOW); //red LED turns off

digitalWrite(redLED2, LOW); //red LED turns off

digitalWrite(redLED3, LOW); //red LED turns off

digitalWrite(greenLED, LOW); //green LED turns off

tone(piezo, 1000, 500); //activates piezo

delay(piezodelay); //stops piezo for 0.5 seconds

}

if (temperatureC >= -28 && temperatureC < -20) //lights two blue LEDs

{

digitalWrite(blueLED1, LOW); //blue LED turns off

digitalWrite(blueLED2, HIGH); //blue LED turns on

digitalWrite(blueLED3, HIGH); //blue LED turns on

digitalWrite(redLED1, LOW); //red LED turns off

digitalWrite(redLED2, LOW); //red LED turns off

digitalWrite(redLED3, LOW); //red LED turns off

digitalWrite(greenLED, LOW); //green LED turns off

//tells LCD what to type

}

if (temperatureC >= -20 && temperatureC < -10 ) //lights one blue LEDs

{

digitalWrite(blueLED1, LOW); //blue LED

digitalWrite(blueLED2, LOW);

digitalWrite(blueLED3, HIGH);

digitalWrite(redLED1, LOW);

digitalWrite(redLED2, LOW);

digitalWrite(redLED3, LOW);

digitalWrite(greenLED, LOW);

lcd.setCursor(0, 1);

lcd.print('type');

}

if (temperatureC > -10 && temperatureC < 30 ) //lights one green LED

{

digitalWrite(blueLED1, LOW);

digitalWrite(blueLED2, LOW);

digitalWrite(blueLED3, LOW);

digitalWrite(redLED1, LOW);

digitalWrite(redLED2, LOW);

digitalWrite(redLED3, LOW);

digitalWrite(greenLED, HIGH);

}

if (temperatureC > 30 && temperatureC < 35 ) //lights one red LEDs

{

digitalWrite(blueLED1, LOW);

digitalWrite(blueLED2, LOW);

digitalWrite(blueLED3, LOW);

digitalWrite(redLED1, HIGH);

digitalWrite(redLED2, LOW);

digitalWrite(redLED3, LOW);

digitalWrite(greenLED, LOW);

lcd.setCursor(0, 1);

lcd.print(millis() / 1000);

}

if (temperatureC > 35 && temperatureC < 40 ) //lights two red LEDs

{

digitalWrite(blueLED1, LOW);

digitalWrite(blueLED2, LOW);

digitalWrite(blueLED3, LOW);

digitalWrite(redLED1, HIGH);

digitalWrite(redLED2, HIGH);

digitalWrite(redLED3, LOW);

digitalWrite(greenLED, LOW);

}

if (temperatureC > 40 ) //lights three red LEDs

{

digitalWrite(blueLED1, LOW);

digitalWrite(blueLED2, LOW);

digitalWrite(blueLED3, LOW);

digitalWrite(redLED1, HIGH);

digitalWrite(redLED2, HIGH);

digitalWrite(redLED3, HIGH);

digitalWrite(greenLED, LOW);

tone(piezo, 1000, 500);

delay(piezodelay);

}

Serial.print(temperatureC);

Serial.println(voltage);

}