🌿 Urban Jungle Will Thrive 🌿

Made by mshie

Found in DioT 2019: Internet of Plants

The urban jungle can easily die due to the exposure to severe sunshine or lack of water. This IoT product (Urban Jungle Guardian) will protect the urban jungle from getting overheated or dried out by showing the heat/light level of the plants.

0

Solution

Urban Jungle Guardian has 2 important functions

Exam the light level

A photoresistor can sense the light level(Illumination) of the sunshine and protect pot plants from being overheated. If illumination lux is high, the speaker will play music to notify the planter; if the illumination lux is low, the yellow LED will bright up. The best condition for the plants should have no sign.

Exam soil humidity level

A soil moisture sensor should be put into the dust of the plant pot and evaluate the dust humidity. If the dust is in the right humidity, the speaker will play music. If the plant is in a good humidity level, green LED will light up. The planter should use it to test the dust humidity at least one time a day. 

0

Approach

I know that water and light are the two crucial factor that influences a plant's life, so I aim to use the sensor that can exam these two factors. When the sunshine/light condition is too bright or too dark, the planter could see the feedback; when the planter is not sure about whether to water it or not, they can use the moister sensor to get the answer. This device aims to provide the most efficient method to acquire the plant condition and keep it alive.

0

Process

I focused on showing the light & humidity level for users, so I searched for the device that can do those jobs. Luckily, I already learned how to use a photoresistor in the second class, and then I happened to find out the soil moisture sensor in the Tech Spark. I googled for the soil moisture sensor and found out a guide on https://randomnerdtutorials.com/guide-for-soil-moisture-sensor-yl-69-or-hl-69-with-the-arduino/, just followed the step and removed some Arduino part and then it works successfully!! The challenging part is to remove the Arduino part and figure out how to apply it to my existed board.

0

Implementation

Main Parts

  • Particle/ Argon Kit
  • Photoresistor (sense the light level)
  • LED pin (green & yellow)
  • YL-69 Soil Moisture Sensor
  • Piezos (speaker)
0
int photoCellPin = A5;
int photoCellReading = 0;
int ledPin = D2;
int ledBrightness1 = 0;

//below are for the soil moisture sensor 
int rainPin = A0;
int greenLED = D6;
//int thresholdValue = 800;
int sensorValue = 0;
int speakerPin = D3;

int melody1[] = {1046,1046,1568,1568,1760,1760,1568,1568}; 
int melody2[] = {1967,1760,1568,1397,1318,1175,1046}; 

int noteDurations[] = {4,8,8,4,4,4,4,4 };

// store the time when you last published
int last_published = -1;

void setup()
{
  pinMode( speakerPin, OUTPUT );

  pinMode(ledPin, OUTPUT);
  Particle.variable("light", &photoCellReading, INT);
  
  pinMode(rainPin, INPUT);
  pinMode(greenLED, OUTPUT);
    
  digitalWrite(greenLED, LOW);
  Particle.variable("rain", &sensorValue, INT);
}

void spreadsheet(  ){
	if( last_published + 60000 < millis() ){
		Particle.publish( "log_to_spreadsheet", String( photoCellReading  ) );
		last_published = millis();
	}
}


void loop()
{
  sensorValue = analogRead(rainPin);
  if(sensorValue > 4000){
        playNotes2();
        digitalWrite(greenLED, LOW);
    }
    else(sensorValue < 4000);
    {
        digitalWrite(greenLED, HIGH);
   }
    
  photoCellReading = analogRead(photoCellPin);
  //TOO LIGHT PLAY A SONG
  if (photoCellReading > 2200)
  {
      playNotes1();
  }
   else if(photoCellReading < 1000)
  {
      //TOO DARK GIVE A LIGHT
      digitalWrite( ledPin, HIGH );
      delay(1500);
      digitalWrite( ledPin, LOW );
  }
  
  else
  {
     analogWrite(ledPin, 0);
  }
  
  
  delay(500);
  spreadsheet(  );
}

void playNotes1()
{
    for (int thisNote = 0; thisNote < 8; thisNote++) {

      int noteDuration = 1000/noteDurations[thisNote];
      tone(speakerPin, melody1[thisNote],noteDuration);

      int pauseBetweenNotes = noteDuration * 1.30;
      delay(pauseBetweenNotes);
      noTone(speakerPin);
    }
}

void playNotes2()
{
    for (int thisNote = 0; thisNote < 8; thisNote++) {
      int noteDuration = 1000/noteDurations[thisNote];
      tone(speakerPin, melody2[thisNote],noteDuration);
      int pauseBetweenNotes = noteDuration * 1.30;
      delay(pauseBetweenNotes);
      noTone(speakerPin);
    }
}
Click to Expand
0
IoT - Plant is hot and thirsty
papaya h - https://www.youtube.com/watch?v=fqijBHoVSFg
0

Reflection

Through this project, I become more familiar with the IoT device, circuit design, and code rules, but there are still many things I need to learn. 

0

Next Steps

If I have more time to develop this project, I would like to add more if/else setting to demonstrate a more different level of light/moisture. Also, I would like to spend more time on design, probably make a box or bag to pack it.

0
IFTTT Applet
Screen shot 2019 11 07 at 2.43.20 pm
0
Google sheet published data
Screen shot 2019 11 07 at 2.44.38 pm
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
About

The urban jungle can easily die due to the exposure to severe sunshine or lack of water. This IoT product (Urban Jungle Guardian) will protect the urban jungle from getting overheated or dried out by showing the heat/light level of the plants.

Created

November 7th, 2019