0% found this document useful (0 votes)
7 views12 pages

Wa0000.

Uploaded by

thanushiyam33
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
7 views12 pages

Wa0000.

Uploaded by

thanushiyam33
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 12

SMART AGRICULTURE

MONITORING SYSTEM USING IOT

AMRITA COLLEGE OF ENGINEERING AND


TECHNOLOGY

ELECTRONICS AND COMMUNICATION ENGINEERING.

SUBMITTED BY:
NAME: THANUSHIYA.M
REG NO:962322106103

GROUP MEMBERS:
SIVA BHARATH.R
REG N0: 962322106086
SHIVA RENJINI.E.S
REG NO:962322106081
THANUSHIYA.M
REG NO:962322106103
RATHNASHRUTHY.N.K
REG NO:962322106070
SUBRAJA.S
REG NO:962322106095
ABSTRACT:
In response to erratic climate changes and rainfall, Indian farmers have
increasingly adopted smart agriculture, an IoT-driven approach aimed at reducing
water and fertilizer wastage while boosting crop yield. This involves integrating
sensor technology and wireless networks to monitor temperature, soil moisture,
and rainfall, facilitating real-time data collection and remote monitoring for
enhanced cultivation and crop yield. Detection and correction of soil nutrient
deficiencies are enabled through field monitoring via IP addresses.

INTRODUCTION:
Agriculture, one of humanity's oldest activities, remains a vital source of
livelihood, with nearly half of the global workforce still engaged in it despite
industrialization and urbanization. The main goal is to cultivate stronger, more
productive crops by improving soil quality and irrigation. In India, where
agriculture is the backbone of the economy, 64% of the population depends on it
for sustenance. However, development is hindered by factors like uneven rainfall,
inadequate infrastructure, and resource allocation imbalance. The Green
Revolution has primarily succeeded in improving irrigation but hasn't fully
benefited small farmers. This disparity calls for systematic planning and
modernization, as traditional methods and irregular monsoons lead to low
productivity. Implementing scientific techniques, including IoT, can revolutionize
farming by enhancing efficiency and addressing environmental factors. While IoT
offers innovative solutions like wireless sensor networks, focusing solely on
environmental monitoring isn't enough to boost crop productivity, as other factors
also play significant roles.

METHODOLOGY:

Our project implementation includes the following steps:

1)The system is designed with one mesh containing two nodes. Each node has
sensor units that receive data, which is then processed by a microcontroller to
convert analog to digital. The digital data is transmitted to a NODE MCU
ESP8266 module, which communicates with the main controller.
2)All sensors and the NODE MCU ESP8266 module are connected to the
microcontroller. The collected sensor data is sent to Thingspeak via the NODE
MCU ESP8266. These sensors collect data according to their specialty.
3)The microcontroller is linked with the NODE MCU ESP8266. It receives
sensor data and forwards it to the NODE MCU ESP8266, which communicates
with an IoT platform.

EXISTING WORK:

The existing work on smart agriculture monitoring systems using IoT


focuses on leveraging IoT technology to enhance various aspects of farming, such
as soil moisture monitoring, crop health monitoring, and irrigation management.
These systems typically involve sensors placed in the field to collect data on
environmental parameters, which is then transmitted wirelessly to a central
system for analysis. Through real-time monitoring and data analytics, farmers can
make informed decisions regarding irrigation scheduling, pest control, and
fertilizer application, ultimately leading to improved crop yields, resource
efficiency, and sustainability in agriculture.

PROPOSED WORK:

Expanding on prior research, we will develop the system with various


improvements. This will involve utilizing a soil moisture sensor to accurately
determine soil moisture levels. The analog data gathered will be digitized by a
microcontroller through coding. The data will then be transmitted between sensor
units and the main controller. The main controller, an Arduino Uno, will be
configured to receive the actual sensor data. Additionally, thresholds for different
sensors will be set. The data from the various sensors will be fetched into an IoT
platform via API, enabling the system to generate readings. Finally, all these
values will be monitored and displayed in graphical form on Thingspeak.

SYSTEM REQUIREMENTS:

SOFTWARE USED:

Arduino IDE:
Software for Arduino boards is programmed and developed using the
software environment known as the Arduino IDE (Integrated Development
Environment). It’s simple and user-friendly interface for programming Arduino
boards includes a code editor with syntax highlighting and auto-completion, serial
monitors for communicating with the board, and a built-in library of functions
and examples. The Arduino IDE is used to create the code for the IoT-based smart
agricultural monitoring system that reads data from the sensors, analyses the data,
and regulates the actuators depending on the data. Using a USB cable, the code is
sent to the Arduino board, which then executes it to manage the sensors and
actuators that are attached to it. The serial monitor in the Arduino IDE can be used
to debug and test the code, and to monitor the data being read from the sensors
and sent to the NODE MCU ESP8266 module for transmission to Thingspeak.
The Arduino IDE is an essential tool for developing and programming the code
that controls the system.
To include libraries in Arduino:
• Launch the Arduino IDE.
• Navigate to Sketch >> Include Library in the top left corner. A menu will
appear, presenting two main options:
a. Download libraries directly from the Arduino IDE using the Manage
libraries menu. These libraries are sourced from both the Arduino platform and
GitHub. Access this menu by selecting Library Manager.
Add libraries based on your requirements.
b. Add a library if you have it in a Zip file. Upon selecting this option, a menu
will appear, allowing you to click on Add Zip Library. Examples include
LiquidCrystal_I2C.h and the DHT11 sensor.

Thingspeak:

ThingSpeak, an open-source IoT platform, enables the collection, analysis,


and visualization of data from IoT devices, particularly in smart agricultural
monitoring systems. It gathers and stores data from sensors and actuators,
providing insights into environmental conditions and plant growth for informed
resource management. It also facilitates setting up alerts for conditions like low
soil moisture levels to prompt immediate action. Visualization tools such as charts
aid in understanding data trends for better decision-making in farming practices.
ThingSpeak simplifies channel creation through a step-by-step process on its
website, including filling out necessary information and saving the channel.
Accessing the channel is facilitated through unique API keys, essential for
automated data transmission from devices like Arduino.
HARDWARE USED:

• Arduino UNO Atmega328


• Water Pump
• Light sensor
• Arduino Cable
• Gas Sensor
• NODE MCU ESP8266 Module
• Temperature and Humidity Sensor
• Male and Female Cable
• Soil Moisture Sensor
• Breadboard
• Power Supply
• LCD
• Buzzer
• I2C Module
• Relay

IMPLEMENTATION DETAILS:

Implementing a smart agriculture monitoring system involves integrating various


technologies to monitor and manage agricultural activities efficiently. Here are
the key components and steps for implementing such a system:

1. *Requirement Analysis*
- Identify the specific needs of the agricultural operation.
- Determine the types of crops and environmental factors to be monitored.

2. *System Design*
- Design the architecture of the monitoring system, including sensor placement
and network topology.
- Decide on the data processing and storage solutions (cloud vs. local).

3. *Sensor Deployment*
- Install sensors in the fields at strategic locations.
- Ensure proper calibration and testing of sensors for accurate data collection.
4. *Connectivity Setup*
- Set up the communication network to connect sensors to gateways.
- Ensure reliable internet connectivity for data transmission to the cloud.

5. *Data Integration*
- Implement data collection protocols and integrate with the cloud or local
servers.
- Set up data processing pipelines for real-time and batch processing.

6. *User Interface Development*


- Develop mobile and web applications for data visualization and system
control.
- Implement features for real-time monitoring, historical data analysis, and alert
configurations.

DATA COLLECTION AND PROCESSING:

Data collection and processing are critical components of a smart agriculture


monitoring system. They ensure that data from various sensors is accurately
gathered, transmitted, stored, analyzed, and utilized to make informed decisions.
Here’s a detailed overview of how these processes work:

Data Collection:

1. *Sensor Deployment*
- *Placement*: Sensors are strategically placed in fields to measure parameters
like soil moisture, temperature, humidity, pH, light intensity, and nutrient levels.
- *Calibration*: Sensors are calibrated to ensure accurate readings.

2. *Data Acquisition*
- *Real-Time Monitoring*: Sensors continuously collect data at predefined
intervals.
- *Data Aggregation*: Data from multiple sensors is aggregated, either through
a central hub or directly to a cloud platform.

3. *Communication Protocols*
- *Wireless Networks*: Use Wi-Fi, LoRaWAN, Zigbee, or cellular networks to
transmit data from sensors to a central system or cloud.
4. *Data Transmission*
- *Local Storage*: Temporary storage on local servers or edge devices for quick
access and processing.
- *Cloud Storage*: Secure and scalable storage solutions like AWS S3, Google
Cloud Storage, or Azure Blob Storage for long-term data retention.

Data Processing:

1. *Data Ingestion*
- *Streaming Data*: Real-time data streaming to process and analyze data as it
arrives using platforms like Apache Kafka or AWS Kinesis.
- *Batch Processing*: Periodic data collection and processing in batches using
tools like Apache Hadoop or AWS Glue.

2. *Data Cleaning and Preprocessing*


- *Data Validation*: Ensure the collected data is accurate, complete, and within
expected ranges.
- *Filtering*: Remove noise and outliers from the data.
- *Transformation*: Convert raw data into a structured format suitable for
analysis (e.g., converting sensor readings to standard units).

3. *Data Storage*
- *Relational Databases*: For structured data, use databases like MySQL,
PostgreSQL, or Amazon RDS.
- *NoSQL Databases*: For unstructured or semi-structured data, use databases
like MongoDB, Cassandra, or Amazon DynamoDB.

4. *Data Analysis*
- *Descriptive Analytics*: Summarize and visualize historical data to
understand trends and patterns using tools like Tableau, Power BI, or Google Data
Studio.
- *Predictive Analytics*: Use machine learning models to predict future
conditions, such as crop yields, weather patterns, and pest outbreaks.
- *Prescriptive Analytics*: Provide actionable recommendations based on data
analysis, such as optimal irrigation schedules or fertilization plans.

5. *Data Visualization*
- *Dashboards*: Real-time dashboards to visualize sensor data and analytics
results.
- *Reports*: Generate periodic reports summarizing key metrics and insights.
BLOCK DIAGRAM:

CODE:

#include<string.h>
#include <LiquidCrystal.h>
LiquidCrystal lcd(5, 4, 3, 2, A4, A5);
String ssid = "Simulator Wifi"; // SSID to connect to
String password = ""; // Our virtual wifi has no password (so dont do
your banking stuff on this network)
String host = "api.thingspeak.com"; // Open Weather Map API
const int httpPort = 80;
String uri =
"/channels/1158746/fields/1.json?api_key=08OT7TXVC7502XG9&results=2";
int motor = 12;
int buz = 10;
int setupESP8266(void) {
// Start our ESP8266 Serial Communication
Serial.begin(115200); // Serial connection over USB to computer
Serial.println("AT"); // Serial connection on Tx / Rx port to
ESP8266
delay(10); // Wait a little for the ESP to respond
if (!Serial.find("OK")) return 1;

// Connect to 123D Circuits Simulator Wifi


Serial.println("AT+CWJAP=\"" + ssid + "\",\"" + password + "\"");
delay(10); // Wait a little for the ESP to respond
if (!Serial.find("OK")) return 2;

// Open TCP connection to the host:


Serial.println("AT+CIPSTART=\"TCP\",\"" + host + "\"," + httpPort);
delay(50); // Wait a little for the ESP to respond
if (!Serial.find("OK")) return 3;

return 0;
}
void anydata(void) {

// Construct our HTTP call


String httpPacket = "GET " + uri + " HTTP/1.1\r\nHost: " + host +
"\r\n\r\n";
int length = httpPacket.length();
//String httpPacket = "GET
https://api.thingspeak.com/channels/1104800/fields/1.json?api_key=CX5ZH
R91RBPV0RSW&results=2";
//int length = httpPacket.length();

// Send our message length


Serial.print("AT+CIPSEND=");
Serial.println(length);
delay(10); // Wait a little for the ESP to respond if
(!Serial.find(">")) return -1;
// Send our http request
Serial.print(httpPacket);
delay(10); // Wait a little for the ESP to respond
String ch;
ch = Serial.readString();
Serial.println(ch);
int point = 0;
for(int i = 0 ;i<500 ; i++)
{
if(ch[i]=='x')
{

point = i+1;
break;

}
}
Serial.println(ch[point]);
if(ch[point]=='d')
{
Serial.println("Dry");
digitalWrite(motor,HIGH);
digitalWrite(buz,LOW);
lcd.clear();
lcd.setCursor(0,0);
lcd.print("Leaves are dry");
lcd.setCursor(0,1);
lcd.print("Sprinkler is ON");
delay(2000);

}
else
{
Serial.println("green");
digitalWrite(motor,LOW);
digitalWrite(buz,HIGH);
lcd.clear();
lcd.setCursor(0,0);
lcd.print("Leaves are green");
lcd.setCursor(0,1);
lcd.print("Green light is ON");
delay(2000);

}
if (!Serial.find("SEND OK\r\n")) return;

}
void setup() {

setupESP8266();
pinMode(motor,OUTPUT);
pinMode(buz,OUTPUT);
lcd.begin(16, 2);
lcd.setCursor(0,0);

}
void loop() {

anydata();

delay(1000);
}

DIAGRAM:
CIRCUIT DIAGRAM:

SIMULATION LINK:

https://www.tinkercad.com/things/e23OlClaGUZ-copy-of-smart-plant-
monitoring-
system/editel?sharecode=MlRFE1FzNeeNz_uOVxcL_hYLOX1xLHKbp6SJG9
DRhvU

CONCLUSION:
IoT is set to revolutionize smart farming by enabling predictive monitoring
of soil moisture and humidity levels, facilitating real-time control of irrigation
systems across various farming domains. It enhances time efficiency, water
management, crop monitoring, soil health, and the regulation of insecticides and
pesticides, while reducing human labour, simplifying farming techniques, and
promoting smart farming practices. Moreover, it streamlines market access for
farmers with minimal effort. This paper introduces an automated irrigation system
utilizing IoT, where cloud computing complements IoT to efficiently manage the
agriculture sector. Environmental parameters are continuously sensed by the
system, with data transmitted to users via the cloud for informed decision-making.
Users can take control actions using actuators, optimizing cultivation to meet
plant requirements, resulting in increased crop yield, extended production
periods, enhanced quality, and reduced reliance on protective chemicals.

You might also like