The ESP32 Plant Care System is an Internet of Things (IoT) project developed to remotely monitor environmental parameters essential for plant health. Using an ESP32 microcontroller connected to sensors, the system continuously reads temperature, air humidity, and soil moisture values. These readings are transmitted in real time via Wi-Fi to a Firebase Realtime Database.
A key component of the project is the responsive web interface built with HTML, CSS, and JavaScript. This interface allows users to select a plant profile, view current sensor data, receive visual alerts when parameters fall outside ideal ranges, and analyze historical data through interactive graphs. The system aims to support both casual and dedicated plant caretakers in maintaining optimal growing conditions, especially when remote monitoring is needed or manual tracking is difficult.
The project combines hardware prototyping, embedded programming, and full-stack web development into an integrated solution for plant care automation and data visualization.
In recent years, smart home solutions have become increasingly popular, including tools that simplify everyday tasks like watering plants. However, many hobbyist solutions either rely on fixed timers or lack real-time adaptability. This project responds to a common challenge: how to ensure houseplants receive the right environmental conditions, especially when caretakers are away or unsure about when and how to act.
Plants have different optimal needs based on species—some thrive in humid environments, while others need dry soil and high temperatures. A one-size-fits-all approach doesn't work. Without consistent monitoring, overwatering, underwatering, or exposing plants to unsuitable conditions can lead to stress or even plant death.
This project addresses that issue by allowing the user to:
- Define optimal environmental ranges for each plant in a Firebase database
- Continuously monitor real conditions using reliable sensors
- Get alerts when values move out of bounds
- Analyze trends over time to make informed decisions about care
By bridging embedded systems with cloud-based storage and modern web development, this project demonstrates a scalable approach to IoT-enabled smart gardening.
ESP32-WROOM-32: Wi-Fi enabled microcontroller that collects and sends sensor data.
DHT22: Measures air temperature and humidity.
HD-38 Capacitive Soil Moisture Sensor: Provides soil moisture readings.
Breadboard, jumper wires, and a 10kΩ pull-up resistor for DHT22.
Written in Arduino IDE (C++) to:
Read data from DHT22 and HD-38
Convert analog readings to percent values
Send data every 10 seconds to /sensor_data
Send historical logs every 10 minutes to /history using timestamps
Firebase Realtime Database stores: /sensor_data → latest readings ; /history → timestamped logs ; /plant_profiles → predefined optimal ranges per plant. Web app reads these values using JavaScript + Firebase SDK.
Throughout the development of the ESP32 Plant Care System, several challenges were encountered. One of the initial difficulties was ensuring stable communication between the ESP32 board and the Firebase Realtime Database, particularly when dealing with intermittent Wi-Fi connections. Calibrating the soil moisture sensor (HD-38) also proved challenging, as raw analog values vary significantly based on soil type and probe depth, requiring careful mapping to consistent percentage values. Integrating multiple sensors on a single breadboard introduced space and wiring constraints, which sometimes led to unstable readings or noise. On the software side, parsing historical data into readable timestamps and plotting it dynamically in the web interface required precise formatting and filtering to ensure performance and clarity. Additionally, balancing real-time responsiveness with data logging every 10 minutes involved fine-tuning delays and HTTP request timing to avoid Firebase write limits or data collisions.
ESP32 Documentation: https://docs.espressif.com/projects/esp-idf/en/latest/esp32/
DHT Sensor Library by Adafruit: https://github.com/adafruit/DHT-sensor-library
Firebase Realtime Database Guide: https://firebase.google.com/docs/database
Chart.js – JavaScript Chart Library: https://www.chartjs.org
ESP32 + Firebase Tutorials: Random Nerd Tutorials – https://randomnerdtutorials.com