Automatic Plant Watering Based on Soil Moisture Sensor and PID Control

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.

Authors

Institutions

Publication Details

Journal
Science Engineering and Technology
Published
2026-11-13
DOI
https://doi.org/10.54327/set2027/v7.i1.373
Primary Topic
Smart Agriculture and AI
Type
article
Field-Weighted Citation Impact
0.00

Funders

Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
NOV
article

Automatic Plant Watering Based on Soil Moisture Sensor and PID Control

Iswanto Suwarno, Nia Maharani Raharja, Widyasmoro Widyasmoro, Muhammad Hafid Alkarim et al.
2 links
Science Engineering and Technology
Smart Agriculture and AI
article

Automatic Plant Watering Based on Soil Moisture Sensor and PID Control

Iswanto Suwarno, Nia Maharani Raharja, Widyasmoro Widyasmoro, Muhammad Hafid Alkarim, Sulistyo Nugroho
article en

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.

Science Engineering and TechnologyVol. 7(1)
Sunan Kalijaga State Islamic University Yogyakarta (ID), Muhammadiyah University of Yogyakarta (ID), University of Sarjanawiyata Tamansiswa (ID)
Universitas Muhammadiyah Yogyakarta
Zero hunger
Smart Agriculture and AI
AI Navigator

Ask Laika to Summarize, Analyze, and Connect papers live on the map.

Summarize Papers & Methodologies

Extract key findings, datasets, and comparative methods across publications.

Benchmark Rankings & Visual Analytics

Rank top research institutions, authors, funders, topics, and journals by Field-Weighted Citation Impact (FWCI) and paper volume with instant charts.

Connect Distant Disciplines

Bridge topological clusters on the map to find hidden collaborative intersections.

Laika access coming soon