Self-Watering Plant

Made by Brian Yang

An IoT that waters and monitors a plant for you

Created: February 19th, 2017

0

Intention

Write about the big ideas behind your project? What are the goals? Why did you make it? What are your motivations?

Growing plants at home is a fun hobby and can improve your quality of life. However, in the modern world and my life style and I not necessarily available to tend to my plants daily. Sometime begin away from home over a week and I would come home with the now dead plats since they did not get the care they needed. This project is to create a device that can take care of the plants while I am away.

0

Context

Describe what informed your ideas and your outcome? How does your outcome relate to other work in the field? What are the precedent projects?

This device is centered around automated plate watering and remote monitoring of the plants for the user. This will allow me to remotely take care of the plants so I no longer return home with dead plants welcoming me after a trip away from home. The further goal would be to create an automated internet connected table top green house with control over temperature, lighting and water.

0

Process

Outline your approach to the project? What ideas did you generate and how did you refine or reject them? What did you research and explore? what were the design choices? What challenges were encountered and how did you resolve them?

In this project I wanted the device to do 3 things: 1) Collect data on soil moisture level. 2) Use that data to automate watering. 3) Notify user when the device need to be refilled with water.

For measuring soil moisture level I used a Sparkfun Soil Moisture Sensor that was available in the lab. The quality of the sensor seems to vary part to part. Some provide good data while some other ones didn’t. Otherwise the sensor is easy to use and well documented.

For watering a water pump was needed. I found an unmarked water pump with no documentation besides knowing it’s designed to run on 12v. After some trial and error I found it will start to run around 8v. Since the particle cannot provide that power, power to the pump is proved by a 9v battery and controlled via a NPN Transistor.

The last part was to measure water level. Originally I wanted to use a pressure sensor to measure the water by weight. However, the pressure sensor I had available to me could not produce data that could be used since it laced the fidelity to measure the smaller increments. I switched to my back up plane which used two wire in a similar mater to the soil moisture sensor.

0

Product

Detail what you created. What methods or techniques did you use? What tools and technologies were involved? Include images, code or video.

The device has relatively simple wiring with 3 wires to the soil moisture sensor. Two wires and a 1K ohm resister for pull down used for water level sensor. The pump needs an external power and a transistor.

0
Code
int soilPin = A0;
int waterPinOut = D1;
int WaterPinIn = A1;
int motorPin = D0;
int thresholdUp = 400;
int thresholdDown = 250;
int wateringcount = 0;
char *message;

void setup(){
  pinMode(motorPin, OUTPUT);
  pinMode(waterPinOut, OUTPUT);
  Particle.variable("mess", "I'm on", STRING);
  delay(100);
}

void loop(){
  soil();
}

void soil(){
  int sensorValue;
  waterwarning();
  sensorValue = analogRead(soilPin);
  Particle.variable("soil", &sensorValue, INT);
  if(sensorValue>=thresholdUp){
    analogWrite(motorPin, 0);
    message = "Watered";
    Particle.variable("mess", message, STRING);
    delay(60000);
  }
  if(sensorValue<=thresholdDown){
    analogWrite(motorPin, 50);
    message = "Dry, Watering.";
    Particle.variable("mess", message, STRING);
    delay(5000);
    wateringcount = wateringcount + 1;
    Particle.variable("Count", &wateringcount, INT);
    delay(100);
    analogWrite(motorPin, 0);
  }
}

void waterwarning(){
  int waterlevel;
  digitalWrite(waterPinOut, HIGH);
  waterlevel = analogRead(WaterPinIn);
  if(waterlevel<5){
    Particle.variable("mess", "WARNING! REFILL WATER");
    delay(100);
  } else {}
  digitalWrite(waterPinOut, LOW);
  Particle.variable("water", &waterlevel, INT);
  delay(100);
}
Click to Expand
0

Reflection

Reflect on the process of making this project. What did you learn? What would you do differently?

The project has potential to grow and become a complete product. The design of an enclose and more features can be added to the device to make give it more value to the user. I do wish to use a different watering mechanism and measuring mechanism. The elimination of the water pump would make the device even better as the pump I had was not reliable and lacked documentation. Switching to a gravity feed system would make the device simpler. For water level, I would like to add more discreet levels so you can know roughly how much water is remaining rather than only knowing when it is low.

This project is my introduction to making internet connected devices. Use of cloud functions is something new to me. The particle platform does make things easier compared to a previous attempt I made a while ago and gave up on.

x
Share this Project


About

An IoT that waters and monitors a plant for you