RoomBuddy

Made by Kashyap Nishtala

RoomBuddy is a device that is placed on the door of a room. It detects who comes to the room and gives a signal accordingly. You can preset your parameters and expect a warm hello from RoomBuddy whenever you enter your room. However, when someone else enters your room, RoomBuddy texts you about the person while sending his/her rough features. It works by using Particle platform and sensors such as motion detector and ultrasound sensor. The information is communicated through the particle cloud.

0

Problem Statement: 

My roommate has a door with a weak lock, so she has no control over who comes and enters her room. I chose her because through IOT, the problem can be easily solved by giving triggers.

0

Goal:

The main goal of this project is to make the person aware of the activity in a private space, i.e., detect motion and get feedback if any. The feedback is received in the form of an SMS connected through IFTTT. 

0

Process:

The process included designing the hardware, i.e., connecting the sensor and LED to the photon and writing code to input and output the data. Many iterations were done to make the circuit work and get it connected to IFTTT. Although the circuitry is easy to assemble, the real bulk of the work lies in getting it connected to IFTTT and writing code accordingly to perfectly match the action you want the device to trigger. 




0

The final circuit connections are shown below. The blue LED light blinks when motion is detected, and transfers the signal to the cloud and to the mobile phone through IFTTT. 

0

Outcome: 

RoomBuddy is a device that can detect motion in your room/office and send a notification to your phone. It uses Particle to connect to IFTTT and send SMS alerts to your phone. 

0

The code for the project is given below. 

0
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 = 10000;      // 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("motion-detected");
      // 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

The components are then connected with reference to the Fritzing sketch as shown below. 

0

The components used are:

Photon particle - 1

PIR motion sensor - 1

Breadboard - 1

LED light - 1

Jumper wires - 6

0

A video of the working prototype. 

0
0

Reflection: 

This project serves as an entry point in the field of IOT and provides touch points to many new things. Ideally, I wanted to create something that would give a trigger based on motion, as well as a description of the person involved in the action. For that, I would need more components and better coding skills, which I hope to achieve in the near future. Since the first step is achieved, i.e., creating a trigger for motion, the next step would involve sending triggers about the details of the motion as well as a description of the person/s involved in the motion. 

0

References: 

Motion Sensor by Jessica : https://particle.hackster.io/ripley/motion-sensor-0b914a 

x
Share this Project


Focused on
Skills
About

RoomBuddy is a device that is placed on the door of a room. It detects who comes to the room and gives a signal accordingly. You can preset your parameters and expect a warm hello from RoomBuddy whenever you enter your room. However, when someone else enters your room, RoomBuddy texts you about the person while sending his/her rough features.
It works by using Particle platform and sensors such as motion detector and ultrasound sensor. The information is communicated through the particle cloud.

Created

January 25th, 2018