**6. Results**

We checked back on the smart drip irrigation system in one week. The spring onions had begun to grow atop a few onion bulbs, and the plants were healthy and received plenty of water. The growing spring onions are shown in Figure 18.

**Figure 18.** Smart irrigation system used for growing spring onions.

Further details about the irrigation system are available on the Blynk IoT dashboard. The web dashboard is shown in Figure 19a,b.

(**a**)

**Figure 19.** Web dashboard for the smart drip irrigation system. (**a**) Switches, irrigation data, and temperature graph. (**b**) Humidity and moisture content graph.

The "Valve Manual Open" button allows us to open the solenoid valve as needed and the "Valve Automation Lock" button allows us to block the automatic irrigation function. The "Irrigation Data" widget provides the exact date, time, soil temperature, and flow rate of when the ESP32 last opened the solenoid valve. The "Temperature" graph shows the fluctuation of temperature throughout the day, the "Air humidity" graph shows the variation of humidity, and the "Soil Moisture" graph shows the alteration of moisture in the soil.

We collected the irrigation data over one week and plotted the soil moisture content graph (Figure 20). The soil is dry if the moisture reading crosses 380. If the moisture reading is above 380 and the temperature and irrigation window are in the proper range, the ESP32 opens the valve to irrigate the field. The soil is considered wet if the reading is between 190 and 380, and very wet if the reading is between 0 and 190. As seen in the graph, the onions received water four times this week.

**Figure 20.** Soil moisture variation for one week.

Each dripper had a flow rate of 0.64 L per hour and watered an onion bulb for an hour a day for four days a week. In other words, the onion received 0.64 L of water a day. The total water provided to an onion over the week was as follows:

$$0.64 \times 4 = 2.56 \text{ L} \tag{1}$$

To convert the value into gallons, we divide Equation (1) by 3.785, as shown:

$$2.56/3.785 = 0.676 \text{ gallons} \tag{2}$$

Spring onions or shallots grown from the bulb need about an inch of water per week to grow well [44]. "One inch of water" refers to the amount of water necessary to cover one square foot of soil with one inch of water [45]. As there are 12 inches in a foot, the square inches of water needed per square foot of soil is as follows:

$$12 \times 12 = 144 \text{ sq. inch} \tag{3}$$

Moreover, 1 gallon is 231 cubic inches. Thus, when we divide 144 sq. inches by 231, we obtain the amount of water needed by onion bulbs per square foot as follows:

$$144/231 = 0.623 \text{ gallons} \tag{4}$$

As seen above, the actual amount of water provided to the onion bulbs in a week using the smart irrigation system in Equation (2) and the recommended amount of weekly water in Equation (4) are very close; hence, the smart irrigation system succeeds in providing adequate moisture to the plants.

We plotted the humidity variation graph for one week, as shown in Figure 21. The humidity was mostly above the lower limit of 25%. However, corresponding to some of the hottest hours of the day, it was not uncommon for the humidity to fall well below the 25% mark.

**Figure 21.** Humidity fluctuation throughout the week.

We plotted the temperature fluctuation graph for one week, as shown in Figure 22. The temperatures were the highest between 1 p.m. and 3 p.m. This timing also coincides with the lowest humidity readings of the day. The highest observed temperature was 46 °C. The temperature was comparatively low during the morning and evening irrigation time windows.

**Figure 22.** Temperature fluctuation throughout the week.

The moisture content, humidity, and temperature data collected are valuable for observing the weekly and monthly trends, making changes to the firmware, and are especially useful for building a greenhouse around the smart irrigation system.

#### **7. Conclusions**

We were successful in building an IoT-enabled smart drip irrigation system. It provides an enhanced automation feature, where if the soil is dry, the temperature is in the ideal range for maximum water absorption, the time falls within the designated morning or evening irrigation windows, and the ESP32 will open the solenoid valve and water the plants. We added safety features to prevent scenarios such as over-irrigation, missing the irrigation time, or leaving the plants thirsty.

Using the Blynk IoT dashboard, we can also monitor soil moisture, temperature, and air humidity. If the humidity is too low or too high, the admin user receives a notification on the Blynk app. We can use the Blynk dashboard to stop the automation function or manually open the valve based on the monitored data.

The smart drip irrigation system is currently being used to grow green onions from onion bulbs. While the system has been performing well, there are still some areas of improvement to explore, such as:


**Author Contributions:** Conceptualization, M.Z.C. and G.P.P.; methodology, G.P.P. and M.Z.C.; software, G.P.P.; validation, G.P.P. and F.D.; formal analysis, G.P.P.; resources, M.Z.C. and F.D.; data curation, G.P.P. and F.D.; writing—original draft preparation, G.P.P.; writing—review and editing, G.P.P. and M.Z.C.; supervision, M.Z.C. All authors have read and agreed to the published version of the manuscript.

**Funding:** This research received no external funding.

**Data Availability Statement:** Not applicable.

**Acknowledgments:** We thank Faisal Kuttikadavath (Qatar Scientific Club) for providing us with the space, tools, knowledge, and help needed to set up the garden for the smart drip irrigation system.

**Conflicts of Interest:** The authors declare no conflict of interest.
