You are on page 1of 100

DESIGN AND INTEGRATION OF VALVES’ CONTROLLER FOR DRONE

MONITORED SOLAR IRRIGATION SYSTEM

By

MUHAMMAD LUQMAN SYAKIR BIN ROSLI

Project Supervisor:
DR. FIRAS BASIM ISMAIL

THESIS SUBMITTED IN PARTIAL FULFILMENT OF


THE REQUIREMENTS FOR THE DEGREE OF
BACHELOR OF MECHANICAL ENGINEERING

COLLEGE OF ENGINEERING
UNIVERSITI TENAGA NASIONAL

2020
i

DECLARATION

I hereby declare that this thesis, submitted to Universiti Tenaga Nasional as partial
fulfillment of the requirements for the degree of Bachelor of Mechanical Engineering, has
not been submitted to any other university for any degree. I also certify that the work
described herein is entirely of my own, except for quotations and summaries sources of
which have been duly acknowledged.

This thesis may be available within the university library and may be photocopied
or loaned to other libraries for the purposes of consultation.

10 FEBRUARY 2020 MUHAMMAD LUQMAN SYAKIR BIN ROSLI


ME0100662
ii

ACKNOWLEDGEMENT

This page is dedicated to the people who have given their full, unending support and
guidance in any way possible. The completion of this thesis has been a really challenging
task throughout my Final Year here in UNITEN. Those hard and challenges times have
really showed me the people who was there for me to lend their hand helping me do the
thing that I need.

First and foremost, I would like to thank my Final Year Project supervisor, Dr. Firas
B. Ismail for giving me the best guidance, his time and also valuable insights regarding this
project. Without a doubt, he is a great motivator and friend in providing the best solution.

I would also like to extend my gratitude to my examiner, Prof. Dr. Azree Idris for
his valuable opinions and recommendation that helped me improving my project
performance and which section that I should focus on. Furthermore, thanks to my research
partner, Ranjani for giving her ideas and commitment in making this project succeed.

Lastly, this would not have been possible without the continuous motivation and support
from my parents, Mr. Rosli Bin Awang and Mrs. Aziza Binti Halim, for always believing
in me and also my fellow friends especially Mohd Sharnizal in helping me during
fabrication phase. In addition, I would also like to take this opportunity to thank whoever
that has helped and guided me to carry out this project successfully.
iii

ABSTRACT

Irrigation is the most vital part in agriculture whether in small scale or large scale. Irrigation
is one of the applications that consumes lots of water besides industrial purposes. There
have been lots of research and development to optimized current irrigation system and
various technologies have been implemented. The potential for solar irrigation system is
potentially worthwhile and favorable to farmer especially in reducing carbon footprint and
helping to maintain sustainability in terms of water used. The objective of this project is to
help farmer manage their irrigation systems just using electronic devices to control valves
and monitor whole crops zone using drone. A prototype that consists of crucial part such
as microcontroller, solenoid valves and Bluetooth module as transmitter and receiver for
drone was fabricated and tested to see the performance. Major outcome from this idea is
that the crop which is lemon myrtle will receive real time monitoring and optimum supply
of water. A proper monitoring can maintain the growth of the crops and boost the
production of lemon myrtle. Furthermore, energy can be saved both for machinery and
human because this system utilized solar power to run the system instead of conventional
ways that use diesel generator and drone for monitoring whole crop zones. This study is
important in optimizing the use of water supply during irrigation while the system is eco-
friendly. Farmer no longer needs to walk through out the farm to monitor each of crops
with the help of drone. In future, perhaps there will be more advanced microcontrollers that
able to expand the radius for data transmission between user and microcontroller to operate
the system. In addition, efficiency in water supply to crops can be increased so there will
be no water loss in the piping system.
iv

CONTENTS

DECLARATION i

ACKNOWLEDGEMENT ii

ABSTRACT iii

CONTENTS iv

LIST OF TABLES viii

LIST OF FIGURES ix

CHAPTER 1: INTRODUCTION 1

1.1 Background ....................................................................................................... 1

1.2 Problem Statement............................................................................................. 2

1.3 Objective ........................................................................................................... 3

1.4 Work Contribution............................................................................................. 3

1.5 Thesis Outline ................................................................................................... 4

CHAPTER 2: LITERATURE REVIEW 5

2.1 Introduction ....................................................................................................... 5

2.2 Background of Related Works ........................................................................... 6

2.2.1 Irrigation System 6

2.2.2 Usage of Microcontroller 15


v

2.2.3 Drone Usage in Agriculture 19

2.3 Summary from Background Work Gaps .......................................................... 23

2.4 Bench Marking ................................................................................................ 24

2.5 Summary ......................................................................................................... 25

CHAPTER 3: METHODOLOGY 26

3.1 Introduction ..................................................................................................... 26

3.2 Phase I: Selection of Solar Panel Used ............................................................. 27

3.2.1 Solar Energy Conversion Process 27

3.3 Phase II: Parameters Identification................................................................... 30

3.3.1 Volume of Water Needed for Irrigation 30

3.3.2 Condition of Lemon Myrtle Leaves 38

3.3.3 Type of Drone Used 40

3.4 Phase III: System Design of Irrigation System ................................................. 41

3.4.1 Software Design for Actual Irrigation System 41

3.5 Phase IV: Development of Solenoid Valves Controller .................................... 43

3.5.1 Microcontroller for Solar Irrigation System 43

3.5.2 Fritzing 45

3.6 PHASE V: Design Analysis ............................................................................. 51

3.6.1 Material Selection and Safety Factor 51


vi

3.6.2 Cost Analysis 53

3.7 PHASE VI: Modeling for Designed System and Validation of the Model ........ 54

3.7.1 Fabrication of Prototype 54

3.7.2 Programming for Arduino Uno Microcontroller 57

3.7.3 Validation of the Model 58

3.8 Summary ......................................................................................................... 59

CHAPTER 4: RESULTS AND DISCUSSION 61

4.1 Introduction ..................................................................................................... 61

4.2 Procedures ....................................................................................................... 61

4.3 Results and Data Collection ............................................................................. 63

4.4 Summary of Project Outcome .......................................................................... 75

CHAPTER 5: CONCLUSION AND RECOMMENDATION 77

5.1 Conclusion ...................................................................................................... 77

5.2 Recommendation ............................................................................................. 78

REFERENCES 79
vii

APPENDICES 83

APPENDIX A: Solar Panel Specs by JA Solar for Proposed System 84

APPENDIX B: Arduino Coding for Solenoid Valves 85


viii

LIST OF TABLES

Table No. Page


2.1 Bench marking for all authors 24
Mean daily percentage of annual daytime hours for different
3.1 34
latitudes
3.2 ANNEX II Conversion table of mm/day into l/s/ha 37
3.3 Condition of Lemon Myrtle Leaves 38
3.4 Function of each pin for Bluetooth Module 50
3.5 Price list for each item to build a prototype of the system 53
3.6 Work instruction for Arduino Coding 57
4.1 Weight for Each Volume of Water 63
4.2 Reading 1 65
4.3 Reading 2 67
4.4 Reading 3 69
4.5 Reading for Validation 71
ix

LIST OF FIGURES

Figure No. Page


2.1 Smart Irrigation System 7
2.2 Water Drip Irrigation System 8
2.3 5000 Series Centre Pivot Irrigation System 8
2.4 Basin Irrigation Method 9
2.5 Schematic diagram of PV solar panel system 10
2.6 Schematic diagram of solar thermal system 11
2.7 Complete solar water pump system 12
(a) Tomato modelled irrigation system and (b) Climatic regions
2.8 13
in United States
2.9 Comparison of irrigation schedules 14
2.10 Overall System Circuit for Automatic Irrigation System 15
2.11 General Configuration of the control system 16
2.12 Flowchart for the irrigation system of green house 17
2.13 Construction pipeline of the system 18
2.14 Method of Operation of the system 19
Components Used in UAV-Based Remote Sensing for
2.15 20
Precision Agriculture
Unplowed parcel (left) and the result after pre-processing step
2.16 21
(right)
2.17 Orthomosaic or Orthophoto of a vineyard 22
3.1 Methodology Flow Chart 26
3.2 Cross-section of PV Solar Array 27
3.3 Cross-section of Flat Plate Collector 28
3.4 JAM72S09/PR Module 29
3.5 Crop plantation at MARDI Serdang 31
3.6 Blaney-Criddle Method 32
3.7 Crop water need 35
x

3.8 Weather data from Accuweather 36


3.9 Leaf A1 38
3.10 Leaf A2 39
3.11 Leaf A3 39
3.12 Leaf A4 39
3.13 Leaf A5 39
3.14 Parrot Disco FPV 40
3.15 Layout for irrigation system 41
3.16 Microcontroller and solenoid valves for each zone 42
3.17 Piping system from water tank to pipelines. 42
3.18 Flow process of drone monitored-irrigation system 44
3.19 Overall circuit system for solenoid valves controller 45
3.20 Schematic View of microcontroller circuit 46
3.21 Arduino Uno Rev. 3 47
3.22 LM2596 Power Supply Converter Module 47
3.23 2 Channels 5V Relay Module 48
3.24 12V solenoid valve 49
3.25 HC-05 Bluetooth Module 50
3.26 Arduino starter kit 51
3.27 PVC Pipes and pipe fittings 52
3.28 Plastic dustbin as water tank 52
3.29 Soldering solenoid valve pins 54
3.30 Blowing hot air to heat shrink 55
3.31 Assembly of circuit system 55
3.32 Using multimeter to check for voltage into Arduino 55
Piping system that will be connected to water tank and solenoid
3.33 56
valves
3.34 Complete set up of prototype for irrigation system 56
3.35 Arduino Coding for Solenoid Valves Controller 58
xi

Data obtained from temperature and moisture sensor and how


3.36 59
much water will be supplied according to time
4.1 Initial weight of water container before tare weight is set 61
4.2 New reading after tare weight has been set 62
4.3 1L of water 63
4.4 2L of water 63
4.5 3L of water 64
4.6 4L of water 64
4.7 5L of water 64
4.8 Time taken for 2L of Reading 1 65
4.9 Time taken for 3L of Reading 1 65
4.10 Time taken for 4L of Reading 1 66
4.11 Time taken for 5L of Reading 1 66
4.12 Time taken for 2L of Reading 2 67
4.13 Time taken for 3L of Reading 2 67
4.14 Time taken for 4L of Reading 2 68
4.15 Time taken for 5L of Reading 2 68
4.16 Time taken for 2L of Reading 3 69
4.17 Time taken for 3L of Reading 3 69
4.18 Time taken for 4L of Reading 3 70
4.19 Time taken for 5L of Reading 3 70
4.20 Time taken for 2L of validation 71
4.21 Time taken for 3L of validation 71
4.22 Time taken for 4L of validation 72
4.23 Time taken for 5L of validation 72
4.24 Graph for Reading 1 73
4.25 Graph for Reading 2 73
4.26 Graph for Reading 3 74
4.27 Graph for Testing of the Coding for Validation 74
A.1 Technical Specifications for JAM72S09 Solar Panel 84
CHAPTER 1

INTRODUCTION

1.1 Background

Irrigation is an application of using controlled volume of water to land or crops to help the
growth of the plant by using channels but there are few problems relating to irrigation
system which are specific amounts of water supplied to the crops and improper watering
schedule. So, a new adaptive smart irrigation system using microcontroller is introduced to
cope with this issue. This chapter will discuss on the methodology used to design this
project and finally validate the methodology by doing simulation. Microcontrollers
designed for irrigation system will be used to integrate with drone that captured image of
the crop and water pumping system from tank to the crop for examples, if there are two
lanes that are dry and need water, the pumping system will deliver water through pipe or
channel for certain period of times and volumes according to condition of the plants. This
chapter also includes overall system for the irrigation which consist of storage tank,
microcontroller, control valves, pumps and pipe in a schematic diagram. Proposed system
will use Arduino as the microcontroller and sensors will be used in the closed-loop system
to control the water level and control opening and closing of valves.
2

1.2 Problem Statement

Most of modern irrigation system usually utilized excessive amount of waters so it is


important to optimize the use of water. Excessive used of water, is mainly due to water is
always pumped out without considering the condition of the plant. Some plant that are
healthy and have enough of water does not need excess water but due to water is always
pumped out, this might affect the condition of the healthy plant such as the roots can rot
and plant cannot get enough oxygen because roots cannot absorb oxygen. Hence, this
condition will result the plant to wilt even the soil is wet. Therefore, this wastage use of
water can be reduced and optimized with real time monitoring by drone to control the flow
of water in irrigation system.

In other case like insufficient supply of water, this might cause the plant to wilt. It
is more important for growth of small plant to grow because they need enough water supply
to grow. Production of the plant will drop due to plant becoming dry. As plant become
drier, their roots may become weak and this make plant more vulnerable to diseases and
damage from pests.

This issue often leads to the consequences of both direct effect and indirect effect
such as altered the river flows, lowered groundwater levels and socioeconomics effect.
Furthermore, use of energy to flow the water need to be considered in irrigation system to
save cost and eco-friendly. Hence, use of renewable energy such as solar energy is
important to solve energy usage problems.
3

1.3 Objective

In this project research, a few objectives are set to be achieved:

I. To investigate and analysis current irrigation system and use of microcontroller.

II. To design an integrated microcontroller for solar powered irrigation system, which
is eco-friendly.

III. To study the output which amount of water supplied and provide solutions in
optimizing the used of water for irrigation in maintaining lemon myrtle health.

1.4 Work Contribution

If solar powered irrigation system is to have stronger role in plantation, we need to consider
the amount of water used to avoid wastage and preserve the soil fertility at the same time.
Hence, solution proposed involves the use of drone and microcontroller into irrigation
system. The solar irrigation system with embedded micro will help in:

I. Reducing excessive use of water for the plantation.

II. Lowering costs for farmer since the system is powered by solar energy.

III. Save energy of manpower for monitoring the crop field.

IV. Introduce farmer with microcontroller in agriculture.

V. Optimized and improvised current control system used in agriculture especially for
irrigation system.
4

1.5 Thesis Outline

In this chapter, objectives have been identified in order to determine this project is succeed
or not. Study of related background will be conducted to see how others implement the
irrigation system and how they utilized microcontroller and drone in agriculture.
Methodology that includes every phase for this project will be explained briefly to show
some information of what kind of tools or method that need to be used for designing
microcontroller and to calculate volume of crop water needs. First phase will be study on
how PV solar works and selection will be carried out to relate with this project. Next phase,
parameter which is amount of water supply will be thoroughly determine and calculated
for the system. In Phase III, system will be design by using computer software prior to hand
sketch. Materials needed to simulate this project also has been listed including with the
price to calculate cost required to build a prototype for this system. Finally, modeling will
be done for system and validation will be carried out to study the model working principle.
CHAPTER 2

LITERATURE REVIEW

2.1 Introduction

Irrigation has been widely used since few centuries back with different methods in different
countries. Irrigation is important in maintaining crops health in optimum condition and
making sure there is no water loss or excessive water for crops. Furthermore, there have
been a lot of technologies invented in helping irrigation performing better by using sensor
and microcontroller compared to traditional method which is depending on human being
to operate. Time and energy can be saved with the aid of microcontroller which does not
required any manpower. Next, unmanned aerial vehicles (UAV) have been widely used to
help farmer in agriculture by providing pictures that contain information of the crops.
Various ways of methods and result from different papers would be used here as references.
6

2.2 Background of Related Works

2.2.1 Irrigation System

Irrigation is an application of supplying land with water at needed intervals according to


the condition of the plants. Irrigation is important to plant as the system supplied water and
at the same time, irrigation is important in:

I. Maintaining the condition of the soil from deterioration and preserve the value of
the land.
II. Reducing irrigation time, effort and labor costs.
III. To reduce excessive amount of water used.
IV. Increase production of crops.

There have been a lot of methods of irrigation introduced and improvised in order
to fulfil farmers requirement and maintaining our ecosystem at the same time. Method of
irrigation can differ according to the places, climates and type of plants planted. Based on
this paper and research done in India, irrigation system is crucial due to India has three
seasons that are not constant and unpredictable. In India, the rainfall is not uniform
throughout the country. Hence, a proper water management and irrigation are necessary in
tackling this issue. Few methods of irrigation have been introduced such as:

a) Smart Irrigation

With the aids of electronic sensor and devices such as computer vision, solar panel,
electronic circuit and wireless network of sensors, automatic irrigation system can be
introduced. The system illustrated below are designated to help farmers either they are
in field or away from field. Farmers can gain information and monitor changes in their
field [1]. This process will take less time and cost-effectively.
7

FIGURE 2.1 Smart Irrigation System [1]

b) Sprinkler irrigation

Sprinkler irrigation or also known as overhead irrigation system work with sprinkler
or gun to distribute water and water flowed in pipe is located to one or more central
locations within the field. Sprinkler irrigation consist of perforated pipe, nozzle
lines, sprinkler and pump.

c) Drip irrigation

Drip irrigation is also known as trickle irrigation or micro-irrigation. This method


can help in saving water consumption and fertilizer by allowing water to drip slowly
through perforations in pipes or by nozzles directly onto root zone to irrigate a
limited area around the plant. Figure 2.2 shows components used in this method
include pump unit, control head, main and sub mains line, laterals, emitter and
valves.
8

FIGURE 2.2 Water Drip Irrigation System [1]

d) Centre pivot

Centre pivot or in other name as waterwheel and circle irrigation is a method which
the crops are watered with sprinkler and equipment rotates around a pivot. The system
comprises of pipes joined together and supported by trusses, mounted on a wheeled
tower and it works in circular pattern. Centre pivot irrigation use less manpower than
many other surface irrigations since the system does not required digging of channels.

FIGURE 2.3 5000 Series Centre Pivot Irrigation System [2]


9

e) Surface irrigation

Surface irrigation is the easiest and least complex method of irrigation. Few things
need to be considered before introduced the method such as characteristics of
plants/crops, types of soil and properties and slop of field. Water is supplied from main
source such as river, lake into the field by using pipe. Since this method consume high
amount of water, water management is vital to optimize the use of water. There are
four types of surface irrigation such as basin irrigation, border irrigation, furrow
irrigation and wild irrigation.

FIGURE 2.4 Basin Irrigation Method [3]

Solar energy is a power generation method that converts energy from the sun into
electricity. It uses solar panels that facilitate a reaction that convert sun’s light radiation
into electricity. Solar energy also contributes in agriculture sector for example to generate
electric for pump. Development of solar powered irrigation technologies or methods have
become significant this past decade. There are two types of solar driven irrigation system
which are Photovoltaic (PV) Irrigation Systems and Solar Thermal Irrigation Systems.
10

The schematic diagram shown in Figure 2.5 is a proposed solution for retrieving
underground water for irrigation by using PV solar panel. Working principle of this system
is PV panel will produce electricity from solar energy which is then used to drive a pump
by using an electric motor. Lower costs of PV panel technology and Lithium Ion batteries,
easy integration with available technology, and rapid commercialization in recent times are
factors why PV irrigation system have become more accessible to rural farms and a great
deal of studies has been conducted into their efficiency, achievability and financial
viability. However, there are some issues with PV technology such as the manufacturing
process cause a higher threat to the environment compared to other renewable energy
technologies. Transportation for the PV and the use of batteries also increase carbon
footprint of the technology. Finally, dust always accumulate on PV also is another issue
that might be a backlash for the technology.

FIGURE 2.5 Schematic diagram of PV solar panel system [4]

Figure 2.6 illustrated Schematic of solar thermal water pumping system for remote
rural areas of Sub Saharan Africa [4]. Solar thermal system use energy from sun using a
solar collector or a solar concentrated surface to generate mechanical work with the help of
Rankine, Brayton or Stirling cycle engine. Electricity are converted from the mechanical
work to power pumps for irrigation. Pros of this technology is this system are cheaper and
easier to manufacture. Local construction will further reduce the cost as well as carbon
footprint of the system. Some issues related to this technology are storage of thermal energy
11

is much more complicated when compared to storage of electricity. Selection of direct


mechanical drive or conversion to electrical power also depending on location factors and
irrigation scenarios. There is not much real live testing of this technology for irrigation.

FIGURE 2.6 Schematic diagram of solar thermal system [4]

In a lot of places, solar water pumps are proven to be the most optimal choice for
irrigation system because it is independent and no need to worry about electric supply to
power the system. For solar powered water pump systems, it is preferable to use DC power
compared to AC power because AC power needs constant voltage as well as frequency to
run smoothly. Furthermore, DC power can be used in solar water pumps as it is able to
function even under imperfect sunlight conditions. Solar pump that uses AC power supply
required steady voltage to run the pump smoothly and required sufficient power to supply
water throughout the time compared to DC power. While, DC power can help device
working on unsteady voltage and current. There are three elements which are pump, pump
controller and array. below is a diagram for complete solar water pump system.
12

FIGURE 2.7 Complete solar water pump system [5]

Intelligent irrigation is a sustainable solution that reduces water source required and
harmful environmental impacts due to irrigation. Further studies on implementation of
intelligent irrigation conclude that intelligent irrigation can maintain crop yields while
reducing amount of water use. Studies by Brooke Mason et. al. utilized Crop Water and
Irrigation Requirements (CROPWAT), a decision support system by Food and Agriculture
Organization (FAO) to calculate crop water and requirement for irrigation using data from
user such as crop, soil and climate data.

In the study, tomato is used as a model for CROPWAT because tomato is sensitive
to water stress [6]. There were two scenarios that make scheduling irrigation became vital
which are insufficient irrigation that can bring down crop yield and quality while over-
irrigation might lead to other negative effects such as crop tends vulnerable to diseases,
cost for pumping water and environmental pollution due to nutrients discharge.
13

An alternative to counter this issue is by using software of an intelligent irrigation


system that can optimized irrigation schedule by apply water at the appropriate time.
CROPWAT method has been used to approximate crop performance under numerous
irrigations for a different crops and climates. CROPWAT provides a set of parameters to
compare irrigation schedules. The parameter chosen is total irrigation to compare the
conventional and intelligent irrigation.

FIGURE 2.8 (a) Tomato modelled irrigation system and (b) Climatic regions in United
States [6]

Based on Figure 2.8, the model of irrigation system is for nine climatic regions in
United States and consist of soil moisture sensor and controllable valves. Two parameters
were set which are water usage and reduction of crop yield. Soil moisture is detected by
sensor and the reading is sent to microcontroller. Microcontroller will decide either to open
or close the solenoid valve when sensors read minimum and maximum setpoints.

Figure 2.9 shows comparison between intelligent and conventional irrigation


schedules that differ from region to region. Different climate regions lead to different
irrigation application such as for all climate regions except for Salt Lake and Sacramento,
lesser intelligent irrigation applications occurred. These two states are different because
they have low humidity, hot temperatures and few rainfalls cause them to irrigate more
frequent.
14

Besides, seasonal requirement also affect irrigation where some states only irrigate
in the summer just to meet crop water needs with precipitation only. Meanwhile, some state
only irrigates in late spring and summer. But there is one state that required irrigation
throughout all three seasons which is Salt Lake.

FIGURE 2.9 Comparison of irrigation schedules [6]


15

2.2.2 Usage of Microcontroller

Microcontroller also applicable and widely used in agriculture especially in irrigation


system to control the process of supplying water to plant by aids of sensor and
programmable computer chip. Microprocessor can solely run the operation for irrigation
system without using manual involvement of persons.

Based on this research by Aderemi A. Atayero and Adeyemi S. Alatishe, they used
micro controller to maintain the soil moisture to always be in a certain range that favorable
for proper crop development. Their main concern is to control and make sure to not over-
supply water and water is adequate for the crops to absorb nutrients and grow well. Figure
Figure 2.10 shows an overall system of the automatic irrigation system that consist of
control unit, display unit, sensor unit, etc.

FIGURE 2.10 Overall System Circuit for Automatic Irrigation System [7]
16

To reduce the wastage of water, some design and development for irrigation method
should be devised and or adopted. This paper written by author; Shehzar S Sheikh has
proposed a design for solar based irrigation system by using microcontroller. There are four
sensors used in the proposed design which are wind speed, ambient temperature, humidity
and radiation sensors by taking soil moisture as references. These sensors work with
Arduino as the most used microcontroller shown in Figure 2.11.

The microcontroller is designed on the aggressive and non-aggressive model that


are efficiently reacts to small changes/variations in sensors value [8]. Microcontroller will
perform decision for the DC Pump when output values of four sensors are transferred.
Software interface for the system is based on Arduino coding that will provide change in
ratios of sensors input to microcontroller. All the sensors are integrated with Arduino in the
field will transmits radio signals to the receiver and receiver is used to monitor and display
output signals. The output signals further will be used for observation when it is converted
into a require form i.e, analog and digital readings.

FIGURE 2.11 General Configuration of the control system [8]


17

Based on this journal by M. Al-Kofahi and others, microcontroller is used to


automate the green house that consist of monitoring and controlling light intensities,
moisture of soil and its PH, and temperature. Microcontroller that consist of Arduino Mega
2560 R3 is used to monitor and control all parameters desired and to collect data.

Arduino Mega as microcontroller helps to reduce regular maintenance during


operating the green house and even increase growth rate of existing plants. Arduino is
responsible to enable delivery of water works effectively to the plant in the green house.
The microcontroller controls the mechanism of the solenoid valves which to open or close
with the aid of sensor such as moisture sensor. This helps to optimize water usage in the
green house while still enable water delivered to desired zone or plants [9].

Figure 2.12 is flowchart of the working principle for irrigation system of the green
house. During the water supply, only one zone the solenoid valve will be opened for certain
period of times before it proceeds to other zones. This is to guarantee right amount of water
is delivered during the opening. This mechanism is depending on reading from moisture
sensor that integrate with Arduino Mega under few conditions.

FIGURE 2.12 Flowchart for the irrigation system of green house [9]
18

Based on study by Anisha et. al, more than 4 billion people in the world are
experiencing shortage of water. An idea was proposed which aims is to conserve water by
introducing a control system that can decrease water rate at a house outlet after a certain
volume. Based on the idea, they come up with an electronic device that purposely to control
water flow by using microcontroller, solenoid valve, flow meter sensor and others. Figure
2.13 shows the flow for the system.

FIGURE 2.13 Construction pipeline of the system [10]

All the components will be installed between pipeline to restrict water flow which
can prevent excessive used of water and reduce wastage. Water flow sensor is installed to
monitor the amount of water flowing through the pipeline and then send the data to
microcontroller Arduino Leonardo which will control the solenoid electro-valve.

The flow meter can control the output of the solenoid valve according to input
obtained. If the usage of water has reached the limit, microcontroller can carry out its
purpose which to control solenoid valves. Hence, resulting in slower flow of water.
Consumer will receive the data from microcontroller via Bluetooth which will be displayed
on LCD screen. This proposed idea shown in Figure 2.14 is to meant to solve the challenge
of water conservation in urban areas. This idea perhaps can educate user to always use
water wisely and can help in preserving water in future.
19

FIGURE 2.14 Method of Operation of the system [10]

2.2.3 Drone Usage in Agriculture

Unmanned aerial vehicles (UAV) has been widely used in agriculture especially for
Precision Agriculture (PA). UAV can carry multiple sensors to carry out their jobs
depending on type of jobs. Based on Figure 2.15, few technologies are used to produce a
remote sensing components for crop scouting, yield mapping, field boundary mapping, soil
sampling and soil property mapping, weeds and pest control and mapping [11].
Furthermore, these technologies capable of providing live data from different sensors for
example multispectral, Near-Infrared (NIR), Light Detection and Ranging Data (LiDAR)
at precise resolution measure as centimeter per pixel. Crop health assessment can be
monitor from information obtained by the devices. Furthermore, with the use of sensors
such as RGB Camera, NDVI camera and multispectral sensors, the drone can do an aerial
scanning then identify temporary and spatial reflectance variations before can be detected
with naked eyes. Traditional scouting somehow does not effective much since it requires
expert knowledge and post-processing lab equipment to provide information but with the
help of remote sensing devices, time and costs can be saved.
20

FIGURE 2.15 Components Used in UAV-Based Remote Sensing for Precision Agriculture
[11]

In these past decades, demands for developments and researches about the use of
Unmanned Aerial Vehicles (UAV) have risen. A lot of advantages can be obtained from
UAV especially in agriculture industry. To analyze and assess the correct production and
usage of resources employs optical and multispectral techniques applied to photos, the most
common method is by using satellites and held by hand but if the analysis is done
frequently, more time will be consumed [12]. Based on Figure 2.16, on the left side is
unplowed parcel and the result obtained from software Asus Xtion Pro Sensor using RGB-
D sensor. Values calculated for the plain field is the lowest compared to 25cm field and
50cm field. This method can be used to analyze soil characteristics. In the future, they are
focusing on the installation of the sensing component on a UAV and make some
improvement on current existing drone to have higher flying distance and can scan bigger
areas.
21

FIGURE 2.16 Unplowed parcel (left) and the result after pre-processing step (right) [12]

Drones are believed to have a big role in agriculture sector. These are because
drones can monitor several aspects of farming such as aerial mapping, taking clear image
of total size of the crop field, showing possibly underutilized areas of land which humans
cannot achieve on their own [13]. This paper looks at the potential benefit of drones in
agriculture sector and their limitations during performing tasks. Some problems faced by
farmers are they cannot monitor all farm activities for the whole time so this might lead to
some parts of land will be neglected and avoidable expenses to alter it. Some factors such
as cost of drones, features of drone, power source, flight time and range might affect the
use of drone by farmers.
22

FIGURE 2.17 Orthomosaic or Orthophoto of a vineyard [13]

Figure 2.17 is example of vineyard that has been surveyed by using drone and white
squares in the picture is taken by done and have been stitched together with the help of
software to show the entire vineyard as one map. The processed photo or data later can be
viewed using Aerobotic’s website. This orthophoto can give true distance measurement
because it is an actual representation of the Earth’s surface. As conclusion, drones can view
a land at closer range with its camera and more accurate to monitor a farm than monitoring
by foot.
23

2.3 Summary from Background Work Gaps

Benchmarking was done with comparison between different authors. There are some gaps
that have been identified:

i. Few works did not establish their schematic diagram of the system. A diagram will
help readers to understand more on how the system will be look like on real life
application.

ii. Some authors did not use simulation on their research, typically for gathering data
and coding of the system in order to determine working principle of the system and
to study how error happened.

iii. Only few works proposed to use microcontroller in their system such as Arduino
Uno, Arduino Mega and Raspberry Pi.

iv. Most of the research did not implement formulas for calculation in their work
24

2.4 Bench Marking

Table 2.1 shows the difference between the patented works in literature review on method
of irrigation, use of microcontroller and use of drone in agriculturesome related factors of
each research and the difference between them. The aim of this research is to achieve all
factors available.

TABLE 2.1 Bench marking for all authors

Author/ Product/ Company F1 F2 F3 F4

Anisha et al. √ √ √

Saeed Mohammed Wazed et al. √

Shehzar S Sheikh et al. √ √ √ √

Aderemi A. Atayero and Adeyemi S. Alatishe √ √ √

Redmond Ramin Shamsiri et al. √ √ √ √

Paolo Tripicchio and Massimo Satler √ √ √

Marthinus Reinecke and Tania Prinsloo √

Brooke Mason et al. √ √ √ √

M. Al-Kofahi et al. √ √ √

Izzat Malak √

Amruta S. Jondhale et al.

Muhammad Luqman Syakir Rosli √ √ √ √

F1 Methodology: Schematic diagram of system


F2 Methodology: Simulation of the system using software
F3 Hardware: Type of sensors used
F4 Implementation of formula
25

2.5 Summary

Literature review on three different type of subjects were done, which are the methods of
irrigation systems and solar irrigation system, use of PID controller in agriculture, and use
of drones in agriculture. Different methods of irrigation were discovered in the past, with
different working principle. Every method of irrigation has it specified task for different
type of vegetables or plants. Solar driven irrigation system also has been reviewed to study
how it works. Next, there have been a lot of researches and development in few past years
to fully utilized PID controller in agriculture. PID controller has a lot of contributions in
agriculture sector specially to minimize excessive use of water by controlling pumping
system and increase crop production. Further literature reviews were also done in detail, by
studying the features available in Unmanned Aerial Vehicles (UAV) which is drone in
agriculture sector. The studies of drone included, type of software used, feature of the
drone, sensor used in drone for precision agriculture and also factors influenced in using
drone for agriculture.
CHAPTER 3

METHODOLOGY

3.1 Introduction

This chapter explains every detail of processes that need to be carried out in order to
complete this project. Figure below shows methodology in phase for this project. For
designing system of the irrigation system, Solidworks is used to generate 3D model to
represent the system. For microcontroller, Arduino Ide and Fritzing are used to do coding
and drawing schematic diagram of the circuit system.

FIGURE 3.1 Methodology Flow Chart


27

3.2 Phase I: Selection of Solar Panel Used

3.2.1 Solar Energy Conversion Process

Solar energy is the most available resource of renewable energy compared to others like
biomass, wind turbine, hydroelectric, etc. It is because sun provide an unlimited energy
source that does not strip the landscape or damage the ozone layer. Unlike fuel, solar
energy produces no harmful emission that might affect the quality of air, water and soil.
There are two types of solar energy conversion which are solar thermal and solar
photovoltaic.

Certain materials can absorb light photons and release electron, which is called a
photoelectric effect. Sunlight are converted directly by photovoltaic cells without using
any mechanism. Solar photovoltaic works based on principle of semiconductor technology
which electricity will flow when two semiconductors such as selenium and silicon are in
contact and exposed to light.

FIGURE 3.2 Cross-section of PV Solar Array [14]


28

Figure 3.2 shows close-up of a PV cell solar energy. When sunlight enter, P-type
semiconductor (positive) silicon tends to abandon electrons and acquire holes whereas N-
type semiconductor (negative) accept electrons. Photons present in sunlight that hit the cell
will excite some of electrons in the semiconductors to become electron-hole pairs and
induced to separate due to presence of internal electric field. Then, the electrons will go to
negative electrode and holes move to positive electrode. As a result, there will be electric
current generated through conducting wire in a series that connects negative electrode, load
and positive electrode.

Meanwhile, solar thermal energy used a collector to absorb heat from sunlight and
will heat fluid. Heated fluid will produce a steam which powers a generator to generate
electricity. It is same to how fossil fuel plants are operated with the exception of steam; the
energy gathered is generated rather than combustion of fossil fuels.

Figure 3.3 is flat plate collector which works by absorbing solar radiation comprise
of an insulated outer metallic box. Inside, there are absorber sheets with black color which
it purposes to absorb heat and then built in tubes to carry water. Heat absorbs from solar
radiation are transferred to flowing water which then will be used to move mechanical
work components such as Rankine, Brayton or Stirling Cycle engine. Electricity can be
generated from the mechanical work converted to power other components such as pump.

FIGURE 3.3 Cross-section of Flat Plate Collector [14]


29

For this project, 72-Cell Mono PERC Module by JA Solar will be used to harvest
and generate energy from solar. The rated maximum power is 395W and can reach
maximum efficiency of 20% [15]. Technical specs of the solar module are attached as
appendix.

FIGURE 3.4 JAM72S09/PR Module [15]


30

3.3 Phase II: Parameters Identification

3.3.1 Volume of Water Needed for Irrigation

Crop water need (ET Crop) is defined as the amount of water needed to meet water loss
through evapotranspiration or basically amount of water needed by various crops to grow.
There are few considerations that need to be considered to determine crop water need such
as:

I. Climate: Crops need more water per day in a hot climate compared to cloudy and
cool climate.

II. Crop type: Crops like sugarcane need more water than crops like millet

III. Growth stage of the crop: matured crops need more water than crops that have just
been planted.

There are few climatic factors that affect volume of crop water needs which are:

I. Sunshine

II. Temperature

III. Humidity

IV. Windspeed

For this project, the crop plant is Lemon Myrtle (Backhousia Citriodora) which
basically a flowering plant, native to Australia. This plant can grow up to 8m [16]. Color
of the leaves are evergreen, long and wider in the middle shape. The flowers produced by
this plant are creamy white. This plant is used in various industries such as [17]:
31

I. Food: To prepare tea blends, biscuits, breads, syrup, flavored oils

II. Skincare: Lotions, lip balms

III. Perfume

IV. Hair care products: Shampoo and conditioners

V. Medicine: To cure sore throat, asthma, insect bites

This plant is widely used in Australia for cooking and healing. This crop farm is
about 6mX6m area located at MARDI, Serdang.

FIGURE 3.5 Crop plantation at MARDI Serdang

If the weather is sunny (no clouds) or hot, crop water needs is high and during
cloudy (no sun) weather, crop water needs is low, so this factor need to be considered to
control water flow. Next, crop water needs will become high when the humidity of crop
area is low (dry) but if humidity of crop area is higher, amount or volume of crop water
needs will drop thus only less volume of water is needed to supply to crop. Hot temperature
32

will consume more water than low temperature. If crops are located at an area with high
windspeed (windy), crop water need is higher compared to crops located an area with slow
windspeed which require low crop water need. In conclusion, the greatest demands for
plant water are discovered in warm, dry, windy and sunny regions. When it is cool, wet
and cloudy with little or no wind, crop water needs are low.

Reference crop evapotranspiration (ETo) give climate’s influence on crop water


needs. Unit for ETo is millimeters per unit of time e.g. mm/day or mm/month. Reference
crop used is grass.

ETo is evapotranspiration rate from a big region covered by green grass, 8 to 15cm
tall, which grows actively, shades the ground entirely and is not short of water. Figure
below illustrates ETo definition. There are two methods to determine ETo which are
experimental by using evaporation pan and theoretical by using governing equation which
is Blaney-Criddle method.

FIGURE 3.6 Blaney-Criddle Method [18]


33

For this project, theoretical method is used to calculate ETo that will be used to
determine crop water needs. Blaney-Criddle method is straightforward, only use measured
data on temperature. The equation is:

𝐸𝑇𝑜 = 𝑝(0.46𝑇𝑚𝑒𝑎𝑛 + 8) (Equation 3 – 1)

Which.

I. 𝐸𝑇𝑜 : Reference crop evapotranspiration (mm/day)

II. T𝑚𝑒𝑎𝑛 : mean daily temperature (°C)

III. 𝑝: mean daily percentage of annual daytime hours

To determine T𝑚𝑒𝑎𝑛 ;

𝑇𝑚𝑎𝑥 −𝑇𝑚𝑖𝑛
𝑇𝑚𝑒𝑎𝑛 = (Equation 3 – 2)
2

𝑠𝑢𝑚 𝑜𝑓 𝑎𝑙𝑙 𝑇𝑚𝑎𝑥 𝑣𝑎𝑙𝑢𝑒𝑠 𝑑𝑢𝑟𝑖𝑛𝑔 𝑡ℎ𝑒 𝑚𝑜𝑛𝑡ℎ


𝑇𝑚𝑎𝑥 =
𝑛𝑢𝑚𝑏𝑒𝑟 𝑜𝑓 𝑑𝑎𝑦𝑠 𝑜𝑓 𝑡ℎ𝑒 𝑚𝑜𝑛𝑡ℎ

𝑠𝑢𝑚 𝑜𝑓 𝑎𝑙𝑙 𝑇𝑚𝑖𝑛 𝑣𝑎𝑙𝑢𝑒𝑠 𝑑𝑢𝑟𝑖𝑛𝑔 𝑡ℎ𝑒 𝑚𝑜𝑛𝑡ℎ


𝑇𝑚𝑖𝑛 =
𝑛𝑢𝑚𝑏𝑒𝑟 𝑜𝑓 𝑑𝑎𝑦𝑠 𝑜𝑓 𝑡ℎ𝑒 𝑚𝑜𝑛𝑡ℎ
34

To determine mean daily percentage (p) of annual daytime hours for different
latitudes, Table 3.1 is used for this project. MARDI site’s latitude is 2.987272 N so use
latitude for 5°.

TABLE 3.1 Mean daily percentage of annual daytime hours for different latitudes [18]

North Jan Feb Mar Apr May June July Aug Sept Oct Nov Dec
Latitude
South July Aug Sept Oct Nov Dec Jan Feb Mar Apr May June

60° .15 .20 .26 .32 .38 .41 .40 .34 .28 .22 .17 .13

55° .17 .21 .26 .32 .36 .39 .38 .33 .28 .23 .18 .16

50° .19 .23 .27 .31 .34 .36 .35 .32 .28 .24 .20 .18

45° .20 .23 .27 .30 .34 .35 .34 .32 .28 .24 .21 .20

40° .22 .24 .27 .30 .32 .34 .33 .31 .28 .25 .22 .21

35° .23 .25 .27 .29 .31 .32 .32 .30 .28 .25 .23 .22

30° .24 .25 .27 .29 .31 .32 .31 .30 .28 .26 .24 .23

25° .24 .26 .27 .29 .30 .31 .31 .29 .28 .26 .25 .24

20° .25 .26 .27 .28 .29 .30 .30 .29 .28 .26 .25 .25

15° .26 .26 .27 .28 .29 .29 .29 .28 .28 .27 .26 .25

10° .26 .27 .27 .28 .28 .29 .29 .28 .28 .27 .26 .26

5° .27 .27 .27 .28 .28 .28 .28 .28 .28 .27 .27 .27

0° .27 .27 .27 .27 .27 .27 .27 .27 .27 .27 .27 .27
35

After we have calculated ETo , we can obtain ETcrop , crop evapotranspiration or


crop water need by using this formula:

𝐸𝑇𝑐𝑟𝑜𝑝 = 𝐸𝑇𝑜 × 𝐾𝑐 (Equation 3 – 3)

Where.

- 𝐸𝑇𝑐𝑟𝑜𝑝 : Crop water need (mm/day)

- 𝐾𝑐 : Crop factor

- 𝐸𝑇𝑜 : Reference evapotranspiration (mm/day)

FIGURE 3.7 Crop water need [18]

There are two scenarios for this project in order to irrigate Lemon Myrtle which:

3.3.1.1 Continuous supply of water

In this scenario, volume of water needed to irrigate has been calculated by previous
formula stated above by using theoretical method of Blaney-Criddle.

𝑇𝑚𝑎𝑥+𝑇𝑚𝑖𝑛
a) To get 𝑇𝑚𝑒𝑎𝑛 = using October weather where;
2

34 × 12
• Tmax = = 13.16
31

31 ×3
• Tmin = =3
31
36

13.16+3
• Tmean = = 8.08
2

• Data for October’s weather is from:

FIGURE 3.8 Weather data from Accuweather [19]


37

b) To calculate 𝐸𝑇𝑜 = 𝑝(0.46𝑇𝑚𝑒𝑎𝑛 + 8) where:

• p is from TABLE : 0.27 for Latitude 5° and October

• 𝐸𝑇𝑜 = 0.27 (0.46(8.08) + 8)

= 3.16

c) 𝐸𝑇𝑐𝑟𝑜𝑝 = 𝐸𝑇𝑜 × 𝐾𝑐 where:

• 𝐾𝑐 for lemon myrtle is 0.7 (assumption as lemon myrtle is citrus)

• Hence, 𝐸𝑇𝑐𝑟𝑜𝑝 = 3.16 × 0.7 = 2.212 𝑚𝑚⁄𝑑𝑎𝑦

• It is then converted to 0.23 𝑙⁄𝑠 per hectare according to this table:

TABLE 3.2 ANNEX II Conversion table of mm/day into l/s/ha [20]

mm/day l/s/ha l/s/ha mm/day


2 0.23 0.2 1.7
3 0.35 0.3 2.6
4 0.46 0.4 3.5
5 0.58 0.5 4.3
6 0.69 0.6 5.2
7 0.81 0.7 6.0
8 0.93 0.8 6.9
9 1.04 0.9 7.8
10 1.16 1.0 8.6
12 1.39 1.2 10.4
14 1.62 1.4 12.1
16 1.85 1.6 13.8
18 2.08 1.8 15.6
20 2.31 2.0 17.3

• To irrigate one zone of 25m², the volume water needed is 5.75x𝟏𝟎−𝟓 𝒍⁄𝒔
38

3.3.1.2 Segregate water supply

Water is supplied once for every 3 days interval to irrigate a zone of 25m² each. This
scenario was based on discussion with Mardi Supervisor who was in charge for Lemon
Myrtle. It is needed to supply few amounts of water according to the color of the leaves
which indicate the health of the leaf for example yellowish green means healthy, green is
slightly dry and dark green is severely dry.

3.3.2 Condition of Lemon Myrtle Leaves

There are few conditions of lemon myrtle leaves that will be taken by drone before it is
being processed then send to microcontroller to control solenoid valves. Few photos were
taken in the field to show the condition of the leaves either they are healthy or severely dry
or totally dry.

Pictures taken were labelled accordingly depending on their condition. These


conditions of the leaves will be the input for the microcontroller either to open valves for
certain time or remains close. below is table of sample pictures taken

TABLE 3.3 Condition of Lemon Myrtle Leaves

No Image Status Input

Some
1 2
dehydration

FIGURE 3.9 Leaf A1


39

No irrigation
2 1
needed

FIGURE 3.10 Leaf A2

Severe
3 4
dehydration

FIGURE 3.11 Leaf A3

Slight
4 3
dehydration

FIGURE 3.12 Leaf A4

Some
5 2
dehydration

FIGURE 3.13 Leaf A5


40

3.3.3 Type of Drone Used

Drone is used for monitoring and capturing lemon myrtle leaves. Besides, drone is
functioning in transmitting data for user which will be send to microcontroller to control
solenoid valves. This used of drone can help saving time and energy needed to monitor
whole crops zone in a short period of time.

A wide area of crops must be covered with a drone that capable of flying with large
radius and have long flying hours. Based on the research of drones available in the market,
Parrot Disco FPV seems able to be used for this project. Furthermore, this drone can be
programmed with Robot Operating System (ROS) to classify each photo of lemon myrtle
leaves according to their condition.

Below are technical specs of Parrot Disco FPV:

i. Speed: 80km/h

ii. Flight time: 45 minutes

iii. Range: Up to 2km

iv. Camera: 15MP

v. Weight: 750g

FIGURE 3.14 Parrot Disco FPV [21]


41

3.4 Phase III: System Design of Irrigation System

3.4.1 Software Design for Actual Irrigation System

Solidworks is used to demonstrate the actual system for irrigation system which consist of
piping system, water tank system and microcontrollers. A square shape is drawn to
represent each zone of crops for irrigation. Figure 3.15 is the overall system for solar
irrigation.

Square shape is chosen because the drone used captured images zone by zone is in
aerial view and categorized them in square shape. For each zone, it has one valve that
control water supply. One microcontroller is used to control 3 valves for 3 zones
simultaneously at the same time.

One tank will supply the water throughout the piping channels to each zone. Tank
is put on higher place to let water flow without using any pump because atmospheric
pressure is enough to push water through pipes.

FIGURE 3.15 Layout for irrigation system


42

Figure 3.16 is close-up view of piping system and solenoid valves with their
controller and below also piping system from tank to distribution pipelines:

FIGURE 3.16 Microcontroller and solenoid valves for each zone.

FIGURE 3.17 Piping system from water tank to pipelines.


43

3.5 Phase IV: Development of Solenoid Valves Controller

3.5.1 Microcontroller for Solar Irrigation System

Microcontroller is a tiny computer on a single integrated circuit that consist of peripherals,


memory and processor that can perform self-controlled system. Microcontroller is
commonly used in industrial control system and a range of other applications requiring
continuous modulation of control such as consumer electronics, engine control unit in cars,
test or measurement equipment and fire-fighting system. Microcontroller is capable in
performing task which to control numerous parameters such as speed, temperature,
moisture, length and pressure and that is why microcontroller is widely used in many
industries.

In this project, it is important to maintain the amount of water supplied to crops


because if crops are having insufficient or excess amount of water, growth of crops might
be disturbed which results in loss of farmers. To overcome this issue, auto irrigation system
is used that which connected with Drone. Microcontroller will give instruction to help
irrigation become more efficient with the help of drone. Furthermore, it is important to
reduce excessive use of water and prevent loss of too much water in irrigation for Lemon
Myrtle because it is sensitive to presence and absent of water. Microcontroller will be used
to control the opening and closing of the valve even though the farmer is not in the field.
44

Figure 3.18 shows process flow of how the system is going to work:

FIGURE 3.18 Flow process of drone monitored-irrigation system

Control loops are commonly used almost everywhere in our daily life such as to
regulate flow, temperature, pressure, level and many other industrial process variables.
Control loops will be used in microcontroller instructions to the valves either to open or
closed depending on the condition. Besides, control loops also favorable to help regulating
the water level in tank.

For this project, few software was used to generate the circuit for microcontroller
which will be fabricate into a workable prototype and to generate coding that will give the
work instructions for microcontroller to the valves.
45

3.5.2 Fritzing

Fritzing is open-source software which help user to develop and design any electrical
circuit. Besides, Fritzing also used by designer to move from testing a prototype to
construct a permanent circuit [22].

During this project, Fritzing is used to design the circuit which connects Arduino
Uno, solenoid valves, AC-DC step down voltage converter module, relay and AC-DC
power supply together. Below is overall circuit system for the microcontrollers that consist
of all components from breadboard view and schematic view.

FIGURE 3.19 Overall circuit system for solenoid valves controller


46

FIGURE 3.20 Schematic View of microcontroller circuit

List of components used and their functions:

3.5.2.1 Arduino Uno Rev. 3 ATmega 328P

Arduino Uno is the third version of microcontroller board from Arduino used to work as
minicomputer for the system which give order to the valve either to open or closed. A
coding will be programmed in the ATmega 328P processor from computer and will give
output through the pins. Arduino Uno is widely known for its feasibility for user to do
programming and used in many industries.

For the connection in Figure 3.19, digital pin 9 and 10 are connected to the solenoid
valves because outputs are delivered from the output pins. For the 5V pin, it is connected
to the relay that will acts as a switch to let the current flow or not.

For external power supply, it is connected to AC-DC step down voltage converter
which to step down the voltage coming from power source to make sure no excessive
voltage flow that might cause the circuit to break down. It is said that Arduino can stay on
for 49 days, so it took a long time to do a replacement [23].
47

FIGURE 3.21 Arduino Uno Rev. 3 [24]

3.5.2.2 Arduino AC-DC Adjustable Step-Down Voltage LM2596 Converter Module

This module is used to regulate and step down the input voltage for Arduino coming from
external power supply that provide high voltage. Without using this module, circuit might
explode.

The voltage can be adjusted by rotating the gold knob. The voltage input ranging
from 4.2V~40V and output voltage is 1.25V~37V. The main chip is LM2596 step down
power module.

FIGURE 3.22 LM2596 Power Supply Converter Module [25]


48

3.5.2.3 Arduino Opto Isolator 2 Channel Way 5V Relay Module

This relay function to connect the microcontroller and valves which control the action of
solenoid valves either to open or close. Based on Figure 3.19, the input for the relay comes
from output pin 9 and 10 of microcontroller. A set of coding will send signal to the pin that
is connected to the relay and then open or close the valve which connected with relay.

It has 4 input pins which are ground (GND), positive supply voltage (VCC),
terminal 1 (IN1) and terminal 2 (IN2) of relay module. 3 outputs are normally closed (NC),
normally open (NO) and common (CO) for each relay.

For the connection between relay and solenoid valve, wire is connected to normally
open (NO) switch because this type of solenoid valve is normally closed. Hence, current
will be sent to the solenoid valve through relay to power on the circuit and open the valve.

FIGURE 3.23 2 Channels 5V Relay Module [26]


49

3.5.2.4 12V Solenoid Valve Normally Close

Solenoid valve is used for this project because it can be controlled with microcontroller
and does not required farmer or user to operate it. By supplying 12V power source to the
pin, the valve will be opened from its original state which is normally close.

In this project, the valve is set to be opened depending on the condition of the plant which:

a) Healthy: Remain close

b) Slightly dry: Supply 2L of water to crops

c) Severely dry: Supply 4L of water to crops

d) Dried: Supply 6L of water to crops

From Figure 3.19, valve was connected with AC-DC power converter because it
required more voltage than Arduino Uno to open the flow. This valve is durable, can
operate in wide range of temperature and suitable for system that used water as medium.

FIGURE 3.24 12V solenoid valve [27]


50

3.5.2.5 HC-05 Bluetooth Module

To build a connection between drone and microcontroller, a Bluetooth module will be used
to transfer the data. The instruction for the valve is depending on the color of the leaves
taken by camera of the drone. Figure 3.25 is the sample of HC-05 Bluetooth module:

Bluetooth is favorable for this project because it is easier to connect and operate
with rather than using Wi-fi module that required complex set up. Furthermore, it has a
range of 9m to connect with drone and it is the cheapest solution for wireless connection.

Besides irrigation, this module also widely used in robotic applications and
engineering applications. There are 6 pins for the module which:

TABLE 3.4 Function of each pin for Bluetooth Module


Pin Name Function
1 Key To switch between Data Mode and AT command mode

2 Vcc To supply 5V power into the module

3 Gnd To connect to the ground

4 TXD Transmit Data

5 RXD Received Data

6 State To show the state of the module when it is connected to LED

FIGURE 3.25 HC-05 Bluetooth Module [28]


51

3.6 PHASE V: Design Analysis

3.6.1 Material Selection and Safety Factor

In this phase, material that will be used to act as a controller are chosen according to
previous invention and research. Most widely used microcontroller is Arduino because it
has a simple coding system and ease user to program based on user requirement.
Furthermore, set up for this microcontroller is considered affordable for a student and for
small scale project. Next, Arduino is proven to have least maintenance because once it is
programmed, the product may work life long.

For this project, an Advanced Starter Kit for Arduino Uno will be used as a
microcontroller for the irrigation system. below is an example of what components
included in the starter kit:

FIGURE 3.26 Arduino starter kit [29]


52

In this research, safety factor is considered not highly important because there is
no cause for stress or load acting on the microcontroller, so stress analysis is not needed.
For safety of the microcontroller due to exposed to weather, cover for the controller or box
is preferred to be made of acrylic because acrylic can be used in temperature up to 80°C.

To fabricate the prototype of the system, few pipes and fitting are used and a 4
Gallon water tank to store water.

FIGURE 3.27 PVC Pipes and pipe fittings

FIGURE 3.28 Plastic dustbin as water tank


53

3.6.2 Cost Analysis

Cost analysis was done to calculate how much does it costs to build a prototype of the
irrigation model. In reality, the cost incurred only for building of the microcontroller and
valves which will cost around RM50 as starting and varied depending on the number of
valves used.

TABLE 3.5 Price list for each item to build a prototype of the system
Price
No Components Quantity
(RM)
Arduino Uno R3 Learning Starter Kit 1 83.90

a. Arduino Uno Rev. 3 Atmega 328P 1 -

b. Breadboard 1 -

c. Jumper wires of female and male 12 -


1
d. USB Cable 1 -

e. Arduino Shield 1 -

f. Light Dependent Sensor 3 -

g. IR sensor 1 -

2 Color Sensing Detect Sensor Module for Arduino 1 37.60

3 Ultrasonic Sensor 1 3.30

4 12V 24V Solenoid Electronics Water Pipe Valves ½ Inch 3 78.90

5 Arduino Wifi Module ESP8266 1 17.80

6 Electronic Soldering Iron Welding Gun 1 14.90

7 Arduino Opto Isolator 2 Channel Way 5V Relay Module 1 8.40


Arduino AC-DC Adjustable Step-Down Voltage LM2596 Converter
8 1 3.80
Module
9 Arduino HC-05 Bluetooth Module 1 15.00

10 Arduino 12V 2A AC-DC Power Supply Adaptor 1 11.20

11 Piping System 1 41.00

12 Silicone Cable (meter) 14 56.00


Total RM371.80
54

3.7 PHASE VI: Modeling for Designed System and Validation of the Model

3.7.1 Fabrication of Prototype

To produce a complete workable prototype, there are few processes that need to be done
such as cutting of pipes, drilling holes for tank, soldering wire to solenoid valves and
assemble the prototype. Below are step by step process to build the prototype:

I. Soldering wire to solenoid valves: During this process, wires are soldered with
solenoid valves pin to connect them with microcontroller.

FIGURE 3.29 Soldering solenoid valve pins

FIGURE 3.30 Blowing hot air to heat shrink


55

II. Constructing circuit according to schematic diagram:

After both solenoid valves have been soldered, they are connected to relay and
Arduino Uno together with AC-DC power supply.

FIGURE 3.31 Assembly of circuit system

III. Measuring voltage for AC-DC converter to Arduino:

To avoid excessive voltage flowing into Arduino, multimeter is used to


measure the voltage reading and voltage can be lower down to suitable
working voltage using AC-DC step down power converter module.

FIGURE 3.32 Using multimeter to check for voltage into Arduino


56

IV. Piping system fabrication:

i. In this phase, pipes are measured and cut to connect with water tank
and solenoid valves. Below are first assembly for the piping system that
consists of Pipe Tee, P/T pipes and Pipe Elbow.

FIGURE 3.33 Piping system that will be connected to water tank and solenoid valves

ii. A hole is drilled for water tank to flow water into piping system.
iii. Complete assembly of the irrigation system to be tested.

FIGURE 3.34 Complete set up of prototype for irrigation system


57

3.7.2 Programming for Arduino Uno Microcontroller

This coding attached in Appendix B will be used to control each solenoid valve
individually by using instruction from laptop (drone) using Bluetooth connection via HC-
05 Bluetooth module. There are four instructions that will coming in depending on the
condition of leaves which:

TABLE 3.6 Work instruction for Arduino Coding


Input Instructions
1, 5 Valve remains closed

2 Valve 1 open for 26s to irrigate 2L of water

3 Valve 1 open for 56s to irrigate 2L of water

4 Valve 1 open for 86s to irrigate 2L of water

6 Valve 2 open for 26s to irrigate 2L of water

7 Valve 2 open for 56s to irrigate 2L of water

8 Valve 2 open for 86s to irrigate 2L of water


58

Figure 3.35 is result of the coding after input have been given:

FIGURE 3.35 Arduino Coding for Solenoid Valves Controller

3.7.3 Validation of the Model

To validate the coding that has been written to control the solenoid valves, the result
obtained must portrayed same pattern as this journal “Automated Irrigation System Using
a Wireless Sensor Network and GPRS Module” by Joaquin Gutierrez et. al.

In the study, an algorithm was developed to control water quantity supplied based
on the reading from temperature sensor and soil moisture sensor. From the graph, as time
increased, water supplied will be increased too.

This conclude timing is important in determining how much water will be supplied
to crops. Before coding for solenoid valves controller was done, few testings will be done
to determine time taken needed to supply every liter of water. Below is the result from
background research on Water Supply VS Time. Data obtained for validation will be
discussed on Chapter IV.
59

FIGURE 3.36 Data obtained from temperature and moisture sensor and how much water
will be supplied according to time [30]

3.8 Summary

In this chapter, all methodology that have been done to achieve this project were
thoroughly explained in each section from introduction until fabrication of the prototype.
All components included tables and figure for each methodology are labelled accordingly.

First, the power source for this project which is solar energy is explained with the
conversion process and type of solar panel used. This project use PV cell solar energy
which can perform better and required simple installation compared to solar thermal. Based
on the selection of PV solar cell used which 72-Cell Mono PERC Module by JA Solar, it
is said its efficiency can reach 20%.

Second, volume of water for irrigation is calculated based on two scenarios which
are by segregation and continuous water supply. For segregation method, it was shared
from research partner of this project while for continuous water supply, it was calculated
by using Blaney-Criddle method by using mean daily temperature and crop factor for
Lemon Myrtle.
60

Next, the usage of microcontroller was explained including the components needed
to construct the solenoid valves’ controller. Before fabrication started, few simulations of
were done to show how the whole circuit system looks like was done using software such
as Fritzing and concept design of whole irrigation system including piping, tank and crops
zone using Solidworks. Each functions of components needed to build the circuit system
was thoroughly explained including figures. Prior completion of simulation for the design
system, cost analysis was done to calculate how much cost incurred to build the
microcontroller and prototype of irrigation system.

Before fabrication process began, a set of coding was done to give instruction to
microcontroller by using Arduino software. Code was then uploaded into the
microcontroller and fabrication began. Fabrication process includes cutting pipes, drilling
hole into water tank, soldering solenoid valves, connecting all the piping system and simple
wiring for the circuit system as drawn in Fritzing.
CHAPTER 4

RESULTS AND DISCUSSION

4.1 Introduction

This chapter includes introduction to the testing that have been carried out and including
data resulted from testing. Furthermore, in this chapter also covered about the procedures
and discussion of results obtained from experimental and testing of prototype.

4.2 Procedures

i. Measure initial weight of the water container without water.

- Below is value for water container before it is set to tare weight.

- Weight: 425gram

FIGURE 4.1 Initial weight of water container before tare weight is set
62

- Below is reading after the weight of the water container has been set up to tare
weight.

FIGURE 4.2 New reading after tare weight has been set

i. Place water container (Crops) on weight scale. Water is filled into the
container and every increment of 1000gram is marked.

1000g = 1L

ii. After water container has been marked for each level increment, fill the
water tank with water.

iii. Remove the cover of water tank to let atmospheric pressure push the water
to flow.

iv. Both solenoid valves are let opened first to record time taken required to
reach every levels of increment starting 2L, 3L, 4L and 5L.

v. After obtaining time taken required to reach each level, a coding will be
program into Arduino Uno to adjust the opening time of solenoid valves.

vi. Measure the new time taken either it is similar or not to verify the coding.
63

4.3 Results and Data Collection

I. To measure volume of water supply to crops.

- Initial weight of container without load or water: 425gram

- Then, the weight is calibrated as new reference starting with 0g (tare


weight).

- 1L = 1KG

TABLE 4.1 Weight for Each Volume of Water


Weight (g) Level

1000

FIGURE 4.3 1L of water

2000

FIGURE 4.4 2L of water


64

3000

FIGURE 4.5 3L of water

4000

FIGURE 4.6 4L of water

5000

FIGURE 4.7 5L of water


65

III. Time taken for water to be supplied to reach each volume of water

- Reading 1

TABLE 4.2 Reading 1


Volume of Water (L) Time Taken (s)
26.36s

2L

FIGURE 4.8: Time taken for 2L of Reading 1


41.37s

3L

FIGURE 4.9: Time taken for 3L of Reading 1


66

56.34s

4L

FIGURE 4.10: Time taken for 4L of Reading 1

71.34s

5L

FIGURE 4.11: Time taken for 4L of Reading 1

This testing was done on two container that will be assumed as crops zone with
marked water level. For the first testing, water is let flow when valve is opened until it
reaches certain level and time taken required to reach each level is measured. Time taken
for water to increase level by level took around 15s. This can be seen from 26.36s to 41.37s
then 56.34s and followed by 71.34s. The pattern for this reading is portrayed on Figure
4.24. Hence, flowrate calculated:

5𝐿
= 0.07 𝑳⁄𝒔
71.34𝑠
67

- Reading 2:

TABLE 4.3 Reading 2


Volume of Water (L) Time Taken (s)
25.37

2L

FIGURE 4.12: Time taken for 2L of Reading 2


40.39

3L

FIGURE 4.13: Time taken for 3L of Reading 2


68

55.40s

4L

FIGURE 4.14: Time taken for 4L of Reading 2


70.33s

5L

FIGURE 4.15: Time taken for 5L of Reading 2

Same procedure is repeated for second time to check either time taken to reach each
level is constant or not. Based on Figure 4.12 until Figure 4.15, time taken to supply water
is somehow similar. For every liter increment, it took around 14.5s to 15s. A graph is plotted
for all time taken in this reading to show the pattern. Figure 4.25 portrayed the pattern
which similar to previous reading. Hence, flowrate calculated:

5𝐿
= 0.071 𝑳⁄𝒔
70.33𝑠
69

- Reading 3:

TABLE 4.4 Reading 3


Volume of Water (L) Time Taken (s)
27.21s

2L

FIGURE 4.16: Time taken for 2L of Reading 3


42.30s

3L

FIGURE 4.17: Time taken for 3L of Reading 3


70

57.33s

4L

FIGURE 4.18: Time taken for 4L of Reading 3


72.31

5L

FIGURE 4.19: Time taken for 5L of Reading 3

To get a proper reading, this testing was done for the third time to make sure the
flowrate remained the same. Based on figures in Table 4.4, they show similar time taken
with reading 1 and reading 2. The interval for increment of 1 Liter of water supply took
about ±15s. For example, it took 57.33s to supply 4L and 72.31s for 5L. Hence, the different
between them is 14.98s. At the end of this testing, flowrate calculated:

5𝐿
= 0.069 𝑳⁄𝒔
72.31𝑠
71

IV. Validation of the Simulation

To validate the coding for microcontroller of solenoid valves working properly or


not, a test was done. Hence, these are the results:

TABLE 4.5: Reading for Validation

Volume of Water (L) Time Taken (s)

26.34

FIGURE 4.20: Time taken for 2L of


validation
41.40

FIGURE 4.21: Time taken for 3L of


validation
72

56.36

FIGURE 4.22: Time taken for 4L of


validation
71.37

FIGURE 4.23: Time taken for 5L of


validation

From the simulation, there few milliseconds that differ between real time simulation
and coding which are 26s, 56s and 86s. This happened because after the valve have been
closed, there are still water left inside the piping system and it takes few milliseconds to
reach certain amount of water targeted. A graph also has been plotted to show the pattern
for validation purposes. Flowrate calculated:

4𝐿
= 0.071 𝐿⁄𝑠
56.36𝑠
73

V. Graph of Time Taken VS Volume of Water for All Readings:

Three different graphs of Time Taken Needed VS Volume of Water Supply for
different readings have been plotted to illustrate the pattern between three readings. All
three graphs show same pattern because flowrate remain the same during all testing.

- Reading 1:

FIGURE 4.24 Graph for Reading 1

- Reading 2:

FIGURE 4.25 Graph for Reading 2


74

- Reading 3:

FIGURE 4.26 Graph for Reading 3

- Testing of the coding

FIGURE 4.27 Graph for Testing of the Coding for Validation


75

4.4 Summary of Project Outcome

These testing were done on two container that will be assumed as crops zone with marked
water level. Before testing begin, both containers were weighted with nothing inside them
and placed under the pipe. During starting of the testing, both solenoid valves were in their
normal position which is normally closed.

Water is poured into the tank until it is full and power supply is switched on to
operate the microcontroller and solenoid valves. After few seconds, valve is let opened and
water start flowing into the water container located below the pipe. Water tank is let opened
to let atmospheric pressure to push the water flow throughout the piping system.

The testing was done three times to get the average result and to verify either the
patterns are same or not as referred to scenario 2 which is segregate the water periodically.
Based on the three readings, every 1 Liter of water takes time around 15 seconds gap. For
example, time taken for all the readings to reach 2 Liter are 26.03s, 25.05s and 27.32s which
not much differences between them. Average flowrate calculated for three reading was
0.070 𝐿⁄𝑠.

For validation purposes, a test was done to study time taken needed to supply each
level targeted either they can perform similar to the coding or not. Data captured shown
there are few milliseconds different. This occur due to some water is still remaining in the
piping and taking time to flow into the container and reach marked level of water.
Somehow, flowrate remaining the same. Pattern shows in Figure 4.27 is the same as shown
in methodology phases, Figure 3.36.

From Figure 4.24 to Figure 4.27, four graphs plotted shows the same pattern and
gradient are the same. The more the volume of water, the longer the time taken required.
From the graphs plotted, trend for all graphs are the same because flowrate is kept constant.
Flowrate is the same because the piping system does not change in diameter. If it is required
to increase the flowrate, it is required to have a change in diameter from large diameter pipe
to smaller diameter pipe.
76

To ensure both containers receive same amount of water in similar time, it is needed
to check for leaking between pipe fitting and connection. This is because water flow can
be disrupted because of tiny leaking and will result the crops or water container takes longer
time to receive amount of water desired.

For connection between the drone and microcontroller, there are limitations for
Bluetooth range which it cannot exceed 9m elevation so the area for each zone is 25m²
which is suitable for a drone to take picture of leaves in the entire zone. Drone does not
need to fly high and more stable connection if the distance between transmitter (drone) and
receiver (microcontroller) is closed.
CHAPTER 5

CONCLUSION AND RECOMMENDATION

5.1 Conclusion

After fabrication and testing phase, it can be concluded that objectives have been achieved
which designing an integrated microcontroller for irrigation system. Based on the results
obtained which time taken required to supply water to be measured, it is suitable to be
implemented in the irrigation system because time taken are not too long. Based on
previous inventions for irrigation, most of them usually use timer and sensor but for this
project, it is combined with real time monitoring drone that can inspect the condition of the
leaves and send the instructions directly to the microprocessor to work. Furthermore, cost
to fabricate the circuit system is not highly cost and consider affordable for farmers. The
microprocessor is powered by solar, so it is eco-friendly to be operated. In addition, one of
objectives which to optimized use of water during irrigation is finally achieved since this
system will only operating according to the condition of the leaves with appropriate timing
for solenoid valves to open and supply water compared to conventional ways which using
timer.
78

5.2 Recommendation

This microprocessor can give benefits to the user which they do not to open the valve
manually and just only use the drone to send instruction to microprocessor. However, there
might be few flaws and weaknesses that need to be improved to increase the efficiency. It
is because during the fabrication and development of this project, there have been some
problems arisen and there are some solutions or recommendations to tackle these issues.

First, the flowrate is constants and user want to increase the flowrate and reduce
time taken, user can modify flowrate by putting another external device such as water pump
or can change the diameter of the pipe to be different in the piping system.

Next, there were some leaking in the piping system during testing and verification.
So, the recommendation is to seal the fittings and provide a permanent connection by
applying some glue. Then, for the microprocessor, all the connection of wiring system must
be soldered to prevent the connection from taken off during extreme condition likes strong
wind, heavy rain and storms.
REFERENCES

[1] Amruta S. Jondhale, Varsha P. Bhosale, Vrushali S. Takate, "Irrigation System and
Its Methods," International Journal for Research in Applied Science & Engineering
Technology (IJRASET), vol. 5, no. V, pp. 1549-1552, 2017.

[2] "Valley Irrigation," [Online]. Available:


http://www.valleyirrigation.com/equipment/center-pivots/5000-series. [Accessed
26 June 2019].

[3] "civilseek," [Online]. Available: https://civilseek.com/methods-of-irrigation/.


[Accessed 25 June 2019].

[4] B. R. H. D. O. C. J. K. C. Saeed Mohammed Wazed, "Solar Driven Irrigation


Systems for Remote Rural Farms," in 9th International Conference On Applied
Energy, ICAE2017, 21-24 August 2017, Cardiff, United Kingdom, 2017.

[5] I. Malak, "Pumping Water Using Solar Energy for Irrigation," Ifran, 2016.

[6] M. R.-S. F. P. X. G. C. G. Brooke Mason, "Intelligent urban irrigation systems:


Saving water and maintaining crop yields," Agricultural Water Management , vol.
226, 2019.

[7] A. A. A. a. A. S. Alatishe, "Design and Construction of a Microcontroller-Based


Automatic Irrigation System," in Proceedings of the World Congress on
Engineering and Computer Science 2015, San Francisco, 2015.

[8] A. J. M. A. F. A. Shehzar S Sheikh, "Solar Based Smart Irrigation System Using


PID Controller," in IOP Conference Series Materials Science and Engineering,
Islamabad, 2018.
[9] C. C. B. E. E. J. M. H. N. Z. J. S. C. W. R. E. &. T. S. M. Al-Kohafi, "Using a
Microcontroller to Automate a Green House for Experiments," Journal of
Agricultural and Life Sciences, vol. 3, no. 2, 2016.

[10] A. R. M. A. P. Anisha, "Electronically controlled water flow restrictor to limit the


domestic wastage of water," in 2017 International conference on Microelectronic
Devices, Circuits and Systems (ICMDCS), Vellore, 2017.

[11] I. A. H. S. K. B. D. A. C. W. M. Y. Redmond Ramin Shamsiri, "Intech Open," 5


November 2018. [Online]. Available:
https://www.intechopen.com/books/agricultural-robots-fundamentals-and-
applications/fundamental-research-on-unmanned-aerial-vehicles-to-support-
precision-agriculture-in-oil-palm-planta. [Accessed 21 June 2019].

[12] M. S. Paolo Tripicchio, "Towards Smart Farming and Sustainable Agriculture with
Drones," in 2015 International Conference on Intelligent Environments, Prague,
Czech Republic, 2015.

[13] T. P. Marthinus Reinecke, "The Influence of Drone Monitoring on Crop Health and
Harvest Size," in 2017 1st International Conference on Next Generation Computing
Applications (NextComp), Mauritius, 2017.

[14] T. P. Aghaei, "Solar Electric and Solar Thermal Energy: A Summary of Current
Technologies," Global Energy Network Institute, San Diego, 2014.

[15] "JA Solar," [Online]. Available:


http://www.jasolar.com/html/en/2018/en_smodule/9.html. [Accessed 29 October
2019].

[16] "About Lemon Myrtle," Organic Lemon Myrtle Plantations, [Online]. Available:
https://organiclemonmyrtleplantations.com/about-organic-lemon-myrtle/about-
lemon-myrtle/. [Accessed 25 August 2019].
[17] "10 Remarkable Health Benefits Of Lemon Myrtle," Superfoods Australia, [Online].
Available: https://superfoodsaustralia.com.au/blogs/super-blog/10-remarkable-
health-benefits-of-lemon-myrtle. [Accessed 25 August 2019].

[18] M. H. C. Brouwer, "Irrigation Water Management," Food and Agricultural


Organization of the United Nations.

[19] "AccuWeather," AccuWeather, Inc, [Online]. Available:


https://www.accuweather.com/en/my/serdang/230432/october-
weather/230432?year=2019. [Accessed 15 October 2019].

[20] "ANNEX II Conversion table of mm/day into l/s/ha," Food and Agriculture
Organization of the United Nations, [Online]. Available:
http://www.fao.org/3/u5835e/u5835e08.htm. [Accessed 28 September 2019].

[21] "ShaShinKi," ShaShinKi Sdn. Bhd., [Online]. Available:


https://shashinki.com/shop/parrot-disco-p-
34508.html?gclid=EAIaIQobChMIucinyeyf5gIVR2oqCh24ZgsKEAQYAiABEgK
PqvD_BwE. [Accessed 15 December 2019].

[22] "WHAT IS FRITZING, HOW DOES IT WORK AND HOW TO USE IT?," e-
radionica, [Online]. Available: https://e-radionica.com/en/blog/what-is-fritzing-
what-is-does-and-how-to-use-it/. [Accessed 3 October 2019].

[23] "www.quora.com," [Online]. Available: https://www.quora.com/How-long-can-


Arduino-stay-on. [Accessed 22 July 2019].

[24] "ELPROCUS," [Online]. Available: https://www.elprocus.com/what-is-arduino-


uno-r3-pin-diagram-specification-and-applications/. [Accessed 29 October 2019].

[25] "LELONG," [Online]. Available: https://www.lelong.com.my/lm2596-step-power-


supply-converter-module-lm2596s-arduino-xyntacpro-F1627881-2007-01-Sale-
I.htm. [Accessed 16 October 2019].
[26] "Wiki Sunfounder," Sunfounder, 20 March 2017. [Online]. Available:
http://wiki.sunfounder.cc/index.php?title=2_Channel_5V_Relay_Module.
[Accessed 15 October 2019].

[27] "ADOSIA," [Online]. Available: https://adosia.io/product/solenoid-water-valve/.


[Accessed 15 November 2019].

[28] "introbotics," February 2018. [Online]. Available:


https://www.intorobotics.com/pick-right-bluetooth-module-diy-arduino-project/.
[Accessed 18 October 2019].

[29] "Robotedu.my," [Online]. Available:


https://www.robotedu.my/index.php?route=product/product&product_id=1515&se
arch=arduino+starter+kit. [Accessed 23 July 2019].

[30] J. F. V.-M. A. N.-G. a. M. Á. P.-G. Joaquín Gutiérrez, "Automated Irrigation System


Using a Wireless Sensor Network and GPRS Module," IEEE TRANSACTIONS ON
INSTRUMENTATION AND MEASUREMENT, vol. 63, no. 1, pp. 166-176, 2014.
APPENDICES
APPENDIX A

A. Solar Panel Specs by JA Solar for Proposed System

FIGURE A.1: Technical Specifications for JAM72S09 Solar Panel


APPENDIX B

B. Arduino Coding for Solenoid Valves

#include <SoftwareSerial.h>

SoftwareSerial BT(1, 0);

int solenoidPin = 9;

int solenoidPin2 = 10;

void setup() {

// put your setup code here, to run once:

// set digital pin to control as an output

pinMode(solenoidPin, OUTPUT);

pinMode(solenoidPin2, OUTPUT);

// set the data rate for the SoftwareSerial port

BT.begin(9600);

// Send test message to other device

char a;

char b;

void loop()

if (BT.available())
// if text arrived in from BT serial...

a=(BT.read());

if (a=='1')

digitalWrite(solenoidPin, HIGH);

digitalWrite(solenoidPin2, HIGH);

BT.println("Both Valve Does Not Open");

if (a=='2')

digitalWrite(solenoidPin, LOW);

BT.println("Valve 1 open for 26 seconds");

delay(25000);

digitalWrite(solenoidPin, HIGH);

if (a=='3')

digitalWrite(solenoidPin, LOW);

BT.println("Valve 1 open for 56 seconds");

delay(55000);

digitalWrite(solenoidPin, HIGH);
}

if (a=='4')

digitalWrite(solenoidPin, LOW);

BT.println("Valve 1 open for 86 seconds");

delay(85000);

digitalWrite(solenoidPin, HIGH);

if (a=='5')

digitalWrite(solenoidPin, HIGH);

digitalWrite(solenoidPin2, HIGH);

BT.println("Both Valve2 Does Not Open");

if (a=='6')

digitalWrite(solenoidPin2, LOW);

BT.println("Valve 2 open for 26 seconds");

delay(25000);

digitalWrite(solenoidPin2, HIGH);

}
if (a=='7')

digitalWrite(solenoidPin2, LOW);

BT.println("Valve 2 open for 56 seconds");

delay(55000);

digitalWrite(solenoidPin2, HIGH);

if (a=='8')

digitalWrite(solenoidPin2, LOW);

BT.println("Valve 2 open for 86 seconds");

delay(85000);

digitalWrite(solenoidPin2, HIGH);

}}

You might also like