PROJECT 02 · IoT / EMBEDDED SYSTEM / GREEN BUILDING
02

IoT SMART
WATERING &
PLANT MONITORING

An ESP32-based irrigation and monitoring prototype that reads soil moisture, ambient temperature/humidity and tank level, controls a 12 V water pump automatically or manually, synchronizes data through Firebase Realtime Database, and provides remote plant observation using ESP32-CAM.

ESP32Capacitive Soil MoistureDHT11HC-SR04 Relay12V PumpFirebaseMIT App InventorESP32-CAM
Final IoT smart watering and plant monitoring prototype
Actual final prototype documented during project testing: planter, local LCD/control box, power supply, water tank, irrigation line, sensors and ESP32-based controller.
30×comparison trials per sensor test
2.64%DHT11 temperature avg. error
2.56%DHT11 humidity avg. error
4.26%soil-moisture avg. error
0.77%ultrasonic avg. error
2automatic + manual modes

WHY SMART WATERING FOR GREEN BUILDING?

Green-building vegetation needs reliable maintenance while water use should remain efficient. The project combines automatic irrigation with remote monitoring so watering decisions are based on measured plant and environmental conditions instead of fixed manual routines.

PROBLEM

Plant care in green-building areas can be inconsistent when watering, tank level and plant condition are checked manually.

SOLUTION

Use ESP32 as the local controller, read environmental sensors, automate the pump through a relay, synchronize data to Firebase and provide a mobile interface.

SCOPE

Prototype-scale implementation using Wi-Fi. Plant images are used for visual observation only; no computer-vision diagnosis is performed.

HARDWARE, CONTROL, CLOUD & USER INTERFACE

The project integrates sensing, actuation, local feedback, cloud data exchange and mobile interaction in one workflow. Automatic operation is based on sensor thresholds, while manual control remains available through the application and local push button.

SENSING

Capacitive soil moisture, DHT11 ambient temperature/humidity, HC-SR04 tank-level measurement and ESP32-CAM visual monitoring.

CONTROL

ESP32 evaluates sensor data, switches the relay and 12 V water pump, drives the buzzer and updates the local LCD.

IoT

Wi-Fi connection to Firebase Realtime Database for sensor-data synchronization and remote control commands.

MOBILE UI

MIT App Inventor displays temperature, humidity, soil moisture, tank level and pump controls, with camera access for visual monitoring.

SENSORS → ESP32 → ACTUATORS + FIREBASE → MOBILE USER

The local controller reads environmental and tank data, makes watering decisions, drives the pump and local indicators, and exchanges data with Firebase over Wi-Fi. The mobile application reads synchronized values and sends manual pump commands.

Original smart watering system flowchart from project documentation
Original system flowchart from the project report. It shows sensor initialization, automatic/manual mode selection, low-tank warning, pump activation, LCD output, Firebase transmission and MIT App monitoring.

ONE CONTROLLER, MULTIPLE INPUTS & OUTPUTS

01
Capacitive Soil Moisture

Analog soil-moisture input on ESP32 GPIO 34; used as the main trigger for irrigation demand.

02
DHT11

Reads ambient temperature and humidity through GPIO 4 for environmental monitoring.

03
HC-SR04 Ultrasonic

Trigger on GPIO 12 and Echo on GPIO 13; estimates water level in the storage tank.

04
Relay + 12 V Pump

Relay input on GPIO 2 switches the water pump. The actuator irrigates the planter when the control condition is met.

05
Local Interface

16×2 I²C LCD uses SDA GPIO 21 and SCL GPIO 22. Push button on GPIO 14 provides local manual control, while buzzer on GPIO 27 gives tank-level warning.

Actual smart watering prototype hardware
Actual hardware implementation used for system-level testing.

AUTOMATIC WHEN NEEDED, MANUAL WHEN REQUIRED

01

AUTOMATIC MODE

The documented flowchart uses soil moisture below 60% as the irrigation trigger. When the condition is satisfied, ESP32 activates the relay and pump; the status is then updated and sent to the monitoring layer.

02

LOW-TANK ALERT

The system monitors tank level with the ultrasonic sensor. The documented flowchart uses a low-tank threshold below 15% to activate the local buzzer and prompt refilling.

03

MANUAL MODE

A local push button can override automatic logic, while the MIT App also provides pump ON/OFF controls for remote operation and system checks.

04

LOCAL + REMOTE FEEDBACK

Temperature, humidity, soil moisture, tank level, pump state and mode are available locally on the LCD and remotely through the IoT application.

Actual MIT App Inventor smart watering test interface
Actual MIT App test screen showing temperature, humidity, soil moisture, tank distance and manual pump controls.

FIREBASE REALTIME DATABASE + MIT APP INVENTOR

  1. 01 / CONNECTESP32 connects to Wi-Fi before sending project data to the online database.
  2. 02 / UPLOADTemperature, humidity, soil moisture, tank level and pump status are synchronized through Firebase Realtime Database.
  3. 03 / DISPLAYThe Android interface displays live sensor values for remote monitoring.
  4. 04 / CONTROLThe ON/OFF controls allow manual pump operation when manual mode is required.
  5. 05 / RECORDTest data can also be stored in spreadsheet form for offline review and analysis.
Actual Firebase Realtime Database test screen
Firebase Realtime Database during sensor-data transmission testing.
Actual smart watering test data spreadsheet
Recorded sensor data exported to spreadsheet for offline analysis.

PROTOTYPE BUILT AROUND A COMPACT PLANTER

The documented frame is approximately 67 × 28 × 50 cm, supporting a 59.5 × 20 × 23 cm planting container. A 73 cm irrigation line distributes water across the planter. The left side houses the local control box and 45 cm ESP32-CAM stand, while the right side carries the water tank and level sensor.

Original top-view mechanical design of smart watering prototype
Original top-view mechanical design from the project documentation.
67 × 28 × 50 cmMain frame
59.5 × 20 × 23 cmPlanting container
73 cmIrrigation line
45 cmESP32-CAM stand

COMPARISON TESTING ACROSS FOUR SENSOR FUNCTIONS

The uploaded report documents 30 comparison trials for temperature, humidity, capacitive soil moisture and ultrasonic distance measurements. The resulting average error values were used to evaluate measurement consistency before system-level testing.

DHT11 / TEMPERATURE2.64%

Average error against a thermohygrometer.

DHT11 / HUMIDITY2.56%

Average error against a thermohygrometer.

SOIL MOISTURE4.26%

Average error against a three-way soil meter.

ULTRASONIC0.77%

Average distance error against manual measurement.

Temperature2.64%
Humidity2.56%
Soil moisture4.26%
Ultrasonic0.77%

THE PUMP RESPONDS TO ACTUAL SOIL CONDITIONS

10 AUG 202553% → PUMP ON

Soil moisture fell below the automatic threshold. The pump remained active at 46%, then stopped after moisture rose to 75%.

13 AUG 202548% → PUMP ON

After the watering cycle, soil moisture increased to 85% and the pump returned to OFF.

CAMERA TEST4 LIGHTING PERIODS

ESP32-CAM was evaluated in morning, midday, afternoon and night conditions. Image quality dropped significantly at night because of limited illumination.

The report concludes that the system maintained post-watering soil moisture around 75–85% in the recorded tests and that the 60% threshold was suitable for the prototype conditions.

WHAT I WOULD IMPROVE NEXT

CAMERA LOW-LIGHT PERFORMANCE

Night-time plant images lose detail. A better camera or dedicated white illumination would improve remote visual inspection.

AUTOMATIC TANK REFILL

The current prototype warns the user when water is low. The next iteration could add automatic refill control and additional fail-safe level sensing.

SOIL CALIBRATION

Capacitive soil-moisture error increased in very dry conditions. Further calibration with the target soil medium would improve precision.

NETWORK RESILIENCE

The implementation depends on Wi-Fi and Firebase. Local buffering, reconnect logic and offline-safe control would increase robustness.