AI Assistant
Detail Karya Portofolio

Automatic Irrigation System in a Greenhouse

Akpil Mauhib Oleh: Akpil Mauhib

Ringkasan Portofolio

Indonesia is a country rich in natural resources, with a tropical climate that provides enormous potential in various agrarian sectors, including agriculture, livestock, plantations, food crops, and forestry. In Desa Geresik, Kecamatan Jamanis, Kabupaten Tasikmalaya, the primary livelihood revolves around farming and agricultural labor. However, the profits from rice farming, the main crop, are often inadequate to cover production costs, sometimes even leading to losses.

To address this challenge, the proposed solution focuses on introducing innovative technologies that can offer alternative income streams without disrupting the traditional farming practices. One such solution is the development of a greenhouse system with automatic irrigation based on the Internet of Things (IoT). This system will support the cultivation of curly red chili (cabai keriting), a commodity that holds significant potential in Desa Geresik.

Deskripsi & Detail Proyek

The ESP8266-based IoT system is a key component of this innovation, designed to automate irrigation and enhance agricultural efficiency. Here’s a breakdown of the code that powers this system:

WiFi Connection:
The ESP8266 connects to the WiFi network (ssid = "Ecosphere Innovations", password = "Inovasikami") to enable communication with a remote PHP server that controls the relay and logs sensor data.

pH Sensor:

  • Reads the pH value using the analog input pin A0.
  • Converts the raw sensor value to a corresponding pH output using a linear equation.
  • Outputs pH values to the serial monitor, providing real-time data on the soil's acidity levels.

Soil Moisture Sensor:

  • Measures soil moisture levels using pin D0.
  • Converts the analog reading to a percentage (0–100%) to reflect the soil's moisture content.

Water Pump Relay Control:

  • The water pump relay, connected to pin D2, is controlled automatically based on the soil moisture readings:
    • If moisture falls below 80%, the pump turns on.
    • If moisture rises above 90%, the pump turns off.
  • To avoid overuse, the pump is programmed to automatically turn off after running for 10 minutes.

Relay Control via PHP Server:

  • The system also connects to a PHP server at phpEndpoint to receive instructions for controlling an additional relay on pin D1. The server sends a JSON response containing the relay state, which the system reads to determine whether to activate or deactivate the relay for 3-minute intervals.

Server Communication for Data Logging:

  • The ESP8266 sends data, including soil moisture, pH levels, and pump status, to a server at createEndpoint. This allows remote monitoring of the greenhouse conditions, enabling data-driven decision-making.

Loop with Timed Actions:

  • The system operates in a loop, continuously reading sensor data, controlling the relay and pump, and sending updates to the server. It waits 10 seconds between iterations to prevent data overload and ensure efficient operation.

Benefits and Outcomes

Key Benefits of the IoT-based Greenhouse System:

  • The automatic irrigation system ensures plants receive the right amount of water at the right time, reducing waste and optimizing resources.
  • By automating irrigation based on real-time moisture data, the system supports healthier plant growth, leading to better yields for curly red chili crops.
  • Chili cultivation can offer an additional revenue stream for farmers, helping diversify their income beyond rice farming.
  • Building a reputation for producing high-quality curly red chili can strengthen the village’s identity and create a unique selling point for Desa Geresik.
  • This project introduces modern IoT technology to local farmers, enabling them to blend traditional farming methods with modern tools for greater efficiency.

Project Outcome

The greenhouse with automatic irrigation system, developed for Desa Geresik, is expected to enhance agricultural productivity and provide alternative income through chili cultivation. As a form of community service, the project has been donated to the local farmers, with plans for further enhancements using Artificial Intelligence (AI). This next step will involve real-time monitoring and analysis of plant needs, optimizing water use and increasing yields even further.

Conclusion

This IoT-based innovation is a model for modernizing traditional agricultural practices in rural Indonesia. It combines cutting-edge technology with local expertise to improve farming efficiency, crop yields, and economic prospects. Through the introduction of this automatic irrigation system, Desa Geresik has the opportunity to become a leader in smart farming, with chili farming serving as a viable alternative income source alongside rice cultivation. The future potential for integrating AI-driven farming solutions promises even greater advancements in local agricultural practices.