Monitoring Kitchen Herbs & Plants
Made by kanikak
Made by kanikak
A system helping you to water your plants by sending alerts when their moisture level is too low. You’re plants now talk back to you.
Created: January 25th, 2018
Recently my mother hasn’t been able to attend to her plants as she would like and thus other members of the household have been given the responsibility to water the plants, but they never know how much or how little to water them. This device visually notifies them when to water them and reduces their cognitive load along. It also allows anyone to water plants do it regardless of their knowledge of plants. On the other hand, my mother could receive a notification and if she receives continuous notifications she is aware that no one has watered her plant and can personally call one member to do it.
My proposal provides a soil monitoring system for her herbs/plants the kitchen. The sensors would detect the moisture level in the soil and would turn on a light if the level is lower than it should be (in our case 1000), the light would only be turned off once the right amount of water is given. The light alerts anyone around the area and a text is sent to my mother’s phone. If someone is messing around with a her system and presses the button she gets a phone call letting her know someone is playing around.
1. Got all my pieces together, I was really excited to find a sautered plant sensor in the ideate room.
2. Initially I was mapping one piece to another trying to replicate a project online and not completely understanding what was going on. I was trying to learn by replicating the project and creating a conceptual map of what happens as shown in the diagram.
5. I worked on getting the light and the notification the next week, and struggled with the for loop but also partly because my code wasn’t clean I spent time debugging something that was wrong just because there was an extra bracket breaking up the code. I also referenced previous class lab to ensure my light was working correctly.
The project took me 6 different steps. Where I encountered a roadblock or needed help I used the internet, labs and help from the TA/instructors. Moving forward I would use the button to switch off the loop - so only if the button is pressed do you get a reading of the plant. Below is the code, diagram, materials need & video of the project.
/* Soil Mositure Basic Example
This sketch was written by SparkFun Electronics
Joel Bartlett
August 31, 2015
Basic skecth to print out soil moisture values to the Serial Monitor
Released under the MIT License(http://opensource.org/licenses/MIT)
*/
int val = 0; //value for storing moisture value
int soilPin = A0;//Declare a variable for the soil moisture sensor
int soilPower = D7;//Variable for Soil moisture Power
int ledPin = D2;
int buttonPin = D3;
int buttonState = 0;
int previousState = 0;
//Rather than powering the sensor through the 3.3V or 5V pins,
//we'll use a digital pin to power the sensor. This will
//prevent corrosion of the sensor as it sits in the soil.
void setup()
{
Serial.begin(9600); // open serial over USB
pinMode(buttonPin, INPUT);
pinMode(ledPin, OUTPUT);
pinMode(soilPower, OUTPUT);//Set D7 as an OUTPUT
digitalWrite(soilPower, LOW);//Set to LOW so no power is flowing through the sensor
Particle.variable("buttonState", buttonState);
}
void loop()
{
buttonState = digitalRead(buttonPin);
digitalWrite(ledPin, buttonState);
if(buttonState == HIGH && previousState == LOW)
{
//do something
Serial.print("Stop it");
Particle.publish("stopIt", "HIGH");
}
else
{
Serial.print("Soil Moisture = ");
//get soil moisture value from the function below and print it
Serial.println(readSoil());
//This 1 second timefrme is used so you can test the sensor and see it change in real-time.
//For in-plant applications, you will want to take readings much less frequently.
delay(1000);//take a reading every second
}
previousState = buttonState;
}
//This is a function used to get the soil moisture content
int readSoil()
{
digitalWrite(soilPower, HIGH);//turn D7 "On"
delay(1000);//wait 1000 milliseconds
val = analogRead(soilPin);//Read the SIG value form sensor
if(val < 1000)
{
Particle.publish("soilDry", "HIGH");
digitalWrite(ledPin, HIGH);
}
else
{
digitalWrite(ledPin, LOW);
}
digitalWrite(soilPower, LOW);//turn D7 "Off"
return val;//send current moisture value
}
Click to Expand
To start off I would have read up on each of the parts from the beginning rather than try to imitate and image or video. After knowing about the parts I would have continued to learn by the tutorial, at least the logic would have made more sense to me. I had a bunch of road blocks: not knowing what to search for, not knowing what amount of power would blow up my circuit board, not having clean code, referring to photos without knowing the logic behind it and so on and so forth. That being said, I feel that all the small things have helped in creating a more efficient approach for the next project. This project also has given me a better understanding of the particle board - the difference between 3.3 and 5v along with how ground works. I would love to have been able to water the plant as well maybe with a water balloon pop. It's been a while since I've had the opportunity to tinker, thus this was a great introduction.
Websites and code used throughout the different phases of the project
A hands-on introductory course exploring the Internet of Things and connected product experiences.
A system helping you to water your plants by sending alerts when their moisture level is too low. You’re plants now talk back to you.