Biswajit MishraManguru Rakhra
Published

Heat Warning System

This is a proposed system that would aid municipalities in warning citizens about current weather conditions using real time data.

IntermediateWork in progress117
Heat Warning System

Things used in this project

Hardware components

Arduino UNO
Arduino UNO
Ideally, we would have used a platform that supports WiFi.
×1
Temperature Sensor
Temperature Sensor
Make sure the polarity is connect or you might smoke up the room.
×1
I2C 16x2 Arduino LCD Display Module
DFRobot I2C 16x2 Arduino LCD Display Module
Having an I2C module makes things easier, but it will make it difficult to have multiple LCD modules.
×1
HDF board
This was just for the enclosure. Any material could be used.
×1

Software apps and online services

Arduino IDE
Arduino IDE

Hand tools and fabrication machines

Laser cutter (generic)
Laser cutter (generic)
Sure is nice to have one of these around.

Story

Read more

Schematics

Schematic

Code

Heat Warning System Code

Arduino
Upload this code into any arduino based platform.
#include <LiquidCrystal_I2C.h>;

// Initialize LCD
LiquidCrystal_I2C lcd(0x27, 20, 4);

void setup() {
  Serial.begin(9600);

  lcd.init();
  lcd.backlight();

}

void loop() {

  int sensorValue = analogRead(A0);
  float voltage = sensorValue * (5.0 / 1023.0);
  float temperature = voltage * 100;
  //float temperature = 98; //We can change this value for testing purposes

//Data Storage
  Serial.println("Time, Temperature");
  Serial.print(",");
  Serial.println(temperature);

  int roundedTemp = (int)temperature;

  String tempStr = String(roundedTemp);
  tempStr = tempStr + "F";
  

if (temperature > 50 && temperature < 95){
  lcd.clear();
  lcd.setCursor(2, 0);
  lcd.print("Temperature");
  lcd.setCursor(6, 1);
  lcd.print(tempStr);
  delay(10000);
  
  lcd.clear();
  lcd.setCursor(4,0);
  lcd.print("Nice and");
  lcd.setCursor(4,1);
  lcd.print("Comfy!");
  delay(10000);
}
else if (temperature > 95 && temperature < 105){
  lcd.clear();
  lcd.setCursor(2, 0);
  lcd.print("Temperature");
  lcd.setCursor(6, 1);
  lcd.print(tempStr);
  delay(5000);

  lcd.clear();
  lcd.setCursor(2,0);
  lcd.print("High Risk");
  lcd.setCursor(2,1);
  lcd.print("of Heatstroke");
  delay(5000);

  lcd.clear();
  lcd.setCursor(2,0);
  lcd.print("Hydrate");
  lcd.setCursor(4,1);
  lcd.print("Often");
  delay(5000);

  lcd.clear();
  lcd.setCursor(4,0);
  lcd.print("Stay");
  lcd.setCursor(4,1);
  lcd.print("Inside");
  delay(5000);
}
else if (temperature > 105){
  lcd.clear();
  lcd.setCursor(2, 0);
  lcd.print("Temperature");
  lcd.setCursor(6, 1);
  lcd.print(tempStr);
  delay(5000);

  lcd.clear();
  lcd.setCursor(4,0);
  lcd.print("DANGER");
  lcd.setCursor(2,1);
  lcd.print("STAY INSIDE");
  delay(10000);
}

else {
  lcd.clear();
  lcd.setCursor(2, 0);
  lcd.print("Temperature");
  lcd.setCursor(6, 1);
  lcd.print(tempStr);
  delay(10000);
}

}

Credits

Biswajit Mishra

Biswajit Mishra

3 projects • 1 follower
UW Madison Electrical Engineering Student
Manguru Rakhra

Manguru Rakhra

1 project • 0 followers

Comments