lonely plan't

Made by Jamie Talbert

Found in DioT 2019: Internet of Plants · UNLISTED (SHOWN IN POOLS)

This project is about an IoT plant monitoring device that encourages interaction with its owner.

0

Solution

The "lonely plan't" is an IoT plant interaction device, which encourages the owner to interact with the plant in order to maintain its health.  In short, the device contains a soil moisture sensor.  When the moisture is low, the device alerts the user in 2 ways:  text and an illuminated blue light.  In order to satisfy the plant, however, the owner must spend time with the plant.  The first criteria is that the plant is in a well-lit area.  Second, the owner could talk to the plant, play music for it, or other interactive activity that involves sound.  This will trigger the device to water the plant.  Once the plant is sufficiently watered, a green light will appear, indicating the plant is satisfied.

0

Approach

My thought from the beginning was to provide a way to measure the moisture content and then water the plant.  However, I wanted to take this a step further.  I initially thought of using a sound detector to process musical input.  Being a musician myself, I thought this would be a good way to take care of the plant while also nudging me to practice my guitar.  However, after a little more thought, I opened up the scope to include speaking to the plant as well.  This also fits into the old wive's tale that speaking to a plant (in and of itself) helps the plant to be healthier.

0

Process

In order to successfully implement my design, there were a few challenges.  The biggest challenge was in sound detection.  Using the SparkFun Sound Detector was my first choice, since it is able to detect the full sound wave.  While this may have allowed for more functionality in my product, it was a little bit too advanced for my application.  Really, I just needed to detect if sound was present.  This led me to use and Electret Sound Detector, which is an On/Off detector, switching on when the sound elevates past a threshold.

I also decided to use a DIY moisture analyzer.  This type of device was easy to construct:  2 metal screws, a wire attached to each via a heat-shrink wrap, and a spacer to keep the "leads" at a constant distance.  The wiring for this sensor is then similar to most of the other resistive sensors.  However, the sensitivity of this type of sensor is not very good.  The range of detection between "dry" and "moist" is not very great, creating some problems when fine-tuning the code to work properly.

0

Implementation

Workflow

  1. Moisture Sensor determines whether plant needs water or not.
  2. If No, Green LED turns on.  
  3. If Yes, Blue LED turns on.  Sends notification via text to owner & logs even in Google Sheets.
  4. The plant now requires interaction before it will water itself.
  5. If the light is bright, and the owner speaks to it (or plays music, etc.), it will then water itself for 5 seconds.  The owner must continue interacting until the Moisture Sensor is satisfied once again.  [To simulate water flowing, the Blue LED flashes.]
  6. Once the Moisture Sensor is satisfied, the Green LED turns back on.

List of parts

  • Particle Argon
  • Electret Sound Detector
  • Photoresistor
  • (2) 1k-ohm resistors
  • (2) 10k-ohm resistors
  • DIY Soil Moisture Sensor
  • Blue LED
  • Green LED

0
0
int ledBlue = D2;
int ledGreen = D3;

int micPin = D8;
int photoPin = A0;
int soilPin = A1;

int micReading = 0;
int photoReading = 0;
int soilReading = 0;
int soilReadingcomp = 0;

int last_published = -1;

void setup() {
    
    pinMode(ledBlue, OUTPUT);
    pinMode(ledGreen, OUTPUT);
    
    pinMode(micPin, INPUT);
    pinMode(photoPin, INPUT);
    pinMode(soilPin, INPUT);
    
    Particle.variable("photo", &photoReading, INT);
    Particle.variable("soil", &soilReading, INT);
    
}

void loop() {
    
    micReading = digitalRead(micPin);
    photoReading = analogRead(photoPin);
    soilReading = analogRead(soilPin);
    
    soilReadingcomp = abs( 2800 - soilReading );
    
    if (soilReadingcomp < 100 ){  // soil sensor has a lot of noise, so trying to code in some separation around threshold

        
        soilReading = soilReading - 200;
        
    }
    
    if ( soilReading < 2800 ){  //if soil moisture is low, turn on blue light

        
        digitalWrite(ledBlue, HIGH);
        digitalWrite(ledGreen, LOW);
        
        soilReading = analogRead(soilPin);
        
        com_soil_reading(soilReading);  //communicate low moisture reading - log and email

        
        if (photoReading > 3700 && micReading == LOW){
            
            //if light is bright and sound is coming in, blink blue light to represent water flowing

            
            for (int i=0; i<10; i++){
                
                digitalWrite(ledBlue, HIGH);
                delay (500);
                digitalWrite(ledBlue, LOW);
                delay (500);
                
            }
            
        } 
        
    } else { //all is well, so let user know everything is OK with green light

            
        digitalWrite(ledGreen, HIGH);
        digitalWrite(ledBlue, LOW);
            
        delay (1000);
            
    }

}

void com_soil_reading( int sensorValue ){

  // check if 1 minute has elapsed

	if( last_published + 60000 < millis() ){
		Particle.publish( "com_soil_reading", String( sensorValue  ) );
		last_published = millis();
	}

}
Click to Expand
0

Next Steps

I would love to provide form to this project.  It would also be interesting to understand how different types of plants need to be watered differently.  I could set up an interface for the user to select what type of plant they have and it would monitor the soil moisture appropriate for their selection.

0

Reflection

I learned how to use the Sound Detector, and how to implement 3 sensors to accomplish a common goal.  I also learned much more about IFTTT, specifically how to utilize it for both text and logging data to Google Sheets.

x
Share this Project

This project is only listed in this pool. Be considerate and think twice before sharing.


Courses

49713 Designing for the Internet of Things

· 16 members

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


About

This project is about an IoT plant monitoring device that encourages interaction with its owner.

Created

November 1st, 2019