1. Introduction
The World Health Organisation (WHO) declared on 11 March 2020 that COVID-19 disease had become pandemic [
1]. Since then, the WHO has been constantly reporting on the outbreak and providing global guidelines for its control [
2]. This has been a global challenge in air quality (AQ) research [
3,
4,
5], especially on its prevention modes, and detection and protection systems [
6,
7]. For example, research has been performed on barriers to transmission, infection, and vaccines [
6,
8]. Many researchers are still working on these and other issues. Among them, the importance of air renewal to achieve adequate IAQ and avoid health risks can be highlighted.
The WHO identified direct contact with people suffering from the disease as an obvious source of contagion. Therefore, the social distance was delimited, the use of masks was made compulsory, and other types of actions were taken such as eye protection and use of biohazard clothing for professionals directly exposed (for example, hospital workers) [
9,
10]. In addition, general applicable options that are not dependent on the decision of the individual were also sought during this pandemic. For instance, closing public spaces, restricting seating capacity in places of assembly [
11], and increasing indoor air renewal in public buildings [
12,
13] stand out. Capolongo et al. [
14] summarised a series of recommendations in a decalogue related to health strategies and pandemic challenges, which can be a great reference for addressing the future times ahead.
On the other hand, two means of transmission of this type of disease were established: surface and airborne. To combat the first mode, surfaces that have been in contact with secretions or particles from sick people must be treated to inactivate the virus [
15]. In addition, cleanliness of hands and face have been increased to reduce the likelihood of infection [
16]. Concerning airborne transmission, the spread can occur through “droplets” [
17,
18], which are larger than 100 micrometres in size, and aerosols, which are smaller than 10 micrometres in size. Research has proven that contagion can involve aerosols from distances of up to 10 m [
11,
17]. Therefore, how to reduce aerosol concentration in indoor spaces has been explored [
19,
20]. In this context, aerosol monitoring can be performed by means of characterisation systems [
21].
Apart from being infected with the COVID-19 disease, exposure to air pollutants can affect different organs of people [
22], damaging the respiratory, nervous, urinary, and digestive systems, among others. International standards and regulations [
23,
24,
25,
26,
27,
28,
29] establish the following parameters for determining air quality (AQ):
Physical parameters: Wet bulb temperature (T) and relative humidity (RH) to assess thermal comfort as well as ambient particulate matter concentration (PM2.5 y PM10).
Chemical parameters: Carbon dioxide (CO2), carbon monoxide (CO), formaldehyde (HCHO), ozone (O3) and volatile organic compounds (TVOCs).
Biological parameters: Bacteria and fungi.
Air renewals (based on metabolic CO2 concentration).
It can be noted that these parameters are mostly assessed in outdoor environments using stations with specific instrumentation. The European Environment Agency (EEA) and the European Commission provide information on AQ [
30] throughout Europe [
31]. Clean air is a mixture of gases [
32]. The percentage of CO
2 corresponds to 0.035% among the different elements. However, excess CO
2 is considered to be one of the main sources of environmental pollution. Unfortunately, measurement of CO
2 concentration is not available at all stations.
To reduce harmful emissions in outdoor and indoor environments [
33], many countries have established strict policies to improve AQ and comfort. In the current context, they are also serving to identify areas with a potential danger of contagion in the COVID-19 pandemic. In indoor environments, CO
2 displaces oxygen and exposes users to the effects of hypoxia [
34,
35]. As proposed by Novakova and Kraus [
36], the ideal indoor concentration can be established close to 350 parts per million (ppm) in environments with special requirements and 500 ppm in normal activity environments. Nevertheless, other reference values are provided in specific standards and regulations because it is considered an indicator that relates AQ and comfort level to CO
2 concentration [
37,
38]. It can be noted that in the context of COVID-19, CO
2 concentration [
39,
40,
41,
42] from occupant respiration has been used as an indicator of IAQ. As a baseline, the limit values set by the US Environmental Protection Agency (EPA) for CO
2 concentrations (in ppm) and the corresponding AQ are shown in
Table 1. In the same vein, the Technical report “CEN/TR 16798-2” [
43] indicates that a value of 400 ppm can be assumed as the average outdoor concentration.
In living spaces, the main focus of CO
2 increase is of metabolic origin, which is related to the type of activity [
44,
45]. As a result, the more effort a person makes, the more exhalations are produced, and the more CO
2 is emitted. The WHO has classified activities according to the “intensity of physical activity”, relating them to the metabolic equivalent unit (MET).
Table 2 provides a classification of activities with the range of physical intensities in METs. In this regard, Soares et al. conducted research [
46] using low-cost devices, concluding that an increase in activity results in an increase in MET concentration and exhaled metabolic CO
2.
COVID-19 is currently a major global concern. Peng and Jimenez confirmed that CO
2 co-exhaled with aerosols containing SARS-CoV-2 by COVID-19 can be used as an indicator of indoor SARS-CoV-2 concentrations [
47]. Other researchers have pointed out that group immunity is expected by the end of 2024 [
48] thanks to the vaccination process, but broader strategies must be put in place that can respond to future diseases. Therefore, buildings should aim to act smarter [
49], renovating indoor air to achieve better quality. These activities are in accordance with the sustainable development goals (SDGs) of the 2030 Agenda [
50]. Although the need for AQ control in public, residential, and business buildings has been analysed in many studies [
36,
51,
52], the price of the systems required for this purpose has been a barrier to implementation. This applies mainly to low-income households [
53] and socially disadvantaged environments [
54].
The Center for Disease Control and Prevention (CDC) has published extensive research on aerosol concentrations in different situations. In unventilated shared-use spaces, CO
2 concentration is high [
36] and infections are higher. This context is unchanged even if a social distance greater than two metres or six feet is maintained [
11,
55,
56]. Although there are other methods to reduce pollutants such as filtration with HEPA filters [
57], ultraviolet radiation treatments, or disinfection with ozone [
58], they were not considered because they are beyond the scope of this research. In this context, ventilation has become a fundamental solution [
59,
60] for the reduction in indoor pollutant concentrations and for the improvement of IAQ [
61]. In some cases, the way to achieve air renewal is by means of natural ventilation (cross, outdoor, indoor) [
33,
62,
63]. In other cases, a forced ventilation system must be used [
64]. In all cases, pollutant concentrations are reduced if air is renewed. These lead to a decrease in CO
2 concentration in indoor spaces [
65]. It can be noted that the current trend for effective AQ control is to promote natural ventilation through strategies combining large external openings [
66] with intelligent ventilation [
67], which also allows optimizing energy consumption by increasing its efficiency [
68,
69].
Several studies have analysed methods and models to determine the air renewal required to achieve acceptable IAQ parameters [
70,
71,
72,
73]. In all of them, the amount of exhaled CO
2 has emerged as a critical factor in establishing the number of air renewals. In addition, different standards indicate the number of air renewals recommended in the diverse living spaces of buildings according to their use and occupancy. Among them, those set by ASHRAE [
74,
75] and the national legislation in Spain [
76], which comes from the Directive 2010/31/EU of the European Parliament and of the Council of 19 May 2010 on the energy performance of buildings, stand out.
Monitoring IAQ, and more specifically CO
2 concentration in buildings, can be realised using professional (commercial) equipment or clonic devices. These clonic systems are increasingly being used due to their reliability and prestige in the electronics market. Villanueva et al. [
77] carried out a research focused on commercial equipment and clonic devices used in Spain for the measurement of CO
2 during the COVID-19 pandemic. As a noteworthy result of this research, it must be noted that the price of commercial instruments on the market ranges from EUR 75 for the cheapest to EUR 400 for the most expensive, although they include other functionalities to measure relative humidity, temperature, and particle size. In addition, they also evaluated clonic devices. They showed that the measurement error varies over a spectrum ranging from 9% to 15% in environments with 500 ppm CO
2 and from 7% to 12% when concentrations are closed to 700 ppm CO
2.
On the one hand, professional equipment are electronic devices designed and commercialised by manufacturers intended for a professional audience (laboratories and health and safety services), which can monitor any physical or chemical parameter of AQ. They can be classified according to their portability, autonomy, and number of parameters monitored. In addition, these systems have the advantage that their probes and sensors are calibrated in metrological laboratories with controlled atmospheres. They also allow data to be stored and sent instantly to other devices. However, the high weight of some of them, due to the high number of measuring sensors, is a disadvantage for their portability.
On the other hand, clonic measurement devices are composed of electronic components and open-sourced software. The scalable configuration of clonic devices makes it possible to customize and increase the number of features of professional equipment. To begin with, a motherboard must be selected. Raspberry Pi and Arduino are two of the manufacturers offering more competitiveness in this field. According to studies reviewed, 37.5% of clonic devices are based on Arduino microcontrollers and 35% on Raspberry Pi ones [
78]. The use of a motherboard allows the connection of peripherals that help in capturing information on physical and chemical parameters of IAQ. Specifically, between 67% and 70% of the sensors that monitor IAQ are intended to measure CO
2 [
78,
79]. Measurement range, sensitivity, and response time are their key sensors features. In addition to the two elements described, a communication unit must be included. This enables data storage, processing, and further analysis to be performed [
79].
The interconnection of clonic devices with other systems favors the use of the Internet of Things (IoT) and data storage in the cloud. These enabling technologies allow wirelessly collected data to be evaluated for interpretation, in real time or deferred, for a real monitoring and control of the IAQ [
79,
80]. This has the potential to transform an existing building to be renovated into a smart building [
81]. Several researches have studied the application of IoT for IAQ control [
82,
83]. They stress the advantages of system integration with connections to smartphone applications, ease of installation and scalability as an element to achieve cost improvements [
84]. In this regard, Marquez et al. [
85] developed research on an IoT solution that monitors CO
2 concentration in smart buildings. In this way, the IAQ can be controlled and therefore, the health of the occupants be improved.
It can be noted that clonic devices present a series of limitations. These are related to the maintenance and calibration of the sensors assembled, the communication protocols, and their power consumption [
86]. Fortunately, with the aim of creating devices that help to promote healthy, sustainable, and smart cities, considerable progress has been made in recent years dealing with these issues [
79].
The first objective of this research was to design, develop, assemble, and prototype a low-cost clonic device to provide buildings [
87] with smart functionalities in the IAQ field [
88]. As indoor comfort is currently taking a back seat to the priority of maintaining safe CO
2 levels to protect from COVID-19, research focused on the use of CO
2 sensors. Another purpose addressed was the choice of the best location to place the clonic device. To this end, computational fluid dynamics (CFD) simulations [
89] were carried out in different scenarios (ventilation options) for a living space that was used as case study. It can be noted that, to the best of our knowledge, this has not been addressed before. Once the best locations for the placement and distribution of the instruments were determined, an experimental study was performed. Data were obtained with a calibrated equipment that was used as a reference standard and also with the low-cost prototype device. Comparisons were then made to check if measurements were acceptable for IAQ monitoring and control. In summary, the three main objectives and their relationship are shown in
Figure 1:
CFD analysis of the interior air flows of a living space to establish the location of measurement points.
Exhaustive analysis of the solution to design and develop the prototype.
Calibration of the cloning device for proper data acquisition.
The main novel contributions of this paper can be summarised in the following four elements:
Complete design, development, and prototyping of a clonic device for CO2 measurement as a control and monitoring parameter for IAQ. This parameter relates to air renewals for minimizing the spread of COVID. We showed all the physical components (sensor, microprocessor board and connections) and the programming code necessary for its operation.
Description in detail the calibration protocol. In this paper, we used the KIMO HQ-210 commercial instrument as a reference standard for the clonic device. However, other instruments of similar characteristics with a calibration certificate from a laboratory legally accredited for this purpose could have been selected. In this context, we showed how to prepare a clonic device to properly measure CO2 concentration.
Process of all collected data in the cloud for further analysis and possible connection to other smart systems in the building. Therefore, we showed the applicability of the device to control and monitor CO2 concentration and even act, if required, on HVAC systems.
Definition of a methodology to obtain the best location of sensors for data collection. For this purpose, a CFD analysis was carried out in different scenarios of a case study. In this way, we improved the layout suggested by the different standards, which were limited to establishing separation values for the envelope (boundary) of the room without considering the air flows caused by the renewal of the interior air.
In summary, we showed for the first time, to the best of our knowledge, all the details of the components of the clonic device so that it can be cloned by anyone interested in the “do it yourself” philosophy. It also incorporated open source programming code, allowing other researchers to replicate the research and generalize this contribution to the scientific community and society. Furthermore, the use of the CFD methodology provided the most suitable points to determine the CO2 concentration in the space to be studied, eliminating points that could generate distortions in the control and monitoring systems. In addition, using an open-source system allowed the connection with other smart building systems, which in the COVID-19 era can be considered a preventive measure to analyze IAQ.
2. Materials and Methods
This section describes the methodology used in the research, including its application in a case study. The methodology is primarily based on the use of CFD to determine the positioning of the CO2 measurement system, for which simulations were carried out to identify those places where there is no air renewal. Next, it is necessary to design, configure, and develop a programmable clonic device.
The starting point was to select the living space where the prototype will be tested. A single-family house was taken in which a single bedroom was to be used as a study room. In this space, the calibration of the clonic device was carried out using a high-precision and high-cost calibration instrument. For this purpose, different assumptions and scenarios were defined, which are described in detail further in the next sections. Furthermore, this room is the space used to perform the CFD simulations. For obtaining the main results, the geometry was modeled in CATIA V5, and the different boundary conditions defined in ANSYS Discovery 2021 R2. These results allowed us to identify the best location of the programmable clonic device inside the room.
2.1. CFD Analysis
CFD is an area of engineering knowledge that belongs to the computer aided engineering (CAE) simulation programs. These analyses allow the numerical and visual simulation of flows, heat transfer, and even chemical reactions. These simulations and analyses are increasingly used to characterise living spaces, determining how the ventilation is operating and therefore the level of existing pollution. In short, CFD analysis helps to detect where the air is fouled. Thanks to this, preventive measures can be taken to avoid air quality risks [
90]. These rises may be due to an increase in the number of people inside living spaces or a lack of ventilation in them [
86,
90]. In this study, CFD simulations helped to detect CO
2 concentration.
For this research, two different software packages were used: ANSYS Fluent 2021 R2 and ANSYS Discovery 2021 R2 (available at
www.ansys.com). ANSYS Fluent was used for static and dynamic simulations. In addition, ANSYS Discovery was used only for dynamic simulations. The main features that had to be selected are:
Dimension: 3D.
Display options: Display mesh after reading.
Options: Double precision.
Processing Options: Serial.
To begin with the analysis, the geometry and boundary conditions had to be previously defined to establish the convergence of the solution [
86]. These boundary conditions were related to CO
2 concentration and ventilation flow, helping to determine the location of the measurement instruments. The case study analyses the indoor atmosphere of a medium-sized room in a single-family house was simulated. In order to perform it, a series of conditions and restrictions had to be established:
The building is located in Medina Sidonia, a village in the province of Cadiz (southern Spain). Its height above the sea is 337 m. In addition, its coordinates are as follows: longitude 5°55′37.81″ W; and latitude 36°27′25.02″ N.
The usual outdoor pollution levels are low, thanks to its location near Alcornocales Natural Park on the town periphery. In some previous measurements with the standard reference equipment, the CO2 concentration ranged from 380 to 410 ppm under different conditions of traffic, industrial activity, and prevailing winds. It can be noted that although some of the values are even lower than those indicated by the technical report “CEN/TR 16798-2”, a value of 400 ppm is assumed as the average outdoor concentration, as suggested by the report.
The characteristic wind in this area comes from the east. As the main opening is in the southeast direction, the room received an adequate amount of fresh air.
The room consists of a rectangular enclosure of average dimensions (3.9 × 2.4 × 2.5 m). The geometry allowed the simulations to be carried out easily. It can be noted that this is a factor that directly influences the meshing performed by ANSYS. In addition, the boundary conditions defined refer to the amount of air entering the room, which was considered constant in the defined scenarios.
Only one person lives in the room. No additional CO2 emissions were considered that could have an impact on the defined boundary conditions.
The test room is not forced ventilated and has no HVAC systems to renew the air inside. Therefore, ventilation is natural, with air being renewed through the openings in the envelope. The room has an exterior sliding window (height 0.93 m and width 0.63 m by leaf) and an interior door (height 2.03 m and width 0.72 m) that communicates with the rest of the rooms in the building.
We intended to locate a clonic device inside the room. For this purpose, it was essential to determine the areas where there is no air renewal, as well as the presence of vortices that may affect data collection.
Four scenarios were defined for the CFD analysis. This made four situations possible: closed window and door (no ventilation), closed window but opened door (internal ventilation which is an indirect ventilation through other spaces that are also being renovated), opened window but closed door (external ventilation) and opened window and door (cross ventilation). In each of them, it was essential to guarantee the continuity of the simulation. For this purpose, an air inlet and outlet opening had to be established.
Scenario 1 (cross-ventilation: Air renewal with opened window and door). Air enters through the window. At the same time, air exits through the door.
Scenario 2 (outdoor-ventilation: Air exchange with opened window and closed door). In this case, the door is closed. The air enters through the window and exists through the lower area of the door (due to its permeability). In this way, continuity is ensured.
Scenario 3 (indoor-ventilation: Air renewal with opened door and closed window). Opposite case to the previous one.
Scenario 4 (no-ventilation: door and window closed). No air is exchanged. In this case, only the concentration of CO
2 metabolically generated by the occupant is simulated. To ensure continuity, it is necessary to define their permeability.
The boundary conditions refer to the mass flow of air and CO
2 entering and exiting the room. For the analysis of the renewal of IAQ in the presence of a CO
2 emission source, the geometry was created using DesignModeler, defining the inlets and outlets for each of the gases considered. A turbulent flow was modelled, specifically governed by the equations of the k-omega SST turbulence model. The physico-chemical characteristics of the gases involved were taken from the ANSYS database, activating the “Species” model. The composition of exhaled air is 78.6% N
2, 1.8% H
2O, 15.6% O
2 and 4% CO
2. Accordingly, the mass flux of CO
2 emitted by a person breathing is small. For instance, the amount of air emitted by a person while performing activities at rest is approximately 0.0004 kg/s [
91]. This emission was considered to be ideal and constant. Although a mesh with small elements would lead to a more precise solution, this increased the calculation time. This mesh was defined with small triangular elements which were between 0.05 and 0.1 m in size. In addition, the air inlet was considered to be the exterior window opened, and the air outlet was considered to be the interior door opened. To determine the mass flow, the following Equations (1) and (2) were used:
where:
Applying the values from the case study:
In the first simulation, cross ventilation: A static analysis was performed in which the gas present in the indoor atmosphere was air. Similarly, for the inlet and outlet opened, the incoming and outgoing gas was also defined as air. For the inlet, the mass flow considered was 0.024 kg/s, which corresponds to three renewals per hour for the volumetric flow. The output of this simulation was defined by the “outflow”, which allowed the law of conservation of mass to be satisfied: the entire mass flow of air entering through the window passes out the door. In addition, CO2 was injected, simulating the constant exhalation of a person in a resting state.
In the second simulation, outdoor ventilation: The renewal airflow was performed through the window opened (one sliding leaf), the door being closed. A static analysis was carried out in which the gas present in the indoor atmosphere was air. Similarly, through the inlet opened, the incoming gas was air. The mass flow rate considered corresponded to one point five hourly renewals for the volumetric flow, then the mass flow was 0.012 kg/s. In this case, a slit at the bottom of the door (its clearance) was defined as the exit. This allowed for continuity within the room. The output of this simulation was defined by the “outflow”, which allowed the law of conservation of mass to be satisfied: all the mass flow of air entering through the window opened passes out the door slit. Analogous to the previous simulation, CO2 was injected, simulating the constant exhalation of a person in a resting state.
In the third simulation, indoor ventilation: The renewal air flow was performed through the door opened, the window being closed. A static analysis is carried out in which the gas present in the indoor atmosphere was air. Similarly, through the inlet opened, the incoming gas was air. The renewal air mass flow rate was 0.008 kg/s. In this case, a slit in the side window (its permeability) was defined as the exit. This allowed for continuity within the room. The output of this simulation was defined by the “outflow”, which allowed the law of conservation of mass to be satisfied: all the mass flow of air entering through the door opened passes out the window slit. Analogous to previous simulations, CO2 was injected, simulating the constant exhalation of a person in a resting state.
2.2. Professional Equipment
To select the professional equipment to be considered as a reference standard, a series of characteristics related to its weight, dimensions, and price were required. To begin with, the equipment must be certified by a recognised accredited agency. In addition, they must include human and battery autonomy, which allows measurements to be taken over long periods of time (greater than 50 h). A probe with infrared sensor for CO2 measurement must be coupled. A wireless connection between the equipment and the probes available must be provided. The measurement modules must operate with different parameters and temperature ranges (from −20 °C to +80 °C). Finally, the professional equipment must measure in working environments with neutral gases. Among those available on the market, a KIMO HQ-210 was chosen. The equipment is supplied with a calibration certificate for the temperature, hygrometry, and CO2 concentration probes (code NEM1700592 SCOH 112).
2.3. Low-Cost (Clonic) Device
Main advantages and disadvantages of the commercial equipment were considered as a reference to select the main components of the clonic device. In this regard, two elements were fundamental to create it: a sensor to monitor the concentration of CO2 and an electronic motherboard that allows the processing of atmospheric data. In order to select the most suitable components, a series of criteria matrices were used to score the characteristics considered, which are detailed below.
Firstly, a CO2 sensor was chosen, for which its main characteristics evaluated were:
Measurement range: it should be high (0–5000 ppm).
Accuracy: it should be less than ±0.1%
Capability of monitoring: it should measure one IAQ gas. In this case, CO2.
Sensitivity: it must provide high sensitivity and speed of response (in minutes).
Heating time.
Price: it should be less than EUR 30.
Four different sensors were considered: Amphenol Advanced Sensors Telaire T6713, Sensirion SCD30, DFRobot SEN0219, and Amphenol SGX Sensortech MiCS-VZ-89TE. The result of the criteria matrix is shown in
Appendix A. After performing the criteria matrix (see
Table A1), the most suitable sensor was the SEN0219. This is an analog sensor capable of monitoring CO
2 in an exclusive way by using non-dispersive infrared (NDIR) principle to detect the existence of CO
2 in the air. It features a long life, high resolution, accuracy and sensitivity, as well as a medium response speed. In addition, it is easy to install on any microcontroller and its price is relatively low (between EUR 30 and EUR 60).
Secondly, the selected motherboards included the Raspberry Pi Model B+ microcomputer and the Arduino MEGA 2560 R3 and ELEGOO MEGA 2560 R3 microcontrollers. Due to the similarities between the Arduino and ELEGOO microcontrollers, ELEGOO was considered because of its lower price. Their main factors evaluated were:
General characteristics.
Software and hardware.
Innovation.
Interconnection.
Price.
The result of the criteria matrix is shown in
Appendix A. Although both boards were suitable and had the right features for mounting the programmable device (see
Table A2), ELEGOO MEGA 2560 Rev3 had a more intuitive and user-friendly software interface. The C++-based programming language allows fast programming of the SEN0219 sensor, as it is designed for implementation on microcontrollers. Although Raspberry Pi has many advantages, this project could not make full use of them. Additionally, the programming language (mainly Python, which is one of the base programming languages of Raspberry Pi) is complex and designed for expert programmers. After performing the criteria matrix (see
Table A3), the most suitable motherboard was the ELEGOO MEGA 2560 Rev3.
2.4. Programming and Calibration of the Device
Once the motherboard and the sensor to be used were selected, they were assembled and programmed. The SEN0219 CO
2 sensor could be easily connected to the ELEGOO MEGA 2560 R3 microcontroller (see
Appendix B,
Figure A1). The software and programming language used was Arduino. The prototype is shown in
Figure 2.
Data captured by the sensor in the Arduino Serial Monitor were stored in a Microsoft Excel spreadsheet. For this purpose, additional programming code was carried out in the Visual Studio Code editor. This allowed the data stored to be analysed from time to time. This parameter was defined in the programming code depending on the monitoring needs. Once the system was ready, the next step consisted of the calibration of the zero point (which is based on the idea that if the sensor is placed into a 100% concentration of an alternate gas, the sensor reads absolute zero). This process was performed according to the datasheet of the manufacturer of the sensor, by shorting the circuit between the HD and GND pins for 7 s at least, but previously ensuring that the sensor was stable for more than 20 min at fresh air (400 ppm ambient environment). However, other alternative methods could have been used such as exposing the sensor to a gas with a known CO2 concentration or to a gas with no CO2 present. After that, since it was intended as a low-cost device, it was not required to correct the input voltage and gain (offset voltage) unless anomalies were detected in the readouts. Finally, if measurements were not within the tolerance range, then an adjustment inside the calibration was required. This was done by linear regression.
The calibration line was included in the programming code (see
Appendix C). It relates the CO
2 concentration (in ppm) with the voltage values (in mV) captured by the sensor. Both parameters were related by two constants (C
1 and C
2 in Equation (3)), which were provided by the DataSheet of the analog sensor. These constants needed to be calculated in order to modify the regression line and achieve the adjustment within the calibration of the programmable device. The calibration line consisted of the following form:
where:
is the concentration in ppm unit at “i” time.
is the voltage in mV unit at “i” time.
is the first constant in linear regression line.
is the second constant in linear regression line.
The regression line obtained allowed the calibration process of the clonic device to be carried out. An analytical process of data collection is explained below. To achieve this, the data from the device was compared with a calibrated highly accurate and costly measuring instrument. To be precise, the KIMO HQ-210 equipment from KIMO Electronic Pvt. Ltd. (Mumbai, India), was selected. It consists of two probes capable of monitoring CO2, temperature, and humidity. The error of this measuring instrument was reflected in the calibration certificate provided by the manufacturer. This error was also considered in the error of the clonic device calibration. Prototype calibration was also possible thanks to the collection of a lot of data from both the sensor device and the KIMO equipment. To obtain the calibration line, the voltage measured by the sensor was related to the exact and real concentration value provided by the reference standard. This line changed every time a new calibration was performed. To be accurate, three rounds of calibration were needed to achieve a maximum target error of less than 10%.
All the calibrations were performed in the same location during a 9 h measurement interval. This location was the same as the one considered in the CFD simulations. The SEN0219 sensor device and the KIMO equipment were placed side-by-side. Only the characteristics considered were changed for obtaining the minimum error for each calibration. Data collection by the sensor device and the KIMO equipment was carried out at regular intervals of 5 min (which provided 108 measurement points each). A shorter time between measurements was beneficial to obtain more data, helping to obtain a more accurate and successful calibration line. Additionally, this time could be linked to the resolution of the IAQ monitoring device. A longer time between data collection meant that changes in CO2 concentration were neglected.
Calibrations compare the experimental data from the KIMO equipment with the prototype estimates. To validate these comparisons, different error rates are used. This allows to observe how well the prototype device reproduces the behavior of the reference standard equipment. Several indices for validating models are reported in the literature, which can be classified according to their dependence on the scale of the compared signals. To begin with, errors that depend on the scale [
92] such as the mean absolute error (MAE) used by [
93] which measures the average magnitude of the error between the measured data by the equipment and the data estimated by the device, the mean error (ME) used by [
94] which measures whether the device measures whether the device overestimates or underestimates the measured data, and the root mean square error (RMSE), used by [
95] which weights the forecasts that are farthest away from the measured value by the equipment. Additional examples include the errors that do not depend on the scale [
96] such as the mean absolute percentage error (MAPE) used by [
97] which measures the average percentage error of the estimates and the best fit index (FIT) used by [
98] which compares the measured and estimated data with respect to the average of the measured data.
It can be noted that the coefficient of determination (R
2) only measures the proportion of the variance in the dependent variable that is predictable from the independent one [
99]. In addition, R
2 is invariant for linear transformations of the distribution of the independent variables [
100], so that an output value close to one does not always produce a good prediction regardless of the scale on which these variables are measured. In this context, indicators as MAPE are recommended when it is more important being sensitive to relative variations than to absolute variations [
101]. However, although scale-independent errors are widely used in the literature, since they are used when comparing data with different scales, the weighting of the larger-scale error causes adjustments with larger deviation the higher the CO
2 concentration to penalize against others. For instance, RMSE gives a relatively high weight to large errors since the errors are squared before they are averaged, so that it is useful when large errors are particularly undesirable [
102].
2.4.1. First Round of Calibration
This was the first contact with the sensor. The upward and downward trend of the concentration recorded by the sensor corresponded to those obtained by the KIMO equipment. Even so, there was a large error that must be resolved by calibration.
Figure 3 shows the first calibration line. This error became larger in case of high CO
2 concentrations. This is shown in
Figure 4. However, after the adjustment, the error between the prototype device and the KIMO equipment decreased significantly, as shown in
Table 3. Therefore, a further calibration had to be performed, taking into account these considerations:
The atmosphere at the time of data acquisition must be as stable as possible. Sudden changes in temperature, humidity, or CO2 must be avoided.
The clonic device and the KIMO equipment are placed elsewhere. Areas close to the window or door of the room must be avoided. This makes it possible to ensure the previous point considered.
The number of data collected (minimum 60) must be increased.
2.4.2. Second Round of Calibration
Since the errors after the first calibration were greater than 10%, a second calibration was performed. Although with the adjustment the errors could be lowered, there was no guarantee that under other conditions this adjustment could be contradictory. With the adjustment after the first calibration, the second calibration was performed. In the subsequent data, there was still a significant difference between the values monitored by the two instruments.
Figure 5 shows the second calibration line. This still resulted in an average error of more than 10%, as shown in
Table 4. Despite this, progress was favourable (when adjusting) and the graphs began to look similar in low and medium CO
2 concentration, as shown in
Figure 6. In addition, several conclusions could be drawn from this calibration:
The occupant of the living space must be far away from both instruments (prototype and equipment). This avoids falsification of data by possible direct exhalation on them.
Data collection must not be started until 15 min after a change in the atmosphere. These changes are caused by the opening of door and window. After 15 min, the atmosphere becomes stable again.
2.4.3. Third Round of Calibration
All considerations from the two previous calibrations were made. With the adjustment after the second calibration, the third calibration was performed. The average error obtained was below 10% even before the adjustment, as shown in
Table 5. Therefore, this calibration could already be considered suitable to start testing the different scenarios.
Figure 7 shows the third regression line after calibration. As a result, the difference between the clonic device and the KIMO equipment was small, as shown in
Figure 8. With this milestone, the calibration process was completed. However, to ensure that the clonic device measured constantly, regularly, and correctly, a preventive maintenance had to be scheduled. It is recommended to carry out calibrations every short period of time. This allows one to transform it into a predictive maintenance, since both absolute and relative error rates can be studied.
4. Conclusions
In the COVID-19 era, CO2 concentration is the most important indicator related to IAQ to measure the degree of air pollution. This research addressed how to monitor and control CO2 concentration in order to implement a clonic device to help prevent disease transmission. From commercial components (sensor and motherboard), a low-cost device to measure the concentration of the pollutant CO2 was designed, developed, assembled, openly programmed, prototyped, and calibrated. The statistical analysis of normality, homoscedasticity, equivalence, and concordance performed determined that the measurements made by the equipment certified (KIMO) used as reference standard and the low-cost clonic device were equivalent, with a maximum error of less than 8% and an average of less than 3%. Therefore, these devices can be used to monitor IAQ by measuring CO2 concentration.
To the best of our knowledge, they can do so at a lower price than other similar devices proposed by previous research, and much lower than those offered by existing commercial equipment on the market. In addition, it is worth noting that the open-source programming included is easily replicable by other researchers or even end users. This eliminates the economic barriers derived from the high prices of calibrated instruments and equipment that prevent their widespread use, as well as the technical barriers derived from the programming.
On the other hand, a CFD study was carried out to choose the most suitable locations for data collection, identifying and discarding locations that may provide non-representative and unreliable measurements due to the existence of vortices in the air flows, depending on the ventilation scenarios proposed (cross, outdoor, indoor-indirect). The study enabled the selection of a series of points that respond to the needs of CO2 monitoring and control which go beyond those established in the legislation or those collected in previous research, as far as we are aware. Therefore, a methodology was proposed that helps to select the CO2 control points according to the existing conditions in the indoor spaces under study.
The data collected wirelessly for interpretation could be evaluated on an Internet of Things (IoT) platform, in real time or deferred. As a result, IAQ could be controlled, interfacing IAQ devices with other systems (such as HVAC). The integration of this type of low-cost clonic devices into existing buildings allows regulation of ventilation, balancing safety through air renewal with comfort and energy efficiency. This ensures adequate sanitary conditions for the occupants while also favoring the optimization of energy resources. In this way, a smarter building was achieved, adding value to its refurbishment and modernization.
Future lines of research should focus on cataloging and parameterizing the location and distribution of the devices according to the behavior of indoor air in other scenarios and measuring the influence of this control on the comfort and energy sustainability of the building, since ventilation, as a means of natural air renewal, can exert a negative influence on energy efficiency when spaces are conditioned. Finally, to facilitate the replicability and comparability of this research, data analysis organised by spreadsheets is included as
Supplementary Materials.