Weather Clothes Recommender - Dress Appropriately

by TechMartian in Circuits > Arduino

1400 Views, 5 Favorites, 0 Comments

Weather Clothes Recommender - Dress Appropriately

IMG_20170827_211522.jpg
IMG_20170827_211529.jpg
IMG_20170827_211737.jpg

This is a mini local weather station that can be setup either on your backyard or even on your bedside window. It uses information gathered about the weather using sensors and an Arduino to make an appropriate recommendation given the weather outside.

BoM

  • Arduino
  • LCD Display
  • Temperature sensor - TMP36
  • Breadboard
  • Jumper cables
  • Breadboard cables

Wiring

IMG_20170827_211910.jpg
IMG_20170827_211903.jpg
Screen Shot 2017-08-29 at 12.30.06 AM.png
Screen Shot 2017-08-29 at 12.30.37 AM.png
IMG_20170827_211708.jpg
IMG_20170827_211715.jpg
IMG_20170827_211658.jpg
IMG_20170827_211746.jpg

Follow the table below for a concise guide for wiring the peripherals with the Arduino Board.

I/OI/O Pin# Arduino Pin#
Temperature Sensor 1GND
2A0
33.3V
LCD Pin#Potentiometer Pin#Arduino Pin#
1, 5, and 161GND
2 and 1533.3V
32
412
611
115
124
133
142

Code

Screen Shot 2017-08-30 at 8.34.48 AM.png
Screen Shot 2017-08-30 at 8.34.49 AM.png
// built in arduino library
#include <LiquidCrystal.h>

LiquidCrystal lcd(12,11,5,4,3,2);
int tempVal;  //raw reading variable
float volts;
float tempC;
float tempF;
void setup()
{
  lcd.begin(16, 2);
  // clear old screen data
  lcd.clear();
  // text to be dispalyed on the screen
  Serial.begin (9600);
}
void loop()
{
 //read the temp sensor and store it in tempVal
 tempVal = analogRead(A0);
 
 //converting that reading to voltage by multiplying the reading by 3.3V 
 volts = tempVal * 3.3;
 volts /= 1023.0;
 //calculate temperature celsius from voltage
 tempC = (volts - 0.5) * 100 ;
  // Convert from celcius to fahrenheit
 tempF = (tempC * 9.0 / 5.0) + 32.0;
 Serial.println(tempC);
 
 // (column 0) of the second line (line 1):
 lcd.setCursor(0,0);
 lcd.write ("Temp: ");
 lcd.setCursor (7, 0);
 lcd.print (tempC, 2);
 lcd.setCursor (13, 0);
 lcd.write ("C");
 if (tempC <0){
 lcd.setCursor (0, 1);
 lcd.write ("wear winter coat")
 }else if (temp <20){
  lcd.write ("wear light coat");} else if (tempC<25){
    lcd.write ("windbreaker");} else if (tempC>30){
      lcd.write ("beach weather!!!")}
 // for farenheit temperatures
 /*
 lcd.setCursor(0,1);
 lcd.write ("Temp: ");
 lcd.write (tempF);
 lcd.setCursor (10, 1)
 lcd.write ("F");
 */
 
  delay(1000);
}

Mount

IMG_1695.jpg
IMG_1696.jpg
IMG_1698.jpg

Snake the wires through to the outside of your window under the screen. It's easiest to remove the screen, mount the temperature sensor and then replace the screen.

Enjoy!

IMG_20170827_211526.jpg

Enjoy your build!

And wear weather appropriate clothing, stay warm, stay cool (depending on your hemisphere)!!!