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

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

- ESP32 (1): Main microcontroller
- Soil Moisture Sensor (YL-69) (1): Detect soil moisture levels. Main parameter for triggering irrigation
- pH Sensor + DMS (1): Detect pH level of the soil
- Relay modul 3,3v + Optocoupler (1): Switch controlled by the ESP32 to activate the water pump.
- Stepdown LM2596 (1): To step down the 12V voltage to 5V to safely power the ESP32
- Water Pump Air DC 12V 72W (1): Pulls water from the reservoir and delivers it to the sprinkler.
- 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.
- LED Indikator (2): The LED serves as an indicator of whether the ESP32 is successfully connected to Wi-Fi and Firebase.
- Resistor 220Ω (2): Used to make the LED light up more clearly.
- 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.
- Sprinkler (1): Receives water flow from the pump and is used to irrigate the grass
- 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

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



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
.jpeg)
This is the 3D print design made from filament material.
Assemble the Hardware


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

This is the block diagram of system
Explanation of the Block Diagram:
- Power Supply Unit (DC 12V Switching Transformer)
- Connected to the Step-Down Regulator (LM2596) and the 3.3V Relay Module with Optocoupler.
- Step-Down Regulator (LM2596)
- Supplies power to the ESP32.
- ESP32:
- Receives power from the LM2596 step-down regulator.
- Receives input from the Soil Moisture Sensor (YL-69) to measure soil moisture levels.
- Receives input from the Soil pH Sensor to read soil pH levels.
- Connected to the Relay Module + Optocoupler to control the ON/OFF state of the water pump.
- Wi-Fi Module (Network)
- Provides connectivity between the ESP32, Firebase, and the Mobile Application (UI).
- Soil Moisture Sensor (YL-69) & Soil pH Sensor
- Both are directly connected to the ESP32 and powered by it.
- Relay Module + 3.3V Optocoupler
- Connected to the ESP32 to receive control signals for activating the water pump (ON/OFF).
- Connected to the water pump and the 12V power supply.
- DC 12V Water Pump
- Connected to the power supply through the relay circuit.
- Sprinkler
- Connected to the water pump and sprays the grass when the pump is activated.
- Firebase (Database)
- Connected to the ESP32 via Wi-Fi.
- Functions as a database for storing sensor data, system status, and watering schedules.
- Sends data to the user interface via Wi-Fi and receives commands from the UI.
- Mobile Application (UI)
- Accesses data and controls the system through Firebase via Wi-Fi.
- Receives commands from the user.
Flowchart


This is the flowchart of system (schedulling)
Flowchart Explanation:
- Start
- The system is initiated.
- ESP32 Initializes Soil Moisture Sensor, pH Sensor, and Relay Module
- The ESP32 initializes all main components:
- Soil moisture sensor (YL-69),
- Soil pH sensor,
- Relay module that controls the water pump.
- ESP32 Connecting to Wi-Fi
- The ESP32 attempts to connect to a Wi-Fi network to communicate with Firebase.
- Is Wi-Fi Connected?
- The system checks whether the Wi-Fi connection is successful:
- If not, it keeps retrying the connection.
- If yes, it proceeds to the next step.
- ESP32 Connecting to Firebase
- The ESP32 connects to Firebase as the backend system (database).
- Is Firebase Connected?
- The system checks if the Firebase connection is successful:
- If it fails, the ESP32 retries until it succeeds.
- If successful, it proceeds to send data.
- Sensor Data is Sent to Firebase
- Soil moisture and soil pH sensor data are sent to Firebase in real time for monitoring via the UI.
- Set Watering Schedule
- The watering schedule is configured (from Firebase or the UI). This determines when the pump will activate.
- Waiting for Scheduled Watering Time
- The system waits until the scheduled watering time.
- Does the Current Time Match the Watering Schedule?
- The ESP32 checks whether the current time matches the scheduled time:
- If not, the system continues waiting.
- If yes, the watering process starts.
- Pump is Active for 1 Minute
- The pump is turned on for the first 1-minute duration.
- Sprinkler Watering
- While the pump is active, the sprinkler irrigates the plants.
- Is the Soil Moisture Already Ideal?
- The system checks if the soil moisture level has reached the ideal threshold:
- If yes, the pump is turned off.
- If not, watering continues.
- Pump is Still Active for 1 More Minute
- The pump remains active for an additional 1-minute cycle.
- Sprinkler Watering
- The sprinkler continues watering while the pump remains on.
- Is the Soil Moisture Already Ideal?
- The system checks again if the soil moisture level is sufficient:
- If yes, it proceeds to shut down the system.
- If not, it can loop back to adjust or reschedule watering.
- Pump is Turned Off
- The ESP32 turns off the pump after the soil reaches the ideal condition or the watering duration ends.
- Sprinkler Stops Watering
- The sprinkler stops because the pump is no longer supplying water.
- End
- The watering process is completed.
Schematic

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

This is the project poster
Video Demo

This is the demo video of system