You are on page 1of 79

1

ICLES'
MOTILAL JHUNJHUNWALA COLLEGE
OF ARTS , SCIENCE & COMMERCE
Sector 9 A, Vashi, Navi Mumbai – 400 703

PROJECT REPORT
ON

greenhouse monitoring
system
Submitted to

Mumbai University, Mumbai

UNIVERSITY OF MUMBAI
In the partial fulfillment of the degree of

Bachelor of Information Technology (B.Sc.IT)


By
Mahadik Jagruti Jaysing

Under the Guidance of


Guide name
Mrs. Punita Kabugade
2

PROFORMA FOR THE APPROVAL PROJECT PROPOSAL


PNR No.: 2021016401979823 Roll no: 231015026

1. Name of the Student

Mahadik Jagruti Jaysing

2.Title of the Project

greenhouse monitoring system

3.Name of the Guide

Mrs. Punita Kabugade

2. Teaching experience of the Guide ____________________________________

3.Is this your first submission? Yes No

Signature of the Student Signature of the Guide

Date: ………………… Date: …………………….

Signature of the coordinator

Date: …………………
3

2023-24

ICLES'
MOTILAL JHUNJHUNWALA COLLEGE
OF ARTS , SCIENCE & COMMERCE,VASHI

Certificate
This is to certify that the project entitled

Smart greenhouse monitoring system

Undertaken by

Mahadik Jagruti Jaysing

during the academic year 2023-24. In partial fulfillment of


B.Sc.IT(Information Technology) Examination.
It is further certified that she has completed all required phases of the
project as given by University of Mumbai.

Internal Guide Principal

External Examiner IT &CS Coordinator


4

ACKNOWLEDGEMENT

I would especially thank all teaching and non-teaching staff of


INFORMATION TECHNOLOGY faculty for inspiring me in completion of
project. I am thankful to my project guide “Mrs. Punita Kabugade” for her timely
help and guidance in completing this project successfully.
I would also extend my thanks to our IT/CS Coordinator Mrs. Trupti
Kulkarni for her support and facilities provides to us for the same.
Lastly, I would like to thank all those who directly and indirectly
helped in completion of this project.

Date: Completed by,

Place: Mahadik Jagruti


5

ABSTRACT
A green house is where plants such as flowers and vegetables are grown. Greenhouses
warmup during the day when sun-rays penetrates through it, which heats the plant, soil and
structure. Green houses help to protect crops from many diseases, particularly those that are
soil borne and splash onto plants in the rain. Greenhouse effect is a natural phenomenon and
beneficial to human being. Numerous farmers fail to get good profits from the greenhouse
crops for the reason that they can’t manage two essential factors, which determines plant
growth as well as productivity. Green house temperature should not go below a certain degree,
High humidity can result to crop transpiration, condensation of water vapour on various
greenhouse surfaces, and water evaporation from the humid soil. To overcome such
challenges, this greenhouse monitoring and control system comes to rescue. This project
demonstrates the design and implementation of a various sensors for greenhouse environment
monitoring and controlling.
It involves automated checking of moisture, humidity, water level and temperature of land
under cultivation automatic irrigation facility is provided for irrigation if and when required.
The smart greenhouse monitoring system comes with different sensors that monitors the
environment conditions gives the sensed output to Ardunio uno. This system involves fire
detector sensors. It will provide an essential safety measure. They can promptly detect any
potential fire hazards, helping to protect the crops, equipment, and structures within the
greenhouse. Early detection enables swift response, reducing the risk of significant damage and ensuring
the overall safety of the environment.
6

Chapter Topic
no. Page No
1 INTRODUCTION 8 - 10

1.1 Background

1.2 Objective

1.3 Purpose, Scope, and Applicability

1.4 Achievements

1.5 Organization of the report

2 SURVEY OF TECHNOLOGIES 11 - 27
2.1 Arduino uno

2.2 Introduction to Arduino IDE


2.3 C++ Language
2.4 Sensors

3 REQUIREMENTS AND ANALYSIS 28- 31

3.1 Problem Definition

3.2 Requirements Specification

3.3 Planning and Scheduling

3.4 Software and Hardware Requirements

3.5 Preliminary Product Description

3.6 Conceptual Models


7

4. Software and hardware requirement 32- 53

4.1 Software requirement


4.2 Hardware requirement
4.3 Preliminary product description

5. coding 54 - 70

6. 1.circuit digram 71 - 78

2.block digram

3.flow chart

7 1.conclusion 79

2.referens
8

CHAPTER 1

INTRODUCTION

Greenhouse Monitoring System provides a platform to manage the Greenhouse by


tracking the phases of plant harvest, identifying any plant disorder and tracking the plant
growth by using the image spectral data of plants. The system is basically considered the key
problems plant diseases, huge harvest wastage and unnecessary expensive maintenance in a
greenhouse. So this system will make a high positive impact on maximizing the harvest and
reduce maintenance cost in Greenhouses.

Greenhouse monitoring system represent a revolutionary leap in modern agriculture,


offering a dynamic solution to the challenges posed by unpredictable environmental
conditions. As a response to the need for precision and control in crop cultivation , these
systems harness advanced technologies to create optimal growing environments within
greenhouse. By seamlessly integrating sensors, automation, and data analytics greenhouse
monitoring systems empower farmers to enhance productivity, conserve resources, and make
informed decisions for sustainable and efficient crop management.

Key components : At the heart of a greenhouse monitoring system lie key components that
collectively contribute to its effectiveness. These include sensors for monitoring temperature,
humidity, light, and soil conditions. It also provide early fire detection. Automation systems
enable precise control over environmental factors, while data logging and analysis tools
provide valuable insights for ongoing optimization.

1.1 Background

With the continuous changing of climate, plants need additional attention in


order to survive this harsh environment. Plants become more sensitive and the farmers adjust
9

on how to cope with the environment. Adaption to the environment and acceptance of
modern technology is the best way to cope with increasing problems: the global warming;
lack of information about plants’ reaction on daily problems; effort needs for plant
management; resources scarcity; lacking of space.
Despite the increasing problems, the advancement of modern technology helps
alleviate and balance the agricultural problems of the modern times. Through technology,
automation of plant management such as controlling temperature, humidity, moisture,
watering and other significant parameters has been widely used. Modern farm crops are
efficiently made for the reason that resources are now depleting due to the changes in the
climate. The produce are now adapting to environment since biotechnology has been widely
used.
No matter how the technology advances, the recurrence of these ever increasing
problems undeniably exists.
Currently, most greenhouses are being taken care of manually through physically
adding water. Farming corporation have to hire workers to do the daily tasks in taking care of
the plants.
The best solution is to create a system that monitors the plants status on a real-
time basis, make information for the betterment of the succeeding produce, an application
that suggests what to do on the plant such as watering it and etc.

1.2 Objectives
The project is primarily aimed at improving current agricultural practices by providing
a smart and automatic system. To always sustain a suitable climate inside the greenhouse,
conditions like temperature, humidity, soil moisture and illumination are monitored using
sensors and regulated using mechanical devices. Moreover, real time data is constantly
communicated to the cloud and then to the webpage for display and analysis purposes.
The primary objectives include:
1. Optimize growing conditions : Ensure the greenhouse maintains ideal conditions for
plant growth by monitoring and controlling parameters such as temperature, humidity,
and light intensity.
2. Maximize crop yield: Facilitate increased productivity and yield through the
provision of an environment where plants can thrive, leading to accelerated growth
cycles and improved harvests.
3. Resource efficiency: minimize resource usage by precisely managing inputs such as
water, nutrients, and energy. This contributes to sustainability and environmentally
conscious farming practices
4. Real-time monitoring : Enable continuous, real-time monitoring of environmental
conditions within the greenhouse to promptly detect any deviations or issues that
could impact plant health.
10

1.3 Purpose, Scope, and Applicability

1.3.1 Purpose
In today’s greenhouses, many parameter measurements are required to monitor and
control for the good quality and productivity of plants. But to get the desired results
there are some very important factors which come into play like Temperature, Humidity,
Light and Water, which are necessary for a better plant growth.

1.3.2 Scope
The automatic greenhouse monitoring system's equipment is powered by
unconventional energy sources like solar cells and wind turbines. It will start a
revolution and has a promising future in the sector of agriculture.

1.3.3 Applicability
Greenhouse Monitoring System provides a platform to manage the Greenhouse by
tracking the phases of plant harvest, identifying any plant disorder and tracking the
plant growth by using the image spectral data of plants.

The 1.4 Achievements


achievements of greenhouse monitoring systems in agriculture are significant and
have transformed the way crops are cultivated.
Some key achievements include :

• Increased crop yields


• Resource efficiency
• Improved crop quality
• Risk mitigation
11

CHAPTER 2

SURVEY OF TECHNOLOGIES

2.1 Arduino

1. Arduino Boards:
Arduino boards are the physical hardware platforms that form the foundation of
Arduino projects. Common models include Arduino Uno, Arduino Mega, Arduino
Nano, and more. Each board has a microcontroller, digital and analog pins, USB
interface, and power connectors.
2. Microcontrollers:
The heart of Arduino boards is a microcontroller (typically from the AVR family by
Atmel). The microcontroller executes the program uploaded to the Arduino board,
interacting with various components.
12

3. Arduino IDE (Integrated Development Environment):


The Arduino IDE is the software used to write, compile, and upload code to Arduino
boards. It provides a simple and user-friendly interface for programming.
4. Programming Language:
Arduino programming uses a simplified version of C/C++. Code is written in
sketches, which consist of functions such as setup() and loop().
5. Shields and Modules:
Shields are additional boards that can be plugged into Arduino boards to extend their
functionality. Modules include sensors, actuators, communication devices, and other
components that can be connected to Arduino for various applications.
6. Libraries:
Arduino libraries provide pre-written functions to simplify complex tasks. They cover
a wide range of functions, including communication protocols, sensors, and display
modules.
7. Community and Documentation:
Arduino has a large and active community of users and developers. Extensive
documentation, forums, and tutorials are available, making it accessible for beginners
and experienced users alike.
8. Open Source:
Arduino is open-source, meaning that its hardware and software designs are freely
available for anyone to study, modify, and distribute
13

2.2 INTRODUCTION TO ARDUINO IDE

The Arduino IDE (Integrated Development Environment) is used to write the computer
code and upload this code to the physical board. The Arduino IDE is very simple and
this simplicity is probably one of the main reason Arduino became so popular. We can
certainly state that being compatible with the Arduino IDE is now one of the main
requirements for a new microcontroller board. Over the years, many useful features
have been added to the Arduino IDE and you can now managed third-party libraries and
boards from the IDE, and still keep the simplicity of programming the board. The main
window of the Arduino IDE is shown below, with the simple simple Blink example.
14

Arduino Functions

o It increases the readability of the code.


o It conceives and organizes the program.
o It reduces the chances of errors.
o It makes the program compact and small.
o It avoids the repetition of the set of statements or codes.
o It allows us to divide a complex code or program into a simpler one.
o The modification becomes easier with the help of functions in a program.

Arduino Language

● Simplified C/C++
● Based on the wiring project
○ http://wiring.org.co
● Peripheral libraries
○ LCD, sensors, 12C, ect.

Useful functions

pinMode() - set pin as input or output


digitalWrite() - set a digital pin high/low
digitalRead() - read a digital pin’s state
analogRead() - read an analog pin
analogWrite() - write an “analog” PWM value
delay() - wait an amount of time
millis() - get the current time
15

2.3 C++ Language

C++ is an advanced language that supports various programming methods like functional,
procedural, and object-oriented programming. It is a fast language; its compile-time and
execution time is faster than other programming languages. Some programming languages are
also faster than C++. Still, like C++, they are not close to the machine code, as it is an
intermediary language, so big organizations rely on C++ for fast speed with lesser resources.

• Embedded Systems :

An embedded system is a microprocessor-based software and hardware system that is used

to design a specific function. Developing these embedded systems requires fast and efficient
languages like C++. C++ is widely used in embedded systems because it is an intermediary
language. It has both the features of the high-level and low-level language, which gives C++

an edge over other languages because it can directly access the hardware part without
sacrificing the high-level part.Many embedded systems and gadgets like smartwatches, GPS
systems, mp3 players, etc., are created using C++.

• How to use C++ :

There are several ways to learn C++, such as online tutorials, courses and interactive exercises.

To start programming in C++, developers need a C++ compiler that translates code into

machine-readable instructions. C++ compilers include Clang, GNU Compiler Collection and
Microsoft Visual C++. Once a compiler is installed, developers can use a text editor or integrated

development environment (IDE) to write C++ code. IDEs offer features such as code

completion, debugging tools and management capabilities.

C++ programs are usually organized into functions. The main() function is the entry point of the
computer program where execution begins. Developers can use control structures such as loops
16

and conditionals to control their program's flow. C++ also provides a set of libraries that offer
prebuilt functions and data structures for common tasks.

• What are the uses of C++? :

C++ is used in a wide range of ways to capitalize on its versatility and performance. Some of

the main uses of C++ include the following:

1 Operating systems (OSes). C++'s low-level capabilities allow for efficient memory management
and system resource controls, making it well-suited for the development of OSes.
2 Games and graphics. C++'s high performance and ability to interact with hardware makes it a
good choice for game engines such as Epic Games' Unreal Engine and Unity Technologies' Unity,
which are built using C++. The programming language is also used for graphics programming tasks,
such as real-time rendering, image processing and physics simulations.
3 Embedded systems. C++ is commonly used in the development of embedded systems, which are
computer systems designed to perform specific tasks. Examples of embedded systems include
medical devices, automotive systems and internet of things devices.

4 Software libraries. C++ serves as the foundation for many high-level libraries used in various
domains. Libraries like Boost provide additional functionality and utilities for C++ programmers,

while the Standard Template Library (STL) offers a collection of generic data structures and

algorithms. These libraries provide ready-to-use components, enhancing developer productivity.

5 High-performance computing (HPC). C++ is well suited for HPC applications that require

maximum computational efficiency and parallel processing. It's used in scientific simulations,
numerical analysis, mathematical modeling and simulations of physical phenomena. It's often used
alongside specialized libraries such as message passing interface and OpenMP for distributed and
parallel computing.

6 Web development. Although C++ isn't commonly used for web development, it plays a crucial

role in the back end of web applications, such as web servers, network protocols, routers and
communication software. Many web frameworks and servers, including the Apache HTTP Server,
17

are implemented in C++. The language's speed and reliability make it suitable for handling

high-traffic websites and complex server-side operations.

7 Systems programming. C++ is often used for systems programming tasks, where interaction with

the underlying hardware and OS is required. Tasks such as device drivers, network protocols and

system utilities are typically implemented in C++.

• Advantages and disadvantages of C++ :

C++ comes with a mix of advantages and disadvantages. Some of its advantages such as
high-performance and control come with the challenge of complexity and steep learning
curves.

Advantages of C++

C++ benefits meet developers' many demands of programming languages:

• High performance from C++'s low-level memory manipulation and direct access to

hardware, making it suitable for resource-intensive applications.

• Control, such as low-level control over system resources, which enables developers to

fine-tune their programs for optimal performance.

• Flexibility resulting from functionality such as the support of OOP and procedural and
functional programming, the latter of which is increasingly embraced at enterprise scale.

• Software portability that lets programs run on several different platforms.

• Compatibility coming from C++'s interoperability with other programming languages

such as C and its support across different platforms. This lets developers reuse code and use
third-party libraries.

• An expansive ecosystem tied to C++'s ability to use a large array of libraries and

frameworks that offer prebuilt approaches for tasks, such as data manipulation, which

reduces the need for manual implementation.


18

Disadvantages of C++

C++ also comes with some disadvantages, including the following:

• Complexity and a challenging learning curve for beginners because of its extensive feature

set.

• Manual memory management, which can lead to memory leaks and other memory
management issues if not handled properly.

• Security risks related to C++'s direct access to memory, which increases risk of writing

unsafe code.

• Lack of built-in garbage collection, forcing developers to manually deallocate memory

when it's no longer needed.

• Complex syntax compared to other programming languages, making code reading and

• writing more time-consuming.

• Long compile time compared to languages with dynamic typing or just-in-time compilation.

• History of C++

Danish computer scientist Bjarne Stroustrup developed C++ in 1983 as an extension of the C
programming language. Stroustrup initially used the language Simula, an OOP language, to

extend C with the goal of combining object-orientation's encapsulation, inheritance and


polymorphism features with the low-level capabilities of C.

C++ has gone through multiple iterations and standardization efforts. The first international

standard for C++ was published in 1998 as ISO/IEC 14882:1998. Subsequent iterations of C++
have introduced new language features, improved performance and expanded the capabilities

of the language.
19

2.4 Sensors
Sensors are devices or instruments that detect and measure physical properties,
environmental conditions, or changes in those conditions and convert this information into
signals or data. Sensors play a crucial role in various applications, ranging from industrial
processes and healthcare to consumer electronics and environmental monitoring. Here are
some common types of sensors:

Types of sensor:
• Soil moisture sensor
• Temperature and humidity sensor
• Light sensor
• Flame sensor
• PIR motion sensor
• CO2 sensor

• Soil moisture sensor

Soil moisture sensors measure or estimate the amount of water in the soil. These sensors
can be stationary or portables such as handheld probes. Stationary sensors are
placed at the predetermined locations and depths in the field, whereas portable soil
moisture probes can measure soil moisture at several locations.
20

• Temperature and humidity sensor

They are used to monitor greenhouse crops, manage irrigation in field crops, prevent disease
and plan seasonal crops.
Thanks to these sensors, farmers can adapt their farming practices to their specific soil
conditions, leading to better crop management and higher yields.
Soil moisture sensors offer many advantages to farmers. They provide real-time monit

• Light sensor

Proper greenhouse lighting can maximize plant growth and development while minimizing
energy consumption. Light measurement helps optimize growth and can be used to automate
supplemental light levels in greenhouses and guide light positioning in indoor growth
facilities. Light sensors are a good tool for assessing the exposure of plants to light. There are
usually two types of sensors used to measure the light in a greenhouse: (1) global radiation,
usually called energy units, and (2) photosynthetically active radiation (PAR).
The total solar radiation sensor is a primary pyrometer that measures the irradiance on the
plane of the receiving earth. Mainly used to measure the total solar radiation in the
wavelength range of 0.3 to 3 microns. If placed horizontally downwards, reflected radiation
can be measured, and scattered light-shielding ring can be added to measure scattered
radiation.
21

• PIR Motion Sensor

PIR sensors allow you to sense motion, almost always used to detect whether a
human has moved in or out of the sensors range. They are small, inexpensive, low -power,
easy to use and don't wear out. For that reason they are commonly found in appliances and
gadgets used in homes or businesses. They are often referred to as PIR, "Passive Infrared",
"Pyroelectric", or "IR motion" sensors.

PIRs are basically made of a pyroelectric sensor (which you can see below as the round metal can
with a rectangular crystal in the center), which can detect levels of infrared radiation. Everything
emits some low level radiation, and the hotter something is, the more radiation is emitted. The
sensor in a motion detector is actually split in two halves. The reason for that is that we are looking
to detect motion (change) not average IR levels. The two halves are wired up so that they cancel
each other out. If one half sees more or less IR radiation than the other, the output will swing high
22

or low.

Along with the pyroelectic sensor is a bunch of


supporting circuitry, resistors and capacitors. It
seems that most small hobbyist sensors use the BISS0001 ("Micro Power PIR Motion Detector IC"),
undoubtedly a very inexpensive chip. This chip takes the output of the sensor and does some minor
processing on it to emit a digital output pulse from the analog sensor.

XENSIV™ PAS CO2 sensor

The XENSIV™ PAS CO2 sensor is a real carbon dioxide (CO2) sensor in an unprecedented
small form factor. Designed on the basis of the photoacoustic spectroscopy (PAS) concept, the
sensor saves more than 75 percent space compared to existing commercial real CO2 sensors. Its
direct ppm readings, tape & reel packing, SMD capability and simple design allow for a quicker
and easier integration into customers’ systems in low and high-volume applications alike.

Summary of Features

• Exceptionally small form factor (14 x 13.8 x 7.5 mm3)


23

• Highest accuracy and robust performance at ppm level (±30 ppm ±3% of reading)
• SMD package delivered in tape and reel
• Advanced compensation and self-calibration algorithms
• Various configuration options (e.g. sampling rate, baseline calibration)
and interfaces (UART, I2C, PWM)

Benefits

• Space savings & opening up consumer application market


• High-quality data and compliance with most stringent regulations for indoor air quality (e.g.
title 24 in California)
• Cost-effective high-volume assembly and easy system integration
• Suitable for high volume standard high speed pick & place for fast & automatic assembly –

No need of post calibration

• Customer flexibility thanks to variety of configuration options

• Flame Sensor

A flame-sensor is used to detect fire. This senor is more accurate then another sensor. This
sensor also works on both mode digital and analog. When it detects the fire it gives result as
1 and when there is no fire it gives result as 0.
24

2.4 Relay Module


The four-channel relay module contains four 5V relays and the associated switching and
isolating components, which makes interfacing with a microcontroller or sensor easy with
minimum components and connections. There are two terminal blocks with six terminals
each, and each block is shared by two relays. The terminals are screw type, which makes
connections to mains wiring easy and changeable. The four relays on the module are rated for
5V, which means the relay is activated when there is approximately 5V across the coil. The
contacts on each relay are specified for 250VAC and 30VDC and 10A in each case, as
marked on the body of the relays.
● It is 4 Channel Isolated 5V 10A Relay Module, A wide range of microcontrollers such as
Arduino, AVR, PIC, ARM and so on can control it.
● It is also able to control various appliances and other types of equipment with large current.

● Relay output maximum contact is AC250V 10A and DC5V 10A.


● They are commonly used in order to drive different kinds of loads. Like DC Pump or Fan
with Microcontrollers (like Arduino, PIC Microcontroller or 8051 Microcontroller etc.)

2.5 jumper wire


25

Jumper wires are essential components in electronics and prototyping. They are used to
create temporary connections between various electronic components, such as integrated
circuits (ICs), sensors, resistors, and other modules on a breadboard or in a circuit. These
wires are especially handy during the prototyping and testing phases of electronics projects.
Here are some key characteristics and uses of jumper wires

2.6 LCD Display 16/2


An LCD (Liquid Crystal Display) 16x2 is a common type of alphanumeric display used in
electronic projects and devices. The "16x2" notation indicates that the display has 16
columns and 2 rows of characters. These displays are widely used in microcontroller-based
projects, such as those involving Arduino, Raspberry Pi, or other embedded systems. Here
are the key features and usage details of an LCD 16x2 display
26

2.7 GSM Modules


A GSM module or a GPRS module is a chip or circuit that will be used to establish communication
between a mobile device or a computing machine and a GSM or GPRS system. The modem (modulator-
demodulator) is a critical part here.

These modules consist of a GSM module or GPRS modem powered by a power supply circuit and
communication interfaces (like RS-232, USB 2.0, and others) for computers.

A GSM modem can be a dedicated modem device with a serial, USB, or Bluetooth connection, or it can be

a mobile phone that provides GSM modem capabilities.

• Difference between GSM/GPRS Modems, Modules, and Mobiles

A GSM module or GPRS modules are similar to modems, but there’s one difference: A GSM/GPRS
Modem is external equipment, whereas the GSM/GPRS module is a module that can be integrated

within the equipment. It is an embedded piece of hardware.A GSM mobile, on the other hand, is a

complete system in itself with embedded processors that are dedicated to providing an interface

between the user and the mobile network.

• Applications of GSM Module or GPRS Module

1 The GSM/GPRS module demonstrates the use of AT commands. They can feature all the
27

functionalities of a mobile phone through a computer like making and receiving calls, SMS, MMS, etc.
These are mainly employed for computer-based SMS and MMS services.

2 GSM Example: Sending SMS using GSM

• features of GSM

• Improved spectrum efficiency


• International roaming
• Low-cost mobile sets and base stations (BSs)
• High-quality speech
• Compatibility with Integrated Services Digital Network (ISDN) and other
telephone company services
• Support for new services
28

CHAPTER 3
REQUIREMENTS AND ANALYSIS

3.1 Problem Definition


• Different behaviors of plants under different conditions
• Various disorders of plants
• Taking manual measurements of information of the plants
• Inefficiency of labor system
• Unnecessary higher cost for maintenance

Although the environmental conditions of plants are controlled, the temporal effects like
temperature, humidity may not evenly balanced for each crop. Therefore, plants respond
differently under those unbalanced environmental conditions. And, plants can have different
kind of disorders. It leads to production failures in greenhouses. As well, the crop yield may
not be harvested at the right moment. Because of that there would be a huge harvest wastage.

In current greenhouses, the workers continuously observe the plant growth. In that case,
workers will be tired and labor system would be inefficient. So, there would be an
unnecessary higher cost for maintenance.

• Sensor Calibration and Accuracy:


29

Problem: Inaccurate sensor readings or difficulty calibrating sensors.


• Power Supply Issues:
Problem: Components not receiving sufficient power or experiencing voltage
instability.
• Software/Programming Errors:
Problem: Bugs or errors in the software controlling the parking and traffic systems.
• Actuator Control Issues:
Problem: Actuators (e.g., barriers, gates) not responding as expected.

3.2 Requirements Specification


1. Introduction
The most important factors for the quality and productivity of plant
growth are temperature, humidity, light and the level of the carbon dioxide. Continuous
monitoring of these environmental variables gives information to the grower to better
understand, how each factor affects growth and how to manage maximal crop
productiveness. The optimal greenhouse climate adjustment can enable us to improve
productivity and to achieve remarkable energy savings - especially during the winter.
The purpose of the project is to construct a greenhouse monitoring system
using wireless sensor networks. The project's ultimate aim is to increase the amount of the
products produced in a greenhouse without observing it whole day. The system periodically
measures the temperature, light and humidity levels inside the greenhouse. When a critical
change in the temperature, humidity or light level is detected, the greenhouse manager will
be notified via e-mail and cell phone text message. Thus, the greenhouse manager will be
able to react to the critical change as fast possible and may be able to prevent possible effects
of the critical changes.

2. Overall Description
The important parameters are the temperature inside the greenhouse which
affects the photosynthesis and transpiration process, humidity, moisture content in the soil, the
illumination etc. The system’s temperature monitor and control system work according to the
temperature value set by the user.

3. System Features and Requirements


Functional Requirements
1. updates per one hour with new plants images
2. Monitor the diseases, crop harvest and growth plant by plant.
3. If any error occurred in the system, it should be displayed as an alert.
4. When the crop should be harvest at the moment, user should be
notified it.
5. Monitor the future greenhouse status of the features.
6. Reports should be generated and they should be able to download.
• Non – Functional Requirements
30

1. User interface should be user friendly.


2. Performance with response time should be efficient.
3. Web application security should be high.
4. In the future, according to new requirements, system should be
scalable.

• System Features
1. Monitor temperature /humidity, and soil moisture.
2. This system helps In monitoring and controlling the climatic conditions that
are favourable for the cultivation of a particular plant.
3. By using this system, crop growth can be improved along with maximized
yield, irrespective of the weather conditions.
4. This project can be further enhanced to monitor and control the pesticide
level.

3.3 Planning and Scheduling


Planning and scheduling for a smart greenhouse monitoring system involve breaking down
the project into manageable tasks, assigning resources, estimating durations, and creating a
timeline. Here's a general guide on how to plan and schedule a project like this
1. Define Project Scope and Objectives:
• Clearly define what the smart greenhouse monitoring system is expected to achieve.
• Outline the specific features and functionalities.
2. Work Breakdown Structure (WBS):
• Break down the project into smaller, manageable tasks.
• Create a hierarchical structure outlining the major components and sub-components
of the system.
3. Task Dependencies:
• Identify dependencies between tasks. Some tasks may need to be completed before
others can begin.
4. Resource Allocation:
• Assign resources (human, technical, and financial) to each task.
• Consider the skills and availability of team members.
5. Estimate Task Durations:
• Provide time estimates for each task based on historical data, expert judgment, or
industry standards.
• Include buffer time for unforeseen issues or delays.
6. Task Sequencing:
• Sequence tasks in a logical order, taking into account task dependencies and
priorities.
7. Critical Path Analysis:
31

• Identify the critical path, which represents the sequence of tasks that must be
completed on time for the project to finish as scheduled.
• Focus on tasks along the critical path to avoid delays.
8. Gantt Chart:
• Create a Gantt chart to visualize the project schedule.
• Include task start and end dates, dependencies, and milestones.
9. Testing and Quality Assurance:
• Integrate testing and quality assurance tasks into the schedule.
• Allocate time for debugging, testing, and user acceptance.
32

Chapter 4
Software and Hardware Requirements

1. Software Requirements:

❖ C++ :

C++ is an advanced language that supports various programming methods like functional,
procedural, and object-oriented programming. It is a fast language; its compile-time and
execution time is faster than other programming languages. Some programming languages are
also faster than C++. Still, like C++, they are not close to the machine code, as it is an
intermediary language, so big organizations rely on C++ for fast speed with lesser resources.

• Embedded Systems :

An embedded system is a microprocessor-based software and hardware system that is used to


design a specific function. Developing these embedded systems requires fast and efficient

languages like C++. C++ is widely used in embedded systems because it is an intermediary
language. It has both the features of the high-level and low-level language, which gives C++ an
edge over other languages because it can directly access the hardware part without sacrificing

the high-level part.

Many embedded systems and gadgets like smartwatches, GPS systems, mp3 players, etc., are
created using C++.

• How to use C++ :

There are several ways to learn C++, such as online tutorials, courses and interactive
exercises. To start programming in C++, developers need a C++ compiler that translates code

into machine-readable instructions. C++ compilers include Clang, GNU Compiler Collection
33

and Microsoft Visual C++. Once a compiler is installed, developers can use a text editor or
integrated development environment (IDE) to write C++ code. IDEs offer features such as code
completion, debugging tools and management capabilities.

C++ programs are usually organized into functions. The main() function is the entry point of the
computer program where execution begins. Developers can use control structures such as loops

and conditionals to control their program's flow. C++ also provides a set of libraries that offer
prebuilt functions and data structures for common tasks.

• What are the uses of C++? :

C++ is used in a wide range of ways to capitalize on its versatility and performance. Some of

the main uses of C++ include the following:

Operating systems (OSes). C++'s low-level capabilities allow for efficient memory management
and system resource controls, making it well-suited for the development of OSes.
Games and graphics. C++'s high performance and ability to interact with hardware makes it a
good choice for game engines such as Epic Games' Unreal Engine and Unity Technologies' Unity,
which are built using C++. The programming language is also used for graphics programming tasks,
such as real-time rendering, image processing and physics simulations.
Embedded systems. C++ is commonly used in the development of embedded systems, which are
computer systems designed to perform specific tasks. Examples of embedded systems include
medical devices, automotive systems and internet of things devices.

Software libraries. C++ serves as the foundation for many high-level libraries used in various
domains. Libraries like Boost provide additional functionality and utilities for C++ programmers,

while the Standard Template Library (STL) offers a collection of generic data structures and
algorithms. These libraries provide ready-to-use components, enhancing developer productivity.

High-performance computing (HPC). C++ is well suited for HPC applications that require

maximum computational efficiency and parallel processing. It's used in scientific simulations,
numerical analysis, mathematical modeling and simulations of physical phenomena. It's often used
34

alongside specialized libraries such as message passing interface and OpenMP for distributed and
parallel computing.

Web development. Although C++ isn't commonly used for web development, it plays a crucial

role in the back end of web applications, such as web servers, network protocols, routers and
communication software. Many web frameworks and servers, including the Apache HTTP Server,

are implemented in C++. The language's speed and reliability make it suitable for handling

high-traffic websites and complex server-side operations.

Systems programming. C++ is often used for systems programming tasks, where interaction with

the underlying hardware and OS is required. Tasks such as device drivers, network protocols and
system utilities are typically implemented in C++.

• Advantages and disadvantages of C++ :

C++ comes with a mix of advantages and disadvantages. Some of its advantages such as
high-performance and control come with the challenge of complexity and steep learning
curves.

Advantages of C++

C++ benefits meet developers' many demands of programming languages:

• High performance from C++'s low-level memory manipulation and direct access to

hardware, making it suitable for resource-intensive applications.

• Control, such as low-level control over system resources, which enables developers to

fine-tune their programs for optimal performance.

• Flexibility resulting from functionality such as the support of OOP and procedural and
functional programming, the latter of which is increasingly embraced at enterprise scale.

• Software portability that lets programs run on several different platforms.

• Compatibility coming from C++'s interoperability with other programming languages

such as C and its support across different platforms. This lets developers reuse code and use
third-party libraries.

• An expansive ecosystem tied to C++'s ability to use a large array of libraries and
35

frameworks that offer prebuilt approaches for tasks, such as data manipulation, which

reduces the need for manual implementation.


Disadvantages of C++

C++ also comes with some disadvantages, including the following:

• Complexity and a challenging learning curve for beginners because of its extensive feature

set.

• Manual memory management, which can lead to memory leaks and other memory
management issues if not handled properly.

• Security risks related to C++'s direct access to memory, which increases risk of writing

unsafe code.

• Lack of built-in garbage collection, forcing developers to manually deallocate memory

when it's no longer needed.

• Complex syntax compared to other programming languages, making code reading and

writing more time-consuming.

• Long compile time compared to languages with dynamic typing or just-in-time

compilation.

• History of C++

Danish computer scientist Bjarne Stroustrup developed C++ in 1983 as an extension of the C
programming language. Stroustrup initially used the language Simula, an OOP language, to

extend C with the goal of combining object-orientation's encapsulation, inheritance and


polymorphism features with the low-level capabilities of C.

C++ has gone through multiple iterations and standardization efforts. The first international

standard for C++ was published in 1998 as ISO/IEC 14882:1998. Subsequent iterations of C++
have introduced new language features, improved performance and expanded the capabilities
36

of the language.

❖ ARDUINO IDE

The Arduino IDE (Integrated Development Environment) is used to write the computer
code and upload this code to the physical board. The Arduino IDE is very simple and
this simplicity is probably one of the main reason Arduino became so popular. We can
certainly state that being compatible with the Arduino IDE is now one of the main
requirements for a new microcontroller board. Over the years, many useful features
have been added to the Arduino IDE and you can now managed third-party libraries and
boards from the IDE, and still keep the simplicity of programming the board. The main
window of the Arduino IDE is shown below, with the simple simple Blink example.
37

Arduino Functions

o It increases the readability of the code.


o It conceives and organizes the program.
o It reduces the chances of errors.
o It makes the program compact and small.
o It avoids the repetition of the set of statements or codes.
o It allows us to divide a complex code or program into a simpler one.
o The modification becomes easier with the help of functions in a program.

Arduino Language

● Simplified C/C++
● Based on the wiring project
○ http://wiring.org.co
● Peripheral libraries
○ LCD, sensors, 12C, ect.

Useful functions

pinMode() - set pin as input or output


digitalWrite() - set a digital pin high/low
digitalRead() - read a digital pin’s state
analogRead() - read an analog pin
analogWrite() - write an “analog” PWM value
delay() - wait an amount of time
millis() - get the current time
38

2. Hardware Requirements:

1. Sensor :
• Soil moisture sensor
• Temperature and humidity sensor
• Light sensor
• Flame sensor
• PIR motion sensor
• CO2 sensor

2. Relay Module
3. jumper wire
4. LCD Display 16/2
5. Busser
6. Led lights
7. GSM module
8. Arduino
9. 9 volt battery
10. Small water pump
11. Pipe
12. Breadboard

1. Sensors :

• Soil moisture sensor :

The moisture of the soil plays an essential role in the irrigation field as well as
in gardens for plants. As nutrients in the soil provide the food to the plants for
their growth. Supplying water to the plants is also essential to change the
temperature of the plants. The temperature of the plant can be changed with
water using the method like transpiration. And plant root systems are also
developed better when rising within moist soil. Extreme soil moisture levels
can guide to anaerobic situations that can encourage the plant’s growth as well
as soil pathogens. This article discusses an overview of the soil moisture
sensor, working and it’s applications.
The soil moisture sensor is one kind of sensor used to gauge the volumetric content of
39

water within the soil. As the straight gravimetric dimension of soil moisture
needs eliminating, drying, as well as sample weighting. These sensors measure the
volumetric water content not directly with the help of some other rules of soil like
dielectric constant, electrical resistance, otherwise interaction with neutrons, and
replacement of the moisture content.
The relation among the calculated property as well as moisture of soil should be

adjusted & may change based on ecological factors like temperature, type of soil,

otherwise electric conductivity. The microwave emission which is reflected can be

influenced by the moisture of soil as well as mainly used in agriculture and remote

sensing within hydrology.

Soil Moisture Sensor Pin Configuration

The FC-28 soil moisture sensor includes 4-pins

• VCC pin is used for power


• A0 pin is an analog output
• D0 pin is a digital output
• GND pin is a Ground
This module also includes a potentiometer that will fix the threshold value, & the value can be
evaluated by the comparator-LM393. The LED will turn on/off based on the threshold value.

Working Principle

This sensor mainly utilizes capacitance to gauge the water content of the soil (dielectric permittivity).

The working of this sensor can be done by inserting this sensor into the earth and the status of the

water content in the soil can be reported in the form of a percent.

This sensor makes it perfect to execute experiments within science courses like environmental

science, agricultural science, biology, soil science, botany, and horticulture.

Specifications

The specification of this sensor includes the following.

• The required voltage for working is 5V


• The required current for working is <20mA
• Type of interface is analog
• The required working temperature of this sensor is 10°C~30°C
40

Soil Moisture Sensor Applications

The applications of moisture sensor include the following.

• Agriculture
• Landscape irrigation
• Research
• Simple sensors for gardeners

This is all about the soil moisture sensor. From the above information, finally, we can conclude
that this sensor is used to gauge the soil’s volumetric water content, which makes it perfect to
make experiments in the science field like agricultural science, soil science, horticulture,
environmental science, biology, and botany.

2.Temperature and humidity sensor dht11 :

Humidity is the measure of water vapour present in the air. The level of humidity in air affects
various physical, chemical and biological processes. In industrial applications, humidity can affect
the business cost of the products, health and safety of the employees. So, in semiconductor
industries and control system industries measurement of humidity is very important. Humidity
measurement determines the amount of moisture present in the gas that can be a mixture of water
vapour, nitrogen, argon or pure gas etc… Humidity sensors are of two types based on their
measurement units. They are a relative humidity sensor and Absolute humidity sensor. DHT11 is a
digital temperature and humidity sensor.

DHT11 is a low-cost digital sensor for sensing temperature and humidity. This sensor can be
easily interfaced with any micro-controller such as Arduino, Raspberry Pi etc… to measure
humidity and temperature instantaneously.
DHT11 humidity and temperature sensor is available as a sensor and as a module. The difference
between this sensor and module is the pull-up resistor and a power-on LED. DHT11 is a relative
humidity sensor. To measure the surrounding air this sensor uses a thermistor and a capacitive
humidity sensor.

Working Principle of DHT11 Sensor


DHT11 sensor consists of a capacitive humidity sensing element and a thermistor for
sensing temperature. The humidity sensing capacitor has two electrodes with a moisture holding
substrate as a dielectric between them. Change in the capacitance value occurs with the change in

humidity levels. The IC measure, process this changed resistance values and change them into digital
form.
For measuring temperature this sensor uses a Negative Temperature coefficient thermistor, which

causes a decrease in its resistance value with increase in temperature. To get larger resistance value

even for the smallest change in temperature, this sensor is usually made up of semiconductor
41

ceramics or polymers.

The temperature range of DHT11 is from 0 to 50 degree Celsius with a 2-degree accuracy. Humidity

range of this sensor is from 20 to 80% with 5% accuracy. The sampling rate of this sensor is 1Hz .i.e. it

gives one reading for every second. DHT11 is small in size with operating voltage from 3 to 5 volts.

The maximum current used while measuring is 2.5mA.

DHT11 Sensor
DHT11 sensor has four pins- VCC, GND, Data Pin and a not connected pin. A pull-up resistor of 5k to

10k ohms is provided for communication between sensor and micro-controller.

Applications

This sensor is used in various applications such as measuring humidity and temperature values in
heating, ventilation and air conditioning systems. Weather stations also use these sensors to predict
weather conditions. The humidity sensor is used as a preventive measure in homes where people are
affected by humidity. Offices, cars, museums, greenhouses and industries use this sensor for
measuring humidity values and as a safety measure.
It’s compact size and sampling rate made this sensor popular among hobbyists. Some of the sensors

which can be used as an alternative to DHT11 sensor are DHT22, AM2302, SHT71.

3.Light sensor :

Definition of light sensor


A light sensor is an electronic sensor that can detect the intensity of light. It can detect the intensity of
light in the surrounding environment. It is a commonly used sensor used to detect ambient light and
can be used to control the switches of electronic equipment, such as automatic lighting, safety systems,
automatic curtains, etc.
Composition of light sensor
The light sensor consists of a photodetector, an amplifier, a comparison circuit, a filter circuit, and an
output circuit.
1. Photodetector: composed of photodiodes, light-emitting diodes, and transistor, it is used to detect the
light intensity of the surrounding environment and convert it into an electrical signal output.
2. Amplifier: The amplifier is cascaded into multiple stages, which is used to amplify the photoelectric
signal and increase its output voltage in order to improve the sensitivity of the signal.
3. Comparison circuit: it consists of a comparator, a threshold voltage regulating circuit, a filter circuit,
etc., which is used to compare the input voltage and the set threshold voltage, and outputs a high and
low level signal.
42

4.Flame sensor

A sensor which is most sensitive to a normal light is known as a flame sensor. That’s why this

sensor module is used in flame alarms. This sensor detects flame otherwise wavelength within the
range of 760 nm – 1100 nm from the light source. This sensor can be easily damaged to high
temperature. So this sensor can be placed at a certain distance from the flame. The flame detection
can be done from a 100cm distance and the detection angle will be 600. The output of this sensor is an
analog signal or digital signal. These sensors are used in fire fighting robots like as a flame alarm.

What is a Flame Sensor?

A flame-sensor is one kind of detector which is mainly designed for detecting as well as responding
to the occurrence of a fire or flame. The flame detection response can depend on its fitting. It
includes an alarm system, a natural gas line, propane & a fire suppression system. This sensor is
used in industrial boilers. The main function of this is to give authentication whether the boiler is
properly working or not. The response of these sensors is faster as well as more accurate compare
with a heat/smoke detector because of its mechanism while detecting the flame.
Working Principle

This sensor/detector can be built with an electronic circuit using a receiver like electromagnetic
radiation. This sensor uses the infrared flame flash method, which allows the sensor to work through a
coating of oil, dust, water vapor, otherwise ice.
Flame Sensor Module

The pin configuration of this sensor is shown below. It includes four pins which include the following.

When this module works with a microcontroller unit then the pins are

flame-sensor
• Pin1 (VCC pin): Voltage supply rages from 3.3V to 5.3V
• Pin2 (GND): This is a ground pin
• Pin3 (AOUT): This is an analog output pin (MCU.IO)
• Pin4 (DOUT): This is a digital output pin (MCU.IO)
Different Types

Flame-sensors are classified into four types

• IR single frequency
• IR multi-spectrum
• UV flame detectors
• UV/ IR flame detectors
43

Features & Specifications

The features of this sensor include the following.

• Photosensitivity is high
• Response time is fast
• Simple to use
• Sensitivity is adjustable
• Detection angle is 600,
• It is responsive to the flame range.
• Accuracy can be adjustable
• Operating voltage of this sensor is 3.3V to 5V
• Analog voltage o/ps and digital switch o/ps
• The PCB size is 3cm X 1.6cm
• Power indicator & digital switch o/p indicator
• If the flame intensity is lighter within 0.8m then the flame test can be activated, if the
• flame intensity is high, then the detection of distance will be improved.
Applications

These sensors are used in several dangerous situations which include the following.

• Hydrogen stations
• Industrial heating
• Fire detection
• Fire alarm
• Fire fighting robot
• Drying systems
• Industrial gas turbines
• Domestic heating systems
• Gas-powered cooking devices
Thus, this is all about a flame sensor. From the above information finally, we can conclude that the
main purpose of this sensor is to reduce the risks which are associated with the ignition. These sensors
respond frequently than a smoke or heat detector.

5.PIR motion sensor :

PIR sensors allow you to sense motion, almost always used to detect whether a human has moved
in or out of the sensors range. They are small, inexpensive, low-power, easy to use and don't wear
out. For that reason they are commonly found in appliances and gadgets used in homes or
businesses. They are often referred to as PIR, "Passive Infrared", "Pyroelectric", or "IR motion"
sensors.

PIRs are basically made of a pyroelectric sensor (which you can see below as the round metal can
with a rectangular crystal in the center), which can detect levels of infrared radiation. Everything
emits some low level radiation, and the hotter something is, the more radiation is emitted. The
sensor in a motion detector is actually split in two halves. The reason for that is that we are
44

looking to detect motion (change) not average IR levels. The two halves are wired up so that they
cancel each other out. If one half sees more or less IR radiation than the other, the output will
swing high or low.

Along with the pyroelectic sensor is a bunch of supporting circuitry, resistors and
capacitors. It seems that most small hobbyist sensors use the BISS0001 ("Micro Power
PIR Motion Detector IC"), undoubtedly a very inexpensive chip. This chip takes the
output of the sensor and does some minor processing on it to emit a digital output pulse
from the analog sensor.
For many basic projects or products that need to detect when a person has left or entered
the area, or has approached, PIR sensors are great. They are low power and low cost,
pretty rugged, have a wide lens range, and are easy to interface with. Note that PIRs won't
tell you how many people are around or how close they are to the sensor, the lens is often
fixed to a certain sweep and distance (although it can be hacked somewhere) and they are
also sometimes set off by housepets.

6.CO2 sensor :

The XENSIV™ PAS CO2 sensor is a real carbon dioxide (CO2) sensor in an unprecedented small

form factor. Designed on the basis of the photoacoustic spectroscopy (PAS) concept, the sensor saves

more than 75 percent space compared to existing commercial real CO2 sensors. Its direct ppm readings,
tape & reel packing, SMD capability and simple design allow for a quicker and easier integration into
customers’ systems in low and high-volume applications alike.

Summary of Features

• Exceptionally small form factor (14 x 13.8 x 7.5 mm3)


• Highest accuracy and robust performance at ppm level (±30 ppm ±3% of reading)
• SMD package delivered in tape and reel
• Advanced compensation and self-calibration algorithms
• Various configuration options (e.g. sampling rate, baseline calibration)
and interfaces (UART, I2C, PWM)

Benefits

• Space savings & opening up consumer application market


• High-quality data and compliance with most stringent regulations for indoor air quality

(e.g. title 24 in California)

• Cost-effective high-volume assembly and easy system integration


• Suitable for high volume standard high speed pick & place for fast & automatic assembly - No
need of post calibration
• Customer flexibility thanks to variety of configuration options
45

Potential Applications

Key applications for air quality monitoring and/or demand controlled ventilation:

• HVAC (Heating, Ventilation, Air Conditioning)

o Residential-, Commercial-, Automotive HVAC as well as Air Purifiers


• Smart Home & Building
o Smart Thermostats, Lighting & Air Quality Devices
• Agriculture/ Greenhouses

Buy online

2.Relay Module

Relay Module Function

3.jumper wire :

Jumper wires are simply wires that have connector pins at each end, allowing them to be used to

connect two points to each other without soldering. Jumper wires are typically used with breadboards

and other prototyping tools in order to make it easy to change a circuit as needed. Fairly simple. In fact,

it doesn’t get much more basic than jumper wires.Types of Jumper Wires
46

Jumper wires typically come in three versions: male-to-male, male-to-female and female-to-female. The
difference between each is in the end point of the wire. Male ends have a pin protruding and can plug

into things, while female ends do not and are used to plug things into. Male-to-male jumper wires are

the most common and what you likely will use most often. When connecting two ports on a breadboard,

a male-to-male wire is what you’ll need.

4.LCD Display 16/2

Nowadays, we always use the devices which are made up of LCDs such as CD players, DVD players,
digital watches, computers, etc. These are commonly used in the screen industries to replace the
utilization of CRTs. Cathode Ray Tubes use huge power when compared with LCDs, and CRTs
heavier as well as bigger. These devices are thinner as well power consumption is extremely less.
The LCD 16×2 working principle is, it blocks the light rather than dissipate. This article
discusses an overview of LCD 16X2, pin configuration and its working.

What is the LCD 16×2?

The term LCD stands for liquid crystal display. It is one kind of electronic display module used

in an extensive range of applications like various circuits & devices like mobile phones,

calculators, computers, TV sets, etc. These displays are mainly preferred for multi-segment

light-emitting diodes and seven segments. The main benefits of using this module are inexpensive;
simply programmable, animations, and there are no limitations for displaying custom characters, special
and even animations, etc.
16X2 LCD
LCD 16×2 Pin Diagram

The 16×2 LCD pinout is shown below.

• Pin1 (Ground/Source Pin): This is a GND pin of display, used to connect the GND terminal
47

of the microcontroller unit or power source.


• Pin2 (VCC/Source Pin): This is the voltage supply pin of the display, used to connect the
supply pin of the power source.
• Pin3 (V0/VEE/Control Pin): This pin regulates the difference of the display, used to
connect a changeable POT that can supply 0 to 5V.
• Pin4 (Register Select/Control Pin): This pin toggles among command or data register,
used to connect a microcontroller unit pin and obtains either 0 or 1(0 = data mode, and
1 = command mode).
• Pin5 (Read/Write/Control Pin): This pin toggles the display among the read or writes
operation, and it is connected to a microcontroller unit pin to get either 0 or 1 (0 = Write
Operation, and 1 = Read Operation).
• Pin 6 (Enable/Control Pin): This pin should be held high to execute Read/Write process,
and it is connected to the microcontroller unit & constantly held high.
• Pins 7-14 (Data Pins): These pins are used to send data to the display. These pins are
connected in two-wire modes like 4-wire mode and 8-wire mode. In 4-wire mode, only
four pins are connected to the microcontroller unit like 0 to 3, whereas in 8-wire mode,
8-pins are connected to microcontroller unit like 0 to 7.
• Pin15 (+ve pin of the LED): This pin is connected to +5V
• Pin 16 (-ve pin of the LED): This pin is connected to GND.

LCD-16×2-pin-diagram
Features of LCD16x2

The features of this LCD mainly include the following.

• The operating voltage of this LCD is 4.7V-5.3V


• It includes two rows where each row can produce 16-characters.
• The utilization of current is 1mA with no backlight
• Every character can be built with a 5×8 pixel box
• The alphanumeric LCDs alphabets & numbers
• Is display can work on two modes like 4-bit & 8-bit
• These are obtainable in Blue & Green Backlight
• It displays a few custom generated characters
5.Busser :

An audio signaling device like a beeper or buzzer may be electromechanical or piezoelectric or


mechanical type. The main function of this is to convert the signal from audio to sound. Generally, it is
powered through DC voltage and used in timers, alarm devices, printers, alarms, computers, etc.
48

Based on the various designs, it can generate different sounds like alarm, music, bell & siren.

Buzzer Pin Configuration


The pin configuration of the buzzer is shown below. It includes two pins namely positive and
negative. The positive terminal of this is represented with the ‘+’ symbol or a longer terminal.
This terminal is powered through 6Volts whereas the negative terminal is represented with the
‘-‘symbol or short terminal and it is connected to the GND terminal.

Specifications

The specifications of the buzzer include the following.


• Color is black
• The frequency range is 3,300Hz
• Operating Temperature ranges from – 20° C to +60°C
• Operating voltage ranges from 3V to 24V DC
• The sound pressure level is 85dBA or 10cm
• The supply current is below 15mA
Working Principle

The working principle of a buzzer depends on the theory that, once the voltage is given across a
piezoelectric material, then a pressure difference is produced. A piezo type includes piezo crystals

among two conductors.

Once a potential disparity is given across these crystals, then they thrust one conductor & drag the
additional conductor through their internal property. So this continuous action will produce a sharp
sound signal.
How to use a Buzzer?

A buzzer is an efficient component to include the features of sound in our system or project. It is an
extremely small & solid two-pin device thus it can be simply utilized on breadboard or PCB. So in

most applications, this component is widely used.

There are two kinds of buzzers commonly available like simple and readymade. Once a simple type is
power-driven then it will generate a beep sound continuously. A readymade type looks heavier &

generates a Beep. Beep. Beep. This sound is because of the internal oscillating circuit within it.
49

This buzzer uses a DC power supply that ranges from 4V – 9V. To operate this, a 9V battery is used
but it is suggested to utilize a regulated +5V/+6V DC supply. Generally, it is connected through a
switching circuit to switch ON/OFF the buzzer at the necessary time interval.
Buzzer Circuit Diagram

The circuit diagram of the water level indicator using the buzzer is shown below. This circuit is
used to sense or detect the water level within the tank or washing machine or pool, etc. This circuit is
very simple to design using few components such as a transistor, buzzer, 300K variable resistor, and
power supply or 9V battery.

Water Level Circuit using Buzzer


Once the two probes of the circuit are placed in the tank, it detects the level of water. Once the water

Zlevel exceeds the fixed level, then it generates a beep sound through a buzzer connected to the circuit.
This circuit uses a BC547B NPN transistor however we can also use any general-purpose transistor
instead of using 2N3904/2N2222.
This water level sensor circuit working is very simple and the transistor used within the circuit works

as a switch. Once the two probes notice the water level within the tank, then the transistor turns ON &

the voltage begins flowing throughout the transistor to trigger the buzzer.

Advantages

The advantages of a buzzer include the following.


• Simply Compatible
• Frequency Response is Good
• Size is small
• Energy Consumption is less
• The Range of Voltage usage is Large
• Sound Pressure is high
Disadvantages

The disadvantages of the buzzer include the following.


• Controlling is a little hard
• Generates Annoying Sound
• Training is necessary to know how to repair the condition without just turning off.
Applications

The applications of the buzzer include the following.


50

• Communication Devices
• Electronics used in Automobiles
• Alarm Circuits
• Portable Devices
• Security Systems
• Timers
• Household Appliances
• Electronic Metronomes
• Sporting Events
• Annunciator Panels
• Game Shows
Thus, this is all about an overview of a buzzer data sheet that includes its working principle, pin
configuration, specifications, circuit, advantages, disadvantages & its applications. It is an
electromechanical, electromagnetic, mechanical, piezoelectric, electro-acoustic audio signaling device.
This buzzer works through an audio signal source or oscillating circuit.

6.Led lights :

The LED stands for Light-emitting diode. LED is a PN-junction diode mainly used as the source of
light.
The LED has a leg over common orthodox incandescent light in terms of efficiency, low consumption

power, compact size, longer range and an ability to retain the quality for a longer period of time. It

comes with a wide variety of applications ranging from automotive headlamps, camera flashes,

aviation lighting, traffic signal, and medical devices.

LED is a PN-junction diode that is mainly used as a replacement for incandescent lights. It is based

on the electroluminescence effect - A process where a diode converts electric current to light when

electrons change their state inside the LED semiconductors.

The PN-junction is nothing but a combination of both N-type and P-type semiconductor materials.

The material forming the junction diode is not identical to other mainstream didoes, as it comes

with a transparent package, allowing the infrared and visible light to pass through the junction.
51

• The LED contains two terminals known as anode and cathode. The former contains a positive charge

• on it and comes with the longer lead as compared to others, and later contains a negative charge on it.

LED will be working under one condition: the anode terminal should be put at a higher potential

than the cathode terminal as current flows from anode to cathode (positive to negative). LED won't

conduct if the respective terminals are connected in reverse order.

7.GSM module :

GSM stands for Global System for Mobile Communication. It is a digital cellular technology used for
transmitting mobile voice and data services. Important facts about the GSM are given below −

• The concept of GSM emerged from a cell-based mobile radio system at Bell Laboratories in the
early 1970s.
• GSM is the name of a standardization group established in 1982 to create a common European
mobile telephone standard.
• GSM is the most widely accepted standard in telecommunications and it is implemented
globally.
• GSM is a circuit-switched system that divides each 200 kHz channel into eight 25 kHz
time-slots. GSM operates on the mobile communication bands 900 MHz and 1800 MHz in most
parts of the world. In the US, GSM operates in the bands 850 MHz and 1900 MHz.
• GSM owns a market share of more than 70 percent of the world's digital cellular subscribers.
• GSM makes use of narrowband Time Division Multiple Access (TDMA) technique for
transmitting signals.
• GSM was developed using digital technology. It has an ability to carry 64 kbps to 120 Mbps
of data rates.
• Presently GSM supports more than one billion mobile subscribers in more than 210
countries throughout the world.
• GSM provides basic to advanced voice and data services including roaming service. Roaming
is the ability to use your GSM phone number in another GSM network

8. battery(9 v) :

The nine-volt battery, or 9-volt battery, is an electric battery that supplies a nominal voltage of 9 volts.
Actual voltage measures 7.2 to 9.6 volts, depending on battery chemistry. Batteries of various sizes and
capacities are manufactured; a very common size is known as PP3, introduced for early transistor radios
52

9.Small water pump :

The mini water pump refers to the super micro water pump, which can circulate, transport or

pressurize the liquid, that is, convert the mechanical energy into the kinetic energy of the liquid to
pump the liquid. The mini water pump is generally composed of a driving part and a pump body.
The pump body has two interfaces, one inlet and one outlet. The water enters from the water inlet and
the other outlet. The mini water pump is generally small in size, light in weight, and has
anti-interference, long life and high temperature resistance (100 ℃).

Features

• Operating DC Voltage: 2.5-6V


• Maximum Water lift height: 40-110cm / 15.75"-43.4"
• Flow rate: 80-120L/H
• Outer Diameter of Water Outlet: 7.5mm / 0.3"
• Inside Diameter of Water Outlet: 5mm / 0.2"
• Pump Diameter: Approx. 24mm / 0.95"
• Pump Length: Approx. 45mm / 1.8"
• Pump Height: Approx. 30mm / 1.2"
53

• Wire Length: ~13mm cm

10.breadboard :

Breadboards are temporary work boards for electronic circuits. The general shape of a breadboard is

shown in Fig. Compatible with most breadboards, 24-gauge wire is used to connect circuits; solid wire,

not stranded. Sometimes, kits may be available with various colors of fixed lengths to specifically fit
breadboards. These are a nice convenience.

3.5 Preliminary Product Description


A smart greenhouse monitoring system is a cutting – edge solution
designed to optimize your cultivation environment. Harnessing advanced sensors, this
system provides real – time data on temperature, humidity, soil moisture, and light levels.
Ensure optimal conditions for your plants, maximize yield, and streamline your
agricultural operations with innovative technology.

• System Features

1. Monitor temperature /humidity, and soil moisture.


2. This system helps In monitoring and controlling the climatic conditions that
are favourable for the cultivation of a particular plant.
3. By using this system, crop growth can be improved along with maximized
yield, irrespective of the weather conditions.
4. This project can be further enhanced to monitor and control the pesticide
level
54

CHAPTER 5

coding

1. code for soil moisture sensor :

#include <LiquidCrystal_I2C.h>
LiquidCrystal_I2C lcd(0x27, 16, 2);

void setup() {
Serial.begin(9600);
lcd.init();
lcd.backlight();
lcd.clear();
pinMode(2, OUTPUT);
digitalWrite(2, HIGH);
delay(3000);
lcd.clear();
}

void loop() {
int value = analogRead(A0);
Serial.println(value);
if (value > 950) {
digitalWrite(2, LOW);
lcd.setCursor(0, 0);
lcd.print("Water Pump is ON ");
} else {
digitalWrite(2, HIGH);
lcd.setCursor(0, 0);
lcd.print("Water Pump is OFF");
}

if (value < 300) {


lcd.setCursor(0, 1);
lcd.print("Moisture : HIGH");
} else if (value > 300 && value < 950) {
lcd.setCursor(0, 1);
lcd.print("Moisture : MID ");
} else if (value > 950) {
lcd.setCursor(0, 1);
55

lcd.print("Moisture : LOW ");


}
}

Hardware setting :

Soil moisture sensors :


Pin settings :
1. vcc = breadboard 5v
2. GND = breadboard ground
3. A0 = A0
Lcd pins setting :
1.GND = breadboard ground
2. vcc = breadboard 5v
3. SDA = A4 pin
4. SCL = A5 pin
Relay module :
1.Vcc = breadboard 5v
2. GND = breadboard ground
3.IN = data pin 2
Arduino 5v pin > bread board +
Arduino GND pin > bread board –

RESULT

After uploading the code output


56

Code for temperature and humidity sensor (DHT11) :

#include <DHT.h>
#include <LiquidCrystal_I2C.h>
#include <Wire.h>

LiquidCrystal_I2C lcd(0x27,16,2); // set the LCD address to 0x27 for a 16 chars and 2
line display

//Constants
#define DHTPIN 12 // what pin we're connected to
#define DHTTYPE DHT11 // DHT 11
DHT dht(DHTPIN, DHTTYPE); //// Initialize DHT sensor for normal 16mhz Arduino

//Variables
//int chk;
int h; //Stores humidity value
int t; //Stores temperature value
57

void setup()
{
Serial.begin(9600);
dht.begin();
lcd.init(); //initialize the lcd
lcd.backlight(); //open the backlight
}

void loop()
{
//Read data and store it to variables h (humidity) and t (temperature)
// Reading temperature or humidity takes about 250 milliseconds!
h = dht.readHumidity();
t = dht.readTemperature();

//Print temp and humidity values to serial monitor


Serial.print("Humidity: ");
Serial.print(h);
Serial.print(" %, Temp: ");
Serial.print(t);
Serial.println(" ° Celsius");

// set the cursor to (0,0):


// print from 0 to 9:

lcd.setCursor(0, 1);
lcd.print("T:");
lcd.print(t);
lcd.print("C");

lcd.setCursor(11, 1);
lcd.print("H:");
lcd.print(h);
lcd.print("%");

delay(1000); //Delay 1 sec.


}

Hardware setting:

Pins setting :
58

VCC = bread board 5v


GND = breadboard ground
Data = pin 12

RESULTS

After uploading the code :


59

Code for fleam sensor :

const int buzzerPin = 6;


const int fireSensorPin = 0;
const int ledPin = 13;
void setup()
{
Serial.begin(9600);
pinMode(buzzerPin, OUTPUT);
pinMode(fireSensorPin, INPUT);
pinMode(ledPin, OUTPUT);
}
void loop()
{
int fireValue = digitalRead(fireSensorPin);
Serial.println(fireValue);
if(fireValue == 0)
{
digitalWrite(buzzerPin, HIGH);
digitalWrite(ledPin, HIGH);
delay(5000);
}
else
{
digitalWrite(buzzerPin, LOW);
digitalWrite(ledPin, LOW);
}
delay(500);
}
60

Hardware setting:

Pins setting :

VCC = bread board 5v


GND = breadboard ground
Do = pin 0

Led pin = pin 13


Buzzer pin = pin 6

RESULTS

After uploading the code :


61

Code for PIR motion sensor :

int calibrationTime = 30;

long unsigned int lowIn;

long unsigned int pause = 5000;

boolean lockLow = true;


boolean takeLowTime;

int pirPin = 7; //the digital pin connected to the PIR sensor's output
int ledPin = 5; //the digital pin connected to the LED output
int Buzzer = 6; //the digital pin connected to the BUZZER output

void setup(){
Serial.begin(9600);
pinMode(pirPin, INPUT);
pinMode(ledPin, OUTPUT);
pinMode(Buzzer, OUTPUT);
digitalWrite(pirPin, LOW);
Serial.print("calibrating sensor ");
for(int i = 0; i < calibrationTime; i++){
Serial.print(".");
delay(1000);
}
Serial.println(" done");
Serial.println("SENSOR ACTIVE");
delay(50);
}

void loop(){

if(digitalRead(pirPin) == HIGH){
digitalWrite(ledPin, HIGH); //the led visualizes the sensors output pin state
tone(Buzzer,500);
if(lockLow){

lockLow = false;
62

Serial.println("---");
Serial.print("motion detected at ");
Serial.print(millis()/1000);
Serial.println(" sec");
delay(50);
}
takeLowTime = true;
}

if(digitalRead(pirPin) == LOW){
digitalWrite(ledPin, LOW); //the led visualizes the sensors output pin state
noTone(Buzzer);
if(takeLowTime){
lowIn = millis(); //save the time of the transition from high to LOW
takeLowTime = false; //make sure this is only done at the start of a LOW
phase
}

if(!lockLow && millis() - lowIn > pause){

lockLow = true;
Serial.print("motion ended at "); //output
Serial.print((millis() - pause)/1000);
Serial.println(" sec");
delay(50);
}
}
}

Hardware setting:

Pins setting :

VCC = bread board 5v


GND = breadboard ground
Out = pin 7
Led = pin 5
Buzzer = pin 6

RESULTS

After uploading the code :


63

Code for LDR sensor :

int ldrPin = A1;


64

int led = 11;


int threshold = 700;
void setup()
{
Serial.begin(9600);
pinMode(led, OUTPUT);
}
void loop()
{
int data = analogRead(ldrPin);
Serial.println("");
Serial.print("Light Sensor ");
Serial.print("Value = ");
Serial.print(data);
if(data <= threshold)
{
digitalWrite(led, HIGH);
}
else
{
digitalWrite(led, LOW);
}
}

Hardware setting:

Pins setting :

led pin = 11
LDR = A1

RESULTS

After uploading the code :


65

Combine code of the project :

#include <LiquidCrystal_I2C.h>
#include <DHT.h>
#include <Wire.h>
LiquidCrystal_I2C lcd(0x27, 16, 2);
#define DHTPIN 12 // what pin we're connected to
66

#define DHTTYPE DHT11 // DHT 11


//fire sensor
const int buzzerPin1 = 6;
const int fireSensorPin = 0;
const int ledPin1 = 13;
//end
//dht11
DHT dht(DHTPIN, DHTTYPE); //// Initialize DHT sensor for normal 16mhz Arduino
//Variables
//int chk;
int h; //Stores humidity value
int t; //Stores temperature value
//end
//pir
int calibrationTime = 30;

long unsigned int lowIn;

long unsigned int pause = 5000;

boolean lockLow = true;


boolean takeLowTime;

int pirPin = 7; //the digital pin connected to the PIR sensor's output
int ledPin = 5; //the digital pin connected to the LED output
int Buzzer = 6; //the digital pin connected to the BUZZER output
//end
//LDR
int ldrPin = A1;
int led = 11;
int threshold = 700;
//end

void setup() {
Serial.begin(9600);
lcd.init();
lcd.backlight();
lcd.clear();
pinMode(2, OUTPUT);
digitalWrite(2, HIGH);
delay(3000);
lcd.clear();
//fire sensor
pinMode(buzzerPin1, OUTPUT);
pinMode(fireSensorPin, INPUT);
pinMode(ledPin1, OUTPUT);
//end
//dht11
67

dht.begin();
lcd.init(); //initialize the lcd
lcd.backlight(); //open the backlight
//end
//pir
pinMode(pirPin, INPUT);
pinMode(ledPin, OUTPUT);
pinMode(Buzzer, OUTPUT);
digitalWrite(pirPin, LOW);
Serial.print("calibrating sensor ");
for(int i = 0; i < calibrationTime; i++){
Serial.print(".");
delay(1000);
}
Serial.println(" done");
Serial.println("SENSOR ACTIVE");
delay(50);
//LED
pinMode(led, OUTPUT);
//END
}
//end

void loop() {
int value = analogRead(A0);
Serial.println(value);
if (value > 950) {
digitalWrite(2, LOW);
lcd.setCursor(0, 0);
lcd.print("ON ");
} else {
digitalWrite(2, HIGH);
lcd.setCursor(0, 0);
lcd.print("OFF");
}

if (value < 300) {


lcd.setCursor(0, 1);
lcd.print("M : HIGH");
} else if (value > 300 && value < 950) {
lcd.setCursor(0, 1);
lcd.print("M: MID ");
} else if (value > 950) {
lcd.setCursor(0, 1);
lcd.print("M: LOW ");
}
//fire begin
int fireValue = digitalRead(fireSensorPin);
68

Serial.println(fireValue);
if(fireValue == 0)
{
digitalWrite(buzzerPin1, HIGH);
digitalWrite(ledPin1, HIGH);
delay(5000);
}
else
{
digitalWrite(buzzerPin1, LOW);
digitalWrite(ledPin1, LOW);
delay(500);
}
//end
//dht11
//Read data and store it to variables h (humidity) and t (temperature)
// Reading temperature or humidity takes about 250 milliseconds!
h = dht.readHumidity();
t = dht.readTemperature();

//Print temp and humidity values to serial monitor


Serial.print("Humidity: ");
Serial.print(h);
Serial.print(" %, Temp: ");
Serial.print(t);
Serial.println(" ° Celsius");

// set the cursor to (0,0):


// print from 0 to 9:

lcd.setCursor(8, 0);
lcd.print("T:");
lcd.print(t);
lcd.print("C");

lcd.setCursor(8, 1);
lcd.print("H:");
lcd.print(h);
lcd.print("%");

delay(1000); //Delay 1 sec.


//pir
if(digitalRead(pirPin) == HIGH){
digitalWrite(ledPin, HIGH); //the led visualizes the sensors output pin state
69

tone(Buzzer,500);
if(lockLow){

lockLow = false;
Serial.println("---");
Serial.print("motion detected at ");
Serial.print(millis()/1000);
Serial.println(" sec");
delay(50);
}
takeLowTime = true;
}

if(digitalRead(pirPin) == LOW){
digitalWrite(ledPin, LOW); //the led visualizes the sensors output pin state
noTone(Buzzer);
if(takeLowTime){
lowIn = millis(); //save the time of the transition from high to LOW
takeLowTime = false; //make sure this is only done at the start of a LOW
phase
}

if(!lockLow && millis() - lowIn > pause){

lockLow = true;
Serial.print("motion ended at "); //output
Serial.print((millis() - pause)/1000);
Serial.println(" sec");
delay(50);
}
}
//LDR
int data = analogRead(ldrPin);
Serial.println("");
Serial.print("Light Sensor ");
Serial.print("Value = ");
Serial.print(data);
if(data <= threshold)
{
digitalWrite(led, HIGH);
}
else
{
digitalWrite(led, LOW);
}
//END
}
70

RESULTS

After uploading the code :


71
72

Chapter 6

Circuit diagram

Circuit diagram of soil moisture sensor :


73

Circuit diagram of DHT11 sensor :

Circuit diagram of flame sensor :


74

Circuit diagram of PIR motion sensor :


75

Circuit diagram of LDR sensor :


76

❖ Block diagram of greenhouse monitoring system


77

Flowchart digram

Gantt chart
78
79

Chapter 7

Conclusion

Conclusion

A smart greenhouse monitoring system has been implemented successfully


using the concept of IoT which can prove to be a boon for agriculture sector. The traditional
system for greenhouse monitoring is labour-intensive and time consuming. The proposed
system saves time, money and human effort. It provides a controlled environment for the
plants and thus increase the overall yield. The smart greenhouse automatically optimizes the
various parameters for the plant growth. It sends the real time data of parameters to the
mobile app for continuous and effective monitoring . This system will detect fire and inform
farmars. This system will also detect motion through PIR sensor of animalse . It will detect
the whater level in plants and start the irrigation system. When the whater level is high the
irrigation system will stop automatically. Temperature, humidity , soil moisture data wiil be
display on the lcd 16 * 2..when fire is detected the alaram system will automatically turn on

This system will collect data on key environmental parameters such as temperature,
humidity, and light within the greenhouse. In this study, a streamlined, clever monitoring and
controlling system for greenhouse farming is described. Based on the many changes in the
environment, the various sensors were able to adjust. This study aims to support small-scale
farmers\' convenience and ease of plant growth. Small farmers will be able to grow healthy
crops all year long with little oversight according to the suggested method.

REFERENCES

• https://www.arduino.cc/
• https://wokwi.com/Esp32 simulator
• https://scienceprog.com/understanding-and-interfacing-ldr-light-
dependent- • resistors/
• https://www.circuitstoday.com/ldr-light-dependent-resistors

You might also like