You are on page 1of 23

1

Smart Irrigation System (SIS): An Arduino-based Soil Moisture Monitoring and

Water Usage Optimization System Against the Effect of Drought on Rice

Production

Executive Summary

The main objective of this study is to develop an innovative AI based Arduino

system to mitigate or lessen the impact of drought on rice production. The proposed

system aims to create an adaptive system that will address pressing challenges,

especially to the farmers. The study will involve designing, implementing, and

evaluating an Arduino-based system. The proposed system will utilize reliable power

sources, including sustainable options, and incorporates moisture sensors, weather

forecasts stations, and machine learning algorithms to optimize water usage. The

system also aims to deliver the correct amount of water required at the right moment.

Additionally, rain water harvesting and recycling techniques will be utilized by the

system to further enhance water conservation and promote sustainable agricultural

practices. The study seeks to mitigate the detrimental effects on rice production by

increasing advanced technology for real time monitoring and intervention, contributing

to enhanced agricultural resilience.

I. Background

More than half of the world's population relies primarily on rice, which is a

staple food and contains vital vitamins and minerals for human health (Sen, 2020).

For Asians, particularly Filipinos, rice is life. In the Philippines, rice continues to be

the most popular staple food, despite the availability of other options, it is a grain crop

with cultural and historical importance and, it is widely linked to numerous customs,

traditions, and cultural practices within the nation and into Filipino culture for many
2

years, aside from the food and culture, rice is also a major source of income for

Filipino families, particularly for the farmers (National Nutrition Council, 2020).

However, according to Bouman et al. (2007), compared to other cereal crops, rice uses

more water, which makes it more susceptible to drought. A drought is an extended dry

period that can happen anywhere in the world as part of the natural climate cycle,

there is a scarcity of water as a result of the slow-onset calamity caused by the

absence of precipitation (WHO, 2024).

In Cambodia, according to estimates from the Ministry of Environment (MoE),

rice losses caused by drought between 1996 and 2000 accounted for about 20% of the

country's potential rice production. Since then, 300,000 hectares of paddy rice have

been affected by a severe drought in 2004, which resulted in an 82 percent loss of the

potential harvest (Chhinh & Millington, 2015). Additionally, in the Philippines,

according to Science and Technology Secretary Renato Solidum Jr., a "strong" El Niño

is expected to cause drought by the end of May 2024 in at least 65 provinces, or 77

percent of the country's provinces (PNA, 2023). According to the Department of

Agriculture (DA) in the Davao Region, 8,429 farmers in the area lost 14,951 metric

tonnes of rice valued at P219.983 million and 9,249 metric tonnes of maize valued at

P77.210 million in 2016 as a result of the El Nino phenomenon (Rappler, 2023).

Current approaches to mitigate the effects of drought on rice production include

increasing irrigation applications and enhancing seed quality to resist the impacts of

El Niño. However, although these strategies are frequently used, how well they are

implemented will rely on the resources available, the local environment, and the

unique features of the rice-growing region (Babel et al., 2011).


3

The Smart Irrigation System (SIS) is an AI-based Arduino enabled solution to

optimize water usage, and soil moisture monitoring. The proposed system will

incorporate Soil Moisture sensors to provide up-to-date data on soil moisture. Once it

detects that the soil lacks sufficient moisture to support plant growth, it will

automatically release the necessary amount of water. The system will also ensure that

the crop precisely receives the right amount of water at the optimal moment,

maximizing efficiency and minimizing waste. Furthermore, the project will also

integrate weather forecasts, and incorporate rainwater harvesting and recycling

techniques to conserve water resources, promote sustainable farming practices and

mitigate the effects of droughts.

II. Beneficiaries.

Farmers. Farmers stand to gain significantly from the implementation of this

system. By optimizing irrigation practices and minimizing water wastAdd and the

automation feature, they can improve crop yield and lessen the damage caused by

drought.

Agricultural Communities. The system benefits the entire agricultural

community. By conserving water resources and promoting efficient irrigation

practices, it helps safeguard the long-term viability of farming and lessen the impact of

drought on rice production. This, in turn, supports local economies and food security.

Governments. Governments can benefit from the implementation of this system

through improved water resource management and increased agricultural

productivity. Moreover, the system can help in mitigating the effects of Drought on rice

production, ensuring food security and stability in regions reliant on rice production.
4

Research and Development Community. Researchers and Developers in the

agricultural sector can leverage this system to further enhance irrigation technology

and sustainable farming practices. By studying its effectiveness and refining its

features, they can contribute to ongoing advancements in agricultural innovation and

resource management, including strategies to mitigate the impact of drought on rice

production.

III. Proposed Solution to the Problem Presented

This paper aims to develop a soil moisture monitoring system using Arduino

microcontrollers and sensors to provide real-time data on soil moisture and

automatically release water once soil moisture is insufficient. By implementing such a

system, soil moisture becomes easily monitored, and provides appropriate measures to

mitigate the effects of drought.

Smart Irrigation System (SIS) is a modern solution against the damage caused by

drought on Rice Production.

This is the general outline of the proposed solution:


5

Smart Irrigation
System

Arduino Microcontroller

Water Release
Mechanism (e.g.,
Solenoid Valve)

Control Algorithm

Sustainable Rice
Production
User Interface

Figure I. Conceptual Diagram of the Proposed Solution

System Design and Setup

Choose a suitable Arduino board based on the project requirements.

Choose the appropriate monitoring sensors to measure the soil’s moisture.

Connect the soil sensors to the Arduino board using suitable interfaces and wiring.

Data Acquisition and Processing


6

Program the Arduino Mega board to read and convert the sensor data to

understandable soil moisture measurements.

Store the obtained data in the Arduino's memory and transmit it to the external

device.

Data Visualization and Analysis

Develop a user-friendly user interface to display the collected data appropriately.

Implement data analysis techniques to identify patterns, trends, and potential

overwatering, underwatering based on the soil moisture data.

Communication and Alert System

Utilize wired or wireless communication modules (GSM) to transmit the soil moisture

data to a central monitoring station.

Power Supply and System Reliability

Utilize an efficient power supply system (AA battery power supply) and a backup power

option (Solar panel system).

IV. Methodology
7

A. Materials
Arduino Mega. Arduino Mega will be used for this proposed system.

Figure II. Arduino Mega

GSM Module. This device will be used to communicate and provide alerts to the
residents via Short Message Service (SMS)

Figure III: GSM Module

DC Motor. A simple rotation motor, rotating 360 degrees, operating without a load at

~6000 RPM. For controlling gateways or valves in larger irrigation systems.

Figure V: DC Motor
8

Humidity and Temperature Sensor. A low-cost humidity and temperature sensor. Helps

in monitoring environmental conditions affecting plant growth.

Figure VI: Humidity and Temperature Sensor

Rainfall Sensor. This sensor measures the amount of rainfall in an area, detects

rainfall to prevent unnecessary watering.

Figure VII: Rainfall Sensor

Soil Moisture Sensor. Measures the moisture content in the soil to determine when

watering is required.

Figure VIII: Soil Moisture Sensor


9

Water Level Sensor Module. This is simple and small portable water level/water droplet
identification, to monitor the water level in tanks or reservoirs.

Figure IX: Water Level Sensor Module

Solenoid Valve. This valve allows you to open or close the flow of a liquid through it
and controls the flow of water to irrigation lines.

Figure X: Solenoid Valve

Relay Module. These are used to control high-voltage devices like water pumps or

solenoid valves with the low-voltage Arduino.

Figure XI: Relay Module

Water Pump. Used to pump water from a reservoir to irrigation lines.


10

Figure XII: Water Pump

Water Flow Sensor. Measures the flow rate of water to ensure the right amount is

delivered.

Figure XIII: Water Flow Sensor

Real Time Clock Module. Allows the Arduino to keep track of time even when powered

off.

Figure XIV: Real Time Clock Module

Solar Panel. A device that converts light from the sun into electricity that can be used

to power electrical loads. This will be used to power

the proposed system.


11

Figure XV: Solar Panel

Battery and Battery Holder. Power supply to power the Arduino and other

components.

Figure XVI: Battery and Battery Holder

B. System Design

a. Determine the appropriate Arduino board and necessary components based on

the project’s requirements such as, soil moisture sensor, water flow sensor, and

communication modules (e.g., GSM).

b. Create a circuit design and schematic layout for the component connections,

considering the integration of the communication module, power supply needs,

and sensor interfaces.

C. Hardware Implementation

a. Begin by assembling the components of the irrigation system based on the

specified schematic diagram. This involves setting up water flow sensor, water
12

level sensor, soil moisture sensor, and weather forecast station (Rain fall

sensor, Humidity and Temperature sensor) and DC motor in accordance with

the design.

b. \Calibrate and test each sensor to guarantee precise measurements. For motion

sensors, verify their accuracy in detecting movements. Additionally, ensure the

magnetic door switch and cameras are calibrated to provide reliable

information.

c. Connect and configure a GSM module for establishing communication with a

central server or monitoring station to ensure that the collected data can be

transmitted in real-time, enabling prompt analysis and response.

Figure XVI: Schematic diagram of the Arduino’s components and modules

D. Software Implementation

a. Develop an Arduino program that interfaces with soil moisture sensors, water

flow sensor, weather forecast station (Rain fall sensor, Humidity and

Temperature sensor), water level sensor module, DC motor, water pump,

solenoid valve, and real time clock module transforming their raw signals into
13

meaningful data. This code ensures precise measurements for effective potential

crime monitoring.

b. Configure the system to transmit data using the selected communication

module. Modify the Arduino code to guarantee smooth delivery of sensor

information to a central control unit or monitoring station.

c. Integrate functionalities into the Arduino code that manage errors and record

data. This addition helps in identifying and resolving issues during data

collection and transmission.

#include <SD.h> // For SD Card


#include <LiquidCrystal.h> // For LCD Display
#include <Wire.h> // For I2C Communication
#include <DS3231.h> // For Real-Time Clock
#include <SoftwareSerial.h> // For GSM Module

// Pin Definitions
#define SD_CS_PIN 53 // SD Card CS pin
#define LCD_RS_PIN 8
#define LCD_EN_PIN 9
#define LCD_D4_PIN 4
#define LCD_D5_PIN 5
#define LCD_D6_PIN 6
#define LCD_D7_PIN 7
#define WATER_LEVEL_SENSOR_PIN A0
#define SOIL_MOISTURE_SENSOR_PIN A1
#define FLOW_SENSOR_PIN 2
#define RAIN_SENSOR_PIN 3
#define HUMIDITY_TEMP_SENSOR_PIN A2
#define GSM_RX_PIN 10
#define GSM_TX_PIN 11
#define PUMP_RELAY_PIN 12
#define SOLENOID_VALVE_PIN 13
#define DC_MOTOR_PIN 14 // Example pin for DC motor

// Global Variables
LiquidCrystal lcd(LCD_RS_PIN, LCD_EN_PIN, LCD_D4_PIN, LCD_D5_PIN, LCD_D6_PIN,
LCD_D7_PIN);
DS3231 rtc;
14

SoftwareSerial gsmSerial(GSM_RX_PIN, GSM_TX_PIN);


float waterLevel;
int soilMoisture;
float flowRate;
int rainfall;
float humidity;
float temperature;
String current_time;

void setup() {
// Initialize Serial Communication
Serial.begin(9600);

// Initialize SD Card
if (!SD.begin(SD_CS_PIN)) {
Serial.println("SD Card initialization failed!");
return;
}

// Initialize LCD Display


lcd.begin(16, 2);
lcd.clear();
lcd.print("Drought System");
delay(2000);

// Initialize GSM Module


gsmSerial.begin(9600);

// Initialize RTC
rtc.begin();

// Initialize Pin Modes


pinMode(WATER_LEVEL_SENSOR_PIN, INPUT);
pinMode(SOIL_MOISTURE_SENSOR_PIN, INPUT);
pinMode(FLOW_SENSOR_PIN, INPUT);
pinMode(RAIN_SENSOR_PIN, INPUT);
pinMode(HUMIDITY_TEMP_SENSOR_PIN, INPUT);
pinMode(PUMP_RELAY_PIN, OUTPUT);
pinMode(SOLENOID_VALVE_PIN, OUTPUT);
pinMode(DC_MOTOR_PIN, OUTPUT);
}

void loop() {
DateTime now = rtc.now();
15

// Format the current time


current_time = String(now.year()) + "-" + String(now.month()) + "-" +
String(now.day()) + " " + String(now.hour()) + ":" + String(now.minute()) +
":" + String(now.second());
// Read sensor values
waterLevel = readWaterLevel();
soilMoisture = readSoilMoisture();
flowRate = readFlowRate();
rainfall = readRainfall();
humidity = readHumidity();
temperature = readTemperature();

// Check if irrigation is needed


if (soilMoisture < 50 && waterLevel > 10 && !rainfall) {
// Activate pump and solenoid valve
digitalWrite(PUMP_RELAY_PIN, HIGH);
digitalWrite(SOLENOID_VALVE_PIN, HIGH);
lcd.clear();
lcd.print("Irrigating...");
} else if (soilMoisture >= 50) {
// Soil moisture is sufficient, turn off irrigation
digitalWrite(PUMP_RELAY_PIN, LOW);
digitalWrite(SOLENOID_VALVE_PIN, LOW);
lcd.clear();
lcd.print("Soil Moisture OK");

// Send SMS notification


sendSMS("Irrigation Alert: Soil moisture is low. Irrigation initiated." +
current_time);
}

// Check if drought condition


if (soilMoisture < 20) {
// Send SMS notification
sendSMS("Drought Alert: Soil moisture is critically low. Drought condition
detected." + current_time);
}

// Check if gate opening is needed


if (waterLevel > 20 && !rainfall) {
// Activate DC motor to open gate
digitalWrite(DC_MOTOR_PIN, HIGH);
delay(5000); // Run motor for 5 seconds
digitalWrite(DC_MOTOR_PIN, LOW);
}
16

// Display sensor values on LCD


displaySensorValues();

// Check for any SMS messages from GSM module


checkSMS();

delay(10000); // Delay for 10 seconds


}

// Function to read water level from sensor


float readWaterLevel() {
// Code to read water level sensor
}

// Function to read soil moisture from sensor


int readSoilMoisture() {
// Code to read soil moisture sensor
}

// Function to read flow rate from sensor


float readFlowRate() {
// Code to read flow sensor
}

// Function to read rainfall from sensor


int readRainfall() {
// Code to read rainfall sensor
}

// Function to read humidity from sensor


float readHumidity() {
// Code to read humidity sensor
}

// Function to read temperature from sensor


float readTemperature() {
// Code to read temperature sensor
}

// Function to display sensor values on LCD


void displaySensorValues() {
lcd.clear();
lcd.setCursor(0, 0);
lcd.print("Moisture: ");
17

lcd.print(soilMoisture);
lcd.print("%");

lcd.setCursor(0, 1);
lcd.print("Level: ");
lcd.print(waterLevel);
lcd.print("cm");
}

// Function to check for SMS messages


void checkSMS() {
// Code to check SMS messages and take appropriate action
}

// Function to send SMS


void sendSMS(String message) {
gsmSerial.println("AT+CMGF=1"); // Set SMS mode to text
delay(1000);
gsmSerial.print("AT+CMGS=\"+1234567890\"\r"); // Replace with your
recipient's phone number
delay(1000);
gsmSerial.print(message);
delay(1000);
gsmSerial.println((char)26); // End SMS transmission
delay(1000);
}

Figure XVIII: Arduino code for the device and its sensors

E. System Integration and Testing

a. Bring together the physical and digital parts of the system by integrating the

hardware and software components.

b. Verify that the system does what it's supposed to by running different tests.

This includes checking if the sensors give accurate readings and ensuring that

the data gets transmitted correctly.


18

c. Record how the tests are done, what the results are, and if any changes are

needed to be done.

F. System Architecture
19

Figure XIX: System Architecture of the proposed diagram

G. Block Diagram
20

Figure XX: Block Diagram of the proposed diagram

IV. Cost Analysis

Table I.

Material Cost Estimates

Materials Quantity Cost


Arduino Mega 2560 R3 1 ₱ 2,156.00
DS3231 Precision RTC Breakout 1 ₱ 64.96
Relay Module 1 ₱ 96.88
Micro SD Card Memory Shield Module 1 ₱ 41.44
330 Ohm Resistor 1 ₱ 5.60
Submersible Pool Water Pump 1 ₱ 173.60
Diode Rectifier 2 ₱ 12.32
21

DC Motor 1 ₱ 109.20
12V Solenoid Valve - 3/4'' 1 ₱ 445.20
Serial Graphic LCD 160x128 1 ₱ 3,917.20
Battery Holder - 8xAA - 12V 1 ₱ 332.80
N-Channel MOSFET 60V 30A 3 ₱ 245.28
10K Ohm Resistor 5 ₱ 28.00
Water Level Sensor Module 1 ₱ 43.68
Water Flow Sensor G1/2 1 ₱ 549.68
QuadBand GPRS-GSM SIM800L 1 ₱ 650.28
Soil Moisture Sensor 1 ₱ 277.20
DHT22/11 Humidity and Temperature Sensor 1 ₱ 557.20
USB Cable A to B 1 ₱ 182.56
BreadBoard 1 ₱ 462.00
Jumper Wires Pack - M/M 3 ₱ 327.60
Jumper Wires Pack - M/F 1 ₱ 109.20
Male Headers Pack- Break-Away 1 ₱ 36.96
300W Solar Panel 1 ₱ 600.00
Rainfall Sensor 1 ₱ 65.00
Labor 1 ₱ 5,000.00
Total ₱ 16,490.00

Table II.

Research Activities and Cost Estimates

Tasks Start Date End Date Duration Cost

Research
Planning 22/02/24 08/03/24 15 ₱3,000.00

Expert
Consultation 08/03/24 24/04/24 47 ₱2,000.00

Data
Acquisition 10/03/24 18/03/24 8 ₱800.00
Device
Calibration 19/03/24 01/04/24 13 ₱16,490
22

Interpret the
Results 02/04/24 08/04/24 6 ₱500.00
Disseminate
the Results 09/04/24 12/04/24 3 ₱500.00
Interpret the
Feedback 13/04/24 13/05/24 30 ₱500.00

TOTAL 122 ₱24,290.00

References

Bonzo, L. (2023, April 25). Davao City prepares as looming El Niño threatens to cause dry spell.
RAPPLER. https://www.rappler.com/nation/mindanao/davao-city-prepares-looming-el-
nino-threatens-cause-dry-spell/
Chhinh, N., & Millington, A. (2015). Drought monitoring for rice production in Cambodia. Climate,
3(4), 792–811. https://doi.org/10.3390/cli3040792
Korres, N. E., Norsworthy, J. K., Burgos, N. R., & Oosterhuis, D. M. (2017). Temperature and
drought impacts on rice production: An agronomic perspective regarding short- and
long-term adaptation measures. Water Resources and Rural Development, 9, 12–
27. https://doi.org/10.1016/j.wrr.2016.10.001
Philippine News Agency. Drought to hit 65 provinces by end of May 2024: Solidum.
(n.d.). https://www.pna.gov.ph/articles/1215252#:~:text=MANILA
%20%E2%80%93%20At%20least%2065%20provinces,Renato%20Solidum%20Jr.
%20said%20Tuesday.
23

Roberts, M. G., Dawe, D., Falcon, W. P., & Naylor, R. L. (2009). El Niño–Southern oscillation
impacts on rice production in Luzon, the Philippines. Journal of Applied Meteorology and
Climatology, 48(8), 1718–1724. https://doi.org/10.1175/2008jamc1628.1
World Health Organization: WHO. (2019, November 8). Drought. https://www.who.int/health-
topics/drought#tab=tab_1

You might also like