My Pet Plant– Dhruv Vaishnav– Eric Parren

In 8th grade, my parents and sister entrusted me with the responsibility of caring for the outdoor plants while they were away for my sister’s out-of-state Gymnastics Competition. Naively, I didn’t fully grasp the level of care required to sustain those plants. Despite my best intentions, I only managed to water them once, and by the time my family returned, the scorching Texas heat and lack of water had taken a toll on the plants, leaving them lifeless. The group project that we did earlier this semester made me think critically about the type of interaction I wanted from this midterm project. Further, I felt as if I wanted to utilize human response as a characteristic of this project; while in the group project, the sensors on our Insomniac 2000 would respond based on data from hormone levels, however, after reminiscing on this issue that happened to me in 8th grade and reflecting on the project, we decided that we would respond to the needs of the plants. We wanted to bring the plant to life and create a more meaningful connection between the two living beings. We hope that this product brings more value to irresponsible 8th graders, or anyone who loves plants, but has a busy lifestyle.

The plant and the photoresistor needed to be facing the sunlight, meanwhile the moisture detector needed to be inserted into the soil of the plant. We decided to go with a box style where the plant was seamlessly placed into the box with a little slit for the photoresistor. The plant was also placed into a coffee cup for its perfect size which was then placed into the box. This provided an ergonomic environment for the plant, in the box there were two Arduinos where one operated the ultrasonic distance sensor and the other operated the moisture sensor and the photoresistor. We cut out two holes on the box for the photoresistor, and the 2 buzzers were attached to separate breadboards which sounded depending on the need of the plant. Initially, we were planning on adding wheels to the bottom of the device so the device could follow the owner, so we started off with foam boards, but as we realized that the 3 DC motors were not responding to the distance sensor, we decided to abandon that idea and recreate the design with cardboard. Cardboard tended to be a more sturdy option and was easier to cut firm scissions into for the LDR, and the wiring. 

To begin with, we created a system with a singular Arduino where we were able to connect the photoresistor LDR and the moisture detector to the plant, we created this system so when the values from the LDR and the moisture detector fell below a certain threshold, the buzzer would sound indicating that the plant needed more sunlight or water. The owner would then water the plant and move the plant towards sunlight until the buzzer would stop making a sound. The buzzer would make different sounds depending on what was needed (water, sunlight, or both).   We knew that if we added another Arduino, then we would need to connect it to another computer or a battery pack. We decided to choose the latter, this way, we could use a second Arduino to attach it to the ultrasonic distance sensor and a separate buzzer. The point of this is that when you are close to your plant, the ultrasonic distance sensor will register this and sing you a song, making the time between you and your plant more enjoyable.

There were many problems that we endured throughout the process. Further, initially, we planned on attaching 3 DC motors on the bottom of the device, and have them move based on the distance from the wall. This would allow the “pet plant” to physically follow the owner around, making sure that you never lose sight of your plant. However, the main issue with this was that all the motors would move without any registration of the distance sensor. We decided to add an LED light to the circuit to make sure that it was not a coding issue, but while the LED was responding correctly to the code, the wheels would continue to move. The transistor Tip 122 would reach a super high temperature, and so did the LED light we attached. We had to scrap the initial frame and then build a new way that the owner could interact with their plant, which is when we decided that we could substitute the wheels for music from a buzzer. 

Below is the code for the first Arduino with the LDR and the moisture detector:

int moistureSensorPin = A0;

int moistureSensorValue = 0;

int photoresistorSensorPin = A1;

int photoresistorSensorValue = 0;

const int buzzerPin = 9;

void setup() {

Serial.begin(9600);

pinMode(buzzerPin, OUTPUT);

}

void loop() {

// read the value from the moisture sensor:

moistureSensorValue = analogRead(moistureSensorPin);

Serial.print(“Moisture = “);

Serial.println(moistureSensorValue);

delay(1000);

// read the value from the moisture sensor:

// read the value from the photoresistor sensor:

photoresistorSensorValue = analogRead(photoresistorSensorPin);

Serial.print(“Light = “);

Serial.println(photoresistorSensorValue);

delay(1000);

// read the value from the photoresistor sensor:

//buzzer

if (moistureSensorValue < 500) {

analogWrite(buzzerPin, 127);

Serial.println(“Need Water!!”);

} else if (photoresistorSensorValue < 20) {

analogWrite(buzzerPin, 340);

Serial.println(“Need Sun!!”);

delay(1000);

else if (moistureSensorValue >= 1000) {

noTone(buzzerPin);

else if (photoresistorSensorValue >= 100) {

noTone(buzzerPin);

}

}

//if the sensor is below a certain threshold, the plant needs water and the plant screams

//if the sensor is below a certain threshold, the plant needs sunlight and the plant screams

 

Below is the code for the second Arduino with the distance sensor and buzzer:

 

const int trigPin = 10;

const int echoPin = 11;

const int wheelPin = 5;

int BUZZER_PIN = 9;

int lightPin = 3;

#include “pitches.h”

// defines variables

long duration;

int distance;

int melody[] = {

NOTE_B4, NOTE_B5, NOTE_FS5, NOTE_DS5,

NOTE_B5, NOTE_FS5, NOTE_DS5, NOTE_C5,

NOTE_C6, NOTE_G6, NOTE_E6, NOTE_C6, NOTE_G6, NOTE_E6,

 

NOTE_B4, NOTE_B5, NOTE_FS5, NOTE_DS5, NOTE_B5,

NOTE_FS5, NOTE_DS5, NOTE_DS5, NOTE_E5, NOTE_F5,

NOTE_F5, NOTE_FS5, NOTE_G5, NOTE_G5, NOTE_GS5, NOTE_A5, NOTE_B5

};

int durations[] = {

16, 16, 16, 16,

32, 16, 8, 16,

16, 16, 16, 32, 16, 8,

 

16, 16, 16, 16, 32,

16, 8, 32, 32, 32,

32, 32, 32, 32, 32, 16, 8

};

void setup() {

pinMode(trigPin, OUTPUT); // Sets the trigPin as an Output

pinMode(echoPin, INPUT); // Sets the echoPin as an Input

Serial.begin(9600); // Starts the serial communication

pinMode(wheelPin, OUTPUT);

pinMode(BUZZER_PIN, OUTPUT);

pinMode(lightPin, OUTPUT);

}

void loop() {

// Clears the trigPin

digitalWrite(trigPin, LOW);

delayMicroseconds(2);

// Sets the trigPin on HIGH state for 10 micro seconds

digitalWrite(trigPin, HIGH);

delayMicroseconds(10);

digitalWrite(trigPin, LOW);

// Reads the echoPin, returns the sound wave travel time in microseconds

duration = pulseIn(echoPin, HIGH);

// Calculating the distance

distance = duration * 0.034 / 2;

// Prints the distance on the Serial Monitor

Serial.print(“Distance: “);

Serial.println(distance);

if (distance < 15){

digitalWrite(wheelPin, LOW);

Serial.println(“move”);

int size = sizeof(durations) / sizeof(int);

digitalWrite(lightPin, LOW);

for (int note = 0; note < size; note++) {

//to calculate the note duration, take one second divided by the note type.

//e.g. quarter note = 1000 / 4, eighth note = 1000/8, etc.

int duration = 1000 / durations[note];

tone(BUZZER_PIN, melody[note], duration);

//to distinguish the notes, set a minimum time between them.

//the note’s duration + 30% seems to work well:

int pauseBetweenNotes = duration * 1.30;

delay(pauseBetweenNotes);

 

//stop the tone playing:

noTone(BUZZER_PIN);

}

}

else{

digitalWrite(wheelPin, HIGH);

Serial.println(“stop”);

delay(1000);

digitalWrite(lightPin, HIGH);

}

}

The goal of the project was to enhance the interaction between two living beings (humans and plants), but while the project was not the most aesthetically pleasing, it did accomplish this goal. Yes this did align with my definition of interaction, but also enhanced the meaning of interaction. Interaction does not always need to be one-sided where the plant is responding to the human action, but rather, the human can respond to the plant. In this case, in order for the moisture levels or sunlight levels to stabilize, the human needs to interact with the plant by pouring water in it or moving it to a place of adequate sunlight. We did also provide another form of interaction where when the owner is close to the plant and giving the plant attention, the plant will begin to play a sound. To improve the project, I would firstly figure out a way to add the wheels. This way, it can really be a pet plant that follows you around the house. Secondly, I would change the aesthetics of the frame to replicate that of a house pet, maybe a dog or a cat. And thirdly, I would definitely use an mp3 player so that the plant can announce what exactly it needs. 

From this project, I am able to analyze the foundations of our technologies, from Face ID on my iPhone, to the mousepad on my computer, it is super interesting to be able to understand how these technologies that I interact with on a daily basis are coded similarly to the way that my pet plant was constructed. Further, I realized the things that need to be improved and how we can implement more powerful and complex technologies into “my pet plant.”

Leave a Reply

Your email address will not be published. Required fields are marked *