Report Final copy
Report Final copy
A MINI PROJECT - II
REPORT
Submitted by
LOGITH. S (2102109)
PAVAN PRABHU. S. K (2102138)
RAGHUNATH. R (2102146)
the degreeof
BACHELOR OF
ENGINEERING
in
MAY - 2024
SRI RAMAKRISHNA ENGINEERING
COLLEGE
COIMBATORE – 641 022
BONAFIDE CERTIFICATE
SIGNATURE SIGNATURE
Dr. A. VIJAY, Dr. M. JAGADEESWARI, M.E.,
Ph.D.,
Assistant Professor Professor
Supervisor Head of the Department
Department of ECE Department of ECE
Sri Ramakrishna Engineering College Sri Ramakrishna Engineering College
Coimbatore - 641022 Coimbatore - 641022
ii
Acknowledgment
We put forth our hearts and soul to thank the almighty for
being with us all through this technical adventure.
environmental impact.
iv
TABLE OF CONTENTS
ABSTRACT iv
LIST OF FIGURES vii
LIST OF ABBREVIATIONS vi
ii
1 INTRODUCTION 1
1.1 PROJECT OVERVIEW 2
1.2 ARTIFICIAL INTELLIGENCE 3
1.3 DEEP LEARNING 4
1.4 CONVOLUTIONAL NEURAL NETWORK 5
1.5 EMBEDDED SYSTEMS 6
2 LITERATURE SURVEY 2
2.1 INTRODUCTION 9
2.2 BACKGROUND 10
2.3 SUMMARY 14
3 METHODOLOGY AND WORKING PRINCIPLE 15
3.1 PROPOSED METHOD 15
3.2 BLOCK DIAGRAM 16
4 HARDWARE DESCRIPTION 17
4.1 DHT 11 17
4.2 NODEMCU 22
4.3 MOISTURE SENSOR 24
v
5 IMPACT AND UNIQUENESS OF THE 30
PRODUCT
6 EXPERIMENTAL RESULTS 37
6.1 LEAF DISEASE DETECTION 37
6.2 TREATMENT DATA 38
6.3 TEMPERATURE SENSING 39
6.4 HUMIDITY SENSING 40
6.5 MOISTURE SENSING 40
7 CONCLUSION AND FUTURE SCOPE 42
7.1 CONCLUSION 42
7.2 FUTURE SCOPE 43
REFERENCES 46
APPENDIX 47
vi
CHAPTER 1
INTRODUCTION
1
adapt the system for diverse agricultural settings, fostering continuous
improvement in farm efficiency and profitability.
2
agricultural practices, minimize risks, and improve overall farm
efficiency and sustainability.
3
sophisticated products, optimizing costs, boosting employee
productivity, and improving operational efficiency.
4
Heavily dependent on High-end Machine
Solves the problem end to end
Takes longer time to train
Less time to test the data
Additionally, Deep Learning's adaptability extends to various
domains, including image recognition, natural language processing,
and autonomous driving. Its ability to extract intricate patterns from
data makes it invaluable for tasks requiring complex decision-making,
further solidifying its role in advancing technological innovation and
problem-solving.
1.4 CONVOLUTIONAL NEURAL NETWORK
In the realm of deep learning, Convolutional Neural Networks
(CNNs) represent a subclass of deep neural networks, primarily
tailored for visual data analysis. CNNs find extensive application in
tasks such as image and video recognition, recommendation systems,
image classification, segmentation, medical imaging, natural language
processing, brain-computer interfaces, and financial time series
analysis. The term "convolutional neural network" derives from its
utilization of convolution, a mathematical operation, indicating its
specialized nature compared to conventional neural networks
employing matrix multiplication in their layers.
5
A Convolutional Neural Network (CNN) comprises an input
layer, hidden layers, and an output layer. In a feed-forward neural
network, intermediate layers are termed "hidden" as their inputs and
outputs are obscured by the activation function and final
convolution. Within a CNN, the hidden layers consist of
convolutional layers, typically incorporating operations like
multiplication or dot products. The activation function commonly
used is ReLU. Following the convolutional layers, additional
components may encompass pooling layers, fully connected layers,
and normalization layers.
6
execute specific tasks. Despite their ubiquitous presence and
understated nature, these systems play a pivotal role in powering a
myriad of devices and applications integral to our everyday routines.
Embedded systems engineering lies at the core of this intricate
network, merging hardware design, software development, and real-
time computing to produce compact, effective, and tailored
computing solutions.
7
climate or the sophisticated control systems in vehicles, these
systems function quietly, processing inputs, gathering data, and
carrying out tasks with exceptional efficiency.
8
CHAPTER 2
LITERATURE SURVEY
2.1 INTRODUCTION
9
resource allocation but also minimizes environmental footprint,
heralding a new era of precision agriculture.
2.2 BACKGROUND
10
health parameters and identify signs of disease with greater
accuracy. By leveraging advanced algorithms, these systems can
distinguish between healthy and diseased leaves more precisely
than traditional methods. This not only enhances the effectiveness
of disease management efforts but also contributes to the overall
sustainability of agricultural practices. Thus, the development and
implementation of such automated detection systems represent a
significant step forward in ensuring the health and productivity of
crops, ultimately benefiting both farmers and the
broader agricultural industry, enhancing disease detection accuracy
significantly.
12
4. Title: Plant Leaf Disease Detection using Machine Learning
Authors: Kethsy Prabavathy, Mokara Bharath, Kambam
Sanjayratnam,
N. Sri Sai Rahul Reddy, M. Sasidhar Reddy
13
2.3 SUMMARY
14
CHAPTER 3
15
3.2 BLOCK DIAGRAM
16
CHAPTER 4
HARDWARE DESCRIPTION
4.1 DHT 11
17
The DHT11 also integrates an NTC/thermistor for temperature
measurement. A thermistor, characterized as a thermal resistor, exhibits
a significant change in resistance in response to temperature variations.
Specifically, the term "NTC" denotes "Negative Temperature
Coefficient," indicating that the resistance decreases as the temperature
rises.
18
DHT 11 SENSOR OVERVIEW
The core component of the module is the DHT11 digital
Temperature and humidity sensor, produced by AOSONG. The
DHT11 sensor is capable of measuring temperatures ranging from 0°C
to 50°C with an accuracy of ±2.0°C, and humidity levels from 20% to
80% with an accuracy of 5%.
19
Typically, DHT11 sensors necessitate an external pull-up resistor
of 10KΩ between VCC and the Out pin to facilitate effective
communication with the Arduino. However, the module includes a
built-in pull-up resistor, eliminating the need for additional
installation. Additionally, the module features a decoupling capacitor
designed to filter noise present on the power supply.
20
The VCC pin serves as the power supply for the sensor, with a
recommended voltage of 5V, although it can operate within a range of
3.3 V to 5.5V. When using a 5V power supply, the sensor can be
positioned up to 20 meters away. However, with a 3.3V supply voltage,
the cable length should not exceed 1 meter to avoid voltage drop errors.
The Out pin facilitates communication between the sensor and the
Arduino, while the GND pin should be connected to the Arduino's ground.
When wiring the DHT11 module to the Arduino, connect the VCC pin to
the Arduino's 5V output, the GND pin to ground, and the Out pin to digital
pin #8
21
4.2 NODEMCU (ESP8266)
23
FEATURES OF ESP8266:
24
Fig 4.8 Humidity Sensor
To utilize the sensor in analog mode, we'll interface with its analog
output. The FC-28 soil moisture sensor outputs values ranging from 0 to
1023. Since moisture levels are measured as a percentage, we'll map these
values to the range of 0 to 100. Subsequently, we'll display these mapped
values on the serial monitor for monitoring and analysis.
POWER SUPPLY
TRANSFORMER
25
preferred choice for full-wave rectifier circuits.
RECTIFIER CIRCUIT:
26
including supply frequency components and harmonics known as ripples.
These ripples are most pronounced in single-phase half-wave rectifiers,
diminishing in single-phase full-wave rectifiers, and further attenuating in
3-phase rectifier circuits. Such supplies prove inadequate for driving
complex electronic circuits, necessitating a smoother and more stable DC
voltage output.
29
CHAPTER 5
IMPACT AND UNIQUENESS OF THE PRODUCT
31
Climate Resilience: In the face of climate change and
increasingly unpredictable weather patterns, the adaptive capabilities of
the monitoring
32
Tailored Solutions: Unlike generic monitoring systems, this
product is specifically designed for the agricultural context. It
addresses the unique requirements of farmers, such as soil moisture
management, pest detection, and crop health monitoring, providing
tailored solutions that directly contribute to improved agricultural
outcomes.
IoT Integration: One of the key features that set this product
apart is its integration with Internet of Things (IoT) technology. By
connecting sensors, data processing units, and communication devices
through IoT networks, the system enables seamless data collection,
transmission, and analysis, empowering farmers with actionable
insights in real-time.
33
User-friendly Interface: Despite its technological complexity,
the system boasts a user-friendly interface that is accessible to farmers
of all levels of technical proficiency. The interface is intuitive and easy
to navigate, allowing farmers to interact with the system effortlessly
and make informed decisions based on the insights provided.
34
SUMMARY
35
Additionally, comprehensive support services are provided to
users, including installation assistance, training programs, and ongoing
technical support. Overall, this agricultural monitoring system stands
out as a game-changer in the industry, offering unparalleled value to
farmers and stakeholders across the agricultural value chain. Its unique
combination of tailored solutions, advanced technology, user-friendly
design, and it is a transformative tool for optimizing agricultural
productivity, sustainability, and profitability.
36
CHAPTER 6
EXPERIMENTAL RESULTS
37
Fig. 7.1 Healthy Leaf
38
Fig. 7.2 Diseased Leaf
41
CHAPTER 7
CONCLUSION AND FUTURE SCOPE
7.1 CONCLUSION
44
Fig 7.1 Project Accuracy
45
REFERENCES
2. Teenu Sahasra M, Sai Kumari S, Sai Meghana S,P. Rama Devi, Leaf
Disease Detection Using Deep Learning, 2021 Second International
Conference on Electronics and Sustainable Communication Systems
(ICESC)
46
APPENDIX
import tkinter as tk
from tkinter import filedialog
import cv2
import os
import numpy as np
from keras.models import load_model
import requests
from PIL import Image, ImageTk
import threading
#import serial # Add this import for serial communication
model = load_model('CNN.model')
data_dir = "data"
class_names = os.listdir(data_dir)
def capture_video():
global perform_analysis
esp32cam_url = "http://192.168.137.37/capture"
47
while True:
# Continuously capture frames from the ESP32-CAM
response = requests.get(esp32cam_url, stream=True)
if response.status_code == 200:
# Decode the image bytes
img_array = np.asarray(bytearray(response.content), dtype=np.uint8)
frame = cv2.imdecode(img_array, cv2.IMREAD_COLOR)
def analyze_frame(frame):
# Resize the frame for model input
resized_frame = cv2.resize(frame, (100, 100))
resized_frame = np.expand_dims(resized_frame, axis=0)
48
resized_frame = resized_frame / 255.0 # Normalize the image
prediction = model.predict(resized_frame)
predicted_class = np.argmax(prediction)
if predicted_class == 0:
sol = "Use drip irrigation and avoid overhead irrigation if possible. Water
plants in the morning to allow water on plants to evaporate quickly"
elif predicted_class == 1:
sol = "Healthy"
elif predicted_class == 2:
sol = "Remove and destroy all affected plant parts. For plants growing
under cover, increase ventilation and, if possible, the space between
plants."
elif predicted_class == 3:
sol = "Fungicides are very effective for control of Septoria leaf spot, and
applications are often necessary to supplement the control strategies
previously outlined."
elif predicted_class == 4:
sol = "Products containing chlorothalonil, mancozeb, and copper
oxychloride have been shown to provide good control of target spot in
research."
49
def on_q_pressed(event):
global perform_analysis
perform_analysis = True
50