DOI: 10.3390/automation7060177 ISSN: 2673-4052

An Integrated IoT-Based Smart Farming Framework for Tomato Cultivation Using Fuzzy Logic Irrigation Control and Deep Learning Classification

Anwar Sahbel, Mohamed Reda, Ehab H. E. Bayoumi, Hoda Abuzied

Inefficient resource utilisation and changing environmental conditions pose significant challenges to tomato cultivation. This paper presents the design, implementation and experimental validation of a prototype smart farming system that combines Internet of Things (IoT) sensing, fuzzy-logic irrigation control and image-based classification of tomato status. An ESP32 microcontroller acquires soil-moisture, temperature, humidity and rainfall readings and publishes them through MQTT and HiveMQ Cloud to a PC, where a Mamdani fuzzy inference system implemented in MATLAB/Simulink R2025b computes the irrigation demand. The prototype was operated for four months with one potted plant. Separately, five classifiers were compared offline for tomato maturity classification. The five classifiers include ResNet18-based Convolutional Neural Networks (CNN), YOLOv8s cls, Random Forest, Support Vector Machine and K Nearest Neighbours. The ResNet18 achieved the highest test accuracy (95.00%; F1-score 94.97%), followed by YOLOv8s-cls (93.89%), whereas the classical models reached 85.6–88.1% on raw pixels and up to 90.8% on hand-crafted colour and texture features.

More from our Archive