0% found this document useful (0 votes)
16 views

Monitoring System (Repaired)

Uploaded by

Manu
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
16 views

Monitoring System (Repaired)

Uploaded by

Manu
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
You are on page 1/ 38

CHAPTER ONE

INTRODUCTION
1.1 Background of Study
Environment means, simply, 'nature': in other words, the natural landscape together with
all of its non-human features, characteristics and processes. Earth’s environment determines
wellness and sustainability of all the living beings. The factors of physical environment, like
temperature, humidity, air quality, light and rain have significant influence on people’s health,
living habits and surroundings. These are also linked with the different facets of environment.
Environmental health and the soundness of a human habitat for safe living is crucial from
many aspects. Its monitoring is critical. Only about 3% of world’s geography is the cities are
occupied by 50% of world’s populations and this amount of populations generate about 80%
of carbon dioxide emission. Apart from this, the said factors have significance influence on
the agriculture field and related domains. Over the years, the proliferation of wireless devices
has given rise to internet of things (IoT) which enables connection of systems and
interchange of data between them.
The recent developments and the popularity of IoT are linked to the possibility of it
application for real time monitoring. This aspect is the basis of the design of the proposed
system based on IoT for monitoring of certain environmental parameters such as temperature,
humidity, air pollution, sun light intensity and rain which is found to be reliable and efficient.
Traditional methods to study parameters such as temperature, humidity, air pollution, sun
light intensity and rain take longer time, higher cost and often prove to be unreliable. Further,
such monitoring may always not be done in a unified platform. With the penetration of
mobile communication network to the remote areas, IoT based real time monitoring of
environmental parameters such as temperature, humidity, air pollution, sun light intensity and
rain has turned out to be an efficient and cost effective solution. If the above mentioned
environmental parameters are properly monitored using an integrated system, it will have
many applications like agriculture for observing the healthy growth of crops, in industries to
ensure the safe working environment in industries as well as healthy life in cities. IoT has
been widely evolving for the creation of smart environment, smart cyber world and smart
application. Various IoT based application has been reported such as pollution monitoring,
waste management, water quality, security etc. This work emphasizes on simplicity, low cost
and data control.
For the process of designing monitoring environmental condition using Internet of
things, there are a few key steps covered in this report. First, the problem statement for this
1
project is defined, which includes defining the boundary of the system, the interfaces needed
between the system and outside factors, the needs of the customer, the customer’s constraints,
and the requirements and specifications. After that, a detailed design is produced. This is
where the functions of the system are defined and broken down into simpler functions, and
where solutions to carry out these functions are found. There are generally several different
possible solutions to implement each function, so analysis is performed to compare these
solutions to find the right one for the project.
Risk mitigation is performed and a test plan is created in order to ensure that the
construction of the chosen design proceeds smoothly, and that any potential problems are
accounted for. The chosen design components of the IoT system are expanded upon in the
component definition and planned build sections. First the design for the hardware is
examined, which includes the physical devices used to construct the IoT network. After that
the server software chosen is analyzed, which looks at the server implementation chosen to
allow communication between devices in the network. The development of the user interface
is expanded upon after that, which includes the mobile platform used and the plans for the
capability of the mobile application. The final plan for the implementation of all of these
components are then shown in the building plan and design schematics. As the system is
being implemented, testing and analysis needs to be done to ensure that everything is
working as it should and is meeting the customer’s needs. This is separated into testing of the
software components and the hardware components. Finally, a bill of materials will be
provided to ensure that the system can be implemented at a reasonable cost, as well as for the
benefit of listing out everything needed to begin construction of the system.

1.2 Statement Problem


The problems identified with the existing system are:
i. Limited protocol standardization,
ii. Security of data storage
iii. Complex identification systems to access data,
Problems arises in field of monitoring hence to overcome these problems, monitoring
environmental condition using IOT will designed to gain understanding the behavior of the
environment
Change to be implemented
 Devices must be easily integrated with IOT platform
 Uniform data format across multiple platforms
2
 Platform must be expandable and Fine-grained data visibility model
1.3 Aim of the study
1. The aim of the research work is to develop a monitoring environmental condition
system using Internet of Things (IoT)
1.4 Objective of the study
1. To analyze the existing system of monitoring environmental conditions.
2. To develop a monitoring environmental condition system using Internet of Things
(IoT)
3. To test the new system for monitoring environmental condition using IoT.
4. To implement the new system

1.5 Significance of the study


These project will provide a platform that monitors the environment parameters and
help to create better and understand the behavior of the environment.
This study will also mitigate the drawbacks in the existing system by implementing the new
proposed system to solve the problems of:
a) Required more time and space to operate
b) Complicated design
c) Maintenance difficulty

1.6 Scope and Limitation of the study


This study will focus on monitoring some environmental parameters such as
temperature, smoke, dust.

1.7 Limitation of the Study


The study is limited to monitoring few parameters such as temperature, smoke, dust. other
limitation is:
i. The system will not analyze sensor data.
ii. The system is limited to monitoring only monitoring Gas Sensor, Temperature,
Humidity

1.8 Definition of Terms

3
ZigBee: is a wireless technology developed as an open global standard to address the unique
needs of low-cost, low-power wireless IoT networks
ThinkSpeak: is an IoT analytics platform service that allows you to aggregate, visualize,
and analyze live data streams in the cloud.
Raspberry Pi: is a low cost, credit-card sized computer that plugs. It is a capable little
device that enables people of all ages to explore computing, and to learn how to program in
languages like Scratch and Python.
Sensor: is a device, module, machine, or subsystem whose purpose is to detect events or
changes in its environment.
MQTT: is an OASIS standard messaging protocol for the Internet of Things (IoT). It is
designed as an extremely lightweight publish/subscribe messaging transport.

CHAPTER TWO
4
LITERATURE REVIEW
2.1 Conceptual Framework
The importance of weather monitoring is existed in many aspects. The weather
conditions are required to be monitored to maintain the healthy growth in crops and to ensure
the safe working environment in industries, etc. Due to technological growth, the process of
reading the environmental parameters became easier compared to the past days. The sensors
are the miniaturized electronic devices used to measure the physical and environmental
parameters. By using the sensors for monitoring the weather conditions, the results will be
accurate and the entire system will be faster and less power consuming.
The importance of environmental monitoring is undoubted in our age. This is the field
where wireless sensor networks (WSNs) have been first used, their primary purpose
consisting in the observation of the physical world and the recording of physical quantities
characterizing it. WSNs are large networks of resource-constrained sensors with processing
and wireless communication capabilities, which implement different application objectives
within a specific sensing field. The IEEE 802.11 standard has established itself as one of the
most popular wireless technologies offering connectivity. As modern devices and sensors
continue to grow in power and functionality and to reduce in their cost, internet of things
(IoT) emerges as a common platform and service for consumer electronics. IoT enables to be
connected to virtually unlimited devices over the internet. It thus has a great potential of
communicating and interacting with them. Environment monitoring is one of the major
application of wireless sensor network WSN consist of different sensors which are widely
distributed to monitor different environment parameters like temperature, humidity, gases,
pressure, wind speed etc. The use of wireless ambient sensors can lead to more energy-
efficient buildings. WSN consists of sensor nodes which are low cost devices with limited
power. Energy efficiency is the biggest problem when these sensors are used for large scale
environment monitoring.
Internet has made life better, convenience with easily information accessible. The use
of the Internet of Things for the environment using WSN (Wireless Sensor Network)
technology is highly efficient because data from node sensor can be received and recorded on
a PC with a GUI (Graphical User Interface that simple and easy for users. IoT and Big data
are the latest technology to collect data and display real-time information. To react to
environmental changes and is expected to make the lives of its users more comfortable at that
location. Therefore, the use of systems with IoT keeps increasing. Building monitoring
systems using IoT can be done by assembling module devices for data retrieval such as
5
Raspberry Pi, Raspberry pi microcontroller board, additional devices like Wi-Fi modules and
RTC (Real Time Clock), and sensors. Research on IoT conducted by using the open public
cloud API based (https://plot.ly) and (https://thingspeak.com) with a real-time system to
monitor thermal and humidity. One of the recent protocols used for IoT is by using and
Message Queuing Telemetry Transport (MQTT), proposes a monitoring system using Wi-Fi
and MQTT broker as the communication system of sensor node.
2.1 Review of Related Works
2.1.1 Zigbee Protocol
Zigbee is a short-range, low-power, wireless standard (IEEE 802.15.4), commonly
deployed in mesh topology to extend coverage by relaying sensor data over multiple
sensor nodes. Compared to LPWAN, Zigbee provides higher data rates, but at the same
time, much less power-efficiency due to mesh configuration.
Because of their physical short-range (< 100m), Zigbee and similar mesh
protocols (e.g. Z-Wave, Thread etc.) are best-suited for medium-range IoT applications
with an even distribution of nodes in close proximity. Typically, Zigbee is a perfect
complement to Wi-Fi for various home automation use cases like smart lighting, HVAC
controls, security and energy management, etc. – leveraging home sensor networks.
Until the emergence of LPWAN, mesh networks have also been implemented in
industrial contexts, supporting several remote monitoring solutions. Nevertheless, they
are far from ideal for many industrial facilities that are geographically dispersed, and
their theoretical scalability is often inhibited by increasingly complex network setup and
management.
Anwaar and Shah compared raspberry pi with other technological inventions like
Smart Phone, tablet computer, smart TV, and Laptop. Their outcomes demonstrate that
raspberry pi consumes less power and computation jobs can be accomplished in a better
vitally effective manner. In this work he used hardware devices like tablet Pc, laptop, smart
TV and raspberry Pi. Here energy efficiency is calculated in kilojoules per hour. The authors
have compared the power consumptions of all the computing devices. They observed that the
desktop consumes 82 watts, a laptop, a smart phone consumes 50 and 5 watts respectively.
Whereas a raspberry pi system only consumed 2.25 watts. Therefore, raspberry pi is more
energy efficient than the other computing devices. Zhao et al, explored the application of
raspberry pi system as a server along with other laptops in the same network.
They have established client server communication using Wi-Fi, ZigBee protocols
within localhost for remote file sharing. Samba is an open source software used in this project
6
for file and print services. Raspbian Operating Systems was used for raspberry pi project
development. Varma et al. used Rabbit processor as an embedded web server and also
implemented a Denial of Service attack detection mechanism. Sandeep et al. have proposed
this automation system to control machines in laboratories with high mobility and security.
Electronic devices were interfaced to the raspberry pi and were remotely controlled through
weaved fabric cloud platform. The General Purpose Input Output (GPIO) pins of the
raspberry pi board were controlled using Webiopi software.
The raspberry pi was interfaced to Digiduino board for amplification, in order to
connect the relay switches to control the external devices. Ibrahim et al. developed a low-cost
environmental monitoring system by making use of the raspberry pi computing board.
Sensors used in this work are temperature sensor TMP36, Humidity DHT22, CO
concentration using MQ 135, Earthquake thin-film-piezoelectric sensor LDT0028K.
Pavithra and Balakrishnan proposed an efficient system for monitoring and
controlling the home appliances via World Wide Web. In this work communication takes
place through internet gateway by using protocols like Zigbee, WiFi etc. In addition to that
fire alarm system has been established. Home appliances used are lights, and fan. Sensors
used are IR sensor for lights, PIR sensor for fans and Fire detection sensor for fire. These
sensors are connected and ISSN (Print): 2319-8613 ISSN (Online) : 0975-4024 Ravi Kiran
Varma P et al. / International Journal of Engineering and Technology (IJET) DOI:
10.21817/ijet/2017/v9i3/170903S082 Vol 9 No 3S July 2017 546 interfaced through
raspberry pi and can be controlled through our mobile phones. WiFi provides the medium for
configuration which can be configured to make security services. Different web pages are
created for different rooms to access appliances separately. One of the advantages is that this
system can be monitored and controlled from any OS in mobile phones. Daniel et al.
proposed a system to control the temperature in an automated and efficient way using Fuzzy
logic. Here prototype consumes data from sensors and IoT platform. The main idea is to get
temperature on outdoor and basing on that system is designed to control indoor temperature
using IoT. Hardware components used in this work are a TMP36 temperature sensor,
MCP3008 analogic-to-digital converter, 2 yellow LEDs, 2 red LEDs, and 1 RGB LED,
Several resistors. Chowdhury et al. designed a raspberry pi based visitor notification system.
They have interfaced a camera to take a picture of the visitor and notify through twitter. WiFi
communication was used to interface the camera and Infra-Red (IR) sensor for human
presence sensing. Raspberry pi was configured as an Internet server to remotely communicate
the information to anywhere the user wants. Street lights were automated through IoT
7
technology using raspberry pi by Leccese et al. Aksh et al. designed a raspberry pi project to
control wheel chair through IoT using WebIOpi framework. Ray has done a similar work to
monitor MISSENARD index using Raspberry pi hardware platform and ThingSpeak and
Plotly cloud software platform. Other interesting applications of Raspberry pi include
controlling a car remotely, home automation. Security is one the major concern in IoT
projects. Intrusion Detection Systems (IDS) and Firewalls takes the front seat in protecting
the network perimeter along with host based security tools

2.2. Theories and Technologies


The Internet of Things (IoT) is a system of interconnected digital devices, machines,
objects, animals or people provided with unique identifiers and the ability to transmit and
share data over the network without the need of human-to-human or human-to-computer
interaction. Bridging the gap between the physical and virtual worlds, IoT aims at creating
smart environments in which individuals as well as whole societies will be able to live in a
smarter and more comfortable way. Pompous as it may sound, the IoT has already become
part of our daily life and no doubt it will settle there for good. With all this in mind, let us
now have a brief look over the machinery behind the IoT world that makes it go round.

Figure 2.1 Theories and Technology Graph

1. LPWANs

8
Low Power Wide Area Networks (LPWANs) are the new phenomenon in IoT. By
providing long-range communication on small, inexpensive batteries that last for years,
this family of technologies is purpose-built to support large-scale IoT networks sprawlng
over vast industrial and commercial campuses.

LPWANs can literally connect all types of IoT sensors – facilitating numerous
applications from asset tracking, environmental monitoring and facility
management to occupancy detection and consumables monitoring. Nevertheless,
LPWANs can only send small blocks of data at a low rate, and therefore are better suited
for use cases that don’t require high bandwidth and are not time-sensitive. Also, not all
LPWANs are created equal. Today, there exist technologies operating in both the licensed
(NB-IoT, LTE-M) and unlicensed (e.g. MYTHINGS, LoRa, Sigfox etc.) spectrum with
varying degrees of performance in key network factors. For example, while power
consumption is a major issue for cellular-based, licensed LPWANs; Quality-of-Service
and scalability are main considerations when adopting unlicensed
technologies. Standardization is another important factor to think of if you want to
ensure reliability, security, and interoperability in the long run.

2. Cellular (3G/4G/5G)

Well-established in the consumer mobile market, cellular networks offer reliable


broadband communication supporting various voice calls and video streaming
applications. On the downside, they impose very high operational costs and power
requirements.

While cellular networks are not viable for the majority of IoT applications
powered by battery-operated sensor networks, they fit well in specific use cases such
as connected cars or fleet management in transportation and logistics. For example,
in-car infotainment, traffic routing, advanced driver assistance systems (ADAS)
alongside fleet telematics and tracking services can all rely on the ubiquitous and high
bandwidth cellular connectivity.

Cellular next-gen 5G with high-speed mobility support and ultra-low latency is


positioned to be the future of autonomous vehicles and augmented reality. 5G is also
expected to enable real-time video surveillance for public safety, real-time mobile

9
delivery of medical data sets for connected health, and several time-sensitive
industrial automation applications in the future.

3. Zigbee and Other Mesh Protocols

Zigbee is a short-range, low-power, wireless standard (IEEE 802.15.4), commonly


deployed in mesh topology to extend coverage by relaying sensor data over multiple
sensor nodes. Compared to LPWAN, Zigbee provides higher data rates, but at the same
time, much less power-efficiency due to mesh configuration.

Because of their physical short-range (< 100m), Zigbee and similar mesh
protocols (e.g. Z-Wave, Thread etc.) are best-suited for medium-range IoT applications
with an even distribution of nodes in close proximity. Typically, Zigbee is a perfect
complement to Wi-Fi for various home automation use cases like smart lighting, HVAC
controls, security and energy management, etc. – leveraging home sensor networks.

Until the emergence of LPWAN, mesh networks have also been implemented in
industrial contexts, supporting several remote monitoring solutions. Nevertheless, they
are far from ideal for many industrial facilities that are geographically dispersed, and
their theoretical scalability is often inhibited by increasingly complex network setup and
management.

4. Bluetooth and BLE

Defined in the category of Wireless Personal Area Networks, Bluetooth is a short-


range communication technology well-positioned in the consumer marketplace.
Bluetooth Classic was originally intended for point-to-point or point-to-multipoint (up to
seven slave nodes) data exchange among consumer devices. Optimized for power
consumption, Bluetooth Low-Energy was later introduced to address small-
scale Consumer IoT applications.

BLE-enabled devices are mostly used in conjunction with electronic devices,


typically smartphones that serve as a hub for transferring data to the cloud. Nowadays,
BLE is widely integrated into fitness and medical wearables (e.g. smartwatches,

10
glucose meters, pulse oximeters, etc.) as well as Smart Home devices (e.g. door locks) –
whereby data is conveniently communicated to and visualized on smartphones.

The release of Bluetooth Mesh specification in 2017 aims to enable a more


scalable deployment of BLE devices, particularly in retail contexts. Providing versatile
indoor localization features, BLE beacon networks have been used to unlock new service
innovations like in-store navigation, personalized promotions, and content delivery.

5. Wi-Fi

There is virtually no need to explain Wi-Fi, given its critical role in providing
high-throughput data transfer for both enterprise and home environments. However, in
the IoT space, its major limitations in coverage, scalability and power consumption make
the technology much less prevalent.

Imposing high energy requirements, Wi-Fi is often not a feasible solution for
large networks of battery-operated IoT sensors, especially in industrial IoT and smart
building scenarios. Instead, it more pertains to connecting devices that can be
conveniently connected to a power outlet like smart home gadgets and appliances, digital
signages or security cameras.

Wi-Fi 6 – the newest Wi-Fi generation – brings in greatly enhanced network bandwidth
(i.e. <9.6 Gbps) to improve data throughput per user in congested environments. With
this, the standard is poised to level up public Wi-Fi infrastructure and transform
customer experience with new digital mobile services in retail and mass entertainment
sectors. Also, in-car networks for infotainment and on-board diagnostics are expected to
be the most game-changing use case for Wi-Fi 6. Yet, the development will likely take
some more time.
6. RFID
Radio Frequency Identification (RFID) uses radio waves to transmit small
amounts of data from an RFID tag to a reader within a very short distance. Till now, the
technology has facilitated a major revolution in retail and logistics.
By attaching an RFID tag to all sorts of products and equipment, businesses can
track their inventory and assets in real-time – allowing for better stock and production
planning as well as optimized supply chain management. Alongside increasing IoT

11
adoption, RFID continues to be entrenched in the retail sector, enabling new IoT
applications like smart shelves, self-checkout, and smart mirrors.

CHAPTER THREE

METHODOLOGY

12
3.0 METHODOLOGY, SYSTEM ANALYSIS, AND DESIGN

System design is an approach systematically taken in the design of a system. This

approach takes into consideration all variables surrounding it, which include the architecture,

required hardware and software and as well as the data flow, how it changes from one point

of the system to the other.

3.1 Methodology

In the course of this project work to maintain the simplicity of the network

architecture, star topology is selected. In a star topology, one failed device will not affect the

other devices in the network, and there will be no data collision in the network. Between the

internet and the nodes, a gateway is used. This gateway can be wired or wireless, giving us

the flexibility to use it anywhere. The gateway also does the heavy lifting of internet

communication and keeps the power consumption in the node low:

3.2 System Analysis

3.2.1 Data Gathering Technique

The device sends data to the gateway with the along with the API key. The gateway
then posts the data to the Message Queuing Telemetry Transport (MQTT) server. The device
has a quick boot time. There is a scheduler that periodically fetches information from the
sensor and stores it on the RAM. It stores the sensor value and as well as the time stamp. All
the sensor values are sent to the server at once to reduces current consumption. The schedular
is configurable and for this example, it is configured to read data from the sensor every five
minutes. The user can configure the schedular to meet their exact need. When not working,
the schedular puts the device into sleep mode to conserve power.
The data can be visualized in Message Queuing Telemery Transport (MQTT) site with
various graphs and charts. The graph shows the time stamp and sensor value. A trigger can be
set in the Message Queuing Telemery Transport (MQTT) server for a particular sensor when
it crosses a threshold value. Moreover, it is possible to download the data to CSV or JSON

13
format from Message Queuing Telemery Transport (MQTT) server for further processing. To
stop data collection, it is essential to turn off the system's power

1. MQ 135 Gas Sensor

The concentration level of carbon monoxide present in environment is measured in units


‘parts per million (ppm)’ and %. The conversion is shown below.

Conversion factors -
1 ppm = 1.145 mg/m3

1 mg/m3 = 0.873 ppm


1% = 1/100
1ppm = 1/1000000
1ppm = 0.0001%

2. AM2301 Temperature Sensor and Humidity Sensor


The AM2301 temperature sensor provides an output of 10mV per degree Celsius, with an
accuracy of 0.5°C at25°C. It can be powered by any DC voltage in the range 4V-30V. The
operating range is –55°C to +150°c.

Suppose at 20°C,
We will get 20 x 0.01 = 200 mV, or 0.2 volts.

3. AM2301 Temperature Sensor and Humidity Sensor

14
Relative Humidity = (density of water vapor / density of water vapor at saturation) x 100% If
actual vapor density =10 g/m3, at 20°C. Saturation vapor density =17.3 g/m3, then the
relative humidity is,
RH= (10 g/m3/17.3 g/m3) x 100% =57.8%
Put the sensor in water we get its maximum raw ADC value, suppose we use 10bit ADC then
raw ADC value is in the range 0 to 1023.
If we get raw ADC value 1023 for RH 90 i.e., 2970 mV
then 1023 = 90
1023 * x = 90
x = 0.0879765395894428
%RH = (raw ADC value * 0.0879765395894428)
e.g. - if raw ADC value = 920 then 920 * 0.0879765395894428 = 80.93841642228739 % RH

3.2.2 Analysis of the existing System


There are many existing works on evaluating and comparing physical activity
monitors. Some of them evaluated a set of monitors on their accuracy of step counts, and the
others on their accuracy of energy expenditure. Most of the existing works evaluated
accuracy by testing the monitor’s performance during pollution, and there was also a small
part of these works can be improved by using IOT technology in proposed system.

Monitoring System
Web
Sensors Browser
ADU WlA
N
ZigBee MCU

Database Smart
RFID Tags lA Phone
N

Mobile phone Web


service
sensing
Intern
WSN Gateway et
WSN nodes Other web
device

Figure 3.1 Model of the Existing System

3.2.4 Disadvantage of existing system


15
Drawback of existing system
i. Required more time and space to operate
ii. Complicated designing
iii. Maintenance is difficult
iv. Low communication
v. Not efficient

3.2.5 High Level Model of the proposed System

Logical data model


Logical data flow model of the proposed system is presented in Fig. 1. The MQTT server
provides channels for each node. Each of the channels has its API Key. This key helps to
organize data in the channels and to maintain the database. This individual databased then can
be visualized in the MQTT server or can be transferred to other services to analyze the data.

MQTT API

Node 1

Data
base
z Visualization

Node 1

BigData
Cloud Data BigQuery Cloud db

Node 1

Fig. 3.2 Showing High Level Model of the System

3.2.6 Analysis of the Proposed System

In this proposed model the climatic changes are frequently monitoring through IOT
using sensor nodes. Internet of Things (IoT) is a recent communication paradigm, in which
the objects will be equipped with microcontrollers, transceivers and suitable protocol stack
that will make them to communicate with one another and with user. This paper designs a
prototype of wireless environmental monitoring system to upload information from array of

16
sensors to the database. This application allows us to observe or measuring the environmental
parameters from anywhere in real time. This system consists of main three modules namely
sensor nodes, the wireless communication and the web server. The sensor nodes in remote
location collect the information from surrounding environmental conditions and send the data
wirelessly using Raspbery pi microcontroller and ESP8266 Wi-Fi module to the server. This
paper presents a system that can be used to measure the toxic gases in surrounding area like
Industrial area by using various sensor nodes. All sensors are connected on the raspbery pi
microcontroller and the status of the sensors is send to the control section continuously. The
data uploading is done by ESP 8266 Wi-Fi module. The data is updated on internet. The
values of sensors are displayed on LCD. The buzzer is used to make sound, if the sensor
beyond its threshold value for saving the people immediately. The device developed in this
project is based Raspberry pi UNO. The Raspberry pi board connects with Thing Speak
platform using ESP8266 Wi-Fi Module. The Thing Speak is a popular IOT platform which is
easy to use and program. The sensor data is also displayed on a character LCD interfaced in
the monitoring IOT device. The sensing of data and sending it to the Thing Speak server
using Wi-Fi module is managed by the Raspbery pi Sketch. The Raspbery pi sketch is
written, compiled and loaded to the Raspbery pi board
The block diagram

Fig.3.3 The proposed system block diagram

About the sensors used in the system

17
AM2301 is a temperature and humidity sensor, shown in Fig.3. The advantage of this
sensor is it is highly reliable, low price, good quality, faster response time, and inference free
design. This sensor can measure temperatures ranging from 0 to 50 oC with an error of plus or
minus 2oC. The range of humidity measure that AM2301 can support is 20 to 90% RH with
an allowable error of 5%. It can directly provide a digital output with its own serial
communication protocol. It can operate at a low supply voltage of minimum 3V up to 5.5V.
It has only three pins, for Vcc, data, and ground. It uses Negative Temperature Coefficient
(NTC) based temperature sensing component, and moisture substrate based humidity sensing
component.
MQ 135 is a gas sensor (Fig.5) that can detect harmful gasses including smoke,
Sulphide, Ammonia, Benzene, Carbon dioxide, and alcohol. MQ 135 indicates the type of gas
in the form of an analog signal and an Analog-to Digital converter MCP3008 is used to
convert it to digital and interface to the raspberry pi.

Figure 3.4. Flowchart representation of the proposed system

18
3.2.7 Justification of the proposed system

The proposed system was developed to solve the above problem:

i. Feedback: The proposed system provides a means of data visualization in real time.

ii. Available Data for Decision making: The proposed system will help in making data

available for the usage.

3.3 System Design

Fig. 3 shows the connections between the different parts of the device. To make the
power supply flexible, several input options are available. If multiple power sources are
connected simultaneously, the power manager will switch between them to provide a
consistent supply. The solar cell or the main AC supply will charge the battery and provide
the power to the other parts of the hardware. If the mains AC supply fails or during the night

19
when there is no power in the solar cell, the power manager will switch to the battery for
uninterrupted operation.
There is a buck-boost converter in the power management system with the solar cell
connection. As the solar cell does not produce constant voltage, the buck-boost converter
takes any voltage between 3V to 18V and converts it to a constant 15V. This 15V is feed to
the battery charging system.
The power unit consists of a rechargeable 1500 mAh 12.5volt lithium-ion battery. To save the
battery from completely discharging or overcharging, battery charge protection circuit has
been integrated into the system. To efficiently stepdown the voltage two buck modules are
used. The ESP8266 and the nodeMCU board requires 3.3v and the sensors required 5v and
12v.
The ESP8266 is the brain of the whole device. It is responsible for sensor data
collection, formatting the data and sending to the sensor gateway. To make the device flexible
in terms of how many sensors it can connect, IO mux is used in the design. The IO mux can
be chained to add more sensors if necessary.
There is a separate power controller for sensor power supply as different sensors
require different voltage levels. The power controller can also cut off the power of the unused
sensors, maximizing power savings. B. Controlling sensors There are a power control
MOSFET array and a 12v boost converter in the power controller unit. Upon receiving the
request from the MCU, the power control unit powers on a particular sensor. The power
controller unit also ensures that the appropriate current and voltages are set. After that, the
MCU reads the data from the sensor. The MCU then turns off the power of that sensor
ensuring a low current consumption.
Sensors used
The configuration is designed in such a way that a number of environmental and gas
sensors can be added here. For the proposed model experiment, MQ 135 and AM2301
sensors are used.
MQ 135 gas sensor can detect LPG, Smoke, Alcohol, Propane, Hydrogen, Methane
and Carbon Monoxide concentrations anywhere from 200 to 10000ppm. MQ 135 gas sensor
has a high sensitivity to Methane, also has interference to alcohol and other gases.
MQ 135 gas sensor has high sensitivity NH3, NOx, alcohol, benzene, smoke and
CO2. Ideal for use in the factory environment. The AM2301 is a digital temperature and
humidity sensor. It uses a capacitive humidity sensor and a thermistor to measure the
surrounding air temperature.
20
3.3.1 Objective of the Design

The main objective of the design is to develop a platform that is easy to use, user-
friendly, simplify complicated designing help to create better an environmental monitoring
system.
i. To provide a more convenient way of monitoring environmental condition using

IOT.

ii. To simplify the system design.

3.3.3 System Architecture


The diagram in Fig. 3 illustrates the overall architecture of the network system in this
project. User can deploy the nodes randomly in an environment. To maintain the simplicity of
the network architecture, star topology is selected. In a star topology, one failed device will
not affect the other devices in the network, and there will be no data collision in the network.
Between the internet and the nodes, a gateway is used. This gateway can be wired or wireless,
giving us the flexibility to use it anywhere. The gateway also does the heavy lifting of
internet communication and keeps the power consumption in the node low.

Fig: 3.5 Sensor node system model

21
3.3.4 Algorithm
Algorithm is a process or set of rules that must be followed during a problem solving process
in other to arrive at the solution. During the development of the proposed monitoring
environmental condition using internet of things, the following steps were followed

Figure 3.6. Flowchart Representation of the Proposed System

22
CHAPTER FOUR
SYSTEM IMPLEMENTATION, TESTING AND RESULTS

4.1 System Implementation


4.1.1 Hardware Requirement
The goal of the hardware is to collect data and be able to control the specific functions
that are needed. The main piece of hardware used is a Raspberry Pi with sensors. A circuit
with are lay is used to switch between the wall power and a battery back-up in-case of a
power outage; this ensures constant power to the Raspberry Pi and allows constant
monitoring even when power is out.
RASPBERRY Pi
For this project the main piece of hardware used is a Raspberry Pi. The reason for
choosing came from it ability to run multiple programs at once, while other competitive
options can only run one program at a time. This allows for faster response time, and lower
CPU usages of the Pi itself. A program can be run only when it is called upon, rather than
having only a single program that must run every part of the project when a single item is
asked to be updated .
Raspberry Pi is the name of a series of single-board computers made by the Raspberry Pi
Foundation, a UK charity that aims to educate people in computing and create easier access
to computing education.
The Raspberry Pi launched in 2012, and there have been several iterations and
variations released since then. The original Pi had a single-core 700MHz CPU and just
256MB RAM, and the latest model has a quad-core CPU clocking in at over 1.5GHz, and
4GB RAM. The price point for Raspberry Pi has always been under $100 (usually around
$35 USD), most notably the Pi Zero, which costs just $5.

23
Figure 4.1 Raspberry Pi 3

SENSORS
The sensors being used are: MQ135 gas sensor, AMT2301 temperature, PCM3008 as
analog to digital converter. Each sensor will work to achieve a goal while others will work on
their own. For example the motion detector will enable the camera to take a video or pictures
when it is triggered. The water and gas sensor will each work alone to send a notification in
the event of a change in either one. The RF transmitter and receiver kit will be linked to a
wireless outlet switch allowing remote access to an outlet and control the power coming from
the outlet.
MQ 135 GAS SENSOR

Figure 4.4 MQ-135 Quality Sensor

24
AMT2301 TEMPERATURE AND HUMIDITY SENSOR

Figure 4.5 AMT2301 Temperature and Humidity Sensor

BREADBOARD

Figure 4.6 Breadboard

MCP3008

Figure 4.7 Analog to Digital Converter


JUMPER WIRES

25
Figure 4.6 Jumper Wires

4.1.2 Software Requirement


Adafruit library
Standard library functionality includes basic communication functions and support
for some of the most common types of hardware like servo motors and character LCD
displays. Standard Libraries are pre-installed in the "Libraries" folder of the Arduino install.
4.1.3 Program Development
4.1.3.1 Choice of Programming Language

Python is a universal multi-paradigm programming language not intended for anything spe-
cific. Python is a general-purpose language that supports any programming style and is suit-
able for web development services, as well as desktop and server applications.

 It is considered easy to learn and work with as it provides a clear way to tackle diffi -
culties and allows great opportunities. Initially, Python was created as an object-ori-
ented coding language so you can write any kind of extension in Python or embed it
in other applications to enable specific functionality.
 In modern programming, the Python language is one of the most popular and used in
the business sphere for solving priority tasks. The unique programming language is

26
one of the leaders in the field of analysis of large volumes of information used in the
scientific field of activity and in machine learning.

4.1.3.2 Language Justification


i. Language design: covers issues related to pragmatics and paradigms (Program-
ming paradigm). There are many more ways to describe problems and their solu-
tions that are provided by mainstream imperative and object-oriented languages.
For example, declarative languages attempt to close the gap between require-
ments and solution, between the what is the problem and how to solve it. Pro-
gramming Language research in this area explores these issues as well as issues
such as how different approaches can be combined. There is also the issue of Do-
main-Specific Languages or DSLs, which are, like the name suggests, special-
ized languages aimed at particular domains.
ii. Language implementation: investigates interpreters, compilers, lexers, parser
generators and other related technology. Deals with questions such as what is the
best way to run a program. For example, how do you optimize for execution time
or space requirements. The nature of the language has a major impact on this. It's
very different to implement an imperative language than a functional language,
or a language for real-time embedded systems.
iii. Language foundations: the study of the formal semantics of languages, this is,
mathematical models that define the meaning of programs in a language. The
motivations are to first, provide a precise, unambiguous, consistent, and hope-
fully complete account of the meaning of programs, and second, provide a set of
(mathematical) tools to reason about those programs (as opposed to hand-wav-
ing). This has applications in areas such as automatic formal verification, code
refactoring and compiler optimization.
iv. Language engineering: deals with questions such as how do you define lan-
guages, obtain a precise semantics and implementation (hopefully in an auto-
matic fashion), how do you combine existing languages, not just their syntax, but
their semantics, their implementation, etc.
v. Tools: research in tool support other than compiler technology, such as language-
aware IDEs, debuggers, profilers, etc.

27
4.1.6 Program Module Implementation
i. DHT21 AM2301 Temperature and Humidity Sensor AM2301 For Arduino Digital
Temperature Humidity Sensor Module Diy Electronic Sensor

ii. The MQ-135 Gas sensor can detect gases like Ammonia (NH3), sulfur (S), Benzene
(C6H6), CO2, and other harmful gases and smoke. Similar to other MQ series gas
sensor, this sensor also has a digital and analog output pin. When the level of these
gases go beyond a threshold limit in the air the digital pin goes high. This threshold
value can be set by using the on-board potentiometer. The analog output pin, outputs
an analog voltage which can be used to approximate the level of these gases in the at-
mosphere.

iii. The MQ135 air quality sensor module operates at 5V and consumes around 150mA. It
requires some pre-heating before it could actually give accurate results.

a. Details of MQ135 Sensor

iv. The MQ135 is one of the popular gas sensors from the MQ series of sensors that are
commonly used in air quality control equipment. It operates from 2.5V to 5.0V and
can provide both digital and analog output. The pinouts and important components on
an MQ135 Module is marked below

28
4.3 System Testing
System testing System testing, or end-to-end testing is a completely integrated system of
testing to verify that it meets its requirements. The System testing result show as a Table 1.
4.3.1 Test Plan
Summary of findings
Test cases Expected Result Observed Result Test Result
User can Easily manage Successful Successful Pass
program

Headless Connection Successful Successful after putty Pass


authentication
Adafruit library Temperature and Percentage obtained Pass
Humidity from the console

Gpio pins Configured Successful Pass


successfully

Real-time Gas and Successful Gas and smoke Pass


Smoke Detection percentage obtained

4.3.2 Test Data


Summary of test parameter
Temperature Degree celcius
Humidity Farenhiet
Smoke %
Gas %

4.4. Results
This section presents the results obtained from the experiment that has been carried out. The
sensor reads the environment by its location. Changes in the artificial environment are made
to play with the sensor data by leaking smoke, burning LPG fuel, etc. The values obtained

29
from the sensors thus differ from the normal state and fluctuation of information and is shown
in real-time.
When smoke is released, it is immediately detected and displayed by the MQ 135 sensor. MQ
135 sensor detected the Methane as it was released in the lab. This value is particularly
important as it can ensure the safety of the furnace gas tank of factories. Another common
poisonous gas is NOx gases. In the lab test, MQ135 immediately detected NOx gases and
showed the PPM value in real-time. The sensor DHT22 is effective in measuring temperature
and humidity. With this information, gas activity depending on the relative humidity and
temperature can be observed. The dust sensor is used in micrograms per meter cube of air to
measure the dust density. GPS sensor detects latitude and longitude when the system works
outside so that the exact location makes the environmental status understandable.

4.4.1 Performance Evaluation


IOT PERFORMANCE PROBLEM METHODS PARAMETERS
Industrial IoT anomaly System High computing Packet errors
detection Management power and data
bandwidth
Complementary GFDM coverage IoT frequent transfer Bit error rate and
enhancement mechanism to packet error rate
increase coverage

4.4.2 Limitation of the Result


This project has its report generated from the sensors and presented at the console.
Temperature and humidity sensor readings are captured are not graphically presented.

4.4.3 Results and Discussions


With the advancements in technology, it is expected that the availability of internet is
everywhere and online at all time. Low-cost smart sensor node development enabled devices
to be connected easily and corresponding information can be accessible globally. With the
features of scalability, fault tolerance and effective power consumption of nodes and
transceiver Internet of Things have facilitated ubiquity computational ability to internetwork
heterogeneous smart devices easily and facilitate availability of data anywhere. In this paper,
we proposed an efficient method for internetworking of 802.15.4 with IP network. The key

30
idea of the proposed method is to provide a low-cost solution and flexible connection
mechanisms for integrating Internet of things with home monitoring systems. The advantages
of the developed system are to have greater control over routing of packets (security and
customization) and ability to adapt to other wireless sensor networks. The QoS of the
integrated network architecture is determined in terms of two parameters i) throughput and ii)
reliability.
4.5 System Integration

Figure 4.8 AM2302 Sensor integration to raspberry pi

Figure 4.9 MQ 135 Sensor Integration to Raspberry Pi

4.6 Documentation
Starting Raspberry pi server

31
By connecting the raspberry pi to power source the device is connected automatically.
Starting Putty application to access the raspberry pi heedlessly or remotely,
- Pi user name
- Pi password
All files available on raspberry pi will be accessible the by client system.
List of commands used to interact with raspberry pi terminal
cd change directories
ls directories
sudo apt-get update
git clone

32
CHAPTER FIVE
SUMMARY, CONCLUSION AND RECOMMENDATIONS

5.1 Summary
With the advancements in technology, it is expected that the availability of internet is
everywhere and online at all time. Low-cost smart sensor node development enabled devices
to be connected easily and corresponding information can be accessible globally. With the
features of scalability, fault tolerance and effective power consumption of nodes and
transceiver IoT have facilitated ubiquity computational ability to internetwork heterogeneous
smart devices easily and facilitate availability of data anywhere.

5.2 Conclusion
This Environment Monitoring System is made from low cost components that are
easily available and can be used to monitor several environmental parameters. This system
can be easily be adapted for both indoor or outdoor use. The proposed system has been tested
several times with different parameters, and have been successful throughout. Last but not
least, this device can connect to the gateway via Bluetooth, Infrared or WiFi without much
design changes thus making it suitable for different scenarios. This system is therefore
flexible and scalable. In future the research work is intended to introduce several machine
learning techniques that will give more insight to the user. Besides, to manage changes
efficiently, the records can be kept in a secure immutable digital ledger using technologies
like Blockchain.

5.3 Recommendations
i. It is recommended to implement this project with ESP 8266-12E Wi-Fi module to
utilized the data on cloud for graphical visualization. ESP 8266-12E module has
inbuilt Arduino microcontroller. It reduces the overall size of the device and simplifies
the working mechanism.
ii. It is recommended to attach buzzer in other to alert the user of certain gas leak or high
temperature level.
iii. It is recommended to implement user interface to easy the users of the system.

33
Reference
Abhimanyu Singh, Pankhuri Aggarwal, Rahul Arora3, IoT based Waste Collection System
using Infrared Sensors, 5th International Conference on Reliability, Infocom
Technologies and Optimization (ICRITO), (2016) 6.

Andrew Banks, RahulGupta MQTT Version 3.1.1 2014:http://docs.oasis open.org/mqtt/


mqtt/v3.1.1/os/mqtt-v3.1.1-os.html

BTK, (2015). Regulation on the Determination, Control and Supervision of Exposure Limit
Values of Electromagnetic Field Intensity from Electronic Communication Devices ac-
cording to International Standards. [online] Available at: http://www.mevzuat.gov.tr, [Ac-
cessed 27 March 2017

Cheah Wai Zhao, Jayanand Jegatheesan and Son Chee Loon, “Exploring IOT Application Us-
ing Raspberry Pi,” International Journal of Computer Networks and Applications,
vol. 2, no. 1, pp. 27-34, February 2015.

DFMEA Resource URL: https://www.lehigh.edu/ intribos/Resources/

Eric Brown Who Needs the Internet of Things? 2016:


https://www.linux.com/news/who-needs-internet-things.

Gopal Kirshna Shyam, Sunilkumar S. Manvi, Priyanka Bharti, Smart Waste Management
using Internet-of-Things (IoT), Second International Conference On Computing and
Communications Technologies(ICCCT’17), (2017) 7.

LIU Dan, Cao Xin, Huang Chongwei, JI Liangliang, Intelligent Agriculture Green House
Environment Monitoring System, International Conference on Intelligent
Transportation, Big Data & Smart City, (2015). 3.

Muhannad Al-Jabi, Mohammad Diab, IoT-Enabled Citizen Attractive Waste Management


System, ITDREPS Conference, Amman, Jordan, (2017) 8.

P V Vimal, K S Shivaprakasha, IOT based greenhouse environment monitoring and


controlling system using Arduino platform, International Conference on Intelligent
Computing, Instrumentation and Control Technologies (ICICICT), (2017) 9.

34
Prathibha S R, AnupamaHongal, Jyothi M P, IotBased Monitoring System InSmart
Agriculture, International Conference on RecentAdvances in Electronics and
Communication Technology, (2017). 4.

Ravi Kiran Varma P and Valli Kumari V, “A Security Framework For Ethernet Based Embed-
ded Web Server,” International Journal of Embedded Systems and Applications,
vol. 2, no. 2, pp. 17-27, 2012.

Santosh Pattar, Rajkumar Buyya, K. R. Venugopal, Searching for the IoT Resources:
Fundamentals, Requirements, Comprehensive Review and Future Directions, IEEE
Communications Surveys & Tutorials (2018) 5

Seung Ho Kim; Jong Mun Jeong; Min Tae Hwang; Chang Soon Kang, Development of an
IoT-based atmospheric environment monitoring system, International Conference on
Information and Communication Technology Convergence (ICTC), (2017) 10.

T. Abbasov, T. Karadağ, and E. Karaca, “Elektrik Toplu Taşıma Araçlarında Elektromanyetik


Alanların Ölçülmesi ve Değerlendirilmesi”, Emanet, 2015, 13-15 Nov. 2015, pp.1-3.

T. Etem, T. Abbasov, "Electric Field Measurements of a Base Station at 2G and 3G Frequen-


cies",2016 XII International Conference on Perspective Technologies and Methods in
MEMS Design, pp. 110-113, 2016.

Waqas Anwaar and Munam Ali Shah, “Energy Efficient Computing: A Comparison of Rasp-
berry PI with Modern Devices,” International Journal of Computer and Informa-
tion Technology, vol. 04, no. 02, pp. 410-413, March 2015.

35
APPENDIX
Source Code for MQ135
import os
import time
import busio
import digitalio
import board
import adafruit_mcp3xxx.mcp3008 as MCP
from adafruit_mcp3xxx.analog_in import AnalogIn
# create the spi bus
spi = busio.SPI(clock=board.SCK, MISO=board.MISO, MOSI=board.MOSI)
# create the cs (chip select)
cs = digitalio.DigitalInOut(board.D22)
# create the mcp object
mcp = MCP.MCP3008(spi, cs)
# create an analog input channel on pin 0
chan0 = AnalogIn(mcp, MCP.P0)
print('Raw ADC Value: ', chan0.value)
print('ADC Voltage: ' + str(chan0.voltage) + 'V')
last_read = 0 # this keeps track of the last potentiometer value
tolerance = 250 # to keep from being jittery we'll only change
# volume when the pot has moved a significant amount
# on a 16-bit ADC
def remap_range(value, left_min, left_max, right_min, right_max):
# this remaps a value from original (left) range to new (right) range
# Figure out how 'wide' each range is
left_span = left_max - left_min
right_span = right_max - right_min
# Convert the left range into a 0-1 range (int)
valueScaled = int(value - left_min) / int(left_span)
# Convert the 0-1 range into a value in the right range.
return int(right_min + (valueScaled * right_span))
while True:
# we'll assume that the pot didn't move
36
trim_pot_changed = False
# read the analog pin
trim_pot = chan0.value

AM2301 SENSOR
// DHT Temperature & Humidity Sensor
// Unified Sensor Library Example
// Written by Tony DiCola for Adafruit Industries
// Released under an MIT license.
// REQUIRES the following Arduino libraries:
// - DHT Sensor Library: https://github.com/adafruit/DHT-sensor-library
// - Adafruit Unified Sensor Lib:
https://github.com/adafruit/Adafruit_Sensor

#include <Adafruit_Sensor.h>
#include <DHT.h>
#include <DHT_U.h>

#define DHTPIN 2 // Digital pin connected to the DHT sensor


// Feather HUZZAH ESP8266 note: use pins 3, 4, 5, 12, 13 or 14 --
// Pin 15 can work but DHT must be disconnected during program upload.

// Uncomment the type of sensor in use:


//#define DHTTYPE DHT11 // DHT 11
//#define DHTTYPE DHT22 // DHT 22 (AM2302)
//#define DHTTYPE DHT21 // DHT 21 (AM2301)

// See guide for details on sensor wiring and usage:


// https://learn.adafruit.com/dht/overview

DHT_Unified dht(DHTPIN, DHTTYPE);

uint32_t delayMS;

void setup() {
Serial.begin(9600);
// Initialize device.
dht.begin();
Serial.println(F("DHTxx Unified Sensor Example"));
// Print temperature sensor details.
sensor_t sensor;
dht.temperature().getSensor(&sensor);
Serial.println(F("------------------------------------"));
Serial.println(F("Temperature Sensor"));
Serial.print (F("Sensor Type: ")); Serial.println(sensor.name);
Serial.print (F("Driver Ver: ")); Serial.println(sensor.version);
Serial.print (F("Unique ID: ")); Serial.println(sensor.sensor_id);
Serial.print (F("Max Value: ")); Serial.print(sensor.max_value); Seri-
al.println(F("°C"));
Serial.print (F("Min Value: ")); Serial.print(sensor.min_value); Seri-
al.println(F("°C"));
Serial.print (F("Resolution: ")); Serial.print(sensor.resolution); Se-
rial.println(F("°C"));
Serial.println(F("------------------------------------"));
// Print humidity sensor details.
dht.humidity().getSensor(&sensor);
Serial.println(F("Humidity Sensor"));

37
Serial.print (F("Sensor Type: ")); Serial.println(sensor.name);
Serial.print (F("Driver Ver: ")); Serial.println(sensor.version);
Serial.print (F("Unique ID: ")); Serial.println(sensor.sensor_id);
Serial.print (F("Max Value: ")); Serial.print(sensor.max_value); Seri-
al.println(F("%"));
Serial.print (F("Min Value: ")); Serial.print(sensor.min_value); Seri-
al.println(F("%"));
Serial.print (F("Resolution: ")); Serial.print(sensor.resolution); Se-
rial.println(F("%"));
Serial.println(F("------------------------------------"));
// Set delay between sensor readings based on sensor details.
delayMS = sensor.min_delay / 1000;
}

void loop() {
// Delay between measurements.
delay(delayMS);
// Get temperature event and print its value.
sensors_event_t event;
dht.temperature().getEvent(&event);
if (isnan(event.temperature)) {
Serial.println(F("Error reading temperature!"));
}
else {
Serial.print(F("Temperature: "));
Serial.print(event.temperature);
Serial.println(F("°C"));
}
// Get humidity event and print its value.
dht.humidity().getEvent(&event);
if (isnan(event.relative_humidity)) {
Serial.println(F("Error reading humidity!"));
}
else {
Serial.print(F("Humidity: "));
Serial.print(event.relative_humidity);
Serial.println(F("%"));
}
}

38

You might also like