DIY Smart Plant Monitor Robotic Kit

Introduction

Plants are living things, and just like us, they need hydration. However, overwatering or underwatering is the #1 killer of houseplants.

By using components found in a standard educational robotic kit, we can create a device that “speaks” for the plant. We will use a sensor to detect moisture levels and use a microcontroller (like Arduino) to process that data. This project teaches you about analog signals, sensor calibration, and threshold logic—skills essential for advanced robotics.

How It Works

The concept is simple but effective:

  1. Conductivity: The sensor has exposed metal traces. Water is a conductor of electricity.
  2. Resistance Reading: When the sensor is dry, resistance is infinite (no current flows). When wet, resistance drops, and current flows.

Components Required

To build this, you don’t need expensive tools. You just need the basics from your robotic kit:

  • Microcontroller: Arduino Uno
  • Water Level Sensor: (The red module with parallel lines).
  • Jumper Wires: Male-to-Female or Male-to-Male.
  • Breadboard: (Optional, for easier connections).

Wiring (Taarein Jorna)

1. Ultrasonic Sensor:

  • Sensor (+) Pin  to 5V
  • Sensor (S) Pin to Analog Pin A0
  • Sensor (-) Pin to GND

2. LED

  • Long Leg to PIN13
  • Short Leg to GND

Code

const int sensorPin = A0; // Water sensor pin
const int ledPin = 13;    // LED pin
int sensorValue = 0;      // Raw value store karne k liye
int percentage = 0;       // Percentage store karne k liye

// NOTE: Yeh value adjust karni par sakti hai.
// Pani mein full duba kar check karein max value kya ati hai.
// Usually sensors pani mein 600-700 tak jatay hain, 1023 tak nahi.
const int dryValue = 0;
const int wetValue = 400; // Agar 80% par LED na chale to is value ko kam karein (e.g 600)

void setup() {
  Serial.begin(9600);
  pinMode(ledPin, OUTPUT); // LED pin ko Output banaya
}

void loop() {
  // 1. Sensor Read karein
  sensorValue = analogRead(sensorPin);

  // 2. Value ko Percentage (0-100%) mein convert karein
  // constrain function is liye taake percentage 0 se neeche ya 100 se uper na dikhaye
  percentage = map(sensorValue, dryValue, wetValue, 0, 100);
  percentage = constrain(percentage, 0, 100);

  // 3. Result Serial Monitor par dikhayen
  Serial.print("Raw Value: ");
  Serial.print(sensorValue);
  Serial.print(" | Water Level: ");
  Serial.print(percentage);
  Serial.println("%");

  // 4. Logic: Agar 80% ya zyada ho to LED chala do
  if (percentage >= 80) {
    digitalWrite(ledPin, HIGH); // LED ON
    Serial.println(" -> Tank Full (LED ON)");
  } else {
    digitalWrite(ledPin, LOW);  // LED OFF
  }

  delay(500); // Thora wait
}

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top