project

IoT Smart Plant Pot

ENGR 111 — Introduction to Engineering Design · Stevens Institute of Technology · Fall 2025
COMPLETE TEAM OF 3

Objective: Design and build a fully autonomous plant watering system that monitors soil humidity, air temperature, and ambient light, and dispenses calibrated water based on sensor readings and a programmed schedule — eliminating the need for human intervention.

Problem Statement

Home plants frequently fail due to irregular watering and the absence of condition-aware care. Most watering solutions rely on timers alone or lack the embedded sensing needed to respond to actual environmental conditions. This project targeted a fully integrated solution: a compact enclosure housing electronics, sensors, pump, and water supply that can be deployed next to any houseplant and operate autonomously for extended periods.

System Architecture
The system uses an ESP32-based WeMos MH-ET Live MiniKit microcontroller connected to a DHT11 temperature/humidity sensor, a capacitive soil moisture sensor, and an LDR photocell. A Feetech motor controller drives a miniature submersible pump. All sensor data is published over WiFi to a HiveMQ MQTT broker at 10-minute intervals using non-blocking millis() scheduling. The pump delivers 20 mL on a 24-hour base schedule, with an additional 20 mL triggered when soil humidity drops below threshold.
Mechanical Design — SolidWorks Enclosure

The enclosure was designed in SolidWorks and 3D printed on a FlashForge Adventurer 5M Pro. A central internal wall physically separates the wet side (pump and water bottle) from the dry side (electronics, breadboard, sensors). Key constraints: 8-hour max print time and practical FDM manufacturability.

SolidWorks assembly
SolidWorks assembly renders — component placement, internal dividing wall, and bottle/pump mounting.
Electrical Design

All sensors share a parallel 3.3V/GND rail on the breadboard, with independent signal lines to the ESP32. Pump control runs through the motor controller at 3.3V. A critical early failure — accidentally powering the pump from the 5V rail — caused board damage from overvoltage stress (visible smoke). Recovery involved systematic pin-by-pin verification and a color-coded rewiring approach.

ComponentESP32 PinFunction
DHT11 sensorGPIO 32Temperature & humidity (digital)
Photocell (LDR)GPIO 34Illuminance (analog ADC)
Soil moisture sensorGPIO 35Soil humidity (analog ADC)
Pump controlGPIO 2Motor driver signal (3.3V)
Software & IoT Layer

The firmware manages two parallel scheduling concerns: sensor publishing every 10 minutes and a 24-hour base pump cycle, plus conditional pump triggering when soil humidity falls below threshold. An early bug caused the MQTT publish interval to fail: the delay() function blocked all loop execution. This was resolved by replacing all time-based delays with millis() comparisons, making the loop fully non-blocking.

Illuminance was computed from the ADC voltage using a derived quadratic relationship calibrated from bench measurements. Post-deployment analysis revealed the photocell had been wired in reverse polarity, causing inverted readings — identified as a hardware error, not a code fault.

Deployment Results — 5-Day Field Test
5
Days deployed
~144
MQTT publishes
20 mL
Base daily dispense

Temperature and soil humidity readings were validated as reliable over the full deployment. Serial monitor confirmed successful WiFi connection, IP assignment, MQTT broker handshake, and pump trigger events. Illuminance readings were unreliable due to inverted photocell wiring — the sole outstanding hardware error.

Key Engineering Lessons
Debug hardware before software.

Multiple sessions were lost attributing hardware faults to code errors. A multimeter should be a first-line debug tool, not a last resort.

Non-blocking scheduling is a system design choice.

The conflict between 10-minute publish intervals and 24-hour pump cycles is unsolvable with delay(); it required treating timing as a system-level architecture problem.

Modular iteration beats full redesign.

When the DHT mount snapped, printing a small 30-minute supplemental bracket was faster and safer than cycling the entire enclosure through another print job.

ESP32IoT / MQTTDHT11SolidWorks3D PrintingMotor DriverWiFi / HiveMQAnalog Sensors