Finalproject Proposal Format BE 1
Finalproject Proposal Format BE 1
Finalproject Proposal Format BE 1
SCHOOL OF ENGINEERING
ii
CERTIFICATE OF APPROVAL
iii
ACKNOWLEDGEMENT
We would like to express our deep gratitude to our project supervisor Er. Shiva Shrestha.
We wish to extend our sincere thanks to Er. Sulav Adhikari, Head of the Electrical and
Electronics, United Technical College of Engineering for providing all sorts of assistance and
support to develop our project and who have always provided the technical assistance and
have been the source of inspiration and motivation for carrying out the project.
We would like to express our sincere thanks to Professor Dr. Keshab Datt Awasthi,
Principle, United Technical College for giving us valuable guidance and suggestion. We are
fortunate to receive help of many colleagues, friends and our senior. We greatly express their
generosity in devoting their time and idea to help us with their project for its completing.
It is our pleasure to refer Microsoft Word, Arduino IDE exclusive of which the collection of
this report would have been impossible. A prototype of this nature could never have been
attempted without our reference and inspiration of works who’s detailed are mentioned in
reference section. We confess our indebtedness to all of them.
iv
ABSTRACT
The project describes the smart irrigation system using the concept of IOT. The project uses a
Wi-Fi-Module which connects the system to internet. This module controls a motor and
solenoid valves for supplying water to the field information from a water level indicator and
sensors. The whole system is monitored and controlled by the mobile application.
The project report on ‘’DEMOSTRATION OF SMART DRIP IRRIGATION SYSTEM
USING IOT’’ makes the efficient use of water and fertilizers. The concept of drip irrigation
is to irrigate only the root zone of the plants. Drip irrigation allows water to drip slowly to the
roots of plants. Drip is especially suitable for hot and windy areas. Drip irrigation system
which supplies controlled amount of water to plants. Subsurface application of water to the
root zone also has the potential to improve yields by reducing the incidence of disease. The
data from sensor is continuously uploaded to the cloud hosted for drip irrigation system. This
system also enables suggestions for the admin and user. The motor can be ON-OFF with
mobile application and automatically. With an intelligent data analysis algorithm (IDAA) this
system can optimize the utilization of water and can cultivate more food.
v
TABLE OF CONTENT
SUPERVISOR’S RECOMMENDATION…………………………………………………i
AKNOLEDGMENT………………………………………………………………………...ii
AKNOLEDGMENT …………………………………………………………………….. iv
ABSTRACT ………………………………………………………………………………..v
TABLE OF CONTENT…………………………………………………………………….vi
LIST OF FIGURES……………………………………………………………………….viii
LIST OF TABLES…………………………………………………………………………………………………………………….ix
vi
1.5.9 LCD Display…….. ............................................................................................. 15
CHAPTER 4: EPILOGUE........................................................................................ 29
Table 6.1Challenges:.............................................................................................. 34
REFERENCES ............................................................................................................ 35
APPRNDIX................................................................................................................. 37
vii
LIST OF FIGURES PAGE
viii
LIST OF TABLES PAGE
Table4.2:workshedule………………………………………………………………...30
ix
CHAPTER1: INTRODUCTION
1.1 Background
In our country, Agriculture is major source of food production to the growing demand
of human population. In agriculture, irrigation is an essential process that influences crop
production [1].
Generally farmers visit their agriculture fields periodically to check soil moisture level and
based on requirement water is pumped by motors to irrigate respective fields. Farmer need
to wait for certain period before switching off motor so that method takes lot of time and
effort particularly when a farmer need to irrigate multiple agriculture fields distributed in
different geographical areas. Automation in irrigation system makes farmer work much
easier. Sensor based automated irrigation system provides promising solution to farmers
where presence of farmer in field is not compulsory. A small processor programmed for
control a electromagnetic valve and also compare to electromagnetic valve operate
motor to start watering[11].
Nepal is the country of village and agriculture plays an important role for developing of
country. In our country agriculture depends on the monsoons which has insufficient source of
water. So the irrigation is used in agricultural field. In irrigation system, depending upon the
soil type, water is provided to plant. In agriculture, two things are very important, first to get
information of fertility of soil and second to measure moisture contain of soil. Now days for
irrigation, different techniques are available which are to reduce the dependency of rain, and
this technique is driven by electrical power and on/off scheduling. In this technique, water
level indicator placed in water reservoir and soil moisture sensor are placed root zone of the
plant and near the module and gateway unit handle the sensor information and transient data
to the controller which in turns the flow of water through the valve.[12]
The term “IOT” stands for the internet of things, can be defined as the interconnection
between the individually identifiable embedded computing apparatus in the accessible
internet infrastructure. The ‘IOT’ connects various devices and transportations with an help
of internet as well as electronic sensors. Please refer to this link to know more about Experts
Opinion on Application of Internet of Things (IOT) in Future [13].
1
1.2 Problem Statement
In the case of traditional irrigation system irrigation is done manually by farmers. Since, the
water is irrigated directly in the land, plants under go high stress from variation in soil
moisture; therefore plant appearance is reduced. The absence of automatic controlling of the
system result in improper water control system. The major reason for these limitations is the
growth of population which is increasing at a faster rate. At present there is emerging global
water crisis where managing scarcity of water has become a serious job. This growth can be
seen in countries which have shortage of water resources and are economically poor. So this
is the serious problem in Traditional Irrigation System.
Internet of Things (IoT) in the context of Nepal is not quite affordable or available. Though
0there remains an eagerness for technology, this is largely due to the ignorance of the
emergence of those very technologies, lack in adapting to the pace of change and lack of
adequate budget with general population. This project targets the agriculture sector with
focus on making a cheaper and utility-based variant of the plant communicator in
alternative to those already existing in the international market.
1.3 Motivation
For continuously increasing demand and decrease in supply of food necessities, it’s important
to rapid improvement in production of food technology. Agriculture is only the source to
provide this. This is the important factor in human societies to growing and dynamic demand
of food production. Agriculture plays the important role in the economy and development,
like Nepal. Due to lack of water and scarcity of land water result the decreasing volume of
water on earth, the farmer use irrigation. Irrigation may be define as the science of artificial
application of water to the land or soil that means depending upon the soil type, plant are to
be provided with water.
2
1.4 Objectives
The main objective of this project is to develop an automated system that solves most
problems related to irrigation and agriculture. such as controlling and saving both the
water and electricity, Increasing agricultural production using small quantities of water ,
Minimize manual intervention in watering operations with increasing watering speed,
Preserving plants from fungi, and finally.
All these features make the automated system sustainable option to be considered to
improve the agriculture and irrigation efficiency.
The goals of this study are to discover the excellent automation technique for irrigation
system automatically controlled through software in a way that allows the user to
monitor all information and manage the device immediately from mobile.
The objective to consider are:
1. To optimize water consumption.
2. TO improve the ambient condition for the vegetative growth.
3. To monitor entire irrigation system at a distance.
3
1.5 HARDWARE REQUIREMENT
Figure1.1: Arduino
The 14 digital input/output pins can be used as input or output pins by using pin Mode (),
digital Read () and digital Write () functions in ardiuno programming. Each pin operate at 5V
and can provide or receive a maximum of 40mA current, and has an internal pull-up resistor
of 20-50 K Ohms which are disconnected by default. Out of these 14 pins, some pins have
specific functions as listed below:
•Serial Pins 0 (Rx) and 1 (Tx): Rx and Tx pins are used to receive and transmit TTL serial
data. They are connected with the corresponding ATmega328P USB to TTL serial chip.
•External Interrupt Pins 2 and 3: These pins can be configured to trigger an interrupt on a low
value, a rising or falling edge, or a change in value.
4
•PWM Pins 3, 5, 6, 9 and 11: These pins provide an 8-bit PWM output by using analog Write
() function.
•SPI Pins 10 (SS), 11 (MOSI), 12 (MISO) and 13 (SCK): These pins are used for SPI
communication.
•In-built LED Pin 13: This pin is connected with a built-in LED, when pin 13 is HIGH – LED
is on and when 13 pin is LOW, it’s off.
Along with 14 Digital pins, there are 6 analog input pins, each of which provides 10 bits of
resolution, i.e. 1024 different values. They measure from 0 to 5 volts but this limit can be
increased by using AREF pin with analog Reference () function.
•Analog pin 4 (SDA) and pin 5 (SCA) also used for TWI communication using Wire library.
•AREF: Used to provide reference voltage for analog inputs with analog Reference()
function.
5
1.5.1.1 Arduino Uno Technical Specifications
Operating Voltage 5V
SRAM 2 KB
EEPROM 1 KB
6
1.5.2 Soil moisture sensor
The Soil Moisture Sensor is used to measure the volumetric water content in the soil. This
makes it ideal for performing experiments in plants by having constant information about the
amount of water currently present in soil and accordingly providing water to the plants for
proper nourishment. This includes constant checking of moisture content in soil and sending
the readings to the android application. If the moisture content is less than the threshold value
(which is pre-fed into the arduino board), a prompt message is sent to the device and
automatically a sprinkler connected to the arduino will start sprinkling water on the affected
area. His soil moisture sensor module is used to detect the moisture of the soil. It measures
the volumetric content of water inside the soil and gives us the moisture level as output. The
module has both digital and analog outputs and a potentiometer to adjust the threshold level
[9].
7
1.5.3 Humidity sensor
8
1.5.4 Jumper wire
9
1.5.5 Node MCU (ESP8266) Wi-Fi Module:
The ESP8266 Wi-Fi module is a self contained SOC with integrated TCP/IP protocol stack
that can give any microcontroller access to your Wi-Fi network. The ESP8266 is capable of
either hosting an application or offloading all Wi-Fi networking functions from another
application processor.
10
NodeMCU ESP8266 Specifications & Features
• Microcontroller: Ten silica 32-bit RISC CPU Xtensa LX106
• UARTs: 1
• SPIs: 1
• I2Cs: 1
• Flash Memory: 4 MB
• SRAM: 64 KB
• PCB Antenna
11
1.5.6 PH SENSOR
Figure1.6: PH sensor
PH sensor checks alkalinity and acidity of the soil. It is important to maintain a hydroponic
nutrient solution at a pH level where the nutrients are consistently available to the plant. If the
content of the soil solution is too acidic or too alkaline it can cause lock up – a situation
which restricts certain elements essential for growth from being absorbed by the root
structure. Deficiencies in the required elements become apparent in the plants growth and can
lead to plant death. Additionally the pH of the water we drink is crucial to our health.
Technical Specifications
• Range: pH 0–14
• Shaft Diameter: 12 mm OD
12
1.5.7 Solenoid Valve
Is to control the flow of fluid, a valve is ordinarily closed and has a 1/2″ non-taped outlets on
each conclusion. On the off chance that 12V is connected through the two terminals of the
valve the solenoid will open the valve.
Input voltage 6V
Dimension 3’’×2.25’’×2’’
Current 320 mA
13
1.5.8 Water Pump
It is used in this project to pump the water needed for irrigation from the main water tank
through pipes. This pump can be used for different applications, in household include
cleaning, bathing, space heating and flower of water. This pump is selected for this project
because it has good advantages. Such as, it has a lightweight. Also, it has a small size, so it is
easy to install and replace it. Furthermore, it has an enough efficiency to pump water for
irrigation. Since it operates in 12 volts, so it consumes lower power. In addition, this pump
has a very Low of noise. Finally, the cost of this pump is very cheap.
Operating temperature 80 ͦ C
14
Size 90x40x35 mm
The LCDs have a parallel interface, meaning that the microcontroller has to manipulate
several interface pins at once to control the display. The interface consists of the following
pins:
A register select (RS) pin that controls where in the LCD's memory you're writing data to.
You can select either the data register, which holds what goes on the screen, or an instruction
register, which is where the LCD's controller looks for instructions on what to do next.
8 data pins (D0 -D7). The states of these pins (high or low) are the bits that you're writing to a
register when you write, or the values you're reading when you read.
15
There's also a display contrast pin (Vo), power supply pins (+5V and Gnd) and LED
Backlight (Bklt+ and BKlt-) pins that you can use to power the LCD, control the display
contrast, and turn on and off the LED backlight, respectively.
Title Description
Terminal1 GND
Terminal2 +5V
Terminal5 Read/Write(RW)
Terminal6 Enable
Terminal7 DB0
Terminal8 DB1
Terminal9 DB2
Terminal10 DB3
Terminal11 DB4
Terminal12 DB5
Terminal13 DB6
Terminal14 DB7
Terminal15 +4.2-5V
Terminal16 GND
16
1.5.10 Polytube
Figure1.10 polytube
Technical specifications
17
1.5.11 Relay Module
Relay is an electromechanical device that uses an electric current to open or close the
contacts of a switch. The single-channel relay module is much more than just a plain relay, it
comprises of components that make switching and connection easier and act as indicators to
show if the module is powered and if the relay is active or not
Technical specifications
18
1.6 Applications
The term “IOT” stands for the internet of things, can be defined as the interconnection
between the individually identifiable embedded computing apparatus in the accessible
internet infrastructure. The ‘IOT’ connects various devices and transportations with an help
of internet as well as electronic sensors. Please refer to this link to know more about Experts
Opinion on Application of Internet of Things (IOT) in Future [2].
The ‘Thing’ in IOT can be any device with any kind of built-in-sensors with the ability to
collect and transfer data over a network without manual intervention. The embedded
technology in the object helps them to interact with internal states and the external
environment, which in turn helps in decisions making process. In a nutshell, IOT is a concept
that connects all the devices to the internet and let them communicate with each other over
the internet.IOT is a giant network of connected devices – all of which gather and share data
about how they are used and the environments in which they are operated. By doing so, each
of your devices will be learning from the experience of other devices, as humans do [2].
IOT is trying to expand the interdependence in human- i.e. interacts, contribute and
collaborate to things. I know this sounds a bit complicated, let’s understand this with an
example. A developer submits the application with a document containing the standards,
logic, errors & exceptions handled by him to the tester [2].
19
1.8 Limitation of project:
1. These systems can be quite costly depending on the size of the property.
2. This system works on soil moisture and temperature sensor threshold value.
20
CHAPTER 2: LITERATURE REVIEW
Primary investigation is carried out under the following stages, such as Understanding the
existing approaches, Understanding the requirements, developing an abstract for the system.
In this paper, soil moisture sensor, temperature and humidity sensors placed in root zone of
plant and transmit data to android application.
Threshold value of soil moisture sensor that was programmed into a microcontroller to
control water quantity. Temperature, humidity and soil moisture values are displayed on the
android application. This paper on "Automatic Irrigation System on Sensing Soil Moisture
Content" is intended to create an automated irrigation mechanism which turns the pumping
motor ON and OFF on detecting the dampness content of the earth. In this paper only soil
moisture value is considered but proposed project provided extension to this existed project
by adding temperature and humidity values [3].
Remote Monitoring in Agricultural Greenhouse Using Wireless Sensor and Short Message
Service (SMS).In this paper they are sending data via SMS but proposed system sends the
values to mobile application[4].
This proposed paper is ardiuno based remote irrigation system developed for the agricultural
plantation, which is placed at the remote location and required water provides for plantation
when the humidity of the soil goes below the set-point value[10]. But in this we did not aware
about the soil moisture level so to overcome this drawback proposed system included with
extra feature soil moisture value and temperature value which displayed on the farmer mobile
application [5].
“Irrigation Control System Using Android and GSM for Efficient Use of Water and Power”
this system made use of GSM to control the system which may cost more so to overcome that
proposed system used ardiuno UNO board which already consist of in build Wi-Fi module
[6].
“Microcontroller based Controlled Irrigation System for Plantation” In this paper old
generation with lesser memory microcontroller is used to control the system but proposed
system made use of ardiuno UNO board which is user friendly and it helps to dump the
programs easily[7].
21
By referring all above papers it is found that no such systems are existed with all integrated
features but proposed system includes these all features such as displaying temperature,
humidity and soil moisture values and also automatic switching on and off of motor by
considering soil moisture values[9].
22
CHAPTER 3: METHODOLOGY
Identify objectives
Review literature
Choice of material
Sequence scenario
system
Mobile application
Conclusion
23
3.2: Block diagram
DHT11(temp/h
umidity) LCD Display
Sensor
Server
Soil Moisture NodeMCU
Sensor1
Emitting
Soil
PipeMoisture ARDUINO
Sensor2
Class UNO
as per Mobile
(IS :
Emitting Application
12786)
Pipe
PH Sensor
Nominal
Class Inside Wall Motor
Dia
as per Dia Thickness
(IS : mm Power
12786) Supply
CL CL CL
Nominal Inside Wall– I – II –
Dia Dia ThicknessIII
12 Figure3.2:
mm Blockmm
10.5 diagram
0.4 of smart drift irrigation system using IOT
0.6 0.8
mm – CL
CL – CL –
This system is a combination –I –
0.5 0.7 –1.0
ofIIhardware and software components. The hardware part
consists16
ofmmdifferent sensors
14.2 0.5like III
0.7soil
0.9moisture sensor, humidity sensor, etc whereas the
software12part
mm consists
mm
10.5 of an– 0.6
0.4 – 0.8
android –based application connected to the ardiuno board and
other hardware components
mm –0.6 –0.9Internet
using –1.2 of Things (IoT). The android based application
0.5
0.7 0.7
consists20
of mm
signals 18.0
and a database 1.0
0.9 in1.2which readings are displayed from sensors and are
inserted16
using
mmthe hardware.
mm
14.2 – The0.7
0.5 –improvement
–
0.9 in irrigation system using wireless network is
mmwater–0.8
a solution to achieve –1.1 –1.4 as well as improvement in irrigation process. This
conservation
research tries to automate 0.6 0.9 1.2of irrigation on the farmland by monitoring the soil
the process
water level.
20 mm 18.0 0.7 0.9 1.2
mm – – –
0.8 1.1 1.4
24
3.3: Working flowchart
START
S.M1>400
S.M2>400
YES
Motor
ON
END
25
In this system, we are using mesh topology in which sensor nodes are placed in the farm area.
Sensors in our proposed topology are mobile where as the base station is stationary and it
collect the data from sensor nodes and process them. This work proposes that how to deploy
the sensed data to the base station in WSN (wireless sensor network). For this purpose firstly
set the farm area [5]
𝑷𝑯 Sensor checks whether the soil is alkaline or acidic. Soil should have proper proportion of
nutrient which is essential plant growth. Also with the help of 𝑷𝑯 we can determine for
what type of plant the soil is feasible. In this project, we have added a 𝑷𝑯 Sensor to check the
acidic of soil and give constant update to the android application about the same.
The moisture sensor gives the water content level in the soil and sends it to the ardiuno. It
will process this data by comparing it with the threshold value if it is less than predefined
threshold value than start the irrigation.
In drip irrigation systems, pump and valves may be manually or automatically operated by a
controller. Most large drip irrigation systems employ some type of filter to prevent
clogging of the small emitter flow path by small waterborne particles. New
technologies are now being offered that minimize clogging. Some residential systems are
installed without additional filters since potable water is already filtered at the water
treatment plant.
Virtually all drip irrigation equipment manufacturers recommend that filters be employed and
generally will not honor warranty unless this is done. Last line filters just before the final
delivery pipe are strongly recommended in addition to any other filtration system due to
fine particle settlement and accidental insertion of particles in the intermediate lines. Drip
and subsurface drip irrigation is used almost exclusively when using recycled municipal
wastewater. Regulations typically do not permit spraying water through the air that has
not been fully treated to potable water standards. Because of the way the water is
applied in a drip system, traditional surface applications of timed-release fertilizer are
sometimes ineffective, so drip systems often mix liquid fertilizer with the irrigation
water. This is called fustigation; fustigation and chemigation (application of pesticides and
other chemicals to periodically clean out the system, such as chlorine or sulfuric acid) use
chemical injectors such as diaphragm pumps, piston pumps, or aspirators. The chemicals may
be added constantly whenever the system is irrigating or at intervals. Fertilizer savings of up
to 95% are being reported from recent university field tests using drip fustigation and
slow water delivery as compared to timed-release and irrigation by micro spray heads.
Properly designed, installed, and managed, drip irrigation may help achieve water
26
conservation by reducing evaporation and deep drainage when compared to other types of
irrigation such as flood or overhead sprinklers since water can be more precisely applied
to the plant roots[5].
In addition, drip can eliminate many diseases that are spread through water contact with the
foliage. Finally, in regions where water supplies are severely limited, there may be no actual
water savings, but rather simply an increase in production while using the same amount of
water as before. In very arid regions or on sandy soils, the preferred method is to apply the
irrigation water as slowly as possible. Pulsed irrigation is sometimes used to decrease the
amount of water delivered to the plant at any one time, thus reducing runoff or deep
percolation. Pulsed systems are typically expensive and require extensive maintenance.
Therefore, the latest efforts by emitter manufacturers are focused on developing new
technologies that deliver irrigation water at ultra-low flow rates, i.e. Less than 1.0 liter per
hour. Slow and even delivery further improves water use efficiency without incurring the
expense and complexity of pulsed delivery equipment. An emitting pipe is a type of drip
irrigation tubing with emitters pre-installed at the factory with specific distance and flow per
hour as per crop distance. An emitter restricts water flow passage through it, thus creating
head loss required (to the extent of atmospheric pressure) in order to emit water in the form
of droplets [1].
27
Figure 3.4: Drip irrigation system (https://ijarcce.com/upload/2017/september-
17/IJARCCE%2039.pdf)
28
CHAPTER 4: EPILOGUE
3 DHT11 Rs.1,500
4 NodeMCU(ESP8266) Rs.2,000
11 PH Sensor Rs.1,500
12 Miscellaneous Rs.5,500
13 Documentation Rs.5000
Total Rs.25,000
29
Table 4.2: work schedule
Work/Week 1 2 3 4 5 6 7 8 9 10 11 12
Literature
review
Topic selection
Methodology
Data collection
Data
processing
Data analysis
Data
presentation
Mid defense
Testing and
maintenance
Final defense
Documentation
30
CHAPTER 5: RESULT AND DISCUSSION
5.1 Results
31
32
5.2 Discussion
After completing the plan and the collection of the components of the smart irrigation system,
it's been met the goal. Also, all of the requirements were implemented in order to finish this
smart Irrigation system, so that it becomes full production and finalize. After that, the system
became tested, and the end result became as required. The system will now not work until
two moisture sensors from any line of the 3 fields send a sign to the Ardiuno that the soil is
dry and crop needs water. After the sign reaches the Ardiuno, it will send a command to the
relay of that specific line field valve to be energized to open the valve and a command to the
relay of the pump to exchange it directly to irrigate that field. Also, all 3 fields can be
irrigated at a same of time, if two or three of all 3 plants moisture sensor are activated. So, all
solenoid valve relays maybe energized to open all valves and the pump will run to irrigate all
3 plants. There has been a problem at the beginning to choose a suitable pump to paintings to
irrigate all flowers at the same moment. The program of the system has been configured and
the system will no longer operate unless (or three moisture sensors) are activated. But if one
sensor is activated of any lines the system will no longer perform, because that sensor can
also it be defective. If the water tank level is low the system will not operate in any respect,
even all plant sensors are activated to protect the water pump. Furthermore, this smart
Irrigation system has been configured that if there is a raining, it's going to not work, because
the sensor will activate, and it will send a sign to Ardiuno to stop the water pump and to close
all valves too. Further, on the daytime the system will no longer work, due to the mild sensor
will activate at the daytime and that will reason to close the plant's value as well as to switch
OFF the pump. For the system programming, it has been precisely chosen as stated in
previous chapters to apply UNO Ardiuno, the wires connections from the controllers to the
Ardiuno have been pretty difficult, due to a single mistake can damage any electric element.
It was not easy to program the smart Irrigation system and upload it in Ardiuno to run the
water pump and starting valves with many sensors, but with the assist of Ardiuno library, this
system turned into completed with best results. Connecting the wires from many devices to
the Ardiuno become very hard and complicated, but by means of using the plastic breadboard
became to facilitate the connection of those wires. For designing the plant, special flexible
pipes had been used to facilitate the connection from the water tank to the plant, however, we
faced problem to connect pipes together. So, two types of pipe joints (T-joint and L-joint)
were used to clear up this issue.
33
CHAPTER 6: CONCLUSION AND FUTURE WORK
6.1 Challenges
Many problems were faced, Such as the tables used to be a base of this project size was
bigger than the needed size for this prototype. Also, the materials that required for this project
has been difficult to find. Selection of the suitable plant plate to fix it in the foam and
artificial grass has the significant problem. Also, since more than 10 devices were connected
to the Arduino, wires connection has been complexes to connect. Furthermore, the batteries
of this project drain quickly in use; Sequence of system scenario has been not easy to decide
to function. The controllers to the Arduino were quite challenging, because of a single
mistake can damage any electrical part. It was not easy to write the software for the Smart
Irrigation System and upload it in Ardiuno to run the water pump and opening valves with
many sensors, but with the help of Ardiuno library, the program was completed with perfect
results. Connecting the wires from many devices to the Ardiuno was very difficult and
complex, but by using the plastic breadboard was to facilitate the connection of these wires.
With the result of the project first step in the future will be to transfer this project to large-
scale. Also to control system via Zing Bee instead of wire connection. Moreover, to create
more responsive mobile application this has more controlled data. Also we can develop this
system by using renewable energy which is solar power instead of batteries using solar
energy will help to reduce future cost
34
REFERENCES
[1] https://www.elprocus.com/smart-irrigation-system-using-iot/
[2] https://www.ijeat.org/wp-content/uploads/papers/v8i6S/F10240886S19.pdf
[3] C. Arun, K. Lakshmi Sudha “Agricultural Management using Wireless Sensor Networks
– A Survey”2nd International Conference on Environment Science and Biotechnology
IPCBEE vol.48 (2012) © (2012) IACSIT Press, Singapore 2012.
[9]https://www.slideshare.net/Basavaraj_Galagi/smart-irrigation-system-using-internet-of-
things-65170601
[10]https://www.researchgate.net/publication/334624944_SMART_IRRIGATION_SYSTEM
_USING_IoT
[11]https://www.ripublication.com/ijems_spl/ijemsv8n1_08.pdf
[12]https://www.researchgate.net/publication/334624944_SMART_IRRIGATION_SYSTEM
_USING_IoT
35
[9] SSRG, S. (2017). Engineering Science and Technology Journals, SSRG International
Journal.[online]Internationaljournalssrg.org.Availableat:http://www.internationaljournalssrg.
org
[10] Scribd. (2017). Automatic Irrigation System on Sensing Soil Moisture Content |
IrrigationSoil.[online]Availableat: https://www.scribd.com/document/362464538/Automatic-
Irrigation-System-onSensing-Soil-Moisture-Content.
[11] Arresearchpublication.com. (2017). Cite a Website - Cite This For Me. [online]
Available at:http://www.arresearchpublication.com/images/shortpdf/1478954748_161_ijeee
.pdf
[12] Ijcit.com. (2017). Cite a Website - Cite This For Me. [online] Available
at:https://www.ijcit.com/archives/volume4/issue3/Paper040304 .pdf
[13] Anon, (2017). Embedded Systems and Robotics with Open Source Tools. [online]
Available at:https://vigyanashram.files.wordpress.com/2015/05/plant-watering-system .pdf
[ 14] Vagulabranan, R., Karthikeyan, M., & Sasikala, V. (2016). Automatic Irrigation System
on SensingSoil Moisture Content. International Research Journal of Engineering and
Technology (IRJET), 3.
36
APPENDICES
#include <SoftwareSerial.h>
#include<DHT.h>
#include <LiquidCrystal.h>
#include <ArduinoJson.h>
#define Soil_Sensor2 2
37
LiquidCrystal lcd(rs, en, d4, d5, d6, d7);
unsigned long int avgValue; //Store the average value of the sensor feedback
float b;
int buf[10],temp;
int soil_value1;
int soil_value2;
int soil_value3;
int soil_value4;
float t;
float h;
int f;
char buff2[10];
38
String valueString = "";
String ch = "";
void setup()
Serial.begin(9600);
nodemcu.begin(9600);
dht.begin();
lcd.begin(16, 2);
pinMode(motor,OUTPUT);
pinMode(valve,OUTPUT);
lcd.clear();
lcd.setCursor(0,0);
lcd.print("T = H= ");
lcd.setCursor(0,1);
39
lcd.print("Ph= M= , ");
void loop()
StaticJsonDocument<200> doc;
datacollect();
nodemcu.println(soil_value3);
doc["data_S1"] = soil_value3;
nodemcu.println(soil_value4);
doc["data_S2"] = soil_value4;
nodemcu.println(h);
doc["temp"] = t;
nodemcu.println(t);
40
doc["humi"] = h;
nodemcu.println(ch);
doc["Ph_val"] = ch;
serializeJson(doc, nodemcu);
delay(100);
void datacollect()
soil_value1 = analogRead(Soil_Sensor1);
soil_value2 = analogRead(Soil_Sensor2);
soil_value3 = map(soil_value1,0,1024,0,100);
soil_value4 = map(soil_value2,0,1024,100,0);
Serial.print(soil_value3);
41
Serial.println("Soil moisture level Sensor 2= ");
Serial.print(soil_value4);
lcd.setCursor(11,1);
lcd.print(soil_value3);
lcd.setCursor(14,1);
lcd.print(soil_value4);
// ph sensor reading
for(int i=0;i<10;i++) //Get 10 sample value from the sensor for smooth the value
buf[i]=analogRead(Ph_Sensor);
delay(10);
for(int j=i+1;j<10;j++)
if(buf[i]>buf[j])
42
{
temp=buf[i];
buf[i]=buf[j];
buf[j]=temp;
h = dht.readHumidity();
t = dht.readTemperature();
if (isnan(h) || isnan(t))
43
Serial.println(F("Failed to read from DHT sensor!"));
return;
Serial.print(h);
Serial.print(t);
Serial.print(F("C "));
lcd.setCursor(3,0);
lcd.print(t);
lcd.setCursor(11,0);
lcd.print(h);
// ph value calibration
avgValue=0;
44
{
avgValue+=buf[i];
Serial.println(valueString);
ch = valueString;
valueString = "";
delay(1000);
lcd.setCursor(4,1);
lcd.print(ch);
if(soil_value1>limit || soil_value2>limit)
45
digitalWrite(motor,HIGH);
else
digitalWrite(motor,LOW);
For nodemcu:
#include <SoftwareSerial.h>
#include<DHT.h>
#include <LiquidCrystal.h>
#include <ArduinoJson.h>
46
#define Soil_Sensor2 2
unsigned long int avgValue; //Store the average value of the sensor feedback
float b;
int buf[10],temp;
int soil_value1;
int soil_value2;
int soil_value3;
int soil_value4;
47
float t;
float h;
int f;
char buff2[10];
String ch = "";
void setup()
Serial.begin(9600);
nodemcu.begin(9600);
dht.begin();
lcd.begin(16, 2);
48
pinMode(motor,OUTPUT);
pinMode(valve,OUTPUT);
lcd.clear();
lcd.setCursor(0,0);
lcd.print("T = H= ");
lcd.setCursor(0,1);
lcd.print("Ph= M= , ");
void loop()
StaticJsonDocument<200> doc;
datacollect();
49
nodemcu.println(soil_value3);
doc["data_S1"] = soil_value3;
nodemcu.println(soil_value4);
doc["data_S2"] = soil_value4;
nodemcu.println(h);
doc["temp"] = t;
nodemcu.println(t);
doc["humi"] = h;
nodemcu.println(ch);
doc["Ph_val"] = ch;
serializeJson(doc, nodemcu);
delay(100);
void datacollect()
50
soil_value1 = analogRead(Soil_Sensor1);
soil_value2 = analogRead(Soil_Sensor2);
soil_value3 = map(soil_value1,0,1024,0,100);
soil_value4 = map(soil_value2,0,1024,100,0);
Serial.print(soil_value3);
Serial.print(soil_value4);
lcd.setCursor(11,1);
lcd.print(soil_value3);
lcd.setCursor(14,1);
lcd.print(soil_value4);
// ph sensor reading
for(int i=0;i<10;i++) //Get 10 sample value from the sensor for smooth the value
buf[i]=analogRead(Ph_Sensor);
51
delay(10);
for(int j=i+1;j<10;j++)
if(buf[i]>buf[j])
temp=buf[i];
buf[i]=buf[j];
buf[j]=temp;
h = dht.readHumidity();
52
t = dht.readTemperature();
if (isnan(h) || isnan(t))
return;
Serial.print(h);
Serial.print(t);
Serial.print(F("C "));
53
lcd.setCursor(3,0);
lcd.print(t);
lcd.setCursor(11,0);
lcd.print(h);
// ph value calibration
avgValue=0;
avgValue+=buf[i];
Serial.println(valueString);
ch = valueString;
valueString = "";
delay(1000);
54
}
lcd.setCursor(4,1);
lcd.print(ch);
if(soil_value1>limit || soil_value2>limit)
digitalWrite(motor,HIGH);
else
digitalWrite(motor,LOW);
55
NodeMCU Development Board Pinout Configuration
Control EN, RST The pin and the button resets the microcontroller
Pins
SPI Pins SD1, CMD, NodeMCU has four pins available for SPI
SD0, CLK communication.
56
I2C Pins NodeMCU has I2C functionality support but due to
the internal functionality of these pins, you have to
find which pin is I2C.
• UARTs: 1
• SPIs: 1
• I2Cs: 1
• Flash Memory: 4 MB
• SRAM: 64 KB
• PCB Antenna
57
Single-Channel Relay Module Pin Description
2 Ground 0V reference
58
Understanding 5V Single-Channel Relay Module
The single-channel relay module is much more than just a plain relay, it contains components
that make switching and connection easier and act as indicators to show if the module is
powered and if the relay is active.
First is the screw terminal block. This is the part of the module that is in contact with mains
so a reliable connection is needed. Adding screw terminals makes it easier to connect thick
mains cables, which might be difficult to solder directly.
The three connections on the terminal block are connected to the normally open, normally
closed, and common terminals of the relay.
59
The second is the relay itself, which, in this case, is a blue plastic case. Lots of information
can be gleaned from the markings on the relay itself. The part number of the relay on the
bottom says “05VDC”, which means that the relay coil is
activated at 5V minimum – any voltage lower than this will not be able to reliably close the
contacts of the relay. There are also voltage and current markings, which represent the
maximum voltage and current, the relay can switch. For example, the top left marking says
“10A 250VAC”, which means the relay can switch a maximum load of 10A when connected
to a 250V mains circuit. The bottom left rating says “10A 30VDC”, meaning the relay can
switch a maximum current of 10A DC before the contacts get damaged.
The 'relay status LED' turns on whenever the relay is active and provides an indication of
current flowing through the relay coil.
The input jumper is used to supply power to the relay coil and LEDs. The jumper also has the
input pin, which when pulled high activates the relay.
The switching transistor takes an input that cannot supply enough current to directly drive the
relay coil and amplifies it using the supply voltage to drive the relay coil. This way, the input
can be driven from a microcontroller or sensor output. The freewheeling diode prevents
voltage spikes when the relay is switched off. The power LED is connected to VCC and turns
on whenever the module is powered.
60
How Does A Relay Work?
The relay uses an electric current to open or close the contacts of a switch. This is usually
done using the help of a coil that attracts the contacts of a switch and pulls them together
when activated, and a spring pushes them apart when the coil is not energized.
There are two advantages of this system – First, the current required to activate the relay is
much smaller than the current that relay contacts are capable of switching, and second, the
coil and the contacts are galvanically isolated, meaning there is no electrical connection
between them. This means that the relay can be used to switch mains current through an
isolated low voltage digital system like a microcontroller.
61
The extra components apart from the relay are there since it would not be possible to drive
the relay directly from the pins of a microcontroller. digital logic or a sensor. This is because
although the coil consumes much less current than the currents it can switch, it still needs
relatively significant current – low power relays consume around 50mA while higherpower
relays consume around 500mA. The coil is also an inductive load, so when the coil is
switched off, a large flyback voltage is developed which can damage the deviceturning it on
and off. For this reason, a flyback diode is added anti-parallel to the relay oil to clamp the
flyback voltage.
LEDs can be added to this basic circuit to act as indicators, and sometimes even optical
isolation is added to the input to further improve the isolation.
62
How to use Single-Channel Relay Module
Relay modules like this one are commonly used to drive mains loads from a microcontroller
like the Arduino or a sensor. In cases like this, the common circuit diagram would be as
follows.
For simple on/off applications, the relay can be connected as shown above. One terminal
63
PIN DIAGRAM OF ARDUINO
in Pin Details
Category Name
Power Vin, Vin: Input voltage to Ardiuno when using an external power source.
3.3V, 5V: Regulated power supply used to power microcontroller and other
5V, components on the board.
GND 3.3V: 3.3V supply generated by on-board voltage regulator. Maximum
current draw is 50mA.
GND: ground pins.
64
PWM 3, 5, 6, Provides 8-bit PWM output.
9, 11
65
Ardiuno Uno Technical Specifications
Operating Voltage 5V
SRAM 2 KB
EEPROM 1 KB
66
Soil moisture sensor
VCC
The Vcc pin powers the module, typically with +5V
67
1.5.3 Humidity sensor
68
Node MCU (ESP8266) Wi-Fi Module:
• UARTs: 1
• SPIs: 1
69
• I2Cs: 1
• Flash Memory: 4 MB
• SRAM: 64 KB
• PCB Antenna
Control EN, RST The pin and the button resets the microcontroller
Pins
70
Analog A0 Used to measure analog voltage in the range of 0-3.3V
Pin
SPI Pins SD1, CMD, NodeMCU has four pins available for SPI
SD0, CLK communication.
PH SENSOR
71
Ph sensor Development Board Pinout Configuration
Included in pH Sensor
Quantity 1
Description Use the pH Sensor just as you would a traditional pH meter with the additional
advantages of automated data collection, graphing, and data analysis
See Also: User Manual
Assembly N/A
Instructions
72
Solenoid Valve
Input voltage 6V
Dimension 3’’×2.25’’×2’’
Current 320 mA
73
Water Pump
74
Specifications & Features of Water Pump
Title Description
Operating temperature 80 ͦ C
Size 90x40x35 mm
75
LCD Display
Terminal1 GND
Terminal2 +5V
Terminal5 Read/Write(RW)
Terminal6 Enable
Terminal7 DB0
Terminal8 DB1
76
Terminal9 DB2
Terminal10 DB3
Terminal11 DB4
Terminal12 DB5
Terminal13 DB6
Terminal14 DB7
Terminal15 +4.2-5V
Terminal16 GND
JUMPER WIRE
77
Color: 120pcs Assorted (40pin Female to Female/40pin Male to Male/40pin Male to
Female)
•
• Package include: 20cm (7.9inch) / 40pin Female to Female jumper wires / 40pin Male to
Female jumper wires / 40pin Male to Male jumper wires (Total 120pcs)
• Connector Type: Standard 2.54mm pitch dupont housing connector / 1pin-1pin
• Cable length: 20cm (7.9 inch) / Cable material: 12-core pure copper wire
• Cable features: Separable multicolored (10 colors) softness ribbon cables
• For DIY experiment / Electronic projects / Breadboard / PC motherboard / PCB project
78