## 2 Materials and Methods
### 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 12). 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  
Figure 2: Clonic device assembled with SEN0219 and ELEGOO MEGA 2560 R3. could have been used such as exposing the sensor to a gas with a known CO\({}_{2}\) concentration or to a gas with no CO\({}_{2}\) 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:  
\[\text{CO}_{2i}=(C_{1}\times V_{i})-C_{2} \tag{3}\]  
where:  
\(\text{CO}_{2i}\) is the concentration in ppm unit at \"\(i\)\" time. \(V_{i}\) is the voltage in mV unit at \"\(i\)\" time. \(C_{1}\) is the first constant in linear regression line. \(C_{2}\) 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 CO\({}_{2}\), 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.