Smart Farming

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

SMART FARMING

A PROJECT REPORT
Submitted by

KOMMI SAI MANASA (111721104065)


KOLLAREDDY AKHILA (111721104174)
CHITTANI CHARISHMA (111721104301)
DODDI POOJITHA (111721104302)

in partial fulfillment for the award of the degree of

BACHELOR OF ENGINEERING
IN

DEPARTMENT OF ELECTRONICS AND COMMUNICATION


ENGINEERING

R.M.K. ENGINEERING COLLEGE


(An Autonomous Institution)
R.S.M.Nagar, Kavaraipettai- 601206.

ANNA UNIVERSITY: CHENNAI 600025

MAY-2024

i
R.M.K. ENGINEERING COLLEGE
(An Autonomous Institution)
R.S.M. Nagar, Kavaraipettai - 601206.

BONAFIDE CERTIFICATE
Certified that this project report titled “SMART FARMING” is the
bonafideworkof.K.MANASA(111721104065),K.AKHILA(111721104174),
CH.CHARISHMA(111721104301), D.POOJITHA( 111721104302) who
carried out the work under my supervision.

SIGNATURE SIGNATURE
Dr. T.Suresh, M.E., Ph.D Ms.Dr.A.Merline, M.E.,(Ph.D)
PROFESSOR AND HEAD SUPERVISOR
OF THE DEPARTMENT ASSISTANT PROFESSOR
Department of Electronics and Department of Electronics and
Communication Engineering Communication Engineering

R.M.K. Engineering College, R.M.K. Engineering College,


R.S.M. Nagar, Kavaraipettai, R.S.M. Nagar, Kavaraipettai,

Kavaraipettai - 601206 Kavaraipettai – 601206

Submitted for the Project Viva-Voce held on ................................................ at


R.M.K. Engineering College, Kavaraipettai,Tiruvallur District – 601206.

INTERNAL EXAMINER EXTERNAL EXAMINER


II
ACKNOWLEDGEMENT

We would like to express our heartfelt thanks to the Almighty, our beloved
parents for their blessings and wishes for successfully doing this project.

We convey our thanks to Chairman Thiru R.S.Munirathinam and Vice


Chairman Thiru R.M. Kishore who took keen interest in us and
encouraged us throughout the course of study and for their kind attention
and valuable suggestions offered to us.

We express our sincere gratitude to our Principal Dr. K. A. Mohamed


Junaid M.E., Ph.D., for fostering an excellent climate to excel.

We are extremely thankful to Dr. T. Suresh M.E., Ph.D., Professor and


Head, Department of Electronics and Communication Engineering, for
having permittedus to carry out this project effectively.

We convey our sincere thanks to Ms.Dr.A.Merline M.E., (Ph.D.,)


Assistant Professor for her valued ideas in effectively carrying out this
project and also for her extremely valuable guidance throughout the course
of the project.

We are grateful to our Project coordinators and all the department staff
members for their intense support.

iii
ABSTRACT

Smart farming with NodeMCU and ThingSpeak is a modern approach to


agriculture that leverages the power of the Internet of Things (IoT) to increase
efficiency and productivity in farming. This system involves the use of
NodeMCU, a low-cost and powerful microcontroller, and ThingSpeak, a
cloud-based IoT platform, to collect data from sensors deployed in the field.
The collected data is then processed and analyzed in the cloud to provide
insights into crop growth, soil moisture, temperature, and other key
parameters. This information is used to optimize farming operations such as
irrigation, fertilization, and pest control, resulting in higher yields and better
crop quality. This abstract highlights the potential benefits of smart farming
using IoT and the NodeMCU/ThingSpeak platform, including reduced costs,
increased yields, and improved sustainability.

Smart homes refers to energy efficient, time saving includes reduces the
human efforts. The objective of key providers was to reduce the server rental
cost by accessing through the efficient and inexpensive ESP8266 chip to the
cloud platforms on which dynamic server provisioning to reduce the server
rental cost which was the key objective for content providers. In this paper we
addressed the challenges of reducing the cost of accessing the cloud platforms.
We present the construction of ESP8266 with the Arduino or microcontroller
are attached to get the smart television, where all our choice of videos can be
stored and retrieved at any time. Through the software development kit (SDK)
in ESP8266 that allow the chip to be programmed which remove the need of
the microcontroller.

iv
Generally accessing cloud facility will produce high cost but in this paper
gives the replacement of the accessing the cloud with the ESP8266 serial chip
which operated in low power consumption with the low cost because it has
the three configurable sleep modes .Blynk was designed for the Internet of
Things.It can control hardware remotely, it can display sensor data, it can store
data, vizualize it and do many other cool things. Blynk App - allows to you
create amazing interfaces for your projects using various widgets we provide
.Normal way of controlling the IOT devices by developing the website. In
that, it has the functions like light, humidity, and temperature control. With
the help of these functions we can check and also check the status based on
our wishes. The server and sensors together used in the distributed automation
system. The control of the sensor and monitors are done with the various
sensors. Wi-Fi technology connects server and the sensors, used to improve
security, mobility and scalability.

v
TABLE OF CONTENTS
CHAPTER TITLE PAGE NO.
NO.

ACKNOWLEDGEMENT III

ABSTRACT IV
LIST OF FIGURES VIII
LIST OF TABLES IX
1 INTRODUCTION 1
1.1 Applications 2
1. 2 Advantages 2
2 PROPOSED SYSTEM 3
2.1 Existing Method 3
2.2 Implementation 3
3 METHODOLOGY 4
3.1 Hardware Setup 4
3.2 Software Development 4
3.3 Cloud Configuration 5
4 BLOCK DIAGRAM 6
4.1 DESCRIPTION 6
5 HARDWARE COMPONENTS 8
5.1 NodeMCU ESP8266 8
5.2 RELAY MODULE 12
5.3 Soil Moisture Sensor 13
5.4 BMP180 14
5.5 DHT11 Sensor: 15
5.6 External Motor Connection 16
5.7 CIRCUIT DIAGRAM OF POWER SUPPLY 15
6 CLOUD CONFIGURATION 19
6.1 ThingSpeak 19
6.2 Blynk 20
7 WORKING AND RESULT 21
7.1 WORKING 21
7.2 RESULT 22

vi
8 CONCLUSION AND FUTURE WORK 24
8.1 CONCLUSION 24
8.2 FUTURE WORK 25
9 REFERENCES 27
10 ANNEXURE 29

vii
LIST OF FIGURES
FIGURE PAGE
NO. TITLE NO.
4.1 BLOCK DIAGRAM 6
5.1 NodeMCU ESP8266 8
5.2 ESP 8266 10

5.3 PIN OUT OF ESP 8266 11

5.4 RELAY MODULE 12

5.5 SOIL MOISTURE SENSOR 14

5.6 BMP180 SENSOR 15

5.7 DIAGRAM CONNECTION DHT11 SENSOR 15

5.8 CIRCUIT DIAGRAM OF POWER SUPPLY 17


7.1 GRAPH OVERVIEW 22

7.2 GRAPH OF SENSOR 22

7.3 BLYNK APPLICATION 22


7.4 DEMO MODULE 23

viii
LIST OF TABLES
TABLE PAGE
NAME
NO NO
5.1 FEATURES OF NODE MCU ESP 8266 9

5.2 NODE MCU ESP 8266 GPIO PIN FOR LUA 10

ix
CHAPTER 1
INTRODUCTION

Smart farming using IoT with NodeMCU and ThingSpeak is a cutting-edge


approach to agriculture that involves the use of advanced technologies to
improve crop yields, reduce costs, and increase sustainability. IoT-based smart
farming solutions offer several advantages over traditional farming methods
by providing real-time data on crop health, soil moisture levels, temperature,
and other key parameters. This information is collected using sensors
deployed in the field and transmitted wirelessly to a central server or cloud-
based platform, where it is analyzed using machine learning algorithms to
provide actionable insights.
The NodeMCU, a low-cost microcontroller based on the ESP8266
chip, is a popular choice for building IoT-based smart farming systems dueto
its affordability, ease of use, and compatibility with a wide range of sensors.
ThingSpeak is a cloud-based IoT platform that offers a simple and user-
friendly interface for collecting, analyzing, and visualizing data from IoT
devices, making it an ideal choice for smart farming applications. In this paper,
we will discuss the architecture, components, and working of smart farming
using IoT with NodeMCU and ThingSpeak. We will also explore the
potential benefits of this technology for farmers, including increased
productivity, reduced costs, and improved sustainability.
IOT or internet of things is an upcoming technology that allows us to
control hardware devices through the internet .Here we propose to use IOT
in order to control home appliances, thus automating modern homes through
the internet. This system uses 4-loads to demonstrate as house Appliances
Controlling. Our user friendly interface allows a user to easily control these
home appliances through the internet Worldwide. For this system we use an
Node MCU (Node Microcontroller Unit).

1
1.1 Applications
• Soil moisture monitoring: IoT sensors can be used to monitor the moisture
content of soil, which is critical for crop growth. This data canbe used to
optimize irrigation and prevent over-watering or under- watering.
• Climate monitoring: IoT sensors can be used to monitor temperature,
humidity, and other climate conditions in the farm environment. This data
can be used to predict weather patterns and adjust farming practices
accordingly.
• Livestock monitoring: IoT sensors can be used to monitor the health and
well-being of livestock, including tracking their location, activity level,
and vital signs.
• Crop monitoring: IoT sensors can be used to monitor the growth and health
of crops, including detecting pests and diseases.
1. 2 Advantages
• Improved crop yield: By monitoring soil moisture, climate conditions,and
crop growth, farmers can make data-driven decisions to optimize their
farming practices and improve crop yield.
• Reduced waste: By optimizing irrigation and fertilization, farmers can
reduce waste and minimize the environmental impact of their farming
practices. Cost savings: By using IoT sensors to monitor farm conditions,
farmers can reduce labor costs and optimize the use of resources like water
and fertilizer. Predictive maintenance: IoT sensors can be used to detect
issues with equipment before they become major problems, allowing
farmers to perform maintenance before a breakdown occurs.
• Real-time monitoring: IoT sensors provide real-time data about the farm
environment, allowing farmers to make quick decisions and adjust their
farming practices accordingly.

2
CHAPTER 2

PROPOSED SYSTEM
2.1 Existing Method
In the existing agriculture system the specification such as temperature,
moisture, humidity are detected manually which increases the labor cost,
time and also monitoring cannot be done continuously. In this paper irrigation
process is done automatically using different sensors which reduces the
manual labor. Here a system is proposed to monitor crop-field using sensors
for soil moisture, humidity and temperature. By monitoring all these
parameters the irrigation can be automated with the use of raspberry pi.
2.2 Implementation
• The new developments of smart farming With use of IOT.

• The aim is to propose a technology which can generate messages on


different platforms to notify farmers.

• The product will assist farmers by getting live data ( Temperature,


humidity, Soil Moisture) from the farmland to take necessary steps to
enable them to do Smart farming by also saving their Crop field.
• The product proposed in this paper uses ESP8266 Node MCU Which
is Low cost compared With Raspberry pi which used in existing project
(high cost).
• Our main motive is to reduce the cost and sell affordable price to the
farmers.
• Additionally we implement the APP to automatic motor ON and OFF.

3
CHAPTER 3
METHODOLOGY
3.1 Hardware Setup

The hardware setup involved the following steps:


a. Procurement of hardware components: The necessary hardware
components such as NodeMCU, sensors (DHT11 for temperature and
humidity, soil moisture sensor, etc.), and actuators (water pump, sprinklers,
etc.) were procured.
b. Interfacing the sensors and actuators: The NodeMCU was interfaced
with the sensors and actuators using appropriate interfaces such as I2C, SPI,
or UART.
c. Power Supply: The NodeMCU and sensors were powered using a 5V
power supply.
d. Assembling the system: The sensors and actuators were assembled in a
suitable enclosure to protect them from environmental factors.

3.2 Software Development


The software development involved the following steps:
a. Setting up the Arduino IDE: The Arduino Integrated Development
Environment (IDE) was set up on a computer.
b. Writing the code: The code was written in C++ language using the
Arduino IDE to collect data from the sensors and control the actuators. The
code was designed to read the sensor data and send it to ThingSpeak at regular
intervals.
c. Uploading the code: The code was uploaded to the NodeMCU using a
USB cable.

4
3.3 Cloud Configuration
The cloud configuration involved the following steps:
a. Setting up a ThingSpeak account
A ThingSpeak account was created and the necessary channels were
created to receive data from the NodeMCU.
b. Configuring the NodeMCU to send data to ThingSpeak
The NodeMCU was configured to send data to the appropriate
ThingSpeak channel using the channel ID and API key.
c. Visualizing the data
The data received by ThingSpeak was visualized using charts and
graphs to provide insights into crop growth, soil moisture levels,
temperature, and other key parameters.

5
CHAPTER 4
BLOCK DIAGRAM

Fig. 4.1 BLOCK DIAGRAM

4.1 DESCRIPTION
The block diagram for smart farming using IoT with NodeMCU and
ThingSpeak consists of several components that work together to monitor and
control various environmental parameters in a farm. The following is a
description of each component…,
Sensors: The sensors used in the system include the DHT11 sensor for
measuring temperature and humidity, soil moisture sensor for measuring soil
moisture levels, and other sensors to measure environmental parameters such
as light, pH levels, etc. The sensors are connected to the NodeMCU using
appropriate interfaces.

6
NodeMCU: The NodeMCU is an open-source development board that is used
to control and communicate with the sensors and actuators in thesystem. It is
based on the ESP8266 Wi-Fi module, which provides wireless connectivity to
the internet. The NodeMCU reads data from the sensors and sends it to
ThingSpeak over Wi-Fi.
Actuators: The actuators in the system include water pumps or sprinklers,
which are used to control irrigation based on real-time data. The actuators are
connected to the NodeMCU using appropriate interfaces.
Wi-Fi Module: The Wi-Fi module provides wireless connectivity between
the NodeMCU and ThingSpeak over the internet. The NodeMCU sends data
to ThingSpeak over Wi-Fi, and ThingSpeak receives and stores the data in its
cloud server.
ThingSpeak: ThingSpeak is an open-source IoT platform that is used to
receive and store data from the NodeMCU. The platform provides various
features such as real-time data visualization, data analytics, and alerts.
Farmers can use the data provided by ThingSpeak to make informed decisions
regarding crop management and environmental conditions.
Cloud Server: The cloud server is a central location where all the data
received from the NodeMCU is stored. The cloud server can be accessed
remotely from any location with an internet connection.
User Interface: The user interface provides farmers with access to the data
collected by the system. The data is displayed in an intuitive and user- friendly
format, making it easy for farmers to make informed decisions about crop
management and environmental conditions.

7
CHAPTER 5
HARDWARE COMPONENTS
Hardware component
• NodeMCU ESP8266
• Relay Module
• Soil Moisture Sensor
• BMP180
• DHT11
• External Motor Connection
• Power Supply

5.1 NodeMCU ESP8266


Node mcu is an open source firmware for which open source prototyping
board designs are available. The name "Node mcu" combines "node" and
"MCU" (micro-controller unit). The term "Node mcu".

Fig 5.1 NodeMCU ESP8266


The firmware uses the Lua scripting language. The firmware is based on the
eLua project, and built on the Esp-ressif Non-OS SDK for ESP8266. It uses
many open source projects, such as lua-cj-son. Due to resource constraints,
users need to select the modules relevant for their project and build a firmware
tailored to their needs. Support for the 32-bit ESP32 has also been
implemented.

8
The prototyping hardware typically used is a circuit board functioning as a
dual in-line package (DIP) which integrates a USB controller with a smaller
surface-mounted board containing the MCU and antenna.
Developer ESP8266 Open-source Community
Type Single-board microcontroller
Introductory price 300-400 Rs
Operating system XTOS
CPU ESP8266
Memory 128kBytes
Storage 4Mbytes
Power USB
5.1 FEATURES OF NODE MCU ESP 8266

SPECIFICATIONS
• Voltage: 3. 3V.
• Wi-Fi Direct (P2P), soft-AP.
• Current consumption: 10uA~170mA.
• Flash memory attachable: 16MB max (512K normal).
• Integrated TCP/IP protocol stack.
• Processor: Tensilica L106 32-bit.
• Processor speed: 80~160MHz.
• RAM: 32K + 80K.
• GPIOs: 16 (multiplexed with other functions).
• Analog to Digital: 1 input with 1024 step resolution.
• +19.5dBm output power in 802.11b mode.
• 802.11 support: b/g/n.
• Maximum concurrent TCP connections: 5.

9
PIN DIAGRAM / PIN LOYOUT OF Node MCU ESP8266

Fig 5.2 PIN DIAGRAM OF NODE MCU ESP 8266

Node MCU pin ESP 8266 pin Node MCU pin ESP 8266 pin
D0 GPIO 16 D7 GPIO 13
D1 GPIO 5 D8 GPIO 15
D2 GPIO 4 D9 GPIO 3
D3 GPIO 0 D10 GPIO 1
D4 GPIO 2 D11 GPIO 9
D5 GPIO 14 D12 GPIO 10
D6 GPIO 12
5.2 NODE MCU ESP 8266 GPIO PIN FOR LUA
ESP8266 MODULE

Fig 5.2 ESP 8266

10
The ESP8266 is a low-cost Wi-Fi microchip, with a full
TCP/IP stack and microcontroller capability, produced by Espressif Systems
in Shanghai, China.The chip first came to the attention of Western makers in
August 2014 with the ESP-01 module, made by a third-party manufacturer Ai-
Thinker. This small module 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 The very low price and the fact that there
were very few external components on the module, which suggested that it
could eventually be very inexpensive in volume, attracted many hackers to
explore the module, the chip, and the software on it, as well as to translate the
Chinese documentation.The ESP8285 is an ESP8266 with 1 MiB of built-in
flash, allowing the building of single-chip devices capable of connecting to
Wi-Fi.These microcontroller chips have been succeeded by the ESP32 family
of devices, including the pin-compatible ESP32-C3.

Fig 5.3 PIN OUT OF ESP 8266


The pinout is as follows for the common ESP-01 module
1. GND, Ground (0 V)
2. GPIO 2, General-purpose input/output No. 2
3. GPIO 0, General-purpose input/output No. 0
4. RX, Receive data in, also GPIO3
5. VCC, Voltage (+3.3 V; can handle up to 3.6 V)

11
6. RST, Reset
7. CH_PD, Chip power-down
8. TX, Transmit data out, also GPIO1.

5.2 RELAY MODULE


This is a 5V 4-channel relay interface board, and each channel needs a 15-
20mA driver current. It can be used to control various appliances and
equipment with large current. It is equiped with high-current relays that
work under AC250V 10A or DC30V 10A. It has a standard interface that
can be controlled directly by microcontroller.

Fig 5.4 RELAY MODULE


Working Principle Relay Module
From the picture below, you can see that when the signal port is at low level,
the signal light will light up and the optocoupler 817c (it transforms electrical
signals by light and can isolate input and output electrical signals) will
conduct, and then the transistor will conduct, the relay coil will be electrified,
and the normally open contact of the relay will be closed. When the signal port
is at high level, the normally closed contact of the relay will be closed. So you
can connect and disconnect the load by controlling the level of the control
signal port.

12
PIN DESCRIPTION
1. Input: 0-5 V
2. VCC: Positive supply voltage
3. GND: Ground
4. IN1--IN4: Relay control port
5. Output: supports various types of loads
6. Connect a load, DC 30V/10A,AC 250V/10A

FEATURES
1. Size: 75mm (Length) * 55mm (Width) * 19.3mm (Height)
2. Weight: 61g
3. PCB Color: Blue
4. There are four fixed screw holes at each corner of the board, easy for install
and fix. The diameter of the hole is 3.1mm.
5. High quality Single relay is used with single pole double throw, a common
terminal, a normally open terminal, and a normally closed terminal
6. Optical coupling isolation, good anti-interference.
7. Closed at low level with indicator on, released at high level with indicator
off .
8. VCC is system power source, and JD_VCC is relay power source. Ship
5V relay by default. Plug jumper cap to use .
9. The maximum output of the relay: DC 30V/10A, AC 250V/10A.
5.3 Soil Moisture Sensor
The soil moisture sensor is an electronic device that is designed to measure
the amount of moisture present in the soil. It works by measuring the
resistance of the soil, which is dependent on the amount of moisture in the
soil. The sensor usually consists of two probes that are inserted into the soil,
and a circuit that measures the resistance between the probes. The resistance

13
of the soil varies with the amount of moisture present, so the sensor can
determine the soil moisture content.

Fig 5.5 SOIL MOISTURE SENSOR


Soil moisture sensors are widely used in agricultural applications to optimize
crop growth and irrigation scheduling. They can also be used in environmental
monitoring applications to detect changes in soil moisture due to weather
conditions or other factors.
5.4 BMP180

The BMP180 sensor is a digital barometer that measures atmospheric pressure


and temperature. It is commonly used in weather stations and altitude sensing
applications. The sensor works by detecting changes in air pressure and
temperature, and converting these changes into digital signals that can be read
by a microcontroller or other device.

14
Fig 5.6 BMP180 SENSOR

The BMP180 sensor is very accurate and reliable, and is capable of measuring
pressure with a resolution of 0.01 hPa. It is also very small and lightweight,
making it ideal for use in portable devices and remote monitoring applications.
5.5 DHT11 Sensor

The DHT11 sensor is a digital temperature and humidity sensor that is


commonly used in environmental monitoring applications. The sensor works
by detecting changes in temperature and humidity, and converting these
changes into digital signals that can be read by a microcontroller or other
device.

Fig 5.7 DIAGRAM CONNECTION DHT11 SENSOR

15
The DHT11 sensor is very accurate and reliable, and is capable of measuring
temperature with a resolution of 1°C and humidity with a resolution of 1%
RH. It is also very small and lightweight, making it ideal for use in portable
devices and remote monitoring applications. The sensor is commonly used in
weather stations, greenhouse monitoring systems, and other applications
where temperature and humidity control are important.
5.6 External Motor Connection
• An external motor connection using a relay module in IoT involves
using a relay to control a motor from a remote location through an
internet-connected device. This allows for convenient and flexible
control of the motor, as the user can turn it on or off and adjust its speed
or direction from a smartphone, tablet, or computer.
• To implement this type of system, a relay module with appropriate
voltage and current ratings is connected to the motor's power supply
circuit. The relay is then wired to an IoT device, such as a Raspberry
Pi or Arduino board, which is programmed to communicate with a
cloud-based server or a mobile app.
• The user can then use the app or a web interface to send commands to
the IoT device, which in turn activates the relay and powers the motor.
The user can also receive feedback on the motor's status, such as its
current speed or whether it's running or not.
5.7 Circuit Diagram Of Power Supply
Today almost every electronic device needs a DC supply for its smooth
operation and they need to be operated within certain power supply limits.
This required DC voltage or DC supply is derived from single phase ac mains.
It the Rectifier AC to DC converter. A regulated power supply can convert
unregulated an AC (alternating current or voltage) to a constant DC (direct
current or voltage).

16
Fig 5.8 CIRCUIT DIAGRAM OF POWER SUPPLY

Today almost every electronic device needs a DC supply for its smooth
operation and they need to be operated within certain power supply limits.
This required DC voltage or DC supply is derived from single phase ac mains.
It the Rectifier AC to DC converter. A regulated power supply can convert
unregulated an AC (alternating current or voltage) to a constant DC (direct
current or voltage).
DESCRIPTION
The basic building blocks of a regulated DC power supply are as follows:
1. A step down transformer
2. A rectifier
3. A DC filter
4. A regulator
Step Down Transformer : A step down transformer will step down the
voltage from the ac mains to the required voltage level. The turn’s ratio of the
transformer is so adjusted such as to obtain the required voltage value. The
output of the transformer is given as an input to the rectifier circuit.

17
Rectification : Rectifier is an electronic circuit consisting of diodes which
carries out the rectification process. Rectification is the process of converting
an alternating voltage or current into corresponding direct (DC) quantity. The
input to a rectifier is ac whereas its output is unidirectional pulsating DC.
Usually a full wave rectifier or a bridge rectifier is used to rectify both the half
cycles of the ac supply (full wave rectification). Figure below shows a full
wave bridge rectifier.'
DC Filtration : The rectified voltage from the rectifier is a pulsating DC
voltage having very high ripple content. But this is not we want, we want a
pure ripple free DC
Regulation : This is the last block in a regulated DC power supply. The output
voltage or current will change or fluctuate when there is change in the input
from ac mains or due to change in load current at the output of the regulated
power supply or due to other factors like temperature changes. This
problem can be eliminatedby using a regulator.
A regulator will maintain the output constant even when changes at the
input or any other changes occur. Transistor series regulator, Fixed and
variable IC regulators or a zener diode operated in the zener region can be
used depending on their applications. IC’s like 78XX and 79XX are used to
obtained fixed values of voltages at the output. waveform. Hence a filter is
used. Different types of filters are used such as capacitor filter, LC filter,
Choke input filter, π type filter.

18
CHAPTER 6
CLOUD CONFIGURATION
6.1 ThingSpeak
ThingSpeak is a cloud-based IoT platform that allows users to connect devices
and sensors to the internet and collect data in real-time. It provides a wide
range of tools for analyzing and visualizing data, including customizable
charts and graphs, real-time maps, and data analytics tools. ThingSpeak is built
on an open-source framework and can be integrated with a variety of sensors
and devices.
Customization
ThingSpeak is highly customizable and can be tailored to meet the specific
needs of different IoT projects. Users can create custom visualizations, set
up alerts and notifications, and integrate with third-party services.
Collaboration: ThingSpeak allows users to collaborate on IoT projects by
sharing data and visualizations with other users. It also includes tools for
managing user access and permissions.
Advantages
• Open-source: ThingSpeak is built on an open-source framework, which
means that users can modify and customize the platform to meet their
specific needs.
• Easy to use: ThingSpeak provides a user-friendly interface that makes it
easy for users to set up and manage IoT projects.
• Cost-effective: ThingSpeak is a cost-effective solution for IoT projects, as
it is available as a free or low-cost subscription.
• Integration: ThingSpeak can be integrated with a wide range of sensors and
devices, making it a versatile platform for IoT projects.
• Collaboration: ThingSpeak includes tools for collaboration, which makes
it easier for users to work together on IoT projects.

19
Features
• Data collection: ThingSpeak allows users to collect data from a variety of
sensors and devices in real-time. The platform supports a wide range of
protocols, including HTTP, MQTT, and HTTPS.
• Data visualization: ThingSpeak provides a range of tools for visualizing
data, including customizable charts and graphs, real-time maps, and data
analytics tools. Users can create custom dashboards to display data in a
way that is easy to understand.
• Data analysis: ThingSpeak includes a range of data analytics tools,
including MATLAB analytics, which allows users to perform advanced
analytics on their data.

6.2 Blynk

Blynk is an Internet of things (IoT) company which provides a platform for


building mobile (IOS and Android) applications that can connect electronic
devices to the Internet and remotely monitor and control these devices.

Blynk have been used to collect all the data. Firstly, the user need to sign up
to make an account. Next, Blynk will send the Auth Token to the email that
have been register. After the Auth Token have been send, the user can use the
application and can make their own data such as graph, display value, button,
table and others. The Figure 10 below shows the Blynk Application interface.
To control the IoT base project outputs.

20
CHAPTER 7
WORKING AND RESULT
7.1 WORKING

The working diagram for smart farming using IoT with NodeMCU
and ThingSpeak explains how the system operates to monitor and
control various environmental parameters in a farm.
Sensor Data Collection: The sensors in the system collect data on
various environmental parameters such as temperature, humidity,
soil moisture levels, etc.
Data Processing: The NodeMCU receives the data from the sensors
and processes it before sending it to ThingSpeak. The data is
converted into a format that can be transmitted over Wi-Fi and sent
to ThingSpeak.
Data Transmission: The NodeMCU sends the processed data to
ThingSpeak over Wi-Fi using the internet. The Wi-Fi module in the
NodeMCU connects to the Wi-Fi network, and the data is
transmitted to the ThingSpeak cloud server.
Data Storage: The ThingSpeak cloud server receives the data
transmitted by the NodeMCU and stores it in its cloud storage. The
data is stored in a format that can be easily accessed and analyzed
by farmers.
Data Visualization: The data collected by the system is visualized
using charts and graphs, making it easier for farmers to interpret and
analyze the data. The data visualization can be accessed through the
ThingSpeak user interface.
21
7.2 RESULT

Fig 7.1 GRAPH OVERVIEW

Fig 7.2 GRAPH OF SENSOR

7.3 Fig BLYNK APPLICATION

22
DEMO MODULE

7.4 Fig DEMO MODULE

23
CHAPTER 8
CONCLUSION AND FUTURE WORK

8.1 CONCLUSION

In conclusion, our project "Smart Farming Using IOT with NodeMCU and
ThingSpeak" has been a success in achieving its objectives of improving
farming operations using IoT technology. Through our project, we have
demonstrated how the use of sensors and machine learning algorithms can
provide valuable insights into crop growth, enabling farmers to optimize their
farming operations.

Our project used NodeMCU, an ESP8266-based development board, to


connect various sensors such as temperature, humidity, and soil moisture
sensors to the internet. The data collected from these sensors was then sent to
ThingSpeak, an IoT platform that provides real-time analytics and
visualizations, using Wi-Fi.

The machine learning algorithms used in our project analyzed the data
collected from the sensors and provided insights into the optimal conditions
for crop growth. This data could be accessed remotely through a mobile
application, which would provide farmers with real-time updates on their
crops, enabling them to take action if necessary.

Our project has the potential to revolutionize farming operations by improving


crop yields, reducing costs, and enhancing overall efficiency. The use of IoT
technology in farming operations is becoming increasingly popular, and we
believe that our project provides a viable solution that canbe easily replicated
and scaled for use in larger farming operations.
Overall, we are pleased with the outcomes of our project, and we believe that
24
it has the potential to bring about significant benefits to the farming industry.
We hope that our project will inspire further research and innovation in the
field of smart farming and IoT technology.
8.2 FUTURE SCOPE

Smart farming using IoT is an emerging technology that has the


potential to revolutionize the agriculture industry. As this
technology continues to evolve, there are several potential future
directions for smart farming using IoT. Here are some possible
future scopes for a report on smart farming using IoT:
Artificial intelligence and machine learning: As smart farming
systems become more complex, there is a growing need for
advanced analytics tools such as artificial intelligence and machine
learning. These technologies can help farmers make more informed
decisions by predicting crop yield, identifying pest and disease
outbreaks, and optimizing resource usage.
5G technology: The rollout of 5G technology is expected to have a
significant impact on smart farming. The high-speed connectivity
and low latency of 5G networks can support real-time data collection
and analysis, enabling farmers to make faster and more informed
decisions.
Autonomous farming: The development of autonomous farming
systems could revolutionize the agriculture industry by reducing
labor costs and improving efficiency. Smart farming using IoT can
provide the data and analytics necessary for autonomous farming
systems to operate effectively.

25
Blockchain technology: The use of blockchain technology in
agriculture can provide greater transparency and traceability in the
supply chain. By using smart farming systems to collect data on crop
production and supply chain logistics, blockchain can be used to
verify the authenticity and quality of agricultural products.
Integration with other technologies: Smart farming using IoT can
be integrated with other emerging technologies such as robotics,
drones, and precision agriculture. These technologies can work
together to provide a more comprehensive view of the farm
environment and optimize farming practices.
In conclusion, smart farming using IoT has a bright future with
numerous possibilities for further development and innovation. As
the technology continues to evolve, it has the potential to transform
the agriculture industry by improving efficiency, reducing waste,
and optimizing resource usage. The future of smart farming using
IoT is exciting, and there is much to look forward to in the years
ahead.

26
CHAPTER 9
REFERENCES
1. Kumar, Pardeep, et al. "A review of wireless communication using
IoT in precision agriculture." In 2017 International Conference on
Advances in Computing, Communications and Informatics
(ICACCI), pp. 1214-1218. IEEE, 2017.

2. Zhang, Qiang, et al. "Cloud-based precision agriculture system for


crop management." In Computers and Electronics in Agriculture,
vol. 117, pp. 184-194, 2015.

3. Hossain, Mohammad Shamim, et al. "Smart agriculture: A review


on data mining methodologies and applications." In Computers and
Electronics in Agriculture, vol. 153, pp. 22-35, 2018.

4. Gope, Prosanta, and Yeong Min Jang. "Performance analysis of


MQTT and CoAP in Vehicular Ad-Hoc Networks (VANETs)." In
2013 Eighth International Conference on Broadband and Wireless
Computing, Communication and Applications, pp. 304-309. IEEE,
2013.

5. Patel, R. B., and R. S. G. Raj. "A survey on IoT architectures,


protocols, applications, security, privacy, real-world
implementation and future trends." In 2015 IEEE World Congress
on Computing and Communication Technologies, pp. 366-371.
IEEE, 2015.

6. Rathore, M. M., et al. "Exploiting internet of things for precision


agriculture through machine learning: A review." In Journal of
King Saud University-Computer and Information Sciences, 2018.

27
7. J. M. Aznar, J. M. Pérez-Solano. "Smart agriculture monitoring by
using internet of things." In 2015 International Conference on
Intelligent Networking and Collaborative Systems (INCoS), pp.
123-130. IEEE, 2015.

8. Patel, Bhavik, et al. "IoT based agriculture monitoring system using


Raspberry Pi." In 2016 International Conference on Wireless
Communications, Signal Processing and Networking (WiSPNET),
pp. 1700-1705. IEEE, 2016.

9. Shakoor, Raheel, et al. "A comprehensive review on water level


monitoring using internet of things." In Journal of Ambient
Intelligence and Humanized Computing, pp. 1-19, 2021.
10. Gaurav Dixit, K. Anitha Shenoy, et al. "IoT based smart
agriculture: A review." In 2017 IEEE International Conference on
Power, Control, Signals and Instrumentation Engineering (ICPCSI),
pp. 1284-1289. IEEE, 2017.
11. Sukhpal Singh, Manjeet Bansal. "Internet of Things (IoT): A
Vision, Architectural Elements, and Future Directions." In Internet
of Things and Big Data Technologies for Next Generation
Healthcare, pp. 1-13. Springer, 2017.

28
CHAPTER – 10
ANNEXURE
PROGRAM 1 (Motor & Nodmcu 4)
#define BLYNK_PRINT Serial
#include <ESP8266WiFi.h>
#include <BlynkSimpleEsp8266.h>
// You should get Auth Token in the Blynk App.
// Go to the Project Settings (nut icon).
char auth[] = "EDyNsFE_bIGJzVmTKCOgqfj8tk6VDYkx"; //You will get
this Auth Token in Gmail if you signin Blynk app with your Gmail ID
// Your WiFi credentials.
// Set password to "" for open networks.
char ssid[] = "XXXXXXXX"; //Enter your WIFI Name
char pass[] = "XXXXXXXXXX";//Enter your WIFI Password
void setup()
{
// Debug console
Serial.begin(9600);
pinMode(D5,OUTPUT);
pinMode(D1,OUTPUT);
pinMode(D2,OUTPUT);
pinMode(D3,OUTPUT);
digitalWrite(D5,HIGH);
digitalWrite(D1,HIGH);
digitalWrite(D2,HIGH);
digitalWrite(D3,HIGH);
Blynk.begin(auth, ssid, pass);
// You can also specify server:

29
//Blynk.begin(auth, ssid, pass, "blynk-cloud.com", 8442);
//Blynk.begin(auth, ssid, pass, IPAddress(192,168,1,100), 8442);
}
void loop()
{
Blynk.run();
}

30
Program 2 (Soil Moisture )
#include <Adafruit_ADS1X15.h>
#include <ESP8266WiFi.h>
#include <ESP8266HTTPClient.h>
WiFiClient client;
String thingSpeakAddress= "http://api.thingspeak.com/update?";
String writeAPIKey;
String tsfield1Name;
String request_string;
HTTPClient http;
Adafruit_ADS1115 ads;
void setup()
{
Serial.begin(115200);
delay(3000);
WiFi.disconnect();
Serial.println("START");
WiFi.begin("DIVIYA","123456789"); // Wifi ("ID","Password")
while ((!(WiFi.status() == WL_CONNECTED))){
delay(300);
Serial.println("...");
}
Serial.println("I AM CONNECTED");
Serial.println("Hello!");
Serial.println("Getting single-ended readings from AIN0..3");
Serial.println("ADC Range: +/- 6.144V (1 bit = 3mV/ADS1015,
0.1875mV/ADS1115)");
ads.begin();
}

31
void loop()
{
int16_t adc0, adc1, adc2, adc3;
Serial.println(" ");
adc0 = ads.readADC_SingleEnded(0);
adc0 = adc0 / 25;
adc1 = ads.readADC_SingleEnded(1);
adc1 = adc1 / 25;
adc2 = ads.readADC_SingleEnded(2);
adc2 = adc2 / 25;
adc3 = ads.readADC_SingleEnded(3);
adc3 = adc3 / 25;
Serial.print("SOIL MOISTURE in persent 1% : "); Serial.println(adc0);
Serial.print("SOIL MOISTURE in persent 2% : "); Serial.println(adc1);
Serial.print("SOIL MOISTURE in persent 3% : "); Serial.println(adc2);
Serial.print("SOIL MOISTURE in persent 4% : "); Serial.println(adc3);
Serial.println(" ");
http.GET();
http.end();
}
delay(10);
if (client.connect("api.thingspeak.com",80))
{
request_string = thingSpeakAddress;
request_string += "key=";
request_string += "BOYR02FIDI281SYE";
request_string += "&";
request_string += "field3";
request_string += "=";

32
request_string += adc2;
http.begin(request_string);
http.GET();
http.end();
}
delay(10);
if (client.connect("api.thingspeak.com",80))
{
request_string = thingSpeakAddress;
request_string += "key=";
request_string += "BOYR02FIDI281SYE";
request_string += "&";
request_string += "field4";
request_string += "=";
request_string += adc3;
http.begin(request_string);
http.GET();
http.end();
}
delay(10);
}

33
Program 3 (DH11)
#include <ESP8266WiFi.h>
#include <Adafruit_Sensor.h>

#include <ESP8266HTTPClient.h>
String thingSpeakAddress= "http://api.thingspeak.com/update?";
String writeAPIKey;
String tsfield1Name;
String request_string,request_string1;
HTTPClient http;
#include <DHT.h> // Including library for dht
// library
// https://github.com/adafruit/DHT-sensor-library
#include <ESP8266WiFi.h>
String apiKey = "BOYR02FIDI281SYE"; // Enter your Write API key
from ThingSpeak
const char *ssid = "DIVIYA"; // replace with your wifi ssid and wpa2 key
const char *pass = "123456789"; // WIFI Password
const char* server = "api.thingspeak.com";
#define DHTPIN 0 //pin D3 where the dht11 is connected
DHT dht(DHTPIN, DHT11);
WiFiClient client;
void setup()
{ dht.begin();
Serial.begin(115200);
delay(3000);
WiFi.disconnect();
Serial.println("START");
WiFi.begin("DIVIYA","123456789");

34
while ((!(WiFi.status() == WL_CONNECTED))){
delay(300);
Serial.println("...");
}
Serial.println("I AM CONNECTED");
}
void loop()
{
if (client.connect("api.thingspeak.com",80))
{
request_string = thingSpeakAddress;
request_string += "key=";
request_string += "BOYR02FIDI281SYE";
request_string += "&";
request_string += "field5";
request_string += "=";
request_string += analogRead(A0);
http.begin(request_string);
http.GET();
http.end();
}
delay(10);
float h = dht.readHumidity();
float t = dht.readTemperature();
if (isnan(h) || isnan(t))
{
Serial.println("Failed to read from DHT sensor!");
return;
}

35
if (client.connect(server,80)) // "184.106.153.149" or
api.thingspeak.com
{
String postStr = apiKey;
postStr +="&field1=";
postStr += String(t);
postStr +="&field6=";
postStr += String(h);
postStr += "\r\n\r\n";
client.print("POST /update HTTP/1.1\n");
client.print("Host: api.thingspeak.com\n");
client.print("Connection: close\n");
client.print("X-THINGSPEAKAPIKEY: "+apiKey+"\n");
client.print("Content-Type: application/x-www-form-
urlencoded\n");
client.print("Content-Length: ");
client.print(postStr.length());
client.print("\n\n");
client.print(postStr);
Serial.print("Temperature: ");
Serial.print(t);
Serial.print(" degrees Celcius, Humidity: ");
Serial.print(h);
Serial.print(" Soil Sensor ");
Serial.print(A0);
Serial.println("%. Send to Thingspeak.");
}
client.stop();
Serial.println("Waiting...");

36
// thingspeak needs minimum 15 sec delay between updates
delay(10);
}
void loop() {
// Read temperature and pressure from the BMP180 sensor
float temperature = bmp.readTemperature();
float pressure = bmp.readPressure() / 100.0F; // Convert Pa to hPa
// Print the values on the serial monitor
Serial.print("Temperature: ");
Serial.print(temperature);
Serial.println(" °C");
Serial.print("Pressure: ");
Serial.print(pressure);
Serial.println(" hPa");
// Send data to ThingSpeak
ThingSpeak.setField(1, temperature);
ThingSpeak.setField(2, pressure);
int response = ThingSpeak.writeFields(1, apiKey.c_str());

// Check for successful upload to ThingSpeak


if (response == 200) {
Serial.println("Data sent to ThingSpeak successfully!");
} else {
Serial.println("Error sending data to ThingSpeak!");
}

// Wait for 15 seconds before sending the next set of data


delay(15000);
}

37
Prgroam 4 (BMP180)
#include <Wire.h>
#include <Adafruit_BMP085.h>
#include <ESP8266WiFi.h>
#include <WiFiClient.h>
#include <ThingSpeak.h>
// WiFi credentials
const char* ssid = "DIVIYA";
const char* password = "123456789";
// ThingSpeak credentials
const char* server = "api.thingspeak.com";
const String apiKey = "8UBDLK6RNR2EUBXD";
// Create an instance of the BMP180 sensor
Adafruit_BMP085 bmp;
// Initialize WiFi client
WiFiClient client;
void setup() {
// Start the serial communication
Serial.begin(9600);
// Connect to WiFi network
WiFi.begin(ssid, password);
while (WiFi.status() != WL_CONNECTED) {
delay(1000);
Serial.println("Connecting to WiFi...");
}
// Initialize ThingSpeak
ThingSpeak.begin(client);
// Initialize the BMP180 sensor
if (!bmp.begin()) {

38
Serial.println("Could not find a valid BMP180 sensor, check wiring!");
while (1) {}
}
}
void loop() {
// Read temperature and pressure from the BMP180 sensor
float temperature = bmp.readTemperature();
float pressure = bmp.readPressure() / 100.0F; // Convert Pa to hPa
// Print the values on the serial monitor
Serial.print("Temperature: ");
Serial.print(temperature);
Serial.println(" °C");
Serial.print("Pressure: ");
Serial.print(pressure);
Serial.println(" hPa");
// Send data to ThingSpeak
ThingSpeak.setField(1, temperature);
ThingSpeak.setField(2, pressure);
int response = ThingSpeak.writeFields(1, apiKey.c_str());
// Check for successful upload to ThingSpeak
if (response == 200) {
Serial.println("Data sent to ThingSpeak successfully!");
} else {
Serial.println("Error sending data to ThingSpeak!");
}
// Wait for 15 seconds before sending the next set of data
delay(15000);
}

39

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy