0% found this document useful (0 votes)
9 views6 pages

SmartEnvironmentDataMonitoring-Final

Uploaded by

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

SmartEnvironmentDataMonitoring-Final

Uploaded by

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

See discussions, stats, and author profiles for this publication at: https://www.researchgate.

net/publication/333158468

Smart Environment Data Monitoring

Conference Paper · April 2019


DOI: 10.1109/ICCISci.2019.8716469

CITATIONS READS

6 2,028

1 author:

Amir Hammami
College of Sciences and Humanities - Afif- Shaqra University - Saudi Arabia
4 PUBLICATIONS 12 CITATIONS

SEE PROFILE

All content following this page was uploaded by Amir Hammami on 03 March 2020.

The user has requested enhancement of the downloaded file.


Smart Environment Data Monitoring
Amir Hammami
Faculty of Business Administration, Computer Science Department
Afif Branch, Shaqra University, Kingdom of Saudi Arabia
Ecole Nationale d’Ingénieurs de Gabès, Tunisia
[email protected]

Abstract—This research proposed a web-based monitoring Arduino are not expensive. They offer low cost technologies.
system that can help to view in real time environment data like It is possible to put several autonomous devices in different
temperature and humidity. By using sensors connected to places that send the data continuously. Real-time monitoring
Arduino Microcontroller, the system collects data, transmits becomes possible through this platform.
them to the Raspberry Pi Minicomputer which stores them on
remote server and makes them available to Internet users. We This paper is structured as following: section 2 presents
use Wi-Fi Router based on GSM/GPRS Module as the network several related works dealing with the problematic of data
unity to send collected environment data to ThingSpeak web collection and publishing them to the Internet. Section 3
server. A supervisor through a dashboard monitors various gives more details about Internet of Things concept and the
data. The system can help to resolve emergencies. In this way, associated architecture. In section 4 we describe the overall
it simultaneously improves the quality of the environment system architecture and present offered services and features.
through constant attention. This project enters in the concept Section 5 introduces hardware equipment that makes up our
of Internet of Things which consists of integrating the real- system. A description of the software part will be presented
world into the Internet. in section 6, before concluding the paper and citing the
perspectives in section 7.
Keywords—Environment Monitoring, Internet of Things,
Arduino, Raspberry Pi
II. LITERATURE REVIEW
I. INTRODUCTION We distinguish tow axes depending on the content of the
literature review: (i) The first axe deals with the subject and
Internet of Things (or IoT) is a new IT concept that has
the problematic of monitoring environment data. (ii) The
emerged in recent years and is growing very quickly. The
second axe deals with technical aspect of the project
main purpose focuses on connecting real-world objects to the
implementation.
Internet through different technologies. We can connect
temperature, rain, humidity and soil sensors to servers
connected to the Internet. It is therefore possible to store A. Environment Data Monitoring
different types of information (temperature, humidity …) Data monitoring system has been widely used in many
then analyze them later and make appropriate decisions and fields especially in case of weather station. Authors in [1]
interventions. Real data, collected from the various sensors, present an automated weather station for real time and local
inform the users about the evolution of their environment in measurements. Their system continuously measures several
real-time. Beyond the simple provision of information, the weather factors. The results are displayed in an iOS and
aggregation of these data from heterogeneous sources Android application through blynk 1 platform. Two parts
enables to quantify the surrounding environment in order to compose the system which are located indoor and outdoor.
identify trends and enrich uses. After collecting data and Another weather station is presented in [2]. The hardware
transmitting them to database, the supervisor monitors these module is based on Arduino board and Zigbee wireless
data and observes evolution. If data exceeds a certain technology. It measures the meteorological data including air
threshold, alerts can be evoked. temperature and barometric pressure.
In this research project, we propose a computer system
B. Technical Aspects
whose main objective is to connect different sensors to a web
server linked with a database. It is possible to collect From a technical point of view, data monitoring issue has
different data for a later exploitation. This system consists of been treated widely since the emergence of the Internet of
two parts: hardware and software. The hardware part collects Things. We define three major roles: collect data, store
information in real time using sensors connected to the values and finally access these values. Data collection can be
Arduino Microcontroller. Arduino is also attached to performed using sensors connected to Arduino MC or
Raspberry Pi Minicomputer via serial communication. RPi attached to Raspberry Pi Minicomputer. Data storing can be
transmits data to Internet based on Wi-Fi router via wireless done locally on each board or remotely on servers located in
communication. The software part takes care of storing the Internet. Finally data visualization can be performed by
collected environment data on remote database. Using a direct access to Arduino or Raspaberry Pi if data is stored
Python script on RPi, we publish values to ThingSpeak locally. It can also be done via web navigators that access
sever. It is then possible to monitor data and execute web servers if data is stored remotely.
selection queries in order to analyze, extract relevant
information, act and make specific decisions.
The main advantage of our approach is the real-time
environment data monitoring and the ability to read
information from Internet while being located in another
place. In addition hardware components like sensors and 1
https://www.blynk.cc/
(2019 ICCIS) 978-1-5386-8125-1©2019 IEEE
III. INTERNET OF THINGS The second direction: from top to bottom includes
projects where we activate actuators. From the Application
A. Definition Layer we perform actions. These actions are transmitted to
IoT is referred to as “a set of technologies for accessing the bottom Layer (usually located on another device) and do
the data collected by various devices through wireless and something. For example it is possible to turn on and turn off
wired Internet networks” [3]. Although there are notable a fire extinguisher when fire ignites from outside by simple
differences in the definitions of IoT, a common explanation Internet connection without risking injury.
is the ability to provide valuable and beneficial information
by various devices through wireless and wired Internet IV. SYSTEM ARCHITECTURE
networks. In another words it consists of connecting real The System proposed in this paper has the following
world to Internet. Things are objects from the surrounding features:
environment like temperature and light. Sensors and
actuators are connected to remote servers through Internet.  Measure of temperature, humidity and other
environment data through sensors connected to
B. Architecture Arduino MC.
The architecture of Internet of Things is based on four  Transmission of collected data (GPS location and
layers as described in [4]: Physical Layer, Process Layer, other values) to Raspberry Pi Minicomputer using
Network Layer and finally Application Layer. Number of USB cable,
researchers adds another layer called Business Layer. The
bottom layer the physical layer interacts with the real world.  Publishing values to a remote server (ThingSpeak)
It is composed of two parts: sensors and actuators. Sensors periodically after a predefined time interval (Push
are electronic components which role consists of sensing and Mode),
collecting data from real objects. A better term for a sensor is  A supervisor monitors the collected data in real-time
a transducer [5]. A transducer is any physical device that and can visualize positions on Google map using
converts one form of energy into another. So, in the case of a Smartphone or Laptop (Pull Mode) by simple Internet
sensor, the transducer converts some physical phenomenon connection.
into an electrical impulse that can then be interpreted to
determine a reading. There are many different types of  With data collected and analyzed, we can make
sensors. Flow sensors, temperature sensors, voltage sensors, decision about this environment and perform
humidity sensors, and the list go on. Another type of intervention.
transducer that we encounter in many IoT systems is an
actuator. In simple terms, an actuator operates in the reverse The system follows a layered architecture that can be
direction of a sensor. It takes an electrical input and turns it mapped to the Internet of Things layers. In particular the
into physical action. For instance, an electric motor, a Application Layer concerns the analysis layer based on web
hydraulic system, and a pneumatic system are all different technologies. This architecture implements the previous
types of actuators. The Process Layer is the brain part to listed features.
control all connected devices. It can be composed of: Application Layer
Arduino Microcontroller or Raspberry Pi Minicomputer. It Dashboard
contains hardware and software working together to achieve
special goal. The network Layer enables connectivity and it
is responsible of sending and receiving data based on wired Network Layer Wi-Fi Router
or wireless network. On top of the architecture we find the
Application Layer that illustrates the purpose of the IoT
project. An Internet navigator loads a dynamic web page Process Layer Arduino attached to RPi
acting as a monitor to visualize the collected data through
sensors. It may contain buttons to activate actuators for
example. Perception Layer Sensors
From this architecture we can extract two different
directions of flow of instructions: From bottom to the top and Fig. 1. Layered Architecture
from top to the bottom. The first direction typically concerns
monitoring-based applications like GPS Tracking or From this architecture we identify four major steps to
Continuous Environment Monitoring System like the enable real-time data monitoring:
proposed one. These kinds of applications follow three main
steps: (i) Data collection from sensors, (ii) local or remote 1. Capture environment data like temperature and humidity.
storage and (iii) Analysis step. Data collection is realized in This is done using sensors connected to Arduino board,
the physical layer (called also Perception Layer). It is used 2. Make the Arduino write the values to the Serial port to
for gathering data from various sensors. The amount of data Raspberry Pi,
collected can increases in an exponential manner. Here we
talk about Big Data issues. After collecting data the next step 3. Have a Python program running in the Raspberry Pi that
deals with Storage. It can be done locally on SD memory reads from the Serial port and then stores the values into
card for example or on remote database located on the ThingSpeak server,
Internet. Here we talk about Cloud Computing. Finally the 4. In the end, we can point the internet browser to a
Analysis step deals with how to use these collected data and ThingSpeak website and get a plot of the collected data.
more interesting what decision can be taken.
Store data on remote
Web Server

GPS
Coordinates
Send Data

Collect environment data


Supervisor

For measuring humidity DHT11 uses the humidity


sensing component which has two electrodes with moisture
Fig. 2. Global Architecture holding substrate between them. So as the humidity changes,
the conductivity of the substrate changes or the resistance
The proposed work is implemented in two steps i.e., in between these electrodes changes. This change in resistance
Hardware configuration and Software implementation which is measured and processed by the IC which makes it ready to
are discussed below. be read by a microcontroller.

V. HARDWARE COMPONENTS
The associated electronic components for the different
layers and their functionalities are given below:

A. Perception Layer
Sensors convert various forms of physical energy into
electrical energy, allowing microcontrollers to read changes
in the physical world. Many sensors work by converting the Fig. 4. Humidity Sensing Component
energy they read into a changing electrical resistance by
using a variably resistive material at their heart. For example, On the other hand, for measuring temperature the
Photoresistors or light dependent resistors change their component uses a NTC temperature sensor or a thermistor. A
resistance when exposed to a change in light energy. In order thermistor is actually a variable resistor that changes its
to read changes in resistance, we typically place these resistance with change of the temperature. It is made by
sensors in a voltage divider circuit, which converts the sintering of semiconductive materials such as ceramics or
resistance change into a changing voltage. polymers in order to provide larger changes in the resistance
with just small changes in temperature. The term “NTC”
The DHT11 is a digital sensor that gets relative humidity means “Negative Temperature Coefficient”, which means
and temperature readings. Because of their low cost and that the resistance decreases with increase of the temperature.
small size, DHT11 sensors are perfect for lots of different
DIY electronics projects. The sensor consists of a humidity
sensing component, a NTC temperature sensor (or
thermistor) and an IC on the back side of the sensor.

Fig. 5. Negative Temperature Coefficient

Fig. 3. DHT11 Sensor


B. Process Layer: Arduino attached to Raspberry Pi GSM (Global System for Mobile communication) is digital
Raspberry Pi is a mini, fully functional computer. It runs cellular system used for mobile devices. It is an international
Linux and there are many ready-to-use resources for it. It is standard for mobile which is widely used for long distance
very easy to connect Raspberry Pi to the internet and make it communication. GPRS (General Packet Radio Services) is a
a real server. Many USB devices are compatible with packet based wireless communication service that works
Raspberry Pi and can work without installing the driver. with data rate of 56-114 kbps. GSM already has GPRS
Raspberry Pi provides up to 17 GPIO pins for programming; facilities inbuilt. A SIM card (pre-paid) is required to
however that’s usually not enough if we plan to build a implement the data monitoring system.
serious project. In addition Raspberry Pi could not accept The internal interface is based on Wi-Fi local network. It
analog input via the GPIO pins, and has only one pin that allows Raspberry Pi to be connected to the Wi-Fi hotspot and
could output PWM with hardware, these factors limit the thus to Internet. The Wi-Fi hotspot acts as a bridge between
utility of Raspberry Pi in many scenarios. Raspberry Pi and the Internet.
In this project we used HUAWEI E5330 as a mobile-Wi-
Fi device. It is produced by Huawei technologies and it
provides Internet access through any W-Fi device. The
device supports GSM/GPRS standard. It is possible to plug a
pre-paid SIM card and connect to the GSM network operator
of the country. By using this device we create our own
secure mobile Wi-Fi hotspot. This device is fast, reliable and
easy to use.

Fig. 6. Raspberry Pi 3 Model B

Arduino is a microcontroller, which will run the


predefined program to process input/output on its GPIO pins.
Better than Raspberry Pi, Arduino has some GPIO pins that
could accept analog input, and has several (usually 6) GPIO
pins that could generate PWM output with hardware. There Fig. 8. Huawei E5330 mobile Wi-Fi device
are many well designed shields for Arduino, which could
extend Arduino to do specific job. Usually Arduino doesn’t D. Application Layer: Webpage based dashboard
have network connection, and could not work as USB host. We have to make difference between two locations:
Where the system is located and from where the supervisor
monitors data. The first location denotes where the system is
placed. The system is an autonomous box with power supply
that can be placed anywhere in condition that the GSM
network is enabled. The reason of this constraint is to enable
Internet connections.
After transmitting values to a remote server, a supervisor
can visualize data on charts. A detailed description is given
in the next section.
Fig. 7. Arduino Uno

The main idea of this project is to use Arduino as the VI. SOFTWARE IMPLEMENTATION
extension of Raspberry Pi, and make the best of both boards. In the software implementation we distinguish three
We can easily access the GPIO pins on connected Arduino, levels: Arduino, Raspberry Pi and ThingSpeak.
just like they are on Raspberry Pi; accept analog input and
generate accurate PWM output via the GPIO pins on A. Arduino Level
Arduino. It is also possible to make use of the shields for
Arduino, indirectly on Raspberry Pi. Sensors convert various forms of physical energy into
electrical energy, allowing microcontrollers to receive
Our proposition consists of connecting several sensors to signals. This microcontroller is Arduino Board. So we use
Arduino Microcontroller which is also attached to Raspberry Arduino IDE to write a sketch (C program) and flush this
Pi using a standard USB cable. This solution allows us to program to the Arduino board. The program consists of two
make profit of the benefits of both boards. parts:
1. Initializing pins connected to sensors as inputs (setup()
C. Network Layer: Wi-Fi Router with SIM Card
function)
Raspberry Pi will push environment data values to a
remote server. The suitable solution consists of using a Wi-Fi 2. Infinite loop responsible of reading values, send them to
router which has two interfaces: (i) an external interface and serial port and waits a delay.
(ii) an internal interface. The external interface is based on For temperature and humidity sensor (DHT11) we use a
GSM/GPRS standard. It allows the router to be connected to library written in C language called dht.h that can be
Internet using the GSM network operator of the country. downloaded from Internet.
B. Raspberry Pi Level #Convert from Celius to Farenheit
Where to put the data became the next question. A TWF = 9/5*TW+32
customized solution consists of building a private web
server. This web server contains dynamic webpages that
interact with a database. A programming script like PHP can
be used to store data on tables and then perform selection
queries. Using a plotting JavaScript library like Flot2 allows
visualizing data on charts.
Another solution which is a simplified approach consists
of sending all collected data to a predefined remote server.
Such servers exist on Internet and are free for use for some
period of time. We can cite Google Sheets3, Dweet.io4 and
ThingSpeak5. Fig. 9. Temperature and humidity experiments

In our project we decided to leverage services offered by


ThingSpeak. It has an API and let us post and review the data VII. CONCLUSION
from anywhere. ThingSpeak is a platform providing various We have proposed an IoT based environment monitoring
services exclusively targeted for building IoT applications. system using sensors. We measure temperature and humidity
The real-time environment data are visualized in the form of using DHT11 sensor. GPS Receiver is used to locate the
charts in ThingSpeak .The “ThingSpeak channel” is the core device. This system provides several advantages in compared
element. It wills stores the data that we send to this remote to the traditional method. Mainly it allows real-time
server. monitoring that can be accessible from anywhere in the
On Raspberry Pi we run a Python script. This program is Internet. At present, we tested each module separately using
going to read data from Arduino and then publish the values basic C and Python programs. Our objective is to make all
of that data to our channel on ThingSpeak. pieces together and perform overall experiments. The
proposed system can be extensible with other sensors like
C. ThingSpeak Level rain sensor and soil moisture sensor. We can also improve
the system by sending notification to the supervisor if a value
On ThingSpeak website we should create a free account exceeds certain limits.
or login to an existing account. We create a new channel
with many fields according to environment data. The order
of the fields is important later when we post data. We will REFERENCES
also need to write API key for the channel as it will be [1] M. Farhat et al., “A Low Cost Automated Weather Station for Real
required to post data. Time Local Measurements”, Journal of Engineering, Technology and
Applied Science Research, Vol. 7, No. 3, 2017, pp. 1615-1618.
Currently we have tested our system with DHT11 sensor [2] H. S. Saini et al., “Arduino Based Automatic Wireless Weather
in order to measure temperature and humidity. Lots of Station with Remote Graphical Application and Alerts”, 3rd IEEE
experiments have been done. If we check our channel on International Conference on Signal Processing and Integrated
Networks (SPIN-2016), February 2016.
ThingSpeak we obtain the following charts:
[3] Gubbi J., Buyya R., Marusic S., Palaniswami M. “Internet of Things
(IoT): A vision, architectural elements, and future directions”, i
Future Generation Computer Systems, Vol. 29, Issue7, September
2013, pp 1645-1660.
[4] M. Aazam, I. Khan and A. AbduAllah Alaffar, “Cloud of Things:
Integrating Internet of Things and cloud computing and the issues
involved,” Proceedings of 2014 11th International Bhurban
Conference on Applied Sciences & Technology (IBCAST)
Islamabad, Pakistan, 14th-18th January, 2014, IEEE..
[5] IoT Systems: Sensors and Actuators. From website:
https://dzone.com/articles/iot-systems-sensors-and-actuators

2
https://www.flotcharts.org/
3
https://spreadsheets.google.com
4
http://dweet.io/
5
https://thingspeak.com/

View publication stats

You might also like