In/Outdoor Heat Comparer

by YaBoyJerm in Circuits > Arduino

265 Views, 3 Favorites, 0 Comments

In/Outdoor Heat Comparer

In/Outdoor heat comparer

Whew it's hot!.

The glass windows upstairs sure are great at trapping all the heat generated by the sun!

Wish there was a way something could warn me if I am exposed to the risk of a stroke, to remind me to turn on that water-sprinkler...

Well worry no more!

With summer creeping around the corner, the room gets really toasty for people living on the top floor. Glass roofs especially as it traps heat generated by the sun, and often people stay in the heated room for way too long concentrating on their work, exposing themselves to risks of having a heatstroke. My device helps people with comparing temperature from the inside and out, reminding them to turn on the water-sprinkler to cool down the room, lowering their risk of stroke.

The In-Outside heat comparer can tell you exactly when your room is getting a tad bit too toasty!

The two temperature readings will be used to activate other devices in the future, for example water sprinkler. The outdoor sensor is used for detecting heat and activating a water sprinkler, spraying water on the glass roof, and cooling it down. The indoor sensor is checks out the cooling result of water on glass roof, and users can make a call whether it is necessary to turn on ventilation for additional cooling effect.

Supplies

- I2C LCD Display (x1)

- Green LED (x2)

- Yellow LED (x2)

- Red LED (x2)

- 100 ohm resistor (x6)

- 1k ohm resistor (x2)

- Male-to-Female wires (x20)

- Male-to-Male wires (x14)

- Arduino board (x1)

- Thermistor 20k SEN14 (x2)

- Bread Board (x1)

Assemble the Thermistor

螢幕擷取畫面 (33).png

Connect the two Thermistor as shown in the picture, input A0 is for indoor temperature, input A1 is for outdoor temperature. Remember, aside from the Thermistors, connect the bread board to both 5V (Positive) and GND (Negative) power from the Arduino board.

**Because I couldn't find the thermister model in the simulator, I replaced it with the blue capacitor**

Connect the Light Indicators

螢幕擷取畫面 (30).png

Plug in each individual lights, with the long end corresponding to positive and shorter one negative. Remember the first row of lights are indicators going from Red to Yellow to Green are indicators of inside temperature, plugging into A13, 12, 11. The second row of lights correspond to temperatures on the outside, plugging into A10, 9, 8.

Finishing the Wiring:

螢幕擷取畫面 (34).png

Making the Electrical Box

IMG_2587.JPG
IMG_2598.JPG

The making of the box can be changed based on personal preference, and can be made out of any material.

Top and bottom panels are 28*20cm

Longer side panels are 6*28cm

Shorter side panels are 6*20cm

After cutting out the shape of the box, glue everything together besides the top panel, you need to open the box if you want to make improvements or repairs.

After gluing the box, its time to make space for the LED indicators and LCD for your heat comparer.

Cut out a 7*2.3cm gap for the LCD and cut open two lines after it, (For the LEDs) [Shown above]

Keep in mind the top row of the LCD is indoors temperature, and bottom row is outdoors.

Finishing the Whole Build

IMG_2591.JPG
IMG_2590.JPG

Above you can see what the interior of the finished build looks like. Again, These are all suggestions, you can customize the box however you wish!

To close the top panel, I decided to use magnets, so the cover can snap on/off anytime i wish. (For example if the wires got loose)

**Putting up the comparer**

Lead the thermoster connected to A1 to the roof, this will be the outdoors temperature, the one connected to A0 is for indoors.

Finishing Touches...

After assembling your electrical box, you can start decorating! my decoration is not an absolute must, it is just a suggestion, feel free to add whatever you like!

The code can be found here (Downloadable file can be found at the bottom):

#include <Wire.h>
#include <LiquidCrystal_I2C.h>

int _indoortemp ;
int _outdoorstemp ;
// For these LCD controls to work you MUST replace the standard LCD library from...
// <a href="https://github.com/marcoschwartz/LiquidCrystal_I2C" rel="nofollow">  https://github.com/marcoschwartz/LiquidCrystal_I2...>
// Direct download <a href="https://github.com/marcoschwartz/LiquidCrystal_I2C/archive/master.zip" rel="nofollow">  https://github.com/marcoschwartz/LiquidCrystal_I2...>
// Your project will not compile until this is done.
LiquidCrystal_I2C lcd_I2C_27(0x27, 16, 2); // set the LCD address for a 16 chars and 2 line display

void setup() { // put your setup code here, to run once:
  lcd_I2C_27.init (); // initialize the lcd screen
  lcd_I2C_27.backlight();
  pinMode( 13, OUTPUT);    // Red indicator for indoor temperature
  pinMode( 12, OUTPUT);    // Yellow indicator for indoor temperature
  pinMode( 11, OUTPUT);    // Green indicator for indoor temperature
  pinMode( 10, OUTPUT);    // Red indicator for outdoor temperature
  pinMode( 9, OUTPUT);    // Yellow indicator for outdoor temperature
  pinMode( 8, OUTPUT);    // Green indicator for outdoor temperature
  lcd_I2C_27.clear();   // Clear lcd screen

}

void loop() { // put your main code here, to run repeatedly:
  _indoortemp = analogRead( A0 ) ;   // Set "indoortemp" variable to input from A0
  _outdoorstemp = analogRead( A1 ) ;   // Set "Outdoorstemp" variable to input from A1
  if (  _indoortemp < 560  &&  _indoortemp > 0  ) {   // If indoor temperature variable exeeds 0 but lesser than 560, perform said action
    lcd_I2C_27.clear();
    lcd_I2C_27.setCursor(0, 0) ;  // set the cursor, counting begins with 0
    lcd_I2C_27.print( "good" ); // Print a message "Good" to the LCD.
    digitalWrite( 13, LOW );   // sets the red light off
    digitalWrite( 12, LOW );   // sets the yellow light off
    digitalWrite( 11, HIGH );   // sets the Green light on
    if (  _outdoorstemp < 560  &&  _outdoorstemp > 0  ) {   // If outdoor temperature variable exeeds 0 but lesser than 560, perform said action
      lcd_I2C_27.setCursor(0, 1) ;  // set the cursor, counting begins with 0
      lcd_I2C_27.print( "good" ); // Print a message "Good" to the LCD.
      digitalWrite( 10, LOW );   // sets the red light off
      digitalWrite( 9, LOW );   //  sets the yellow light off
      digitalWrite( 8, HIGH );   // sets the Green light on
    }
    if (  _outdoorstemp < 600  &&  _outdoorstemp > 560  ) {   // If outdoor temperature variable exeeds 560 but lesser than 600, perform said action
      lcd_I2C_27.setCursor(0, 1) ;  // set the cursor, counting begins with 0
      lcd_I2C_27.print( "warm, drink water" ); // Print a message "Warm, drink water" to the LCD.
      digitalWrite( 10, LOW );   // sets the red light off
      digitalWrite( 9, HIGH );   // sets the yellow light on
      digitalWrite( 8, LOW );   // sets the Green light off
    }
    if (  _outdoorstemp < 800  &&  _outdoorstemp > 600  ) {   // If outdoor temperature variable exeeds 600 but lesser than 800, perform said action
      lcd_I2C_27.setCursor(0, 1) ;  // set the cursor, counting begins with 0
      lcd_I2C_27.print( "Sprinkle water" ); // Print a message to the LCD.
      digitalWrite( 10, HIGH );   // sets the red light on
      digitalWrite( 9, LOW );   // sets the yellow light off
      digitalWrite( 8, LOW );   // sets the Green light off
    }
    delay( 1000 ); // waits 1 second (1000 miliseconds)
  }
  if (  _indoortemp < 600  &&  _indoortemp > 560  ) {   // If indoor temperature variable exeeds 560 but lesser than 600, perform said action
    lcd_I2C_27.clear();
    lcd_I2C_27.setCursor(0, 0) ;  // set the cursor, counting begins with 0
    lcd_I2C_27.print( "warm, drink water" ); // Print a message to the LCD.
    digitalWrite( 13, LOW );   // sets the digital pin on/off
    digitalWrite( 12, HIGH );   // sets the digital pin on/off
    digitalWrite( 11, LOW );   // sets the digital pin on/off
    if (  _outdoorstemp < 560  &&  _outdoorstemp > 0  ) {   // If outdoor temperature variable exeeds 0 but lesser than 560, perform said action
      lcd_I2C_27.setCursor(0, 1) ;  // set the cursor, counting begins with 0
      lcd_I2C_27.print( "good" ); // Print a message "Good" to the LCD.
      digitalWrite( 10, LOW );   // sets the red light off
      digitalWrite( 9, LOW );   //  sets the yellow light off
      digitalWrite( 8, HIGH );   // sets the Green light on
    }
    if (  _outdoorstemp < 600  &&  _outdoorstemp > 560  ) {   // If outdoor temperature variable exeeds 560 but lesser than 600, perform said action
      lcd_I2C_27.setCursor(0, 1) ;  // set the cursor, counting begins with 0
      lcd_I2C_27.print( "warm, drink water" ); // Print a message "Warm, drink water" to the LCD.
      digitalWrite( 10, LOW );   // sets the red light off
      digitalWrite( 9, HIGH );   // sets the yellow light on
      digitalWrite( 8, LOW );   // sets the Green light off
    }
    if (  _outdoorstemp < 800  &&  _outdoorstemp > 600  ) {   // If outdoor temperature variable exeeds 600 but lesser than 800, perform said action
      lcd_I2C_27.setCursor(0, 1) ;  // set the cursor, counting begins with 0
      lcd_I2C_27.print( "Sprinkle water" ); // Print a message to the LCD.
      digitalWrite( 10, HIGH );   // sets the red light on
      digitalWrite( 9, LOW );   // sets the yellow light off
      digitalWrite( 8, LOW );   // sets the Green light off
    }
    delay( 1000 ); // waits 1 second (1000 miliseconds)
  }
  if (  _indoortemp < 800  &&  _indoortemp > 600  ) {   // If indoor temperature variable exeeds 600 but lesser than 800, perform said action
    lcd_I2C_27.clear();
    lcd_I2C_27.setCursor(0, 0) ;  // set the cursor, counting begins with 0
    lcd_I2C_27.print( "sprinkle water" ); // Print a message to the LCD.
    digitalWrite( 13, HIGH );   // sets the digital pin on/off
    digitalWrite( 12, LOW );   // sets the digital pin on/off
    digitalWrite( 11, LOW );   // sets the digital pin on/off
    if (  _outdoorstemp < 560  &&  _outdoorstemp > 0  ) {   // If outdoor temperature variable exeeds 0 but lesser than 560, perform said action
      lcd_I2C_27.setCursor(0, 1) ;  // set the cursor, counting begins with 0
      lcd_I2C_27.print( "good" ); // Print a message "Good" to the LCD.
      digitalWrite( 10, LOW );   // sets the red light off
      digitalWrite( 9, LOW );   //  sets the yellow light off
      digitalWrite( 8, HIGH );   // sets the Green light on
    }
    if (  _outdoorstemp < 600  &&  _outdoorstemp > 560  ) {   // If outdoor temperature variable exeeds 560 but lesser than 600, perform said action
      lcd_I2C_27.setCursor(0, 1) ;  // set the cursor, counting begins with 0
      lcd_I2C_27.print( "warm, drink water" ); // Print a message "Warm, drink water" to the LCD.
      digitalWrite( 10, LOW );   // sets the red light off
      digitalWrite( 9, HIGH );   // sets the yellow light on
      digitalWrite( 8, LOW );   // sets the Green light off
    }
    if (  _outdoorstemp < 800  &&  _outdoorstemp > 600  ) {   // If outdoor temperature variable exeeds 600 but lesser than 800, perform said action
      lcd_I2C_27.setCursor(0, 1) ;  // set the cursor, counting begins with 0
      lcd_I2C_27.print( "Sprinkle water" ); // Print a message to the LCD.
      digitalWrite( 10, HIGH );   // sets the red light on
      digitalWrite( 9, LOW );   // sets the yellow light off
      digitalWrite( 8, LOW );   // sets the Green light off
    }
    delay( 1000 ); // waits 1 second (1000 miliseconds)
  }
}/*

*/

void setup() {

}

void loop() {

}