Weatherbox by Matthew Brigante & Sneha Pai

Physical Computing Midterm Project, SVA Interaction Design MFA
Matthew Brigante & Sneha Pai

The Weatherbox is a desk or bedside companion that displays an ambient and abstract light-based representation of the temperature and wind-speed outside your window. Throughout the seasons, it will reflect meaningful shifts in temperature with a specific color of LED light emitted for each incremental range.

A reading that is below 35 degrees fahrenheit will be represented by blue lights on both ends of the Weatherbox. For every 15-20 degrees increase in temperature, the Weatherbox will output a warmer color of light. The warmest outdoor temperatures of 80-110 degrees will output a red light. The center panel of the Weatherbox displays the rate of outdoor wind speed with an animated LED array that changes the speed of animation based on the rate of wind passing by your window.

Method

For the wind aspect of the Weatherbox, we used a wind sensor (from Modern Device).

image

For the temperature aspect, we used a TMP 36 temperature sensor (from Sparkfun).

image

Arduino code

For temperature sensor:

int redPin = 11;
int greenPin = 10;
int bluePin = 9;
const int tmp= A0;
void setup()
{
pinMode(bluePin, OUTPUT);
pinMode(greenPin, OUTPUT);
pinMode(redPin, OUTPUT);
Serial.begin(9600);
}
void loop()
{
int sensorValue = analogRead(tmp);
float mVoltage = sensorValue * 5000.0/1024.0;
float tmpC = (mVoltage - 500) / 10.0;
Serial.print(tmpC);
Serial.println(" degrees C");
delay (1000);
if((tmpC <= -1 ) && (tmpC >= -17))
{ setColor(0, 0, 255); } // blue
else { setColor(0, 0, 0);}
if ((tmpC <= 7 ) && (tmpC >= -0))
{ setColor(0, 255, 255); } // aqua
else {setColor(0, 0, 0);}
if ((tmpC <= 22 ) && (tmpC >= 8))
{ setColor(0, 255, 0);} // green
else {setColor(0, 0, 0);}
if ((tmpC <= 27 ) && (tmpC >= 23))
{setColor(255, 255, 0); } // yellow
else {setColor(0, 0, 0);}
if ((tmpC <= 40 ) && (tmpC >= 28))
{setColor(255, 0, 0); } // red
else {setColor(0, 0, 0);}
}
void setColor(int red, int green, int blue)
{
analogWrite(redPin, red);
analogWrite(greenPin, green);
analogWrite(bluePin, blue);
}

For wind sensor:

//
    // Written for the LoL Shield, designed by Jimmie Rodgers:
    // http://jimmieprodgers.com/kits/lolshield/
    // Adapted from Noisy by Jacob Joaquin <jacobjoaquin@gmail.com> 10/3/2012
    //wind sensor parts
    int windmin;
    int windmax;
    //lolshield
    #include "Charliplexing.h"
    void setup()
    {
    //lolshield setup
    LedSign::Init();
    //wind sensor setup
    Serial.begin(9600);
    windmin = analogRead(A0); // calibrate wind sensor on analog pin A0
    windmax = windmin+400;  //this is where the range is declared
    }
    void loop()
    {
    int windSensor = analogRead(A0); // read wind sensor value
    //
    if(windSensor<windmin) windSensor=windmin; // compress ends of scale to avoid going out of range
    if(windSensor>windmax) windSensor=windmax;
    //
    int windoutput = map(windSensor, windmin,windmax,0,100); //remap wind value to length of array
    Serial.println(windoutput);
    delay(150);
    if ((windoutput <= 10) && (windoutput >= 0 ))
    {
    for(uint8_t y = 0; y < 9; y++)
    {
    for(uint8_t x = 0; x < 14; x++)
    {
    LedSign::Set(x, y, random(2));
    }
    }
    delay(2000);
    }
    else if ((windoutput <= 20) && (windoutput > 10 )) {
    for(uint8_t y = 0; y < 9; y++)
    {
    for(uint8_t x = 0; x < 14; x++)
    {
    LedSign::Set(x, y, random(2));
    }
    }
    delay(1500);
    }
    else if ((windoutput <= 30) && (windoutput > 20 )) {
    for(uint8_t y = 0; y < 9; y++)
    {
    for(uint8_t x = 0; x < 14; x++)
    {
    LedSign::Set(x, y, random(2));
    }
    }
    delay(1000);
    }
    else if ((windoutput <= 40) && (windoutput > 30 )) {
    for(uint8_t y = 0; y < 9; y++)
    {
    for(uint8_t x = 0; x < 14; x++)
    {
    LedSign::Set(x, y, random(2));
    }
    }
    delay(750);
    }
    else if ((windoutput <= 50) && (windoutput > 40 )) {
    for(uint8_t y = 0; y < 9; y++)
    {
    for(uint8_t x = 0; x < 14; x++)
    {
    LedSign::Set(x, y, random(2));
    }
    }
    delay(500);
    }
    else if ((windoutput <= 60) && (windoutput > 50 )) {
    for(uint8_t y = 0; y < 9; y++)
    {
    for(uint8_t x = 0; x < 14; x++)
    {
    LedSign::Set(x, y, random(2));
    }
    }
    delay(300);
    }
    }

 

Putting together the Weatherbox:

image

The wind and temperature sensor fixture:

image

The completed Weatherbox:image

 

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

Create a website or blog at WordPress.com

Up ↑

%d bloggers like this: