Weather Sensing Wardrobe

Made by Ranveer Katyal

0

Intention

To create a weather sensitive wardrobe that notifies the user of the outside temperature for them to dress appropriately in an ambient way. After performing an initial inquiry of the objects and lifestyle of a first year MBA student – I discovered that very often she forgot to check the weather outside while dressing up and ended up feeling too warm or too cold. In order to fix this problem in a most non-intrusive way I came up with the idea of the weather sensitive wardrobe.

Goal:

To sense the weather outside and indicate it the user in a most non-intrusive way. Also, to provide the information with a sense of urgency of the weather is too extreme.

Process:

After conducting the interview, I started with understanding different sensors and components that can help me achieve the desired output.

The following components were used:

1. Particle Argon – Internet-connected microcontroller

2. TMP 36 Temperature sensor – to sense the temperature outside

3. Neo Pixel led – Emit different color lights to notify the user in a non-intrusive way

4. Piezo Buzzer: To emit sounds that will draw attention towards extreme weather

After discovering the components, I aim to achieve the following goals in step by step fashion:

1. Reading the temperature from the temperature sensor

2. Integrating Neo-pixel and emitting different colors based on the temperature reading:

  • Extreme Cold: Temperature less than -7 C. Color: Purple
  • Very Cold: Temperature between than -7 C and 5 C. Color: Blue
  • Cold: Temperature between than 5 C and 15 C. Color: Greenish - Blue
  • Pleasant: Temperature between than 15 C and 30 C. Color: Yellow
  • Warm: Temperature between than 30 C and 45 C. Color: Orange
  • Very hot: Temperature more than 45 C. Color: Red

3. Next, I added clothing suggestions based on the temperature that can be accessed on a mobile phone (in future) using an API.

  • Extreme Cold: Its crazy cold today! Try to cover up all exposed body parts!!
  • Very Cold: It's quite cold today! Consider layering up!!
  • Cold: It's somewhat cold. Probably you should get a sweater
  • Pleasant: It's a pleasant day. Have a good one!
  • Warm: It's a warm day today! Consider some light clothes!
  • Very hot: It's quite hot today! Be careful!!

4. After I achieved this - I realized that the temperature sensor was passing a lot of noise and the colors of the neo pixel were changing quite frequently. In order to fix that – I created an array to store the temperature values for the duration of 1 second and then averaged those values out to stabilize the output.

5. Next important step was to create a setup that would draw the attention of the user immediately to notify them of the extreme weather conditions. I achieved this by the following steps: In case of extreme weather conditions,

  • The led would pulsate that would draw attention
  • The Piezo buzzer would beep    


Code

0
// This #include statement was automatically added by the Particle IDE.
#include <neopixel.h>

// IMPORTANT: Set pixel COUNT, PIN and TYPE
#define PIXEL_COUNT 1
#define PIXEL_PIN D7
#define PIXEL_TYPE WS2812B
Adafruit_NeoPixel strip(PIXEL_COUNT, PIXEL_PIN, PIXEL_TYPE);

int redValue = 255; // Full brightness for an ANODE RGB LED is 0, and off 255
int greenValue = 255; // Full brightness for an ANODE RGB LED is 0, and off 255
int blueValue = 255; // Full brightness for an ANODE RGB LED is 0, and off 255</td>
int buzzerPin = D5; // output pin for buzzer
int tempPin = A0;

int piezoPin = D2; // Setting up the piezo buzzer pin
int piezoPitch = 500;

double tempC;
String sugg;
void setup() {
    pinMode( tempPin , INPUT); // sets pin as input
    pinMode(piezoPin, OUTPUT);
    Particle.variable("temprature",tempC);
    Particle.variable("Suggestion",sugg);

	
  // Set up our NEOPIXEL RGB Pin pins for output
    strip.begin();
}

void loop() {
    double voltage;
    int readSum = 0;
    int read[10];
    int j;
    //taking a sample of temprature reading over a period of one second
    for(j=0; j<10;j++){
        read [j] = analogRead(tempPin);
        readSum = readSum + read[j];
        delay(100);
    }
    //average out the readings to reduce noise
    int reading = readSum/j;
    voltage = (reading * 3.3) / 4095.0;
    tempC = (voltage - 0.5) * 100;
    if (tempC<=-7){
        sugg = "Its crazy cold today! Try to cover up all exposed body parts!!";
        //pulsating purpule
        for (int i=0; i<5; i++){
                setRGBColor( 175,25,175); //set led to flash Purple
                delay(500);
                setRGBColor( 0,0,0);
                tone(piezoPin, piezoPitch, 100); //warning sound for extreme weather
                delay(500);
            }
            delay(1000); //remove the flickering
        }
    else if (tempC<=5 && tempC>-7){
        sugg = "Its quite cold today! Consider layering up!!";
        setRGBColor( 0,0,255); //Set the LED to flash Blue
        delay(1000); //remove the flickering
    }
    else if(tempC>5 && tempC<=15 ){
        sugg = "Its somewhat cold. Probably you should get a sweater";
        setRGBColor( 0,255,153); //set led to flash green-blue
        delay(1000); //remove the flickering
        
    }
    else if(tempC>15 && tempC<=30){
        sugg = "Its a pleasent day. Have a good one!";
            setRGBColor( 251,234,0); //set led to flash yellow
            delay(1000); //remove the flickering
       
    }
    else if(tempC>30 && tempC<=45){
        sugg = "Its a warm day today! Consider some light clothes!";
        setRGBColor( 2243,73,8); //set led to flash orange
        delay(1000); //remove the flickering
       
    }
    else{
        sugg = "Its quite hot today! Be careful!!";
        //pulsating red
            for (int i=0; i<5; i++){
                setRGBColor( 255,0,0); //set led to flash Purple
                delay(500);
                setRGBColor( 0,0,0);
                tone(piezoPin, piezoPitch, 100);
                delay(500);
             }
            delay(1000); //remove the flickering
        }
    }
void setRGBColor( int r, int g, int b ){
	
  redValue = r;
  greenValue = g;
  blueValue = b;
	
  strip.setPixelColor(0, redValue, greenValue, blueValue);
  strip.show();
}
Click to Expand
0

Circuit

0

Outcome

0
TempratureSensing: Extreme cold
Ranveer Katyal - https://www.youtube.com/watch?v=MjCkYu8mg4g
0
TempratureSensing: Extreme Hot
Ranveer Katyal - https://youtu.be/OAXRMq9MU3Y
0

Reflection and Future Work:

It was a fun activity trying to create an ‘enchanted’ object out of a regular wardrobe. Its interesting that it would help the user in a non-intrusive fashion solving one of daily lifestyle problem.

1. Integration of a live weather API – It would provide a stable source of the weather inputs. Also, it would help capture other details such as rain and snow forecast.

2. Force sensors – It would help detect when the user is opening the doors of the wardrobe that would help activate the circuit.

References

https://diotlabs.daraghbyrne.me

Code snippets and Tutorials used

x
Share this Project


About

~

Created

January 31st, 2019