Automatic Plant Watering System

Small-scale, smart irrigation system utilizing Arduino. Part II of EGR final detailed technical report / thesis.

projectImage

Things used in this project

 

Hardware components

HARDWARE LIST
1 DFRobot Gravity: Analog Capacitive Soil Moisture Sensor- Corrosion Resistant
1 Arduino UNO
1 ControlEverything.com 4-CHANNEL RELAY CONTROLLER FOR I2C
1 Seeed Grove - 4-Channel SPDT Relay

Software apps and online services

 

Arduino IDE

Hand tools and fabrication machines

 

Multitool, Screwdriver

Story

 

In this project, I intended to design a small-scale, smart irrigation system through an Arduino. I sought to have the fully automated system powered through an external power source. This project is focused on the concept of automatic watering, operated through a programmed operating system. Through utilizing the Arduino in conjunction with a sensor and pump, there is a successful system that waters the spider plant on my windowsill. Although it only caters towards a single plant at the, there is room for expansion and future experimentation, to answer the question of how to decrease manual watering/labor. In the end, I conducted research on the Arduino inner-workings and programming in C++, having a truly automated watering system. **This is not entirely my work, references are linked here:

Schematics

 

WayinTop

 

https://github.com/WayinTop/Automatic-Plant-Watering-System-Tutorial/blob/master/4%20Channel%20Relay%20Plant%20Watering%20System%20and%20code/Plant%20Watering%20System%20Tutorial-English.pdf

Code

CODE
const int relayPin = 2;
const int sensorPin = A0;
float sensorValue = 0;

void setup() {
// put your setup code here, to run once:
Serial.begin(9600);
//begins communication with serial monitor
pinMode(relayPin, OUTPUT);
//sets pin 2 to output
pinMode(sensorPin, INPUT);
//sets pin A0 to input
digitalWrite(relayPin, HIGH);
//turns on relay, in turn turning on pump
delay(500);
//runs pump for 1/2 second
}

void loop() {
// put your main code here, to run repeatedly:
Serial.print("MOISTURE LEVEL: ");
//prints "MOISTURE LEVEL: "
sensorValue = analogRead(sensorPin);
//sets "sensorValue" to input value from A0
Serial.print(sensorValue);
//prints moisture level
if(sensorValue>500)
{
digitalWrite(relayPin, HIGH);
//if moisture level is above 750, turns off pump
}
else
{
digitalWrite(relayPin, LOW);
//if moisture level is not above 750, turns on pump
}
Serial.println();
//prints new line for spacing
delay(1000);
//waits 1 second before re-checking moisture level
}

The article was first published in hackster, December 7, 2021

cr: https://www.hackster.io/alexathomps/automatic-plant-watering-system-ceb26f

author: alexathomps

License
All Rights
Reserved
licensBg
0