You are on page 1of 5

Development of an IoT system using ESP8266 for

the detection of asthma triggering allergens in


children
2021 IEEE 12th Annual Ubiquitous Computing, Electronics & Mobile Communication Conference (UEMCON) | 978-1-6654-0690-1/21/$31.00 ©2021 IEEE | DOI: 10.1109/UEMCON53757.2021.9666568

1st Jason Alanya Villanueva 2nd Danitza Yalli Villa 3th Angel Bello Merlo
Department of Mechatronics Department of Mechatronics Department of Mechatronics
Engineering Engineering Engineering
Universidad Continental Universidad Continental Universidad Continental
Huancayo, Peru Huancayo, Peru Huancayo, Peru
73492658@continental.edu.pe 72240247@continental.edu.pe 60319275@continental.edu.pe

4th Deyby Huamanchahua 5th Carlos Coaquira Rojo


Department of Mechatronics Engineering Department of Mechatronics Engineering
Universidad Continental Universidad Continental
Huancayo, Peru Huancayo, Peru
dhumanchahua@continental.edu.pe ccoaquira@continental.edu.pe

Abstract— Asthma is one of the diseases that are present in allergen in the classrooms of children with asthma that may
all parts of the world and a serious problem in countries with trigger any of the symptoms and may aggravate the disease [6,
low and medium resources, causing 80% of deaths of patients 7].
with symptoms of not being treated correctly. Previous studies
have shown that children with asthma are highly affected by Despite the excessive concentration of air pollutants,
environmental pollution and in Peru, the city with the highest environmental health does not capture enough service
presence of pollutants is Lima, with PM2.5 and PM10 being the delivery for good monitoring and becomes very
most worrisome as they are the most frequently detected counterproductive in developing a better asthma prognosis.
triggers in the city; For this reason, the aim is to create a system This makes it necessary to identify all the particles or
capable of detecting asthma triggers for the prevention of environmental pollutants that trigger respiratory diseases [8,
attacks. The system presented in this article seeks to measure air 9, 10]. As shown by a study carried out in the city of Lima,
quality both inside the home of children with asthma and when Peru; higher emissions of PM2.5 are present in the
it goes out, to avoid concerns on the part of parents or guardians environment that surrounds people with asthma. A greater
in charge and to alert them in case of inconvenience. any. The number of attacks are unleashed, having even more impact
system is responsible for uploading the reading of each of the than PM10 particles, as it causes a large increase in visits to
sensors to a database in the cloud so that they are later published clinics for respiratory diseases [11].
in a PWA and comparison and/or monitoring of the data can be
carried out; so that a study of the environment in which the child Given the lack of resources to stop the impact of asthma,
is found can be carried out, to take the corresponding various investigations were carried out that looked for the
precautions. In this way, the system alerted those in charge interrelation between air pollution and the prevention of
through the IFTTT application that sent a message after subsequent asthma attacks, where they focused on specific
detecting an anomaly. variables to verify the effectiveness of detecting the various
pollutants on time [12, 13]. For which, in search of developing
Keywords— IoT, asthma, trigger allergens, ESP8266. more efficient systems, sensor networks with connection to
I. INTRODUCTION the cloud or computers were used that allow data collection
and a posthumous study of the readings obtained [14, 15, 16].
Air quality in the environment has a high relationship with
respiratory diseases, one of them being asthma, which has With the aforementioned precedents, the aim is to create a
caused high morbidity in children in recent years. As the system that allows the detection of the main allergens that
WHO indicates, this disease not only requires trigger asthma in children. In a way that allows the analysis of
pharmacological treatment; but also, to avoid as much as the sensors in real-time through the technology of the internet
possible contact with any stimulus that may irritate the of things and thus achieves a system that is more efficient to
respiratory tract [1, 2]. Asthma is considered one of the most carry out good prevention of asthma attacks in addition to
common diseases on the planet, causing mainly attacks of being able to track the children suffering from this disease.
dyspnea and wheezing in patients, varying the frequency and
severity, affecting the daily tasks that people with this disease II. MATERIALS AND METHODS
could have planned [3]. As seen in Fig. 1, the system has 3 stages for its correct
operation, where the first stage shows the sensors used in the
Although asthma can be a common disease in any region system, the second shows the development board to be used
of the planet, in low- and middle-income countries it causes and the third stage shows the applications for data storage and
up to 80% of deaths when an adequate diagnosis is not interface.
received or appropriate treatment is not presented for this
disease [4, 5]. In addition, there are repercussions on people • The first stage: Consists of the data acquisition stage
who suffer from this disease due to poor development and using the base sensors for the detection of particles or
incomplete early childhood education. It causes a high rate of pollutants present in the environment that can trigger
school absenteeism by not being able to know if there is an an asthma attack in patients. The stage seeks to register

978-1-6654-0690-1/21/$31.00 ©2021 IEEE


0666

Authorized licensed use limited to: MINISTERIO DA CIENCIA E TECNOLOGIA. Downloaded on February 28,2022 at 00:43:40 UTC from IEEE Xplore. Restrictions apply.
5 types of asthma triggers, the most common of which
are PM2.5 and PM10 microparticles found in dust, in
addition to the environmental components CO2, NH3,
temperature, and humidity.
• The second stage: Seeks to carry out the processing of
the sensor readings through the internal code of the
ESP8266 development board, for which the code will
allow a comparison to be made with predetermined
values to send an alert to the user or their proxy. As
soon as the development board detects any sudden
change, an alert will be sent to the device or devices
registered through the PWA so that the respective
monitoring can be carried out.
• The third stage: It sends data to the cloud, in addition
to sending the alert message to the user and their
respective proxy. The message will contain the link to
the PWA where the data can be observed in real-time
and will allow the users to download a file with the data
from the sensor reading performed at a certain time of
the day. The data will be stored in a database managed
by MySQL that will allow the transfer of the sensor
readings to the web page constantly.

Fig. 1. Data processing stages of the allergen detection system

A. Flow chart of the IoT system asthma detection.


In Fig. 2 the diagram of the operation that is proposed for
the correct management of the system is presented, which in
the first place requires Internet access to operate correctly.
When the development board has a stable connection with the
internet network, each sensor will be read, so that when the
ESP8266 acquires the data, it will proceed to compare each of
the parameters. obtained with the values established in the
programming code. When the data is acquired by the
development board, it is sent to the cloud to be managed by Fig. 2. IoT System flow chart for asthma detection
MySQL and this allows the orderly storage of the readings
obtained from each of the sensors. After the result of the B. Hardware design of the IoT system asthma detection.
comparison, a function is called to connect with the IFTTT It is proposed to carry out the hardware design using 2
services and with the database server to send the readings in essential devices in the system, which are the sensors that
real-time. IFTTT services will allow recognizing which is the allow detecting irritating allergens in the environment where
variable or variables that present an anomaly to be able to the system is located and the ESP8266 development board as
report it through the web page, which will be used as an a means of interconnection with the cloud. Each component
interface, and in this way to be able to track each of the has fundamental characteristics as shown in Table I, for which
readings. they were selected.

0667

Authorized licensed use limited to: MINISTERIO DA CIENCIA E TECNOLOGIA. Downloaded on February 28,2022 at 00:43:40 UTC from IEEE Xplore. Restrictions apply.
1) Sensors: Collect data for the detection of allergens that C. Client software
trigger asthma sensors with high sensitivity to different As detailed in Fig. 1, the software is intended to be
environmental components were chosen. For this reason, the implemented with a web service that allows data to be tracked.
following sensors were considered the most optimal. For which the development of a Progressive Web App is
a) GP2Y1010AU0F: It allows the detection of very proposed that allows direct access from the devices to the web
fine particles such as dust, by detecting light that is reflected to be able to carry out the respective monitoring. The page that
from the dust in the environment. will function as an interface will allow acquiring the data of
the sensor readings in real-time so as not to saturate the view
b) MICS 6814: Sensor used for the detection of with an excess of data, in addition to the possibility of
pollutants such as CO, NO2, C2H5OH, H2, NH3, among other generating a report of these in a certain period.
gases.
c) DHT11: Easy-to-use humidity and temperature In addition, to reduce the concern of guardians for young
children with asthma symptoms, the use of applets that send
sensor, with the ability to measure the air constantly and
an alarm message without the need to monitor the Web page
shows the read data through a digital signal.
at all times was also considered. For which the IFTTT
TABLE I. SENSOR CHARACTERISTICS
application was associated, which allows sending calls or
SMS every time an event is detected. Through this application,
N° Sensors Detection Features better monitoring of the sensor reading is carried out, since it
1 GP2Y1010AU0F Dust 0-600µg/m3 allows to send in detail what happens in the system
environment using the SMS, in addition to allowing to attach
CO 1-1000ppm the follow-up link in case the person does not have the
2 MICS 6814 NO2 0.05-10ppm application at the moment.
NH3 1-500ppm D. Server software
Humidity 20%-90% On the server-side, the 2 components that allow the client's
3 DHT11 web page to function properly should be mentioned:
Temperature 0°C-50°C
1) Arduino IDE: Allows the simple and efficient
programming of the sensor reading pins through the libraries
2) Development board: The ESP8266 is an open-source
provided in the environment, as well as implementing the
integrated chip, which allows interaction with various
protocol to upload data to the cloud. When making the code,
systems focused on IoT, in addition, its response time is
it must be taken into account that the data upload will not be
minimal and has a low cost. In Fig. 3 the interconnection of
constant to the server, as it could congest the network that the
the sensors, which correspond to those indicated in table 1,
users are using in addition to making a high current
with the ESP8266 can be seen. This development board sends
consumption; therefore, a minimum of samples is required to
the data to read to the cloud, which is stored according to the
be carried out every so often as shown in Table II. Which,
readings issued, all through a Wi-Fi connection.
through the PHP programming language, the commands to
perform the data acquisition will be executed each time the
ESP8266 uploads the data to the cloud.

TABLE II. AMOUNT OF SAMPLES PER HOUR

Pollutant Number of samples per hour


Dust 10

CO 15

NO2 15

NH3 8

Humidity 6

Temperature 6

2) MySQL and PHP: The compilation of the


measurements made by the 3 sensors is done using the
Fig. 3. Main system connection implementation of a database that is managed by MySQL.
Data acquisition by the development board is through Which allows the measurements to be re-lived over time in
digital readouts (DHT11), analog readouts an orderly manner [17, 18]. Once the data is stored in the
(GP2Y1010AU0F), and the I2C protocol (MICS 6814). It cloud, this will allow the distribution of the collected readings
makes possible the interaction with all the sensors in a simple for the tutor's follow-up or, if desired also, for the realization
way to be able to detect some of the main triggers such as of a study by specialists. In Fig. 4 the declaration of the 6
environmental pollution, sudden changes in temperature, attributes that will store the sent data is shown, in addition to
irritating odors, and microparticles [7]. the time and identifier of each one.

0668

Authorized licensed use limited to: MINISTERIO DA CIENCIA E TECNOLOGIA. Downloaded on February 28,2022 at 00:43:40 UTC from IEEE Xplore. Restrictions apply.
Fig. 4. Attributes declared in the database.

III. RESULTS
After the implementation of the system, it was possible to
collect the data from the sensors on the server and thus allow
it to be displayed on the developed Web platform. Fig. 5
shows the interface in operation with the reading of the 6
sensors in real-time to be able to carry out the monitoring.

Fig. 6. Measurements captured by the sensors over the course of a day

The observed data is constantly updated on the web page


as the environment where the system is located is sensed. The
aforementioned allows interconnection with the IFTTT
applets, where the generation of a message that is sent to the
person in charge was programmed, when a limit of the
parameters is exceeded, which is sent to its respective number
as can be seen in Fig. 7 represents a message after exceeding
30 μg / m³ of PM2.5 particles.

Fig. 5. PWA is implemented in a web server.

Within the Web page, there is also a button that allows


making a report of the measurements that were made in certain
periods. Through these reports, graphs can be generated that
allow observing the evolution of the parameters as can be seen
in Fig. 6 in greater detail. Fig. 7. Message sent by IFTTT services to the user

0669

Authorized licensed use limited to: MINISTERIO DA CIENCIA E TECNOLOGIA. Downloaded on February 28,2022 at 00:43:40 UTC from IEEE Xplore. Restrictions apply.
IV. DISCUSSION Asthmaimplementation research (aire) randomized trial study
protocol,”Trials,vol. 21, no. 1, pp. 1–10, 2020.
In a previous investigation, the development of an [5] J. Mallol, “Satellite symposium: Asthma in the world. asthma
application for mobile devices was carried out that allow the amongchildren in latin america,”Allergologia et immunopathologia,
increase of action plans against asthma attacks in a vol. 32,no. 3, pp. 100–103, 2004.
personalized way according to the case of the patient, for [6] E. Forno, M. Gogna, A. Cepeda, A. Ya ̃nez, D. Sol ́e, P. Cooper, L.
which the user's smartphone accesses temperature Avila,M. Soto-Quiros, J. A. Castro-Rodriguez, and J. C. Celed ́on,
measurements, pollen, and moisture obtained from local “Asthma inlatin america,”Thorax, vol. 70, no. 9, pp. 898–905, 2015.
meters [19]. In the same way, the PWA developed in this [7] M. E. P. Escalona, E. C. Rey, A. O. D. A. P ́erez, M. P. Su ́arez, and I.
C.G ́omez, “Influence of bronchial asthma in the absenteeism in
research allows having the aforementioned scopes in addition children of5-12 years attended in the specialty clinic in
to having better monitoring of the environment by sensing bayamo,”Multimed, vol. 18,no. 1, 2014.
parameters in a more specific way in the environment where [8] D. Mannino and A. Buist, "Global burden of COPD: risk factors,
the system is positioned. prevalence, and future trends," The Lancet, vol. 370, no. 9589, pp. 765-
773, 2007.
It is also observed the development of a system for the [9] G. . C. R. D. Collaboratorset al., “Global, regional, and national
detection of indoor air quality using a node of sensors deaths,prevalence, disability-adjusted life years, and years lived with
connected through the MQTT protocol and a Raspberry Pi4 to disabilityfor chronic obstructive pulmonary disease and asthma,
observe if the space where a person with asthma is located is 1990–2015: asystematic analysis for the global burden of disease
suitable for their health [20]. In contrast to this, the device study 2015,”TheLancet. Respiratory Medicine, vol. 5, no. 9, p. 691,
2017.
proposed in the present investigation seeks to be more
[10] D. Kim, S. Cho, L. Tamil, D. J. Song, and S. Seo, “Predicting
compact to have the ability to be moved with the person and asthmaattacks: effects of indoor pm concentrations on peak
to allow sensing any environment that surrounds it. expiratory flowrates of asthmatic children,”IEEE Access, vol. 8, pp.
8791–8797, 2019.
V. CONCLUSION [11] J. E. D. Cordova, V. T. Aguirre, V. V. Apestegui, L. O.
This research carried out the development of a system that Ibarguen,B. N. Vu, K. Steenland, and G. F. Gonzales, “Association
of pm 2.5 concentration with health center outpatient visits for
prevents asthma attacks based on IoT technology. The respiratory diseasesof children under 5 years old in lima,
incorporation of sensors and a development board was carried peru,”Environmental Health,vol. 19, no. 1, pp. 1–6, 2020.
out that allows a compact system and that facilitates the [12] A. F. Teixeira and O. Postolache, “Wireless sensor network and
mobility of the system to environments. In addition, an webbased information system for asthma trigger factors
interface was developed that allows the measurements of the monitoring,” in2014 IEEE International Instrumentation and
sensors to be viewed through a PWA, which facilitates access Measurement TechnologyConference (I2MTC) Proceedings. IEEE,
2014, pp. 1388–1393.
to the web from any mobile device or computer.
[13] L. S. Namazova-Baranova, A. I. Molodchenkov, E. A. Vishneva, E.
The ESP8266 development board allowed the V.Antonova, and V. I. Smirnov, “Remote monitoring of children
transmission of the sensor reading to a cloud database that withasthma, being treated in multidisciplinary hospital,”
International Conference on Biomedical Engineering and
sends the readings in real-time to the PWA. The free access ComputationalTechnologies (SIBIRCON). IEEE, 2015, pp. 7–12.
IFTTT service also enables better health care for children with [14] R. Hu, G. Fico, C. Vera-Mu ñ oz, F. Lan, and M. T. Arredondo, “Defini-
asthma attacks by immediately warning guardians when tion of a online to offline (o2o) system to support the
reading is detected that exceeds the limits set in the schedule. individualizedmanagement and treatment strategies for overall
The notice that is given by SMS contains a link that will allow asthma control,” IEEE EMBS International Conference on
monitoring of the environment where the system is located, in Biomedical & HealthInformatics (BHI). IEEE, 2017, pp. 237–240.
addition to being able to select who the alert can be sent to [15] P. Kaushal and R. Mudhalwadkar, “Pellet sensor based asthma
detectionsystem using exhaled breath analysis,” International
since it can facilitate direct contact with various emergencies. Conferenceon Industrial Instrumentation and Control (ICIC).IEEE,
Finally, as a recommendation for future work, the system 2015, pp.139–142.
allows the connection of a GPRS system, which could [16] U. Jaimini, “Phd forum: Multimodal iot and emr based smart
facilitate the location of the person to the medical authorities, healthapplication for asthma management in children” IEEE Interna-
in case of a severe asthma attack and they can be easily alerted tional Conference on Smart Computing (SMARTCOMP). IEEE,
with the location of the user for immediate attention. 2017,pp. 1–2.
[17] S. Tummalapalli and V. Rao Machavarapu, “Managing mysql
REFERENCES clusterdata using cloudera impala,”Procedia Computer Science, vol.
85, pp.463–474, 2016.
[1] I.-J. Wang, T.-H. Tung, C.-S. Tang, and Z.-H. Zhao, “Allergens,
airpollutants, and childhood allergic diseases,”International journal [18] J. L. Harrington, “1 - installing and running mysql,” in SQL Clearly
ofhygiene and environmental health, vol. 219, no. 1, pp. 66–71, 2016. Explained (Second edition), second edition ed., ser. The Morgan
Kaufmann Series in Data Management Systems, J. L. Harrington, Ed.
[2] S. A. Miadich, R. S. Everhart, A. P. Borschuk, M. A. Winter, Burlington: Morgan Kaufmann, 2003, pp. 3–8. [Online].
and B. H. Fiese, “Quality of life in children with asthma: a
developmentalperspective,”Journal of pediatric psychology, vol. 40, [19] N. Isaac, N. Sampath, and V. Gay, “Modernising asthma
no. 7, pp. 672–679,2015. management:Personalised asthma action plans using a
smartphone application” 12th International Symposium on Medical
[3] S. Esposito, C. Galeone, M. Lelii, B. Longhi, B. Ascolese, L. Senatore, Information andCommunication Technology (ISMICT). IEEE, 2018,
E. Prada, V. Montinaro, S. Malerba, M. F. Patriaet al., “Impact pp. 1–5.
of airpollution on respiratory diseases in children with recurrent
wheezing orasthma,”BMC pulmonary medicine, vol. 14, no. 1, pp. 1– [20] S. Faiazuddin, M. Lakshmaiah, K. T. Alam, and M. Ravikiran, “Iot
9, 2014. basedindoor air quality monitoring system using raspberry pi4” 4th
International Conference on Electronics, Communication and
[4] E. D. Romani, T. Siddharthan, N. Lovat ́on, C. C. Alv ́ıtez-Luna, O. AerospaceTechnology (ICECA). IEEE, 2020, pp. 714–719.
Flores-Flores, and S. L. Pollard, “Implementation of an intervention to
improvethe adoption of asthma self-management practices in peru:

0670

Authorized licensed use limited to: MINISTERIO DA CIENCIA E TECNOLOGIA. Downloaded on February 28,2022 at 00:43:40 UTC from IEEE Xplore. Restrictions apply.

You might also like