← Back to Basic Projects

πŸ’§ Plant Soil Moisture Alert

A soil sensor that buzzes when your plant is thirsty β€” simple, useful, and genuinely saves plant lives.

πŸ“‹ Overview

Soil moisture sensors measure conductivity between two probes. Wet soil conducts electricity well (low resistance), dry soil doesn't (high resistance). Arduino reads this via analogRead.

What you'll learn: Analog sensor reading, threshold logic, buzzer control, and real-world sensor calibration.

Estimated time: 30–40 minutes. Difficulty: ⭐⭐ Easy.

🧩 Components Needed

ComponentSpecificationQtyNotes
Arduino Uno R35V1
Soil Moisture SensorCapacitive or resistive1Capacitive lasts longer
Piezo BuzzerPassive 5V1Alert when dry
Breadboard + WiresStandard1

πŸ—ΊοΈ Component Pin Mapping

Plant Soil Moisture Alert Component Pin Mapping Infographic

πŸ“– Step-by-Step Tutorial

1

Connect the Sensor

Sensor VCC -> 5V, GND -> GND, AOUT -> A0.
2

Connect the Buzzer

Buzzer+ -> pin 8, Buzzer- -> GND.
3

Calibrate

Open Serial Monitor. Note analog values for completely dry soil and wet soil. Set dryThreshold accordingly.
4

Plant It!

Stick the sensor in your plant pot. It will buzz when it needs watering.
πŸ’‘
Resistive sensors corrode over time due to electrolysis. Capacitive sensors are more expensive but last much longer β€” worth the upgrade.

πŸ’» Arduino Code

soil_moisture.ino
INO
// Soil Moisture Alert β€” Volt X
const int sensorPin = A0;
const int buzzerPin = 8;
const int dryThreshold = 600; // Adjust after calibration

void setup() {
  pinMode(buzzerPin, OUTPUT);
  Serial.begin(9600);
}

void loop() {
  int moisture = analogRead(sensorPin);
  Serial.print("Moisture: ");
  Serial.println(moisture);

  if (moisture > dryThreshold) {
    // Dry β€” buzz alert
    tone(buzzerPin, 1000, 500);
    delay(1000);
  } else {
    noTone(buzzerPin);
    delay(500);
  }
}

⭐Reviews & Ratings

β€”0 reviews
5β˜…
0
4β˜…
0
3β˜…
0
2β˜…
0
1β˜…
0
...

Loading reviews...

volt-X / Plant Soil Moisture Alert β€” Arduino Tutorial