**7. Conclusions**

A low-power WSN based on LoRaWAN™ was designed with a focus on low-cost PA applications, such as greenhouse sensing and actuation. Two types of wireless nodes were envisaged, greenhouse node and plant node, and the whole LPWAN was designed and implemented, including an 8-channel gateway/concentrator. The first experimental results were collected and stored in a database managed by a virtual machine running in a cloud service. Since all subsystems adopted in this research are off-the-shelf elements with available open-source software libraries, only a minimal effort is needed when the system is implemented for a different application.

Measurement results were focused on measurements of water content and were collected using plant nodes in Loamy Sand and Silty Loam, proving the functionality and reliability of the whole system (sensor nodes, gateway, GUI, Node-RED, and Cloud) and comparing the system behavior with a reference sensor from Sentek. Temperature measurements of our plant nodes compare as expected with the reference sensor within the supposed accuracy of the adopted sensors. Regarding water content measurements, a correlation was attempted between the results of the cheap Capacitive Soil Moisture Sensor v1.2 and those of the Sentek reference sensor. We realized the low-cost water content sensor suffers from a non-constant sensitivity; therefore, non-linear fitting equations are necessary for correlating its voltage output with the VWC. We adopted for the Capacitive Soil Moisture Sensor v1.2 two VWC fitting equations taken from the literature. Since the reference sensor and the cheap water content sensor span different soil depths (5 cm and 2-3 cm, respectively), we first modeled the theoretical VWC profiles at different depths using a proven water infiltration and redistribution model, calibrating the model on the reference sensor results at a depth of 5 cm. Then we used the two fitting equations for the Capacitive Soil Moisture Sensor v1.2 and calculated multi-parameter least squares fit to the hydraulic model at 2 and 3 cm depths. A very satisfactory correlation coefficient of 0.94 was obtained for Silty Loam using the exponential/logarithmic "P" model at a depth of 3 cm. Instead, the best correlation value we obtained using the same fitting procedure applied to the results in Loamy Sand was 0.58 at a depth of 2 cm using the hyperbolic "H" model. Despite the low correlation coefficient, the VWC values we obtained with the hyperbolic "H" model can be considered as representative of the real VWC at a depth of 2 cm, since differences of a few percent are often irrelevant for practical applications of sensors for measuring the soil water content.

In this work, we demonstrated the lack of linearity of the adopted soil water content sensor. Notwithstanding this lack of linearity, the introduction of the infiltration model and of a dedicated statistical analysis allowed us to extract reliable values of the volumetric water content for both Silty Loam and Loamy Sand. This procedure represents the novelty and the potential of the proposed approach. Therefore, future work will address the optimization of the sensor performance. To this purpose, it will be useful to better understand the behavior of the sensor from simulations and to optimize the layout of the sensor without impacting significantly on the cost, also considering the mechanical integration constraints needed for industrialization.

**Author Contributions:** Conceptualization, P.P., R.M., and A.S.; data curation, P.P., R.M., D.F., N.P., F.G., and A.S.; formal analysis, P.P., R.M. and A.S.; funding acquisition, P.P.; investigation, R.M., D.F., N.P. and F.G.; methodology, P.P., and A.S.; Project administration, P.P. and A.S.; Software, D.F., and F.G.; supervision, P.P., R.M., and A.S.; validation, P.P., D.F., N.P. and A.S.; visualization, D.F., and F.G.; writing—original draft, P.P., and A.S.; writing—review and editing, P.P., R.M., and A.S. All authors have read and agreed to the published version of the manuscript.

**Funding:** This research was partly funded by the DEPARTMENT OF ENGINEERING OF THE UNIVERSITY OF PERUGIA, Italy, gran<sup>t</sup> "Ricerca di base 2018-RICBA18-PP", "Ricerca di base 2019- RICBA19-PP", "Ricerca di base 2020-RICBA20-PP".

**Acknowledgments:** Thanks are due to colleagues D. Grohmann, G. Marconi, and M. Cecconi for helpful discussions and technical support.

**Conflicts of Interest:** The authors declare no conflict of interest. The funders had no role in the design of the study; in the collection, analyses, or interpretation of data; in the writing of the manuscript, or in the decision to publish the results.
