You are on page 1of 24

A

Mini Project Report


On

“Crop/Plant area protecting system using PIC18F4520

microcontroller”

Submitted by
Mr. Chougule Sumeru Sunil

S. Y. B. Tech. ETC

Under the Guidance of


Dr. J. S. Awati

E&TC Engineering Department


K. E. Society’s
Rajarambapu Institute of Technology, Rajaramnagar
(An autonomous Institute, Affiliated to Shivaji University, Kolhapur)
2021-2022
K. E. Society’s

Rajarambapu Institute of Technology, Rajaramnagar


(An autonomous Institute, Affiliated to Shivaji University, Kolhapur)
Department of E&TC Engineering

CERTIFICATE
This is to certify that, mini project report entitled “Crop/Plant protecting system using PIC18F4520
microcontroller” submitted to Rajarambapu Institute of Technology, Rajaramnagar, is a
Bonafede work done by Mr. Chougule Sumeru Sunil under our guidance and supervision for the
academic year 2022-2023. The report has been approved as it satisfies the academic requirements
in respect of mini-project work prescribed for the course.

Date:
Place: RIT, Rajaramnagar.

Dr. J. S. Awati. Dr. M. S. Patil


Project Supervisor Head of Department

I
DECLARATION

This is to declare that this report has been written by us. No part of the report is plagiarized from
other sources. All information included from other sources has been duly acknowledged. We never
copied any part of the report, if is found to be plagiarized, we will take full responsibility for it.

Sr. No. Student Name Roll No Signature

1. Mr.Chougule Sumeru Sunil 2005037

2. Mr. Kumbhar Tejas Rajendra 2005038

3. Mr. Patil Shubham Ashok 2005024

4.

Date:

Place: RIT, Rajaramnagar.


ii

ACKNOWLEDGEMENT

It is with great satisfaction and achievement that we have completed. Our Mini-project work
entitled “Crop/Plant protecting system using PIC18F4520 microcontroller”. We take this
opportunity to acknowledge each and every one who contributed towards our project work.
First we would like to express our sincere gratitude towards my Project Supervisor Dr. J. S.
Awati, Dept. of E&TC Engineering, for her able assistance, timely suggestions and guidance
throughout the duration of the project.
We express our sincere gratitude towards Dr. M. S. Patil, Head of the Department, E&TC
Engineering, for providing necessary facilities, guidance and support.
iii

ABSTRACT

Indian industries majorly include biomedical, agricultural and pharmaceutical which are the pillars
of country economy. The monitoring of temperature and humidity are major areas for all these
industries. Any kind of unbalancing in the environmental conditions or unset parameters can create
financial loss in the productivity of pharmaceutical and agriculture industries. Monitoring of
temperature and humidity are also required for biomedical industry for drugs and cell culture
methods.

iv
List of Figures
Fig Description Page No
No.
1.5 Block diagram of temperature and humidity management 3
3.2 Architectural diagram of temperature and humidity management 6
3.3.1 Arduino UNO 7
3.3.2 DHT 11 sensor 8
3.3.3 ESP8266 WiFi module 9
4.1 Functional diagram of temperature and humidity management 11
4.2.1.1 Pin diagram for programming 12
4.2.1.2 Connections of Pins after programming 13
4.2.2.1 Blynk Server 14
5.1 Output of temperature and humidity management 15
5.2 Temperature And Humidity Graph 16
CONTENTS
Abstract i
List of Tables ii-
List of Figures ---

1. Introduction 1
1.1 Project Motivation 1
1.2 Objective 1
1.3 Scope of the project 1
1.4 Introduction to the System 2
1.5 Proposed System 2
1.5.1 Project Methodology 3
1.5.2 Project Specifications 4
2. Literature Survey 5
3. System Requirement And Specifications 6
3.1 Project Architecture 6
3.2 Hardware and software building blocks 7
3.2.1Arduino UNO 7
3.2.2 DHT11 8
3.2.3 ESP8266 9
3.2.4 Arduino IDE 9
3.2.5 Blynk 10
4. Project Implementation And Work Flow Diagram 11
4.1 Functional Diagram 11
4.2 Modules To Be Implemented 11
4.2.1 ESP8266 13
4.2.2 Blynk App
5. Results and Discussion 15
6. Conclusion 17
7. References 18
Chapter 1

INTRODUCTION

1.1 Project Motivation

Internet of Things is expected to revolutionize our world by enabling us to monitor and


control vital phenomena in our environment through the use of devices capable of sensing,
processing and wirelessly transmitting data to remote storage like cloud which stores, analyses
and presents this data in useful form. From the cloud this information can be accessed through
various front end user interfaces such as web or mobile applications, depending upon suitability
and requirements. Internet lies at the heart of this transformation playing its role in efficient,
reliable and swift communication of data from devices to the cloud and from the cloud to the end
users. In this new paradigm, the concept of the typical end system or host in the Internet is
modified and hosts comprise of devices or things hence the name Internet of Things. The
“things” are capable of sensing and transmitting data such as temperature, pressure, humidity,
noise, pollution, object detection, patient vitals etc.

1.2 Objectives
1. To monitor temperature and humidity.
2. To avoid workload on humans.
3. To automatically get the values on mobile from area
4. To protect area from over temperature and extra humidity.
1.2 Scope of the Project

Environmental monitoring is an important IoT application which involves monitoring the


surrounding environment and reporting this data for effective short term measures such as
remotely controlling the heating or cooling devices and long term data analyses and measures.

Internet of Things (IoT) is expected to play a major role in our lives through pervasive
systems of sensor networks encompassing our environment. These systems are designed to
monitor vital physical phenomena generating data which can be transmitted and saved at cloud
from where this information can be accessed through applications and further actions can be
taken.

Chapter 2
LITERATURE SURVEY
Temperature and humidity are very important parameters of the environment in various industries
like medicine, food, paper mills, textile, metrological, semiconductors, services etc. In recent years,
optical fiber sensors have attracted more attentions in sensing and measurement areas due to their
many advantages over their conventional electronic counterparts. Similar works in this particular
area make use of the Short Message Service (SMS) facility so as to alert the user as seen in the
paper [1].The temperature-humidity sensor could be also used in tissue culture lab use this
particular mechanism and use a GSM module to send a message which displays the present status
of the temperature and humidity and displays the message “Tissue Culture lab parameters
exceeded”. But majority of times such an alerting message could easily go unnoticed, the user or
the person in charge is sleeping in case if the intended person in sleeping.so it is better to log the
data in a remote computer in case of such an event so that he can keep and track of the data.
Another work in use the alarming system for the Attending staff [2]. The temperature and humidity
measurement sensor can fail if the user of the in charge is Away for the situation where the
emergency is taking place [3]. A temperature and humidity rise and alarm following it would be
unnoticed, so a robust device combines an alerting and data logging system is needed to avoid this
kind of situation. To sending the values of temperature of the environment the sensor is exposed to,
by SMS for the user or the person in charge [4]. Also, by creating microcontroller database, this
design described in the paper can be used as a modification for alerting the user by giving an
“ALERT SMS” when the temperature has a deviation from a critical value present by the user [5].
The system of server guard maintenance mechanism presented in this paper is totally different as it
doesn’t take any software which has to be run in personal or any computer [6]. The response of our
designed system presents the temperature or humidity is out of range as defined by the user by
using Arduino and DHT11[I].
Chapter 3
SYSTEM REQUIREMENT AND SPECIFICATIONS

3.1 Project Architecture:

Fig 4.2:Architectural diagram of temperature and humidity management

Figure 4.2 shows Architectural diagram of temperature and humidity management. The
monitoring of environmental variables such as temperature, pressure and humidity has a long
history of development and the variables have shown significant impact in the productivity of plant
growth, the quality of food industry and the efficiency of many tem-perature and humidity-sensitive
equipment . The monitoring of temperature and humidity of laboratories, storages, halls, school and
hospitals is important with respect to health and hygiene. The reliable measurement and monitoring
is crucial in this competitive era of technology. Arduino, the open source hardware has shown
ability to meet the need of accurate and real-time monitoring and controlling of environmental
variables. The Arduino user com-munity is a forum where many people can share their ideas, use
each other’s work and modify them to innovate and advance many different interacting objects.
Arduino is use in a wide range of projects to develop objects that can interact with people or
environment and internet.
The materials required are easily available, cheap in price and easy to use with the help of
available open source information. Arduino has been used to build robots, drones, remote
controllers, monitoring devices and many interesting objects which is a one big step towards
making the world more automated and sustainable. Arduino can be told to do such things in
appropriate language that Arduino understand: C, C++. The projects related to monitoring
environmental variables are simple and common but always with great importance; many projects
on greenhouse building monitoring and household plant monitoring are available. This thesis was
expected to be helpful in learning electronics and programming as well as documentation process.
This system three components −
1. Hardware and
2. Application software.
3. cloud server

3.2 Hardware and software building blocks:

3.2.1Arduino UNO:

Fig 3.2.1: Arduino UNO


Fig 3.2.1 shows the different peripherals on the Arduino UNO board.When we talk about
IoT there is basic involvement of certain technologies. So here we will showcase these essential
building blocks for IoT. We need to have a good internet connection which forms the backbone for
data transfer. Internet is a necessity so that you can transfer the sensed data from the nodes to the
master hub.
Conversely, if internet is not present, technologies like radio frequency, Bluetooth and Wi-
Fi can be used for low proximity data transfer and for long range distance communications, IoT
technologies like ZigBee, Lora etc. can be implemented to cater the data transfer. The above
technologies only cover’s the communication part, but also, we need some type of device to process
the data. This is where the microcontroller devices come’s in picture.
The industry is flooded with vast range of devices ranging from raspberry pi, to
BeagleBones to nodeMCU, but the king of IoT based devices has been and is ARDUINO. The
reason behind ARDUINO’s popularity is easy to use IDE, open source documentation and a very
vast community of active Arduino developers. Another key reason behind its wide acceptability is
its low expensiveness and miniature footprint. The programming of Arduino is done in C, C++. The
IDE provides various built in examples and codes that make working with Arduino an effortless
task.
Arduino UNO is a microcontroller board based on the ATmega328P.It has 14 digital
input/output pins (of which 6 can be used as PWM outputs), 6 analog inputs, a 16 MHz quartz
crystal, a USB connection, a power jack, an ICSP header and a reset button. It contains everything
needed to support the microcontroller; simply connect it to a computer with a USB cable or power
it with a AC-to-DC adapter or battery to get started. You can tinker with your UNO without
worrying too much about doing something wrong. In the worst-case scenario, you can replace the
chip for a few dollars and start over again. "Uno" means one in Italian and was chosen to mark the
release of Arduino Software (IDE) 1.0. The Uno board and version 1.0 of Arduino Software (IDE)
were the reference versions of Arduino, now evolved to newer releases. The Uno board is the first
in a series of USB Arduino.
3.2.2DHT11:
Figure 3.2.2 shows the DHT11 sensor. DHT11 Temperature & Humidity Sensor features a
temperature & humidity sensor complex with a calibrated digital signal output. By using the
exclusive digital-signal-acquisition technique and temperature & humidity sensing technology, it
ensures high reliability and excellent long-term stability. This sensor includes a resistive-type
humidity measurement component and an NTC temperature measurement component, and connects
to a high performance 8-bit microcontroller, offering excellent quality, fast response, anti-
interference ability and cost-effectiveness

Fig 3.2.2 :DHT 11 sensor

Each DHT11 element is strictly calibrated in the laboratory that is extremely accurate on
humidity calibration. The calibration coefficients are stored as programmes in the OTP memory,
which are used by the sensor’s internal signal detecting process. The single-wire serial interface
makes system integration quick and easy. Its small size, low power consumption and up-to-20
meter signal transmission making it the best choice for various applications, including those most
demanding ones. The component is 4-pin single row pin package. It is convenient to connect and
special packages can be provided according to users’ request.
DHT11’s power supply is 3-5.5V DC. When power is supplied to the sensor, do not send
any instruction to the sensor in within one second in order to pass the unstable status. One capacitor
valued 100nF can be added between VDD and GND for power filtering.
Single-bus data format is used for communication and synchronization between MCU and
DHT11 sensor. One communication process is about 4ms. Data consists of decimal and integral
parts. A complete data transmission is 40bit, and the sensor sends higher data bit first.

Data format:
8bit integral RH data + 8bit decimal RH data + 8bit integral T data + 8bit decimal T data +
8bit check sum. If the data transmission is right, the check-sum should be the last 8bit of
"8bit integral RH data + 8bit decimal RH data + 8bit integral T data + 8bit decimal T data".

3.2.3 ESP8266
Fig 3.2.3 shows ESP8266 WiFi module. In order to upload sensor readings from DHT11 to
the open source cloud Blynk, Arduino UNO interfaces at the output with WiFi module ESP8266
(4.3.3). It is a low cost WiFi microchip with full TCP/IP stack. It works on the 3.3V that is
provided by Arduino UNO in our system. The module is configured through AT commands and
needs the required sequence to be used as a client. The module can work as both client and server.
It gets an IP on being connected to WiFi through which the module and then communicates over
the Internet. After testing our ESP8266 module, we connected it with Arduino UNO and then
programmed Arduino UNO to configure ESP8266 WiFi module as TCP client and send data to
ThingSpeak server which is an open IoT platform to visualize and analyze live data from sensors.

Fig. 3.2.3. ESP8266 WiFi module


3.2.4 Arduino IDE
Arduino is an open-source project, enabling hobbyists to easily take advantage of the
powerful Atmega chips. The Arduino IDE is the software where you can write code and upload it
to the Atmega chip. The code is then executed on the chip. Most 3D-printer electronics are
Arduino-compatible, they use the Atmega chip and enable the user to upload their code using
Arduino. This includes Megatronics, Minitronics and RAMPS. Before you can start using the
electronics you need software 'firmware', that translates machine instructions (gcode) into actual
movements. There are a few options here, including Marlin and Sprinter and Repetier. The actual
firmware is not discussed in this document. You can use Arduino to upload this firmware onto
your electronics. This document will guide you in the steps you need to take..

3.2.5 Blynk
Blynk app for iOS and Android is the easiest way to build your own mobile app that work
with the hardware of your choice. Blynk Library is an extension that runs on top of your hardware
application. It handles all the connection routines and data exchange between your hardware,
Blynk Cloud, and your app project.
Steps :

1. Create a Blynk Account. ...


2. Create a New Project. ...
3. Choose Your Hardware. ...
4. Auth Token. ...
5. Add a Widget
6. Run the project.
Chapter 4
PROJECT IMPLEMENTATION AND WORK FLOW DIAGRAM
4.1 Functional diagram

Fig 4.1: Functional diagram of temperature and humidity management


In above diagram we use blynk cloud for communication between ESP8266 and DHT
Sensor. DHT sensor used for sensing the temperature and humidity .The second no of pin is
connected to arduino pin and arduinos TX and RX pin is connected to TX and RX pins of
ESP8266 WIFI module when we do programming.

4.2 Modules to be implemented


4.2.1 ESP8266

Fig 4.2.1.1 shows the connections of pins when we do programming of Esp8566 through arduino.
Steps for programming is as follows:
1. Wire Up
First, we'll need to identify the pinout of ESP8266. 
To set the ESP8266 in programming mode you need to connect its wires like this:

Fig 4.2.1.1: Pin diagram for programming


2. Setup the Arduino IDE

1. Download Arduino IDE.


2. Open you IDE and click on "File -> Preferences".
3. In  "Aditional Boards Manager URLs" add this line and click on "OK":
4. "http://arduino.esp8266.com/stable/package_esp8266com_index.json"
5. Go to "Tools -> Board -> Boards Manager", type "ESP8266" and install it.
6. Go again to "Tools -> Board" and select "Generic ESP8266 Module".

3. Flash your code

Now  you're ready to use your ESP8266 as a stand-alone module without needing an
external micro-controller. Check out more ESP8266 resources here to learn how to build IoT
products and projects using this amazing module.  Figure 4.2.1.2 shows the connections of arduino
and esp8266 after programming of our Arduino UNO board.
Fig 4.2.1.2:Connections of pins after programming

4.2.2 Blynk app

1.Create a New Project in BLYNK app.


2. Write Project Name and Select NodeMCU from dropdown.
3. An AUTH token will be sent to your registered email, note this down.
4.After creating a new project in Blynk, click on the button labeled “+” to open the Widget
Box. Scroll down and you will find a Gauge widget. Add it.
5.Set the name Temperature .Change the Gauge Settings as shown below, with range from 0 to
50 and V5 as the virtual pin for the Temperature gauge.
6.Add Gauge again, set the name Humidity. Do the same for your Humidity Gauge, with range
from 20 to 80 and V6 as the virtual pin.
7.Copy the code above in your Arduino sketch, remember to replace the auth token, Wi-Fi name
and password.
8.Choose the appropriate board (NodeMCU 1.0 in case of IoT Starter Kit) and port from Tools,
and upload the code.
9.After uploading, press the play button in your Blynk app, and your gauge will start showing
sensor values.

10.Make sure to download the below mentioned libraries, because missing out any of it will cause
compilation issues, and we don't want that.
SPI.h

ESP8266WiFi.h

BlynkSimpleEsp8266.h

SimpleTimer.h

DHT.h

Click play button on top of your app and see your room temperature(degree celcius) and
humidity(percentage) updated every second. Fig. 5.2.2.1 shows wireless connections of mobile to
Arduino board.

Fig 5.2.2.1: Blynk Server


CHAPTER 5
Results and Discussion

Fig 5.1: Output of temperature and humidity management

The above figure 5.1 shows output of our project. Temperature and humidity Response
shows a temperature and humidity calculated from the DHT11 of the sensor’s response
We can develop control board of temperature and humidity which can maintain the
temperature and humidity in appropriate manner.
Figure 5.2 shows the record of temperature monitoring over a period of time. The graph is
temperature vs. time where the temperature changes are updated after an interval of 15 minutes. In
order to accurately test our system, we varied the temperature around the sensor artificially by a
lighting system, thus a spike can be viewed in the graph after which the temperature readings settle
to average environmental temperature.
Figure 5.2 shows the record of humidity monitoring over a period of time. The graph is
humidity vs. time where the changes in humidity are updated after an interval of 15 minutes.
Similar to temperature monitoring, we varied the temperature around sensor artificially by a
lighting system, the downward spike in humidity can be viewed in the graph after which the
humidity readings settle to average environmental humidity.
Fig:5.2 Temperature And Humidity Graph

As expected, temperature and humidity are inversely related to each other. The graph shows
that the humidity level decreases with the increase in temperature. The DHT 11 or DHT 22 sensors
measures temperature from 0 to 50 degree C and humidity measures upto 20-80% only.
Chapter 6
Conclusion &Future Scope
6.1 Conclusion
This proposed system can provide a convenient method for effective monitoring of
temperature and humidity in real time. This system is compact to an extent and cost effective when
compared to prices of instruments used to measure the environmental factors. From the above all
analysis, it is ensured that the nested wired systems can be replaced by the wireless sensor networks
to get an accurate data as well as to avoid many hazardous issues.
Based on the current situation of the development, we put forward a new scheme of
household temperature and humidity monitoring system. The monitoring hardware system is
composed of raspberry pi, Wi-Fi dongle, DHT 11 sensor and an android mobile phone is used. This
project deals with the automated temperature and humidity control. The results show that the
proposed system has good feasibility. It reduces the cost of monitoring system at the same time.

6.2 Future Scope

This project can be further extended to sense various other kind of sensor data such as gas
detecting, light intensity, air quality etc. Because of this we get information on the mobile and we
send it to management area where we control the temperature and humidity.
REFERENCES

[1] N. H. A. Aziz, W. N. W. Muhamad, N. A. Wahab, A. J. Alias, A. T. Hashim, and R. Mustafa,


"Real time monitoring critical parameters in tissue culture growth room with SMS alert system," in
Intelligent Systems, Modelling and Simulation (ISMS), 2010 International Conference on, 2010,
pp. 339-343.
[2] E. Parrish and T. Hickey, "A Temperature Monitoring System for Use on Normal Newborn
Infants," Instrumentation and Measurement, IEEE Transactions on, vol. 21, 1972, pp. 59-60.
[3] L. Ruiz-Garcia, P. Barreiro, and J. Robla, "Performance of ZigBee-based wireless sensor nodes
for real-time monitoring of fruit logistics," Journal of Food Engineering, vol. 87, 2008, pp.
405-415.
[4] N. Zarka, I. Al-Houshi, and M. Akhkobek, "Temperature control via sms," in Information and
Communication Technologies, 2006. ICTTA'06. 2nd, 2006, pp. 2678-2683.
[5] R. K. Megalingam, V. Radhakrishnan, D. K. M. Unnikrishnan, D. C. Jacob, and A. K.
Sudhakaran, "Autonomous Smart Server Guard for advanced safety measure using wireless mobile
technology," in Mechanical and Electrical Technology (ICMET), 2010 2nd International
Conference on, 2010, pp. 654-658.
[6] S. J. Brown, "Remote health monitoring and maintenance system," ed: Google Patents, 2001.

Web links:
[1]http://www.ardumotive.com/iot-wifi-temp-andhumidity.

You might also like