Next Article in Journal
Classification of Faults Operation of a Robotic Manipulator Using Symbolic Classifier
Previous Article in Journal
Engineering Properties and Microscopic Mechanisms of Composite-Cemented Soil as Backfill of Ultra-Deep and Ultra-Narrow Foundation Trenches
Previous Article in Special Issue
Tool for Parsing Important Data from Web Pages
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:

SAgric-IoT: An IoT-Based Platform and Deep Learning for Greenhouse Monitoring

Juan Contreras-Castillo
Juan Antonio Guerrero-Ibañez
Pedro C. Santana-Mancilla
1 and
Luis Anido-Rifón
School of Telematics, Universidad de Colima, Colima 28040, Mexico
atlanTTic Research Center, Universidade de Vigo, 36310 Vigo, Spain
Author to whom correspondence should be addressed.
Appl. Sci. 2023, 13(3), 1961;
Submission received: 22 December 2022 / Revised: 30 January 2023 / Accepted: 30 January 2023 / Published: 2 February 2023
(This article belongs to the Special Issue Soft Sensors Based on Deep Neural Networks)


The Internet of Things (IoT) and convolutional neural networks (CNN) integration is a growing topic of interest for researchers as a technology that will contribute to transforming agriculture. IoT will enable farmers to decide and act based on data collected from sensor nodes regarding field conditions and not purely based on experience, thus minimizing the wastage of supplies (seeds, water, pesticide, and fumigants). On the other hand, CNN complements monitoring systems with tasks such as the early detection of crop diseases or predicting the number of consumable resources and supplies (water, fertilizers) needed to increase productivity. This paper proposes SAgric-IoT, a technology platform based on IoT and CNN for precision agriculture, to monitor environmental and physical variables and provide early disease detection while automatically controlling the irrigation and fertilization in greenhouses. The results show SAgric-IoT is a reliable IoT platform with a low packet loss level that considerably reduces energy consumption and has a disease identification detection accuracy and classification process of over 90%.

1. Introduction

As the world population increases uncontrollably, two critical resources are becoming a severe problem: water and food. The technical report published in [1] estimates that the world population will reach 9.15 billion in 2050. This trend motivates a growing food production to accommodate the large global population with the consequent limitation in farmlands and a decreasing number of farmers as fewer people are willing to work in farming. For example, a Virginia winery applied to hire foreign workers to pick grapes after the company could not find American citizens who wanted the job [2].
Agriculture provides the required food but consumes most of the Earth’s available fresh water. In Europe, the agricultural sector consumes a third of the total water supplies, affecting the quantity and quality of open water for other uses [3]. In Mexico, 75.72% of water is used in agriculture [4]. For example, about 240 gallons of water are required to produce a loaf of bread, and a pound of cheese takes about 382 gallons. So, a simple cheese sandwich takes about 56 gallons of water [5].
Several governments have made investing in the agricultural sector a priority. In Mexico, the Federal Government defined agricultural technification as a goal of 520 thousand hectares, representing 10 percent of the ground with irrigation systems [6]. In a global world, it is critical to efficiently monitor crops to significantly increase production and rationalize the use of consumables, materials, and supplies, as well as regulate, more precisely, the crop needs regarding irrigation water, fertilizers, fumigants, and pesticides. Preserving the water is an essential factor that considerably affects agriculture and requires the development of automated mechanisms to use it efficiently. Fertilizers, fumigants, and pesticides help grow vital crops and produce better harvests. However, when misused, they could be detrimental to plants and render them inedible for human consumption. The use of technology will improve the proper use of resources applied to agriculture. The purpose of applying technology is to improve labor and land yields while optimizing the use of resources. However, agriculture automation is complex, as several problems must be solved. Applying technology to automate the agricultural environment will demand more technically savvy farmers who can manage data. That is why it is necessary to modernize the process and train the farmer to develop his technological skills. That is why it is necessary to generate simple mechanisms that thoroughly explain the data obtained. However, the system must be considered an assistant adapted to the needs and knowledge of the farmer.
Agricultural production can be affected by different circumstances, such as plant diseases and pests, which, according to the FAO, are responsible for 20 to 40% of production losses [7].
However, manually monitoring all supplies, soil variables, environmental conditions, and crop health is a challenge that demands a lot of effort. An easy way to monitor and gather ecological information over long periods is required [8]. Therefore, the development and deployment of new technological solutions and methods to improve and automatize water use and detect crop diseases, considering not only the experience of farmers but also soil conditions and characteristics, types of plants, and climatic information, are needed.
Technology in agriculture evolved into the precision agriculture concept, which focuses on ensuring that the crops and soil perform optimally. Precision agriculture provides profitability, sustainability, and environmental protection [9] based on field information such as temperature, humidity, wind speed and direction, and pH level, among others. Farmers can make informed decisions about consumable resources and supplies (water, fertilizers, and pesticides) to maximize crop yield and protect the environment and their product consumers using precision agriculture. In [10], authors defined three essential tasks for precision control of the production environment: (I) monitoring parameters that influence the product yield and quality, (II) performing an in-depth analysis of collected data for making decisions, and (III) applying the best actions and mechanisms based on those decisions.
Several technology-based solutions for gathering and processing information (such as [11,12,13,14,15]) to support agriculture, facilitate decision making, and enhance productivity have been proposed in the literature. Moreover, recent advances in electronic technology enabled the creation of new, smaller, and cheaper devices for gathering environmental data to support ubiquitous computing, ad-hoc and sensor networks, cloud computing, and the Internet of Things [10,16].
IoT helps cultivate the soil using cheap, easy-to-install devices to increase farm productions to meet the world’s food demands based on precision agriculture [17,18,19], intelligent irrigation control [20,21,22], and greenhouse monitoring [23,24,25]. This technology can be applied in open and closed spaces to optimize consumables and supplies (fertilizers, pesticides, soil, and water) by setting automated alarms and threshold values for each resource. Suppose one collected data is out of the threshold value. In that case, a warning will be triggered, thus detecting problems affecting production and reducing the excessive consumption of supplies shortage risk.
On the other hand, plant monitoring is imperative to detect diseases early and implement mechanisms to prevent their spread and production losses [26]. Traditional methods focus on either I) expert visual estimation or II) laboratory studies [27]. The first method is subjective and therefore has low accuracy. The second method identifies morphological characteristics to detect the disease. The main problem with these methods is that they are expensive, time consuming to process, and their detection efficiency is low. In recent years, plant disease detection automatization has integrated technologies such as image processing [28,29], pattern recognition [30,31], and computer vision [32,33].
This paper presents SAgric-IoT, a technology platform based on IoT and CNN for monitoring physical variables and plant disease detection for precision farming. The platform uses communication algorithms for data monitoring and analysis for precision control of the production environment. In addition, it uses convolutional neural networks for plant disease identification and classification. We aim to develop a robust, low-maintenance, and low-cost IoT platform to control and optimize crop production. The remaining paper sections are as follows. Section 2 reviews IoT and precision agriculture. Section 3 describes the proposed technological platform in detail. Section 4 explains the system evaluation, describes the scenario, assessment, and results obtained from a small-scale network, and Section 5 summarizes our work and proposes future research.

2. Related Work

IoT has had a strong impetus in the last few years. In the literature, several works propose IoT architectures and platforms suited for applications such as agriculture [19,34,35], traffic control [36,37,38], smart cities [39,40,41], education [42,43,44], marine environments [45,46,47], and health care [48,49,50,51,52].
Technology and IoT-based agricultural applications for control and automatization of physical variables monitoring (such as soil temperature and moisture, leaf wetness) for precision agriculture have been published in the literature [53,54,55,56,57,58]. The results obtained in this work were the nodes’ design, the simple node interconnection architectures based on IoT or wireless sensor networks design, and a combination to create a communication network of nodes for crop monitoring. Other IoT-based platforms control water consumption using cellular technologies and cloud services [59,60,61]. However, the main problem of these works is that they only show prototype nodes that control or monitor water usage but only evaluate their performance without showing concrete results.
In [62], the authors present a collaboration between process control and remote sensors. However, the authors did not explain the data acquisition and delivery process from different sources (sensors, actuators, coordinators). Most of these applications use proprietary systems to generate and process vast amounts of data, sometimes only at the research level [63]. The main problem with these works is that they only remain in architecture proposals without developing prototype nodes to test in real scenarios. Authors in [64,65] focused on minimizing production risk using wireless sensor networks for real-time monitoring and studying the inter-temporal environmental variability. Their results showed the importance of measuring and recording inter-temporal conditions that contribute to making decisions that improve productivity in agriculture, reinforcing the rationale for how IoT technology contributes to and facilitates the data collection process. In [66,67], authors studied the effects of energy balance in greenhouse production and the optimization of energy consumption in grape production to increase energy efficiency. The results show an improvement of up to 31% in energy consumption in greenhouses compared to those that do not use IoT technologies. In reference [68], the authors argue that cleaner crop production procedures would improve energy efficiency in agriculture. However, authors in [69] argued that technology is not the unique factor influencing modern agriculture. The key to a smooth transition toward sustainable agriculture requires the collaboration of technology, farmers, industries, financial institutions, and policy and decision-makers, among others. This collaboration would resolve conflicts and reduce deficiencies to promote sustainable development [70].
For disease detection, convolutional neural networks have become one of the most widely used tools for this activity [71,72,73,74]. In [75], CNNs have been combined with learning vector quantization (LVQ) to detect and classify tomato leaf diseases. In another work, the authors combined four CNN models (Inception, Resnet, Inception Resnet, and Densenet) for plant disease detection, achieving an accuracy of 87% [76]. Other authors have focused on creating real-time models for rapidly detecting plant diseases [77,78,79,80] and evaluated the performance of models such as LeNet, VGG16, ResNet, and Xception in plant disease detection, obtaining accuracy levels of around 95%. Finally, some authors have proposed their models, getting results with accuracy levels of up to 98% [81,82,83,84].

3. SAgric-IoT Platform Description

SAgric-IoT is an easy-to-deploy, use, maintain, and upgrade platform for monitoring and controlling IoT for agricultural production. SAgric-IoT is based on low-cost and low-powered components which would be adapted to the farmer’s requirements. SAgric-IoT is focused on monitoring, data gathering, data processing, and data analysis to improve the efficiency of open and closed fields, reducing human interactions and rationalizing the use of water and other resources.
In this section, we first describe the general scenario used in SAgric-IoT. Next, we provide a review of the logical architecture of SAgric-IoT. Then, we explain in detail the designed hardware for our platform. We describe the dissemination protocol used in SAgric-IoT. Finally, we describe the convolutional neural network model implemented for plant disease detection.

3.1. General Scenario

Figure 1 shows the IoT on-site scenario for the SAgric-IoT platform. The architecture consists of four main nodes: the sensor nodes, the camera nodes, the gateway node, and the processing and storage node. Sensor nodes gather data from all sensors and periodically send it to the gateway node via other sensor nodes or directly, depending on the node’s distance from the gateway node. They are deployed on the greenhouses and establish a wireless network (based on 802.15.4) to communicate among themselves using radio-frequency links. The camera nodes send the images via Wi-Fi to the gateway node, where the trained CNN model for plant disease detection is stored. When the model identifies a possible disease situation in the crop area, a notification indicates the camera’s location and the detection image. A gateway node is also deployed along with the sensor nodes to enable a connection between the SAgric-IoT platform and the Internet (cloud server). The gateway node supports three communication interfaces: ZigBee to maintain communication with the sensor nodes, Wi-Fi to connect to the camera nodes, and a cellular interface to transmit data to the storage and processing node. A farmer has remote access to the gathering data to know the greenhouse conditions and control the different sensor and actuator devices and alert notifications when the CNN model detects a crop health problem situation. The gateway node includes a cellular network interface to transmit all gathered data to the cloud server. A web and mobile application were created as a cloud service to consult data information, receive alert notifications, and decide about control systems.

3.2. Layered IoT Architecture

The SAgric-IoT design complies with the remote monitoring needs, contributing to reducing human resource investment. SAgric-IoT defines a five-layered model (as shown in Figure 2) with a transparent interconnection of all platform components and data dissemination in the agriculture precision area. The defined architecture covers all seven OSI model layers, as described in the following sentences. The gathering layer comprises the data link and physical layers. The communication layer is integrated with the data link and network layers. Finally, the processing and end-user layers are directly related to the four upper layers (transport, session, presentation, and application). The security layer is a transversal layer that interacts with the other layers of the architecture to obtain an end-to-end security level.

3.2.1. Gathering Layer

The gathering layer collects data relevant to physical environmental parameters from a given area of interest from all the sources on farmland and sensor nodes on the fields (such as air temperature and humidity, soil temperature and moisture, and pH, among others). It also captures images through the cameras distributed in the monitoring region.
In the last decade, several efforts have developed and defined low-power D2D standards and solutions [85,86,87], generating many promising radio technologies for D2D connectivity for local and wide area networks.
One of the key challenges is determining the best data-transmission networking technology based on: transmission time, range, network size, and so on [88,89,90]. Table 1 summarizes some of the results of these past studies.

3.2.2. Communication Layer

The communication layer transmits all data collected by sensor nodes to the gateway. This layer defines the communication protocol for data transmission. As sensors are stationary, the network topology does not change. Additionally, data transmission requires low latency, high reliability, and a high level of security to protect the collected data. The gateway node is powered by both ZigBee and Wi-Fi interfaces. This layer selects the best route to send the information by using several selection parameters, such as RSSI and the number of hops.

3.2.3. Processing Layer

This layer processes large amounts of information using policy-based management to trigger alarms and improve production. Additionally, government agencies use processed results (such as SAGARPA in México) to develop production maps to help farmers define the best crops, the best fertilizers, and the quantity of water required for each season or production phase. Each crop type has its own value range for each physical parameter (such as soil temperature and humidity, pH level, environmental temperature, and moisture). These values are recorded on the platform. Table 2 shows an example of ideal physical parameters for tomatoes. Data are evaluated in real time to detect atypical values from the different physical parameters (values outside the defined range) that can represent abnormal conditions. Based on the data, the system can activate other systems (such as irrigation systems).
The processing layer supports an extensive database that can accommodate massive amounts of data from the sensor nodes relayed through the communication layer. The database is interfaced with data analysis algorithms and real-time scripts for data visualization and evaluation (Figure 3).
The gateway node also implements the processing layer, where the CNN model is stored and processed to identify and classify diseases in the crop.

3.2.4. End User Layer

This layer is responsible for facilitating the farmer’s access to the data through a web service and software tools using a web and mobile application.

3.2.5. Security Layer

Security in the sensor nodes’ communication is essential within the SAgric-IoT system. The nodes provide mechanisms for devices’ access control to the network, encryption (using symmetric key cryptography), and integrity to verify that the received frames were not altered, following the security schemes defined in the 802.15.4 standard. The data are encrypted before being sent (128-bit AES encryption) and then decrypted at the receiver for use. The following parameters were configured in each Xbee node: first, E.E. = 1: AES encryption enable, and the parameter KY: AES encryption key with a string of 32 hexadecimal characters. Second, the camera nodes’ security with WPA2. The service provider controls the security of the processing and storage layers. Finally, the end-user accesses the system using a specific username and password and the secure HTTP protocol for connection to the system.

3.3. Electronical Board

The main challenge of the design of the SAgric-IoT was to build low-cost and energy-efficient hardware capable of monitoring, gathering, and controlling physical parameters. The hardware board comprises four modules: microcontroller, sensors and actuators, energy, and a wireless communication module, as shown in Figure 4.
The microcontroller module gathers information from the attached sensors and relays such data to the gateway node. Depending on the application, the microcontroller can be battery-powered, solar-powered, or backup battery-powered. We used the Microchip PIC18LF46K22 microcontroller that executes up to 16 MIPS (millions of instructions per second); an input voltage of 3.3 V is required, and its CPU max current is 9.0 mA due to its specifications and low cost. The microcontroller has 64 K bytes for program memory, 3896 bytes for RAM, and 1024 bytes for EEPROM memory. An onboard 10-bit analog-to-digital converter (ADC) with 28 analog input channels and 35 I/O pins.
Sensors and actuators are used in precision agriculture to measure different environmental parameters. We use the sensor shown in Table 3.
AM2315 is an I2C-interface temperature and humidity sensor (Figure 5a). This sensor contains a DS18B20 temperature sensor and a capacitive humidity sensor. It has 3.5 to 5.5 V power and I/O and uses 10 mA max current during conversion. On the other hand, the AM2302 is a basic, low-cost digital temperature and humidity sensor (Figure 5b). It uses a capacitive humidity sensor and a thermistor to measure the surrounding air and outpost a digital signal on the data pin. The SHT-10 sensor includes a temperature/humidity sensor module (Figure 5c). The casing is weatherproof and will keep water from seeping into the sensor’s body and damaging it, but it allows air to pass through so it can measure the soil’s humidity (moisture). Humidity and temperature have 4.5% and 0.5% precision readings, respectively.
We use XBee S2C radios connected to a microcontroller through a UART (universal asynchronous receiver-transmitter). This module operates on the 2.4 GHz ISM band, which significantly reduces the power consumption of our design. In addition, the module has a coverage area of up to 60 m in indoor spaces and 1200 m in outdoor locations with a line-of-sight range. It has a transmit power output of 3.1 mW. XBee modules provide wireless connectivity to end-point devices in ZigBee mesh networks.
The gateway nodes use Raspberry Pi 3 Model B, which has a 1.2 GHz 64-bit quad-core ARMv8 CPU, an integrated 802.11n wireless LAN and Bluetooth 4.1, Bluetooth Low Energy (BLE), 4 USB ports, a display interface (DSI), and a micro-SD card slot.
The camera nodes consist of an ESP32-CAM board with Wi-Fi and Bluetooth and an OV2640 camera (Figure 6). This module contains a microSD card slot that serves as a support for the storage of images captured with the camera.

3.4. Proposed Dissemination Protocol

For the design of the dissemination protocol, we considered two critical issues: energy and reliability. Energy is the most important issue when designing dissemination protocols for IoT, where the application demands continuous information from the network field. For the design of the dissemination protocol: (I) we defined a static network architecture based on clusters; (II) the gateway node has no energy constraints; (III) the gateway node is not within the range of each sensor node, so a multi-hop transmission is needed; and (IV) heterogeneous sensors are implemented in each node.
Our protocol defines three types of nodes: end-node, routing, and gateway. End-node nodes gather data from the sensors but cannot retransmit data to other sensor nodes. Routing nodes are responsible for collecting and retransmitting data from different sensor nodes. They also maintain a routing table that allows nodes to choose the best route for data transmission. Finally, the gateway node is the central node that receives all the gathered data from different sensor nodes and sends it to the Internet. Figure 7 shows the state diagram for the protocol.
Our protocol defines data and controls messages. The protocol starts when a sensor node switches on. Each sensor node starts in the gateway node and sends a control message (Register.request) requesting its inclusion on the IoT network. The gateway node registers the new node and sends it the response (Register.response), where indicated, the type of node in the network (sensor or routing node), according to the number of hops the message takes to reach the gateway node. If the sensor node is an end node, it gathers data from different sensors, sends them to the gateway node, and changes its status to sleep to save energy. If the sensor node is a routing node, the node is also responsible for retransmitting the data from other sensors, so the sensor nodes wake up using a timer or a routing transmission request. The sensor node changes its status from disconnected to setup status when it receives the response. Afterward, the sensor and gateway nodes exchange messages (setup.request, and setup.response) to establish the gathering time for each sensor. At that moment, a sensor node is ready to begin the data gathering, so its status changes to the gathering status. In this status, the sensor nodes get sensor values, structure them into frames, and send them to the gateway node. When a sensor node gathers data from the different sensors, it sends a new message to the gateway node. SAgric-IoT uses the MAC data frame defined by IEEE 802.15.4 to build the message (Figure 8).
The message contains frame control fields, destination address fields (in our case, we used 16-bit destination addresses), a data field where the data from the different sensors are included, and a checksum field to check that the message is not corrupted. This frame is sent to the gateway node through the data.transmit message. When the sensor node finishes sending data, it changes its status to Sleeping status (Sleep.on) to save energy for an established period. All sensors in the node and the microcontroller are off, and the node is considered a sleep node. When the sleeping time finishes, the sensor node wakes up and starts another data-gathering session from the sensors, or when the gateway node sends a request for information on data from the sensors. After the node gathers data and sends it to the gateway node, it goes to sleep again to save the battery (Sleep.on).

3.5. Convolutional Neural Network Model

The following paragraphs explain the proposed architecture for the plant leaf disease detection and classification model. The proposed model takes color images of plant leaves as input and displays the image with a series of labels representing the plant leaf health state (whether it is healthy or the name of the detected disease) and the prediction percentage value obtained by the model as output.

3.5.1. Dataset

We used the public PlantVillage dataset of 20,600 images in 10 categories, available at [91]. Table 4 shows the categorized information contained in the dataset.
For the project, only the tomato categories were used to test the model (a total of 16,012 images) [92]. The total dataset was divided into two parts, assigning 80% of the images for training (12,810 images) and the rest for validation (3202 images). The problem with the models is that during the training process, overfitting can occur (i.e., the model “memorizes” the dataset) [93]. Thus, we applied a method known as data augmentation [88] to increase the dataset. New images were created using transformation methods (rotation, brightness adjustment, and Gaussian noise) to complement the dataset.

3.5.2. Model Creation

A model based on a convolutional neural network architecture was developed for the plant disease detection process. The model takes color 200 × 200 images normalized to (0,1) as input for training and validation. The neural network architecture consists of five convolutional layers using 256, 128, 64, 32, and 16 filters, respectively. The kernel size for the 2D convolution window was 3 × 3. Rectified linear unit (ReLU) was used as the activation model for each convolutional layer. MaxPooling layers were applied to each convolutional layer. In addition, a global average pooling layer was applied to convert the data to a column vector. This layer is connected to a dense layer of 10 output nodes (which represent the categories used in the model) that uses softmax as the activation model.

3.5.3. Model Training

Table 5 shows the parameters for training the model and the Adam optimization algorithm. The model’s loss function was categorical_cross_entropy, one of the most widely used functions for multi-class classification. The number of epochs was 200.

4. Results

4.1. Prototype Evaluation

We examined two scenarios to demonstrate the benefits of using SAgric-IoT. For the first scenario, we validate the performance of the sensor node and the data gathered from the different sensors by performing tests in a controlled environment (laboratory). Data measurements for the environmental parameters such as temperature and humidity were recorded every minute for three days using a set of sensor nodes separated by 10 m from the base station and connected directly in a star topology. The idea was to determine the node’s energy consumption and data transmission reliability in a situation of maximum sense frequency.
For the second scenario, sensor nodes were deployed throughout the field to evaluate the dissemination protocol’s data-transmission performance. The environmental parameter data measurements were collected every 5 min for three days. The set of sensor nodes separated approximately 50 m from each other, covering an area of 200 × 200 m, as shown in Figure 9. We defined levels to enable the multi-hop transmission model.
We evaluated SAgric-IoT performance by analyzing the nodes’ energy consumption and reliability. Moreover, we examined the performance of the SAgric-IoT protocol in comparison with an average transmission model without a sleep function into the node.
For both scenarios, nine sensor nodes designed at the INNOVA THING® company (Colima, Mexico) and a gateway node were employed to interconnect a small-scale network. Two sensors per node gathered data from four physical variables (air temperature and humidity and soil humidity and temperature). For the cloud server, both Apache and MySQL were running on a computer with Ubuntu 14.04. The gateway node uses a Raspberry Pi 3 Model B with a 1.2 GHz 64-bit quad-core ARMv8 CPU, an integrated 802.11n wireless LAN and Bluetooth 4.1, Bluetooth Low Energy (BLE), 4 USB ports, a display interface (DSI), and a micro-SD card slot. Each sensor node was set to sense each variable every five minutes. In the test, we gathered around five thousand values from the sensors and stored them in the cloud server database.

Scenarios Results

Figure 10a,b shows the energy consumption for scenario 1 with different nodes in a controlled environment. Results show the battery lifetime of a system by continually logging the measurement data. We observed that a node used in SAgric-IoT decreased around 11% of the battery life of its maximal level. However, a node with a standard transmission without sleep mode decreased 62% the battery life of its maximal level. These test results showed that high measurement frequency and data transmission should be avoided as the battery life would significantly decrease over a few days, resulting in lower quality of measured data and frequent battery exchange. As shown, SAgric-IoT reduces the average energy consumption by almost 44% compared to a standard transmission without sleep mode.
Figure 10b shows the percentage of received packets per node for both types of transmission. The rate of received packets obtained by both transmission models, considering a directly connected scenario, is similar, with a percentage of successful transmissions at 99%.
Figure 11 shows the results obtained for the second scenario, and Figure 11a illustrates the energy consumption for the different nodes in the field environment. The difference was significant in the energy consumption from the various nodes. Nodes 1 and 2 consumed only 13% of their energy; nodes 3 to 5 consumed 9%, while nodes 6 and 7 consumed 5.6%, and nodes 8 and 9 consumed 3%. The main reason for that difference is the number of transmissions per node. As the nodes are nearer the gateway node, more communications are performed because they must transmit their data and data from other nodes. However, we observed that SAgric-IoT nodes saved around 26% more energy than nodes using transmission without our sleep mode, increasing the battery lifetime.
The results show a significant difference between the two transmission modes, considering a multi-hop scenario. SAgric-IoT had a maximum loss of transmitted packets of 2%, while the other model had a total loss of 9%, as shown in Figure 11.
In the initial conclusion, we can observe that the efficiency of SAgric-IoT is due to better control of the energy consumption for the sleep mode. If the energy consumption of the microcontroller and the sensors is regulated, the sensor nodes maximize their energetic benefits, increasing the node’s battery lifetime.

4.2. Model Evaluation

The model was developed in Python with TensorFlow, Keras, and other libraries such as NumPy, Matplotlib, and TensorBoard. Accuracy, precision, recall, and f1 score were the evaluation metrics. The following equations represent how to calculate each.
A c c u r a c y = T P + T N T P + T N + F P + F N
P r e c i s i o n = T P T P + F P
R e c a l l = T P T P + F N
F 1   S c o r e = 2 × p r e c i s i o n × r e c a l l p r e c i s i o n + r e c a l l
TP represents the number of optimistic predictions, TN represents the number of negative projections, FP represents the number of false positives, and FN represents the number of false negatives.

Results Obtained

Figure 12 shows the model’s performance for leaf disease identification and classification during the training and validation phases. The results show an accuracy of 97.4% in the training phase and 92% in the validation phase, which are pretty good values and are within the range of values obtained in other published works in the literature.
A confusion matrix was generated to analyze the results of how our supervised algorithm works [94,95]. Figure 13 shows the confusion matrix.
Results show that the proposed model predicted half of the classes with an accuracy equal to or greater than 98%. Only the class with the lowest number of images for training (Tomato_mosaic_virus) obtained a 94% value.
Table 6 concentrates on the proposed model’s results in the dataset’s disease classification process for each class. The recall metric is high in each category of the dataset, showing that the accuracy of the proposed model is high (>90%), correctly classifying the diseases.
The model was saved as a hierarchical data file and was used during the prediction process, with some results shown in Figure 14.
Finally, a comparison was made with a work that analyzes different techniques for disease detection in tomato plants [96]. ResNet50, Xception, MobileNet, ShuffleNet, and DenseNet were compared with the five techniques used in this work. Our model was trained with the dataset used in that work (Plant Village), but with 13,112 images. The dataset was distributed 80% for training and 20% for validation. The accuracy of the training process was compared. The results are shown in Figure 15. From these results, we can conclude two things. The first is that the proposed model only underperforms the VGG16 model structure with a difference of about 1.2%. The second conclusion is that our model had a similar performance even when the training used a smaller number of images, which shows the stability of the proposed model.

5. Conclusions

In this paper, we evaluated SAgric-IoT, an IoT platform, in terms of packet delivery ratio and energy consumption in a small-scale network under a controlled environment (laboratory) and test bed conditions in a field, including its embedded system, the communication protocol, and its algorithms. SAgric-IoT reduces the intensive human involvement required in current agricultural information collection systems and provides information in a faster way.
Results proved that SAgric-IoT is superior in energy saving and reliability of transmission. On the other hand, the CNN model for identifying diseases in the crop has high levels of accuracy, with average values greater than 95%. This value has an acceptable reliability level for detecting early disease problems affecting the yield. We conclude that SAgric-IoT is a viable solution to improve precision agriculture because it is a wireless platform that uses low-power algorithms for gathering data.
Our future work focuses on the platform’s security to avoid integrity problems with the collected data that cause a reduction in the quality or quantity of production.
Another significant challenge to solve in the next phase is to go from a model trained with images taken in the laboratory to images generated directly in the sowing field. Due to the lack of context and diversity in plant appearance, deep learning models trained on individual leaf photographs may need help identifying plant diseases in full plant images. However, several studies have shown that the use of a combination of leaf and full plant images, and the use of deep learning techniques, can improve the accuracy of plant disease detection.
For example, a study [97] to detect tomato plant diseases used a convolutional neural network (CNN) trained with laboratory-taken leaf images and real-world leaf images. The real-world leaf includes other elements, such as stems and other leaves. With this combination of training, they achieved an accuracy rate of 99.53%. Another recent study [98] used various images from a leaf dataset and manually taken photos, along with deep learning techniques, to detect diseases in grapevine plants and achieved over 80% accuracy in this mixed scenario.
In summary, a deep learning model trained only with images of a single leaf may have difficulties recognizing diseases in plants in pictures of a whole plant. Still, the combination of leaf and entire plant images, as well as deep learning techniques, can significantly improve accuracy in disease detection in plants.
In future work, the model will be trained with complete plant images and implemented in the real-time plant monitoring scenario. This way, it will be possible to check the crops’ conditions by leaf samples and directly monitor the plants from the images captured by the camera system, fully integrating it into the SAgric-IoT platform.

Author Contributions

Conceptualization, J.A.G.-I. and J.C.-C.; methodology, P.C.S.-M. and L.A.-R.; formal analysis, J.A.G.-I., J.C.-C. and P.C.S.-M.; data curation, L.A.-R.; writing—original draft preparation, J.A.G.-I. and J.C.-C.; writing—review and editing, P.C.S.-M. and L.A.-R. All authors have read and agreed to the published version of the manuscript.


This research received no external funding.

Institutional Review Board Statement

Not applicable.

Informed Consent Statement

Not applicable.

Data Availability Statement

The data presented in this study are available on request from the corresponding author.

Conflicts of Interest

The authors declare no conflict of interest.


  1. Alexandratos, N.; Bruinsma, J.; Alexandratos, N.; Bruinsma, J. World Agriculture towards 2030/2050: The 2012 Revision; 2012. Available online: (accessed on 21 December 2022).
  2. The Associated Press. Trump Winery Seeks More Foreign Workers This Season. In Denver Post; MediaNews Group: Denver, CO, USA, 2017; Available online: (accessed on 1 February 2023).
  3. European Environment Agency. Water for Agriculture. European Environment Information and Observation Network. Eionet: Copenhagen, Denmark. 2012. Available online: (accessed on 1 February 2023).
  4. CONAGUA. Estadísticas Del Agua En México 2014; Secretaría de Medio Ambiente y Recursos Naturales: Ciudad de México, Mexico, 2015; Available online: (accessed on 1 February 2023).
  5. Hoekstra, A. The Water Footprint of Food; Water for food; University of Twente: Enschede, The Netherlands, 2008. [Google Scholar]
  6. Presidencia de la República. Se Han Sentado Las Nuevas Bases Del Sector Agropecuario, Afirma Presidente López Obrador al Informar Avances Para El Campo Mexicano. Gob. México 2019. [Google Scholar]
  7. FAO. Climate Change Fans Spread of Pests and Threatens Plants and Crops; FAO: Rome, Italy, 2021. [Google Scholar]
  8. Santoshkumar, K.C.; Chavhan, S. Development of Wireless Sensor Node to Monitor Poultry Farm. In Mobile Communication and Power Engineering; Das, V.V., Chaba, Y., Eds.; Communications in Computer and Information Science; Springer: Berlin/Heidelberg, Germany, 2013; Volume 296, pp. 27–32. ISBN 978-3-642-35863-0. [Google Scholar]
  9. Zhou, L.; Chen, N.; Chen, Z.; Xing, C. ROSCC: An Efficient Remote Sensing Observation-Sharing Method Based on Cloud Computing for Soil Moisture Mapping in Precision Agriculture. IEEE J. Sel. Top. Appl. Earth Obs. Remote Sens. 2016, 9, 5588–5598. [Google Scholar] [CrossRef]
  10. Srbinovska, M.; Gavrovski, C.; Dimcev, V.; Krkoleva, A.; Borozan, V. Environmental Parameters Monitoring in Precision Agriculture Using Wireless Sensor Networks. J. Clean. Prod. 2015, 88, 297–307. [Google Scholar] [CrossRef]
  11. Chen, N.; Zhang, X.; Wang, C. Integrated Open Geospatial Web Service Enabled Cyber-Physical Information Infrastructure for Precision Agriculture Monitoring. Comput. Electron. Agric. 2015, 111, 78–91. [Google Scholar] [CrossRef]
  12. Misra, S.; Krishna, P.V.; Saritha, V.; Agarwal, H.; Shu, L.; Obaidat, M.S. Efficient Medium Access Control for Cyber–Physical Systems with Heterogeneous Networks. IEEE Syst. J. 2015, 9, 22–30. [Google Scholar] [CrossRef]
  13. Behzadan, A.; Anpalagan, A.; Woungang, I.; Ma, B.; Chao, H.-C. An Energy-Efficient Utility-Based Distributed Data Routing Scheme for Heterogenous Sensor Networks: An Energy-Efficient Scheme for Heterogenous Sensor Networks. Wirel. Commun. Mob. Comput. 2015, 15, 2020–2037. [Google Scholar] [CrossRef]
  14. Dhurandher, S.K.; Sharma, D.K.; Woungang, I.; Saini, A. Efficient Routing Based on Past Information to Predict the Future Location for Message Passing in Infrastructure-Less Opportunistic Networks. J. Supercomput. 2015, 71, 1694–1711. [Google Scholar] [CrossRef]
  15. Du, L.; Gong, W.; Shi, S.; Yang, J.; Sun, J.; Zhu, B.; Song, S. Estimation of Rice Leaf Nitrogen Contents Based on Hyperspectral LIDAR. Int. J. Appl. Earth Obs. Geoinf. 2016, 44, 136–143. [Google Scholar] [CrossRef]
  16. Guzman-Sandoval, V.M.; Gaytan-Lugo, L.S.; Santana-Mancilla, P.C. I-Care: An IoMT Remote Monitoring System of Physiological Pain in Pediatric Patients. In Proceedings of the 2021 Mexican International Conference on Computer Science (ENC), Morelia, Mexico, 9 August 2021; pp. 1–4. [Google Scholar]
  17. Cambra, C.; Díaz, J.R.; Lloret, J. Deployment and Performance Study of an Ad Hoc Network Protocol for Intelligent Video Sensing in Precision Agriculture. In Ad-hoc Networks and Wireless; Garcia Pineda, M., Lloret, J., Papavassiliou, S., Ruehrup, S., Westphall, C.B., Eds.; Lecture Notes in Computer Science; Springer: Berlin/Heidelberg, Germany, 2015; Volume 8629, pp. 165–175. ISBN 978-3-662-46337-6. [Google Scholar]
  18. Barcelo-Ordinas, J.M.; García-Vidal, J.; Chanet, J.P.; Hou, J.M. A Survey of Wireless Sensor Technologies Applied to Precision Agriculture. In Precision Agriculture ’13; Wageningen Academic Publishers: Gelderland, The Netherlands, 2013; pp. 801–808. [Google Scholar]
  19. Dholu, M.; Ghodinde, K.A. Internet of Things (IoT) for Precision Agriculture Application. In Proceedings of the 2018 2nd International Conference on Trends in Electronics and Informatics (ICOEI), Tirunelveli, India, 11–12 May 2018; pp. 339–342. [Google Scholar]
  20. Lee, S.; Yang, Y.; Ibrahim, M.A.; Jun, C.; Lim, E.G.; Zhai, Y. Design on Smart Grid and Irrigation Management: Based on Information Sharing. In Proceedings of the 2021 18th International SoC Design Conference (ISOCC), Jeju Island, Republic of Korea, 6 October 2021; pp. 191–192. [Google Scholar]
  21. Vaishali, S.; Suraj, S.; Vignesh, G.; Dhivya, S.; Udhayakumar, S. Mobile Integrated Smart Irrigation Management and Monitoring System Using IOT. In Proceedings of the 2017 International Conference on Communication and Signal Processing (ICCSP), Chennai, India, 6–8 April 2017; pp. 2164–2167. [Google Scholar]
  22. Qiong, D.; Hao, P. Design and Implementation of Irrigation Water Saving Control System Based on WSN. In Proceedings of the 2021 International Conference on Intelligent Transportation, Big Data & Smart City (ICITBS), Xi’an, China, 27–28 March 2021; pp. 75–78. [Google Scholar]
  23. Yang, J.; Xu, Z.; Sun, Q. Research and Design of Greenhouse Environment Monitoring System Based on NB-IoT. In Proceedings of the 2021 33rd Chinese Control and Decision Conference (CCDC), Kunming, China, 22 May 2021; pp. 5641–5646. [Google Scholar]
  24. Singh, R.K.; Berkvens, R.; Weyn, M. Energy Efficient Wireless Communication for IoT Enabled Greenhouses. In Proceedings of the 2020 International Conference on Communication Systems & NETworkS (COMSNETS), Bengaluru, India, 7–11 January 2020; pp. 885–887. [Google Scholar]
  25. Sundari, M.S.; Mathana, J.M.; Nagarajan, T.S. Secured IoT Based Smart Greenhouse System with Image Inspection. In Proceedings of the 2020 6th International Conference on Advanced Computing and Communication Systems (ICACCS), Coimbatore, India, 6–7 March 2020; pp. 1080–1082. [Google Scholar]
  26. DeChant, C.; Wiesner-Hanks, T.; Chen, S.; Stewart, E.L.; Yosinski, J.; Gore, M.A.; Nelson, R.J.; Lipson, H. Automated Identification of Northern Leaf Blight-Infected Maize Plants from Field Imagery Using Deep Learning. Phytopathology 2017, 107, 1426–1432. [Google Scholar] [CrossRef]
  27. Bock, C.H.; Poole, G.H.; Parker, P.E.; Gottwald, T.R. Plant Disease Severity Estimated Visually, by Digital Photography and Image Analysis, and by Hyperspectral Imaging. Crit. Rev. Plant Sci. 2010, 29, 59–107. [Google Scholar] [CrossRef]
  28. Devaraj, A.; Rathan, K.; Jaahnavi, S.; Indira, K. Identification of Plant Disease Using Image Processing Technique. In Proceedings of the 2019 International Conference on Communication and Signal Processing (ICCSP), Chennai, India, 4–6 April 2019; pp. 0749–0753. [Google Scholar]
  29. Mugithe, P.K.; Mudunuri, R.V.; Rajasekar, B.; Karthikeyan, S. Image Processing Technique for Automatic Detection of Plant Diseases and Alerting System in Agricultural Farms. In Proceedings of the 2020 International Conference on Communication and Signal Processing (ICCSP), Chennai, India, 28–30 July 2020; pp. 1603–1607. [Google Scholar]
  30. Phadikar, S.; Sil, J. Rice Disease Identification Using Pattern Recognition Techniques. In Proceedings of the 2008 11th International Conference on Computer and Information Technology, Khulna, Bangladesh, 24–27 December 2008; pp. 420–423. [Google Scholar]
  31. Sarayloo, Z.; Asemani, D. Designing a Classifier for Automatic Detection of Fungal Diseases in Wheat Plant: By Pattern Recognition Techniques. In Proceedings of the 2015 23rd Iranian Conference on Electrical Engineering, Tehran, Iran, 10–14 May 2015; pp. 1193–1197. [Google Scholar]
  32. Thangadurai, K.; Padmavathi, K. Computer Visionimage Enhancement for Plant Leaves Disease Detection. In Proceedings of the 2014 World Congress on Computing and Communication Technologies, Trichirappalli, India, 27 February–1 March 2014; pp. 173–175. [Google Scholar]
  33. Yong, Z.; Tonghui, R.; Changming, L.; Chao, W.; Jiya, T. Research on Recognition Method of Common Corn Diseases Based on Computer Vision. In Proceedings of the 2019 11th International Conference on Intelligent Human-Machine Systems and Cybernetics (IHMSC), Hangzhou, China, 24–25 August 2019; pp. 328–331. [Google Scholar]
  34. Puranik, V.; Sharmila; Ranjan, A.; Kumari, A. Automation in Agriculture and IoT. In Proceedings of the 2019 4th International Conference on Internet of Things: Smart Innovation and Usages (IoT-SIU), Ghaziabad, India, 18–19 April 2019; pp. 1–6. [Google Scholar]
  35. Guo, T.; Zhong, W. Design and Implementation of the Span Greenhouse Agriculture Internet of Things System. In Proceedings of the 2015 International Conference on Fluid Power and Mechatronics (FPM), Harbin, China, 5–7 August 2015; pp. 398–401. [Google Scholar]
  36. Guerrero-ibanez, J.A.; Zeadally, S.; Contreras-Castillo, J. Integration Challenges of Intelligent Transportation Systems with Connected Vehicle, Cloud Computing, and Internet of Things Technologies. IEEE Wirel. Commun. 2015, 22, 122–128. [Google Scholar] [CrossRef]
  37. Celesti, A.; Galletta, A.; Carnevale, L.; Fazio, M.; Lay-Ekuakille, A.; Villari, M. An IoT Cloud System for Traffic Monitoring and Vehicular Accidents Prevention Based on Mobile Sensor Data Processing. IEEE Sens. J. 2018, 18, 4795–4802. [Google Scholar] [CrossRef]
  38. Contreras-Castillo, J.; Zeadally, S.; Guerrero-Ibanez, J.A. Internet of Vehicles: Architecture, Protocols, and Security. IEEE Internet Things J. 2018, 5, 3701–3709. [Google Scholar] [CrossRef]
  39. Ji, Z.; Ganchev, I.; O’Droma, M. A Generic IoT Architecture for Smart Cities. In Proceedings of the 25th IET Irish Signals & Systems Conference 2014 and 2014 China-Ireland International Conference on Information and Communities Technologies (ISSC 2014/CIICT 2014), Limerick, Ireland, 26–27 June 2014; Institution of Engineering and Technology: Limerick, Ireland, 2014; pp. 196–199. [Google Scholar]
  40. Hajam, S.S.; Sofi, S.A. IoT-Fog Architectures in Smart City Applications: A Survey. China Commun. 2021, 18, 117–140. [Google Scholar] [CrossRef]
  41. Kaushik, N.; Bagga, T. Smart Cities Using IoT. In Proceedings of the 2021 9th International Conference on Reliability, Infocom Technologies and Optimization (Trends and Future Directions) (ICRITO), Noida, India, 3 September 2021; pp. 1–6. [Google Scholar]
  42. Ramos-García, O.I.; Vuelvas-Alvarado, A.A.; Osorio-Pérez, N.A.; Ruiz-Torres, M.Á.; Estrada-González, F.; Gaytan-Lugo, L.S.; Fajardo-Flores, S.B.; Santana-Mancilla, P.C. An IoT Braille Display towards Assisting Visually Impaired Students in Mexico. In Proceedings of the The 9th International Electronic Conference on Sensors and Applications, Online, 1 November 2022; p. 11. [Google Scholar]
  43. Santana-Mancilla, P.C.; Magaña Echeverría, M.A.; Rojas Santos, J.C.; Nieblas Castellanos, J.A.; Salazar Díaz, A.P. Towards Smart Education: Ambient Intelligence in the Mexican Classrooms. Procedia-Soc. Behav. Sci. 2013, 106, 3141–3148. [Google Scholar] [CrossRef]
  44. Contreras-Castillo, J.; Santana-Mancilla, P.C.; Barón-Ramírez, N.; Morales Vanegas, E.A. IoET Enabled Classrooms to Foster Education 4.0 in Mexican Elementary Schools. Asia-Pac. Collab. Educ. J. 2020, 16, 26–30. [Google Scholar]
  45. Adiono, T.; Toha, A.M.; Pamungkas, S.; Sutisna, N.; Sumiarsih, E. Internet of Things for Marine Aquaculture. In Proceedings of the 2021 International Symposium on Electronics and Smart Devices (ISESD), Bandung, Indonesia, 29 June 2021; pp. 1–5. [Google Scholar]
  46. Guerrero, J.A.; Cosio, M.; Espinoza, A.; Ruiz, E.; Sanchez, J.D.; Contreras, J.; Nieto, J.I. GeoSoc: A Geocast-Based Communication Protocol for Monitoring of Marine Environments. IEEE Lat. Am. Trans. 2017, 15, 324–332. [Google Scholar] [CrossRef]
  47. Guerrero Ibanez, J.A.; Garcia Morales, L.A.; Contreras Castillo, J.J.; Buenrostro Mariscal, R.; Cosio Leon, M. HYRMA: A Hybrid Routing Protocol for Monitoring of Marine Environments. IEEE Lat. Am. Trans. 2015, 13, 1562–1568. [Google Scholar] [CrossRef]
  48. Gopinath, A.R.; Singh, Y.P.; Narawade, N.S. Design of Fog Computing System For Health Care Applications Based On IoT. In Proceedings of the 2022 3rd International Conference for Emerging Technology (INCET), Belgaum, India, 27 May 2022; pp. 1–4. [Google Scholar]
  49. Al-Mahmud, O.; Khan, K.; Roy, R.; Mashuque Alamgir, F. Internet of Things (IoT) Based Smart Health Care Medical Box for Elderly People. In Proceedings of the 2020 International Conference for Emerging Technology (INCET), Belgaum, India, 5–7 June 2020; pp. 1–6. [Google Scholar]
  50. Ahmad, N.; George, R.P.; Jahan, R. Emerging Trends in IoT for Categorized Health Care. In Proceedings of the 2019 2nd International Conference on Intelligent Computing, Instrumentation and Control Technologies (ICICICT), Kannur, Kerala, India, 5–6 July 2019; pp. 1438–1441. [Google Scholar]
  51. Santana-Mancilla, P.C.; Anido-Rifón, L.E.; Contreras-Castillo, J.; Buenrostro-Mariscal, R. Heuristic Evaluation of an IoMT System for Remote Health Monitoring in Senior Care. Int. J. Environ. Res. Public. Health 2020, 17, 1586. [Google Scholar] [CrossRef] [PubMed]
  52. Durán-Vega, L.A.; Santana-Mancilla, P.C.; Buenrostro-Mariscal, R.; Contreras-Castillo, J.; Anido-Rifón, L.E.; García-Ruiz, M.A.; Montesinos-López, O.A.; Estrada-González, F. An IoT System for Remote Health Monitoring in Elderly Adults through a Wearable Device and Mobile Application. Geriatrics 2019, 4, 34. [Google Scholar] [CrossRef] [PubMed]
  53. De la Rosa, J.; Conesa, M.; Domingo, R.; Aguayo, E.; Falagán, N.; Pérez-Pastor, A. Combined Effects of Deficit Irrigation and Crop Level on Early Nectarine Trees. Agric. Water Manag. 2016, 170, 120–132. [Google Scholar] [CrossRef]
  54. Morillo, J.G.; Martín, M.; Camacho, E.; Díaz, J.A.R.; Montesinos, P. Toward Precision Irrigation for Intensive Strawberry Cultivation. Agric. Water Manag. 2015, 151, 43–51. [Google Scholar] [CrossRef]
  55. López, J.A.; Navarro, H.; Soto, F.; Pavón, N.; Suardíaz, J.; Torres, R. GAIA2: A Multifunctional Wireless Device for Enhancing Crop Management. Agric. Water Manag. 2015, 151, 75–86. [Google Scholar] [CrossRef]
  56. Ryu, M.; Yun, J.; Miao, T.; Ahn, I.Y.; Choi, S.C.; Kim, J. Design and Implementation of a Connected Farm for Smart Farming System. In Proceedings of the 2015 IEEE SENSORS, Busan, Republic of Korea, 1–4 November 2015; pp. 1–4. [Google Scholar]
  57. Baranwal, T.; Nitika; Pateriya, P.K. Development of IoT Based Smart Security and Monitoring Devices for Agriculture. In Proceedings of the 2016 6th International Conference–Cloud System and Big Data Engineering (Confluence), Noida, India, 14–15 January 2016; pp. 597–602.
  58. Ahmad, N.; Hussain, A.; Ullah, I.; Zaidi, B.H. IOT Based Wireless Sensor Network for Precision Agriculture. In Proceedings of the 2019 7th International Electrical Engineering Congress (iEECON), Hua Hin, Thailand, 9–11 March 2019; pp. 1–4. [Google Scholar]
  59. Mhaisen, N.; Abazeed, O.; Hariri, Y.A.; Alsalemi, A.; Halabi, O. Self-Powered IoT-Enabled Water Monitoring System. In Proceedings of the 2018 International Conference on Computer and Applications (ICCA), Beirut, Lebanon, 25–26 August 2018; pp. 41–45. [Google Scholar]
  60. Hernandez-Alpizar, L.; Carrasquilla-Batista, A.; Sancho-Chavarria, L. IoT Application for Water Quality Monitoring: Nitrates. In Proceedings of the 2020 IEEE 11th Latin American Symposium on Circuits & Systems (LASCAS), San Jose, Costa Rica, 25–28 February 2020; pp. 1–4. [Google Scholar]
  61. Ghanim, M.E.; Alammary, J. AgroBahrain: A Conceptual Framework for Agriculture Big Data for Bahrain. In Proceedings of the 2021 International Conference on Electronic Information Technology and Smart Agriculture (ICEITSA), Huaihua, China, 10–12 December 2021; pp. 545–550. [Google Scholar]
  62. Pesonen, L.A.; Teye, F.K.-W.; Ronkainen, A.K.; Koistinen, M.O.; Kaivosoja, J.J.; Suomi, P.F.; Linkolehto, R.O. Cropinfra—An Internet-Based Service Infrastructure to Support Crop Production in Future Farms. Biosyst. Eng. 2014, 120, 92–101. [Google Scholar] [CrossRef]
  63. López-Riquelme, J.A.; Pavón-Pulido, N.; Navarro-Hellín, H.; Soto-Valles, F.; Torres-Sánchez, R. A Software Architecture Based on FIWARE Cloud for Precision Agriculture. Agric. Water Manag. 2017, 183, 123–135. [Google Scholar] [CrossRef]
  64. Hokazono, S.; Hayashi, K. Variability in Environmental Impacts during Conversion from Conventional to Organic Farming: A Comparison among Three Rice Production Systems in Japan. J. Clean. Prod. 2012, 28, 101–112. [Google Scholar] [CrossRef]
  65. Wu, D.D.; Olson, D.L.; Birge, J.R. Risk Management in Cleaner Production. J. Clean. Prod. 2013, 53, 1–6. [Google Scholar] [CrossRef]
  66. Bouadil, S.; Skouri, S.; Kooli, S.; Lazaar, M.; Farhat, A. Solar Energy Storage Application in Tunisian Greenhouse by Means of Phase Change Materials. In Proceedings of the 2014 International Conference on Composite Materials & Renewable Energy Applications (ICCMREA), Sousse, Tunisia, 22–24 January 2014; pp. 1–4. [Google Scholar]
  67. Khoshroo, A.; Mulwa, R.; Emrouznejad, A.; Arabi, B. A Non-Parametric Data Envelopment Analysis Approach for Improving Energy Efficiency of Grape Production. Energy 2013, 63, 189–194. [Google Scholar] [CrossRef]
  68. Kubota, F.I.; da Rosa, L.C. Identification and Conception of Cleaner Production Opportunities with the Theory of Inventive Problem Solving. J. Clean. Prod. 2013, 47, 199–210. [Google Scholar] [CrossRef]
  69. Bardi, U.; El Asmar, T.; Lavacchi, A. Turning Electricity into Food: The Role of Renewable Energy in the Future of Agriculture. J. Clean. Prod. 2013, 53, 224–231. [Google Scholar] [CrossRef]
  70. Perc, M.; Gómez-Gardeñes, J.; Szolnoki, A.; Floría, L.M.; Moreno, Y. Evolutionary Dynamics of Group Interactions on Structured Populations: A Review. J. R. Soc. Interface 2013, 10, 20120997. [Google Scholar] [CrossRef] [PubMed]
  71. Lakshmanarao, A.; Babu, M.R.; Kiran, T.S.R. Plant Disease Prediction and Classification Using Deep Learning ConvNets. In Proceedings of the 2021 International Conference on Artificial Intelligence and Machine Vision (AIMV), Gandhinagar, India, 24 September 2021; pp. 1–6. [Google Scholar]
  72. Militante, S.V.; Gerardo, B.D.; Dionisio, N.V. Plant Leaf Detection and Disease Recognition Using Deep Learning. In Proceedings of the 2019 IEEE Eurasia Conference on IOT, Communication and Engineering (ECICE), Yunlin, Taiwan, 3–6 October 2019; pp. 579–582. [Google Scholar]
  73. Marzougui, F.; Elleuch, M.; Kherallah, M. A Deep CNN Approach for Plant Disease Detection. In Proceedings of the 2020 21st International Arab Conference on Information Technology (ACIT), Giza, Egypt, 28 November 2020; pp. 1–6. [Google Scholar]
  74. Montesinos-López, O.A.; Montesinos-López, A.; Pérez-Rodríguez, P.; Barrón-López, J.A.; Martini, J.W.R.; Fajardo-Flores, S.B.; Gaytan-Lugo, L.S.; Santana-Mancilla, P.C.; Crossa, J. A Review of Deep Learning Applications for Genomic Selection. BMC Genomics 2021, 22, 19. [Google Scholar] [CrossRef] [PubMed]
  75. Sardogan, M.; Tuncer, A.; Ozen, Y. Plant Leaf Disease Detection and Classification Based on CNN with LVQ Algorithm. In Proceedings of the 2018 3rd International Conference on Computer Science and Engineering (UBMK), Sarajevo, Bosnia and Herzegovina, 15–16 September 2018; pp. 382–385. [Google Scholar]
  76. Guan, X. A Novel Method of Plant Leaf Disease Detection Based on Deep Learning and Convolutional Neural Network. In Proceedings of the 2021 6th International Conference on Intelligent Computing and Signal Processing (ICSP), Xi’an, China, 9 April 2021; pp. 816–819. [Google Scholar]
  77. Mattihalli, C.; Gedefaye, E.; Endalamaw, F.; Necho, A. Real Time Automation of Agriculture Land, by Automatically Detecting Plant Leaf Diseases and Auto Medicine. In Proceedings of the 2018 32nd International Conference on Advanced Information Networking and Applications Workshops (WAINA), Krakow, Poland, 16–18 May 2018; pp. 325–330. [Google Scholar]
  78. Divyashri, P.; Pinto, L.A.; Mary, L.; Manasa, P.; Dass, S. The Real-Time Mobile Application for Identification of Diseases in Coffee Leaves Using the CNN Model. In Proceedings of the 2021 Second International Conference on Electronics and Sustainable Communication Systems (ICESC), Coimbatore, India, 4 August 2021; pp. 1694–1700. [Google Scholar]
  79. Tm, P.; Pranathi, A.; SaiAshritha, K.; Chittaragi, N.B.; Koolagudi, S.G. Tomato Leaf Disease Detection Using Convolutional Neural Networks. In Proceedings of the 2018 Eleventh International Conference on Contemporary Computing (IC3), Noida, India, 2–4 August 2018; pp. 1–5. [Google Scholar]
  80. Kumar, A.; Vani, M. Image Based Tomato Leaf Disease Detection. In Proceedings of the 2019 10th International Conference on Computing, Communication and Networking Technologies (ICCCNT), Kanpur, India, 6–8 July 2019; pp. 1–6. [Google Scholar]
  81. Agarwal, M.; Gupta, S.K.; Biswas, K.K. Development of Efficient CNN Model for Tomato Crop Disease Identification. Sustain. Comput. Inform. Syst. 2020, 28, 100407. [Google Scholar] [CrossRef]
  82. Widiyanto, S.; Fitrianto, R.; Wardani, D.T. Implementation of Convolutional Neural Network Method for Classification of Diseases in Tomato Leaves. In Proceedings of the 2019 Fourth International Conference on Informatics and Computing (ICIC), Semarang, Indonesia, 16–17 October 2019; pp. 1–5. [Google Scholar]
  83. Kaur, M.; Bhatia, R. Development of An Improved Tomato Leaf Disease Detection And Classification Method. In Proceedings of the 2019 IEEE Conference on Information and Communication Technology, Allahabad, India, 6–8 December 2019; pp. 1–5. [Google Scholar]
  84. Montesinos-López, O.A.; Montesinos-López, A.; Cano-Paez, B.; Hernández-Suárez, C.M.; Santana-Mancilla, P.C.; Crossa, J. A Comparison of Three Machine Learning Methods for Multivariate Genomic Prediction Using the Sparse Kernels Method (SKM) Library. Genes 2022, 13, 1494. [Google Scholar] [CrossRef]
  85. Andreev, S.; Galinina, O.; Pyattaev, A.; Gerasimenko, M.; Tirronen, T.; Torsner, J.; Sachs, J.; Dohler, M.; Koucheryavy, Y. Understanding the IoT Connectivity Landscape: A Contemporary M2M Radio Technology Roadmap. IEEE Commun. Mag. 2015, 53, 32–40. [Google Scholar] [CrossRef]
  86. ETSI Industry Trends for M2M/IoT Survey Results from the ETSI M2M Workshop 2014; ETSI: Sophia-Antipolis, France, 2014.
  87. oneM2M. OneM2M Functional Architecture Baseline Draft; Memphis, USA. 2014. Available online: (accessed on 1 February 2023).
  88. Lee, J.-S.; Su, Y.-W.; Shen, C.-C. A Comparative Study of Wireless Protocols: Bluetooth, UWB, ZigBee, and Wi-Fi. In Proceedings of the IECON 2007–33rd Annual Conference of the IEEE Industrial Electronics Society, Taipei, Taiwan, 5–8 November 2007; pp. 46–51. [Google Scholar]
  89. Kone, C.T.; Hafid, A.; Boushaba, M. Performance Management of IEEE 802.15.4 Wireless Sensor Network for Precision Agriculture. IEEE Sens. J. 2015, 15, 5734–5747. [Google Scholar] [CrossRef]
  90. Buenrostro-Mariscal, R.; Santana-Mancilla, P.C.; Montesinos-López, O.A.; Nieto Hipólito, J.I.; Anido-Rifón, L.E. A Review of Deep Learning Applications for the Next Generation of Cognitive Networks. Appl. Sci. 2022, 12, 6262. [Google Scholar] [CrossRef]
  91. Tairu, O.E. PlantVillage Dataset. Kaggle. 2018. Available online: (accessed on 1 February 2023).
  92. Buschermohle, M.J.; Grandle, G.F. Controlling the Environment in Greenhouses Used for Tomato Production; Plant Sciences Commons; The University of Tennessee Agricultural Extension Service: Knoxville, TN, USA, 2010; Available online: (accessed on 1 February 2023).
  93. Konidaris, F.; Tagaris, T.; Sdraka, M.; Stafylopatis, A. Generative Adversarial Networks as an Advanced Data Augmentation Technique for MRI Data. In Proceedings of the 14th International Joint Conference on Computer Vision, Imaging and Computer Graphics Theory and Applications, Prague, Czech Republic, 25–27 February 2019; SCITEPRESS—Science and Technology Publications: Prague, Czech Republic, 2019; pp. 48–59. [Google Scholar]
  94. Kukačka, J.; Golkov, V.; Cremers, D. Regularization for Deep Learning: A Taxonomy. arXiv 2017, arXiv:1710.10686. [Google Scholar]
  95. Geetharamani, G.; Pandian, A. Identification of Plant Leaf Diseases Using a Nine-Layer Deep Convolutional Neural Network. Comput. Electr. Eng. 2019, 76, 323–338. [Google Scholar] [CrossRef]
  96. Hong, H.; Lin, J.; Huang, F. Tomato Disease Detection and Classification by Deep Learning. In Proceedings of the 2020 International Conference on Big Data, Artificial Intelligence and Internet of Things Engineering (ICBAIE), Fuzhou, China, 12–14 June 2020; pp. 25–29. [Google Scholar]
  97. Ferentinos, K.P. Deep Learning Models for Plant Disease Detection and Diagnosis. Comput. Electron. Agric. 2018, 145, 311–318. [Google Scholar] [CrossRef]
  98. Morellos, A.; Pantazi, X.E.; Paraskevas, C.; Moshou, D. Comparison of Deep Neural Networks in Detecting Field Grapevine Diseases Using Transfer Learning. Remote Sens. 2022, 14, 4648. [Google Scholar] [CrossRef]
Figure 1. General scenario for SAgric-IoT.
Figure 1. General scenario for SAgric-IoT.
Applsci 13 01961 g001
Figure 2. SAgric-IoT five-layered architecture.
Figure 2. SAgric-IoT five-layered architecture.
Applsci 13 01961 g002
Figure 3. Block diagram of the cloud server in SAGric-IoT.
Figure 3. Block diagram of the cloud server in SAGric-IoT.
Applsci 13 01961 g003
Figure 4. Sensor node block diagram.
Figure 4. Sensor node block diagram.
Applsci 13 01961 g004
Figure 5. Sensors for SAgric-IoT (a) AM2315, (b) AM2302, and (c) SHT-10.
Figure 5. Sensors for SAgric-IoT (a) AM2315, (b) AM2302, and (c) SHT-10.
Applsci 13 01961 g005
Figure 6. ESP32-CAM module used for plant monitoring.
Figure 6. ESP32-CAM module used for plant monitoring.
Applsci 13 01961 g006
Figure 7. States diagram for SAGric-IoT.
Figure 7. States diagram for SAGric-IoT.
Applsci 13 01961 g007
Figure 8. Data message structure used in SAgric-IoT.
Figure 8. Data message structure used in SAgric-IoT.
Applsci 13 01961 g008
Figure 9. Distribution of nodes for scenario 2.
Figure 9. Distribution of nodes for scenario 2.
Applsci 13 01961 g009
Figure 10. Results for scenario 1. (a) Energy consumption per node; (b) received packets per node.
Figure 10. Results for scenario 1. (a) Energy consumption per node; (b) received packets per node.
Applsci 13 01961 g010
Figure 11. Results for scenario 2. (a) Energy consumption per node; (b) received packets per node.
Figure 11. Results for scenario 2. (a) Energy consumption per node; (b) received packets per node.
Applsci 13 01961 g011
Figure 12. Model’s accuracy values during the training and validation processes.
Figure 12. Model’s accuracy values during the training and validation processes.
Applsci 13 01961 g012
Figure 13. Confusion matrix of the proposed model, (0) tomato bacterial spot, (1) tomato late blight, (2) tomato yellow leaf curl virus, (3) tomato early blight, (4) tomato Septoria leaf spot, (5) tomato mosaic virus, (6) tomato target spot, (7) tomato leaf mold, (8) tomato spider mites two spotted, (9) tomato healthy.
Figure 13. Confusion matrix of the proposed model, (0) tomato bacterial spot, (1) tomato late blight, (2) tomato yellow leaf curl virus, (3) tomato early blight, (4) tomato Septoria leaf spot, (5) tomato mosaic virus, (6) tomato target spot, (7) tomato leaf mold, (8) tomato spider mites two spotted, (9) tomato healthy.
Applsci 13 01961 g013
Figure 14. Sample predicted images using the proposed model.
Figure 14. Sample predicted images using the proposed model.
Applsci 13 01961 g014
Figure 15. Performance comparison of the proposed model and existing models.
Figure 15. Performance comparison of the proposed model and existing models.
Applsci 13 01961 g015
Table 1. Comparison of wireless technologies for inter-node communication.
Table 1. Comparison of wireless technologies for inter-node communication.
ParameterBluetoothZigBeeWi-Fi HalowUltra-Wideband
Frequency2.4 GHz868 MHz, 915 MHz and 2.4 GHz900 MHz3.1–10.6 GHz
Max. signal rate1,2,3 Mbps10–100 mUp to 347 Mbps53.3–480 Mbps
Coverage10 m10–100 mUp to 1 km300 m
Max. no of cell nodes8>65,000Up to 6000 devices8
Nominal TX power0–10 dBm(−25)–0 dBm−17 dB−41.3 dBm/MHz
SecurityE0 encryption algorithm128-bit AES AES
Number of R.F. channels791/10; 1626 channels1–15
Channel bandwidth1 MHz0.3/0.6 MHZ; 2 MHZ2 MHz and 16 MHz500 MHz–7.5 GHz
Table 2. Physical parameters for tomatoes [89].
Table 2. Physical parameters for tomatoes [89].
ParameterIdeal Value
Day temperature70 °F
Night temperature60–64 °F
Day humidity80–90%
Night humidity65–75%
pHNear 7
Table 3. Used sensors in SAgric-IoT.
Table 3. Used sensors in SAgric-IoT.
Air temperatureAM2315
Air humidityAM2315
Soil moisture sensorSHT-10
Soil temperature sensorSHT-10
Wind speed/directionSEN-08942
Case temperatureAM2302
Case humidityAM2302
Table 4. Categories of the PlantVillage dataset.
Table 4. Categories of the PlantVillage dataset.
#NumberCategoryNumber of Images
Table 5. Parameters for the training of the model.
Table 5. Parameters for the training of the model.
Batch size32
Number of epochs200
Steps per epoch16,012
Validation steps3202
Activation functionReLU
Optimization algorithmAdam
Loss functionCategorical cross-entropy
Table 6. Class-wise performance of the proposed model.
Table 6. Class-wise performance of the proposed model.
tomato bacterial spot0.960.960.97100
tomato late blight0.990.980.98100
tomato yellow leaf curl virus0.980.980.98100
tomato early blight0.960.970.97100
tomato Septoria leaf spot0.980.970.99100
tomato mosaic virus0.940.980.91100
tomato target spot0.980.980.98100
tomato leaf mold0.960.970.99100
tomato spider mites two spotted0.970.980.97100
tomato healthy0.980.980.98100
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.

Share and Cite

MDPI and ACS Style

Contreras-Castillo, J.; Guerrero-Ibañez, J.A.; Santana-Mancilla, P.C.; Anido-Rifón, L. SAgric-IoT: An IoT-Based Platform and Deep Learning for Greenhouse Monitoring. Appl. Sci. 2023, 13, 1961.

AMA Style

Contreras-Castillo J, Guerrero-Ibañez JA, Santana-Mancilla PC, Anido-Rifón L. SAgric-IoT: An IoT-Based Platform and Deep Learning for Greenhouse Monitoring. Applied Sciences. 2023; 13(3):1961.

Chicago/Turabian Style

Contreras-Castillo, Juan, Juan Antonio Guerrero-Ibañez, Pedro C. Santana-Mancilla, and Luis Anido-Rifón. 2023. "SAgric-IoT: An IoT-Based Platform and Deep Learning for Greenhouse Monitoring" Applied Sciences 13, no. 3: 1961.

Note that from the first issue of 2016, this journal uses article numbers instead of page numbers. See further details here.

Article Metrics

Back to TopTop