Prototype of an Automatic Irrigation System for a Limited Area of Football Field Grass

by nathanaelp in Circuits > Microcontrollers

17 Views, 0 Favorites, 0 Comments

Prototype of an Automatic Irrigation System for a Limited Area of Football Field Grass

WhatsApp Image 2025-07-18 at 6.29.43 PM.jpeg

Indonesia is a country where football is the most popular sport. In recent years, public enthusiasm for the game has continued to rise, driven by Indonesia’s impressive football achievements an excitement. The growing popularity and success of Indonesian football are influenced by many factors, one of which is pitch quality.

Many pitches are still watered manually or rely on conventional sprinkler systems that require constant supervision. These methods are time and labor intensive, and can waste water through over‑irrigation or damage turf through excessive or insufficient watering that ignores actual soil‑moisture conditions.

This project is motivated by the desire to integrate modern technology to overcome the drawbacks of manual turf maintenance. By leveraging the Internet of Things (IoT), the proposed automatic irrigation system can read real‑time data from soil‑moisture sensors, used as the primary indicator for watering needs, and from soil‑pH sensors that help maintain soil quality. The system is controlled by an ESP32 microcontroller and includes a scheduling feature that enables automated watering times. It also supports remote monitoring and control, making irrigation more efficient and practical.

By developing an IoT‑based automatic football‑pitch irrigation system, this research aims to offer an innovative solution for more efficient field maintenance. The system is suitable not only for large venues such as professional stadiums but also for community or school pitches. Besides benefiting field managers, the solution aligns with environmental preservation efforts through more efficient water management.

Supplies

Picture10.png
  1. ESP32 (1): Main microcontroller
  2. Soil Moisture Sensor (YL-69) (1): Detect soil moisture levels. Main parameter for triggering irrigation
  3. pH Sensor + DMS (1): Detect pH level of the soil
  4. Relay modul 3,3v + Optocoupler (1): Switch controlled by the ESP32 to activate the water pump.
  5. Stepdown LM2596 (1): To step down the 12V voltage to 5V to safely power the ESP32
  6. Water Pump Air DC 12V 72W (1): Pulls water from the reservoir and delivers it to the sprinkler.
  7. Power Supply Unit (Switching Trafo DC 12V) (1): The main power source for the system, converting AC power into 12V DC using a switching transformer.
  8. LED Indikator (2): The LED serves as an indicator of whether the ESP32 is successfully connected to Wi-Fi and Firebase.
  9. Resistor 220Ω (2): Used to make the LED light up more clearly.
  10. Capasitor 0,1µF (1): To enable automatic debugging on the ESP32, eliminating the need for manual pressing of the reset/debug button on the board.
  11. Sprinkler (1): Receives water flow from the pump and is used to irrigate the grass
  12. Hose (2): Used to connect the reservoir to the pump, and the pump to the sprinkler, allowing water to flow through the system.

Set Main Code

Screenshot 2025-07-18 175659.png

Configure the system’s main code


Github: https://github.com/NathanaelPW/Prototipe-Sistem-Penyiraman-Otomatis-Untuk-Area-Terbatas-Rumput-Lapangan-Sepak-Bola


Set Firebase

The following is the Firebase setup, which functions as a database to store sensor data (RTDB), system status, and irrigation scheduling. Firebase also sends data to the user interface via a Wi-Fi connection and receives commands from the UI.

Flutter for User Interface

uia.png
uib.jpg
uic.png

Developed a mobile application or user interface (UI) using Flutter. The app includes a login screen containing a username and password field to prevent unauthorized access. There is also a homepage that displays soil moisture sensor data, pH sensor data, soil condition status, manual control feature, auto mode feature, and scheduling feature. Additionally, there is a dedicated scheduling page that functions to set irrigation schedules and view the irrigation history based on those schedules.


github: https://github.com/NathanaelPW/Prototipe-Sistem-Penyiraman-Otomatis-Untuk-Area-Terbatas-Rumput-Lapangan-Sepak-Bola/blob/eeb906cf76e487c6258ea6f8607d3d0b5234a12f/source%20code.zip

Print 3d Print Part

WhatsApp Image 2025-07-18 at 6.29.43 PM (1).jpeg

This is the 3D print design made from filament material.

Assemble the Hardware

WhatsApp Image 2025-07-18 at 6.29.43 PM.jpeg
WhatsApp Image 2025-07-18 at 6.32.15 PM.jpeg

Assembling the hardware includes connecting the ESP32 with sensors, relay, step-down converter, power supply unit (PSU), water pump, and non-electronic components such as the sprinkler and hose, as well as 3D-printed parts to protect the main system.

Block Diagram

block diagram.png

This is the block diagram of system

Explanation of the Block Diagram:

  1. Power Supply Unit (DC 12V Switching Transformer)
  2. Connected to the Step-Down Regulator (LM2596) and the 3.3V Relay Module with Optocoupler.
  3. Step-Down Regulator (LM2596)
  4. Supplies power to the ESP32.
  5. ESP32:
  6. Receives power from the LM2596 step-down regulator.
  7. Receives input from the Soil Moisture Sensor (YL-69) to measure soil moisture levels.
  8. Receives input from the Soil pH Sensor to read soil pH levels.
  9. Connected to the Relay Module + Optocoupler to control the ON/OFF state of the water pump.
  10. Wi-Fi Module (Network)
  11. Provides connectivity between the ESP32, Firebase, and the Mobile Application (UI).
  12. Soil Moisture Sensor (YL-69) & Soil pH Sensor
  13. Both are directly connected to the ESP32 and powered by it.
  14. Relay Module + 3.3V Optocoupler
  15. Connected to the ESP32 to receive control signals for activating the water pump (ON/OFF).
  16. Connected to the water pump and the 12V power supply.
  17. DC 12V Water Pump
  18. Connected to the power supply through the relay circuit.
  19. Sprinkler
  20. Connected to the water pump and sprays the grass when the pump is activated.
  21. Firebase (Database)
  22. Connected to the ESP32 via Wi-Fi.
  23. Functions as a database for storing sensor data, system status, and watering schedules.
  24. Sends data to the user interface via Wi-Fi and receives commands from the UI.
  25. Mobile Application (UI)
  26. Accesses data and controls the system through Firebase via Wi-Fi.
  27. Receives commands from the user.


Flowchart

flowchart1.png
flowchart2.png

This is the flowchart of system (schedulling)

Flowchart Explanation:

  1. Start
  2. The system is initiated.
  3. ESP32 Initializes Soil Moisture Sensor, pH Sensor, and Relay Module
  4. The ESP32 initializes all main components:
  5. Soil moisture sensor (YL-69),
  6. Soil pH sensor,
  7. Relay module that controls the water pump.
  8. ESP32 Connecting to Wi-Fi
  9. The ESP32 attempts to connect to a Wi-Fi network to communicate with Firebase.
  10. Is Wi-Fi Connected?
  11. The system checks whether the Wi-Fi connection is successful:
  12. If not, it keeps retrying the connection.
  13. If yes, it proceeds to the next step.
  14. ESP32 Connecting to Firebase
  15. The ESP32 connects to Firebase as the backend system (database).
  16. Is Firebase Connected?
  17. The system checks if the Firebase connection is successful:
  18. If it fails, the ESP32 retries until it succeeds.
  19. If successful, it proceeds to send data.
  20. Sensor Data is Sent to Firebase
  21. Soil moisture and soil pH sensor data are sent to Firebase in real time for monitoring via the UI.
  22. Set Watering Schedule
  23. The watering schedule is configured (from Firebase or the UI). This determines when the pump will activate.
  24. Waiting for Scheduled Watering Time
  25. The system waits until the scheduled watering time.
  26. Does the Current Time Match the Watering Schedule?
  27. The ESP32 checks whether the current time matches the scheduled time:
  28. If not, the system continues waiting.
  29. If yes, the watering process starts.
  30. Pump is Active for 1 Minute
  31. The pump is turned on for the first 1-minute duration.
  32. Sprinkler Watering
  33. While the pump is active, the sprinkler irrigates the plants.
  34. Is the Soil Moisture Already Ideal?
  35. The system checks if the soil moisture level has reached the ideal threshold:
  36. If yes, the pump is turned off.
  37. If not, watering continues.
  38. Pump is Still Active for 1 More Minute
  39. The pump remains active for an additional 1-minute cycle.
  40. Sprinkler Watering
  41. The sprinkler continues watering while the pump remains on.
  42. Is the Soil Moisture Already Ideal?
  43. The system checks again if the soil moisture level is sufficient:
  44. If yes, it proceeds to shut down the system.
  45. If not, it can loop back to adjust or reschedule watering.
  46. Pump is Turned Off
  47. The ESP32 turns off the pump after the soil reaches the ideal condition or the watering duration ends.
  48. Sprinkler Stops Watering
  49. The sprinkler stops because the pump is no longer supplying water.
  50. End
  51. The watering process is completed.


Schematic

skematik.png

The following is the schematic that connects each component of the system


Poster

Poster Skripsi Final 2025.png

This is the project poster

Video Demo

Video Skripsi Prototipe Sistem Penyiraman Otomatis untuk Area Terbatas Rumput Lapangan Sepak Bola

This is the demo video of system