Soil moisture monitor
Reads soil moisture and prints dry/wet percentage to Serial Monitor.
Build an ESP32 plant monitoring project that reads soil moisture, checks water level, measures room temperature and humidity with BME280, and sounds a buzzer alert when the plant needs attention.
What connects to what, by role. Pin-level detail is in the build steps below.
ESP32 reads the capacitive soil sensor on GPIO34, the water level sensor on GPIO35, and the BME280 over I2C using GPIO21 SDA and GPIO22 SCL. The active buzzer connects to GPIO23 for dry-soil or low-water alerts. Keep all sensor signals at 3.3V-safe levels.
Every one is built from the parts in the box, plus the basics listed under You'll also need.
Reads soil moisture and prints dry/wet percentage to Serial Monitor.
Warns when the reservoir is empty or the sensor reads below the chosen threshold.
Shows temperature, humidity, and pressure readings for the plant area.
Combines all readings so the customer can later publish them to a WiFi dashboard.
Combines soil, water, and room readings into one alert system that sounds the buzzer only when attention is needed.
No projects in that group.
Tick steps off as you go — your place is kept on this device.
The sketch we ship with this kit. Copy it, or ask us for the version matched to your board.
/*
Smart Plant Monitor & Alert Kit
Board: ESP32U / ESP32 DevKit
Parts: capacitive soil moisture sensor, water level sensor, BME280, active buzzer.
Libraries: Adafruit BME280 Library + Adafruit Unified Sensor.
Wiring:
Soil sensor AOUT -> GPIO34, VCC -> 3V3, GND -> GND
Water level SIG -> GPIO35, VCC -> 3V3, GND -> GND
BME280 SDA -> GPIO21, SCL -> GPIO22, VCC -> 3V3, GND -> GND
Buzzer IO -> GPIO23, VCC -> 3V3, GND -> GND
Calibration:
Open Serial Monitor. Note SOIL_DRY with the sensor in air/dry soil and
SOIL_WET in wet soil. Adjust WATER_LOW after testing the water sensor.
*/
#include <Wire.h>
#include <Adafruit_Sensor.h>
#include <Adafruit_BME280.h>
const int SOIL_PIN = 34;
const int WATER_PIN = 35;
const int BUZZER_PIN = 23;
const int SOIL_DRY = 3200;
const int SOIL_WET = 1300;
const int WATER_LOW = 900;
const int DRY_ALERT_PERCENT = 30;
Adafruit_BME280 bme;
int percentFromSoil(int raw) {
int pct = map(raw, SOIL_DRY, SOIL_WET, 0, 100);
return constrain(pct, 0, 100);
}
void setup() {
Serial.begin(115200);
pinMode(BUZZER_PIN, OUTPUT);
digitalWrite(BUZZER_PIN, LOW);
Wire.begin(21, 22);
if (!bme.begin(0x76)) {
if (!bme.begin(0x77)) {
Serial.println("BME280 not found. Check SDA/SCL wiring and address.");
}
}
}
void loop() {
int soilRaw = analogRead(SOIL_PIN);
int waterRaw = analogRead(WATER_PIN);
int soilPct = percentFromSoil(soilRaw);
bool drySoil = soilPct < DRY_ALERT_PERCENT;
bool lowWater = waterRaw < WATER_LOW;
bool alert = drySoil || lowWater;
digitalWrite(BUZZER_PIN, alert ? HIGH : LOW);
Serial.print("Soil raw: "); Serial.print(soilRaw);
Serial.print(" Soil: "); Serial.print(soilPct); Serial.print("%");
Serial.print(" Water raw: "); Serial.print(waterRaw);
Serial.print(" Temp: "); Serial.print(bme.readTemperature(), 1); Serial.print(" C");
Serial.print(" Humidity: "); Serial.print(bme.readHumidity(), 0); Serial.print("%");
Serial.print(" Status: ");
if (lowWater) Serial.println("LOW WATER");
else if (drySoil) Serial.println("DRY SOIL");
else Serial.println("OK");
delay(2000);
}
Beginner ESP32 kit for building a smart plant monitor and alert system: read soil moisture, check water level, measure temperature and humidity with BME280, and sound a buzzer when the plant needs attention. Designed for students, home makers, and small IoT demos.
No prior electronics experience assumed — the guide walks through every step. Connections are push-fit on the breadboard.
Catalogued as suited to makers. Built around DIYKIT catalog bundle hardware. Classroom sets are quoted per seat — ask for a bulk price.
| Kit | Level | Parts | Build guide | Price |
|---|---|---|---|---|
| This kit Smart Plant Monitor & Alert Kit - ESP32 Soil… | Beginner | 7 | 7 steps | AED 69.99 |
| ESP32 & ESP8266 IoT Automation Kit | Intermediate | 24 | 11 steps | AED 180.00 |
This kit is rated Beginner — no prior electronics experience assumed. It is built around the esp32 platform.
45-60 min. The build guide below breaks it into 7 steps.
All 7 components listed in the parts table, counted and checked before dispatch. 7 of them are in stock right now.
Recorded in our catalogue as suited to makers. Bulk pricing is available for classroom sets.