Report Smart Irrigation Based On Iot Final
Report Smart Irrigation Based On Iot Final
GHAZIABAD-201009
(An autonomous Institution affiliated to
UTTAR PRADESH Technical University, Lucknow–201009)
Conducted by
TEJASW TOMAR – 1900320400069
TUSHAR CHOUDHARY – 190032000070
SUDHANSHU KSHYAP – 1900320400063
PRATEEK SINGH TOMAR – 1900320400055
VIJAY KUMAR – 1900320400073
CERTIFICATE
Certified that this report on the final year project entitled “SMART IRRIGATION
SYSTEM BASED ON INTERNET OF THINGS”. Is a bonafied work carried out by
3
Department of Mechanical Engineering ABES Engineering College, Ghaziabad
College, Ghaziabad
Dr. NAMAN JAIN Dr. Dr.
Examiner I Examiner II
Signature
with date:
Name:
4
Department of Mechanical Engineering ABES Engineering College, Ghaziabad
College, Ghaziabad
ACKNOWLEDGMENT
The completion of any project depends upon cooperation, co-ordination and
combined efforts of several sources of knowledge. This report acknowledges a
number of guidance, supervision, stimulation and lot of inspiration from
numerous people. First of all, we thank the almighty for the blessings that have
been showered upon us to complete this project work successfully. It is our
privilege to express our sincerest regards to our project guide Prof. NAMAN
JAIN for his valuable inputs, able guidance, encouragement, whole-hearted
cooperation and constructive criticism throughout the duration of our project.
We are thankful to Prof. NAMAN JAIN, Assistance Professor, Department of
Mechanical Engineering for supporting us to provide necessary resources.
We are thankful to Prof. Dr. D E V E N D R A K U M A R , H.O.D of
MECHNAICAL DEPARTMENT ABES ENGINEERING COLLEGE,
GHAZIABAD, for supporting us to carry out this work successfully and
extending the resources of the department.
We take the opportunity to thank all our lectures who have directly or indirectly
helped our project. We pay our respects and love to our parents and all other
family members and friends for their love encouragement throughout our career.
Last but not the least we express our thanks to our friends for their cooperation
and support.
5
Department of Mechanical Engineering ABES Engineering College, Ghaziabad
College, Ghaziabad
ABSTRACT
The project describes the smart irrigation system using the concept of IoT. The
project uses a GSM module (ESP8266-12) which connects the system to internet.
This module controls a motor and two solenoid valves for supplying water to the
field on the information obtained from a water level indicator and two soil
moisture sensors. This whole system is monitored and controlled by GSM Module
through internet. The project also depicts the concept of Internet of Things (IoT).
6
Department of Mechanical Engineering ABES Engineering College, Ghaziabad
College, Ghaziabad
CONTENTS
CHAPTER 1: INTRODUCTION AND LITERATURE SURVEY 1
1.1 Introduction 1
1.2 Motivation 1
2.1 Definition 3
2.2 Introduction 3
2.4.1 MQTT 8
3.1 Arduino 11
7
Department of Mechanical Engineering ABES Engineering College, Ghaziabad
College, Ghaziabad
3.1.1 Introduction to Arduino Boards 11
Introduction to ESP8266
3.2.9 AT Commands 18
List of Components 25
Physical Connection 27
4.3 Results 28
8
Department of Mechanical Engineering ABES Engineering College, Ghaziabad
College, Ghaziabad
CHAPTER 5: PROJECT EXPENDITURE 33
CHAPTER 6: CONCLUSION 34
REFERENCES 34
PHOTO GALLERY 35
9
Department of Mechanical Engineering ABES Engineering College, Ghaziabad
College, Ghaziabad
CHAPTER 1
INTRODUCTION AND LITERATURE REVIEW
1.1 Introduction
India is the country of village and agriculture plays an important role for development of
country. In our country, agriculture depends on the monsoons which has insufficient source
of water. So, the irrigation is used in agriculture 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 about the fertility of soil and second to measure moisture content in
soil. Nowadays, for irrigation, different techniques are available which are used to
reduce the dependency of rain. And mostly this technique is driven by electrical power
and on/off scheduling. In this technique, water level indicator placed in water reservoir and
soil moisture sensors are placed root zone of plant and near the module and gateway unit
handles the sensor information and transmit data to the controller which in turns the
control the flow of water through the valves.
1.2 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 in food production. Agriculture plays the important role in the economy and
development, like India. 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 defined as the science
of artificial application of water to the land or soil that means depending on the soil type,
plant is to be provided with water.
1
Department of Mechanical Engineering ABES Engineering College Ghaziabad, 0
1.4 Literature Review
1. In irrigation field, soil moisture sensor, temperature sensors are placed in root of plant
and microcontroller handles the sensor information and transmits data. One algorithm
was developed to measure threshold values of temperature sensor and soil moisture
sensor that was programmed into a microcontroller to control water quantity.[1]
2. A model of automatic irrigation system which is based on microcontroller and solar
power was used only for source of power supply. Various sensor are placed in paddy
field. Sensors sense water level continuously and give the information to farmer
through cellular phone. Farmer controls the motor using cellular phone without going
in paddy field. If the water level reaches at danger level, automatically motor will be
off without conformation of farmer.[1].
3. A study by Meena et al. (2020) identified that smart irrigation systems using IoT can
significantly reduce water usage and increase crop yields. The researchers found that
IoT-based sensors, combined with machine learning algorithms, can accurately
determine soil moisture levels and adjust irrigation accordingly, resulting in up to
40% reduction in water usage and up to 30% increase in crop yields
4. In another study, Dhar Adhikari and Kulkarni (2019) highlighted the importance of
IoT-based smart irrigation systems in addressing water scarcity issues. The authors
stated that these systems can provide real-time monitoring and control of water usage,
allowing farmers to make informed decisions and optimize their irrigation practices.
5. A review by Zhang et al. (2021) identified that the integration of IoT-based smart
irrigation systems with weather forecasting can further improve their performance.
The authors found that by utilizing weather data, these systems can adjust irrigation
schedules in advance to avoid water loss due to rainfall or high humidity.
6. In a systematic review, Jat et al. (2021) identified several key factors that influence
the adoption and effectiveness of IoT-based smart irrigation systems. These factors
include the availability of reliable and affordable sensors, user-friendly interfaces, and
reliable connectivity. The authors emphasized the need for further research to address
these challenges and promote widespread adoption of these systems.
7. Finally, a study by Lee et al. (2020) explored the potential of IoT-based smart
irrigation systems to improve water quality. The authors found that by optimizing
irrigation practices, these systems can reduce fertilizer and pesticide runoff, which can
improve water quality and reduce environmental pollution.
8. "Smart Irrigation System using IoT for Agriculture" by V. C. Arun et al. (2020)
1
Department of Mechanical Engineering ABES Engineering College Ghaziabad, 1
This paper discusses the implementation of a smart irrigation system using IoT
technology in agriculture. The system uses sensors to collect data on soil moisture,
temperature, and humidity, which is then analyzed and used to control irrigation
valves. The authors report that the system was successful in reducing water usage and
improving crop yields.
IoT-based Smart Irrigation System using Wireless Sensor Networks" by R. K. Sinha
et al. (2020)
This paper presents a smart irrigation system that uses wireless sensor networks
(WSNs) to monitor soil moisture and control irrigation valves. The authors report that
their system was able to improve water efficiency and reduce water consumption in
agricultural fields.
Overall, the literature suggests that IoT-based smart irrigation systems have significant
potential to improve water usage, increase crop yields, and address water scarcity and
environmental issues. However, further research is needed to address technical and
adoption challenges and promote widespread implementation of these systems.
1
Department of Mechanical Engineering ABES Engineering College Ghaziabad, 2
CHAPTER 2 BASICS OF IoT
2.1 Definition
2.2 Introduction
The Internet of Things (IoT) is the network of physical objects devices, vehicles,
buildings and other items embedded with electronics, software, sensors, and network
connectivity that enables these objects to collect and exchange data. The IoT allows objects to
be sensed and controlled remotely across existing network infrastructure, creating
opportunities for more direct integration of the physical world into computer based systems,
and resulting in improved efficiency, accuracy and economic benefit, when IoT is augmented
with sensors and actuators, the technology becomes an instance of the more general class of
cyber physical systems, which also encompasses technologies such as smart grids, smart
homes, intelligent transportation and smart cities. Each thing is uniquely identifiable through
its embedded computing system but is able to interoperate within the existing Internet
infrastructure.
Also, devices could be connected to internet using various means like Wi-Fi, Ethernet and
so on. Furthermore, devices may not need to be connected to internet independently.
Rather a cluster of devices could be created (for example a sensor network) and the base
station or the cluster head could be connected to internet. This leads to more abstract
architecture for communication protocols which ranges from high level to low level.
Most interestingly, these devices must be uniquely discovered. For unique discovery of the
devices in a Network, they need to have unique IP address. IoT devices essentially have
IPv6 addressing scheme. All these devices have either fixed or Subnet masked IP addresses of
type v6. Unique IP addresses makes IoT devices discoverable in the internet as independent
1
Department of Mechanical Engineering ABES Engineering College Ghaziabad, 3
node. This is the most important concept to have in mind to understand IoT.
Since IoT are essentially embedded systems and smart objects connected to internet with
unique IP address which can be discovered and communicated over internet. We have also
seen that the IoT devices may have external peripheral like Actuators and Sensors.
1
Department of Mechanical Engineering ABES Engineering College Ghaziabad, 4
2.3.1 Are Mobile Phones being IoT Devices
One of the most common in day- t o - d a y life are mobile phones. Mobile phone is
essentially an embedded system with a processor at the core having display and keypad. They
support wide variety of sensors like ambient light Sensors, Accelerometer, Gyroscope and so
on. They are connected to internet. Mobile phones get IP addresses, can access internet. In
other words, it virtually fits every description of IoT. So, can we call mobile phones IoT
devices?
This doubt was clarified at a keynote event during Sept 2011's Mobile World Congress in
Barcelona by Qualcomm Chairman and CEO Dr. Paul Jacobs.
Paul Jacobs talked about how mobile technology could be used to connect non-phone, non-
tablet devices called IoT devices and objects to the Internet. In this future where everything
is Web-connected, mobile phones will serve as the hub, or the remote control, for
Internet of Things.
So IoT is internet connectivity of smart objects and embedded system other than mobile
phones which can be connected with external hardware and Mobiles, Tablets, Laptops and
PCs are remote control/access center of IoT.
1
Department of Mechanical Engineering ABES Engineering College Ghaziabad, 5
The most common and popular technologies in IoT will give an overview device. The IoT
devices into two broad categories: The wearable ones and Microcontroller /Microprocessor
driven embedded IoT devices. Some of the embedded devices like Arduino Lilypad are
Monique and it can further utilize them to make wearable solution. But wearable includes
hardware which are pretty standard and IoT has only software scope for the developer. Some
peripheral hardware are which might require are in IoT hardware in embedded level. Apps
can be used with popular wearable platforms, Embedded IoT platform may include
broader technologies like Raspberry Pi, Arduino or Galileo, etc.
Arduino is probably the best starting point for embedded based IoT. Basic Arduino boards
don't come with Ethernet shield or Wi-Fi shield and for Arduino to be able to work as IoT
device, their need to select Arduino with Ethernet shield or Wi-Fi shield. Arduino Yun on the
other hand is a board that comes ported with Ethernet shield.
11
Department of Mechanical Engineering ABES Engineering College Ghaziabad
CHAPTER 3: METHODLOGY AND HARDWARE
1.1.4. Actuators:
The actuators are the devices responsible for carrying out the decisions made by the
algorithm. They control the water flow to the plants and should be able to
communicate with the IoT platform to receive commands.
11
Department of Mechanical Engineering ABES Engineering College Ghaziabad
Cloud storage can be used to store the data collected by the sensors and the insights
generated by the IoT platform. This data can be used for future analysis
Arduino
Arduino is an open-source physical computing platform based on simple input/output board
and development environment that implements the Processing language
(www.processing.org). Arduino can be used to develop standalone interactive objects or can
be connected to software on your computer. The boards can be assembled by hand or purchased
preassembled; the open-source IDE (Integrated Development Environment) can be downloaded
for free from www.arduino.cc.
Arduino is an architecture that combines Atmel microcontroller family with standard hardware
into a board with inbuilt bootloader for plug and play embedded programming. Arduino
Software comes with an IDE that helps writing, debugging and burning program into Arduino.
The IDE also comes with a Serial Communication window through which can easily get the
serial data from the board.
Arduino Uno
11
Department of Mechanical Engineering ABES Engineering College Ghaziabad
The Uno is a microcontroller board based on the ATmega328P. It has 14 digital
input/output pins (of which 6 can be used as PWM outputs), 6 analog inputs, a 16 MHz quartz
crystal, a USB connection, a power jack, an ICSP header and a reset button. Each of the 14
digital pins can be used as an input or output, using pin Mode (), digital Write (), and
digital Read () functions. They operate at 5 volts. Each pin can provide or receive 20 mA as
recommended operating condition and has an internal pull-up resistor (disconnected by
default) of 20-50k ohm. A maximum of 40mA is the value that must not be exceeded on any
I/O pin to avoid permanent damage to the microcontroller.
The Uno has 6 analog inputs, labeled A0 through A5, each of which provide 10 bits of
resolution (i.e. 1024 different values). By default, they measure from ground to 5 volts,
though is it possible to change the upper end of their range using the AREF pin and the
analog Reference () function.
12
Department of Mechanical Engineering ABES Engineering College Ghaziabad
Arduino Uno Technical Speciation’s
Microcontroller ATmega328P
Operating Voltage 5V
Length 68.6 mm
Width 53.4 mm
Weight 25 g
Table 3.1 Technical Specification
ESP8266
Introduction to ESP8266
ESP8266 is a complete and self-contained Wi-Fi network solutions that can carry
software applications, or through another application processor uninstall all Wi-Fi networking
capabilities. ESP8266 when the device is mounted and as the only application of the
application processor, the flash memory can be started directly from an external Move.
Built-in cache memory will help improve system performance and reduce memory
requirements. Another situation is when wireless Internet access assume the task of Wi-Fi
adapter, you can add it to any microcontroller-based design, and the connection is simple,
just by SPI / SDIO interface or central processor AHB bridge interface. Processing and
storage capacity on ESP8266
13
Department of Mechanical Engineering ABES Engineering College Ghaziabad
powerful piece, it can be integrated via GPIO ports sensors and other applications specific
equipment to achieve the lowest early in the development and operation of at least occupy
system resources. The ESP8266 highly integrated chip, including antenna switch balun,
power management converter, so with minimal external circuitry, and includes front-end
module, including the entire solution designed to minimize the space occupied by PCB. The
system is equipped with ESP8266 manifested leading features are: energy saving VoIP
quickly switch between the sleep / wake patterns, with low-power operation adaptive radio
bias, front-end signal processing functions, troubleshooting and radio systems coexist
characteristics eliminate cellular / Bluetooth / DDR / LVDS / LCD interference.
14
Department of Mechanical Engineering ABES Engineering College Ghaziabad
Characteristics of ESP8266
802.11 b / g / n
Built-in TCP / IP protocol stack
Built-in TR switch, balun, LNA, power amplifier and matching network
Built-in PLL, voltage regulator and power management components
802.11b mode + 19.5dBm output power
Built-in temperature sensor
Support antenna diversity
off leakage current is less than 10uA
Built-in low-power 32-bit CPU: can double as an application processor
SDIO 2.0, SPI, UART
STBC, 1x1 MIMO, 2x1 MIMO
A-MPDU, A-MSDU aggregation and the 0.4 Within wake
2ms, connect and transfer data packets
standby power consumption of less than 1.0mW (DTIM3)
15
Department of Mechanical Engineering ABES Engineering College Ghaziabad
Explore ESP8266 GSM Module
The ESP8266 ESP12E Wi-Fi Module is more user friendly with the Explore ESP8266 Wi-Fi
Module. It fits on a breadboard with all pins taken out. The module goes into programming
mode with a single reset switch.
Features:
Fits on a breadboard.
Single button 'Reset' switch for programming. Uses MOSFET's to put the module in
programming mode.
All pins of ESP12E taken out.
Separate serial pins breakout compatible with FTDI cable layout.
On-board LM1117-3.3V regulator.
Works with Arduino IDE for ESP8266.
Programs can easily dumped using USB to TTL converter.
ESP8266 ESP12E features.
16
Department of Mechanical Engineering ABES Engineering College Ghaziabad
Soil Moisture Sensor
This moisture sensor can read the amount of moisture present in the soil surrounding it. It's a
low-tech sensor, but ideal for monitoring an urban garden, or your pet plant's water level.
This is a must have tool for a connected garden. This sensor uses the two probes to pass
current through the soil, and then it reads that resistance to get the moisture level. More
water makes the soil conduct electricity more easily (less resistance), while dry soil
conducts electricity
poorly (more resistance). It will be helpful to remind you to water your indoor plants or to
monitor the soil moisture in your garden.
A Chinese built YL-69 sensors (Figure 3.6) come with a ‘middle-man’ circuit which allows
to get two outputs: one is an analog readout of the resistance between the sensor’s probes and
the second is a digital output (essentially, HIGH or LOW, 5v or 0v) depending on whether
the humidity is above or below a threshold which can in turn be adjusted by a built-in POTS.
The YL-69 sensor has two pins which need to be wired to be the two pins on the YL-38
Bridge. On the other end of the YL-38 have four pins which represent VCC, GND, D0 and
A0. VCC and GND are power pins which should set to 3.3/5V and ground respectively. A0 is
an analog output. D0 is a digital output.
17
Department of Mechanical Engineering ABES Engineering College Ghaziabad
Submersible Water Pump
A submersible pump (or sub pump, electric submersible pump) (figure3.8) is a device which
has a hermetically sealed motor close-coupled to the pump body. The whole assembly is
submerged in the fluid to be pumped. The main advantage of this type of pump is that it
prevents pump cavitation’s, a problem associated with a high elevation difference between
pump and the fluid surface. Small DC Submersible water pumps push fluid to the surface as
opposed to jet pumps having to pull fluids. Submersibles are more efficient than jet pumps. It
is usually operated between 3v to 12v.
Specifications:
Voltage: 2.5-10V
Maximum lift: 40-110cm / 15.75"-43.4"
Flow rate: 80-120L/H
Outside diameter: 7.5mm / 0.3"
Inside diameter: 5mm / 0.2"
Diameter: Approx. 24mm / 0.95"
Length: Approx. 45mm / 1.8"
Height: Approx. 30mm / 1.2"
Material: Engineering plastic
Driving mode: DC design, magnetic driving
Continuous working life for 500 hours
18
Department of Mechanical Engineering ABES Engineering College Ghaziabad
Relay Switch
Relay is an electromagnetic device which is used to isolate two circuits electrically and
connect them magnetically. They are very useful devices and allow one circuit to switch
another one while they are completely separate. They are often used to interface an electronic
circuit (working at a low voltage) to an electrical circuit which works at very high voltage. For
example, a relay can make a 5V DC battery circuit to switch a 230V AC mains circuit. Thus a
small sensor circuit can drive, say, a fan or an electric bulb.
A relay switch can be divided into two parts: input and output. The input section has a coil
which generates magnetic field when a small voltage from an electronic circuit is applied to
it. This voltage is called the operating voltage. Commonly used relays are available in
different configuration of operating voltages like 6V, 9V, 12V, 24V etc. The output section
consists of contactors which connect or disconnect mechanically. In a basic relay there are
three contactors: normally open (NO), normally closed (NC) and common (COM). At no
input state, the COM is connected to NC. When the operating voltage is applied the relay
coil gets energized and the COM changes contact to NO.
Transistor (BC-547)
19
Department of Mechanical Engineering ABES Engineering College Ghaziabad
configuration, the current flowing from the base to the emitter controls the collector current. A
short vertical line, which is the base, can indicate the transistor schematic for an NPN
transistor, and the emitter, which is a diagonal line connecting to the base, is an arrowhead
pointing away from the base (Figure 3.10).
Diode (IN4007)
Relay Circuit
The relay circuit consists of relay switch, diode and transistor as shown in figure 3.12. This
circuit controls 18-24v DC solenoid valve or 2.5-10v submersible motor. The control
signal from controller to the base of transistor controls ON-OFF of actuators. The diode
prevents the reverse flow of current in input end of the relay switch. At output end of relay
switch a series connection of battery source and actuator. It is used because of actuators needs
supply of 3-24v DC, but controller output signal is of 3.3v DC.
20
Department of Mechanical Engineering ABES Engineering College Ghaziabad
CHAPTER 4
http://arduino.esp8266.com/stable/package_esp8266com_index.json
>>Ok
Step 2: Connect the pins of Arduino Uno to ESP8266-12 pins as mention below
5v 5v
3.3v 3.3v, CH_PD
Gnd Gnd (both)
Tx Tx
Rx Rx
Note: Program code is directly uploaded into ESP8266 module. In this case, Arduino board is
used as a Flash Burner, i.e. code is directly uploaded to ESP8266 module.
21
Department of Mechanical Engineering ABES Engineering College Ghaziabad
Step 3: Reset the ESP8266 by connecting RESET pin to GND3.3vGND and disconnect.
But Explore ESP8266 Wi-Fi module has inbuilt Reset button. Press the reset button to reset
the module.
Step 4: While uploading the program code connect the GPIO 0 to GND.
22
Department of Mechanical Engineering ABES Engineering College Ghaziabad
Step 2: Once results are confirmed, make a PCB layout using software ExpressPCB as
shown below in figure 4.2.
Step 4: Itching: Immerse the printed PCB copper plate in a copper sulphate solution until all
copper oxidizes except PCB traces. Then, wash with petrol to remove printed carbon.
Step 5: Place the components and carefully solder them. Front and rear views are shown in
figure 4.3a, 4.3b.
23
Department of Mechanical Engineering ABES Engineering College Ghaziabad
Top View of the circuit
24
Department of Mechanical Engineering ABES Engineering College Ghaziabad
Step 6: Connect the power supplies to output ends of relay switches as mentioned in the
circuit diagram. 9v to motor pump, 18v to both valves. Connect the power supplies to PCB
board 5v, 3.3v and ground from Arduino board.
Physical Connections
Physical connections include the placing the sensors and actuators in small model of
agriculture field and includes proper connections. Detail is given below
25
Department of Mechanical Engineering ABES Engineering College Ghaziabad
26
Department of Mechanical Engineering ABES Engineering College Ghaziabad
8
Department of Mechanical Engineering ABES Engineering College Ghaziabad