1 Introduction

The COVID-19 was initially identified on December 2019 in Wuhan, China, and was a pandemic that brought significant consequences on healthcare systems, economy, and politics. Nowadays, there is strong evidence that the pathogen responsible for COVID-19 is transmitted mainly by aerosol droplets exhaled by infected individuals, which remain suspended in indoor air (Bazant et al. 2021; Prather et al. 2020); for example, Lednicky et al. (2020) detected infectious SARS-CoV-2 virions in the air of a hospital room located 5.4 m from an infected patient. This behavior was initially modeled by Wells and Riley in Wells (1955) and Riley et al. (1978), wherein they describe airborne transmission of infectious aerosols in indoor spaces. The Wells-Riley model has been extensively used (Miller et al. 2021; Buonanno et al. 2020; Prentiss et al. 2020; Evans 2020) to estimate the risk of infection of respiratory diseases in indoor spaces because it includes several parameters, such as the number of occupants and their respiratory activity levels, exposure time, dimensions of the space, types of ventilation and air filtration, mask efficiency, among others.

During the pandemic, there has been widespread interest in mitigating the risk of contagion by means of monitoring the \(CO_2\) levels in indoor spaces. For instance, several countries have carried out studies in classrooms at schools and universities to estimate the risk of infection based on \(CO_2\) measurements, e.g., Italy (Di Gilio et al. 2021), the UK (Vouriot et al. 2021), Spain (Villanueva et al. 2021; Alonso et al. 2021), and Canada (Hou et al. 2021). The \(CO_2\) is a natural source of data to assess indoor air quality since its sensors are low-cost and widely available on the market; for example, Mendell et al. (2013) present statistically significant correlations between \(CO_2\) levels and absenteeism due to illness in elementary schools and Liu et al. (2000) find a direct correlation between \(CO_2\) levels and concentration of airborne bacteria in two elementary schools. Generally, high levels of \(CO_2\) are associated with poor air quality since a patient infected with COVID-19 exhales \(CO_2\) and infectious aerosols when breathing (Mendell et al. 2013).

The Public Health Agency of Canada has issued guidelines for understanding the potential benefits and limitations for COVID-19 risk mitigation through indoor \(CO_2\) measurement with low-cost sensors. In Eykelbosh (2021), they claim that \(CO_2\) monitoring can help to assess ventilation requirements for indoor spaces, as well as, to control the number of occupants and type of activity. However, they emphasize that SARS-CoV-2 transmission not only depends on ventilation but also depends on several other factors, and hence, there is a tendency to misinterpret \(CO_2\) levels as COVID-19 risk. In this way, relying solely on \(CO_2\) levels may cause occupants to under- or over-estimate the risk of transmission. Therefore, they conclude that \(CO_2\) monitoring and ventilation are just a part of a larger suit of public health tools to reduce transmission risk.

To mitigate the spread of COVID-19, we designed and built an Air Quality Monitoring Device (AQMD) (Quiroga et al. 2023). This device measures and analyzes the levels of CO2 and particulate matter in three classrooms of Antonio Nariño University, aiming to inform the academic community about the state of air quality. With this information, the academic community could take preventive actions to reduce the probability of infection. We divided the AQMD design into 2 phases: (i) data measurement and (ii) estimation of infection risk. In the data measurement phase, we measured the air quality in classrooms located in Bogotá, Colombia; specifically, we recorded the levels of \(CO_2\) and particulate matter, as well as the classroom setting. In the estimation phase, we calculated the \(CO_2\) threshold for our classroom setting and estimated the probability of COVID-19 infection of a susceptible person based on the analytical expressions proposed in Peng and Jimenez (2021).

The results demonstrate the potential of using AQMD technology to monitor air quality and reduce the risk of COVID-19 transmission in educational buildings. Our research shows that indoor \(CO_2\) concentrations (\(CO_{2indoor}\)) and the probability of COVID-19 infection of a susceptible person (P) are influenced mainly by the type of activity and number of windows open. Activities involving increased talking and movement contribute to higher \(CO_{2indoor}\) and P. However, opening windows serves as an effective measure in reducing the risk of transmission. On the other hand, lectures and exams have lower \(CO_{2indoor}\) compared to presentations and teamwork, indicating lower transmission risks. Additionally, the number of students does not significantly impact \(CO_{2indoor}\) levels because the range of students in the test scenario (18 to 31) is relatively small. Moreover, our investigation reveals variations in both indoor and outdoor \(PM_{2.5}\) concentrations throughout the day, with elevated levels observed during the afternoon and evening compared to the morning.

We organized the paper as follows: Sect. 2 presents related work that address \(CO_2\) measurement in educational buildings for COVID-19 risk mitigation; Sect. 3 explains the AQMD by describing its main modules; Sect. 4 analyzes the results related to classroom air quality; and Sect. 5 presents our conclusions and future work.

2 Related work

In the following, we discuss recent works that address the ventilation problem in educational buildings in the context of the COVID-19 pandemic. These works try to mitigate the spread of COVID-19 by using low-cost sensors that monitor the ventilation of several classrooms around the world, and also apply strategies and guidelines to control the number of occupants and type of activities in indoor spaces. So, they aim to ensure a safe school life as part of the reopening after the COVID-19 lockdown. In this way, they propose solutions regarding the estimation of the airborne transmission risk, air ventilation protocols, thermal comfort during winter, and energy efficiency of heating, ventilation, and air conditioning (HVAC) systems. Table 1 summarizes this discussion and also compares our work against other state-of-the-art studies.

Table 1 Summary of related work and comparison with this work

Di Gilio et al. (2021) aims at guaranteeing adequate air ventilation in educational buildings as part of the reopening of schools after the COVID-19 lockdown. To that end, they monitor the \(CO_2\) levels of 11 classrooms located in 9 schools of Italy. In addition, they instruct teachers to apply a detailed air ventilation protocol that includes specific actions depending on \(CO_2\) levels; specifically, they classify the transmission risk in 4 levels. The results show an overall improvement of \(CO_2\) levels for all classrooms where teachers where compliant and helpful in the management of the air ventilation strategy. However, they identified classrooms where it is not possible to guarantee adequate air ventilation, despite the efforts of the teachers, due to building structural limits; in these cases, further strategies are needed to ensure a safe school life, for example, the installation of air cleaner devices and HVAC systems.

Similarly, Vouriot et al. (2021) estimates the likelihood of infection due to airborne transmission in 45 classrooms located in 11 schools of the UK. They monitor the \(CO_2\) levels and show that airborne infection risk can vary widely within a school even when the same ventilation system is present. Besides, they estimate the number of secondary infections, i.e., the number of infections transmitted via airborne route due to a single originally infected individual. The results show that the expected levels of secondary infections in winter are nearly double those in summer. They suggest that these results can be extrapolated to a wider range of airborne diseases, such as measles, influenza, rhinovirus and SARS, since its spread is also closely related to ventilation.

Likewise, Villanueva et al. (2021) assesses three key elements in 19 classrooms located in 7 schools of Spain: i) Ventilation conditions through \(CO_2\) concentration measurement; ii) Suspended particulate matter, namely, \(PM_{2.5}\), \(PM_{10}\) and ultrafine particles (UFPs); iii) Comfort conditions in terms of temperature and relative humidity. Specifically, they cover a wide range of educational environments such as preschools (3-6 years-old children), primary (6-12 years old children) and secondary (12-18 years-old adolescents). Teachers promoted ventilation through opening windows and doors, but without compromising comfort conditions. In general, the results indicate that secondary classrooms have the worst ventilation conditions and preschools classrooms are exposed to the highest air pollution levels. More precisely, 26% of surveyed classrooms exceeded the recommended \(CO_2\) concentration limit of 700ppm; 63% exceeded the recommended \(PM_{2.5}\) concentration of 15 \(\mu g/m^3\) and 32% exceeded the recommended \(PM_{10}\) concentration of 45 \(\mu g/m^3\).

In addition, Alonso et al. (2021) evaluates the indoor air quality and thermal comfort of 2 classrooms in Spain during winter; the classrooms use natural and mechanical ventilation systems, depending on the external environmental conditions. Particularly, they monitor the \(CO_2\), temperature, and relative humidity before and during the pandemic using a commercial device called Wöhler CDL 210. Prior to the COVID-19 pandemic, teachers prioritized thermal comfort over indoor air quality; however, during the COVID-19 pandemic, it became mandatory to supply fresh air using natural ventilation despite unfavorable thermal conditions. The results reveal that a decrease of 300 ppm in \(CO_2\) weekly average values is possible by using manual and mechanical ventilation and, a decrease of 400 ppm in \(CO_2\) weekly average values by using only manual ventilation. Even so, the study shows that thermal comfort worsened during the pandemic since the students reported thermal discomfort during 60% of the total class hours. Finally, the study does not assess the probability of COVID-19 transmission, nor does it characterize the air flows inside the classroom.

Correspondingly, Hou et al. (2021) analyze the \(CO_2\) levels of 3 classrooms located in 3 schools of Canada to estimate the probability of airborne infection and the ventilation rate. Firstly, they conduct a sensibility analysis to find the dominant parameters that determine the \(CO_2\) threshold: they conclude that outdoor ventilation rate is the most significant parameter. Secondly, they employ a Bayesian Markov Chain Monte Carlo to calibrate the parameters and quantify the uncertainties. Moreover, they estimate the ventilation rate from \(CO_2\) data helping teachers stay above the recommended ventilation rate limit; particularly, they demonstrate that a \(CO_2\) level of 450 ppm is equivalent to a ventilation rate greater than 10 air changes per hour (ACH). The results indicate that the outdoor ventilation threshold should be between 3 and 8 ACH and the \(CO_2\) threshold should be 500 ppm for a time exposure of 8 h. Besides, the ventilation rate was 1.96 ACH for classroom 1 with mechanical ventilation, 0.40 and 0.79 ACH for classrooms 2 and 3, respectively, just with windows open. Therefore, all classrooms were below the recommended ventilation rate limit.

Similarly, Schibuola and Tambani (2021) measure indoor/outdoor \(CO_2\) concentrations to estimate the air changes per hour; afterwards, they evaluate the contagion risk in terms of the reproduction number \(R_0\). The measurements were carried on in 4 classrooms located in 2 secondary schools of Italy. The results reveal that in naturally ventilated classrooms with at least 22 students, the presence of one asymptomatic individual leads to a dangerous situation with \(R_0\) above 13. Then, they simulate the installation of mechanical ventilation and the use of face masks, which results in a drastic reduction of the infection risk (i.e., \(R_0\) below 1) and the quanta concentration. Besides, they propose a mechanical ventilation system called High Efficiency Air Handling Unit (HEAHU), which reduces the energy consumption between 60% and 72% with respect to traditional HVAC systems.

3 Air quality monitoring device (AQMD)

In order to mitigate the spread of COVID-19, we designed and built an Air Quality Monitoring Device (AQMD) that measures and analyzes the levels of \(CO_2\) and particulate matter in the classrooms with the aim of informing the academic community about the state of the air quality (Quiroga et al. 2023). Basically, AQMD consists of a microcontroller with wireless connectivity, a \(CO_2\) sensor, a particulate matter sensor and batteries (see Fig. 1). We divided the AQMD design into 2 phases: (i) data measurement and (ii) estimation of infection risk (see Fig. 2). In the data measurement phase, we measured the air quality in 3 classrooms, both indoors and outdoors; specifically, we recorded the levels of \(CO_2\) and particulate matter, as well as the classroom setting, i.e., number of occupants, occupants’ age, room volume, type of ventilation, exposure time, and type of activity. In the estimation phase, we calculated the \(CO_2\) threshold for our classroom setting and estimated the probability of COVID-19 infection of a susceptible person based on the analytical expressions proposed in Peng and Jimenez (2021).

Fig. 1
figure 1

We introduce two Air Quality Monitoring Devices (AQMDs) that were utilized to gather periodic samples of \(CO_2\) and \(PM_{2.5}\) in a classroom environment

Fig. 2
figure 2

The flowchart shows the two phases of AQMD design: data measurement and estimation of infection risk

Next, we briefly present the hardware and software of the AQMD; see the schematic diagram of the AQMD circuit in Fig. 3. At the heart of the device is a ESP32, which is a low-power and low-cost microcontroller highly used for Internet of Things (IoT) prototyping (Cañeda and Calimpusan 2022) due to its wireless connectivity with Wi-Fi and Bluetooth. Besides, the ESP32 manufacturer (i.e., Espressif Systems) provides a development framework that facilitates the creation of IoT applications, which is open-source and whose name is ESP-IDF (i.e., Espressif’s IoT Development Framework). Furthermore, the AQMD includes an analog \(CO_2\) sensor called Gravity-SEN0219, which is based on non-dispersive infrared (NDIR) technology so it provides high accuracy (i.e., ± 50 ppm) and fast response time (i.e., 120 s), moreover, this sensor has low-power consumption, temperature compensation, and a measuring range between 0 and 5000 ppm. Additionally, we include a particulate matter sensor called Adafruit-PMSA003I, which uses the laser scattering principle so it provides \(PM_{1.0}\), \(PM_{2.5}\), and \(PM_{10}\) concentration within the range of 0 and 500 \(\mu g/m^3\). Finally, we power the AQMD with 2 lithium polymer batteries, each with a capacity of 3.7 v and 5000 mAh.

Fig. 3
figure 3

Schematic diagram of the AQMD circuit

3.1 Data measurement

We measured the air quality in 3 classrooms of the university building located in Bogotá, Colombia, both indoors and outdoors, to cope with the COVID-19 pandemic. Specifically, we recorded the levels of \(CO_2\) and particulate matter \(PM_{2.5}\) (i.e., concentration of fine suspended particles in the air with an aerodynamic diameter less than or equal to 2.5 µm), considering different classroom settings and activities at various times of the day. The data collection includes 8 data sets, each with an approximate duration of an hour and a half, where each measurement were carried out at a 2-min interval. Additionally, we took measurements in different classroom settings to explore the behavior of \(CO_2\) and particulate matter regarding to the number of occupants, room volume, type of ventilation, and type of activity (e.g., lectures, exams, presentations, and group work).

We positioned the sensors following the recommendations in Eykelbosh (2021), who indicates that sensors should be positioned in a location with unobstructed air flow, but avoiding direct influence of windows, ventilation systems, or concentrated plumes of exhaled air. So, we positioned the sensors at a distance of 2 meters of any human occupant or window, but, at the same height of the occupants.

Moreover, it should be clarified that both sensors were previously calibrated by an ISO/IEC 17025:2017 accredited testing laboratory. The \(CO_2\) sensor supports zero-point calibration, so the sensor was manually set to 400 ppm. On the other hand, the particulate matter sensor uses the laser scattering principle, thus it is calibrated using a calibration standard due to the highly sensitive nature of the principle to environmental factors such as humidity. As a result of this calibration, the \(CO_2\) sensor had a ±0.20% error in volume percentage and the PM sensor had a ±6 \(\mu g/m3\) error.

We highlight the advantages and limitations of using AQMD to collect data. On the one hand, the calibration process has shown that the device offers high precision regarding \(CO_2\) and \(PM_{2.5}\) data. Additionally, it is portable and low-cost, thus making it capable of scaling to measure the air quality of an entire university due to its mesh connectivity. On the other hand, the battery lifespan should be improved with energy-efficient techniques, and the transmission range of the device could be extended by employing LoRa, a long-range radio communication technique.

3.2 Estimation of infection risk

We explain how to calculate the recommended \(CO_2\) threshold for a specific classroom setting by taking into account the characteristics of the indoor space and the type of activity. Furthermore, we present how to estimate the probability of COVID-19 infection of a susceptible person considering the levels of \(CO_2\) inside the classroom. In this way, by monitoring these 2 parameters, the academic community could take actions to mitigate the spread of COVID-19.

Peng and Jimenez (2021) proposes an analytical expression to calculate the \(CO_2\) threshold for different environments and activities; specifically, they evaluate this threshold for several environments such as classroom, subway, supermarket and stadium, as well as various activities such as singing in a choir, resting breathing, standing loudly speaking, and heavy exercise breathing. The authors conclude that the \(CO_2\) threshold varies by 2 orders of magnitude for different environments and activities, so they recommend an activity-dependent approach for policy making concerning an acceptable indoor \(CO_2\) level. Equation 1 shows the analytical expression to calculate the \(CO_2\) threshold proposed by Peng and Jimenez (2021):

$$\begin{aligned} Threshold_{CO_2} = \Delta c^{*}_{CO_2} + CO_{2outdoor} \end{aligned}$$
(1)

where \(\Delta c^{*}_{CO_2}\) is the reference excess \(CO_2\) level and \(CO_{2outdoor}\) is the outdoor \(CO_2\) measurement. Furthermore, \(\Delta c^{*}_{CO_2}\) is given in Eq. 2:

$$\begin{aligned} \Delta c^{*}_{CO_2}{} & {} = \frac{ 0.0001/1h \; \times \; NE_{p,CO_2} }{ \left( 1-\eta _{im} \right) \eta _{I} \left( N - 1 \right) E_{p} \left( 1-m_{ex} \right) \left( 1- m_{in}\right) B } \nonumber \\{} & {} \times \frac{ \frac{1 }{\lambda _{0}} - \frac{1-e^{-\lambda _{0}D}}{\lambda _{0}^{2}D} }{\frac{1 }{\lambda } - \frac{1-e^{-\lambda D}}{\lambda ^{2}D} } \end{aligned}$$
(2)

where N is the number of occupants indoors, \(E_{p,CO_2}\) is the \(CO_2\) exhalation rate per person, \(\eta _{im}\) is the probability of an occupant being immune, \(\eta _{I}\) is the probability of an occupant being an infector, \(E_{p}\) is the SARS-CoV-2 exhalation rate by an infector, \(m_{ex}\) is the mask filtration efficiency for exhalation, \(m_{in}\) is the mask filtration efficiency for inhalation, B is the the breathing rate of the susceptible person, \(\lambda\) is the first-order overall rate constant of the virus infectivity loss, \(\lambda _{0}\) is the ventilation rate, and D is the duration of the event. Table 2 presents the parameters of \(\Delta c^{*}_{CO_2}\) according to Peng and Jimenez (2021) for 4 types of activities within the classrooms: presentations, team work, lecture and exam.

Table 2 Parameters of \(\Delta c^{*}_{CO_2}\) for 4 class activities

By using the values of Table 2, in case of presentations, the value of \(\Delta c^{*}_{CO_2}\) is 330ppm for a probability of infection of 0.01%. If we suppose that \(CO_{2outdoor}\) is 400 ppm, then the \(CO_2\) threshold is 330 ppm + 400 ppm = 730 ppm (see Eq. 1); however, this threshold changes over time due to the variability of the outdoor \(CO_2\) measurement. Besides, the threshold calculation has the following limitations: (i) it has large uncertainties, mainly from virus exhalation rates; (ii) it assumes that social distance is kept so that close proximity aerosol and droplet pathways are eliminated; and (iii) it does not consider fomite transmission.

On the other hand, Peng and Jimenez (2021) also propose an analytical expression for the probability of COVID-19 infection per ppm excess \(CO_2\) (see Eq. 3), which is the increase in probability caused by an additional 1 ppm of \(CO_2\) in the air.

$$\begin{aligned} P_{per\,ppm} = \frac{ 0.0001 }{\Delta c^{*}_{CO_2}} = \frac{ 0.01\% }{\Delta c^{*}_{CO_2}} \end{aligned}$$
(3)

In this way, the probability of COVID-19 infection of a susceptible person (see Eq. 4) is given by multiplying \(P_{per\,ppm}\) by the excess \(CO_2\), which is the difference between the \(CO_2\) level indoor and the \(CO_2\) level outdoor.

$$\begin{aligned} P = \left( \frac{ 0.01\% }{\Delta c^{*}_{CO_2}} \right) \left( CO_{2indoor} - CO_{2outdoor} \right) \end{aligned}$$
(4)

By using Eq. 4, we can inform the academic community about the probability of COVID-19 infection inside a specific classroom, and to do so, we just need 2 AQMD: one to monitor the level of \(CO_2\) indoors and the other outdoors. Note that wearing a mask could significantly reduce P or result in a less stringent \(Threshold_{CO_2}\), as the mask-related parameters (\(m_{ex}\) and \(m_{in}\)) indirectly influence both outcomes.

4 Performance evaluation results

We present the results of our study; specifically, we discuss air quality measurements such as \(CO_2\) levels, reference excess \(CO_2\) levels, probability of COVID-19 infection, \(CO_2\) threshold for different test scenarios, and particulate matter levels. These measurements provide insights into the air quality within the studied environments; also note that the red lines in the figures represent the standard deviation of the data.

Fig. 4
figure 4

The excess \(CO_2\) (i.e., difference between the \(CO_2\) level indoor and the \(CO_2\) level outdoor) for different types of activities

We measured excess \(CO_2\) (i.e., difference between the \(CO_2\) level indoor and the \(CO_2\) level outdoor) for different types of activities. Figure 4 shows the difference in \(CO_2\) concentration inside and outside the classrooms \((CO_{2indoor} - CO_{2outdoor})\) on the y-axis and the type of activity on the x-axis. The results indicate that the highest average excess of \(CO_2\) was observed during presentations, with an average value of 321\(\pm 169\) ppm. This is because during presentations students are constantly talking and, therefore, exhaling \(CO_2\) in a closed space. Additionally, teamwork and lectures had an average excess \(CO_2\) of 143\(\pm 87\) and 129\(\pm 67\) ppm, respectively, implying that group discussions and active participation in lectures also contribute to the increase of \(CO_2\) levels in the classrooms. In contrast, exams had the lowest average excess of \(CO_2\) with an average value of 105\(\pm 54\) ppm, potentially due to shorter duration and less movement, resulting in lower exhalation and \(CO_2\) concentrations. Finally, the results suggest that the level of excess \(CO_2\) in classrooms depends on the type of activity being performed.

Fig. 5
figure 5

Probability of COVID-19 infection per ppm excess \(CO_2\) (\(P_{per\,ppm}\)) and reference excess \(CO_2\) level (\(\Delta c^{*}_{CO_2}\)) for different activities in a classroom environment

We calculated the reference excess \(CO_2\) level (\(\Delta c^{*}_{CO_2}\)) and the probability of COVID-19 infection per ppm excess \(CO_2\) (\(P_{per\,ppm}\)) for different types of activities according to Eqs. 2 and 3, respectively. Figure 5 illustrates \(P_{per\,ppm}\) with bars on the left y-axis and \(\Delta c^{}_{CO_2}\) on the right y-axis for different types of activities; notice the inverse relationship between \(P_{per\,ppm}\) and \(\Delta c^{*}_{CO_2}\) (see Eq. 3). The results indicate that the class activity, as reported in Peng and Jimenez (2021), had a \(P_{per\,ppm}\) of 2.724\(\times 10^{-8}\) % and a \(\Delta c^{*}_{CO_2}\) of 3670 ppm. In our dataset, lecture and exam activities had similar order of magnitude when compared to the class activity for both variables. On average, presentation and teamwork activities showed an increase of 2.2\(\times 10^{-7}\) in \(P_{per\,ppm}\) compared to class; this is due to the higher level of physical activity and breathing rates associated with presentations and teamwork. However, we observed a decrease of 3.2 \(\times 10^{3}\) ppm in \(\Delta c^{*}_{CO_2}\) indicating a lower \(CO_2\) threshold for presentations and teamwork activities (see Eq. 1) when compared to the class activity. Finally, these findings indicate that \(P_{per\,ppm}\) and \(\Delta c^{*}_{CO_2}\) also depend on the type of activity being performed in the classroom.

Fig. 6
figure 6

\(CO_2\) level indoor (\(CO_{2indoor}\)) and probability of COVID-19 infection (P) for different activities in a classroom environment

We measured the average \(CO_2\) concentration indoor (\(CO_{2indoor}\)) and the probability of COVID-19 infection of a susceptible person (P) for different types of activities, as shown in Fig. 6. Note that \(CO_{2indoor}\) was measured using the \(CO_2\) sensor and P was calculated using Eq. 4. The x-axis represents the type of activity, while the y-axis on the left shows \(CO_{2indoor}\) in bars, and the y-axis on the right displays P. The results indicate that presentations had the highest average \(CO_{2indoor}\) concentration with a mean value of 1342\(\pm 620\) ppm and P of 0.0094%; unfortunately, this value exceeds the recommended \(CO_2\) threshold for a classroom environment (Di Gilio et al. 2021; Villanueva et al. 2021; Alonso et al. 2021; Hou et al. 2021; Schibuola and Tambani 2021). However, exams had the lowest \(CO_{2indoor}\) concentration with a mean value of 231\(\pm 53\) ppm and P of 0.0003%. It is worth noting that lectures and exams had similar \(CO_2\) concentration indoor, implying that these activities could be considered less risky for COVID-19 transmission compared to presentations and teamwork. The results reveal that exposure to high levels of \(CO_2\) indoor was associated with an increased probability of COVID-19 infection risk.

Fig. 7
figure 7

\(CO_2\) level indoor (\(CO_{2indoor}\)) and probability of COVID-19 infection (P) for different number of students in a classroom environment

We analyzed the relationship between number of students, type of activity, and the number of open windows. Figure 7 shows \(CO_{2indoor}\) on the left y-axis in bars and P on the right y-axis for different numbers of students. Our results suggest that the number of students does not affect \(CO_{2indoor}\) in our test scenario, as the range of students we used (18 to 31) is relatively small. However, we observed that P decreased as the number of open windows increased. For instance, lecture-type activities with 23 and 22 students and four open windows had a lower \(CO_{2indoor}\) and a lower P compared to lectures with no open windows and 21 students. These findings indicate that opening windows can effectively decrease the risk of COVID-19 transmission; also, our results suggest that small variations in the number of students are not a determinant factor contributing to \(CO_{2indoor}\), as the inclusion of 1 or 2 additional students does not substantially affect \(CO_{2indoor}\) levels.

Fig. 8
figure 8

\(CO_2\) threshold concentration in indoor air (\(Threshold_{CO_2}\)) and average indoor \(CO_2\) concentration (\(CO_{2indoor}\)) for different types of activities

We measured the \(CO_2\) levels inside classrooms during different types of activities and compared it with the \(CO_2\) threshold. Figure 8 shows the \(CO_2\) threshold (\(Threshold_{CO_2}\)) on the left y-axis in bars (see Eq. 1) and \(CO_{2indoor}\) on the right y-axis for different types of activities. The results reveal that presentations had the \(CO_{2indoor}\) closest to the threshold. In this activity, an alarm was activated when the threshold was exceeded, immediately notifying the instructor who took measures to mitigate the situation by opening the door and windows to encourage a better air exchange in the classroom. Subsequently, a decrease in \(CO_{2indoor}\) concentration was observed. In contrast, exams and lectures exhibited \(CO_{2indoor}\) levels below the threshold. These activities involve passive listening and limited movement, resulting in lower exhalation and \(CO_2\) concentrations compared to presentations. The results suggest that class activities such as exams, lectures, and teamwork have a low COVID-19 transmission risk since their \(CO_2\) levels remain below the recommended \(CO_2\) threshold, but in presentation activities the \(CO_2\) levels could surpass the recommended \(CO_2\) threshold in our test scenarios.

Fig. 9
figure 9

\(CO_2\) level indoor (\(CO_{2indoor}\)) and probability of COVID-19 infection (P) for different types of activities, number of students, and number of open windows in university classrooms

Figure 9 shows \(CO_{2indoor}\) on the left y-axis in bars, P on the right y-axis as dotted lines, and the x-axis displays the type of activity, the number of students, and the number of open windows. The blue bars represent \(CO_{2indoor}\) for each activity, arranged in descending order. Presentations have the greatest \(CO_{2indoor}\) and P, followed by teamwork, lecture, and exams. The green bars show that small changes in the number of students does not significantly affect \(CO_{2indoor}\) nor P. For example, some activities with fewer students have higher \(CO_{2indoor}\) and P levels than activities with more students; hence, the inclusion of a few of additional students does not substantially impact \(CO_{2indoor}\) nor P. As for the open windows, represented by the black bars, more open windows lead to lower \(CO_{2indoor}\) and P levels for same type of activity. Finally, these results illustrate that \(CO_{2indoor}\) and P are influenced mainly by the type of activity and number of windows open. Moreover, when we slightly vary the number of students, it does not significantly affect the \(CO_{2indoor}\) and P levels.

Fig. 10
figure 10

Average concentration of \(PM_{2.5}\) (\(\mu g /m^3\)) at different times of the day (indoor and outdoor)

According to the World Health Organization (WHO) (Organization et al. 2021), the air quality guideline for daily exposure of fine particulate matter (\(PM_{2.5}\)) is 15 \(\mu g/m^3\); we adopt these air quality standards and trigger warning messages whenever this threshold is exceeded. Figure 10 illustrates the average concentration of \(PM_{2.5}\) (\(\mu g/m^3\)) at different times of the day. For each hour, we showed two bars: a blue one representing the \(PM_{2.5}\) indoor and a black one representing the \(PM_{2.5}\) outdoor. The results indicate that the \(PM_{2.5}\) indoor varies throughout the day, with peak values at 19:00 exceeding the WHO threshold and minimum values at 10:01. Moreover, the \(PM_{2.5}\) outdoor also shows variability throughout the day, with peak values at 18:44 exceeding the WHO threshold and minimum values at 10:26. In addition, \(PM_{2.5}\) concentrations, both indoors and outdoors, appear to be higher during the evening compared to concentrations during the morning; this may be due to several factors such as increased vehicular traffic and human activities during rush hours, which can contribute to greater emission of fine particles.

5 Conclusions and future work

We designed and built an Air Quality Monitoring Device (AQMD) to mitigate the spread of COVID-19 in educational buildings. Firstly, we measured the air quality in 3 classrooms of the Antonio Nariño University, both indoors and outdoors; specifically, we recorded the levels of \(CO_2\) and particulate matter considering different classroom settings and activities. Subsequently, using these data, we computed the recommended \(CO_2\) threshold for our specific classroom setting and also estimated the probability of COVID-19 infection of a susceptible person; our computations take into account the characteristics of the indoor space, the type of activity, and the levels of \(CO_2\) inside and outside the classroom. In this way, the academic community could take actions to mitigate the spread of COVID-19 by using this information.

Our research demonstrates the potential of using AQMD technology to monitor the air quality and reduce the risk of COVID-19 transmission in educational buildings. We found that indoor \(CO_2\) concentrations and the probability of infection are mainly influenced by the type of activity and number of windows open. In this way, opening windows serves as an effective measure in reducing the risk of transmission. Besides, our results suggest that small variations in the number of students is not a determinant factor contributing to the \(CO_2\) indoor, as the inclusion of a few additional students does not substantially affect it.

In future works, we plan to extend the functionality of AQMD by predicting the levels of \(CO_2\) and particulate matter to generate early warnings of poor air quality. To that end, we will employ the edge computing paradigm wherein resource-constrained embedded systems run artificial intelligence models to take local decisions and avoid the transport of data to distant cloud servers. In this way, we can use the data collected in this work to train a regression model that predicts the classroom air quality according to the number of occupants, room volume, type of ventilation, exposure time, and type of activity.