Laundry Matt

Made by jdoresky

Found in DIoT 2018 1- Home Hack

A notification system that notifies when their washer and dryer has completed processing using photo sensors.

0

Laundry Matt is a smart device that communicates the completion of your washer and dryer's process. This is especially useful for older machines and for those who like to continue moving while their laundry is being cleaned. It will notify users of the time, temperature, and humidity statuses of the machines. The notification will be sent via sms and provide status when prompted. It can also be added to google calendar so it will fit seamlessly into your daily activities. It can help the user indicate if the machine is damaged if the statuses appear to be communicating strange readings. 

0

Hardware Components

DHT22 Temperature Sensor x 1

Photo Resistor x 2

Particle Photon x 2

Resistor 10k ohm x 3

Breadboard x 1

Cables 


EDIT Bill of Materials

Hardware 

Photo Resistor x2

Particle Photon x1

Resistor 10Kohm x2

Resistor 220 ohm x1

Breadboard x1

Cables

0

  • Problem Statement

My roommate Matt does his laundry in small loads rather than big, lump sum loads. Therefore, he is always using the washing machine and dryer. In order for me to get to the machines, I have to enter through his room to pass through, which is awkward and inconvenient when he is not there. Come to find out Matt has left his laundry in the washing machine when I inevitably need to use it. I do not want to be responsible for his sopping wet laundry nor do I want to touch his intimate clothing, despite being clean it is the principle of the matter. He just leaves his clothes in and forgets about them being in there and leaves to go about his day.

  • Goal

I wanted to give Matt a notification system for the washer and dryer so he may plan his time accordingly. If he leaves his clothes in the washing machine for too long, they begin to smell and acquire an odor. It is also inconvenient for his roommates even though he means no harm. By providing him with a notification means of determining when his laundry is finished, he can go about his day and still be aware of when he needs to switch from the washer to the dryer. I decided to give him an ambient notification device using photoresistors that go over the washing machine light in order to detect its completion of the cycle. When the photoresistor detects the light on the washer is off, it will submit a notification that it is finished.

  • Process

Firstly, I used some code for a similar type of system from Martin Smaha from hackster. His code was much more intricate than I was seeking. Therefore, I was able to reduce a significant amount of his code and posted variable functions so that it would register the light levels of the photoresistors.


0

Once this was working fine, I tried to incorporate a secondary element to the circuit, a temperature and humidity sensor so that it may be able to determine if the machines are not only done but are also working properly. However, as I added this additional function, it caused my photon to blink red and turn off. I decided to pull this addition so that my circuit could still function.

0

After that point, my photon’s light would not come on and I thought I had destroyed it. The power light would not turn on, the underside of the breadboard would get hot and the device would not transmit any data to the server. I struggled trying to troubleshoot this issue. Finally, I was able to discover a wiring mismatch (see the red circles below) that got messed up when I removed the other circuit.

0

Since I had 2 photoresistors (one for washer and one for dryer), I wanted to use a blinking LED, instead, as a visual to identify if the washer was running or the dryer was running. As I added that element and compiled, my photon code suddenly started to experience a “compiler timed out or encountered an error” issue. I had no idea how to remedy this despite hours of research to resolve the issue.

0

In order to determine if it was a photon issue or a code issue, I separated the blinking LED circuit from the main circuit and made a separate folder for the code. When I ran that, it compiled fine. So, I was able to get the blinking LED part resolved.

My code was still experiencing a compile issue. I did not remember that running a new code would reset my photon’s memory. So, the previously working photon sensor receivers are now unable to push through and be received because the blinking LED code replaced the memory. So, the LED is still blinking but I cannot overwrite the code with the photoresistors because I have a compile time out issue that I cannot resolve.

  • Outcome

My device is close to being finished electronically but I cannot continue forward until I know the circuit and code is running correctly. As it stands now, the compile time out issue seems to be something many people experience but not many can figure it out (according to web research).

Once I can resolve this compile time out issue, I can add personalization elements and possibly incorporate text messages from Twilio so that Matt can be notified anywhere as long as he has his phone. I would also build a housing and actually attempt to adhere the devices onto the washer and dryer.

  • Reflection
I was very disappointed I could not fully get my circuit to perform as intended. It was frustrating that I had to keep making corrections and simplifying the circuit even though I know these would be simple fixes for someone who fully understands Particle. Hopefully, after consulting with the professor I will have the opportunity to go back and fix the washer apparatus and implement the code and device as I intended (this would include the humidity and temperature sensor). I think one of the greatest pieces of knowledge I might be able to acquire is what "compile timed out error" means and how to resolve it as many people do not know.  
0
#include <string.h>

 int washerAnalogPin = A0;
 int dryerAnalogPin = A1;
 int led1 = D0;
 int led2 = D7;
 bool isWasherRunning;
 bool isDryerRunning;
 unsigned long WasherRunTime_sec;
 unsigned long DryerRunTime_sec;
 unsigned long msecLast;
 int washerValue;
 int dryerValue;

void setup() {
  pinMode(led1, OUTPUT);
  pinMode(led2, OUTPUT);
  digitalWrite(led2, LOW);
  // variables
  msecLast = millis();
  washerValue = 0;
  dryerValue = 0;

  Particle.variable( "Washer_WhiteBlack", washerValue) ;
  Particle.variable("Dryer_BlueGreen", dryerValue);
}

// loop() runs over and over again, as quickly as it can execute.
void loop() {

  unsigned long msec = millis();
  if (msec > msecLast) {
    unsigned long diff = msec - msecLast;
    if (diff >= 1000) {
      ReadAnalogs();//only read them once per second
      diff -= 1000;
      msecLast = msec - diff;
    }
  } else {
    msecLast = msec;// this throws away 1 millisecond every 49 days due to wrapping
  }
  digitalWrite(led1, HIGH);
  digitalWrite(led2, HIGH);

  // We'll leave it on for 1 second...
  delay(1000);

  // Then we'll turn it off...
  digitalWrite(led1, LOW);
  digitalWrite(led2, LOW);

  // Wait 1 second...
  delay(1000);
}


void ReadAnalogs(void) {
  washerValue = analogRead(washerAnalogPin);  // read the analogPin
  bool isON = (washerValue < 1024);
  if (isWasherRunning) {
    if (isON) {
      WasherRunTime_sec++;
    } else {
      isWasherRunning = false;
      if (WasherRunTime_sec >= 60) { //prevents notifications when cycling thru timer
        Particle.publish("LAUNDRY","Washer Done",60,PRIVATE);
      }
    }
  } else {
    if (isON) {
      isWasherRunning = true;
      WasherRunTime_sec = 0;
    }
  }
  dryerValue = analogRead(dryerAnalogPin);  // read the analogPin
  isON = (dryerValue < 1024);
  if (isDryerRunning) {
    if (isON) {
      DryerRunTime_sec++;
    } else {
      isDryerRunning = false;
      if (DryerRunTime_sec >= 60) { //prevents notifications when cycling thru timer
        Particle.publish("LAUNDRY","Dryer Done",60,PRIVATE);
      }
    }
  } else {
    if (isON) {
      isDryerRunning = true;
      DryerRunTime_sec = 0;
    }
  }
  if (isWasherRunning || isDryerRunning) { //used of initial testing
    digitalWrite(led2, HIGH);
  } else {
    digitalWrite(led2, LOW);
  }
}
Click to Expand
0
IOT Blinking Light
Jack Doresky - https://vimeo.com/253735172
0
0
x
Share this Project

Courses

49713 Designing for the Internet of Things

· 25 members

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


Focused on
About

A notification system that notifies when their washer and dryer has completed processing using photo sensors.

Created

January 24th, 2018