Project Report
Project Report
SOIL MOISTURE
ABSTRACT
Nowadays, for irrigation, different techniques are available which are used to reduce the
dependency on rain. And mostly this technique is driven by electrical power and on/off
schedule. In this technique, a water level indicator is placed in the water reservoir and
soil moisture sensors are placed root zone of the plant and near the module, unit handles
the sensor information and transmits data to the controller which in turn control the flow
of water through the valves.
v
TABLE OF CONTENTS
ABSTRACT V
1 CHAPTER 1
1.1 Introduction 1
1.2 Problem Statement 9
1.3 Objectives 9
1.4 Scope of the Project 10
1.5 Components 10
2 CHAPTER 2
2.1 Literature Survey 18
3 CHAPTER 3
System Analysis
3.1 IoT (Internet of Things) 25
3.1.1 Features of IoT 25
3.1.2 Advantages of IoT 27
3.1.3 Disadvantages of IoT 29
4 CHAPTER 4
4.1 Existing System 32
4.2 Proposed Methodology 32
4.3 Advantages of Proposed Methodology 33
5 CHAPTER 5
Implementation Details
5.1 Software and Hardware Specification 34
vi
Document
5.1.1 Arduino UNO architecture 35
5.2 BLYNK Software 36
6.1.1
Results 38
6.1.2
Results 39
7 CHAPTER 7
7.1 Conclusion 42
REFERENCE 44
SOURCE CODE 45
vii
LIST OF FIGURES
viii
CHAPTER 1
1.1 INTRODUCTION
In India, most people depend on agriculture as their livelihood, in ancient times
groundwater level was high so crop yield was high. With the regular irrigation system, the
field has to be monitored by the farmer continuously, which is a huge challenge. In modern
times, technology has improved a lot, and internet connectivity is even available at
cheaper rates. So, farmers can use WSN-based irrigation systems to control the crops
through their smartphones. Farmers can know the temperature, humidity, and Water level
of their crops on their smartphone through which they can efficiently secure their crop
yield. It is also a major reason for the reduction in crop yield and cattle. If we have Irrigation
and atmospheric condition systems, we can solve these problems and improve crop yield
India is a
country of villages and agriculture plays an important role in the development of the
country.
1
measure moisture content in the soil. Nowadays, for irrigation, different techniques are
available which are used to reduce the dependency on rain. And mostly this technique is
driven by electrical power and on/off schedule. In this technique, a water level indicator is
placed in the water reservoir and soil moisture sensors are placed root zone of the plant
and near the module, unit handles the sensor information and transmits data to the
controller which in turn control the flow of water through the valves. Every living organism
needs fresh water as a result, saving water is our primary obligation. The majority of
irrigation water is wasted due to free-flow irrigation.
3
Project
module
Hardware Software
module
module
Node 4 channel
9V battery
Blynk Google IFTTT
relay LED and
module Resistors application Assistant application
MCU
Irrigation scheduling is often planned to meet full irrigation conditions, although the
techniques are equally applicable to a shortage of irrigation. Plant responses to stress,
such as stem water potentials, plant temperature, and growth rates, or fluctuations in stem
diameters, measured soil water levels, internode lengths, or monitored by energy
balances, can also be scheduled, as can various combinations of these processes with
climate-based approaches. Irrigation scheduling enhances the yield-to-consumptive-use
ratio, owing to better timing of water applications. However, it is usually not possible to
separate the impacts of schedule from other improved farming techniques that a firm
normally employs in an on-farm irrigation scheduling system. Improving irrigation
systems, such as switching from gravity surface irrigation to pressurized drip or sprinkler
irrigation, can help with irrigation scheduling, especially when the system is automated
and composed of soil water sensors, but the specific benefits of scheduling systems are
difficult to allow or quantify.
This article describes a cloud-based and IoT-based irrigation system. This system
uses sensors to gather real-time irrigation data, saves it in the cloud, the data owner
issues a command, and necessary action is done depending on the results. Annals of
4
R.S.C.B., a concept that is used to send emergency information in case of fire in farmland
or sparking in the motor pump. The author recommended utilizing a drip irrigation system
to irrigate the land in [20]. The drip irrigation approach also employs the use of a fertility
meter and a potential of hydrogen (pH) meter to calculate the crop's fertility requirements.
This is an excellent approach since the necessary amount of fertilizer is applied to the
plants, assisting in the resolution of problems such as soil salinity and other associated
difficulties. Sumalatha and Kumar's system uses solar energy to automate irrigation, while
a GSM system is utilized to maintain contact between agriculture and the farmer.
Temperature sensors and soil moisture sensors are used to provide the precise value of
moisture, based on which the valve in the system is turned on/off.
5
inserted in the tank to verify the water level in the tank. Wireless sensors are an excellent
watering concept. The microcontroller is preprogrammed with the soil moisture sensor's
threshold value and the tank's water level to limit water waste the irrigation is controlled
by the ARMLPC2148 Microcontroller. The system employs dispersed nodes for signal
transmission, and all nodes are linked to a centralized node, which employs an Advanced
RISC Machine (ARM). The system also contains a widespread wireless network of
moisture sensors positioned near the root zone of the plants that sense the state and
communicate it to the nodes, and the microcontroller controls the entire process by
receiving the signal The study describes an automated irrigation system powered by solar
energy, with the microcontroller serving simply as a power source. Various sensors are
placed in a paddy field to precisely monitor the moisture content of the soil.
These sensors provide the farmer with the value of the water level on a regular
basis via a cellular phone. If the moisture level exceeds a certain level, the motor pump
will shut off automatically. Today, farmers usually work on large portions of land that are
partitioned to grow different types of crops. During the dry season, they practice irrigation
farming. There is a shortage of water for irrigation, and it is not possible for a person to
monitor the amount of water content in the soil, in order to keep the root of the plant moist
or to detect it in real-time. This study aims to address the water shortage problem, that is
often faced by farmers using irrigation systems, by providing an autonomous sensor
interface for the remote monitoring and control of the supply of water to the soil, thereby
removing much of the effort required by farmers. Recently, the use of intelligent sensory
techniques has gained a significant amount of attention from farmers who practice
irrigation agriculture.
These techniques have been applied in agriculture to plan numerous activities and
tasks appropriately, by utilizing limited resources with less human intervention.
Aeroponics is a modern agricultural method that is commonly practiced around the world.
In this system, plants are cultivated under complete control conditions in a growth
chamber, by way of a light misting of a nutrient solution, replacing the soil medium. These
nutrient mists are ejected through atomization nozzles on a periodic basis. During the
plant cultivation period, many parameters are optimized, including temperature, humidity,
6
light intensity, water nutrient solution level, pH and EC levels, CO2 concentration,
atomization time, and atomization interval time, in order to enhance plant growth with the
present technological advancements, there is a greater demand for specialized
information regarding agricultural practices.
The use of internet of things (IoT) technology for agricultural practices has been
demonstrated in monitoring citrus soil moisture and nutrients, integrating of fertilization,
and an irrigation decision support system. Significant achievements have been made.
These include a single-point, multi-layer citrus soil temperature and humidity detection,
wireless sensor node and citrus precision fertilization, and the construction of an irrigation
management decision support system. This approach can help farmers improve the use
of fertilizers in the irrigation system. In addition, it increases the precision of citrus
production, and reduces labor costs and pollution, caused by the application of chemical
fertilizers to the soil In a smart irrigation system, the design and fabrication of a self-
powered and autonomous fringing-field capacitive sensor, is used to measure soil water
content, is possible. This kind of sensor is manufactured using a conventional printed
circuit board (PCB) and incorporates a porous ceramic material.
However, an inadequate supply of water to plants affects plant growth, and the
scarcity of water has become a global issue, particularly in the irrigation system, which is
specifically caused by global warming. Various human activities, including the burning of
fuel, industrial activities, and deforestation have been the major causes of the depletion
of the ozone layer and inadequate rainfall, particularly affecting plant growth and
development. The traditional approach to irrigation involves the use of watering cans and
water channels, which must be manually monitored and controlled. This causes a
significant amount of water to be wasted and misused.
8
The high demand and consumption of water, owing to rapid human population
growth and agricultural practices are the dominant factors of water consumption.
Accordingly, urgent attention is required to create techniques and strategies, based on
science and technology, in order to maintain and sustain the use of water for agricultural
development. The idea of an autonomous sensor interface for an IoT-based irrigation
monitoring and control system results from plant watering management requirements.
Therefore, the use of WSNs can provide the means of communication, computation, and
sensing information from near and remote places.
1.3 OBJECTIVE
1. To develop an effective farm yield to meet the rapidly growing demand for food for
the population.
2. By considering and predicting ecological circumstances, farm productivity can be
increased.
3. Maintain the crop quality by collecting data from the farm field such as Soil
Moisture, Ambient Temperature, and Humidity.
9
4. In our project proposal we present an irrigation monitoring and controlling System,
that uses the wireless sensor network to monitor the environmental conditions.
5. Our primary objective is to develop a system that has both automatic and manual
mode.
The aim is to design a prototype that establishes wireless remote control over a
network of homeappliances. The application is designed to run on an android device
providing features like switch-mode control, voice command control, and a provision to
view the status of the devices on the application itself. Considering its wide range of
applications, the following is the scope of this prototype. The system can be implemented
in homes, small offices, and malls as well, being in charge of control of the electrical
appliances. For remote access to appliances on the internet or intranet. The appliances
in the above-mentioned environment can be controlled intra-network or can be accessed
via the internet. The development of a technology-friendly environment. The system
incorporates the use oftechnology and making SAS. By the use of day-to-day gadgets,
we can utilize them from a differentperspective. It also assists us in making wise decisions
and makes recommendations based on the soil type. It assists us in making wise
decisions, which in turn assists us in producing more yield by providing us with the
appropriate amount of light, temperature, humidity, soil moisture, and acoustic sensing.
1.5 COMPONENTS
1.5.1 ESP8266 Express If Systems Wi-Fi Development Board.
The chip was popularized in the English-speaking maker community in August 2014 via
the ESP-01 module, made by a third-party manufacturer Ai-Thinker. This small module
10
allows microcontrollers to connect to a Wi-Fi network and make simple TCP/IP
connections using Hayes style commands. However, at first, there was almost no English-
language documentation on the chip and the commands it accepted.
12
Figure 1.8 Hi-Link AC – DC Converter
The soil moisture sensor is one kind of sensor used to gauge the volumetric content
of water within the soil. As the straight gravimetric dimension of soil moisture needs
eliminating, drying, as well as sample weighting. These sensors measure the
volumetric water content not directly with the help of some other rules of soil like
dielectric constant, electrical resistance, otherwise interaction with neutrons, and
replacement of the moisture content.
13
• Agriculture
• Landscape irrigation Research
• Simple sensors for gardeners
APPLICATIONS
14
• This regulator is used in different circuits like Fixed & adjustable output
regulators, Phone chargers, bench power supplies, current regulators,
Inductance meters & reversal protection circuits.
SPDT Toggle Switch is a three-terminal switch, only one is used as input other two
are as output. Therefore, we get two outputs, one from COM and A and second is from
COM and B, but only one at a time. Mainly it is used in three-way circuit to turn ON/OFF
an electrical appliance from two location.
15
• It is an easy USB interface. This allows interface with USB as this is like a serial
device.
• The chip on the board plugs straight into your USB port and supports on your
computer as a virtual serial port. The benefit of this setup is that serial
communication is an extremely easy protocol which is time-tested and USB makes
connection with modern computers and makes it comfortable.
• It is easy-to-find the microcontroller brain which is the ATmega328 chip. It has more
number of hardware features like timers, external and internal interrupts, PWM pins
and multiple sleep modes.
• It is an open source design and there is an advantage of being open source is that
it has a large community of people using and troubleshooting it. This makes it easy
to help in debugging projects.
• It is a 16 MHz clock which is fast enough for most applications and does not speeds
up the microcontroller.
• It is very convenient to manage power inside it and it had a feature of built-in
voltage regulation. This can also be powered directly off a USB port without any
external power. You can connect an external power source of upto 12v and this
regulates it to both 5v and 3.3v.
• 13 digital pins and 6 analog pins. This sort of pins allows you to connect hardware
to your Arduino Uno board externally. These pins are used as a key for extending
the computing capability of the Arduino Uno into the real world. Simply plug your
electronic devices and sensors into the sockets that correspond to each of these
pins and you are good to go.
• This has an ICSP connector for bypassing the USB port and interfacing the Arduino
directly as a serial device. This port is necessary to re-bootload your chip if it
corrupts and can no longer used to your computer.
• It has a 32 KB of flash memory for storing your code.
• An on-board LED is attached to digital pin 13 to make fast the debugging of code
and to make the debug process easy.
16
Figure 1.12 Arduino UNO
17
CHAPTER 2 2.1 LITERATURE SURVEY
The following shows a survey done for dual home automation for with and without
internet on Realtime which includes an instant feedback mechanism that drives the
appliances. This system is reliable to integrate on multiple platforms with the help of
ESP32 master which serves as standard firmware. Further, the study was extended to
multiple operation platforms like Linux, Windows, and IOS are discussed as follows. In
this detailed survey, we have learned a lot in stabilizing our concepts from the existing
feedback mechanisms that were designed in the previous study,
Mohamed A. Ragab, Abdelrhman Sedhom “IoT BASED SMART IRRIGATION
SYSTEM”, International Journal of Industry and Sustainable Development (IJISD)
2021.
This paper presents a step-by-step procedure of a smart home automation
controller. It uses IoT to convert home appliances to smart and intelligent devices, with
the help of design control. An energy-efficient system is designed that accesses the smart
home remotely using IoT connectivity. The proposed system mainly requires, Node MCU
as the microcontroller unit, IFTTT to interpret voice commands, Adafruit a library that
supports MQTT acts as an MQTT broker, and Arduino IDE to code the microcontroller.
The smart home is implemented with the main control unit that is connected to the 24-
hour available Wi-Fi network. To ensure, that the Wi-Fi connection doesnot turn off, the
main controller is programmed to establish an automatic connection with the available
network and connected to the auto power backup.
Pros: The target scaling factor is efficient throughout the multiple platforms switching
Cons: Slower transit cycles when compared to CoAP, low scalability, and lack of security
encryption
Shweta B Saraf, Shaunak Oke, Parth “IoT Based Smart Irrigation Monitoring and
Controlling System”, International Conference on recent Trends in Electronics
Information and Communication Technology (IRTEICT) 2020.
Cons: The system Uses Infrared Radiation for data transfer which is much faster than
CoAP but could be easily mapped with 38 kHz of regular frequency
Kiranmai Pernapati “IoT based low Cost Smart Irrigation System”, International
Conference on Inventive Communication and Computational Technologies
(ICICCT), 2021.
Cons: Does not support large database size, and it has no support for ROLE, COMMIT,
and Stored Procedures
19
Amogh Jayaraj Rau “IoT Based Smart Irrigation System and Nutrient Detection with
Disease Analysis”, International Journal of Innovative Research In Physics, 2021.
This paper proposes a system that develops a model to reduce the computation
overhead in existing smart home solutions that use various encryption technologies like
AES, ECHD, hybrid, etc. these solutions use an intermediate gateway for connecting
various sensor devices. The proposed model provides a method for automation with
sensor-based learning. These smart home devices with sensors can configure
themselves autonomously and can operate without human intervention. This work
minimizes encryption decryption and focuses on authentication and automation of smart
home devices with learning. The system bypasses the local gateway mentioned in the
existing system to provide better security for smart home devices and sensor data and
save computation overhead. Thereal-time broker cloud is directly connected with the
smart home and manages all incoming and outgoing requests between users and
devices.
Pros: Bringing AR with Deep Neural schema is an Excellency and this system can be
integrated with the 7 senses of the future world.
Cons: It has a range of support between 3.5Hz to 75Hz which in turn directly matches
the neural frequency that potentially messes up sensory organs.
The paper presents a vision-based machine intelligence system to sense the on/off
state of common home appliances. The proposed method of sensing the state of
appliances results in a novel home automation system. The accessibility of the suite of
devices in the home over a remote network is facilitated by the IP Addressing methods in
the IoT. This project uses two boards viz. Raspberry Pi and Intel Galileo Gen 2. The
communication between the User devices, Raspberry Pi, and the Intel Galileo boards
happens over a wireless network. The UDP protocol is deployed to facilitate the wireless
communication of the nodes present in the home automation network. A Pi Cam and a
USB Logitech camera are attached to the rotating shaft of two different servo motor
20
capture snapshots that are passed as inputs to the Machine Learning based models
trained using dlib-C++ to detect the stateof the operation of the appliances. The proposed
method uses visual modality to automate the appliances, as privacy concerns may
emerge while using the images from some specific places, as a counter to this issue, an
SPDT switch is added to the Raspberry Pi which when turned off ensures that even if the
images are taken from the webcams, they are just passed as inputs to the machine
learning models and are not displayed on the website when the users access the website
on the server address obtained from Raspberry Pi.
Pros:High Visual and Artificial Database was integrated which can be a link between and
virtual and physical world. A creative contextual database has created a huge responsive
factor
Cons: Error Factors are high since it is purely based on local server data.
21
Mrs. Paul Jasmin Rani, Jason Bakthakumar, Praveen Kumar B, Praveen Kumar U.
Santhosh Kumar. “Voice Controlled Home Automation System using Natural
Language Processing and Internet of Things”, INCC Transactions on National
Security Science and Computation, 2018
Jonathan J. Hull, Berna Erol, Jamey Graham, Qifa Ke, Hidenobu Kishi, Jorge
Moraleda, Daniel G. Van Olst, Research Gate “Paper-Based Augmented Reality”,
Research Gate Transaction on Camera and Paper documentation, 2007
Pros: Augmented reality with virtual automation was brought to the physical world with
the paper content
Mikko Kytö1,2, Barrett Ens2, Thammathip Piumsomboon2, Gun A. Lee2, and Mark
Head and eye movement can be leveraged to improve the user’s interaction
repertoire for wearable displays. Head movements are deliberate and accurate and
provide the current state-of-the-art pointing technique. Eye gaze can potentially be faster
and more ergonomic but suffers from low accuracy due to calibration errors and the drift
of wearable eye-tracking sensors. This work investigates precise, multimodal selection
techniques using head motion and eye gaze. A comparison of speed and pointing
accuracy reveals the relative merits of each method, including the achievable target size
for robust selection. We demonstrate and discuss example applications for augmented
reality, including compact menus with deep structure, and a proof-of-concept method for
online correction of calibration drift.
Cons: 97% precise and accurate but depends purely on real-time saturation and hue
point of target images
23
As human life is heading towards a busy schedule it becomes necessary to
automate our home appliances. Human error is something that cannot be completely
erased. With the busy schedule in hand, there is defiantly a possibility of missing
something that may be trivial to us but can result in a catastrophe. For these reasons, Our
Project home automation can increase efficiency, security, and reliability. AR has recently
evolved for the automation of various electrical appliances by popping virtual objects into
the real world.
Cons: Target Image can be linked-to automation with an augmented environment but in
the case of wet hands, this linking process will not produce tokens to respective servers.
24
CHAPTER - 3
SYSTEM ANALYSIS
IoT as a term has evolved a long way as a result of the convergence of multiple
technologies, machine learning, embedded systems, and commodity sensors. IoT is a
system of interconnected devices assigned a UIDS, enabling data transfer and control of
devices over a network. It reduced the necessity of actual interaction in order to control a
device. IoT is an advanced automation and analytics system that exploits networking,
sensing, big data, and artificial intelligence technology to deliver complete systems for a
product or service. These systems allow greater transparency, control, and performance
when applied to any industry or system.
3.1.1.1 Intelligence
IoT comes with the combination of algorithms and computation, software &
hardware that makesit smart. Ambient intelligence in IoT enhances its capabilities which
facilitate the things to respond in an intelligent way to a particular situation and supports
them in carrying out specific tasks. In spite of all the popularity of smart technologies,
intelligence in IoT is only concerned with a means ofinteraction between devices, while
user and device interaction are achieved by standard input methods and graphical user
interface.
25
3.1.1.2 Connectivity
Connectivity empowers the Internet of Things by bringing together everyday
objects. The connectivityof these objects is pivotal because simple object-level
interactions contribute to collective intelligence in the IoT network. It enables network
accessibility and compatibility in the things. With this connectivity, new market
opportunities for the Internet of things can be created by thenetworking of smart things
and applications.
3.1.1.3 Dynamic Nature
The primary activity of the Internet of Things is to collect data from its environment,
this is achieved with the dynamic changes that take place around the devices. The state
of these devices changes dynamically, for example sleeping and waking up, connected
and/or disconnected as well as the context of devices including temperature, location, and
speed. In addition to the state of the device, the number of devices also changes
dynamically with a person, place, and time
3.1.1.5 Sensing
It wouldn’t be possible without sensors that will detect or measure any changes in
the environment to generate data that can report on their status or even interact with the
environment. Sensing technologies provide the means to create capabilities that reflect a
true awareness of the physical world and the people in it. The sensing information is
26
simply the analoginput from the physical world, but it can provide a rich understanding of
our complex world
3.1.1.6 Heterogeneity
3.1.1.7 Security
27
3.1.2.1 Communication
Due to physical objects getting connected and controlled digitally and centrally with
wireless infrastructure, there is a large amount of automation and control in the workings.
Without human intervention, the machines are able to communicate with each other
leading to faster and timely output.
3.1.2.3 Information
It is obvious that having more information helps make better decisions. Whether it
is mundanedecisions such as needing to know what to buy at the grocery store or if your
company has enough widgets and supplies, knowledge is power and more knowledge is
better.
3.1.2.4 Monitor
The second most obvious advantage of IoT is monitoring. Knowing the exact
quantity of supplies orthe air quality in your home can further provide more information
that could not have previously been collected easily. For instance, knowing that you are
low on milk or printer ink could save you another trip to the store in the near future.
Furthermore, monitoring the expiration of products canand will improve safety.
3.1.2.5 Time
As hinted in the previous examples, the amount of time saved because of IOT
could be quite large.And in today’s modern life, we all could use more time.
3.1.2.6 Money
28
The biggest advantage of IoT is saving money. If the price of the tagging and
monitoring equipmentis less than the amount of money saved, then the Internet of Things
will be very widely adopted. IoT fundamentally proves to be very helpful to people in their
daily routines by making the appliances communicate with each other in an effective
manner thereby saving and conserving energy and cost. Allowing the data to be
communicated and shared between devices and thentranslating it in our required way,
makes our systems efficient.
The IoT allows you to automate and control the tasks that are done on a daily basis,
avoiding human intervention. Machine-to-machine communication helps to maintain
transparency in the processes. It also leads to uniformity in the tasks. It can also maintain
the quality of service. We canalso take necessary action in case of emergencies.
All the applications of this technology culminate in increased comfort, convenience, and
better management, thereby improving the quality of life.
A. Compatibility
29
B. Complexity
C. Privacy / Security
D. Safety
E. Lesser Employment of Menial Staff
F. Technology Takes Control of Life
3.1.3.1 Compatibility
3.1.3.2 Complexity
As with all complex systems, there are more opportunities for failure. With the
Internet of Things, failures could skyrocket. For instance, let’s say that both you and your
spouse each get a message saying that your milk has expired, and both of you stop at a
store on your way home, and you both purchase milk. As a result, you and your spouse
have purchased twice the amount that you both need. Or maybe a bug in the software
ends up automatically ordering a new ink cartridge for your printer each and every hour
for a few days, or at least after each power failure when you only need a single
replacement.
3.1.3.4 Safety
The unskilled workers and helpers may end up losing their jobs in the effect of
automation of daily activities. This can lead to unemployment issues in society. This is a
problem with the advent ofany technology and can be overcome with education. With
daily activities getting automated, naturally, there will be fewer requirements for human
resources, primarily, workers and less educated staff. This may create an Unemployment
issue in society.
Our lives will be increasingly controlled by technology and will be dependent on it.
The younger generation is already addicted to technology for every little thing. We have
to decide how much ofour daily lives are we willing to mechanize and be controlled by
technology.
CHAPTER 4
31
4.2 PROPOSED METHODOLOGY
The Soil Moisture Sensor, Humidity, and Temperature Sensor are connected to the
ESP8266 Node MCU Microcontroller. The sensors send the data from their respective
positions to ESP8266 Node MCU. The received analog data can be processed by the
controller and then send to end users like web servers, or mobile via MQTT server.
The Soil Moisture Sensor, Humidity, and Temperature Sensor are connected as inputs
to Microcontroller. The water pump is connected via Relay. The measured temperature
and humidity values send to the end user. The moisture sensor senses the water
quantity in the soil and the water pump will supply it whenever the quantity of water in
the soil is reduced. For a better understanding of end users, notifications can be sent
like “Water deficiency in the soil ON water pump”.
1. Low cost, the Node MCU is less costly compared to any other IoT-based device.
2. Node MCU has Arduino Like hardware I/O. It is becoming very popular these days
thatArduino IDE has extended its software to work in the field of ESP 8266 Field
module version.
3. Node MCU has an easily configurable network API.
4. Integrated support for the Wi-Fi network: ESP 8266 is incorporated in Node MCU,
which is aneasily accessible Wi-Fi module.
5. Reduced size of the board.
32
6. Low power consumption.
33
CHAPTER 5 IMPLEMENTATION DETAILS
The board has a total of 20 pins that can be used for input and output operations. The
power pins on the Arduino Uno R3 are used for supplying power to the board. There are
two power pins, namely the 5V pin and the 3.3V pin. The analog pins on the Arduino Uno
R3 are used to read analog signals. The board has six analog pins, labeled A0 to A5.
These pins can read voltage values between 0 and 5 volts and convert them into digital
signals that can be read by the board. These pins are particularly useful for sensors that
produce analog outputs, such as temperature sensors, light sensors, and potentiometers.
The digital pins on the Arduino Uno R3 are used for both input and output operations. The
board has a total of 14 digital pins, labeled 0 to 13. These pins can be configured as either
input or output pins, depending on the requirement of the project. These pins can be used
to control various electronic components, such as LEDs, motors, and relays. They can
also be used to read digital signals from sensors or other input devices.
The Arduino Uno has a number of facilities for communicating with a computer, another
Arduino board, or other microcontrollers. The ATmega328 provides UART TTL (5V) serial
communication, which is available on digital pins 0 (RX) and 1 (TX). An ATmega16U2 on
board channels this serial communication over USB and appears as a virtual com port to
software on the computer. The 16U2 firmware uses standard USB COM drivers, and no
external driver is needed. However, on Windows, a .inf file is required. Arduino Software
(IDE) includes a serial monitor which allows simple textual data to be sent to and from the
board. The RX and TX LEDs on the board will flash when data is being transmitted via
the USB-to-serial chip and USB connection to the computer (but not for serial
34
communication on pins 0 and 1). A Software Serial library allows serial communication on
any of the Uno's digital pins.
The Arduino Uno is built around the ATmega328P microcontroller, which is an 8-bit AVR
microcontroller. It has a 16 MHz crystal oscillator that provides the clock signal for the
microcontroller. The ATmega328P has 32KB of flash memory for storing the program
code, 2KB of SRAM for data storage, and 1KB of EEPROM for non-volatile data storage.
The Arduino Uno has a simple and easy-to-use architecture that makes it popular among
hobbyists, students, and professionals alike. It has 14 digital input/output pins, six of which
can be used as PWM (pulse-width modulation) outputs, and six analog input pins. These
pins can be used to interface with a wide range of sensors, actuators, and other electronic
devices.
The digital input/output pins can be used to read digital signals from sensors or control
digital outputs such as LEDs or motors. They can also be used to communicate with other
35
devices using protocols such as I2C, SPI, or UART. The PWM pins can be used to
generate analog voltage signals for controlling devices such as DC motors or servos.
The analog input pins on the Arduino Uno can be used to read analog signals from
sensors or other analog devices. The ATmega328P has a built-in 10-bit ADC (analog-to-
digital converter) that converts analog signals into digital values that can be read by the
microcontroller. The analog input pins can also be used as digital input/output pins if
needed.
The Arduino Uno has a USB interface that allows it to communicate with a computer. This
interface is used to upload the program code to the microcontroller and to communicate
with the serial monitor, which can be used to debug the program code or to display data
sent from the microcontroller.
The Arduino Uno has a power supply circuit that allows it to be powered from either the
USB port or an external power supply. The board has a voltage regulator that converts
the input voltage to a regulated 5V voltage that is used to power the microcontroller and
other components on the board. The board also has a reset button that can be used to
restart the program code running on the microcontroller.
Overall, the architecture of the Arduino Uno is simple and easy to understand, which
makes it a great platform for learning about microcontrollers and electronics. Its open-
source nature also makes it easy to find resources and support online. The popularity of
the Arduino platform has also led to the development of a wide range of shields and
modules that can be used to extend the capabilities of the Arduino Uno and other Arduino
boards.
Blynk software is designed to make it easy for developers to create mobile applications
for controlling and monitoring hardware projects. The Blynk app is available for both iOS
and Android devices and can be downloaded from the respective app stores. Once
downloaded, users can create an account and start building their custom interfaces.
36
Blynk supports a variety of hardware platforms, including the popular microcontroller
boards such as Arduino, Raspberry Pi, ESP8266, ESP32, Particle, and others. The
platform is also compatible with many popular communication protocols such as
Bluetooth, Ethernet, WiFi, and GSM.
Developers can use Blynk's extensive library of pre-built widgets to create their custom
interfaces quickly. These widgets can be easily customized by changing their size, colour,
and other properties to suit the specific needs of the project. Blynk also provides a library
of code examples and documentation to help developers get started with the platform
quickly
One of the key features of Blynk is its support for the virtual pins. These virtual pins allow
developers to create custom functions that can be controlled from the mobile app. For
example, a virtual pin can be used to set the temperature of a thermostat or turn on/off a
device remotely. Blynk also provides support for data logging and analysis, allowing
developers to analyze the data collected from their sensors over time.
Blynk's cloud-based platform allows developers to store their projects and data on the
cloud, which can be accessed from anywhere with an internet connection. The cloud
platform also allows developers to collaborate on projects with others, sharing their code
and interfaces with other members of the Blynk community.
Blynk offers both a free and a paid subscription plan. The free plan provides access to all
the core features of the platform but with some limitations. The paid subscription plan
provides access to additional features such as increased data storage, custom domains,
and priority support.
Overall, Blynk software provides a simple and easy-to-use platform for creating mobile
applications for controlling and monitoring hardware projects. Its support for a wide range
of hardware platforms and communication protocols, as well as its extensive library of
pre-built widgets, makes it an excellent choice for both beginners and experienced
developers alike.
37
CHAPTER 6 RESULTS AND DISCUSSIONS
6.1 CODE AND SIMULATION
6.1.1 RESULTS
The above figure depicts the values or results obtained from various sensors such as
DHT 11(Temperature and Humidity), Acoustic sensor (Sound in Decibels(dB)), Soil
moisture sensor and Light sensor which indicates the photosynthesis level of the
plant.
38
A. B. C.
A) Figure 6.2 BLYNK notification for bug alert B) Figure 6.3 BLYNK notification for
Soil dryness level C) Figure 6.4 BLYNK notification for photosynthesis detection
6.1.2 RESULTS
• The below figure depicts the results obtained from executing the code
mentioned aboveand the result obtained is by entering or giving the input as 5
it is the representing numberused to represent the Sandy soil type crops.
39
Figure 6.5 Output obtained by giving the input as 5.
• The below figure depicts the results obtained from executing the code
mentioned aboveand the result obtained is by entering or giving the input as 6
it is the representing numberused to represent the Clay soil type crops.
40
Figure 6.7 Output obtained by giving the input as 3.
• The above figure depicts the results obtained from executing the code
mentioned abovebut in this case, we can see there was an In-valid number
entry that is due we have only considered limited number of soils (i.e.,1 to 6)
any number outside of this frame is considered as an In-valid number.
41
7.1 CONCLUSION
In normal irrigation systems, the farmers control the irrigating land manually. These
techniques take a longer duration and waste the available water at higher rates so it leads
to the usage of more water than that is required. For a plant to survive healthily it needs
water continuously, the automatic system helps to get absolute results for this.
Implementing this kind of irrigation system in agriculture gives more comfort to farmers in
terms of time-saving and accurate usage of water without wasting it. Moreover, the
required power for operating the ESP8266 Node MCU Microcontroller chip and wireless
sensors is very less, as well as all these features, are available at a very low cost.
Smart irrigation is the use of advanced technologies to optimize the irrigation process,
including the monitoring of environmental factors such as soil moisture, weather
conditions, and plant water needs. Smart irrigation systems can improve water use
efficiency, reduce water waste, and lower irrigation costs.
In the future, smart irrigation will continue to play a vital role in sustainable agriculture and
water management. Here are some potential developments that may shape the future of
smart irrigation:
1. Integration of IoT: The Internet of Things (IoT) can be used to collect and analyze
data from various sources in real-time. By integrating IoT devices into irrigation systems,
farmers can collect information on soil moisture, temperature, humidity, and other
environmental factors, and adjust their irrigation schedules accordingly. IoT sensors can
also be used to detect leaks and other issues in irrigation systems, reducing water waste.
2. Artificial Intelligence: AI can be used to analyze large amounts of data collected from
sensors, satellites, and other sources to identify patterns and trends in crop growth, soil
moisture, and weather conditions. This data can be used to create predictive models that
help farmers make better decisions about irrigation, crop management, and resource
allocation.
In conclusion, smart irrigation is a rapidly evolving field that will continue to shape the
future of agriculture and water management. As technology advances and new
applications are developed, we can expect to see more efficient, sustainable, and precise
irrigation systems that help farmers produce more with less water. Smart irrigation has
the potential to revolutionize the way we grow crops and manage water resources, and it
will be exciting to see what the future holds.
REFERENCES
[1] Ali El-Moursy1, Fadi N. Sibai2, Jahanzeb Rehman1, Omar M. Gouda1, Abdelrahman
T.
Gaber1, Ahmed M. Khedr1, IEEE “Home Automation using Augmented Reality (HAAR)”,
[Vol: 0017 – 5845 © 2021
[2] Manuel Alonso-Rosa1, Aurora Gil-de-Castro2, Antonio Moreno-Munoz1, Joaquin
Garrido-Zafra2, Elena Gutierrez-Ballesteros1 and Eduardo Canete-Carmona2 IEEE “An
IoT Based Mobile Augmented Reality Application for Energy Visualization in Buildings
Environments” [Vol: 0008 – 37231 © 2019]
43
[3] Seonghun Park1, Enok Weshnly2, Badin Rikhav3, Morey Sushwat4 IEEE,
“Development of an Online Home Appliance Control System Using Augmented
Reality and an SSVEP-Based Brain–Computer Interface, Creative Commons
Attribution”, [Vol: 0009 – 202531 © 2019
][4] Avni Sharma 1, Rinkesh Patel 2, IEEE “Home Automation Using Augmented Reality”,
[Vol: 0002 – 32031 © 2017]
[5] Pranav Bedekar 1, Snehal Nargundi 2, IEEE “A Review on Home Automation using
Augmented Reality”, [Vol: 0012 – 105861 © 2016]
[6] Rosalino Rodriguez Calderon1, Rafael Santillana Arbesu2, IEEE “Augmented Reality
in Automation”, [Vol: 0002 – 30561 © 2015]
[7] R. Silva1, J. C. Oliveria2, G. A. Giraldi 3, IEEE “Introduction to Augmented Reality”,
[Vol: 0004 – 132341 © 2009
][8] Jonathan J Hull1, Berna Erol2, Jamey Graham3, Qifa Ke4, Hidenobu Kishi1, Jorge
Moraleda2, Daniel G Van Olst3, IEEE “Paper-Based Augmented Reality” [Vol: 0009 –
3056 © 2007]
[9] Mikko Kyto1,2, Barrett Ens2, Thammathip Piumsomboon2, Gun A. Lee2, Mark
Billinghurst2, IEEE “Pinpointing: Precise Head-and Eye-Based Target Selection for
Augmented Reality”, [Vol: 0001 – 4530620 © 2018]
SOURCE CODE
ADAPTIVE FARMING WITH ACOUSTIC SENSOR CODE
//#define BLYNK_TEMPLATE_ID "TMPLlloaQEdS"
//#define BLYNK_TEMPLATE_NAME "Adaptive Farming"
//#define BLYNK_AUTH_TOKEN "J9Ax47UtIxWQtC2fCrRC0okTKtbmyNsP"
//#define BLYNK_TEMPLATE_ID "TMPLqVmsJT76"
//#define BLYNK_TEMPLATE_NAME "Adaptive Farming"
//#define BLYNK_AUTH_TOKEN "PKfLBqdlNqwytJ4dAJY9zRXACEXRiRCW"
//#define BLYNK_TEMPLATE_ID "TMPL2usAtCB0"
//#define BLYNK_TEMPLATE_NAME "Adaptive Farming"
//#define BLYNK_AUTH_TOKEN "qyo4HB-D2jEKVgCGp9FKv-pWmBnrA8mZ"
#define BLYNK_TEMPLATE_ID "TMPL319Z77yLk"
44
#define BLYNK_TEMPLATE_NAME "Adaptive Farming"
#define BLYNK_AUTH_TOKEN "ncYpE0RzG9u7nCpOCgTjTShUQuMJgaRB"
#define BLYNK_PRINT Serial
#include <ESP8266WiFi.h>
#include <BlynkSimpleEsp8266.h>
#include <DHT.h> char auth[] =
BLYNK_AUTH_TOKEN; char ssid[] =
"MSJ Broadband"; char pass[] =
"MSI19911993";
#define DHTPIN D4
#define Soil D0
#define LDR D5
#define Sprayer D7
#define Relay D8
#define DHTTYPE DHT11
DHT dht(DHTPIN, DHTTYPE);
BlynkTimer timer; void
sendSensor()
{
float s = analogRead(A0); int
water_level = digitalRead(Soil); int
light_level = digitalRead(LDR);
float h = dht.readHumidity();
float t = dht.readTemperature();
if (isnan(h) || isnan(t))
{
Serial.println("Failed to read from DHT sensor!"); return;
}
Blynk.virtualWrite(V5, t);
45
Blynk.virtualWrite(V6, h);
Blynk.virtualWrite(V7, s);
Blynk.virtualWrite(V8, water_level);
Blynk.virtualWrite(V9, light_level);
Serial.print("Temperature : ");
Serial.print(t);
Serial.print(" Humidity : ");
Serial.print(h);
Serial.print(" Acoustic Level: ");
Serial.print(s);
Serial.print(" Water Level: ");
Serial.print(water_level);
Serial.print(" light Level: ");
Serial.println(light_level);
if(s > 750)
{
Blynk.logEvent("bug_alert","Alert...! The activity of bug found, Activating Pest Sprayer");
digitalWrite(Sprayer, HIGH);
}
else if(light_level == HIGH)
{
digitalWrite(Relay, HIGH);
}
else
{
digitalWrite(Sprayer, LOW); digitalWrite(Relay,
LOW);
}
}
46
void setup()
{
pinMode(Soil, INPUT);
pinMode(LDR, INPUT);
pinMode(Sprayer, OUTPUT);
pinMode(Relay, OUTPUT);
digitalWrite(Sprayer, LOW);
digitalWrite(Relay, LOW);
Serial.begin(115200);
Blynk.begin(auth, ssid, pass);
dht.begin(); timer.setInterval(2500L,
sendSensor);
}
void loop()
{
Blynk.run(); timer.run();
}
PLANT GROWTH AND SOIL TYPES
CODE long i; void setup()
{
Serial.begin(9600);
Serial.println("There are six main types of soil:");
Serial.println();
Serial.println("1. Loamy");
Serial.println("2. Chalky");
Serial.println("3. Peaty");
Serial.println("4. Silty");
Serial.println("5. Sandy");
Serial.println("6. Clay");
Serial.println();
Serial.println("Select the Number and Press Enter to Proceed...!"); Serial.println();
47
}
void loop()
{
while(Serial.available() == 0)
{
}
i = Serial.parseInt(); if(i
== 1)
{
Serial.println("These Crops Can Grow Well in Loamy Soil...!");
Serial.println();
Serial.println("1. Climbers");
Serial.println("2. Vegetables");
Serial.println("3. Berries");
Serial.println("4. Root Crops");
Serial.println();
Serial.println("Select the Number and Press Enter to Proceed...!"); Serial.println();
}
else if(i == 2)
{
Serial.println("These Crops Can Grow Well in Chalky Soil...!");
Serial.println();
Serial.println("1. Spinach");
Serial.println("2. Beets");
Serial.println("3. Sweet Corn");
Serial.println("4. Cabbage");
Serial.println("5. Lilacs");
Serial.println();
Serial.println("Select the Number and Press Enter to Proceed...!"); Serial.println();
48
}
else if(i == 3)
{
Serial.println("These Crops Can Grow Well in Peaty Soil...!");
Serial.println();
Serial.println("1. Root Crops");
Serial.println("2. Sald Greens");
Serial.println("3. Brassicas");
Serial.println("4. Lantern Trees");
Serial.println("5. Witch Hazel");
Serial.println();
Serial.println("Select the Number and Press Enter to Proceed...!"); Serial.println();
}
else if(i == 4)
{
Serial.println("These Crops Can Grow Well in Silty Soil...!");
Serial.println();
Serial.println("1. Most Veggie Crops");
Serial.println("2. Climbers");
Serial.println("3. Perenial Plants");
Serial.println("4. Willow Trees");
Serial.println("5. Dogwood Trees");
Serial.println();
Serial.println("Select the Number and Press Enter to Proceed...!"); Serial.println();
}
else if(i == 5)
{
Serial.println("These Crops Can Grow Well in Sandy Soil...!");
Serial.println();
Serial.println("1. Vegetable Root Crops Such as Carrots, Potatoes, and Parsnips");
49
Serial.println("2. Lettuce");
Serial.println("3. Strawberries");
Serial.println("4. Corn");
Serial.println("5. Squash");
Serial.println();
Serial.println("Select the Number and Press Enter to Proceed...!"); Serial.println();
}
else if(i == 6)
{
Serial.println("These Crops Can Grow Well in Clay Soil...!");
Serial.println();
Serial.println("1. Summer Crop Vegetables");
Serial.println("2. Fruit Trees");
Serial.println("3. Ornamental Trees");
Serial.println("4. Perennials");
Serial.println("5. Aster");
Serial.println("6. Bergamot");
Serial.println();
Serial.println("Select the Number and Press Enter to Proceed...!"); Serial.println();
}
else if(i > 6)
{
Serial.println("Invalid Selection of Data Entry...! Select Proper Input...!");
Serial.println();
Serial.println("Select the Number and Press Enter to Proceed...!"); Serial.println();
}
}
50