Calm Tech Dog Monitor

Made by Matthew M ·

We are often away from our dogs for long periods of time. Wouldn't it be nice to know your pet is safe and sound without having to constantly check?

0
This is Fermi
D9ef105e 80cb 43e8 81f8 8f7af76786c7.thumb
0

The Problem:

My roommate is often away from his dog Fermi for extended periods of time. As a result, he is often worried about his pet’s wellbeing, and is generally curious about what he is doing. While there are countless pet video systems on the market, they require constant vigilance, and the act of opening an app to check a video stream is an interruption to his everyday activities. Ken lacks the ability to passively monitor and feel connected with his dog remotely.

0

Project Goal

The goal of the project is to prototype an unobtrusive and “Calm” way to monitor what Fermi is doing. His owner should be able to be made aware of Fermi’s status without actively seeking out the information.

Fermi is a Greyhound, a breed known for sleeping throughout the day. As such, Fermi being located on his bed is a fair proxy for ruling out unordinary events that might be of concern to his owner.

The ultimate vision for the project is to detect when Fermi is on his bed and when he is not, and utilize an orb to display his status remotely, with an ambient glow. 

For the purposes of this prototype, a sensor will detect whether Fermi is on his bed (or not), and post that status to Twitter.

0

The Process

The first step in was to revise scope. I planned to leverage published projects for weight sensing and add a second particle that controlled an LED, but later decided particle to particle communication was not an appropriate complexity for an initial prototype.

0

My research regarding FSR’s also revealed the physicality of sensing pressure of a large object would be challenging. I opted for a mat used to detected someone standing.


0

Next, I created a simple circuit for a toggle switch that powered an LED. The LED would represent system status to the user. (diagram)

The toggle switch also afforded me the opportunity to integrate IFTT with Google Docs, where I had intended to log status and test the logic of comparing previous state vs current state.


0

I then used a push switch as a stand in for the mat in order to limit my variables.

0

I moved the IFTT logic from the LED switch to the push switch. Multiple events with the same target created conflicts within Google Docs, even as unique events with delays. I ultimately used Twitter for logging.

Finally I replaced the push switch for the mat without issue, and the prototype was ready for testing.

0
is fermi sleeping
Matthew Miller - https://youtu.be/slkek3TeVFU
0

Outcome

0
int switchState = 0;
int previousSwitchState = 0;

int floorState = 0;
int previousFloorState = 0;
int status = 0;

int ledPin = D1;
int switchPin = D0;
int floorPin = D6;

void setup()
{
  pinMode( switchPin , INPUT_PULLUP); // sets pin as input
  pinMode( floorPin , INPUT_PULLDOWN);
  pinMode( ledPin , OUTPUT ); // sets pin as output
}

void loop()
{

  if (status == 1)
    {
      digitalWrite( ledPin, HIGH);
    }
  else if (status == 0)
    {
      digitalWrite( ledPin, LOW);
    }

   int switchState = digitalRead( switchPin );
  floorState = digitalRead( floorPin);

//LIGHT AND SYSTEM STATUS
// set system status flag where 1 is ON, 0 is OFF
//status effects state of LED
  if(switchState == HIGH)
  {
     status = 1;
  } else if (switchState == LOW)
  {
    status = 0;
  }

if(previousFloorState == LOW && floorState == HIGH && status == 1 ){

Serial.println("DOWN");
Particle.publish("bed_status", "sleeping");
}

if(previousFloorState == HIGH && floorState == LOW && status == 1 ){

Serial.println("GOT UP");
Particle.publish("active_status", "not sleeping");

}
previousFloorState = floorState;

}
Click to Expand
0

Parts

- Particle Photon

- Breadboard

- Toggle Switch

- LED

- Push Switch (for testing)

- Detection Mat

- Resistor (10k Ω)

- USB Micro cable

0

Next Steps

As a refinement to the existing prototype, I will need to eliminate the noise of rapidly toggling the floor mat on then off, as this likely represents Fermi settling into place, and not a long-term position which the project is concerned with. Setting a time threshold is likely simple, feasible approach.

The next in the larger project is to determine the best method for particle to particle communication either by logging the sleep status into a spreadsheet or that can be read by a second particle, or by using the particle API on both ends of IFTT. It would also be worthwhile to investigate if variable monitoring is a more efficient or responsive solution than publishing events each time the state of the floor switch changes.

0

Reflections

   The most significant learning from this project was with regard to the usefulness of using stand-in parts, and testing code on circuits proven to be working properly. By using a push switch to simulate the floor mat detection apparatus, I was able to get started before the part arrived, and focus on producing working code before troubleshooting issues of physicality. Furthermore, by initially hooking up IFTT to the system status/LED switch, the process of learning the IFTT platform, however simple, was uninterrupted by questions of whether the my second circuit has been properly configured. However, had I followed through on the approach     

0
IMG 0106
Matthew Miller - https://youtu.be/vvDsYJSyJ3s
x
Share this Project

This project is only accessible by signed in users. Be considerate and think twice before sharing.


Courses

49313 Designing for the Internet of Things (Undergrad)

· 22 members

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


Focused on
About

We are often away from our dogs for long periods of time. Wouldn't it be nice to know your pet is safe and sound without having to constantly check?