Don't forget !!!!

Never again you have to worry about forgetting important things in the morning rush.

Made by Rajlakshmee Rajlakshmee

We all forget to pickup important things in hurry. What if when we opened our main door and it reminded us to pick these important things. What if we never have to worry again about these small but very important things. I have tried to solve this problem, by creating a force sensitive pad where I can keep important objects and if I forget to pick them up, my door knob connected to a tilt sensor triggers a alarm when I am leaving my house, reminding me to pick them. Don't worry, Be happy. Image link for cover image. http://wac.450f.edgecastcdn.net/80450F/rev967.com/files/2013/09/Forgetting.jpg

Created: January 28th, 2015

0

We always forget things under stress. Recently I had an injury and lost a tooth, and quite a few times I forget to wear my fake tooth ( imagine a day without the bunny tooth smile).

 But there are many things which are even more important that we forget like medicines, keys etc. and regret whole day. How we always wish that someone could have reminded us.  "Don't forget" is here to remind me, and take away my worries. 

"Don't forget" is a small pad or a place that is sensitive to pressure by using a  Force Sensitive Resistor. When one leaves home in the morning, a tilt motion sensor in the main door triggers an alarm if the objects are still on the pad. 

Components:

Spark Core

Breadboard

Jumper Wires

Force Sensitive Resistor

Tilt sensor – SW 200 D

2x 10K Ohm Resistors

2x 1K Ohm Resistors

Piezo Buzzer

Red LED

Step 1: Brain storm and sketches of various ways to connect these sensors to the spark core to have a better understanding about the circuits.

0

Step 2: Started connecting FSR and and core from the tutorials  https://github.com/daraghbyrne/DesigningIoT/blob/master/4.%20Basics%20of%20Sensors/b.%20Force/FSRExample/FSRExample.ino


0

Variable readings from FSR sensor.

0

Step 3: After FSR sensor was connected, I tried working with tilt motion sensor as a switch. Starting from here: https://learn.adafruit.com/tilt-sensor/using-a-tilt-sensor. initially  I coded the sensor just as FSR connecting it to analog pin at the core, and I struggled for hours trying to get variable readings for the angle to know in final result at what angle alarm gets triggered. But later I realized that Tilt sensor just works as switch  and it can only have high and low, and re connected the Tilt sensor to digital pin on the core, as shown below. 


0

Step 4:  Now I tried connecting Peizo Buzzer to the core. But till now all these three sensors have been working separately.

0

As I had started one sensor at a time, in the end I had too many wires jumbled up as shown in the picture below. But They could have been connected in much neater way which I figured out later as shown in the above diagram.

0

Step 5: After making all the three different sensors work separately, I started to put all the pieces together in terms of coding. Initially I was trying to  create music by giving different values as code from https://learn.adafruit.com/adafruit-arduino-lesson-10-making-sounds/playing-a-scale . But how much ever I tried I could not make it work. 

0
int speakerPin = D5;

int numTones = 10;
int tones[] = {261, 277, 294, 311, 330, 349, 370, 392, 415, 440};
//            mid C  C#   D    D#   E    F    F#   G    G#   A


// Define a pin that we'll place the FSR on
// Remember to add a 10K Ohm pull-down resistor too.
int fsrPin = A0;
int tiltPin = D3;

// Create a variable to hold the FSR reading
int fsrReading = 0;
int tiltstate = 0;

// Define a pin we'll place an LED on
int ledFsr = D0;
int ledTilt = D2;
// Create a variable to store the LED brightness.
int ledBrightness = 0;

//
void setup(){

  // Set up the LED for output
  pinMode(ledFsr, OUTPUT);
  pinMode(ledTilt, OUTPUT);

  pinMode(tiltPin, INPUT);

  // Create a cloud variable of type integer
  // called 'light' mapped to photoCellReading
  Spark.variable("force", &fsrReading, INT);
}

void loop() {

  // Use analogRead to read the photo cell reading
  // This gives us a value from 0 to 4095
  fsrReading = analogRead(fsrPin);

  // Map this value into the PWM range (0-255)
  // and store as the led brightness
  ledBrightness = map(fsrReading, 0, 4095, 0, 255);

  // fade the LED to the desired brightness
  analogWrite(ledFsr, ledBrightness);

  // wait 1/10th of a second and then loop
  //delay(100);


  tiltState = digitalRead(tiltPin);

  // check if the pushbutton is pressed.
  // if it is, the buttonState is HIGH:
  if (tiltstate == HIGH) {
    // turn LED on:
    for (int i = 0; i < numTones; i++)
  {
    tone(speakerPin, tones[i]);
    delay(100);
  }
  noTone(speakerPin);}

    digitalWrite(ledTilt, HIGH);
  }
  else {
    // turn LED off:
    digitalWrite(ledTilt, LOW);
  }



}
Click to Expand
0

After many iterations, I still couldn't figure out the variations in tones, and moved towards a simpler code where it just makes continuous noise. At last I could figure it out looking at other people's project in the class that it can be done in much simpler way. Below is the final code for the Don't forget pad.

0
int speakerPin = D5; // Piezo is connected to pin D5

// Defining a pin that we'll place the FSR and tilt sensor on
int fsrPin = A0;
int tiltPin = D3;

// Creating a variable to hold the FSR and Tilt sensor reading
int fsrReading = 0;
int tiltstate = 0;

// Defining a pin we'll place LEDS on- for indicting status of both FSR and Tilt Sensor
int ledFsr = D0;
int ledTilt = D2;

// Creating a variable to store the LED brightness.
int ledBrightness = 0;

bool tilt = false;
bool force = false;


void setup()
{

  // Set up the LEDs for output
  pinMode(ledFsr, OUTPUT);
  pinMode(ledTilt, OUTPUT);

  pinMode(tiltPin, INPUT);
  pinMode(speakerPin, OUTPUT);

  // Create a cloud variable of type integer
  // called 'force' mapped to FSR
  Spark.variable("force", &fsrReading, INT);
}

void loop() {

  // Use analogRead to read the FSR reading
  // This gives us a value from 0 to 4095
  fsrReading = analogRead(fsrPin);

  // Map this value into the PWM range (0-255)
  // and store as the led brightness
  ledBrightness = map(fsrReading, 0, 4095, 0, 255);

  // fade the LED to the desired brightness
  analogWrite(ledFsr, ledBrightness);

  // wait 1/10th of a second and then loop
  //delay(100);


  tiltstate = digitalRead(tiltPin);

  // check if the tilt Sensor is active
  // if it is, the state is HIGH:
  if (tiltstate == HIGH){
    digitalWrite(ledTilt, HIGH);

    //if both tilt sensor and FSR are active then start the buzzer
    if(fsrReading > 150)
    {
      digitalWrite(speakerPin, HIGH);
      delay(100);
      digitalWrite(speakerPin, LOW);
      delay(100);
      }
  }
  else {
    // turn LED off:
    digitalWrite(ledTilt, LOW);
  }

}
Click to Expand
0

Though it's not very aesthetic but in the end I could make my concept work. It does have flaws in the concept itself,  like alarm would ring each time door knob opens, and door can not identify when you are actually leaving the house. when you are just opening the door for certain task. But as a starting point I was only aiming at much simpler concept knowing that I may not have answers at present for bigger questions like identifying when it's an exit and when it's a movement of the main door knob for other purpose.  Below is the video of my first every connected object. " Don't forget." 

0
0
x
Share this Project


About

We all forget to pickup important things in hurry. What if when we opened our main door and it reminded us to pick these important things. What if we never have to worry again about these small but very important things. I have tried to solve this problem, by creating a force sensitive pad where I can keep important objects and if I forget to pick them up, my door knob connected to a tilt sensor triggers a alarm when I am leaving my house, reminding me to pick them.

Don't worry, Be happy.

Image link for cover image.
http://wac.450f.edgecastcdn.net/80450F/rev967.com/files/2013/09/Forgetting.jpg