Finalproject Proposal Format BE 1

Download as pdf or txt
Download as pdf or txt
You are on page 1of 87

POKHARA UNIVERSITY

SCHOOL OF ENGINEERING

UNITED TECHNICAL COLLEGE

FINAL YEAR REPORT


ON
“DEMOSTRATION OF SMART DRIP IRRIGATION
SYSTEM USING
INTERNET OF THINGS”
(As a partial fulfillment of B.E. in Electrical and Electronics
Engineering)
Project supervisor
Er.shiva Shrestha
Lecture of electrical and electronics engineering
United technical college
Submitted By:
Sushil Shrestha (2016-1-48-110)
Kiran Babu Sunar (2016-1-48-099)
Kamal adhikari (2016-1-48-098)
Akshendra dev Pandit (2016-1-48-092)
Submitted To:
Department of Electrical and Electronics Engineering
July, 2021
DEPARTMENTAL ACCEPTANCE

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.

Sushil Shrestha (2016-1-48-110)


Kamal Adhikari (2016-1-48-098)
Kiran Babu Sunar (2016-1-48-099)
Akshendra Dev Pandit (2016-1-48-092)

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.

Keywords-Drip irrigation, IDAA

v
TABLE OF CONTENT

SUPERVISOR’S RECOMMENDATION…………………………………………………i

AKNOLEDGMENT………………………………………………………………………...ii

LIST OF FIGURES …………………………………………………………………… iii

AKNOLEDGMENT …………………………………………………………………….. iv

ABSTRACT ………………………………………………………………………………..v

TABLE OF CONTENT…………………………………………………………………….vi

LIST OF FIGURES……………………………………………………………………….viii

LIST OF TABLES…………………………………………………………………………………………………………………….ix

CHAPTER1: INTRODUCTION ................................................................................ 1

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

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

1.3 Motivation ........................................................................................................ 2

1.4 Objectives ......................................................................................................... 3

1.5 HARDWARE REQUIREMENT ..................................................................... 4

1.5.1 Ardiuno UNO........................................................................................................ 4

1.5.2 soilmoisture sensor................................................................................................ 7

1.5.3 Humidity sensor .................................................................................................... 8

1.5.4 Jumper wire…… ................................................................................................... 9

1.5.5 Node MCU (ESP8266) Wi-Fi Module: ........................................................ 10

1.5.6 PH SENSOR………… ...................................................................................... 12

1.5.7 Solenoid Valve .................................................................................................... 13

1.5.8 Water Pump…… ................................................................................................ 14

vi
1.5.9 LCD Display…….. ............................................................................................. 15

1.5.10 Polytube……. ................................................................................................... 17

1.5.11 Polytube……. ................................................................................................... 18

1.6 Applications ........................................................................................................... 19

1.7 BASIS of IOT............ ........................................................................................... 19

1.8 Limitation of project ............................................................................................ 20

CHAPTER 2: LITERATURE REVIEW ................................................................ 21

CHAPTER 3: METHODOLOGY ........................................................................... 23

3.1 flow of project .................................................................................................. 23

3.2 Block diagram .................................................................................................. 24

3.3 working flowchart ............................................................................................ 25

3.4 dripping algorithm ........................................................................................... 26

3.5 Drip Irrigation System ..................................................................................... 26

CHAPTER 4: EPILOGUE........................................................................................ 29

Table 4.1: Cost Estimation ..................................................................................... 29

Table 4.2: work schedule ....................................................................................... 30

CHAPTER 5: RESULT AND DISCUSSION.......................................................... 31

Table 5.1:Result ..................................................................................................... 31

Table 5.2:discussion ............................................................................................... 33

CHAPTER 5: RESULT AND DISCUSSION ........................................................ 34

Table 6.1Challenges:.............................................................................................. 34

Table 6.2: Future work .......................................................................................... 34

REFERENCES ............................................................................................................ 35

APPRNDIX................................................................................................................. 37

vii
LIST OF FIGURES PAGE

Figure 1.1: Ardiuno……………………………………………………………….4

Figure 1.2: soil moisture sensor…………………………………………………...7

Figure1.3: humidity sensor………………………………………………………..8

Figure1. 4: jumper wire……………………………………………………………9

Figure1.5: ESP8266 Wi-Fi module………………………………………………10

Figure 1.6: ph sensor………………………………………………………………12

Figure 1.7: solenoid valve…………………………………………………………13

Figure 1.8: water pump……………………………………………………………14

Figure 1.9: LCD display…………………………………………………………...15

Figure 1.10: poly tube……………………………………………………………...17

Figure 1.11: relay module………………………………………………………….18

Figure3.1: Flow of Project…………………………………………………………23

Figure3.2: Block diagram of smart drift irrigation system using IOT…….….……24

Figure3.3: flowchart of smart drift irrigation system using IOT…………………...25

Figure 3.4: Drip irrigation system…………………………………………………..26

viii
LIST OF TABLES PAGE

Table 4.1: cost estimation…………………………………………………………..…29

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

1.5.1 Ardiuno UNO

Figure1.1: Arduino

Arduino Uno is a microcontroller board based on 8-bit ATmega328P microcontroller. Along


with ATmega328P, it consists other components such as crystal oscillator, serial
communication, voltage regulator, etc. to support the microcontroller. Arduino Uno has 14
digital input/output pins (out of which 6 can be used as PWM outputs), 6 analog input pins, a
USB connection, A Power barrel jack, an ICSP header and a reset button.

How to use Arduino Board?

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.

Ardiuno Uno has a couple of other pins as explained below:

•AREF: Used to provide reference voltage for analog inputs with analog Reference()
function.

•Reset Pin: Making this pin LOW, resets the microcontroller.

5
1.5.1.1 Arduino Uno Technical Specifications

Microcontroller ATmega328P – 8 bit AVR family


microcontroller

Operating Voltage 5V

Recommended Input Voltage 7-12V

Input Voltage Limits 6-20V

Analog Input Pins 6 (A0 – A5)

Digital I/O Pins 14 (Out of which 6 provide PWM output)

DC Current on I/O Pins 40 mA

DC Current on 3.3V Pin 50 mA

Flash Memory 32 KB (0.5 KB is used for Bootloader)

SRAM 2 KB

EEPROM 1 KB

Frequency (Clock Speed) 2 Hz

6
1.5.2 Soil moisture sensor

Figure1.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

Figure1.3: Humidity Sensor


The most critical task in humidity measurement is a stable detection of a correct humidity
level within an acceptable response time. Coverage of the full measurement range from 0 %
RH to 100 % RH is mandatory. Needless to say, stability of the humidity sensor should
remain unchanged, even if operated under elevated conditions over an extended period.
Temperature and environmental influences of the individual application have significant
impact on the sensor's long-term stability. Through specially developed polymers and use of
high quality materials, our humidity sensors and modules address the challenges of
temperature cycling and exposure to aggressive chemicals.

8
1.5.4 Jumper wire

Figure1.4: Jumper Wire


A jumper wire (also known as jumper, jumper wire, jumper cable, DuPont wire or cable) is
an electrical wire, or group of them in a cable, with a connector or pin at each end (or
sometimes without them – simply "tinned"), which is normally used to interconnect the
components of a breadboard or other prototype or test circuit, internally or with other
equipment or components, without soldering.
Individual jump wires are fitted by inserting their "end connectors" into the slots provided in
a breadboard, the header connector of a circuit board, or a piece of test equipment.

9
1.5.5 Node MCU (ESP8266) Wi-Fi Module:

Figure1.5: Wi-Fi Module


NodeMCU is an advanced API for hardware input/output device which can be
dramatically reduces the work for configuring manipulative hardware. It uses a code like
Arduino but rather is an interactive script called Lua. It is an open source IoT platform.
It runs on a firmware of ESP8266 WiFi Soc produced by Espressif systems.
NodeMCU has 16 input/output pins and hence 16 nodes can be connected to a single
node. The ESP8266 is Wi-Fi Soc which is integrated with a Tensilica Xtensa LX106 core
which is widely used in IoT applications.” NodeMCU” refers in default to the firmware
rather than the development kits. ESP8266 is an inbuilt WiFi module which can also be used
as an individual module as a Wifi 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

• Operating Voltage: 3.3V

• Input Voltage: 7-12V

• Digital I/O Pins (DIO): 16

• Analog Input Pins (ADC): 1

• UARTs: 1

• SPIs: 1

• I2Cs: 1

• Flash Memory: 4 MB

• SRAM: 64 KB

• Clock Speed: 80 MHz

• USB-TTL based on CP2102 is included onboard, Enabling Plug n Play

• PCB Antenna

• Small Sized module to fit smartly inside your IoT projects

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

• Type: Sealed, gel-filled, epoxy body, Ag/AgCl

• Response time: 90% of final reading in 1 second

• Temperature range: 5 to 80°C (readings not compensated)

• Range: pH 0–14

• Accuracy: +/- 0.2 pH units

• Isopotential pH: pH 7 (point at which temperature has no effect)

• Default calibration values: slope: –3.838, intercept: 13.720

• Shaft Diameter: 12 mm OD

12
1.5.7 Solenoid Valve

Figure1.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.

Specifications & Features of Solenoid valve


Title Description

Input voltage 6V

Temperature of working 1 ͦC-75 ͦC

Dimension 3’’×2.25’’×2’’

Current 320 mA

Opening responsig time ≤ 0.15 sec

13
1.5.8 Water Pump

Figure1.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.

Specifications & Features of Water Pump


Title Description

Input Voltage 6-12 VDC

Rate of Flow 1.5-2 L/min

Operating temperature 80 ͦ C

Operating Current 0.5-0.7A

Distance of Suction 2 meter (Max)

Pump Life 2500 Hour

14
Size 90x40x35 mm

1.5.9 LCD Display

Figure1.9 LCD Display

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.

A Read/Write (R/W) pin that selects reading mode or writing mode

An Enable pin that enables writing to the registers

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.

Specifications & Features of LCD Display

Title Description

Terminal1 GND

Terminal2 +5V

Terminal3 Mid terminal of Potentiometer(For Brightness


Control)

Terminal4 Register Select(RS)

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

Polytube is manufacture by using advance extrusion technology. It has no effect of UV


radiation and also no environmental effects. The smooth linear surface minimize frictional
losses. It also has excellent flow characteristics.

Technical specifications

Nominal Dia nominal dia wall thickness mm


cl-1 cl-2 cl-3
12mm 1o.5mm 0.4-0.5 0.6-0.7 0.8-1.0
16mm 14.2mm 0.5-0.6 0.7-0.9 0.9-1.2
20mm 18mm 0.6-0.7 0.9-1.1 1.2-1.4

17
1.5.11 Relay Module

Figure1.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

• Supply voltage – 3.75V to 6V


• Quiescent current: 2mA
• Current when the relay is active: ~70mA
• Relay maximum contact voltage – 250VAC or 30VDC
• Relay maximum current – 10A

18
1.6 Applications

• It can be used to cultivation purposes.


• It can be used to provide water in nursery planting area.
• It can be agricultural fields , field , lawn and as drip irrigation system
• It can be used for wide range of crops as one customize references required for
different kind of crops.
• Pond water management and water transfer.

1.7 BASIS OF IOT

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].

“A wireless application of drip irrigation automation supported by soil moisture sensors” in


this paper irrigation is carried out using soil moisture values but extend to this proposed
system displays temperature and humidity values [8].

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

3.1 Flow of project

Identify objectives

Review literature

Choice of material

Built and small test

Combine all codes

Sequence scenario

Solve the problem

system
Mobile application

Review and test

Conclusion

Figure3.1: Flow of Project

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

Collect Data Using Sensors

S.M1>400

S.M2>400

YES

Motor
ON

Send Data To NodeMCU

Send Data TO Blynk Server

END

Figure3.3: flowchart of smart drift irrigation system using IOT

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.

3.4 Dripping algorithm:

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.

3.5 Drip Irrigation System

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

Table 4.1: Cost Estimation

S.N Component Price

1 Ardiuno UNO Rs.2,500

2 Soil Moisture sensor Rs.1,500

3 DHT11 Rs.1,500

4 NodeMCU(ESP8266) Rs.2,000

5 Jumper wire Rs.1,000

6 LCD display Rs.1,000

7 Water pump Rs.3,000

8 Poly tube Rs.1,000

9 Solenoid valve Rs.1,000

10 Rely Module Rs.1,000

11 PH Sensor Rs.1,500

12 Miscellaneous Rs.5,500

13 Documentation Rs.5000

Total Rs.25,000

Table 4.1: cost estimation

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

Table 0.2: work schedule

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.

6.2 Future work

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.

[4] R.Hussain, J.Sehgal, A.Gangwar, M.Riyag“Control of irrigation automatically by using


wireless sensor network” International journal of soft computing and engineering, vol.3,
issue 1, march 2013.

[5]Jeonghwan Hwang, Changsun Shin, and Hyun Yoe “Study on an Agricultural


Environment Monitoring Server System using Wireless Sensor Networks”, 2010.

[6] LaxmiShabadi, NandiniPatil, Nikita. M, Shruti. J, Smitha. P&Swati. C, and Software


Engineering, Volume4, Issue 7, July 2014. “Irrigation Control System Using Android
and GSM for Efficient Use of Water and Power”, International Journal of Advanced
Research in Computer Science

[7] S. R. Kumbhar, Arjun P. Ghatule, “Microcontroller based Controlled Irrigation System


for Plantation”, Proceedings of the International MultiConference of Engineers and
Computer Scientists 2013VolumeII, March 2013.

[8] MahirDursun and SemihOzden, “A wireless application of drip irrigation automation


supported by soil moisture sensors”, Scientific Research and Essays, Volume 6(7), pp.
1573-1582, 4 April, 2011.

[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.

[15]Dr. Al Humairi, A. (2016). Introduction to Arduino. Embedded Systems Course Material.

36
APPENDICES

Coding for ardiuno Uno

#include <SoftwareSerial.h>

#include<DHT.h>

#include <LiquidCrystal.h>

#include <ArduinoJson.h>

SoftwareSerial nodemcu(9,10); // communication between nodemcu and arduino

#define Ph_Sensor 0 //pH meter Analog output to Arduino Analog Input 0

#define Soil_Sensor1 1 // SoilMoisture Sesnsro connected to the arduino analog pin 1

#define Soil_Sensor2 2

#define DHTPIN 8 //DHT sensor connected in D/I pin 8

#define DHTTYPE DHT11 // defining type of DHT sensor used

DHT dht(DHTPIN, DHTTYPE); // createing class for DHT sensor

const int rs = 11, en = 12, d4 = 5, d5 = 4, d6 = 3, d7 = 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 limit = 400;

int motor = 13;

int valve = 10;

int soil_value1;

int soil_value2;

int soil_value3;

int soil_value4;

float t;

float h;

// for float value to string converstion

int f;

float val; // also works with double.

char buff2[10];

38
String valueString = "";

String Value = "";

String ch = "";

void setup()

Serial.begin(9600);

nodemcu.begin(9600);

dht.begin();

lcd.begin(16, 2);

pinMode(motor,OUTPUT);

pinMode(valve,OUTPUT);

Serial.println("all the sensor has been set up");

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()

delay(1000); // to initilise the sensors

// soil moisture reading

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.println("Soil moisture level Sensor 1= ");

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 i=0;i<9;i++) //sort the analog from small to large

for(int j=i+1;j<10;j++)

if(buf[i]>buf[j])

42
{

temp=buf[i];

buf[i]=buf[j];

buf[j]=temp;

// DHT sensro reading

h = dht.readHumidity();

t = dht.readTemperature();

// DHT sensor testing

if (isnan(h) || isnan(t))

43
Serial.println(F("Failed to read from DHT sensor!"));

return;

// DHT sensor data display

Serial.println(F(" Humidity: "));

Serial.print(h);

Serial.println(F("% Temperature: "));

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;

for(int i=2;i<8;i++) //take the average value of 6 center sample

44
{

avgValue+=buf[i];

float phValue=(float)avgValue*5.0/1024/6; //convert the analog into millivolt

phValue=3.5*phValue; //convert the millivolt into pH value

Value = dtostrf(phValue, 4, 2, buff2); //4 is mininum width, 6 is precision

valueString = valueString + Value;

Serial.println(valueString);

ch = valueString;

valueString = "";

delay(1000);

lcd.setCursor(4,1);

lcd.print(ch);

// soil moisture actuating

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>

SoftwareSerial nodemcu(9,10); // communication between nodemcu and arduino

#define Ph_Sensor 0 //pH meter Analog output to Arduino Analog Input 0

#define Soil_Sensor1 1 // SoilMoisture Sesnsro connected to the arduino analog pin 1

46
#define Soil_Sensor2 2

#define DHTPIN 8 //DHT sensor connected in D/I pin 8

#define DHTTYPE DHT11 // defining type of DHT sensor used

DHT dht(DHTPIN, DHTTYPE); // createing class for DHT sensor

const int rs = 11, en = 12, d4 = 5, d5 = 4, d6 = 3, d7 = 2;

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 limit = 400;

int motor = 13;

int valve = 10;

int soil_value1;

int soil_value2;

int soil_value3;

int soil_value4;

47
float t;

float h;

// for float value to string converstion

int f;

float val; // also works with double.

char buff2[10];

String valueString = "";

String Value = "";

String ch = "";

void setup()

Serial.begin(9600);

nodemcu.begin(9600);

dht.begin();

lcd.begin(16, 2);

48
pinMode(motor,OUTPUT);

pinMode(valve,OUTPUT);

Serial.println("all the sensor has been set up");

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()

delay(1000); // to initilise the sensors

// soil moisture reading

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.println("Soil moisture level Sensor 1= ");

Serial.print(soil_value3);

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);

51
delay(10);

for(int i=0;i<9;i++) //sort the analog from small to large

for(int j=i+1;j<10;j++)

if(buf[i]>buf[j])

temp=buf[i];

buf[i]=buf[j];

buf[j]=temp;

// DHT sensro reading

h = dht.readHumidity();

52
t = dht.readTemperature();

// DHT sensor testing

if (isnan(h) || isnan(t))

Serial.println(F("Failed to read from DHT sensor!"));

return;

// DHT sensor data display

Serial.println(F(" Humidity: "));

Serial.print(h);

Serial.println(F("% Temperature: "));

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;

for(int i=2;i<8;i++) //take the average value of 6 center sample

avgValue+=buf[i];

float phValue=(float)avgValue*5.0/1024/6; //convert the analog into millivolt

phValue=3.5*phValue; //convert the millivolt into pH value

Value = dtostrf(phValue, 4, 2, buff2); //4 is mininum width, 6 is precision

valueString = valueString + Value;

Serial.println(valueString);

ch = valueString;

valueString = "";

delay(1000);

54
}

lcd.setCursor(4,1);

lcd.print(ch);

// soil moisture actuating

if(soil_value1>limit || soil_value2>limit)

digitalWrite(motor,HIGH);

else

digitalWrite(motor,LOW);

55
NodeMCU Development Board Pinout Configuration

Pin Name Description


Category

Power Micro-USB, Micro-USB: NodeMCU can be powered through the


3.3V, GND, USB port
Vin

3.3V: Regulated 3.3V can be supplied to this pin to


power the board

GND: Ground pins

Vin: External Power Supply

Control EN, RST The pin and the button resets the microcontroller
Pins

Analog A0 Used to measure analog voltage in the range of 0-3.3V


Pin

GPIO Pins GPIO1 to NodeMCU has 16 general purpose input-output pins


GPIO16 on its board

SPI Pins SD1, CMD, NodeMCU has four pins available for SPI
SD0, CLK communication.

UART TXD0, NodeMCU has two UART interfaces, UART0 (RXD0


Pins RXD0, & TXD0) and UART1 (RXD1 & TXD1). UART1 is
TXD2, RXD2 used to upload the firmware/program.

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.

NodeMCU ESP8266 Specifications & Features


• Microcontroller: Ten silica 32-bit RISC CPU Xtensa LX106

• Operating Voltage: 3.3V

• Input Voltage: 7-12V

• Digital I/O Pins (DIO): 16

• Analog Input Pins (ADC): 1

• UARTs: 1

• SPIs: 1

• I2Cs: 1

• Flash Memory: 4 MB

• SRAM: 64 KB

• Clock Speed: 80 MHz

• USB-TTL based on CP2102 is included onboard, Enabling Plug n Play

• PCB Antenna

• Small Sized module to fit smartly inside your IoT projects

57
Single-Channel Relay Module Pin Description

Pin Number Pin Name Description

1 Relay Trigger Input to activate the relay

2 Ground 0V reference

3 VCC Supply input for powering the


relay coil

4 Normally Open Normally open terminal of the


relay

5 Common Common terminal of the relay

6 Normally Closed Normally closed contact of the


relay

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.

Internal Circuit Diagram for Single Channel Relay Module


The circuit on the PCB is quite simple.

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

of mains is connected to common, and the other is connected to NO or NC depending on

whether the load should be connected/disconnected when the relay is active.

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.

Reset Reset Resets the microcontroller.

Analog Pins A0 – Used to provide analog input in the range of 0-5V


A5

Input/output Digital Can be used as input or output pins.


Pins Pins 0 –
13

Serial 0(Rx), Used to receive and transmit TTL serial data.


1(Tx)

External 2, 3 To trigger an interrupt.


Interrupts

64
PWM 3, 5, 6, Provides 8-bit PWM output.
9, 11

SPI 10 (SS), Used for SPI communication.


11
(MOSI),
12
(MISO)
and 13
(SCK)

Inbuilt LED 13 To turn on the inbuilt LED.

TWI A4 Used for TWI communication.


(SDA),
A5
(SCA)

AREF AREF To provide reference voltage for input voltage.

65
Ardiuno Uno Technical Specifications

Microcontroller ATmega328P – 8 bit AVR family microcontroller

Operating Voltage 5V

Recommended Input Voltage 7-12V

Input Voltage Limits 6-20V

Analog Input Pins 6 (A0 – A5)

Digital I/O Pins 14 (Out of which 6 provide PWM output)

DC Current on I/O Pins 40 mA

DC Current on 3.3V Pin 50 mA

Flash Memory 32 KB (0.5 KB is used for Bootloader)

SRAM 2 KB

EEPROM 1 KB

Frequency (Clock Speed) 2 Hz

66
Soil moisture sensor

1.5.2 .1 Moisture Sensor Module Pinout Configuration

Pin Name Description

VCC
The Vcc pin powers the module, typically with +5V

GND Power Supply Ground

DO Digital Out Pin for Digital Output.

AO Analog Out Pin for Analog Output

67
1.5.3 Humidity sensor

68
Node MCU (ESP8266) Wi-Fi Module:

NodeMCU ESP8266 Specifications & Features


• Microcontroller: Ten silica 32-bit RISC CPU Xtensa LX106

• Operating Voltage: 3.3V

• Input Voltage: 7-12V

• Digital I/O Pins (DIO): 16

• Analog Input Pins (ADC): 1

• UARTs: 1

• SPIs: 1

69
• I2Cs: 1

• Flash Memory: 4 MB

• SRAM: 64 KB

• Clock Speed: 80 MHz

• USB-TTL based on CP2102 is included onboard, Enabling Plug n Play

• PCB Antenna

• Small Sized module to fit smartly inside your IoT projects

NodeMCU Development Board Pinout Configuration

Pin Name Description


Category

Power Micro-USB, Micro-USB: NodeMCU can be powered through the


3.3V, GND, USB port
Vin

3.3V: Regulated 3.3V can be supplied to this pin to


power the board

GND: Ground pins

Vin: External Power Supply

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

GPIO Pins GPIO1 to NodeMCU has 16 general purpose input-output pins


GPIO16 on its board

SPI Pins SD1, CMD, NodeMCU has four pins available for SPI
SD0, CLK communication.

UART TXD0, NodeMCU has two UART interfaces, UART0 (RXD0


Pins RXD0, & TXD0) and UART1 (RXD1 & TXD1). UART1 is
TXD2, RXD2 used to upload the firmware/program.

I2C Pins NodeMCU has I2C functionality support but due to


the internal functionality of these pins, you have to
find which pin is I2C.

PH SENSOR

71
Ph sensor Development Board Pinout Configuration

Title Vernier pH Sensor

TI Item Name n/a

Vernier Order PH-BTA


Code

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

Category Environmental Sensors

Hub Connection TI-Sensor Link Adapter for TI-Innovator™ Hub

Assembly N/A
Instructions

Precautions Place the electrode in pH 4 or pH 7 buffer solution. It should never be stored in


distilled water. If the electrode is inadvertently stored dry for a short period of
time, immerse the tip in the pH 4 buffer/KCl storage solution for a minimum of 8
hours prior to use.

Specifications • Type: Sealed, gel-filled, epoxy body, Ag/AgCl


• Response time: 90% of final reading in 1 second
• Temperature range: 5 to 80°C (readings not compensated)
• Range: pH 0–14
• Accuracy: +/- 0.2 pH units
• Isopotential pH: pH 7 (point at which temperature has no effect)
• Default calibration values: slope: –3.838, intercept: 13.720
• Shaft Diameter: 12 mm OD

See Also: Full Specifications here

72
Solenoid Valve

Specifications & Features of Solenoid valve


Title Description

Input voltage 6V

Temperature of working 1 ͦC-75 ͦC

Dimension 3’’×2.25’’×2’’

Current 320 mA

Opening responsig time ≤ 0.15 sec

73
Water Pump

74
Specifications & Features of Water Pump
Title Description

Input Voltage 6-12 VDC

Rate of Flow 1.5-2 L/min

Operating temperature 80 ͦ C

Operating Current 0.5-0.7A

Distance of Suction 2 meter (Max)

Pump Life 2500 Hour

Size 90x40x35 mm

75
LCD Display

Figure1.9 LCD Display

Specifications & Features of LCD Display


Title Discription

Terminal1 GND

Terminal2 +5V

Terminal3 Mid terminal of Potentiometer(For Brightness


Control)

Terminal4 Regisrer Select(RS)

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

Length: 7.8 inch (20cm)


• 3.9 inch (10cm)

• 5.9 inch (15cm)

• 7.8 inch (20cm)

• 11.8 inch (30cm)

• 15.7 inch (40cm)

• 19.7 inch (50cm)

• 39.4 inch (100cm)

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

You might also like