Catch the Culprit

Made by Vignesh

Found in DIoT 2018 1- Home Hack

The product would send a notification whenever my roommate's food in the fridge is disturbed by my other hungry roommate. All of us have had many instances when our food in the fridge has gone disappearing and no one else in the house seems to know about it. This product would help us realize that our food has been disturbed in the fridge and send a notification to our phone. This has been done using the IFTTT module.

0

Problem Statement

I live in a six house with five other roommates. It happens that we have two fridges and three of us share each fridge respectively. Sometimes food goes missing from the fridge and the owner of the item never realizes until its been over a week and no one takes the responsibility of having taken the food from the fridge. What could be done to let the food owner know that his food has been taken??

0

Goal 

The goal of the project was to devise a product that would notify the user that his food has been stolen from the fridge. The notification would be received through the IFTTT application on phone even when the user is miles away from home.

0

Parts Used

  PIR Motion Sensor - 1 

  Particle Photon - 1 

  Piezo Buzzer - 1  

  Jumper Wires - 6

  Resistor - 1 

  Breadboard - 1  

0

Process

The process involved was pretty much simple. The circuit was made, the photon was connected to the Wifi Network and the computer, the event was published and a notification was sent to the phone using IFTTT. The challenge lied in getting the PIR (Motion) sensor to function as the range had to be set up and the calibration was done.

1
int inputPin = D0;              // choose the input pin (for PIR sensor)
int ledPin = D1;                // LED Pin
int pirState = LOW;             // we start, assuming no motion detected
int val = 0;                    // variable for reading the pin status

int calibrateTime = 1000;      // wait for the thingy to calibrate

void setup()
{
  pinMode( ledPin, OUTPUT );
  pinMode(inputPin, INPUT);     // declare sensor as input
}

void loop()
{

  // if the sensor is calibrated
  if ( calibrated() )
  {
  // get the data from the sensor
    readTheSensor();

    // report it out, if the state has changed
    reportTheData();
  }
}

void readTheSensor() {
  val = digitalRead(inputPin);
}

bool calibrated() {
  return millis() - calibrateTime > 0;
}

void reportTheData() {

  // if the sensor reads high
  // or there is now motion
  if (val == HIGH) {

    // the current state is no motion
    // i.e. it's just changed
    // announce this change by publishing an eent
    if (pirState == LOW) {
      // we have just turned on
      Particle.publish("FOOD/STOLEN");
      // Update the current state
      pirState = HIGH;
      setLED( pirState );
    }
  } else {
    if (pirState == HIGH) {
      // we have just turned of
      // Update the current state
      pirState = LOW;
      setLED( pirState );
    }
  }
}

void setLED( int state )
{
  digitalWrite( ledPin, state );
}
Click to Expand
0
0
0

Reflection

With very little/zero background knowledge in coding and circuits, it was initially quite hard to understand the setup. But with analyzing the code and understanding each segment, it became comparatively easier to make things work. If I had a next chance, I would want to integrate a camera/hall effect sensor for the feedback mechanism and make the product more effective and usable. 

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

The product would send a notification whenever my roommate's food in the fridge is disturbed by my other hungry roommate. All of us have had many instances when our food in the fridge has gone disappearing and no one else in the house seems to know about it. This product would help us realize that our food has been disturbed in the fridge and send a notification to our phone. This has been done using the IFTTT module.

Created

January 25th, 2018