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

F Goyal2020

Uploaded by

sandro.nieto.m
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
4 views

F Goyal2020

Uploaded by

sandro.nieto.m
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 6

Smart Indoor Weather Monitoring Framework using

IoT Devices and Cloud Computing

Prateek Goyal Gaurav Prit Manisha Bharti


Electronics & Communication Dept. of Electrical Engineering Dept. of Electronics & Communication
AIACT&R Jamia Millia Islamia National Institute of Technology
Delhi, India Delhi, India Delhi, India
[email protected] [email protected] [email protected]

Abstract—Environmental factors heavily influence human and undertake pre-emptive measures to decrease the over-
health. The parameters for the same and their monitoring, all influence of such changes by increasing our readiness.
both in real time and long term, are of significant importance. Table I presents these environmental parameters and their
The authors of the paper have carefully chosen the parameters
and used various sensors to measure them. A group of such consequences, the importance of which helped the authors to
low-cost sensors has been networked through a Wi-Fi based contribute something in this domain. [1]–[5]
microcontroller, the data of which was uploaded on a cloud server
for easy accessibility and analysis. The cloud server ensures that
the system and the real time stats can be accessed on an android-
based smartphone application. What makes this system novel is II. R ELATED W ORKS
the parameter selection, thorough monitoring and use of single
analog pin of Node MCU microcontroller to multiplex two sensors
using diodes. The design of weather monitoring systems and stations is
Index Terms—Embedded Systems, Internet of Things (IoT), shown by various papers. The microcontroller of the choice
Sensors Interfacing, Environmental Parameters, Mobile Appli- in most papers is Arduino [6]–[8] or ATMega microcontroller
cation Development chip because of its low cost and easy interfacing. ESP-based
controller has also been used to integrate the system with
I. I NTRODUCTION internet [8]. For the sensors, almost all the papers have made
use of the temperature and humidity sensors [6]–[14] along
An indoor environment monitoring station is outfitted with with some additional sensors like gas sensor [9], rainfall &
several devices which offer data concerning the climate and wind speed measurement sensors [7], light sensor [13] and
local weather of a unique area. Such a station can be scaled solar irradiance measurement sensor [14]. The display and
from a personal level to mass level. The community as well storing methodologies is different with every paper - some
as the people will benefit from the system as they would be use LCD only for displaying the data [6], [13], some use
aware of climatic conditions in long term. SD card only for storing the data [7], some combine the
With fast paced industrialisation and automation, human functioanality of SD card with LCD [10] and others have
beings are subject to constantly increasing pollution, which used cloud databases to store data [13]. For the communication
in turn is deteriorating personal health of community as a protocols, several papers have utilized the XBee Modules [12]
whole. Health of a person is influenced by two factors: food and Wireless Transceiver (nRF24L01) [11] for transferring
habits and the environment. Therefore, it becomes crucial to data from one controller to the other. In other reference, the
keep an eye on the environmental parameters to sustain high authors [15] have made use of an existing Automatic Weather
quality human life. Food habits are something, which are Station (AWS) and stored the parameters values to a cloud-
easily controllable, if one has proper knowledge of nutrients based server for ease to display on an android application.
and food hygiene. However, environmental factors can’t be People usually have a tendency to overlook the short-term
monitored and influenced this easily. That is why a tremendous issues like fatigue, nausea, respiratory problems etc related
research and work is being undertaken to design systems with poor internal environmental conditions. Table I [1]–[5]
which can monitor indoor as well as outdoor environmental summaries these parameters along with their effects on a
parameters. person’s well-being. It is the primary step that helps to select
Through this paper, authors want to highlight how we can different parameters that need to be monitored leading to
be aware of the happenings in internal climate conditions the selection of sensor modules for this paper, where their
integration is discussed with a microcontroller.

978-1-7281-5493-0/20/$31.00 ©2020 IEEE


216

Authorized licensed use limited to: Middlesex University. Downloaded on October 27,2020 at 16:50:55 UTC from IEEE Xplore. Restrictions apply.
TABLE I: Effects of Environmental Parameters on a person’s life
aT
b( + ln RH)
Tdewpoint = b +T (1)
aT
a−( + ln RH)
b+T
where: a = 17.27
b = 237.7
RH = 0→1

III. S YSTEM C ONFIGURATION


The plan approach has been segregated into 3 sub-categories
to be specific, namely details about the hardware components,
the device block-diagram, and the process flow map. Fig. 2: T&H sensor interfacing with ESP controller

A. Hardware Components 3) BMP-180 Altitude and Pressure Sensor: BMP-180 [20]


1) Node MicroController Unit: NodeMCU [16] is a Wi-Fi is an altitude and pressure measurement sensor, based on I 2 C
based microcontroller based on ESP8266 chip architecture. It protocol. It’s main applications are in consumer products be-
is used to provide Wi-Fi connectivity to any system and can cause of its low cost, easy availability, small package size and
be programmed through the Mini-USB port by using Arduino very less power requirements. The internal architecture of the
IDE [17]. Due to it’s easy programmability, small package and BMP sensor as shown in Figure 3 consists of a piezo-resistive
ready availability, it is the most sought after controller for Wi- sensor element, an ADC (analog to digital converter), a control
Fi based solutions. The pin diagram of NodeMCU is shown unit with the I 2 C bus architecture and a memory unit. The
in Figure 1 [18]. BMP180 package comes as a fully calibrated sensor module
which can be easily interfaced with any microcontroller.

Fig. 3: P&A sensor block diagram


Fig. 1: Node MicroController pinout

4) MQ-135 Air Quality Sensor: MQ-135 air quality sensor


2) DHT-11 Temperature and Humidity Sensor: The DHT or gas sensor [21] uses Tin Oxide (SnO2 ) as the gas sensing
sensor [19] used in the context senses the surrounding tem- material due to its low conductivity in air. The conductivity of
perature & humidity and communicates these values to the the sensor is directly proportional to the concentration of gases
microcontroller in the form of digital signals. Because of the in the enivronment. MQ-135 does a good work in detecting
sensor’s simple 1-wire architecture, it can be easily interfaced smoke and other harmful gas such as ammonia, sulfide and
with any microcontroller, a sample circuit diagram of which benzene. It’s ability to detect various harmful gases (i.e.
is as shown in Figure 2. The sensor’s small package size, upto wide detecting scope), high sensitivity, small packae size, fast
20 meters transmission capability and low power requirement response, simple drive circuit and low cost makes it an ideal
makes it reliable for consumer applications. From the tem- choice for various applications of gas detection. The resistance
perature and humidity values, an additional parameter called value of MQ-135 sensing element is different for various kinds
“Dew Point” is calculated by the following equation: and various concentration of gases. So, sensitivity adjustment

217

Authorized licensed use limited to: Middlesex University. Downloaded on October 27,2020 at 16:50:55 UTC from IEEE Xplore. Restrictions apply.
is very necessary and the recommended calibration for the as interfaced with the microcontroller. The data from the
load resistance (RL ) is about 20KΩ (10KΩ to 47KΩ) in the various sensors is read by the microcontroller and is displayed
heater interface circuit as shown is Figure 4. numerically on an OLED screen for easy viewing and also
uploaded to a cloud-based server for graphical viewing. In
addition to this, the database is connected to an Android
application.

Fig. 4: Air Quality Sensors’ heater interface circuit

5) MG-811 CO2 Sensor: The MG-811 sensor is designed


and manufactured by Sandbox Electronics used for CO2
measurement. [22] The sensor module has a heating circuit
for the sensor, which is same as that of the air quality sensor
as shown in Figure 4, along with a signal conditioning circuit
provided on the sensor module itself for amplifying the output
signal. The sensor is highly sensitive to carbon-dioxide (CO2 )
and thus used in many applications like indoor air monitoring
application, air quality control and ferment process. The Fig. 5: System block diagram
output voltage from the sensor is inversely proportional to the
concentration of CO2 in the surrounding environment. C. Flow Chart
6) DS-3231 Real Time Clock Module: Real-Time clock or The process flow of the system is illustrated by a flow chart
more commonly known as RTC [23] is one of the most widely shown in Figure 6. In the beginning, when the power source is
used modules for applications wherever accurate time-keeping switched ON, the microcontroller checks if it is online or not
is of tremendous importance such as GPS, Telematics, Servers, by connecting to the nearest Wi-Fi available and if online, the
Utility Power Meters, etc. DS-3231, utilized in the paper is controller proceeds further to read the sensor values. Once all
affordable, low-power consumption and an extremely precise parameter values are retrieved, they are displayed on a OLED
module. It is based on I 2 C protocol to communicate with screen and are subsequently sent to a cloud based server -
the microcontroller. The RTC maintains the datestamp and Thingspeak, in their respective fields. As soon as the values
timestamp information that can be accessed directly through in the database fields are updated, the android application
microcontroller programming. The RTC automatically adjusts simultaneously downloads those values in a json format and
for the 30/31 day conundrum of months and leap year. The displays them to the user.
clock works in both 24-hour and 12-hour (with AM/PM
IV. E XPERIMENTAL S ETUP
indicator) configuration that can be accordingly programmed
using any microcontroller. The assembled circuit with the microcontroller, sensors,
resistor and diodes on a breadboard developed using Fritzing
7) SSD-1306 OLED Screen: SSD-1306 [24] is an Organic software [25] is shown in Figure 7. In addition to this,
Light-Emitting Diode (OLED) screen. The one used in this the assembled prototype of the circuit diagram is shown by
system has a 128x64 resolution. It can be interfaced with the Figure 8.
microcontroller using two protocols - I 2 C or SPI. SSD-1306 The problem now is that NodeMCU has only one analog
is selected due to its small size, light weight, easy portability pin - A0, but the system has two analog input sensors -
and more importantly because of it’s sharp display. Air Quality and CO2 sensors. This is solved by the use of
a technique known is “Multiplexing”. The circuit diagram
B. Block Diagram utilized for multiplexing both the sensors to A0 with the help
The block diagram consists of a central microcontroller of diodes is shown in Figure 9. In this, the power pins (VCC)
and uses two types of architecture buses - Serial and I 2 C to of the sensors is connected to different GPIO of the controller
communicate with various components as shown by Figure 5. and data pins connected through diodes to the same analog
The DC Power Supply for powering the whole system and pin (A0). When a GPIO pin is activated HIGH, the following
Software Control unit written on Arduino IDE is also shown sensor value is read by the analog pin and thereafter the same

218

Authorized licensed use limited to: Middlesex University. Downloaded on October 27,2020 at 16:50:55 UTC from IEEE Xplore. Restrictions apply.
Fig. 8: Setup picture

Fig. 9: Diode multiplexing circuit

installed and tested in a lab of area ≈ 300m2 and the data


was continuously monitored in real-time. The results shown
in Figure 10 are for a 1-hour period. Similarly the android
application screenshot in Figure 11 (for an instance of time)
shows all the parameters with their units in their respective
Fig. 6: System flow chart fields.

VI. C ONCLUSION AND F UTURE R ESEARCH


With the execution of the presented hardware and software
framework, the authors have chosen such environmental pa-
rameters which are crucial for human comfort, for example
Temperature, Humidity, CO2 level, Air Quality etc. These
parameters are measured in a specific region by using low-cost
sensors and a microcontroller with builtin Wi-Fi capability.
The microcontroller used in the system has only one analog
pin, so a simple diode circuit has been made use of to
Fig. 7: System Circuit diagram multiplex two analog output sensors to the same pin. The
parameters are then subsequently uploaded to a cloud-hosted
database with a graphical interface, which can be accessed
GPIO pin is activated LOW for the next sensor to be read in from anywhere in the world and can also be used for real-time
the same manner. observation. As the online database gets updated, the android
application also retrieves the values and displays them in their
V. R ESULTS respective fields.
The results are shown as screenshot of the Thingspeak The system proposed herein has been implemented using
Channel graphs (Figure 10) and android application (Fig- low-cost sensors for use in mostly homes, but it can be
ure 11) showing all the parameters and their respective values developed for commercial purposes such as in buildings, cold
as logged in real-time scenario. The hardware setup was storages, offices etc by using more robust and high-grade

219

Authorized licensed use limited to: Middlesex University. Downloaded on October 27,2020 at 16:50:55 UTC from IEEE Xplore. Restrictions apply.
(a) Temperature Graph (in °C) (b) Humidity Graph (in %) (c) Dew Point Graph (in °C)

(d) Pressure Graph (in mBar) (e) Altitude Graph (in mtrs) (f) Air Quality Graph

(g) CO2 Graph (in ppm)

Fig. 10: Thingspeak Database Snapshot of Environmental Parameters Graphs

[3] G. Zheng, K. Li, W. Bu, and Y. Wang, “The effects of indoor high tem-
perature on circadian rhythms of human work efficiency,” International
journal of environmental research and public health, vol. 16, no. 5, p.
759, 2019.
[4] G. Zheng, K. Li, and Y. Wang, “The effects of high-temperature
weather on human sleep quality and appetite,” International journal of
environmental research and public health, vol. 16, no. 2, p. 270, 2019.
[5] C. R. O’Lenick, O. V. Wilhelmi, R. Michael, M. H. Hayden, A. Bani-
assadi, C. Wiedinmyer, A. J. Monaghan, P. J. Crank, and D. J. Sailor,
“Urban heat and air pollution: A framework for integrating population
vulnerability and indoor exposure in health risk analyses,” Science of
The Total Environment, vol. 660, pp. 715–723, 2019.
[6] K. Krishnamurthi, S. Thapa, L. Kothari, and A. Prakash, “Arduino
based weather monitoring system,” International Journal of Engineering
Research and General Science, vol. 3, no. 2, pp. 452–458, 2015.
[7] J. C. B. Lopez and H. M. Villaruz, “Low-cost weather monitoring system
Fig. 11: Android application screenshot with online logging and data visualization,” in Humanoid, Nanotechnol-
ogy, Information Technology, Communication and Control, Environment
and Management (HNICEM), 2015 International Conference on. IEEE,
2015, pp. 1–6.
[8] S. Zafar, G. Miraj, R. Baloch, D. Murtaza, and K. Arshad, “An iot
industrial sensors, which is one area for future work. Second based real-time environmental monitoring system using arduino and
area for future research is to provide this system an automatic cloud service,” Engineering, Technology & Applied Science Research,
control mechanism, as currently the system proposed has only vol. 8, no. 4, pp. 3238–3242, 2018.
monitoring capability. [9] P. Susmitha and G. S. Bala, “Design and implementation of weather
monitoring and controlling system,” International journal of Computer
applications, vol. 97, no. 3, 2014.
[10] K. A. Noordin, C. C. Onn, and M. F. Ismail, “A low-cost microcontroller-
R EFERENCES based weather monitoring system,” CMU journal, vol. 5, no. 1, pp. 33–
39, 2006.
[1] J. A. Poole, C. S. Barnes, J. G. Demain, J. A. Bernstein, M. A. [11] J. Shah and B. Mishra, “Iot enabled environmental monitoring system
Padukudru, W. Sheehan, G. Guidos, J. Wedner, R. Codina, E. Levetin for smart cities,” in Internet of Things and Applications (IOTA), Inter-
et al., “Impact of weather and climate change with indoor and outdoor national Conference on. IEEE, 2016, pp. 383–388.
air quality in asthma,” Journal of Allergy and Clinical Immunology, [12] S. Abraham and X. Li, “A cost-effective wireless sensor network system
2019. for indoor air quality monitoring applications,” Procedia Computer
[2] G. W. Evans, “Projected behavioral impacts of global climate change,” Science, vol. 34, pp. 165–171, 2014.
Annual review of psychology, vol. 70, pp. 449–474, 2019. [13] S. N. Mahmood and F. F. Hasan, “Design of weather monitoring system

220

Authorized licensed use limited to: Middlesex University. Downloaded on October 27,2020 at 16:50:55 UTC from IEEE Xplore. Restrictions apply.
using arduino based database implementation,” Journal of Multidisci-
plinary Engineering Science and Technology (JMEST), vol. 4, no. 4, p.
7109, 2017.
[14] B. Soumia, M. K. Nallapaneni, and T. Ali, “Data acquisition system:
on the solar photovoltaic module and weather parameters monitoring,”
Procedia computer science, vol. 132, pp. 873–879, 2018.
[15] A. Munandar, H. Fakhrurroja, M. I. Rizqyawan, R. P. Pratama, J. W.
Wibowo, and I. A. F. Anto, “Design of real-time weather monitoring
system based on mobile application using automatic weather station,” in
Automation, Cognitive Science, Optics, Micro Electro-Mechanical Sys-
tem, and Information Technology (ICACOMIT), 2017 2nd International
Conference on. IEEE, 2017, pp. 44–47.
[16] I. Grokhotkov, “Esp8266 arduino core documentation,” ESP8266, 2017.
[17] Arduino, “Arduino ide.” [Online]. Available: https://www.arduino.cc/
[18] NodeMCU. [Online]. Available: https://github.com/nodemcu
[19] U. Robotics, DR, “Dht11 humidity & temperature sensor,” 2010.
[20] B. Sensortec, “Data sheet bmp180 digital pressure sensor,” Np: Bosch
Sensortec, 2013.
[21] OLIMAX, “Mq135 gas sensor.” [Online]. Available:
https://www.olimex.com/Products/Components/Sensors/SNS-MQ135/
[22] S. Electronics, “Mg811 co2 sensor.”
[23] M. DALLAS Semiconductor, “Ds3231,” I2C Integrated, 2010. [Online].
Available: https://www.maximintegrated.com/en/products/digital/real-
time-clocks/DS3231.html
[24] S. SYSTECH, “Ssd1306, datasheet oled,” Apr. 2008. [Online].
Available: http://www.solomon-systech.com/en/product/display-ic/oled-
driver-controller/ssd1306/
[25] A. Knörig, R. Wettach, and J. Cohen, “Fritzing: a tool for advancing
electronic prototyping for designers,” in Proceedings of the 3rd Inter-
national Conference on Tangible and Embedded Interaction. ACM,
2009, pp. 351–358.

221

Authorized licensed use limited to: Middlesex University. Downloaded on October 27,2020 at 16:50:55 UTC from IEEE Xplore. Restrictions apply.

You might also like