SUBJECT CODE
TYPE THE SUBJECT NAME HERE
Automatic plant watering and
disease detection system
SDG Goal No:15
DATE :29.11.2024
BATCH NUMBER :B11
PROJECT CODE : SEC25ECTE301B12
BATCH MEMBERS : PRABAHARAN.C
VI SARVESH.V
I KARTHIKEYAN.M
I
V
20ECTE701 – IDP SUPERVISOR :Dr K Lakshmi Joshitha
20ECTE701
AUTOMATIC PLANT WATERING AND DISEASE
DETECTION SYSTEM
INTRODUCTION:
• The Automatic Plant Watering and Disease Detection System revolutionizes traditional
agriculture by merging technology with plant care. This smart system integrates soil moisture
sensors, a microcontroller, and communication modules to automate watering based on real-time
soil conditions. Additionally, it incorporates disease detection through sensors or cameras,
employing machine learning to identify potential issues early on.
• By combining these elements, the system aims to enhance crop health, streamline plant
maintenance, and reduce manual efforts. It represents a crucial step toward sustainable and
efficient agricultural practices, aligning with the trend of precision agriculture and contributing to
a smarter, more resilient future for farming.
2
ABSTRACT
• The Automatic Plant Watering and Disease Detection System represents a technological
advancement in agriculture, addressing the challenges of manual plant care. This system
utilizes soil moisture sensors and a microcontroller to automate precise watering based on
real-time soil conditions. Additionally, it integrates disease detection through sensors or
cameras, employing machine learning for early identification of potential issues.
• This smart system aims to optimize crop health, streamline plant maintenance, and reduce
manual efforts. With a focus on sustainability and efficiency, it aligns with the principles of
precision agriculture, contributing to a smarter, more resilient future for farming practices.
The integration of these components creates a comprehensive solution to enhance
agricultural productivity and resilience.
20ECTT701
PROBLEM STATEMENT
• Traditional agricultural practices often rely on manual methods for plant care, leading to challenges
in maintaining consistent watering and timely detection of diseases. Inefficiencies in resource
utilization, increased labor demands, and the risk of undetected plant health issues contribute to
reduced crop yields and economic losses. Additionally, environmental concerns highlight the need
for more sustainable farming practices.
• To address these challenges, there is a critical need for an Automated Plant Watering and Disease
Detection System. This system would leverage technology to automate the watering process based
on real-time soil moisture conditions and employ advanced sensors or cameras coupled with machine
learning for early disease detection. By mitigating the limitations of manual plant care, this system
aims to optimize resource usage, enhance crop health, and contribute to more sustainable and
efficient agricultural practices.
4
20ECTE701
OBJECTIVES OF THE PROJECT
Automated Watering:
• Develop a system that autonomously monitors soil moisture levels using sensors and activates a
precise watering mechanism to maintain optimal hydration for plants.
Disease Detection:
• Implement a disease detection component utilizing advanced sensors or cameras, integrating
machine learning algorithms to identify and alert users about potential diseases or pest
infestations.
Real-time Monitoring:
• Enable real-time monitoring of plant conditions through a user-friendly interface, allowing users to
access information remotely via a mobile app or web portal.
Remote Control:
• Implement a communication module to enable users to remotely control and customize watering
schedules and receive alerts about plant health issues.
Resource Optimization:
• Optimize water usage by ensuring that watering is triggered only when necessary, thereby
contributing to water conservation and efficient resource utilization.
5
20ECTE701
LIVE IN LAB 3
SDG GOAL
6
20ECTE701
Components Required
Arduino Nano -1
Soil moisture sensor -3
Microcontroller
Soil Moisture Sensors
Watering Mechanism
Communication Module
Disease Detection Sensors or Cameras
Machine Learning Software
Power Supply
Sensors for Environmental Conditions
Piping and Tubing
Mounting Hardware
Cables and Connectors
7
BLOCK DIAGRAM
20ECTE701
CIRCUIT DIAGRAM:
9
BLOCK DIAGRAM
PLANT DISEASE :
SOURCE CODE
import os
import tensorflow as tf
import numpy as np
from tensorflow import keras
from skimage import io
from tensorflow.keras.preprocessing import image
# Flask utils
from flask import Flask, redirect, url_for, request, render_template
from werkzeug.utils import secure_filename
from gevent.pywsgi import WSGIServer
# Define a flask app
app = Flask(_name_)
# Model saved with Keras model.save()
# You can also use pretrained model from Keras
# Check https://keras.io/applications/
model =tf.keras.models.load_model("PlantDNet.h5", compile=False)
print('Model loaded. Check http://127.0.0.1:5000/')
def model_predict(img_path, model):
img = image.load_img(img_path, grayscale=False, target_size=(64, 64))
show_img = image.load_img(img_path, grayscale=False, target_size=(64, 64))
x = image.img_to_array(img)
x = np.expand_dims(x, axis=0)
x = np.array(x, 'float32')
x /= 255
preds = model.predict(x)
return preds
# Make prediction
preds = model_predict(file_path, model)
print(preds[0])
disease_class = ['Pepper_bell_Bacterial_spot', 'Pepperbell_healthy', 'Potato__Early_blight',
'Potato__Late_blight', 'Potato__healthy', 'Tomato_Bacterial_spot', 'Tomato_Early_blight',
'Tomato_Late_blight', 'Tomato_Leaf_Mold', 'Tomato_Septoria_leaf_spot',
'Tomato_Spider_mites_Two_spotted_spider_mite', 'Tomato__Target_Spot',
'Tomato_Tomato_YellowLeafCurl_Virus', 'Tomato_Tomato_mosaic_virus',
'Tomato_healthy']
a = preds[0]
ind=np.argmax(a)
print('Prediction:', disease_class[ind])
result=disease_class[ind]
return result
return None
if _name_ == '_main_':
# app.run(port=5002, debug=True)
# Serve the app with gevent
http_server = WSGIServer(('', 5000), app)
http_server.serve_forever()
app.run()
OUTPUT
20ECTE701
MODEL CIRCUIT:
16
20ECTE701
PROGRAM:
const int sensor_pin = A1; /* Soil moisture sensor O/P pin */
void setup() {
Serial.begin(9600); /* Define baud rate for serial communication */
void loop() {
float moisture_percentage;
int sensor_analog;
sensor_analog = analogRead(sensor_pin);
moisture_percentage = ( 100 - ( (sensor_analog/1023.00) * 100 ) );
Serial.print("Moisture Percentage = ");
Serial.print(moisture_percentage);
Serial.print("%\n\n");
delay(1000);
}
17
20ECTE701
LIVE IN LAB 3
OUTPUT
18
20ECTE701
LITERATURE SURVEY
S.NO TITLE DESCRIPTION DISADVANTAGES AUTHOR
1. Automatic Plant Watering The paper presents a system that The accuracy of the soil Khin Thandar Tun
System Using Arduino automates plant watering using moisture sensor may be Hay Man Oo
a moisture sensor, Arduino affected by the soil type or Cho thet Nwe
board, servo motor, and water quality. Calibration of the
pump. The moisture sensor sensor may be required to
measures the moisture level of ensure accurate readings
different plants and triggers the
servo motor and water pump to
supply water when the level is
above the desired threshold.
2. Plant diseases detection using In this paper, the authors The paper lacks in in depth N. Barbedo
image processing: A review describe the Overview of the analysis and only discusses
importance of plant disease about limited challenges and
detection. and Introduction to some outdated information and
image processing techniques in has some methodological
the context of plant pathology. issues.
19
20ECTE701
LITERATURE SURVEY
S.N TITLE DESCRIPTION DISADVANTAGES AUTHOR
O
3. Automatic Plant Irrigation The paper presents an automatic The system requires a stable Devika CM
System using Arduino plant irrigation system that uses a power supply to function. Karthikeyan bose
microcontroller to detect soil Power outages or disruptions Vijayalekshmy S
moisture levels and trigger may affect the system's
functionality.
irrigation when necessary. The
system eliminates the need for
manual intervention, saves time,
and conserves water by providing
the desired amount of water to the
plants. Proper calibration and
maintenance of the sensors are
crucial for accurate readings. The
paper could benefit from more
information on the system's design
and implementation, as well as any
limitations encountered during
testing.
20
20ECTE701
LITERATURE SURVEY
S.N TITLE DESCRIPTION DISADVANTAGES AUTHOR
O
4. Automated Irrigation System In this paper, the authors propose The system requires some R. P. Yadav
using Arduino and GSM an automated irrigation system technical knowledge to set up K.S. Khandelwal
Module using Arduino and a GSM module. and program the Arduino board.
They use a soil moisture sensor to It may not be suitable for users
who are not familiar with
measure the moisture level of the
programming or electronics.
soil and a water pump to water the
plant. They also include a GSM
module to send SMS alerts to the
user when the moisture level is low.
5. Design and Development of In this paper, the authors present The paper may also not provide M. G. Tandel,
Automatic Plant Watering the design and development of an a thorough analysis or D. H. Dodiya,
System using Arduino Uno automatic plant watering system comparison of similar systems K. N. Parmar
using Arduino Uno. They use a soil or alternative technologies,
which could limit its usefulness
moisture sensor to measure the
in guiding future research or
moisture level of the soil and a development efforts
water pump to water the plant.
21
20ECTE701
LIVE IN LAB 3
LITERATURE SURVEY
S.N TITLE DESCRIPTION DISADVANTAGES AUTHOR
O
6. Smart Automatic Plant In this paper, the authors propose a The system may be less J.M.V.Oliveira
Irrigation System using smart automatic plant irrigation system effective for certain types of
Arduino using Arduino. They use a soil plants, as different plants
moisture sensor to measure the have varying water F.J.M. Gonçalves
requirements and soil
moisture level of the soil and a water
moisture levels, which may
pump to water the plant. They also not be fully captured by the
include a temperature and humidity sensors.
sensor to monitor the environment and
adjust the watering schedule
accordingly.
7. Development of Automated In this paper, the authors describe the The system may require R. P. Singh,
Watering System for Potted development of an automated watering regular maintenance, P. Singh,
Plants using Arduino and system for potted plants using Arduino including cleaning of the A.K. Chaturvedi.
Android Application and an Android application. They use a sensors and replacement of
faulty parts, which could be
soil moisture sensor to measure the
time-consuming and costly.
moisture level of the soil and a water
pump to water the plant. They also
include an Android application to
monitor the moisture level and control
the watering system remotely.
22
PROPOSED WORK
Smart Brain:
• Imagine a small computer that acts as the brain of the system. This computer will make decisions
about when your plants need water and when they might be getting sick.
Water When Needed:
• We'll use special sensors to check if the soil around your plants is dry. If it is, the smart system will
automatically give your plants some water.
Talks to You:
• The system will be able to send you messages. So, even if you're not at home, you can check on
your plants using your phone. You can also tell the system what to do through your phone.
Looks for Plant Troubles:
• The smart system will keep an eye on your plants. If it sees something that looks wrong, like a sick
leaf or a strange bug, it will tell you so you can fix it.
Easy App:
• We'll create a simple app on your phone or a website where you can see how your plants are doing
and control the smart system. It's like having a remote control for your plants.
PROPOSED WORK
Powering Up:
• We'll figure out how to power the system so it can work all the time. Maybe we'll use batteries or
even the sun to keep it going.
Checking the Weather:
• The system will know if it's hot or cold around your plants. This way, it can make better decisions
about how to take care of them.
Keeping Safe:
• We'll put a cover around the smart system to keep it safe from rain or anything that might harm it.
Testing and Fixing:
• Before we finish, we'll check everything to make sure it works right. If we find any problems, we'll
fix them. We want to make sure it's easy for you to use.
Guides for You:
• Finally, we'll make simple guides to show you how to use the smart system and take care of your
plants better.
20ECTE701
Advantages
• By optimizing water usage and detecting diseases early, the project
contributes to resource conservation and sustainable agricultural practices.
• It saves a huge amount of water with this smart irrigation project we can save
a lot of water it gives the water to the plant as per the requirement no extra
amount of water it can help in farming too.
• The project can serve as an educational tool, helping users learn about plant
care, disease identification, and the importance of efficient resource
management.
Disadvantages
• It needs electricity continuously it can’t run without electricity.
• The soil moisture sensor gets rusted after some time if the system will fail the plant
can damage
25
20ECTE701
REFERENCES:
https://techatronic.com/automatic-plant-watering-project-using
-arduino-arduino-smart-irrigation/
YOUTUBE LINK:
https://youtu.be/5R6nMeD6Zqo
27