You are on page 1of 59

A Mobile Greenhouse Environment Monitoring System Based on the Internet of Things

CHAPTER 1

1.INTRODUCTION

1.1 introduction

In today’s greenhouses, monitoring and controlling of many parameters are important


for the good quality and productivity of plants. But to get the desired result some parameters
like temperature, humidity, soil moisture, light intensity and soil pH are important for better
plant growth. So an Arduino ,Bluetooth based greenhouse environment monitoring and
controlling system using sensors has been designed. For this project, Arduino microcontroller
is used. Arduino can receive input from a variety of sensors and it can control motors, lights
and other actuators. Four sensors, DHT11 sensor, LDR sensor are used. DHT11 sensor is
used to measure temperature and humidity. LDR sensor is used to measure light intensity. A
cooling fan, exhaust fan, water pump, artificial light and motor pump are also connected to
the Arduino. All environmental parameters are sent to android mobile phone via offline and
online.

The Design had been aimed data acquisition in greenhouse for multiple sensors to use
data for simulation or processing to achieve the better enhancement of growth in greenhouse,
this data has effect on the climate of greenhouse. The crop agriculture in greenhouse is
higher affected by the surrounding conditions. The significant environmental factors for
the quality and better productivity of the plants growth are temperature, relative
humidity, Lighting, moisture soil, and the CO2 amount in greenhouse. Continuous
monitoring of these factors gives relevant information pertaining to the individual effects
of the various factors towards obtaining maximum crop. Arduino is an open-source
electronics prototyping platform based on flexible, easy-to-use hardware and software.

1.2 OBJECTIVE

Page no:1
A Mobile Greenhouse Environment Monitoring System Based on the Internet of Things

• Build miniature greenhouse which is equipped with automatic monitoring and


controlling system
• Constantly monitor and control environmental conditions in greenhouse to ensure it
remains at preset temperature, light, moisture and humidity levels.
• It focuses on saving water, increasing efficiency and reducing the environmental
impacts on plants production.
• The user can see the atmospheric conditions of the greenhouse plants on website and
control the greenhouse from faraway places.

1.3 PROBLEM STATEMENT

The plant growth is affected by the complexities involved in humidity, temperature,


carbondioxide etc. The existing systems monitor and control only one parameter rather than
many parameters simultaneously. The proposed systems with mobile acquisition technology
monitor and control multiple parameters at a time. It improves efficiency, reliability and
skilled labour. This system based on wireless Sensor Network. Abstract: Wireless sensor
networks (WSN) could be used to monitor and control many parameters of environment
such as temperature, humidity, and radiation leakage. In greenhouse the weather and soil
should be independent of the natural agents.

1.4 INTRODUCTION TO IOT

Industrial saftey is one of the main aspects of industry specially coal mine industry. Coal
mines involves various risk factors which effects the health of miners. Miners removes their
helmet may cause hazardous. Sometimes miners collide with the heavy objects like mining
objects ,hard rock which risks their life. Another factor that effects the miners is the
inhalation of hazardous gases that provokes them in danger .In this situation miners are not
able to communicate with the outside world. In this case the smart helmet system becomes an
essential and helpful measure to protect the miners from various accidents. This project aims
at designing a smart helmet for hazardous event detection, monitoring the surrounding
environmental conditions.

1.5 INTERNET OF THINGS

Connecting regular things installed with gadgets, programming, and sensors to web
empowering to gather and trade information without human collaboration called as the

Page no:2
A Mobile Greenhouse Environment Monitoring System Based on the Internet of Things

Internet of Things (IoT).The term "Things" in the Internet of Things alludes to everything
without exception in everyday life which is gotten to or associated through the web.

Fig 1.1 Internet of things

IoT is a propelled robotization and examination framework which manages


computerized reasoning, sensor, organizing, electronic, cloud informing and so forth to
convey total frameworks for the item or administrations. The framework made by IoT has
more noteworthy straightforwardness, control, and execution. As we have a stage, for
example, a cloud that contains all the information through which we associate all the things
around us. For instance, a house, where we can interface our home apparatuses, for example,
climate control system, light, and so forth through one another and every one of these things
are overseen at a similar stage. Since we have a stage, we can associate our vehicle, track its
fuel meter, speed level, and furthermore track the area of the vehicle.

1.4.1 IOT - ENVIRONMENTAL MONITORING:

The applications of IoT in environmental monitoring are broad − environmental protection,


extreme weather monitoring, water safety, endangered species protection, commercial
farming, and more. In these applications, sensors detect and measure every type of
environmental change.

Air and Water Pollution

Page no:3
A Mobile Greenhouse Environment Monitoring System Based on the Internet of Things

Current monitoring technology for air and water safety primarily uses manual labor along
with advanced instruments, and lab processing. IoT improves on this technology by reducing
the need for human labor, allowing frequent sampling, increasing the range of sampling and
monitoring, allowing sophisticated testing on-site, and binding response efforts to detection
systems. This allows us to prevent substantial contamination and related disasters.

Extreme Weather

Though powerful, advanced systems currently in use allow deep monitoring, they suffer from
using broad instruments, such as radar and satellites, rather than more granular solutions.
Their instruments for smaller details lack the same accurate targeting of stronger technology.

New IoT advances promise more fine-grained data, better accuracy, and flexibility. Effective
forecasting requires high detail and flexibility in range, instrument type, and deployment.
This allows early detection and early responses to prevent loss of life and property.

Commercial Farming

Today's sophisticated commercial farms have exploited advanced technology and


biotechnology for quite some time, however, IoT introduces more access to deeper
automation and analysis.

Farming

Much of commercial farming, like weather monitoring, suffers from a lack of precision and
requires human labor in the area of monitoring. Its automation also remains limited.

Page no:4
A Mobile Greenhouse Environment Monitoring System Based on the Internet of Things

CHAPTER 2

2. LITERATURE SURVEY

The current greenhouse data acquisition system is implemented in the way that data
acquisition terminal uploads data to the host computer to manage the data or transfer them to
cloud server. The network structure is relatively complex and the power consumption is
large. In order to solve the above problems, a greenhouse environment monitoring and
temperature prediction system was developed by using the Internet of Things, cloud services
and WeChat platform. In this system, the data collection terminal directly connected the
Internet to the cloud server through WiFi/GPRS to interact with the data, and the mobile
terminal accessed the cloud server to obtain the data service through the WeChat public
number. The temperature forecasting model adopted the differential time series model to

Page no:5
A Mobile Greenhouse Environment Monitoring System Based on the Internet of Things

solve the influence of seasonal periodicity in the temperature prediction process. The data
analysis showed that the system effectively realized the lightweight and mobility of the data
acquisition terminal. The relative error of temperature monitoring was less than 4.96%, and
the relative error of temperature prediction was less than 3%. The prediction result has high
precision and can meet the needs of daily production. 

Careful (expert) management is required to consistently maintain desired


environmental conditions in greenhouse production systems. Actual implementation of
‘desired environmental conditions’ occurs indirectly as a function of the grower's perceptions
of crop response characteristics, control system behavior, and the weather. Simply stated,
when a grower selects (or changes) a setpoint, it represents more of an intuitive than an
analytical decision. In concept, an expert system can serve as a tool for mimicking a grower's
perceptions and provide support for real-time environmental controls.

To investigate this concept, an autonomous dynamic controller that chose set points
for the frequency and duration of misting events was developed and tested. The set points
were chosen by an expert system, MISTING, that was based on the perceived optimal misting
strategy of an experienced grower. System software ran on a general purpose microcomputer
(IBM-PC) that was located .5 km from the greenhouse. The remote microcomputer
communicated via dedicated telephone line with a monitor/controller (CR21X) located in the
greenhouse. Sensor data from the greenhouse were provided as facts to MISTING which
returned set points to the CR21X which accordingly, regulated misting line solenoids.

Real time data acquisition for effective monitoring for intensive farmlands. Open
source software makes it easy to better application development. Android is used to display
results in mobile devices. One of the most important changes in the southeast Spanish lands is
the switch from traditional agriculture to agriculture based on the exploitation of intensive
farmlands. For this type of farming, it is important to use techniques that improve plantation
performance. Web applications, databases and advanced mobile systems facilitate real-time
data acquisition for effective monitoring. Moreover, open-source systems save money and
facilitate a greater degree of integration and better application development based on the
system's robustness and widespread utility for several engineering fields. This paper presents
an application for Android tablets that interacts with an advanced control system based on
Linux, Apache, MySQL, PHP, Perl or Python (LAMP) to collect and monitor variables
applied in precision agriculture.

Page no:6
A Mobile Greenhouse Environment Monitoring System Based on the Internet of Things

Using a wireless sensor network, the authors developed an online microclimate


monitoring and control system for greenhouses. They field-tested the system in a greenhouse
in Punjab, India, evaluating its measurement capabilities and network performance in real
time.

With the advances in electronic and information technologies, various sensing


systems have been developed for specialty crop production around the world. Accurate
information concerning the spatial variability within fields is very important for precision
farming of specialty crops. However, this variability is affected by a variety of factors,
including crop yield, soil properties and nutrients, crop nutrients, crop canopy volume and
biomass, water content, and pest conditions (disease, weeds, and insects). These factors can
be measured using diverse types of sensors and instruments such as field-based electronic
sensors, spectroradiometers, machine vision, airborne multispectral and hyper spectral remote
sensing, satellite imagery, thermal imaging, RFID, and machine olfaction system, among
others. Sensing techniques for crop biomass detection, weed detection, soil properties and
nutrients are most advanced and can provide the data required for site specific management.
On the other hand, sensing techniques for diseases detection and characterization, as well as
crop water status, are based on more complex interaction between plant and sensor, making
them more difficult to implement in the field scale and more complex to interpret. This paper
presents a review of these sensing technologies and discusses how they are used for precision
agriculture and crop management, especially for specialty crops. Some of the challenges and
considerations on the use of these sensors and technologies for specialty crop production are
also discussed.

The work is implemented for remote monitoring and control of greenhouse


parameters with the help of sensors and GSM communication. It overcomes the
disadvantages of wired and wireless constraints such as complicated wiring, difficult
maintenance and distance, to monitor and control the applications. The application will have
embedded system which consists of ARM7 microcontroller, real time operating system,
sensors, GSM modem and control devices to monitor the environmental parameters condition
namely temperature, humidity, CO 2 concentration and light intensity in greenhouse. The
threshold levels of the sensors will be set with the help of push button keys or remotely via
GSM communication mode. By this, environmental parameters in greenhouse can be

Page no:7
A Mobile Greenhouse Environment Monitoring System Based on the Internet of Things

monitored and controlled manually as well as remotely. The hardware and software modules
of the application system are discussed in detail. This embedded application is implemented
and tested for its correct functionality. The experimental results show that the developed
monitoring system has the following features, such as simple structure, high reliability, good
extensibility and flexible configuration. It will control automatically the environmental
parameters in every greenhouse and has project practicality and vendibility.

In recent years, greenhouse technology in agriculture is to automation, information


technology direction with the IOT (Internet of Things) technology rapid development and
wide application. This paper takes CC2530 chip as the core, presents the design and
implementation of agriculture Greenhouse Environment monitoring system based on ZigBee
technology, the wireless sensor and control nodes takes CC2530F256 as core to control the
environment data. This system is made up of front-end data acquisition, data processing, data
transmission and data reception. The ambient temperature is real-time processed by the
temperature sensor of data terminal node. Processed data is send to the intermediate node
through a wireless network. Intermediate node aggregates all data, and then sends the data to
the PC through a serial port, at the same time, staff may view, analysis and storage the data
by the PC that provide real-time data for agricultural greenhouse, fans and other temperature
control equipment, and achieve automatic temperature control.

Greenhouse environmental control systems using sensor networks are becoming more
widespread and sophisticated. To match the produce of expert farmers, these systems collect
data about cultivation environment and growth situation, and aim to control the environment
for cultivating high quality crops. However, with no agriculture experience, it is difficult for
system users to set control parameters of several devices properly. In order to reproduce
prediction control performed by expert farmers’ cultivation without human intervention, the
authors propose a smart greenhouse environmental control system based on sliding window-
based support vector regression (SW-SVR). The proposed system performs prediction control
based on accurate predictions in real time. SW-SVR is a new machine learning algorithm for
time series data prediction. The prediction model automatically adjusts to the current
environment periodically, predicts time series data with high accuracy and low computational
complexity. The proposed system using SW-SVR enables system users to optimize controls
for crops. Meanwhile, since plant growth is related to the photosynthesis and transpiration of
leaves, the authors developed wireless scattered light sensors which measure leaf area size

Page no:8
A Mobile Greenhouse Environment Monitoring System Based on the Internet of Things

indirectly so as to estimate plant growth. Our experimental results, using data of scattered
light sensors on-site, outside weather data, and forecast data as independent variables of SW-
SVR for hydroponic culture of tomatoes, show the proposed system reduced prediction error
of nitrogen absorption amount by 59.44% as Mean Absolute Error (MAE) and 52.89% as
Root Mean Squared Error (RMSE) compared with SVR, and reduced training data by
43.07% on average. Furthermore, the sugar content of tomatoes cultivated by the prototype
system increased 1.54 times compared with usual tomatoes.

In recent years, a wireless sensor network (WSN) technique was widely applied in the
field of agriculture, which detects, senses, and collects information of various environments
or objectives in the network area, and at the same time sends and receives data through
wireless and self-organizing multi-hop routing links. Due to the complexity of the
agricultural environment and various factors like barriers, weather condition, structure,
materials, and the layout of facility agriculture that all affect the WSN communication
quality, wireless sensor networks adapt dissimilarly to agricultural environment. Therefore,
how to achieve the best networking to different agricultural environment conditions,
minimize the cost and energy consumption, and improve the performance of the network
transmission turn out to be the key issue in the studying of agricultural wireless sensor
networks. Aiming at the problems of previous agricultural wireless sensor networks, such as
high cost, high-energy consumption, and non-ideal transmission performance, this paper
designed, with chips of AT86RF212 and C8051F920 a new type of wireless sensor network
which works on a Chinese dedicated band of 780MHz and is compatible with the
IEEE802.15.4c standard for a greenhouse. This paper briefly described the structure of
wireless sensor network node, mainly introduced the hardware design of a 780MHz wireless
sensor network, and also tested and analyzed the received signal strength index (RSSI) and
the average packet loss rate (PLR) of the wireless sensor network node in 433 MHz, 780
MHz, and 2.4 GHz bands by changing the wireless communication distance in a typical
northern solar greenhouses working as the experimental environment. The experimental
results showed that RSSI of wireless transceiver modules in the three different bands
decreased with the increasing of the communication distance. The RSSI values of the three
wireless transceiver modules were similar to each other when the communication distance in
a greenhouse was less than 20m. When the distance reached 40-90m, the module in 780MHz
showed a slightly larger RSSI value than the 433MHz module while the .4GHz module had
the smallest RSSI. Within the 90m communication distance range in a greenhouse, packet

Page no:9
A Mobile Greenhouse Environment Monitoring System Based on the Internet of Things

loss rates (PLR) of both 780MHz and 433MHz modules were 0. For the 2.4GHz module,
packet loss took place at a distance of 80m and when it went to 90m, the maximal PLR was
5%. When the communication distance was 50-90m between greenhouses, the RSSI of the
780MHz and 433MHz modules were close. The RSSI value of the 780MHz module was
higher than that of the 433MHz module when the wireless communication distance exceeded
90m. For the 2.4GHz wireless module, the RSSI value was lower than both the 780MHzand
433MHz modules' when communication distance between greenhouses was 50-140m. Packet
loss occurred to the 433MHz module when the distance was over 100m, and when it went to
140 m, the maximal PLR was 11%. Packet loss took place to the 2.4GHz module if the
communication distance between greenhouses exceeded 70m, and when it was over 135m,
the PLR reached 100%. For the 780MHz band wireless module, packet loss took place when
the communication distance between greenhouses was over 125m, and when the distance was
140m, the maximal PLR was smaller than 6%, which allows the reliable wireless
transmission between greenhouses to proceed. Above all, the transmission characteristics of
the wireless sensor networks in the 433MHz and 780MHz bands were obviously better than
the WSN of a 2.4GHz band in the application of greenhouse environmental monitoring. The
780MHz band WSN was even superior as to transmission and communication quality
performance

In order to realize the high efficient monitoring of environment information, a kind of


common monitoring management system of the internet of things (IOT) for greenhouse was
introduced. The system mainly consisted of an intelligent gateway based on Android system
and a remote web server based on Google Web Toolkit. Also the monitoring data
synchronous communication protocol between the gateway and remote web server was
formulated. According to the data acquisition unit configuration information and the preset
display style of the interface, the monitoring interface was adaptively generated by the
gateway and server application program, the sensor data was dynamically parsed and the data
storage in database was realized. Using the http post transmission mechanism, the
applications of gateway and web server also realized the data synchronization of monitoring
sensor parameters data and data acquisition units configuration information transmitted on
the internet. The test results showed that the greenhouse IOT system and data synchronous
communication were of high stability in practical application, and it can effectively avoid
second software development which resulted from the changing of sensors or data acquisition
unit nodes. The system achieved the function of monitoring management and data

Page no:10
A Mobile Greenhouse Environment Monitoring System Based on the Internet of Things

synchronization for greenhouse IOT system, and it provides a common platform for
greenhouse intelligent monitoring and control.

CHAPTER-3

3.PROPOSED SYSTEM

3.1 BLOCK DIAGRAM

NODE 1

Page no:11
A Mobile Greenhouse Environment Monitoring System Based on the Internet of Things

ARDUINO

Fig :3.1 block diagram

NODE 2

ARDUIN
O

3.2 CIRCUIT DIAGRAM

Node 1

Page no:12
A Mobile Greenhouse Environment Monitoring System Based on the Internet of Things

Fig3.2: circuit diagram 1

Node 2

Page no:13
A Mobile Greenhouse Environment Monitoring System Based on the Internet of Things

Fig: 3.2.1 circuit diagram 2

3.3 WORKING OF MOBLIE CONTROLLED VECHILE

In the above project “A MOBILE GREENHOUSE ENVIRONMENT


MONITORING SYSTEM BASED ON THE INTERNET OF THINGS” we can use robot car
for moving in the environment we can control the car with the help of Bluetooth to move the
car from one place to another place. The motors of the car is connected to the arduino board
with Bluetooth module along with motors which are controlled by the Bluetooth app.

And the other arduino board is connected with WiFi module which is connected with
the hotspot and all the sensors which are used to measure the environment is connected to
that board and measure the environment with the help of sensors like DHT sensor is used to
measure the humidity and temperature. Gas sensor is used to measure the different types of
gases in environment. LDR sensor is used to measure the light intensity of the environment of

Page no:14
A Mobile Greenhouse Environment Monitoring System Based on the Internet of Things

the place where the car is located and ESP 32 CAM is used to live stream the location of the
environment where the vehicle is present.

The mobile greenhouse environment monitoring system proposed in this study is


based on an IoT architecture. Following the development of IoT technology, its architecture
is becoming increasingly standardized. Several authors have studied IoT architectures.
Compared with other environmental monitoring systems based on IoT architectures, the
system proposed in this study is characterized by its mobility, and the motion of the
equipment itself in the greenhouse needs to be well controlled. Therefore, it is necessary to
combine the motion control of the system and IoT technology. Compared with the automatic
control function of the perceptual layer in the three-layer architecture of IoT, the function of
motion control of the system is more abundant and independent. So, the motion control
function as the control layer is divided separately in this system architecture, which aims to
emphasize the control of the equipment itself and the environment.

The main function of the perceptual layer is to obtain the temperature, humidity,
illumination, carbon dioxide by realizing control of the lower computer, the control It also
controls the data acquisition mode and format, and converts and encapsulates some data at
the perceptual layer. The transmission layer completes the reliable transmission of data
between

Page no:15
A Mobile Greenhouse Environment Monitoring System Based on the Internet of Things

CHAPTER 4

4.SOFTWARE USED

4.1 ARDUINO IDE:

A program for Arduino hardware may be written in any programming language with


compilers that produce binary machine code for the target processor. Atmel provides a
development environment for their 8-bit AVR and 32-bit ARM Cortex-M based
microcontrollers: AVR Studio (older) and Atmel Studio (newer).

4.1.1 EMBEDDED C

Embedded C is a set of language extensions for the C Programming language by the C


Standards committee to address commonality issues that exist between C extensions for
different embedded systems. Historically, embedded C programming requires nonstandard
extensions to the C language in order to support exotic features such as fixed-point
arithmetic, multiple distinct memory banks, and basic I/O operations.In 2008, the C
Standards Committee extended the C language to address these issues by providing a
common standard for all implementations to adhere to. It includes a number of features not
available in normal C, such as, fixed-point arithmetic, named address spaces, and basic I/O
hardware addressing. Embedded C uses most of the syntax and semantics of standard C, e.g.,
main() function, variable definition, data type declaration, conditional statements (if, switch,
case), loops (while, for), functions, arrays and strings, structures and union, bit operations,
macros, etc.

4.1.2 ADVANTAGES

It is small and simpler to learn, understand, program and debug. Compared to assembly
language, C code written is more reliable and scalable, more portable between different
platforms’ compilers are available for almost all embedded devices in use today, and there is
a large pool of experienced C programmers. Unlike assembly, C has advantage of processor-
independence and is not specific to any particular microprocessor/microcontroller or any
system. This makes it convenient for a user to develop programs that can run on most of the
systems. As C combines functionality of assembly language and features of high level
languages,C is treated as a ‘middle-level computer language or high level assembly language.

Page no:16
A Mobile Greenhouse Environment Monitoring System Based on the Internet of Things

It is fairly efficient. It supports access to I/O and provides ease of management of large
embedded projects. Java is also used in many embedded systems but Java programs require
the Java Virtual Machine (JVM), which consumes a lot of resources. Hence it is not used for
smaller embedded devices. In Embedded applications there is a need to read/write data on a
given address, and in C it is easy to access and modify addresses, because of the pointers
which are a language feature.

ASSEMBLY VS C:

 The assembly code is difficult to read and maintain.

 The amount of code reusable from assembly code is very low.

 C programs are easy to read, understand, maintain, because it possesses greater


structure.

 With C the programmer need not know the architecture of the processor.

 Code developed in C will be more portable to other systems rather than in assembly.

4.1.3 DIFFERENCE BETWEEN CONVENTIONAL C AND EMBEDDED C:

 Compliers for conventional C are TC, BC.

 Compilers for Embedded C are keil µvision - 2 & 3, PIC C etc.

 Conventional C programs needs complier to compile the program &run it.

 The embedded C program needs a cross compiler to compile & generate HEX code.

 The programs in C are basically processor dependent whereas Embedded C programs


are micro controller dependent.

 The C program is used for developing an application and not suitable for embedded
systems.

 The embedded C is an extension of the conventional C. i.e Embedded C has all the
features of normal C, but has some extra added features which are not available in C.

Page no:17
A Mobile Greenhouse Environment Monitoring System Based on the Internet of Things

 Many functions in C do not support Reentrant concept of functions.

 C is not memory specific. i.e. Variables cannot be put in the desired memory location
but the location of variable can be found out.

 In embedded C this can be done using specific inbuilt instructions.

 C depends on particular processor or application.

 Embedded C is Controller or target specific.

 Embedded C allows direct communication with memory.

4.1.4 WHY C FOR MICRO CONTROLLERS:

 Compatibility

 Direct access to hardware address

 Direct connection to interrupts

 Optimization consideration

 Development environment

 Reentrancy

4.1.5 IDE

The Arduino integrated development environment (IDE) is a cross-


platform application (for Windows, macOS, Linux) that is written in the programming
language Java. It originated from the IDE for the languages Processing and Wiring. It
includes a code editor with features such as text cutting and pasting, searching and replacing
text, automatic indenting, brace matching, and syntax highlighting, and provides simple one-
click mechanisms to compile and upload programs to an Arduino board. It also contains a
message area, a text console, a toolbar with buttons for common functions and a hierarchy of
operation menus. The source code for the IDE is released under the GNU General Public
License, version 2

Page no:18
A Mobile Greenhouse Environment Monitoring System Based on the Internet of Things

The Arduino IDE supports the languages C and C++ using special rules of code


structuring. The Arduino IDE supplies a software library from the Wiring project, which
provides many common input and output procedures. User-written code only requires two
basic functions, for starting the sketch and the main program loop, that are compiled and
linked with a program stub main() into an executable cyclic executive program with the GNU
toolchain, also included with the IDE distribution. The Arduino IDE employs the
program avrdude to convert the executable code into a text file in hexadecimal encoding that
is loaded into the Arduino board by a loader program in the board's firmware.

Fig 4.1Arduino IDE software

After installing Arduino IDE Software, verify your code whether compiling successfully.

4.1.6 CODE

Code 1

String readString;
#include<AFMotor.h>
AF_DCMotor aft_motor(1);
AF_DCMotor second_motor(2);

Page no:19
A Mobile Greenhouse Environment Monitoring System Based on the Internet of Things

AF_DCMotor m1(3);
AF_DCMotor m2(4);
void setup() {
aft_motor.setSpeed(255);
second_motor.setSpeed(255);
m1.setSpeed(255);
m2.setSpeed(255);
Serial.begin(9600);
}

void loop() {
  // put your main code here, to run repeatedly:
 while(Serial.available()>0){
 char ch=Serial.read();
 delay(50);
 readString+=ch;
 }
 if(readString.length()>0){
  //Serial.println(readString);
  if(readString=="FORWARD"){
    aft_motor.run(FORWARD);
    second_motor.run(FORWARD);
    m1.run(FORWARD);
    m2.run(FORWARD);
  
  
 }
  if(readString=="BACKWARD"){
    aft_motor.run(BACKWARD);
    second_motor.run(BACKWARD);
    m1.run(BACKWARD);
    m2.run(BACKWARD);
 }
  if(readString=="RIGHT"){
    second_motor.run(FORWARD);
    m1.run(FORWARD);
    aft_motor.run(BACKWARD);
    m2.run(BACKWARD);
  
  
 }
  if(readString=="LEFT"){
    m2.run(FORWARD);
    aft_motor.run(FORWARD);

Page no:20
A Mobile Greenhouse Environment Monitoring System Based on the Internet of Things

    m1.run(BACKWARD);
    second_motor.run(BACKWARD);
 }
  if(readString=="STOP"){
   aft_motor.run(RELEASE);
   second_motor.run(RELEASE);
   m1.run(RELEASE);
   m2.run(RELEASE);
 }
 
 
}
readString="";
}

Fig: 4.1.1 code compiled in Arduino IDE software

Code 2:

#define BLYNK_PRINT Serial

Page no:21
A Mobile Greenhouse Environment Monitoring System Based on the Internet of Things

#include <ESP8266_Lib.h>

#include <BlynkSimpleShieldEsp8266.h>

#include <DHT.h>

#include<LiquidCrystal_I2C.h>

LiquidCrystal_I2C lcd(0x3f,16,2);

// You should get Auth Token in the Blynk App.

// Go to the Project Settings (nut icon).

char auth[] = "";

#include <Wire.h>

#include "Adafruit_VEML6075.h"

// Your WiFi credentials.

// Set password to "" for open networks.

char ssid[] = "xplore";

char pass[] = "1234567890";

Adafruit_VEML6075 uv = Adafruit_VEML6075();

// Hardware Serial on Mega, Leonardo, Micro...

#define EspSerial Serial

// or Software Serial on Uno, Nano...

//#include <SoftwareSerial.h>

//SoftwareSerial EspSerial(2, 3); // RX, TX

// Your ESP8266 baud rate:

#define ESP8266_BAUD 38400

ESP8266 wifi(&EspSerial);

Page no:22
A Mobile Greenhouse Environment Monitoring System Based on the Internet of Things

#define DHTPIN 2 // What digital pin we're connected to

// Uncomment whatever type you're using!

#define DHTTYPE DHT11 // DHT 11

//#define DHTTYPE DHT22 // DHT 22, AM2302, AM2321

//#define DHTTYPE DHT21 // DHT 21, AM2301

DHT dht(DHTPIN, DHTTYPE);

BlynkTimer timer;

// This function sends Arduino's up time every second to Virtual Pin (5).

// In the app, Widget's reading frequency should be set to PUSH. This means

// that you define how often to send data to Blynk App.

void sendSensor()

float h = dht.readHumidity();

float t = dht.readTemperature(); // or dht.readTemperature(true) for Fahrenheit

if (isnan(h) || isnan(t)) {

Serial.println("Failed to read from DHT sensor!");

return;

// You can send any value at any time.

// Please don't send more that 10 values per second.

Blynk.virtualWrite(V5, h);

Blynk.virtualWrite(V6, t);

Page no:23
A Mobile Greenhouse Environment Monitoring System Based on the Internet of Things

int x= analogRead(A0);

Blynk.virtualWrite(V1,x);

lcd.setCursor(0,0);

lcd.print("temp=");

lcd.print(t);

lcd.setCursor(0,1);

lcd.print("humidity=");

lcd.print(h);

delay(1000);

lcd.clear();

lcd.print("soil moisture=");

lcd.print(x);

lcd.setCursor(0,1);

float y = uv.readUVI();

lcd.print("uv=");

lcd.print(y);

delay(1000);

lcd.clear();

void setup()

// Debug console

Serial.begin(9600);

// Set ESP8266 baud rate

EspSerial.begin(ESP8266_BAUD);

Page no:24
A Mobile Greenhouse Environment Monitoring System Based on the Internet of Things

delay(10);

Blynk.begin(auth, wifi, ssid, pass);

// You can also specify server:

//Blynk.begin(auth, wifi, ssid, pass, "blynk-cloud.com", 80);

//Blynk.begin(auth, wifi, ssid, pass, IPAddress(192,168,1,100), 8080);

dht.begin();

lcd.init();

lcd.backlight();

// Setup a function to be called every second

timer.setInterval(1000L, sendSensor);

void loop()

Blynk.run();

timer.run();

Page no:25
A Mobile Greenhouse Environment Monitoring System Based on the Internet of Things

Fig : 4.1.2code compiled in Arduino IDE software

After compiling code successfully , code is ready to upload.

CONTROL THROUGH MOBILE

.2 BLYNK

This guide will help you understand how to get started using Blynk and give a comprehensive
overview of all the features.

If you want to jump straight into playing with Blynk, check out Getting Started. 

GETTING STARTED

How Blynk Works

Page no:26
A Mobile Greenhouse Environment Monitoring System Based on the Internet of Things

Blynk was designed for the Internet of Things. It can control hardware remotely, it can
display sensor data, it can store data, vizualize it and do many other cool things.

There are three major components in the platform:

Blynk App - allows to you create amazing interfaces for your projects using various widgets
system provide.

Blynk Server - responsible for all the communications between the smartphone and hardware.
You can use our Blynk Cloud or run your private Blynk server locally. It’s open-source,
could easily handle thousands of devices and can even be launched on a Arduino.

Server and process all the incoming and out coming commands.

Now imagine: every time you press a Button in the Blynk app, the message travels to space
the Blynk Cloud, where it magically finds its way to your hardware. It works the same in the
opposite direction and everything happens in a blynk of an eye.

Blynk Libraries - for all the popular hardware platforms - enable communication

Fig 4.2 Blynk slide

Page no:27
A Mobile Greenhouse Environment Monitoring System Based on the Internet of Things

FEATURES OF BLYNK:

Similar API & UI for all supported hardware & devices

Connection to the cloud using:

WiFi

Bluetooth and BLE

Ethernet

USB (Serial)

GSM

Set of easy-to-use Widgets

Direct pin manipulation with no code writing

Easy to integrate and add new functionality using virtual pins

History data monitoring via History Graph widget

Device-to-Device communication using Bridge Widget

Sending emails, tweets, push notifications, etc.

new features are constantly added!

You can find example sketchescovering basic Blynk Features. They are included in the
library. All the sketches are designed to be easily combined with each other.

GETTING STARTED WITH THE BLYNK APP

CREATE A BLYNK ACCOUNT

After you download the Blynk App, you’ll need to create a New Blynk account. This account
is separate from the accounts used for the Blynk Forums, in case you already have one.

1.Need to create an account

Page no:28
A Mobile Greenhouse Environment Monitoring System Based on the Internet of Things

An account is needed to save your projects and have access to them from multiple devices
from anywhere. It’s also a security measure.

You can always set up your own Private Blynk Server and have full control.

2. Create a New Project

After successfully logged into your account,

start by creating a new project.

Fig 4.2.1: blynk app in mobile

CHAPTER 5

5.HARDWARE TOOLS

Page no:29
A Mobile Greenhouse Environment Monitoring System Based on the Internet of Things

5.1ARDUINO UNO:

Fig 5.1: ARDUINO UNO

Power (USB / Barrel Jack)

Every Arduino board needs a way to be connected to a power source. The Arduino UNO can
be powered from a USB cable coming from your computer or a wall power supply (like this)
that is terminated in a barrel jack. In the picture above the USB connection is labeled (1) and
the barrel jack is labeled (2).

The USB connection is also how you will load code onto your Arduino board. More on how
to program with Arduino can be found in our Installing and Programming Arduino tutorial.

NOTE: Do NOT use a power supply greater than 20 Volts as you will overpower (and
thereby destroy) yourArduino. The recommended voltage for most Arduino models is
between 6 and 12 Volts.

Pins (5V, 3.3V, GND, Analog, Digital, PWM, AREF)

The pins on your Arduino are the places where you connect wires to construct a circuit
(probably in conjuction with a breadboard and some wire. They usually have black plastic

Page no:30
A Mobile Greenhouse Environment Monitoring System Based on the Internet of Things

‘headers’ that allow you to just plug a wire right into the board. The Arduino has several
different kinds of pins, each of which is labeled on the board and used for different functions.

 GND (3): Short for ‘Ground’. There are several GND pins on the Arduino, any of
which can be used to ground your circuit.

 5V (4) & 3.3V (5): As you might guess, the 5V pin supplies 5 volts of power, and the
3.3V pin supplies 3.3 volts of power. Most of the simple components used with the
Arduino run happily off of 5 or 3.3 volts.

 Analog (6): The area of pins under the ‘Analog In’ label (A0 through A5 on the
UNO) areAnalog In pins. These pins can read the signal from an analog sensor (like
a temperature sensor) and convert it into a digital value that we can read.

 Digital (7): Across from the analog pins are the digital pins (0 through 13 on the
UNO). These pins can be used for both digital input (like telling if a button is pushed)
and digital output (like powering an LED).

 PWM (8): You may have noticed the tilde (~) next to some of the digital pins (3, 5, 6,
9, 10, and 11 on the UNO). These pins act as normal digital pins, but can also be used
for something called Pulse-Width Modulation (PWM). We have a tutorial on PWM,
but for now, think of these pins as being able to simulate analog output (like fading an
LED in and out).

 AREF (9): Stands for Analog Reference. Most of the time you can leave this pin
alone. It is sometimes used to set an external reference voltage (between 0 and 5
Volts) as the upper limit for the analog input pins.

RESET BUTTON

Just like the original Nintendo, the Arduino has a reset button (10). Pushing it will
temporarily connect the reset pin to ground and restart any code that is loaded on the
Arduino. This can be very useful if your code doesn’t repeat, but you want to test it multiple
times. Unlike the original Nintendo however, blowing on the Arduino doesn’t usually fix any
problems.

Power LED Indicator

Page no:31
A Mobile Greenhouse Environment Monitoring System Based on the Internet of Things

Just beneath and to the right of the word “UNO” on your circuit board, there’s a tiny LED
next to the word ‘ON’ (11). This LED should light up whenever you plug your Arduino into a
power source. If this light doesn’t turn on, there’s a good chance something is wrong. Time to
re-check your circuit!

TX RX LEDs

TX is short for transmit, RX is short for receive. These markings appear quite a bit in
electronics to indicate the pins responsible for serial communication. In our case, there are
two places on the Arduino UNO where TX and RX appear – once by digital pins 0 and 1, and
a second time next to the TX and RX indicator LEDs . These LEDs will give us some nice
visual indications whenever our Arduino is receiving or transmitting data (like when we’re
loading a new program onto the board).

WI-FI MODULE:

ESP-01 WiFi module is developed by Ai-thinker Team. core processor ESP8266 in smaller
sizes of the module encapsulates Ten silica L106 integrates industry-leading ultra low power
32-bit MCU micro, with the 16-bit short mode, Clock speed support 80 MHz, 160 MHz,
supports the RTOS, integrated Wi-Fi MAC/BB/RF/PA/LLNA, on-board antenna. The
module supports standard IEEE802.11 b/g/n agreement, complete TCP/IP protocol stack.
Users can use the add modules to an existing device networking, or building a separate
network controller.ESP8266 is high integration wireless SOCs, designed for space and power
constrained mobile platform designers. It provides unsurpassed ability to embed Wi-Fi
capabilities within other systems, or to function as a standalone application, with the lowest
cost, and minimal space requirement.

Page no:32
A Mobile Greenhouse Environment Monitoring System Based on the Internet of Things

Fig 5.1.1: wi-fi module diagram

ESP8266EX Block Diagram

ESP8266EX offers a complete and self-contained Wi-Fi networking solution; it can be used
to host the application or to offload Wi-Fi networking functions from another application
processor When ESP8266EX hosts the application, it boots up directly from an external flash.
In has integrated cache to improve the performance of the system in such applications.
Alternately, serving as a Wi-Fi adapter, wireless internet access can be added to any micro
controllerbased design with simple connectivity (SPI/SDIO or I2C/UART interface).

ESP8266EX also integrates an enhanced version of Tensilica’s L106 Diamond series 32-bit
processor, with on-chip SRAM, besides the Wi-Fi functionalities. ESP8266EX is often
integrated with external sensors annd other application specific devices through its GPIOs;
codes for such applications are provided in examples in the SDK.

Espressif Systems’ Smart Connectivitty Platform (ESCP) demonstrates sophisticated system-


level features include fast sleep/wake context switching for energy-efficient VoIP, adaptive
radio biasing. for low-power operation, advance signal processing, and spur cancellation and
radio co-existence features for common cellular, Bluetooth, DDR, LVDS, LCD interference
mitigation.

Features

• 802.11 b/g/n

• Integrated low power 32-bit MCU

• Integrated 10-bit ADC

• Integrated TCP/IP protocol stack

• Integrated TR switch, balun, LNA, power amplifier and matching network

• Integrated PLL, regulators, and power management units

• Supports antenna diversity

• Wi-Fi 2.4 GHz, support WPA/WPA2

Page no:33
A Mobile Greenhouse Environment Monitoring System Based on the Internet of Things

• Support STA/AP/STA+AP operation modes

• Support Smart Link Function for both Android and iOS devices

• Support Smart Link Function for both Android and iOS devices

• SDIO 2.0, (H) SPI, UART, I2C, I2S, IRDA, PWM, GPIO

• STBC, 1x1 MIMO, 2x1 MIMO

• A-MPDU & A-MSDU aggregation and 0.4s guard interval

• Deep sleep power <10uA, Power down leakage current < 5Ua

• Wake up and transmit packets in < 2ms

• Standby power consumption of < 1.0mW (DTIM3)

• +20dBm output power in 802.11b mode

• Operating temperature range -40C ~ 125C

Pin out Diagram:

Fig 5.1.2: Wi-Fi module pin description

5.2 LDR SENSOR:

Page no:34
A Mobile Greenhouse Environment Monitoring System Based on the Internet of Things

Fig 5.2:LDR module

The Digital LDR Module is used to detect the presence of light / measuring the intensity of
light. The output of the module goes high in the presence of light and it becomes low in the
absence of light. The sensitivity of the signal detection can be adjusted using the
potentiometer.You can adjust the threshold (sensitivity) of digital output by tuning the
onboard variable resistor (potentiometer). Simple usage as it is the digital output, so you will
know is the light present and decide what to do with it.Comes with an M3 mounting hole for
ease of attaching it to an object. On board, it provides an LDR, high sensitivity and
commonly being used for light detection. The module comes with power LED and status
LED as an indicator. LDR Module Photosensitive resistor module most sensitive to
environmental light intensity is generally used to detect the ambient brightness and light
intensity.

How it works

1.  Module light conditions or light intensity reach the set threshold, DO port output high
when the external ambient light intensity exceeds a set threshold, the module D0 output low;
2. Digital output D0 directly connected to the MCU, and detect high or low TTL, thereby
detecting ambient light intensity changes;
3. Digital output module DO  can directly drive the relay module, which can be composed of
a photoelectric switch;
4. Analog output module AO and AD modules can be connected through the AD converter,
you can get a more accurate light intensity value 

Page no:35
A Mobile Greenhouse Environment Monitoring System Based on the Internet of Things

Pin details

VCC ↔ 3.3V to 5V DC
GND ↔ Ground
DO ↔ Digital Output
AO ↔ Analog Output 

Features:

 LM393 based design

 Can detect ambient brightness and light intensity

 Adjustable sensitivity (via blue digital potentiometer adjustment)

 Output Digital – 0V to 5V, Adjustable trigger level from preset

 Output Analog – 0V to 5V based on light falling on the LDR

 LEDs indicating output and power.

5.3 MQ135 SENSOR:

Fig 5.3: MQ 135

The MQ 135 Air Quality Detector Sensor Module For Arduino has lower conductivity in
clean air. When the target combustible gas exists, the conductivity of the sensor is higher
along with the gas concentration rising.

Page no:36
A Mobile Greenhouse Environment Monitoring System Based on the Internet of Things

Convert change of conductivity to the corresponding output signal of gas concentration. The
MQ135 gas sensor has high sensitivity to Ammonia, Sulphide and Benzene steam, also
sensitive to smoke and other harmful gases.

It is with low cost and suitable for different applications such as harmful gases/smoke
detection.

Features :

1. Sensitivity to Ammonia, Sulphide and Benzene steam

2. With signal output instructions

3. The TTL output signal is low level

4. Analog 0 ~ 5 v voltage output, the higher the concentration, the higher the voltage

5. Color is showing pictures.

6. Sensitive for benzene, alcohol, smoke

7. Fast response and recovery

8. Adjustable sensitivity

9. Signal output indicator

Output voltage boosts along with the concentration of the measured gases increases.

5.4 DHT SENSOR

DHT11 calculates relative humidity by measuring the electrical resistance between


two electrodes. The humidity sensing component of the DHT11 is a moisture holding
substrate with the electrodes applied to the surface.

Page no:37
A Mobile Greenhouse Environment Monitoring System Based on the Internet of Things

Fig 5.4: DHT sensor

The change in resistance between the two electrodes is proportional to the relative humidity.
It is a low-cost digital sensor for sensing temperature and humidity. This sensor can be easily
interfaced with any micro-controller such as Arduino, Arduino etc… to measure humidity
and temperature instantaneously. DHT11 humidity and temperature sensor is available as
a sensor and as a module. Search one of the libraries for the DHT11 and install its latest
version. You can then import this library by navigating to Sketch-> Include Library. After
importing a library, its functions can be used to read sensor data from the DHT11.

 DHT11 sensor includes a resistive-type humidity measurement component, an NTC


temperature measurement component and a high-performance 8-bit microcontroller inside,
and provides calibrated digital signal output.

DHT11 Specifications:

 Operating Voltage: 3.5V to 5.5V.


 Operating current: 0.3mA (measuring) 60uA (standby)
 Output: Serial data.
 Temperature Range: 0°C to 50°C.
 Humidity Range: 20% to 90%
 Resolution: Temperature and Humidity both are 16-bit.
 Accuracy: ±1°C and ±1%

Page no:38
A Mobile Greenhouse Environment Monitoring System Based on the Internet of Things

Grab a voltmeter and check the voltage on the POWER pin of the DHT11 sensor - as far as I


remember it should work either from 3.3V or from 5V. For sure it is not a problem of the
library.

5.5 ESP 32 CAM:

The ESP32-CAM is a small size, low power consumption camera module based on
ESP32. It comes with an OV2640 camera and provides onboard TF card slot. The ESP32-
CAM can be widely used in intelligent IoT applications such as wireless video monitoring,
WiFi image upload, QR identification, and so on.

Fig: 5.5 ESP32-cam

It is a low cost development board with WiFi camera. It allows creating IP camera projects
for video streaming with different resolutions. ESP32-CAM has build in PCB antenna. ... FL
connector ESP module - an external antenna can be connected. It can be widely used in
various IoT applications. It is suitable for home smart devices, industrial wireless control,
wireless monitoring, QR wireless identification, wireless positioning system signals and other
IoT applications. It is an ideal solution for IoT applications.

Features

- The smallest 802.11b/g/n Wi-Fi BT SoC Module

Page no:39
A Mobile Greenhouse Environment Monitoring System Based on the Internet of Things

- Low power 32-bit CPU, can also serve the application processor

- Up to 160MHz clock speed,Summary computing power up to 600 DMIPS

- Built-in 520 KB SRAM, external 4MPSRAM

- Supports UART/SPI/I2C/PWM/ADC/DAC

- Support OV2640 and OV7670 cameras,Built-in Flash lamp.

- Support image WiFI upload

- Support TF card

- Supports multiple sleep modes.

- Embedded Lwip and FreeRTOS

- Supports STA/AP/STA+AP operation mode

- Support Smart Config/AirKiss technology

- Support for serial port local and remote firmware upgrades (FOTA)

5.6 DC MOTORS

Page no:40
A Mobile Greenhouse Environment Monitoring System Based on the Internet of Things

FIG:5.6 DC Motor

These motors are simple DC Motors featuring gears for the shaft for obtaining the
optimal performance characteristics. They are known as Center Shaft DC Geared Motors
because their shaft extends through the center of their gear box assembly.

These standard size DC Motors are very easy to use. Also, you don’t have to spend a lot of
money to control motors with an Arduino or compatible board. TheL298N H-bridge module
with onboard voltage regulator motor driver can be used with this motor that has a voltage of
between 5 and 35V DC.

This DC Motor – 60RPM – 12Volts can be used in all-terrain robots and a variety of robotic
applications. These motors have a 3 mm threaded drill hole in the middle of the shaft thus
making it simple to connect it to the wheels or any other mechanical assembly. Nut and
threads on the shaft to easily connect and internally threaded shaft for easily connecting it to
the wheels.

These DC Geared motors with robust metal/Plastic gearbox for heavy-duty applications,
available in the wide RPM range(Check the list below) and ideally suited for robotics and
industrial applications.

5.7 BLUETOOTH MODULE

HC-05 Bluetooth Module is an easy to use Bluetooth SPP (Serial Port


Protocol) module, designed for transparent wireless serial connection setup. Its
communication is via serial communication which makes an easy way to interface with
controller or PC. To communicate smart phone with HC-05 Bluetooth module, smart phone
requires Bluetooth terminal application for transmitting and receiving data. You can
find Bluetooth terminal applications for android and windows in respective app.
The  technology manages the communication channel of the wireless part. The Bluetooth
modules can transmit and receives the data wirelessly by using two devices. The  module can

Page no:41
A Mobile Greenhouse Environment Monitoring System Based on the Internet of Things

receive and transmits the data from a host system with the help of the host controller interface
(HCI).

FIG 5.7:Bluetooth module

Usually, it is used to connect small devices like mobile phones using a short-range wireless
connection to exchange files. It uses the 2.45GHz frequency band. The transfer rate of the
data can vary up to 1Mbps and is in range of 10 meters. The HC-05 module can be operated
within 4-6V of power supply.

5.8 JUMPER WIRES

Page no:42
A Mobile Greenhouse Environment Monitoring System Based on the Internet of Things

Fig:5.8 jumper wire

Jumper wires are used to connect the sensors and boards which are used to connect
the one sensor to another to transfer electricity to the sensors and board. A jump wire (also
known as jumper, jumper wire, jumper cable, DuPont wire or cable) is an electrical wire, or
group of them in a cable, with a connector or pin at each end (or sometimes without them –
simply "tinned"), which is normally used to interconnect the components of a breadboard or
other prototype or test 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.

5.9 BATTERY

If the battery cannot reach higher than 10.5 volts when being charged, then the battery
has a dead cell. If the battery is fully charged (according to the battery charger) but the
voltage is 12.5 or less, the battery is sulfated. If your battery cannot even reach a full charge,
consider it bad. There is no exact answer to the question. In the standard state, a fully charged
battery should show a 12.6-12.7V. ... In this case, the voltage is difficult to estimate, but it
also slightly falls down, and if it is less than 11.5V, then it indicates that the battery is
discharged by 50%.

Page no:43
A Mobile Greenhouse Environment Monitoring System Based on the Internet of Things

Fig:5.9 Battery

in this project we are using 12 volts dc battery to connect to the board and the motors
which are using in the kit. We are using 4 dc motors to the battery

5.10 MICROCONTROLLER

Atmega328 is an Atmel microcontroller, which is used in Arduino UNO board. Here's its
image: Here are few of its features: Atmega328 has 28 pins in total. It has 3 Ports in total
which are named as Port B, Port C and Port D

Actually Arduino UNO is a Single Micro-controller board. And the name of this Micro
Controller is ATmega328p which is a product of ATmel. 32 - represents it's flash memory
capacity that is 32KB. 8 - represents it's cpu type that is of 8 bit. p - simply denotes that it
needs less power to work than it earlier version.

The Arduino Uno is a microcontroller board based on the ATmega328 (datasheet). It has 14
digital input/output pins (of which 6 can be used as PWM outputs), 6 analog inputs, a 16
MHz ceramic resonator, a USB connection, a power jack, an ICSP header, and a reset button.

Page no:44
A Mobile Greenhouse Environment Monitoring System Based on the Internet of Things

Fig 5.10: Microcontroller

FEATURES

These features consist of advanced RISC architecture,

 Good performance,
 Low power consumption,
 Real timer counter having separate oscillator,
 6 PWM pins,
 Programmable Serial USART,
 Programming lock for software security,
 Throughput up to 20 MIPS etc.

Page no:45
A Mobile Greenhouse Environment Monitoring System Based on the Internet of Things

4.1 PIN DIAGRAM

Fig 5.10.1Pin diagram of micro controller

The Atmega328 is a very popular microcontroller chip produced by Atmel. It is an 8-bit


microcontroller that has 32K of flash memory, 1K of EEPROM, and 2K of internal SRAM.
The Atmega328 is one of the microcontroller chips that are used with the popular Arduino
Duemilanove boards.

ATMEGA328P is high performance, low power controller from Microchip.


ATMEGA328P is an 8-bit microcontroller based on AVR RISC architecture. It is the most
popular of all AVR controllers as it is used in ARDUINO boards. It is an 8-bit and 28 Pins
AVR Microcontroller, manufactured by Microchip, follows RISC Architecure and has a flash
type program memory of 32KB. It has an EEPROM memory of 1KB and its SRAM memory
is of 2KB. It also has 3 builtin Timers, two of them are 8 Bit timers while the third one is 16-
Bit Timer.

The ATmega328/P is a low-power CMOS 8-bit microcontroller based on the AVR®


enhanced RISC (reduced instruction set computer) architecture. In Order to maximize

Page no:46
A Mobile Greenhouse Environment Monitoring System Based on the Internet of Things

performance and parallelism, the AVR uses Harvard architecture – with separate memories
and buses for program and data

1: Atmega328P and Atmega328 are the same every sense architecturally.

2: Atmega328P just consumes lower power than Atmega328.

Look up the numbers in the datasheet. This means that the 328P is manufactured in a finer
process than the 328Actually Arduino UNO is a Single Micro-controller board. And the name
of this Micro Controller is ATmega328p which is a product of ATmel. 32 - represents it's
flash memory capacity that is 32KB. 8 - represents it's cpu type that is of 8 bit. p - simply
denotes that it needs less power to work than it earlier version.

4.2 TYPES OF MEMORY

The ATmega328P has three types of memory hardware:

 32 KB of In-System Programmable (ISP) Flash program memory.


 2 KB of SRAM (Static Random-Access Memory)
 1 KB of EEPROM (Electrically Erasable Programmable Read-Only Memory)

ISP MEMORY

In-system programming (ISP), also called in-circuit serial programming (ICSP), is the ability
of some programmable logic devices, microcontrollers, and other embedded devices to be
programmed while installed in a complete system, rather than requiring the chip to be
programmed prior to installing it into the system.

SRAM

SRAM (static RAM) is random access memory (RAM) that retains data bits in its memory as
long as power is being supplied. Unlike dynamic RAM (DRAM), which stores bits in cells
consisting of a capacitor and a transistor, SRAM does not have to be periodically refreshed.

EEPROM

EEPROM (electrically erasable programmable read-only memory) is user-modifiable read-


only memory (ROM) that can be erased and reprogrammed (written to) repeatedly through

Page no:47
A Mobile Greenhouse Environment Monitoring System Based on the Internet of Things

the application of higher than normal electrical voltage. Unlike EPROM chips, EEPROMs do
not need to be removed from the computer to be modified.

POWER SUPPLY

The input to the circuit is applied from the regulated power supply. The a.c. input i.e.,
230V from the mains supply is step down by the transformer to 12V and is fed to a rectifier.
The output obtained from the rectifier is a pulsating d.c voltage. So in order to get a pure d.c
voltage, the output voltage from the rectifier is fed to a filter to remove any a.c components
present even after rectification. Now, this voltage is given to a voltage regulator to obtain a
pure constant dc voltage.

Transformer:

Usually, DC voltages are required to operate various electronic equipment and these
voltages are 5V, 9V or 12V. But these voltages cannot be obtained directly. Thus the a.c
input available at the mains supply i.e., 230V is to be brought down to the required voltage
level. This is done by a transformer. Thus, a step down transformer is employed to decrease
the voltage to a required level.

Rectifier:

The output from the transformer is fed to the rectifier. It converts A.C. into pulsating
D.C. The rectifier may be a half wave or a full wave rectifier. In this project, a bridge rectifier
is used because of its merits like good stability and full wave rectification.

Filter:

Capacitive filter is used in this project. It removes the ripples from the output of
rectifier and smoothens the D.C. Output received from this filter is constant until the mains
voltage and load is maintained constant. However, if either of the two is varied, D.C. voltage
received at this point changes. Therefore a regulator is applied at the output stage.

Voltage regulator:

As the name itself implies, it regulates the input applied to it. A voltage regulator is an
electrical regulator designed to automatically maintain a constant voltage level. In this
project, power supply of 5V and 12V are required. In order to obtain these voltage levels,

Page no:48
A Mobile Greenhouse Environment Monitoring System Based on the Internet of Things

7805 and 7812 voltage regulators are to be used. The first number 78 represents positive
supply and the numbers 05, 12 represent the required output voltage levels.

Fig 5.10.2: Power supply circuit diagram

The raw data measured form each sensor then sent to Waspmote PRO through digital
pin number 3. Inside the Waspmote PRO, a program code was first installed. This program
was intended to save the data into a microSD card. Furthermore, another program code was
uploaded to the board that had function to send data to cloud system using 3G connectivity.
The transmission of data was done utilizing SIM 5218E module. In this step, the data was
forwarded to a web server that executes Apache service and MySQL using POST method.
The data sent from Waspmote PRO was not only information containing those 4 parameters
of dust particle density, humidity, noise level and light intensity but also contained additional
information such as temperature and battery capacity. Based on information gained from the
sensors, we built a web based notification system that provides warning when the pollution
level was above accepted level. This system was built with PHP programming language.

Page no:49
A Mobile Greenhouse Environment Monitoring System Based on the Internet of Things

CHAPTER 6

6.ADVANTAGES & APPLICATIONS

6.1 ADVANTAGES

• Automation of greenhouses / biotech parks.


• Can be used domestically.
• Easy to use, install and troubleshoot.
• Useful for small scale farmers.

6.2 APPLICATIONS

• Agriculture farming.

• For industrial maintainance.

• Weather protection.

• Conservation of water.

Page no:50
A Mobile Greenhouse Environment Monitoring System Based on the Internet of Things

CHAPTER 7

RESULTS

In this chapter, we can view the images of mobile greenhouse


environment monitoring system based on the internet of things and results.

fig : 7.1 The mobile greenhouse environment monitoring system based on the internet of
things

Page no:51
A Mobile Greenhouse Environment Monitoring System Based on the Internet of Things

Fig:7.2 Side view of a mobile greenhouse environment monitoring system

Fig :7.3 Temperatures,humidity,co2,LDR values using Blynk app in mobile

Page no:52
A Mobile Greenhouse Environment Monitoring System Based on the Internet of Things

Fig: 7.4 Bluetooth based vehicle controls in mobile

Temperarture
80

70

60

50

40

30

20

10

0
0:00 9:30 0:00 10:30 11:00 11:30 12:00 12:30

Fig: 7.5 Temperature varying at different time period

Page no:53
A Mobile Greenhouse Environment Monitoring System Based on the Internet of Things

Humidity
80
70
60
50
40
30
20
10
0
0:00 9:30 0:00 10:30 11:00 11:30 12:00 12:30
TIME PERIOD

Fig:7.6 Humidity varying at different time period

90
80
ILLUMINATION
70
60
50
40
30
20
10
0
0:00 9:30 0:00 10:30 11:00 11:30 12:00 12:30
TIME PERIoD

Fig: 7.7Illumination varying at different time period

Page no:54
A Mobile Greenhouse Environment Monitoring System Based on the Internet of Things

C02 LEVELS
300

250

200

150

100

50

0
0:00 9:30 0:00 10:30 11:00 11:30 12:00 12:30
TIME P{ERIOD

Fig : 7.8 Co2 varying at different time period

CHAPTER 8

8.CONCLUSION & FUTURE SCOPE

8.1 CONCLUSION

A mobile greenhouse environment monitoring system based on the IoT architecture is


proposed. Arduino chip are combined for the first time in agriculture greenhouse
environmental monitoring, with the former serving as the data server and the latter as the
master chip for the mobile system. The mobile system, shortening the physical distance
between the data acquisition end and the data processing end, to reduce the cost of data
collecting and improve the real-time response to surrounding information and the reliability
of data transmission. The system can operate in three modes to realize the automatic

Page no:55
A Mobile Greenhouse Environment Monitoring System Based on the Internet of Things

collection of multipoint greenhouse environmental information and the capture of pictures of


crops with low cost.

The experimental results show that the system can accurately acquire data based on a
set time interval, and that the position of the acquisition point can be accurately determined.
This study can not only provide important basic data for intelligent monitoring of greenhouse
crops and alarms for abnormalities found in the greenhouse environment, but also can offer a
reference for the effective monitoring of other agricultural environments.

8.2 FUTURE SCOPE

Deep learning technologies will be used to establish a chrysanthemum growing period


assessment model in order to achieve intelligent monitoring of crops. Modeling analysis will
be conducted on the changes in greenhouse temperature, humidity and illumination, and the
predicted and absolute values of maximum deviation will be combined to achieve monitoring
and alarms for abnormalities found in the greenhouse environment with a dynamic threshold.

REFERENCES

[1] Y. Ren, X. Chen, J. Jia, W. Gao, and J. Zhu, ‘‘Environment monitoring and temperature
prediction in greenhouse based on wechat platform,’’ Nongye Jixie Xuebao., vol. 48, no. s1,
pp. 302–307, Dec. 2017. doi: 10.6041/j.issn.1000-1298.2017.S0.046.

[2] X. Zheng, ‘‘Expert control systems for modern greenhouse climate,’’ Jidian Gongcheng.,
vol. 20, no. 3, pp. 42–45, 2003. doi: 10.3969/j.issn.1001- 4551.2003.03.014.

[3] F. G. Montoya, J. Gómez, A. Cama-Pinto, A. Zapata-Sierra, F. Martínez, J. de la cruz,


and F. Manzano-Agugliaro, ‘‘A monitoring system for intensive agriculture based on mesh
networks and the Android system,’’ Comput. Electron. Agricult., vol. 99, pp. 14–20, Nov.
2013. doi: 10.1016/j.compag.2013.08.028.

Page no:56
A Mobile Greenhouse Environment Monitoring System Based on the Internet of Things

[4] R. Pahuja, H. K. Verma, and M. Uddin, ‘‘A wireless sensor network for greenhouse
climate control,’’ IEEE Pervasive Comput., vol. 12, no. 2, pp. 49–58, Apr. 2013. doi:
10.1109/MPRV.2013.26.

[5] W. S. Lee, V. Alchanatis, C. Yang, M. Hirafuji, D. Moshou, and C. Li, ‘‘Sensing


technologies for precision specialty crop production,’’ Comput. Electron. Agricult., vol. 74,
no. 1, pp. 2–33, Oct. 2010. doi: 10.1016/j.compag.2010.08.005.

[6] N. K. D. N, ‘‘ARM based remote monitoring and control system for environmental
parameters in greenhouse,’’ in Proc. IEEE ICECCT, Coimbatore, India, Mar. 2015, pp. 1–6.
doi: 10.1109/icecct.2015.7226117.

[7] Y. He, M. Liang, L. Chen, D. Xu, and S. Du, ‘‘Greenhouse environment control system
based on IOT,’’ Zhengzhou Daxue Xuebao Lixueban, vol. 50, no. 1, pp. 90–94, Mar. 2018.
doi: 10.13705/j.issn.1671- 6841.2017263.

[8] S. Du, Y. He, M. Liang, L. Chen, J. Li, and D. Xu, ‘‘Greenhouse environment network
control system,’’ Nongye Jixie Xuebao, vol. 48, no. s1, pp. 296–301, Dec. 2017. doi:
10.6041/j.issn.1000-1298.2017.S0.045.

[9] X. Chen, P. Guo, and Y. Lan, ‘‘Design and experiment based on wireless sensor network
with 780 MHz in greenhouse,’’ Trans. Chin. Soc. Agricult. Eng., vol. 30, no. 1, pp. 113–120,
Jan. 2014. doi: 10.3969/j.issn.1002- 6819.2014.01.015.

[10] P. Li, M. Chen, J. Wang, J. Zhou, and D. Xia, ‘‘Development of monitoring


management system and data synchronization for greenhouse IOT,’’ Nongye Jixie Xuebao.,
vol. 46, no. 8, pp. 224–231, Aug. 2015. doi: 10.6041/j.issn.1000-1298.2015.08.031.

[11] P. Guo and J. Ma, ‘‘Design on intelligent environment monitoring system of agricultural
greenhouse,’’ Zhongguo Nongjihua Xuebao, vol. 37, no. 4, pp. 71–73, Apr. 2016. doi:
10.13733/j.jcam.issn.2095-5553.2016.04.017.

[12] M. Shang, Z. Xu, Z. Yin, and L. Qin, ‘‘Design of integrated control system of
greenhouse based on Internet of Things,’’ Shandong Nongye Kexue, vol. 50, no. 10, pp. 142–
146, Oct. 2018. doi: 10.14083/j.issn.1001- 4942.2018.10.030.

Page no:57
A Mobile Greenhouse Environment Monitoring System Based on the Internet of Things

[13] H. Zheng, ‘‘Design and application for greenhouse environment monitoring system
based on ZigBee,’’ J. Changchun Normal Univ., vol. 37, no. 8, pp. 42–45, Aug. 2018.

[14] F. Yang, T. Xie, Y. Wu, and W. Su, ‘‘Design of monitoring system for greenhouse
environment of agricultural Internet of Things based on WIFI,’’ Jisuanji Celiang Yu
Kongzhi, vol. 25, no. 2, pp. 50–53, Feb. 2017. doi: 10.16526/j.cnki.11-4762/tp.2017.02.013.

[15] M. Lu, Y. Li, R. Li, and X. Cui, ‘‘Distributed temperature monitoring system in
greenhouse,’’ Zhongguo Nongjihua Xuebao, vol. 36, no. 4, pp. 59–64, Jul. 2015. doi:
10.13733/j.jcam.issn.2095-5553.2015.04.016.

[16] R. Kong, ‘‘Research of the greenhouse environment monitoring system based on


Internet of Things,’’ M.S. thesis, School Mech. Elect. Eng., Univ. Agricult. Hebei, Baoding,
China, 2013.

[17] H. Ledford, ‘‘Plant biologists welcome their robot overlords,’’ Nature, vol. 541, no.
7638, pp. 445–446, Jan. 2017. doi: 10.1038/541445a.

[18] A. Shafiekhani, S. Kadam, F. B. Fritschi, and G. DeSouza, ‘‘Vinobot and Vinoculer:


Two robotic platforms for high-throughput field phenotyping,’’ Sensors., vol. 17, no. 1, p.
214, Jan. 2017. doi: 10.3390/s17010214.

[19] G. Hu, J. Rong, and X. Yue, ‘‘The design of a robot system in agricultural and forestry
environmental monitoring based on FPGA,’’ J. Agric. Mech. Res., vol. 35, no. 7, pp. 124–
126, Jul. 2013. doi: 10.3969/j.issn.1003- 188X.2013.07.030.

[20] N. Hu, ‘‘Development of farmland information collection robot,’’ Ph.D. dissertation,


Dept. Inf. Sci. Technol., Univ. Nanjing Forestry, Nanjingi, China, 2009.

[21] D. A. V. Slot and C. W. J. Hol, ‘‘Optimal manipulator design for a cucumber harvesting
robot,’’ Comput. Electron. Agricult., vol. 65, no. 2, pp. 247–257, Mar. 2009. doi:
10.1016/j.compag.2008.11.004.

[22] Z. Zhao, X. Zhu, Y. He, H. He, H. Zheng, X. Wang, and D. An, ‘‘Application research
of robot in greenhouse,’’ J. Agric. Mech. Res., vol. 37, no. 1, pp. 238–241, Jan. 2015. doi:
10.13427/j.cnki.njyi.2015.01.055.

Page no:58
A Mobile Greenhouse Environment Monitoring System Based on the Internet of Things

[23] S. Jia, J. Li, Q. Qiu, and H. Tang, ‘‘New corridor edge detection and navigation for
greenhouse mobile robots based on laser scanner,’’ Trans. Chin. Soc. Agricult. Eng., vol. 31,
no. 13, pp. 39–45, Jul. 2015. doi: 10.11975/j.issn.1002-6819.2015.13.006.

[24] X. Niu, G. Gao, Z. Bao, and H. Zhao, ‘‘Path tracking of mobile robots for greenhouse
spraying controlled by sliding mode variable structure,’’ Trans. Chin. Soc. Agricult. Eng.,
vol. 29, no. 2, pp. 9–16, Jan. 2013. doi: 10.3969/j.issn.1002-6819.2013.02.002.

[25] J. Wei, E. Lv, F. Wang, W. Lin, and Q. Ruan, ‘‘Greenhouse environmental monitoring
robot path tracking algorithm and experiment,’’ J. Agric. Mech. Res., vol. 41, no. 8, pp. 13–
20, Aug. 2019. doi: 10.13427/j.cnki.njyi.2019.08.002

Page no:59

You might also like