Real-Time Pest Monitoring System for Chili Plants Based on Internet of Things Using Image Sensors and Soil Moisture Sensors
DOI:
https://doi.org/10.47709/cnahpc.v8i3.8780Keywords:
chili plant, ESP32-CAM, Internet of Things, pest detection, YOLOv8Abstract
Pest infestation is one of the main causes of declining productivity in chili (Capsicum annuum L.) cultivation, while conventional monitoring still relies on manual visual inspection that is subjective, time-consuming, and prone to delayed detection. This study aims to design and implement an Internet of Things (IoT) based real-time pest monitoring system that integrates an image sensor and a soil moisture sensor on chili plants. The system is built around an ESP32 microcontroller and an ESP32-CAM module that captures leaf images, which are analyzed on a server using the You Only Look Once version 8 (YOLOv8) object detection model, while a capacitive soil moisture sensor monitors the growing-media condition. The detection model was trained on a Pest Detection dataset from Roboflow Universe consisting of 38,449 images across 28 pest classes, using 40 epochs and an input size of 480 pixels. Evaluation on 1,612 test images produced a precision of 0.853, a recall of 0.735, an mAP@0.5 of 0.778, an mAP@0.5:0.95 of 0.606, and an F1-score of approximately 0.79. A dedicated eight-stage image pre-processing pipeline was applied to reduce the domain gap between the high-quality training images and the lower-quality ESP32-CAM production images, and all sensor data were transmitted to the server with an average latency below two seconds. The results show that the integration of visual detection and environmental sensing produces an accurate and responsive early-warning system that is suitable for low-cost smart-farming deployment.
Downloads
References
Badan Pusat Statistik. (2023). Statistik hortikultura: Produksi tanaman cabai di Indonesia. Badan Pusat Statistik.
Boursianis, A. D., Papadopoulou, M. S., Diamantoulakis, P., Liopa-Tsakalidi, A., Barouchas, P., Salahas, G., Karagiannidis, G., Wan, S., & Goudos, S. K. (2022). Internet of Things (IoT) and agricultural unmanned aerial vehicles (UAVs) in smart farming: A comprehensive review. Internet of Things, 18, 100187. https://doi.org/10.1016/j.iot.2020.100187
Czosnek, H., Hariton-Shalev, A., Sobol, I., Gorovits, R., & Ghanim, M. (2017). The incredible journey of begomoviruses in their whitefly vector. Viruses, 9(10), 273. https://doi.org/10.3390/v9100273
Dewi, T., Risma, P., & Oktarina, Y. (2024). Fruit sorting robot based on color and size for an agricultural product packaging system. Bulletin of Electrical Engineering and Informatics, 13(1), 1–10.
Farooq, M. S., Riaz, S., Abid, A., Abid, K., & Naeem, M. A. (2019). A survey on the role of IoT in agriculture for the implementation of smart farming. IEEE Access, 7, 156237–156271. https://doi.org/10.1109/ACCESS.2019.2949703
Hari, A., & Kumar, S. (2023). Real-time crop pest detection using deep learning on embedded systems. Journal of Real-Time Image Processing, 20(4), 1–14. https://doi.org/10.1007/s11554-023-01312-9
Jocher, G., Chaurasia, A., & Qiu, J. (2023). Ultralytics YOLOv8 (Version 8.0.0) [Computer software]. https://github.com/ultralytics/ultralytics
Khan, S., Tufail, M., Khan, M. T., Khan, Z. A., & Anwar, S. (2023). Deep learning-based identification system for pest and disease detection in precision agriculture. Computers and Electronics in Agriculture, 205, 107611. https://doi.org/10.1016/j.compag.2023.107611
Li, W., Zhu, T., Li, X., Dong, J., & Liu, J. (2022). Recommending advanced deep learning models for efficient insect pest detection. Agriculture, 12(7), 1065. https://doi.org/10.3390/agriculture12071065
Liu, J., & Wang, X. (2021). Plant diseases and pests detection based on deep learning: A review. Plant Methods, 17(1), 22. https://doi.org/10.1186/s13007-021-00722-9
Nasution, T. H., Siregar, I., & Yasir, M. (2022). IoT-based soil moisture monitoring system for precision agriculture. IOP Conference Series: Earth and Environmental Science, 977(1), 012001.
Putra, A. W., Suryani, E., & Wahyuningsih, D. (2023). Smart farming monitoring system based on ESP32 and cloud database. Indonesian Journal of Electrical Engineering and Computer Science, 30(2), 720–730.
Rahman, C. R., Arko, P. S., Ali, M. E., Khan, M. A. I., Apon, S. H., Nowrin, F., & Wasif, A. (2022). Identification and recognition of rice diseases and pests using convolutional neural networks. Biosystems Engineering, 213, 1–12. https://doi.org/10.1016/j.biosystemseng.2021.11.005
Saleem, M. H., Potgieter, J., & Arif, K. M. (2022). Automation in agriculture by machine and deep learning techniques: A review of recent developments. Precision Agriculture, 22(6), 2053–2091. https://doi.org/10.1007/s11119-021-09806-x
Sandler, M., Howard, A., Zhu, M., Zhmoginov, A., & Chen, L. C. (2018). MobileNetV2: Inverted residuals and linear bottlenecks. Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, 4510–4520. https://doi.org/10.1109/CVPR.2018.00474
Downloads
Published
How to Cite
Issue
Section
License
Copyright (c) 2026 Hari Haran, Jose Given Amanro Silaen, Muhammad Fakhruddin Alrazi, Ertina Sabarita Barus, Muhammad akbar Raihansyah

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











