Plet, the plant pet

Made by Jiaxin Wu

Found in DioT 2019: Internet of Plants

Give plants back their right to be a pet!

0

Solution

By definition, pets are animals, but there is no essential reason that plants can't be pets.  Pets should be able to provide companionship, emotional support and reduce stress levels. The main barrier for plants is the lack of reaction. In return, humans often feel plants as lifeless. 

This IOT solution provides a way for owners to interact with their plants, so they receive same level of emotional comfort. Owners are able to check the status of their plants, and the IOT device expresses "emotions" on behalf of the plant based on their conditions. 

0

Approach

The device is designed around the interactions the owner anticipates to have with its pet. The Plet should provide emotional support for the owner. 

Since the plant is unlikely to proactively attract attention with movements, the device with also initiate interactions with light, color of the light indicating emotions, and sound.  What's more, occssional notifications enabled through IFTTT augments this sense of connection even beyond a pet experience, more like a child texting his mom. 

0

Process

I ideated around how people already interact with their pets, how plants behave or are impacted by the environment, and what people would like to know about their plants. 

Considering priorities and constraints, the functions are narrowed down to the following: 

1. Sound: If attention is not received for a long time (e.g. 4 hours) the Piezo will play a tune at 10 minute intervals.

2. Status: When the owner presses on the fsr, the Plet sends a notification to comfort the owner. 

3. Emotional expressions: The Plet responds to outside environment and constantly shows its feeling.

  • Green light: It's growing! The lighting is suitable and Plet receives appropriate attention.
  • Blue light: Now feeling sad
  • Red light: In danger! Light turns red when the owner has not devoted attention to Plet for a long time. (assuming no watering, the plant needs care)
  • Purple light: Feels happy. Purple light flickers when the owner tends to Plet and also when the temperature is especially suitable. 
0

Implementation

(videos are in links)

Code

0
// Define pins
int fsrPin = A0;
int fsrReading = 0;
int photoCellPin = A1;
int photoReading = 0;
int piezoPin = D3;
int piezoPitch = 2000;

int redPin = D2;    
int greenPin = D3;  
int bluePin = D4;   

// store the time when you last published
int last_published = -1;
//calculate interval between now and last_published
int interval=-1;
//store the time last fsr
int fsr_press=-1;
//calculate interval between now and fsr_press
int fsr_interval=-1;

int definedInterval=14400000; //4 hours
int maxNoCare=28800000;//8 hours

void setup() {
    
    pinMode( redPin, OUTPUT );
    pinMode( greenPin, OUTPUT );	
    pinMode( bluePin, OUTPUT );
    pinMode(piezoPin, OUTPUT);
    
    pinMode(fsrPin, INPUT); // MUSThave if used with variables other than direct readings
    pinMode(photoCellPin, INPUT);

    Particle.variable("fsr", &fsrReading, INT);
    Particle.variable("light", &photoReading, INT);
    //Particle.variable("r", &redValue );
    //Particle.variable("g", &greenValue );
    //Particle.variable("b", &blueValue);
}

void loop() {
    
    photoReading=analogRead(photoCellPin);
    fsrReading=analogRead(fsrPin); 
    
    interval = millis()-last_published;
    fsr_interval = millis()-fsr_press;
    
    if (fsrReading > 1500) 
    {
        fsr_press=millis();
    }
    
    //light and sound
    
    //Red light: In danger! Light turns red when the owner has not devoted attention to Plet for a long time. (assuming that no watering)
    if (fsr_interval > maxNoCare)
    {
        analogWrite(greenPin, 0);
        analogWrite(bluePin, 0); //make sure the other colors are 0
        for (int i; i<3; i++)
        {
            analogWrite(redPin, 255);
            tone(piezoPin,2000);
            delay(200);
            analogWrite(redPin, 0);
            noTone(piezoPin);
            delay(200);
        }
    }
    
    //Green light: It's growing! The lighting is suitable and Plet receives appropriate attention.
    else if (photoReading < 3500 && photoReading > 2500)
    {
        analogWrite(greenPin, 255);
        analogWrite(redPin, 0);
        analogWrite(bluePin, 0);
    }
    
    //Blue light: Now feeling sad
    else if (photoReading<1000 && fsr_interval > definedInterval)
    {
        analogWrite(bluePin, 255);
        analogWrite(redPin, 0);
        analogWrite(greenPin, 0);
    }
    
    //Purple light: Feels happy. Purple light flickers when the owner tends to Plet and also when the Piezo plays a tune. 
    else if (photoReading>1000 && fsr_interval < definedInterval) 
    {
        analogWrite(redPin, 255);
        analogWrite(bluePin, 255);
        analogWrite(greenPin, 0);
        for (int i; i<3; i++)
        {
            tone(piezoPin,2000);
            delay(100);
            noTone(piezoPin);
            delay(100);
        }
    }
    else //fall back
    {
        analogWrite(redPin, 0);
        analogWrite(bluePin, 0);
        analogWrite(greenPin, 0);
    }
    
    //publish event
    if (fsrReading >1500)
    {
        if (photoReading < 3500 && photoReading > 1500)
        {
            Particle.publish( "fsr_grow", "grow" );
            last_published=millis();
        }
        else
        {
            Particle.publish( "fsr_sad", "sad" );
            last_published=millis();
        }
    }
    else if (photoReading<1000 && interval > definedInterval)
    {
        Particle.publish( "fsr_sad", "sad" );
        last_published=millis();
    }
    else if (photoReading>1000 && interval > definedInterval)
    {
        Particle.publish( "fsr_happy", "happy" );
        last_published=millis();
    }
    
    delay(10000);
 }
Click to Expand
0

List of components: 

  • Particle Argon (x1)
  • RGB LED (x1)
  • Piezo (x1)
  • FSR (x1)
  • Photo Resistor (x1)
  • 10 K Ohm Resistor (x4)
  • Wires (several)

Circuit

0

Demo Videos:

  • Red light flashing (when fsr_interval > maxNoCare). I changed the value of maxNoCare to shoot this, so it's in a separate video. Link
  • Plant is changing status from feeling sad to feeling happy, with the press of FSR. Here the definedInterval is shortened to 10s for me to capture this change. Observe the reflection on the breadboard as the LED shines too brightly into the camera. Link 
  • Plant switches from sad to grow (blue light to green light) when it receives enough light. In the video, the last line of code "delay(10000);" is changed into "delay(1000);" to show the change of status much more quickly. Link 
0

Notification Test & Results

Because the intervals for the real device is 4 hours and I don't have time to test for that, I created test code for notifications triggered by pressing the FSR and by interval from last time it sent an notification. Test code is as below, and both worked fine. 

0
int fsrPin = A0;
int fsrReading = 0;
int redPin = D2; 

int last_published = -1;
int interval=-1;

void setup() {
    pinMode(fsrPin, INPUT); 
    Particle.variable("fsr", &fsrReading, INT);
}

void loop() {
    fsrReading=analogRead(fsrPin); 
    if (fsrReading>1500)
    {
        Particle.publish( "fsr_happy", "happy" );
        analogWrite(redPin, 255);
        last_published=millis();
    }
    
    interval=millis()-last_published;
    if (interval>60000){
        Particle.publish( "fsr_sad", "sad" );
        last_published=millis();
    }
    delay(1000);
}
Click to Expand
1
"fsr_sad" is published when no event has been published within the past 1 minute. (Notice the time of publishment.) (Time of interval is set to 1 minute in the test.)
Events
0
When the FSR reading > 1500, a.k.a. the owner presses on the FSR to check on Plet, it publishes "fsr_happy" event and sends a notification with the sentence as below.
Fsr happy
0
When "fsr_sad" is published (no event has been published within the past 1 minute), IFTTT sends a notification with the sentence as above. There may be a slight delay, which would not be a big deal when the interval is 4 hours in the actual object.
Sad
0
Also when it's growing!
Grow
0

Next Steps

Adding wind detector and moisture detector will generate more possibilities of the Plet's emotion status in combination. It can offer also more data on the plant's growth which can be included in status updates for the owner to take better care of the Plet.

More user research could be done to determine whether the responses align with the user's expectations.

0

Reflection

Technical side:

  1. More experience with IFTTT, how information is transported in forms.
  2. More experience with circuits and components, as well as relevant tools e.g. fritzing.

Logic side:

  1. Practice breaking idea (function) down into tasks and sub-tasks and associating with
  2. Implement design thinking and discussion around ambient influence to create an object that enhances a person's experience.


References

I sought help on the Internet. Sources I referenced and learnt from: 

Also, thank Daragh, Andrew and Vaibhav for explanations during and after class. 

x
Share this Project

Courses

49713 Designing for the Internet of Things

· 16 members

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


Focused on
Skills
Tools
About

Give plants back their right to be a pet!

Created

November 3rd, 2019