Plant Maintainer
The Plant Maintainer is a device that allows for the autonomous watering of plants. It senses soil moisture to dispense water from a connected source. This project was inspired by my grandfather who, as he gets older, finds it harder to manage his garden in his backyard every day. It's designed to further automate and simplify maintaining plants on a personal scale. The project is made up of piping, valves, a water flow sensor, and a moisture sensor, all connected to an Arduino programmed to run the device. This device has potential use in hydroponic farming as well, due to its ability to function autonomously. This machine is useful because it will allow for more accessibility to planting for more people through being simple, cheap, and effective.
Supplies
1 Arduino Uno
½ diameter inch piping (length varies based on need)
Various wires
2 Bottles
Soldering Iron (optional)
1 Breadboard
Any and all parts can be found on amazon, with examples being hyperlinked for the technical parts just in case.
Circuit Assembly
The circuits and code are what allow this project to function at all. Luckily it is not a particularly complicated one and the above guide should work.
- Gather the Arduino (or other board equivalent), breadboard, and moisture sensor
- Use wires to jump the breadboard and components to the Arduino as as displayed above.
- Leave space on the breadboard for the pump and valve when piping
Assemble Piping
You have freedom in how you lay out the piping based on your needs, but the below describes how to assemble your piping to work with the circuitry and waterproof it.
- Take 2 bottles of desired size with a cap width greater than 1/2 inch.
- Drill a 1/2 inch hole into the cap of each bottle
- Re-screw the caps to the bottles
- Insert the pipes into the holed caps
- Insert sealant into the intersection of the cap and pipe to prevent leakage
- Assemble the pipes going downward for gravity to take effect
- Place the valve segment on the adjacent side to the pump to prevent leaking
- Place a joining channel at the bottom of the 2 pipelines to create an exit
- Wire the pump and valve to the breadboard
- Critically, have the pump be connected to a data pin with a ~ sign, the indication of receiving extra voltage (PWM) so that they can function. The code below uses pin 9.
(OPTIONAL) Create Funnels for the Tops
If you wish to, whether for outdoor use or easier pouring, you can add funnels to the water botte tops.
- Cut the tops off of each bottle
- Take funnels close in circumference to the width of the bottle
- Take a heat-gun to the bottle top to soften the plastic
- Remove the heat gun once malleable
- Securely place the funnel in and hold.
The plastic should now be set to stay in place
Code
Insert the following code into your Arduino whichever USB port it has.
//Credits (Based on Code from instructables.com originated from MillerMan2000)
#include <Servo.h>
int moistPin = A0;
int moistVal = 0;
int tooDry = 150; //set low parameter for plant
int tooWet = 400; //set high parameter for plant
int servoPin = 9; // set pin for Servo
Servo Servo1;
void setup()
{
Serial.begin(9600);
}
void loop()
{
moistVal = analogRead(moistPin);
Servo1.attach(servoPin);
Serial.println(moistVal);
Serial.println("% Moisture ");
if (moistVal <= tooDry) {
digitalWrite(4, HIGH); //Red LED
digitalWrite(3, LOW);
digitalWrite(2, LOW);
Servo1.write(9999);
}
else if (moistVal >= tooWet) {
digitalWrite(4, LOW);
digitalWrite(3, HIGH); //Blue LED
digitalWrite(2, LOW);
}
else {
digitalWrite(4, LOW);
digitalWrite(3, LOW);
digitalWrite(2, HIGH); //Green LED
}
delay(250);
}
This code uses the moisture sensor (port A0) to check if the value is below a threshold and if so, to release water to the plant by opening the valve and pump (port 9).
Final Assembly
Placing the circuitry into a holding adjacent to the piping and canisters, the connections can optionally be soldered for extra stability and permanence in the system. You may sleeve the wires as they travel to the pump at the bottom, and make sure that the moisture sensor has enough length to be placed in the soil the pipes are flowing into. Thank you so much for following and I hope you enjoy using this automatic plant watering device!