**1. Introduction**

In recent years, the rapid development and broad application of the IoT (Internet of Things) concept pushed towards the improvement of best practices in Wireless Sensor Networks (WSNs) [1] in Precision Agriculture (PA) applications, also relevant to Greenhouses [2,3]. Smart, cheap, and powerful connected sensor nodes (things) are transforming from stand-alone devices to parts of collaborative systems [4,5]. Data are stored, aggregated, and analyzed to improve the precision of temporal-spatial parameters on croplands [6,7]. WSN could be made of simple and cheap components: the results provided by complex technology systems are not necessarily significantly better than the results derived from a combination of descriptive statistics and simple sensors: intrinsic limitations of the sensing element could be overcome [8] also providing the measurement readout in a digital format [9].

Currently, the sensor networks that characterize the IoT technology have the main purpose of collecting data from the surrounding world on intelligent systems for environmental applications [10,11]. Additionally, in cloud computing approaches, the collected data are analyzed, processed, and used to undertake the correct decisions to optimize natural resources: it follows that the set of sensors, devices, and storage systems, by which the IoT is composed, is very similar to a huge, distributed measurement system, as

**Citation:** Placidi, P.; Morbidelli, R.; Fortunati, D.; Papini, N.; Gobbi, F.; Scorzoni, A. Monitoring Soil and Ambient Parameters in the IoT Precision Agriculture Scenario: An Original Modeling Approach Dedicated to Low-Cost Soil Water Content Sensors. *Sensors* **2021**, *21*, 5110. https://doi.org/ 10.3390/s21155110

Academic Editors: Zihuai Lin and Wei Xiang

Received: 12 June 2021 Accepted: 26 July 2021 Published: 28 July 2021

**Publisher's Note:** MDPI stays neutral with regard to jurisdictional claims in published maps and institutional affiliations.

**Copyright:** © 2021 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https:// creativecommons.org/licenses/by/ 4.0/).

clearly outlined in [12]. The managemen<sup>t</sup> of such complex systems is part of the present Big Data paradigm. Details on sampling techniques, distributed smart monitoring, and mathematical theories of distributed sensor networks can be found in [1,13].

In [14] the authors made a very good literature review on the use of machine learning (ML), a subset of artificial intelligence having a considerable potential to handle numerous challenges in the establishment of knowledge-based farming systems. In the paper, the authors considered four main generic categories of applications: crop, water, soil, and livestock management. In the paper the authors underlined also that (i) the majority of the journal papers focused on crop managemen<sup>t</sup> [15,16]; (ii) several ML algorithms have been developed to handle the heterogeneous data coming from agricultural fields [17]; (iii) multispectral or RGB images constituted the most common input for ML algorithms, thus justifying the broad usage of Convolutional Neural Networks due to their ability to handle this type of data more efficiently [18,19]. Moreover, a wide range of parameters regarding the weather as well as the soil, water, and crop quality was used. The most common means of acquiring measurements for ML applications was remote sensing, including imaging from satellites, unmanned vehicles (both ground (UGV) and aerial (UAV)), while in situ and laboratory measurements were also used [20].

Very good reviews of the most common sensors used in agriculture applications are reported in [21,22]. In [23], agricultural sensors have been divided into three main classes: physical property type sensors, biosensors, and micro-electro-mechanical system (MEMS) sensors. Near and remote sensing techniques use IoT sensors for monitoring multiple parameters, such as soil water content, temperature, and pH level, air humidity, temperature, light, and pressure [23–26]. The determination of soil water content is a subject of grea<sup>t</sup> value in different scientific fields, such as agronomy, soil physics, geology, soil mechanics, and hydraulics. Physical, mineralogical, chemical, and biological properties are also involved. Moreover, soil water content measurements could be affected by soil temperature [27]. Ambient Relative Humidity (RH) affects leaf growth, photosynthesis, pollination rate, and finally crop yield. A prolonged dry environment or high temperature can make the delicate sepals dry quickly and cause the death of flowers before maturity. Hence it is very crucial to control air humidity and temperature. Recent technological advances have enabled real-time sensors to be used directly in the soil, wirelessly transmitting data without the need for human intervention. It is now possible to set up a large number of low-cost devices not only capable of transducing a physical quantity of interest but also of performing some post-processing on raw data to extract useful information, fully complying with current regulations [27–29]. Due to the rapid advancement of technologies, the size and the cost of sensors have been reduced, making WSN the foremost driver of PA [30].

While most previously cited parameters (including soil temperature) can reliably be monitored through low-cost sensors available in the market, the experimental and accurate determination of soil water content with low-cost sensors is still an issue. A summary of state of the art on soil water content measurement techniques has been reported in [31]. The prices of the most reliable soil water content sensors range between USD 150 and USD 5000, thus positioning these sensors far from the IoT world. Instead, the reliability of very low-cost soil water content sensors easily purchasable in the worldwide internet market is still a matter of scientific debate [8,32–37] as further highlighted in the next sections.

In this scenario, the objectives of the present work can be summarized as follows:


• Comparison of the performance of a very low-cost soil moisture sensor with a commercially available expensive system using two different types of soil with an original modeling approach which helps us to compare measurement results taken at different soil depths.

#### **2. IoT Architecture in Precision Agriculture Scenario**

#### *2.1. Water Waste and Agriculture*

The integration of information and control technologies in agriculture processes is known as Precision Agriculture. To obtain the greatest optimization and profitability PA adapts common farming techniques to the specific conditions of each point of the crop, by applying different technologies: micro-electro-mechanical Systems, Wireless Sensor Networks (WSN), computer systems, and enhanced machinery. PA optimizes production efficiency, increases quality, minimizes environmental impact, and reduces the use of resources (energy, water) [38].

The application of IoT allows farmers to boost the production process through plantation monitoring, soil and water management, irrigation scheduling, fertilizer optimization, pest control through chemicals as herbicides, delivery tracking. These tasks can be accomplished by using data from sensors, images, agricultural information managemen<sup>t</sup> systems, global positioning systems (GPS), and communication networks. This integration results in the optimization of scarce resources [39].

Atmospheric changes and, in particular, the sudden rise in temperatures worsen the problem of searching for fresh water and water storage resources [40]. These problems are exacerbated in countries characterized by drought and rare rainfall, where the difficulty in finding the raw material prevents the development of crops (e.g., the California drought [41]). The scarcity of water in some regions of the world has led farmers to reevaluate conventional agricultural methods to reduce waste. To this purpose, innovative systems and methods aimed at PA are needed, where sensor technology, electronic and communication engineering, and farming machinery are blended with cloud storage and computing. If on one hand, there is a tendency to optimize traditional irrigation systems using intelligent drip systems [42–44], on the other hand, systems and sensors [8] are sought to measure the soil water content in real-time [45]. In this way, it is possible to know the exact time and the specific position of soil that requires irrigation. However, regardless of all the advances in the IoT domain, the adoption of PA has been limited to some developed countries. Because of the lack of resources, remote sensing-based techniques to monitor crop health are uncommon in developing countries, thus resulting in a loss of yield. [25]

The development of WSN applications in PA makes it possible to increase efficiency, productivity, and profitability in many agricultural production systems while minimizing unintended impacts on wildlife and the environment. The real-time information obtained from the fields can provide a solid base for farmers to adjust strategies at any time. Instead of making decisions based on some hypothetical average conditions, which may not exist anywhere, a precision farming approach recognizes differences and adjusts managemen<sup>t</sup> actions accordingly [46].

The combination of WSN, which are cheaper to implement than wired networks [29], with intelligent embedded systems and applying on this combination the technology of ubiquitous systems [40], leads to the development of the design and implementation of low-cost systems for monitoring agricultural environments, suitable for developing countries and difficult access areas.
