Real-Time Environment Monitoring System Using ESP8266 and ThingSpeak On Internet of Things Platform

Download as pdf or txt
Download as pdf or txt
You are on page 1of 5

Proceedings of the International Conference on Intelligent Computing and Control Systems (ICICCS 2019)

IEEE Xplore Part Number: CFP19K34-ART; ISBN: 978-1-5386-8113-8

Real-time Environment Monitoring System using


ESP8266 and ThingSpeak on Internet of Things
Platform
Asish Behera Jagdish Kumar Naik
M rs. Debapriya Parida
Electronics & Telecommunication Electronics & Telecommunication Electronics & Telecommunication
Engineering Engineering
Engineering
Indira Gandhi Institute of Technology Indira Gandhi Institute of Technology
Indira Gandhi Institute of Technology
Dhenkanal, India Dhenkanal, India
Dhenkanal, India
dparida85@gmail.com asish12behera@gmail.com naikjagdish007@gmail.com

Soumyaranjan Pattanaik Rajat Sekhar Nanda


Electronics & Telecommunication
Electronics & Telecommunication
Engineering
Engineering
Indira Gandhi Institute of Technology
Indira Gandhi Institute of Technology
Dhenkanal, India
Dhenkanal, India
rajatsekhar9090@gmail.com
soumyaranjan75042@gmail.com

Abstract— Due to increasing inhabitants in metropolitan areas These devices can interact and communicate with others
as well as ru ral areas requires an acceptable condition of services over the Internet, and they can be remotely monitored and
and the basic physical and organizational structu res. It becomes controlled. The IoT model intends to make the Internet even
necessary to monitor the real-time weather condition of one place more determined and allows us to mon itor and to know vital
from another place. At the same time the measu rement of the air changes in our environ ment through the devices that include
quality is also shows an important parameter to the environment.
For measuring these parameters IoT plays an important role sensing, processing and transmitting the data to the cloud
through the help of sensor networks encompassing our which stores the data and analyzes the data. Moreover, by
environment. The Internet of Things is the next Internet. It enabling easy access and communication with a broad range
broadens the reach of connectivity much beyond phones and of devices such as surveillance cameras, ho me appliances,
computers to virtually any entity that has a chip and a data lines monitoring sensors and so on, the IoT is executed for the
interface. IoT assembles data from electronic sensors. This growth of applications that makes use of the massive
system is designed to transmit the generated data and stored in amount and the data created by such objects provide
cloud so that the information can be analyzed in different services. This technique locates application in many
applications. This paper shows the real-time monitoring of different areas, such as mobile healthcare, ho me auto mation,
temperatu re, humidity and air quality using the Internet of
Things (IoT) on ThingSpeak cloud. environment monitoring system, traffic management and
many others [3].
Environmental observing is an essential IoT application
which occupies monitoring the neighboring environment
KEY W ORDS - INTERNET OF T HIN GS(IO T), API KEY, CLOUD , and accounting this data for efficient short term measures
ENVIRONMENT MONITORING, SENSORS, THINGSPEAK. such as remotely controlling the devices and long term data
analysis and measures. This paper shows the realization
I. INT RODUCT ION details and results of an environmental monitoring system.
As modern devices and sensors continue to raise in power The system consists of a NodeMCU ESP8266 Wi-Fi
and functionality and to decrease in their cost, internet of module wh ich interfaces with DHT11 hu midity
things (IoT) co mes out as a widespread platform and service and temperature monitoring sensor along with MQ-7 gas
for consumer electronics [1].The Internet of Things (IoT) is monitoring system at the input side and at the output s ide
after that the Internet. The recent emergence of smart cities the sensed data is sent through Internet to a remote cloud
and open environments are able to facilitate citizens by storage open IoT API ThingSpeak. The Internet of Things
increasing their quality of life, further boosting research in (IoT) provides a pro mising solution for online mon itoring
IoT technologies and related standards as a fundamental and related activities, along with wireless sensor networks
building block for these new scenarios in globally integrated (WSNs) and mobile Internet. IoT has developed from a
communicat ions platforms. The Internet of Things (IoT) convergence of technologies including wireless
offers a pro mising key for online monitoring and its related communicat ion, the Internet and micro electro mechanical
activities [2]. It extends the reach of connectivity much systems [4],[ 5].
beyond computers and phones to virtually any object that
has a chip and a radio interface. IoT also generates new The outcomes of the project exp lain the real-time
openings to transform businesses in any sector because of monitoring of humid ity and temperature levels f ro m any
connecting more things and correlating mo re data. IoT location in the world and its statistical analysis. This also
refers to the concept of imp lanting electronics, Internet shows the air quality of that particular environment. This
connectivity, and other forms of hardware (such as sensors).

978-1-5386-8113-8/19/$31.00 ©2019 IEEE 225

Authorized licensed use limited to: University of Wollongong. Downloaded on May 30,2020 at 16:19:05 UTC from IEEE Xplore. Restrictions apply.
Proceedings of the International Conference on Intelligent Computing and Control Systems (ICICCS 2019)
IEEE Xplore Part Number: CFP19K34-ART; ISBN: 978-1-5386-8113-8

system can be expanded to permit remote controlling o f


appliances based on sensed data.

II. PROPOSED SYSTEM WITH HARDWARE


DESCRIPTION
Environmental conditions of any surroundings are
monitored and data is transmitted to the cloud most
importantly it will transmit the real time environment. Any
abnormalities in environment can be updated in cloud and
the condition can be viewed by everybody with the help of
internet. The co mb ination of Internet and the emerging
technologies such as near-field co mmunicat ions, real-time
localization, and embedded sensors could help us to
understand and react to environment. This system allows
taking actions if the condition of environ ment goes
abnormal.

Fig. 2. GPIO notations of ESP8266

The processor chip has 16 GPIO lines, and some of which


are used to interface with other co mponents of the SoC, like
flash memo ry. There are about 11 GPIO p ins remain ing for
used for GPIO purpose. Two pins out of 11 GPIO are
generally reserved for RX (receiver) and TX (trans mitter) in
order to communicate with a host PC fro m which co mpiled
object code is downloaded. This module gets charged and
informat ion gets transferred fro m host to board through
USB cable.

Fig. 1. Hardware block diagram

This system is main ly co mposed of NodeMCU ESP8266


microcontroller with Wi-Fi module, temperature sensor,
humid ity sensor, gas sensor and power supply source with
buzzer and led ind ication. The figure 1 shows the flow of
the system functionality where the DHT11 gives the live
reading of temperature and hu midity as well as MQ7 g ives
the concentration of gas in environment, simultaneously to
Fig. 3. NodeMCU ESP8266 microcontroller with Wi-Fi
the NodeMCU ESP8266 microcontroller with W i-Fi module
module
over the internet through ThingSpeak cloud. Entire data
transmitted fro m these sensors are stored in ThingSpeak B. Sensors
database where it is analy zed and mon itored for futher
reactions. We chosen temperature, hu midity and gas sensor for
environmental mon itoring and using a single sensor with
A. NodeMCU ESP8266 microcontroller with Wi-Fi module both (humid ity and temperature) sensing capabilities instead
of separate sensors for each parameter. So, we selected
NodeMCU is an open source IoT platform wh ich runs on DHT11 co mposite sensor chip and that gives readings for
ESP8266 Wi-Fi So C and the hardware is based on ESP-12 both humidity and temperature all together, it has high
module. It refers to firmware rather than the development o f reliability and excellent long-term stability and it has three
kits that provides access to these GPIOs of ESP8266 and it terminals VCC, DATA and GND. It is small in dimensions,
is widely used in various IoT applications. It provides access low cost. Also it has good quality, strong anti-interference
to the GPIO (General Pu rpose Input/Output) of the module ability, fast response, precise calibrat ion and digital signal
and It can be either input pin or the output pin, whose output[6],[7].
behavior can be controlled at the time of running.

978-1-5386-8113-8/19/$31.00 ©2019 IEEE 226

Authorized licensed use limited to: University of Wollongong. Downloaded on May 30,2020 at 16:19:05 UTC from IEEE Xplore. Restrictions apply.
Proceedings of the International Conference on Intelligent Computing and Control Systems (ICICCS 2019)
IEEE Xplore Part Number: CFP19K34-ART; ISBN: 978-1-5386-8113-8

C. Applications
After receiv ing the data the program that consumes the
informat ion and sent it to each and every device which are
connected with this platform[9].

Fig. 4. DHT11 sensor

And MQ7 gas sensor has been selected for air quality
monitoring of the environ ment. Th is is a simp le Carbon
Monoxide (CO) sensor, and it is used for sensing CO
concentrations in the air. This sensor has a high sensitivity
and fast response time .

Fig.6. Architecture of IoT

Software plays an important role in the integration and


Fig. 5. Gas sensor working of hardware design. There are two parts to our
software development: init ialization and configuration of
hardware, and the development of the user interface.
III. IMPLEMENTATION ON THINGSPEA K
IoT system provides a simple but powerful capability to
work on different kind of devices and applications by
exchanging information. IoT services are responsible for
distributing messages to the clients connected with the
platform. ThingSpeak is an Internet of Things
(IoT) p latform that gathers and stores the sensor data in the
cloud and develop the IoT applications. The ThingSpeak
IoT platform provides apps that let you analyze and
visualize your data in MATLA B, and then act on the data.
Sensor data can be sent to ThingSpeak fro m NodeMCU
ESP8266 Wi-Fi module . This paper discuss about the
environmental parameters such as temperature, hu midity
and gas variations in a particular place using the data
received fro m the respective sensors, and displayed in
ThingSpeak.
A. Cloud
Cloud systems consist of infrastructure and software that
can be brought in the shape of remote services on a pay -as-
you-go pricing model; these cloud systems have been
described as the subsequent step of the Internet’s
evolution[8]. It is considered to be the store house of the
data and can be shared by the devices with specific

privileges that define the access rites of storing the data.
Generally the user gets an API key, the password and the
device purpose for which it is registered. Using this A PI Fig.7. software imp lementation 
keys and the password that has set up by the user by taking
the Wi-Fi hotspot of the user could access the data received Arduino IDE was used to program for data received
from the devices. fro m sensor and data is transmitted to the cloud.
After testing the hardware components individually,
B. Devices
integrated on board. First of all, the Wi-Fi module
They act as sensors used for various purposes of monitoring was initialized by sending the commands. After the
and transmitting the data to the cloud. In this paper the initialization, we configured the Wi-Fi module
sensors we have used are DHT11 co mposite sensor (fo r ESP8266. Finally we wrote software for reading the
temperature and humidity) and MQ7 Gas sensor. sensor data from DHT11 and MQ 7 that provides

978-1-5386-8113-8/19/$31.00 ©2019 IEEE 227

Authorized licensed use limited to: University of Wollongong. Downloaded on May 30,2020 at 16:19:05 UTC from IEEE Xplore. Restrictions apply.
Proceedings of the International Conference on Intelligent Computing and Control Systems (ICICCS 2019)
IEEE Xplore Part Number: CFP19K34-ART; ISBN: 978-1-5386-8113-8

both temperature, hu mid ity and gas readings in real- V. RESULT


time application. Once sensor data is uploaded to the
The result of different environ mental conditions such as
cloud, we use the IoT analytics service of
temperature, humid ity gas can be measured, based on the
ThingSpeak to aggregate, visualize and analyze live
data. The Wi-Fi module sends data to the cloud inputs from different sensors. In this paper we have selected
through its assigned IP. Once connected to three fields on ThingSpeak. We have assigned humidity in
ThingSpeak, an API key is assigned to monitor the the first field, temperature in the second field and the third
readings. After every devices connected we can see field is for the gas sensor. The graph in Fig.(10) shows
the login page 212 where the user has to login with humid ity vs. time where the changes in humidity are
particular API key and the token which is given by updated after an interval of 15 seconds. Here we can able to
the cloud so that the privacy is maintained by the find the humidity and average value is 95.
server[10].
Actualization of the IoT perception into true world is
feasible through integration of some enabling
technologies [11]. IISs (Integrated Information
systems), involve several types of technologies offer a
good solution to the complex tasks in the
environment management and monitoring [12].

Fig .10. Humidity variation graph

Likewise humid ity here we have set the temperature


Fig 8. ThingSpeak login page threshold value at 32 degree centigrade. The temperature
value should be below 32 if it exceeds the default value, the
IV. EXECUTION circuit trips. The graph Fig. (11) is temperature vs. time
where the temperature changes are updated after an interval
NodeMCU module is powerd using USB cable and the of 15 seconds.
three sensors are connected to it and led and bu zzer is
connected for alert signal. Wifi module gets the input
fro m these sensors and powered using transformer. The
USB cable not only gives power but transfers the data
fro m co mputer. In software programming we have set
the default value, when the temperature excceds the
value ,the circuit trips and it can be identified by red
light ind ication and continuous buzzer sound till the
temperature value lowers down the default value wh ich
acts as an alert signal.

Fig .11. Temperature variation graph

The level of CO concentration is measured using a system


called Parts per M illion (pp m). A concentration of 70pp m o f
CO is enough to produce negative effects in healthy human
beings. If the concentration is of 400pp m then it causes a
death over just a couple of hours. CO is just like a silent
killer since it has no color, no taste and no smell. Most
people who are exposed do not even know it. So it is
important to measure the concentration level of CO present
Fig .9. Model

978-1-5386-8113-8/19/$31.00 ©2019 IEEE 228

Authorized licensed use limited to: University of Wollongong. Downloaded on May 30,2020 at 16:19:05 UTC from IEEE Xplore. Restrictions apply.
Proceedings of the International Conference on Intelligent Computing and Control Systems (ICICCS 2019)
IEEE Xplore Part Number: CFP19K34-ART; ISBN: 978-1-5386-8113-8

over certain specific area. The graph in Fig.(12) shows gas REFERENCES
vs. time where the changes in gas are updated after an [1] Jeong, Yuna, Hyuntae Joo, Gyeonghwan Hong, Dongkun Shin, and
interval of 15 seconds. Our result measuring the Sungkil Lee. "AVIoT : Web-based interactive authoring and
concentration of CO in a roo m and its value is d iffe rent at visualization of indoor internet of things." IEEE Transactions on
Consumer Electronics 61, no. 3 (2015): 295-301.
different time and its maximu m value is 150ppm. It is
[2] Zhang, Feng, Min Liu, Zhuo Zhou, and Weiming Shen. "An IoT -
suitable for sensing CO concentrations in the air. The MQ-7 based online monitoring system for continuous steel casting." IEEE
gas sensor can detect CO gas concentrations anywhere fro m Internet of Things Journal 3, no. 6 (2016): 1355-1363.
20 to 2000ppm. [3] G. Eason, B. Noble, and I. N. Sneddon, “On certain integrals of
Lipschitz-Hankel type involving products of Bessel functions,” Phil.
T rans. Roy. Soc. London, vol. A247, pp. 529–551, April 1955.
[4] Zafar, Saima, Ghosia Miraj, Rajaa Baloch, Danish Murtaza, and
Khadija Arshad. "An IoT Based Real-T ime Environmental
Monitoring System Using Arduino and Cloud Service." Engineering,
Technology & Applied Science Research 8, no. 4 (2018): 3238-3242.
[5] Uma, K., M. Swetha, M. Manisha, S. Revathi, and Anand Kannan.
"IOT based Environment Condition Monitoring System." Indian
Journal of Science and Technology 10, no. 17 (2017).
[6] Jha, Ram Krishna, Santosh Kumar, Kireet Joshi, and Rajneesh
Pandey. "Field monitoring using IoT in agriculture." In 2017
International Conference on Intelligent Computing, Instrumentation
and Control Technologies (ICICICT), pp. 1417-1420. IEEE, 2017.
[7] Halder, Sourabh, and G. Sivakumar. "Embedded based remote
monitoring station for live streaming of temperature and humidity."
In 2017 International Conference on Electrical, Electronics,
Communication, Computer, and Optimization Techniques
(ICEECCOT), pp. 284-287. IEEE, 2017.
Fig .12. Gas variation graph [8] Balampanis, Stylianos, Stelios Sotiriadis, and Euripides GM Petrakis.
"Internet of things architecture for enhanced living
So this model can be placed anywhere we want to measure environments." IEEE Cloud Computing 3, no. 6 (2016): 28-34.
the humidity, temperature as well as level o f CO [9] Sung, Wen-T sai, Jui-Ho Chen, and Ming-Han Tsai. "Applications of
concentration. wireless sensor network for monitoring system based on IOT."
In 2016 IEEE International Conference on Systems, Man, and
Cybernetics (SMC), pp. 000613-000617. IEEE, 2016.
[10] A. Zanella et al., “Internet of Things for Smart Cities,” IEEE Internet
of T hings J., vol. 1, no. 1, Feb. 2014, pp. 22–32
VI. CONCLUSION [11] Atzori, Luigi, Antonio Iera, and Giacomo Morabito. "The internet of
things: A survey." Computer networks 54, no. 15 (2010): 2787-2805.
The proposed real t ime environ ment monitoring based on [12] Fang, Shifeng, Li Da Xu, Yunqiang Zhu, Jiaerheng Ahati, Huan Pei,
Jianwu Yan, and Zhihui Liu. "An integrated system for regional
IoT is a consistent and rapid system that helps to monitor environmental monitoring and management based on internet of
the environment parameters such as temperature, hu mid ity, things." IEEE Transactions on Industrial Informatics 10, no. 2
air quality and so on. This paper shows the result of real- (2014):1596-1605.
time variation of temperature and humid ity with the help of
DHT11 co mposite sensor and air quality by using MQ7 Gas
sensor.

978-1-5386-8113-8/19/$31.00 ©2019 IEEE 229

Authorized licensed use limited to: University of Wollongong. Downloaded on May 30,2020 at 16:19:05 UTC from IEEE Xplore. Restrictions apply.

You might also like