You are on page 1of 13

A

Project Report On

Wireless Communication
(IOT IN AGRICULTURE)
Submitted in partial fulfillment of the requirements for award of the degree of

BACHELOR OF TECHNOLOGY

In

ELECTRONICS AND COMMUNICATION ENGINEERING

By
MADUGUNDU VIKAS

(RA1611004010494)

DEPARTMENT OF ELECTRONICS & COMMUNICATION ENGINEERING


SRM INSTITUTE OF SCIENCE AND TECHNOLOGY

Kattankulathur-603203
kancheepuram Dt,Tamil Nadu
Abstract --

In this paper an automated system has been developed to determine whether the
plant is normal or diseased and drip irrigation.IOT is a shared Network of objects where these
objects interact through Internet. One of the important applications of IOT is Smart Agriculture.
Smart Agriculture reduces wastage of water, fertilizers and increases the crop yield. Here a
system is proposed to monitor crop-field using sensors for soil moisture, humidity and
temperature. By monitoring these parameters the irrigation system can be automated if soil
moisture is low.The normal growth of the plants, yield and quality of agricultural products is
seriously affected by plant disease. This paper attempts to develop an automated system that
detects the presence of disease in the plants. An automated disease detection system is
developed using sensors like temperature, humidity and colour based on variation in plant leaf
health condition. The values based on temperature, humidity and colour parameters are used to
identify presence of plant disease.

ORGANIZATION PROFILE:
Cognizance Professional Solutions Llp is a Limited Liability
Partnership firm incorporated on 18 September 2014. It is registered at Registrar of
Companies, Chennai. Its total obligation of contribution is Rs. 100,000.Naresh Kumar Reddy
Nallaballe is a Designated Partner of Cognizance Professional Solutions Llp.Cognizance
Professional Solutions Llp's last financial year end date for which Statement of Accounts and
Solvency were filed is N/A and as per records from Ministry of Corporate Affairs (MCA),
date of last financial year end date for which Annual Return were filed is N/A.Cognizance
Professional Solutions Llp's LLP Identification Number is (LLPIN)AAC-7317. Its Email
address is jkarthickca@gmail.com and its registered address is Apartment No 3107, Tower
-3,10th Level, Estancia Resi Township,Vallancheri Villa ge Chengalpattu Taluk Chennai TN
603202 IN .Current status of Cognizance Professional Solutions Llp is - Active.

Cognizance is an efficient training provider company, which deals in educating engineering


students with new trends in engineering technology
Cognizance is an efficient training provider company, which deals in educating engineering
students with new trends in engineering technology and also helps them gain confidence with
hands-on experience in their technical field. We specialize in fields like Electrical and
Electronics, Mechanical, Civil and Computer Science engineering. We provide Training and
Workshops along with Career Counselling for students. The vision behind our company is to
bring low cost and quality practical engineering experience for everybody so that the student
can become well aware and self-confident in their technical sphere. They can transform the
pre-set boundaries and innovate for the world to see.

INTRODUCTION TO IOT
Basically, IoT is a network in which all physical objects are connected to the internet
through network devices or routers and exchange data. IoT allows objects to be controlled
remotely across existing network infrastructure. IoT is a very good and intelligent
technique which reduces human effort as well as easy access to physical devices. This
technique also has autonomous control feature by which any device can control
without any human interaction

The below figure shows the connectivity of various devices of different fields with
Internet and exchange data between them. So above figure represent the connectivity
of world through various existing technologies.
“Things” in the IoT sense, is the mixture of hardware, software, data, and services.
“Things” can refer to a wide variety of devices such as DNA analysis devices for
environmental monitoring, electric clamps in coastal waters, Arduino chips in home
automation and many
other. These devices gather useful data with the help of various existing technologies
and share that data between other devices. Examples include Home Automation
System which uses Wi-Fi or Bluetooth for exchange data between various devices of
home.

Figure-1.1: connectivity of various devices of different fields with Internet and exchange data
between them.

Historical Background:
In early 1982 the concept of the network of smart devices was discussed, with a
modified Coke machine. This coke machine is modified at “Carnegie Mellon
University” and becoming the first Internet-connected appliance. This machine was
able to report its inventory and whether newly loaded drinks were cold.

In 1994 Reza Raji explained the idea of IoT as “small packets of data to a large set of
nodes, so as to integrate and automate everything from home appliances to entire
factories”. After that many companies proposed various solutions like Microsoft’s at
Work or Novell’s Nest. Bill Joy proposed Device to Device (D2D) communication as
a part of his “Six Webs” frameworks at the
World Economic Forum at Davos in 1999.

The thought of Internet of Things first became popular in 1999. British entrepreneur
Kevin Ashton first used the term Internet of Things in 1999 while working at Auto-ID
labs. Besides that near field communication, barcode scanners, QR code scanners and
digital watermarking are the various devices which are working on IoT in the present
scenario.
Practical Applications:

The versatility of IoT has become very popular in recent years. There are many
advantages to having a device based on IoT. Mckinsey Global Institute reports that
IoT business will reach 6.2
trillion in revenue by 2025. There are lots of applications are available in the market
in different areas.

1) Personal Home Automation System: Home Automation system is the major


example in this area.

Wemo Switch Smart Plug: It is the most useful devices which connected home
devices in the Switch, a smart plug. It plugs into a regular outlet, accepts the power
cable from any device, and can be used to turn it on and off on hit a button on your
smartphone.

2) Enterprise: In the enterprise area many applications are there Like environmental
monitoring system, smart environment etc.

Nest Smart Thermostat: It is connected to the internet. The Nest learns automatically
your family’s routines and will automatically adjust the temperature based on your
activities, to make your house more efficient. There is also a mobile app which allows
the user to edit temperature and schedules.

3) Utilities: smart metering, smart grid, and water monitoring system are the most
useful applications in the various utility area.

4) Energy Management: Advanced Metering Infrastructure is the major example in


this area.

5) Medical and Health Care: Remote health monitoring and emergency notification
system
are examples of IOT in the medical field.

Health patch Health Monitor: It can be used for the patient who can’t go to doctors,
letting them get ECG, heart rate, respiratory rate, skin temperature, body posture, fall
detection, and
activity readings remotely.

6) Transportation: Electronic toll collection system is the most useful example in


this area.

Raspberry Pi:

The Raspberry Pi is small pocket size computer used to do small computing and networking
operations. It is the main element in the field of internet of things. It provides access to the
internet and hence the connection of automation system with remote location controlling
device becomes possible. Raspberry Pi is available in various versions. Here, model Pi 2
model B is used and it has quad-core ARM Cortex-A53 CPU of 900 MHz, and RAM of 1GB.
it also has: 40 GPIO pins, Full HDMI port, 4 USB ports, Ethernet port, 3.5mm audio jack,
video Camera interface (CSI), the Display interface (DSI), and Micro SD card slot.

DTH11 Sensor:

The DHT11 is a basic, low-cost digital temperature and humidity sensor. It gives out digital
value and hence we can give its output directly to data pin instead of ADC. It has a capacitive
sensor for measuring humidity. The only real shortcoming of this sensor is that one can
onlyget new data from it only after every 2 seconds seconds

Soil Moistuer sensor:

Soil moisture sensor measures the water content in soil. It uses the property of the
electrical resistance of the soil. The relationship among the measured property and soil
moisture is calibrated and it varies depending on environmental factors such as temperature,
soil type, or electric conductivity. Here, It is used to sense the moisture in field and transfer it
to raspberry pi in order to take controlling action of switching water pump ON/OFF.
Relay:

A relay is an electrically operated switch. Many relays use an electromagnet to


mechanically operate a switch, but other operating principles are also used, such as solidstate
relays. Relays are used where it is necessary to control a circuit by a separate low-power
signal, or where several circuits must be controlled by one signal.

Software Used:

Python:

Python is an interpreted high-level programming language for general-purpose programming.


Created by Guido van Rossum and first released in 1991, Python has a design philosophy
theemphasizes code readability, and a syntax that allows

programmers to express concepts in fewer lines of code,[25][26] notably using


significant whitespace. It provides constructs that enable clear programming on both
small and large scales.

Dropbox:

DropBox server is server host to private data and it is freely accessible for limited amount
of storing data.

Blynk Server:

Blynk Server is an IoT platform to control and monitor the processors


like Arduino,RPi and ESP32.

Raspbian:

Raspbian is the main and basic software for RPi devices, officially supported by the
Raspberry Pi Foundation. In fact, it is an operating system, based on Debian and
optimized for Raspberry Pi hardware. It comes with lots of pre-installed pieces of
software appropriate for most of ARM users and developers. And in this blog post, I
am going to look through almost all possible operating systems, as well as the
Raspberry Pi images, compare and review major types of other software you can use
for your complicated Raspberry Pi Projects. But the main operating system,
ready-to-use and optimized to the needs of the most developers and makers is
Raspbian. So, first thing firstly, let’s dig deeper this type of OS for RPi.
Methodology:

To implement the idea for combining image processing and irrigation we have followed the
methodology used in below diagram and system block diagram. DropBox server is server
host to private data and it is freely accessible for limited amount of storing data with
authentication. We are using this in Desktop with windows OS and also in smart phone in
order to give storage of disease detected images to the former. Blynk Server is an IoT
platform to control and monitor the processors like Arduino, RasberryPi and ESP32; here we
are making use of this server to monitor the Irrigation process by giving updates of
environmental factors like Temperature and Humidity with status of Drip Irrigation process of
the system to farmer. Fig. 3. Methodology of proposed system..

Drip irrigation:

In order to design an automatic drip Irrigation system we have made use of RPi
as a main processor and ESP32 as slave Processor because to avoid overhead caused by
Irrigation Process and to protect RPi from damage. The design of the Drip Irrigation is
shown in figure 6. Authentication process to connect RPi with ESP32 is done by using
python programming in raspberry by importing ESP32 libraries. Design of automatic
Drop Irrigation system DHT11 is a basic temperature and Humidity sensor, which
measures temperature in the degrees and humidity in terms of percentage, moisture
sensor will detect the moisture content in the soil. These parameters are uploaded to
Blynk server.
Flowchart:

Image processing: We make use of image processing system efficiently to detect the
disease called “leaf Blight” especially in tomato plant
In order to implement it in remote place we can make use of RasberryPI3 module
which has a build-in WiFi, a Pi camera is also used to take the clear pictures and to
process

Algorithm for Image Processing is as follows:


Import the libraries (OPENCV, Numpy) needed to complete the task.
Take the picture with preview of 10 seconds and save it in memory
Reshape the image and make it to 32bit format.
Apply K means clustering by keeping k=4 for original image
Convert RGB image to HSV
Define range of diseased color in HSV
Threshold the HSV image to get only diseased color
Mask the image by AND operation with original image
how the resultant images
Upload the final resultant image which shows the affected part of the leaf into the Drop
Box
K mean Clustering:
K clusters are created by associating every observation with the nearest mean. Centroid
of each of the k cluster becomes new mean. Steps are repeated until convergence has
been reached
Code:

#include<LiquidCrystal.h>
LiquidCrystal lcd(2,3,4,5,6,7);
#include<Timer.h>
Timer t;
#include <SoftwareSerial.h>
SoftwareSerial Serial1(8, 9);
#define spr 10
#define buz 11
#define fan 12
const int tempPin = A0; // Analog input pin that the potentiometer is attached to
const int humPin = A1; // Analog input pin that the potentiometer is attached to
int temValue = 0; // value read from the pot
int humValue = 0; // value read from the pot
nt cnt = 0;
char *api_key="IMQETP1SP4R4L7U2"; // Enter your Write API key from
ThingSpeak
static char postUrl[150];
void httpGet(String ip, String path, int port=80);
void setup()
pinMode(spr, OUTPUT); pinMode(buz,
OUTPUT); pinMode(fan, OUTPUT);
lcd.begin(16, 2);
lcd.clear();
lcd.print("IOT BASED DATA");
lcd.setCursor(0,1);
lcd.print("LOGGER SYSTEM ");
delay(2000);
Serial1.begin(115200);
Serial.begin(9600);
lcd.clear();
lcd.print("WIFI Connecting");
lcd.setCursor(0,1);
lcd.print("Please wait ... ");
Serial.println("Connecting Wifi ... ");
connect_wifi("AT",1000);
connect_wifi("AT+CWMODE=1",1000);
connect_wifi("AT+CWQAP",1000);
connect_wifi("AT+RST",5000);
connect_wifi("AT+CWJAP=\"CHOWDHARY'S\",\"123456789\"",10000);
Serial.println("Wifi Connected");

lcd.clear();
lcd.print("WIFI Connected.");
t.every(40000, send2server);
}
void loop()
{
temValue = analogRead(tempPin);
temValue= temValue/4;
lcd.clear();
lcd.setCursor(0,0);
lcd.print("Temp: ");
lcd.print(temValue); // printing temp on LCD
lcd.print("C ");
lcd.setCursor(0,1);
lcd.print("Humi:");
humValue = analogRead(humPin);
lcd.print(humValue); // Printing temperature on LCD
lcd.print(" % ");
delay(2000);
t.update();
}
void send2server()
{
lcd.clear();
lcd.print("DATA Updating.."); delay(1000);
char tempStr[8];
char gasStr[8];
dtostrf(temValue, 5, 3, tempStr);

dtostrf(humValue, 5, 3, gasStr);
sprintf(postUrl,
"update?api_key=%s&field1=%s&field2=%s",api_key,tempStr,gasStr);
httpGet("api.thingspeak.com", postUrl, 80);
}
//GET
https://api.thingspeak.com/update?api_key=SIWOYBX26OXQ1WMS&field1=0
void httpGet(String ip, String path, int port)
{
int resp;
String atHttpGetCmd = "GET /"+path+" HTTP/1.0\r\n\r\n";
//AT+CIPSTART="TCP","192.168.20.200",80
String atTcpPortConnectCmd = "AT+CIPSTART=\"TCP\",\""+ip+"\","+port+"";
connect_wifi(atTcpPortConnectCmd,1000);
int len = atHttpGetCmd.length();
String atSendCmd = "AT+CIPSEND=";
atSendCmd+=len;
connect_wifi(atSendCmd,1000);
connect_wifi(atHttpGetCmd,1000);
}
void connect_wifi(String cmd, int t)
{
int temp=0,i=0;
while(1)
{
lcd.clear();
lcd.print(cmd);
Serial.println(cmd);

while(Serial1.available())
{
if(Serial1.find("OK"))
i=8;
}
delay(t);
if(i>5)
break;
i++;
}
if(i==8)
{
Serial.println("OK");
lcd.setCursor(0,1);
lcd.print("OK");
}
else
{
Serial.println("Error");
lcd.setCursor(0,1);
lcd.print("Error");
}
}

CONCLUSION:
In this work, a system is developed to determine to the quality of the leaves. The
proposed method uses the sensor devices to detect the parameters like temperature,
humidity and color of the leaves, which are then compared with the dataset to check
whether the collected values falls in to the range specified in the dataset. The
proposed model can be used in different areas by farmers, industrialists, botanists,
food engineers and physicians. since whole system is acting on IoT ,an illiterate
farmer may not be able to use this work.

You might also like