Simulation of an IoT-Based Automated Fertilization and Irrigation System Using ESP32 on Wokwi
Abstract
Proper management of water and nutrients is essential for efficient plant cultivation, yet schedule-based irrigation and unmeasured fertilization may lead to waste. Control logic should therefore be tested before it is implemented on physical hardware. This study designs and evaluates irrigation and fertilization control rules for an IoT-based system through simulation on Wokwi using an ESP32 microcontroller. Soil moisture and pH are represented by virtual analog inputs, while the water pump and nutrient pump are represented by LED indicators. The water pump is controlled with hysteresis, turning on when moisture falls below 40% and off when it reaches or exceeds 60%. The nutrient pump is triggered when pH falls outside the 6.0–7.0 range as a preliminary control rule. Five input scenarios were tested, and output states were observed through the Serial Monitor. The results show that the system responded according to the control rules in all scenarios: the water pump turned on at 30.0% moisture, retained its state at 50.4%, and turned off at 65.6%, while the nutrient pump activated at pH 5.50 and above 7.0. These findings are limited to the consistency of control logic in simulation and do not represent the performance of physical sensors and actuators, IoT communication, or the effect on plant growth.
Downloads
Published
How to Cite
Issue
Section
License
Copyright (c) 2026 Septia Harliansyah (Author); Eko Hariyanto, Zulham Sitorus

This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.










