PurBox

Made by Wendy Wei

Purbox is a cat IoT that enables you to play with your 🐱 while you are away from home. This product has an integrated laser pointer which would be activated when your 🐱 approaches. Now enjoy peace of mind knowing your pet and home are having fun.

0

Problem Statement

It’s common for cats to develop behaviour changes when left alone for too long. Yes, they are a solitary species, but think about it — don’t you get a little fidgety when you have no social interactions for a while? Cats crave stimulation just as people do, and encounter the same feelings of anxiety, depression and loneliness.

0

Goal

We love our pets, but our busy lives can keep us apart when we want to stay close. Purbox is dedicated to connecting people with their pets through technology. With motion detection, a embedded laser pointer would be activated to stimulate your pets.

0

Process

The device is composed of a servo with a laser. A Particle Photon controls the servo routine, and the device is triggered by a motion sensor. The motion sensor has a lag time to allow for the routine to play out and the cat to leave.

Set-up instructions:

1. Register Particle Photon.

Either download Particle Dev or use Particle IDE to write and flash firmware. The Photon can be powered via laptop/desktop USB or power bricks. Each requires 4.8 V DC.

2. Assemble the servo kit, mount it to a stable surface, and attach the laser to the servo arm. For the last step, I used a rubber band. 

3. Test the servo to check arm positioning and range.

4. Adjust angles and delays in laser movement, then flash it to servo Photon.

5. Assemble motion sensor and check photoresistor readings, adjusting beamThreshold level in "Motion Sensor" to 400.

6. Flash "Motion Sensor" to the Photon.

7. Test, adjust delay under "Motion Sensor" as needed.

Final Circuit Diagram:

0

Outcome

See following for completed final code.

0
int ledPin = D0;
int photoCellPin = A0;
int laser = D2;
int servoPin = A5;
int lightReading = 0;
int lightThreshold = 400;
Servo myServo; //create servo object
int Pos = 0;

void setup() {
 pinMode(ledPin, OUTPUT);
 pinMode(photoCellPin, INPUT);
 myServo.attach(A5);
 pinMode(laser, OUTPUT);
 Serial.begin(9600);
 Particle.variable("light", &lightReading, INT);
}

void loop() {
 lightReading = analogRead(photoCellPin); //current reading
 Serial.println(lightReading); //print out reading
 if (lightReading > lightThreshold) {
   digitalWrite(ledPin, HIGH); //LED always on
   digitalWrite(laser, HIGH); //laser on
   for(Pos = 0; Pos < 45; Pos += 5) // goes from 0 degrees to 180 degrees
{         // in steps of 1 degree
myServo.write(Pos);    // tell servo to go to position in
         // variable 'pos'
delay(15);      // waits 15ms for the servo to reach
         // the position
}
for(Pos = 45; Pos>=1; Pos-=5)  // goes from 180 degrees to 0 degrees
{
myServo.write(Pos);    // tell servo to go to position in
         // variable 'pos'
delay(15);      // waits 15ms for the servo to reach
         // the position
}
 }else{
   digitalWrite(laser, LOW);
   for(int i = 0; i <=50; i += 2) {
     analogWrite(ledPin, i);
     delay(100);
   }
   for(int i = 50; i >=0; i -= 2) {
     analogWrite(ledPin, i);
     delay(100);
   }
 }
}
Click to Expand
0
PurBox
Wendy Wei - https://youtu.be/SOvDs9T1Dtg
0

Estimated  cost is $35.58

  • A Particle Photon: $19.00
  • A breadboard: $4.95
  • A servo: $9.90
  • A photoresistor: $0.95
  • A LED: $0.50
  • Two 1kΩ resistor: $0.04 each 
0

Reflection:

The entire assembling process was fun and smooth. I learned to start simple and build on simple device. It would be better if I could replace the current photoresistor to a motion sensor so it can detect more accurate movements. 

x
Share this Project


Focused on
About

Purbox is a cat IoT that enables you to play with your 🐱 while you are away from home. This product has an integrated laser pointer which would be activated when your 🐱 approaches. Now enjoy peace of mind knowing your pet and home are having fun.

Created

January 25th, 2017