It's TooDry

Made by Wu-Chou Kuo

Found in Home Hack · UNLISTED (SHOWN IN POOLS)

It's TooDry is aiming to create an alarm to remind us to drink water when the environment is too dry.

0

Introduction

My roommate and I are both coming from a higher humidity area. When we first came to Pittsburgh, we realized that the air is too dry for us sometimes. Then we often felt thirsty, had dry lips (sometime it even hurt), and bleeding noise.

By creating TooDry, it will be able to detect the humidity in environment and signal the level of it through LED. When TooDry finds out the condition is not comfortable for us, it will send an alert to our phone to warn us.


Goal

Create a ambient device that can tell us the dryness of the room in a obvious mean. Therefore, we will be able to aware of the condition and react properly.


Video Introduction

  https://goo.gl/gNVRNE  


TooDry Features

1. Display through LED lights

2. Notify by phone APP

3. Push the button can require the current humidity

4. Suggest the time to drink more water  

0

Process: Difficulty - Easy

Overall, this project is not a hard one. Even though I faced several problems and pivoted from my original design, I am still able to present the idea in a reliable way so that people can understand it.

1. Took a long time to find the right sample code for humidity sensor - DHT22

The most reliable code is the library code in Web IDE.  https://build.particle.io/build/588fb77cb8e7330e72000326

2. Applet created on IFTTT doesn't work out as I think

What we read on IFTTT doesn't work out the same way I perceived it. I wish there are some examples can let us look into.

0

3. Unfamiliar with the code function

If I am a little bit more familiar with the particle code, I think I will finish this project way much faster. It took me a long time to make sure the function work out as the way I want. I also built lots of functions to check each variable so that I can monitor them during the process to make sure the accuracy of them.


Bill of Parts

(1) 5* White LEDs

(2) 1* Humidity Sensor - DHT22

(3) 1* Push Button

(4) 1* 1k Resister

(5) 1* Particle Photon


PCB Circuit

0

Reflection

This is my first time to use photon to build a IoT product. I spent a lot of time to get familiar with the environment and also manage the device to work properly. Since I wasted a lot of time at front, I was not able to spend time on studying the RGB LED light. My original design is to use two circular LED lights and have one of them to shine from light blue to dark blue in order to display the level of humidity and have the other one to shine in the same way with red to present the temperature. But time is never on my side. So I ended up with normal white LED lights to show the level of humidity. With the experience this time, I realized the key to build up a functional prototype depends on how fast can I understand other people's code. It takes time to accumulate the experience. For the project next week, I am positive that I can build more cool functions that I have in my head.

Reference

Cover Photo Credit: https://faithrxd.org/wp-content/uploads/2014/09/Thirsty.jpg

DHT22 Sample Circuit: http://www.kevinhoyt.com/2014/11/14/circuit-friday-dht22/

DHT22 Datasheet: https://goo.gl/H5h41X

0
#include "PietteTech_DHT.h"  // Uncomment if building in IDE
#define DHTTYPE  DHT22       // Sensor type DHT11/21/22/AM2301/AM2302
#define DHTPIN   6           // Digital pin for communications

PietteTech_DHT DHT(DHTPIN, DHTTYPE);
int n;      // counter
int numPins = 5; // how many led we have
int ledPins[ 5 ] = { D0, D1, D2, D3, D4 }; //assign the pin of led
int buttonled = D7;
int check = 0;
int buttonPin = D5; // Button Pin
int buttonsend = 0; // tell the button status on cloud
double humidity;      // store the value of humidity

void setup()
{
    Serial.begin(9600);
    for( int i = 0 ; i < numPins; i++ ){
      pinMode(ledPins[ i ], OUTPUT);
    }
    pinMode(buttonPin, INPUT_PULLUP); // sets pin as input
    pinMode(buttonled, OUTPUT);
    Particle.variable("Button", &buttonsend, INT);
}

void loop()
{
    int result = DHT.acquireAndWait();

    switch (result) {
        case DHTLIB_OK:
            Serial.println("OK");
            break;
        case DHTLIB_ERROR_CHECKSUM:
            Serial.println("Error\n\r\tChecksum error");
            break;
        case DHTLIB_ERROR_ISR_TIMEOUT:
            Serial.println("Error\n\r\tISR time out error");
            break;
        case DHTLIB_ERROR_RESPONSE_TIMEOUT:
            Serial.println("Error\n\r\tResponse time out error");
            break;
        case DHTLIB_ERROR_DATA_TIMEOUT:
            Serial.println("Error\n\r\tData time out error");
            break;
        case DHTLIB_ERROR_ACQUIRING:
            Serial.println("Error\n\r\tAcquiring");
            break;
        case DHTLIB_ERROR_DELTA:
            Serial.println("Error\n\r\tDelta time to small");
            break;
        case DHTLIB_ERROR_NOTSTARTED:
            Serial.println("Error\n\r\tNot started");
            break;
        default:
            Serial.println("Unknown error");
            break;
    }

    humidity = DHT.getHumidity(); // grab the value of humidity at this moment
    humidity = round(humidity*10)/10; //round the digit into 2 decimals
    if (humidity >= 0){
      displayhumiditylevel();
      Particle.variable("Humidity", &humidity, DOUBLE); //Send data to cloud

      int buttonState = digitalRead( buttonPin );
      if( buttonState == LOW ){
        buttonsend = 1;
        digitalWrite(buttonled, HIGH); //Make D7 as a LED indicator that we enter this if.
        String wordhumidity = String(humidity); //Make double into string so that can be published
        Particle.publish("ButtonPushed", wordhumidity);
        delay(1000);
      }else{
        buttonsend = 0;
        digitalWrite(buttonled, LOW);
      }
      delay(500);
    }

}

void displayhumiditylevel(){ //display the humidity with LED lights
  int level = 10;
  for( int i = 0 ; i < numPins; i++ ){
    int led = ledPins[ i ];
    int desiredLevel = level * (i+1);
    if( humidity >= desiredLevel ){
        digitalWrite(led, HIGH);
    }else{
        digitalWrite(led, LOW);;
    }
  }
}
Click to Expand
x
Share this Project

This project is only listed in this pool. Be considerate and think twice before sharing.


Found In
Courses

49-713 Designing for the Internet of Things

· 26 members

A hands-on introductory course exploring the Internet of Things and connected product experiences.


About

It's TooDry is aiming to create an alarm to remind us to drink water when the environment is too dry.

Created

January 26th, 2017