1. Introduction
Food production is a significant factor in a world with increasing population growth; according to research published by the Department of Economic and Social Affairs of the United Nations [
1], it is estimated that in the year 2050, the number of inhabitants on the planet will approach 9.7 billion people, an increase of 2 billion individuals over the next 30 years. Furthermore, there is a constant concern about ensuring food security in developing countries since food distribution is not egalitarian [
2].
Thus, given the existing and future food demand to supply the population, irrigated agriculture has a high potential to contribute substantially to food production. In Brazil, although the irrigated area is less than 20% of the total cultivated area, it stands out compared to other areas, being responsible for more than 40% of the food, fibre, and bioenergy crops in the country [
3].
The insertion of technologies in agriculture, especially irrigated agriculture, guarantees the sustainable expansion of production capacity. At present, several systems use technologies aiming to achieve irrigation management [
4]. However, many of them have high costs that make them unaccessible to small producers.
Therefore, as most of the food that reaches Brazilians’ tables comes from family farming, it is essential to think about low-cost, accessible and autonomous projects capable of increasing the intensity, quality, and ease of production [
5,
6].
Therefore, the present work is based on the development of an automated irrigation prototype using the Arduino microcontroller, photovoltaic energy, and the concept of the Internet of Things (IoT). The use of Arduino in systems is seen as an excellent tool for automatic irrigation control since it is low-cost and has an open and safe code and hardware, which enables the development of more varied systems [
5,
6,
7,
8,
9].
The use of photovoltaic solar energy to power the system suggests that the system can be used to achieve sustainability and electricity savings, especially when considering the climate changes suffered over time and the country’s great solar radiation potential. The use of solar energy is also conducive to the incorporation of other renewable energy sources into the electrical matrix [
10,
11,
12]. Many control [
13,
14,
15], monitoring [
16,
17,
18], and protection [
19,
20,
21] projects have been developed over the years to guarantee the exploitation of the potential of the photovoltaic generation source in power systems. A set of challenges were encountered regarding the maximum use and operation of photovoltaic generation sources in power systems, but these challenges have been gradually overcome in recent years [
22,
23,
24,
25,
26].
One of the benefits of the photovoltaic generation source is its flexibility and easy installation in different environments, both rural and urban [
27]. Both rural and urban consumers can plan and install a photovoltaic panel and produce electrical energy for their own benefit with great ease [
28]. In [
29,
30,
31], the authors present a detailed review of the main benefits and challenges of using photovoltaic generation in systems.
IoT consists of a network containing systems, applications, platforms, and physical objects, which use embedded technology to communicate and interact with internal and external environments [
32,
33]; its application in agriculture is fundamental in optimizing field activities [
34,
35,
36]. There is a relevant set of IoT applications in air monitoring [
37], soil monitoring [
38], water monitoring [
39], disease monitoring [
40], environmental condition monitoring [
41], crop and plant growth monitoring [
42], temperature monitoring [
43], and humidity monitoring [
44].
The motivation for the research was based on the hypothesis that, in specific, small rural properties, there are limitations regarding access to conventional electrical energy and technologies, which directly affect irrigation processes and, as a consequence, can lead to a low level of food production. The search and implementation of new energy sources in difficult-to-access areas is therefore essential to optimise irrigation management and food production.
Thus, given the above and seeking to contribute to the development of automated irrigation systems, the present prototype uses the understanding of IoT to monitor important variables in irrigation management, such as soil humidity and temperature, and also enables an analysis of the energy costs of the irrigation process through readings from voltage and current sensors. Furthermore, IoT was used to control the system remotely, proving to be a helpful technology during automated system failure. Therefore, this work presents a sustainable solution that optimises natural resources such as water and energy using the Internet of Things (IoT) in conjunction with an automated irrigation system powered by photovoltaic energy to enable its implementation in systems used by small rural properties.
This article has the following organization:
Section 2 presents the proposed irrigation prototype, all the technologies involved in its construction, and the environment in which the proposed prototype was applied;
Section 3 describes the case studies carried out and discussions of the results;
Section 4 concludes the article with the main contributions of the article.
2. Materials and Methods
The prototype was developed and tested in the Electrotechnical Laboratory of the Agricultural and Environmental Engineering course at the Federal University of Rondonópolis (UFR), located in Brazil. The components that were used in the prototype are Arduino Uno R3, the ESP8266 development board, a resistive soil moisture sensor, a 25 V voltage sensor, the ACS712 5A current sensor, flow sensor model YF-S201, a humidity and temperature sensor—DHT11, 5 V relay module—with 2 channels, an 85 W poly R5A/D solar panel, PWM ECP 1024 Intelbras charge controller, and a water pump.
Figure 1 and
Figure 2 present the system assembly schematic and its practical assembly, respectively.
Firstly, the sensors used in the prototype were calibrated. The methodology proposed by [
45,
46,
47] to calibrate the soil moisture sensor was used. Thus, 200 g of dry soil was weighed in a microwave oven with a precision analytical balance, as suggested in the [
3]. Portions of water were also considered, which, when added to the soil sample, were equivalent to 9, 11, 13, 15, 17, 19, 21, 23, 25, 27, and 29% of moisture based on mass. The humidity range chosen for calibration was based on the average field capacity and permanent wilting point of the University’s experimental area. Thus, for the 9% moisture percentage, 18 g of water was added to the 200 g soil sample. Then, to raise the humidity to 11%, another 4 g of water was added to the model, and so on, to obtain the remaining percentages of soil moisture.
As the water was added to the soil sample, analogue readings from the humidity sensor were extracted, with a 10 min interval between each lesson, so the sensorwas stabilised [
45]. Once this was completed, based on the points analogue reading of the sensor and percentage of soil moisture, the equation of the linear regression line was calculated in a spreadsheet, and later the equation was used in the programming carried out using the Arduino IDE.
An adjustable voltage source was used to calibrate the ACS712 5A current and 25 V voltage sensors, feeding a 60 W incandescent lamp representing the system load. In this way, the voltage source was adjusted to supply the load with 12, 14, 16, 18, 20, 22, and 24 V. The ACS712 5A current sensor was connected in series with the circuit, and subsequently, the 25 V voltage sensor was connected in parallel to take the readings. Using a digital multimeter, measurements of the current and voltage applied to the load were carried out. Subsequently, the sensor readings were adjusted according to the digital multimeter.
To calibrate the YF-S201 flow sensor, a constant proposed by [
48] was used, which offers a calibration factor between the flow in (L/min) and the frequency in (Hz), with the proposed adjustment constant being equivalent to 4.5. Therefore, a container with 500 mL of water was used to carry out the test. The volume was subsequently passed through the sensor with the aid of the water pump, seeking to verify whether the constant entered in the programming would accurately read the volume of water passed through the sensor.
To begin using Adafruit IO, first, sign up for a free account. Then, configure feeds and dashboards. Feeds act as online variables, managing data exchange between servers and sensors. Create feeds for each system variable: soil humidity, air humidity, temperature, voltage, current, and water volume for irrigation. The dashboard, a customizable display panel, showcases sensor readings and data graphs. Customise the project dashboard to present sensor values and graphical data.
Although there are other IoT platforms, such as Arduino IoT Cloud and Blynk, the chosen platform was AdaFruit IO. This choice was made considereing the ease of connection, configuration, data volume, update rates, and widgets (devices) available.
Even though we have access to other sensors with greater sensitivity and precision, such as capacitive soil moisture sensors, the sensors used, including the resistive soil moisture sensor, were chosen due to their low cost and robustness, as we aimed to use sensors that could serve local agricultural projects in Brazil.
The system automation was carried out using the Arduino microcontroller together with ESP8266. In short, the connection between microcontrollers on the development board occurred via the ports that are used in the i2C communication of the Arduino UNO R3, namely SDA and SCL, and the GPIO 0 and 2 from ESP8266.
Using the a2A library, the microcontroller ESP8266 could perform the master function while the Arduino microcontroller worked as a slave. Notably, the i2C protocol was only used for sending and receiving information since, in other processes, microcontrollers worked independently.
After assembly, the prototype was installed under real field conditions in the University’s experimental area. The irrigation system consisted of drip tapes, photovoltaic panels, and water reservoirs used for drip irrigation. After the initial tests, the system remained connected between 11 March 2022 and 15 March 2022, totalling 5 days of data collection. The arrangement of the system elements was carried out as shown in
Figure 3, and the practical installation of the components was carried out as shown in
Figure 4.
4. Conclusions
The present work demonstrated that applying the Internet of Things concept in an automated irrigation system powered by photovoltaic energy, using humidity, current, voltage, flow, and temperature sensors, is possible. After tests were carried out with the prototype, it was possible to use IoT technology, which can be replicated and expanded as long as the necessary adaptations are made, facilitating better production control for the small producer.
Using the Adafruit IO platform makes it possible to visualise the analysed variables in the system in real-time. In addition to providing information monitoring on a smartphone or computer, the platform offers the means to exercise remote control of the system.
During the five days of testing, the system behaved as expected, activating irrigation according to the stipulated soil moisture. From the generated data, graphs can be developed to monitor all the analysed variables.
This work has great potential for future research as it is a prototype, long-term operation that requires needs validation in the field for prolonged periods, and the durability and degradation of the components over time need to be evaluated. It is possible to expand the project to other sensors, such as solar irradiation, to facilitate wireless data transmission between the sensors, and, finally, to use other communication protocols. Regarding the aspects related to implementation costs, a relationship was observed with commercial products with similar functions regarding the components used in this project; the cost ratio is 3 to 5 times lower.