Automatic Plant Watering Based on Soil Moisture Sensor and PID Control

Authors

DOI:

https://doi.org/10.54327/set2027/v7.i1.373

Keywords:

automatic watering, soil moisture, PID control, ON/OFF control, Arduino, Tinkercad, Scilab

Abstract

This study presents the design and simulation of an automatic plant watering system based on a soil moisture sensor and Proportional-Integral-Derivative (PID) control, implemented on an Arduino Uno in the Tinkercad circuit simulator and analysed numerically in Scilab. The objective is to provide a documented and reproducible software-in-the-loop baseline for closed-loop soil moisture regulation. The simulated plant couples a first-order direct current (DC) pump/motor model with a first-order soil water-balance model that includes irrigation input, evaporation, and drainage; the PID output is converted into an 8-bit duty-cycle command, which the Arduino firmware realises by relay ON/OFF switching and the Scilab model applies as a continuous average pump drive. With the baseline gains Kp = 5.0, Ki = 0.8, and Kd = 0.1, the response from 30% to a 60% setpoint reached 90% of the step in 4.13 s, peaked at 77.43% (an overshoot of 29.06% of the setpoint), settled within ±2% after 42.83 s, and ended 0.10 percentage points from the setpoint at 60 s. In three further scenarios (20% to 50%, 40% to 70%, and a ±1% sinusoidal sensor disturbance), the overshoot ranged from 24.21% to 35.95% and the settling time from 39.73 s to 46.95 s. Under identical model conditions, a hysteresis ON/OFF controller overshot by 38.40% and sustained a limit cycle between 58.90% and 67.48%; PID reduced the overshoot by 24.3% and the integral absolute error by 20.6% and removed the persistent offset, at the cost of a 13.2% longer rise time. A gain-sensitivity analysis showed that the overshoot is caused mainly by integral action and can be eliminated with a smaller integral gain. All results are obtained from simulation without hardware validation.

Downloads

Download data is not yet available.

Downloads

Published

13.11.2026

How to Cite

[1]
W. Widyasmoro, I. Suwarno, S. Nugroho, N. M. Raharja, and M. H. Alkarim, “Automatic Plant Watering Based on Soil Moisture Sensor and PID Control”, Sci. Eng. Technol., vol. 7, no. 1, pp. 14–29, Nov. 2026, doi: 10.54327/set2027/v7.i1.373.

Similar Articles

11-20 of 30

You may also start an advanced similarity search for this article.