Projects Hub, lesson 35 of 81

Soil Moisture-Based Plant Watering System with LCD Feedback

intermediate3 min read

Introduction

In today's fast-paced world, maintaining healthy indoor plants can be a challenge, especially when we're often too busy to monitor their watering needs. Overwatering or underwatering can lead to the demise of our beloved greens. However, with the advancement in technology and the rise of the Internet of Things (IoT), we can create smart solutions to tackle this problem. In this article, we'll explore a soil moisture-based plant watering system that utilizes an LCD screen to provide real-time feedback on the soil's moisture level. This project ensures that your plants receive the right amount of water, promoting their well-being and growth.

Working Principle

The soil moisture-based plant watering system operates on a straightforward principle: it measures the moisture level of the soil and waters the plant when the soil becomes too dry. This automation ensures that the plant receives water precisely when it needs it, preventing overwatering or dehydration.

Things We Need

To build this system, you'll need the following components:

  1. Arduino (e.g., Arduino Uno)
  2. Soil moisture sensor
  3. Relay module
  4. LCD display (16x2 or 20x4)
  5. Water pump or solenoid valve
  6. A container or water reservoir
  7. Connecting wires
  8. Power source (9V or 12V adapter)
  9. Tubing (if using a water pump)

Circuit Diagram

Circuit Diagram

Working of the System with Arduino

  1. Soil Moisture Sensing: The soil moisture sensor is inserted into the plant's soil. It measures the moisture level and sends this data to the Arduino.
  2. Data Processing: The Arduino processes the moisture level data. You can set a threshold moisture level; if the soil moisture drops below this level, it triggers the system to water the plant.
  3. Display Feedback: The LCD screen displays the current soil moisture level and the system's status, such as "Watering" or "Normal."
  4. Watering Mechanism: When the soil moisture falls below the set threshold, the Arduino activates the water pump or solenoid valve. This allows water to flow from the container into the plant's pot until the soil reaches the desired moisture level.
  5. Feedback Display: The LCD screen updates to show the watering process in real-time. Once the soil reaches the optimal moisture level, the system stops watering.
Loading the circuit…Arduino Uno
Press Run to upload the code to the Arduino.

Arduino Code

Here's a simplified example of Arduino code for this project:

#include <LiquidCrystal.h>
 
LiquidCrystal lcd(12, 11, 5, 4, 3, 2);
 
const int moisturePin = A0;
const int pumpPin = 9;
const int moistureThreshold = 400; // Adjust this value as needed
 
void setup() {
  lcd.begin(16, 2);
  pinMode(pumpPin, OUTPUT);
}
 
void loop() {
  int moistureLevel = analogRead(moisturePin);
 
  lcd.clear();
  lcd.print("Moisture: ");
  lcd.print(moistureLevel);
 
  if (moistureLevel < moistureThreshold) {
    lcd.setCursor(0, 1);
    lcd.print("Watering");
    digitalWrite(pumpPin, HIGH);
    delay(5000); // Water for 5 seconds (adjust as needed)
    digitalWrite(pumpPin, LOW);
    lcd.clear();
  } else {
    lcd.setCursor(0, 1);
    lcd.print("Normal");
  }
 
  delay(1000); // Delay for stability and to avoid frequent readings
}

Conclusion

The soil moisture-based plant watering system with LCD feedback is a practical and efficient way to ensure that your indoor plants receive the right amount of water, preventing the common issues of overwatering and underwatering. With this system, you can keep your plants healthy and thriving while reducing the time and effort required for manual watering. It's a prime example of how technology and automation can improve our lives and the well-being of our natural surroundings. So, go ahead and build your own smart plant watering system to nurture your green companions with care and precision.