Monitoring and analysis of carbon monoxide and methane using Sensors and Remotely Piloted Aircraft Systems

INTRODUCTION: Air pollution in urban areas becomes a severe challenge to global health; exposure to polluting gases can lead to different diseases and even human mortality. In this sense, monitoring the concentration of polluting gases such as carbon monoxide and methane is important. OBJECTIVES: This document focuses on developing a Remotely Piloted Aircraft System (RPAS) to monitor the concentration of carbon monoxide and methane at different altitudes. METHODS: This includes a Parrot AR Drone 2.0, where the measurement prototype was mounted. The data was transmitted and reception at a ground control station through an application programmed in LabVIEW 15.0. RESULTS: The experimental measurements showed that the concentration of carbon monoxide remains almost unchanged regardless of variations in altitude. In contrast, methane concentration reduces linearly with the increase in height with respect to ground level in Puerto Maldonado. CONCLUSION: We implemented an RPAS to monitor in real time, record data in a control station and analyze the concentration of carbon monoxide and methane in the South Eastern Peruvian Amazon.


Introduction
With accelerated urbanization, air pollution in urban environments has become a serious global health challenge [1].Among the main global factors that cause air pollution include emissions from the circulation of vehicles and aircraft, emissions derived from industrial companies, Among the most relevant polluting components in the atmosphere, carbon dioxide (CO2) stands out, whose presence in the atmosphere constantly increases due to fossil fuel use [9].Likewise, Carbon Monoxide (CO), a highly toxic colorless and odorless gas, arises due to the incomplete combustion of carbon-rich materials, such as gasoline, diesel, coal, and wood.This type of pollution comes from vehicles with combustion engines and various industrial activities [5], [10].In addition, there is Methane (CH4), a gas generated during organic matter decomposition under low oxygen conditions.Methane harms health and contributes to the greenhouse effect on Earth [11]- [14].
Air pollution is a significant factor in human morbidity and mortality [15], [16], with a rough estimate of nearly 7 million deaths attributed to exposure to air pollution.global level [17].An approximate percentage of 88% of these deaths occur in nations with low and middle income (PAHO, 2023).
The department of Madre de Dios, located in the southeastern region of the Peruvian Amazon, is strategically located at the confluence of two international borders, Brazil and Bolivia [18]- [20].This geographical location has triggered rapid demographic growth and human settlement in the region, driving the expansion of cities along the rivers and the founding of new towns along the roads [21].This population growth led to subsistence economic activities, such as mining, livestock, and agriculture, which unfortunately have led to large-scale deforestation through the indiscriminate burning of forests.In addition, the increase in the generation of solid waste is a consequence of human activities in the region.
Compared to conventional proposals such as balloons or airplanes, drones have become an improved alternative for sampling gases in the atmosphere [22].Indeed, there are numerous case studies on air pollutant monitoring and analysis systems using drone and IoT sensor technology.
For example, [23] used an aerial drone equipped with a miniature air sampling system to collect nitrogen-containing compounds to evaluate diurnal patterns and their spatial distribution.[24] used a drone where a miniaturized air sampling system was mounted to measure the concentration of air pollutants.They analyzed the spatial variation of these polluting agents and the determinants that influence this variability.Both studies are in an urban setting.
Air quality monitoring using low-cost devices has been a topic of growing research interest.An example of this is evident in the study presented by [25], who proposed the development of a low-cost air quality monitoring device mounted on an autonomous drone to perform measurements at specific points.The data obtained was transmitted through the LoRaWAN protocol to a network server and through the Internet to a web-based application.It also sends notifications and alerts in case of system operating problems.
Another innovative approach is presented in the study by [26], who developed a system based on low-cost sensors mounted on a drone with autonomous navigation.This system allowed air quality monitoring, with data transmitted in real-time to a local server over a Wi-Fi network.This facilitated the analysis of the concentration of toxic gases and polluting particles in the air.
Furthermore, [27] contributed to this line of research by developing a sensor-based system attached to a drone to monitor air quality in hard-to-access locations in real time.The collected data was stored on a remote server with access through smart devices connected to the Internet.
Regarding the transmission and visualization of data in the context of air quality monitoring, we can mention that [28] developed a drone equipped with sensors capable of measuring the concentration of atmospheric pollutants at different altitudes in real-time flight.This data is transmitted wirelessly to a cloud server and presented graphically in a mobile application, allowing efficient access and immediate understanding of the quantitative levels and air quality index.
For their part, [29] designed an autonomous drone that uses ZigBee technology to transmit air quality data to a remote station.This research highlights its ability to detect elevated concentrations of nitrogen dioxide (NO2).In response to these elevated levels, the automated system applies chemical solutions to reduce pollution, significantly contributing to air quality control and air pollution mitigation.Both approaches represent fundamental advances for the acquisition and interpretation of real-time data in the field of air quality monitoring.
The choice of the South Eastern Peruvian Amazon as the location to carry out this carbon monoxide and methane monitoring study responds to a series of crucial factors.Despite its immense ecological value, this region faces specific environmental challenges related to deforestation, soil degradation, and the expansion of human activities such as livestock and agriculture.These activities are triggering significant emissions of greenhouse gases that contribute to climate change and environmental degradation.Therefore, evaluating the concentration of carbon monoxide and methane in this Amazon region is essential better to understand their impact in the region and globally.
Most sources of polluting gases are related to anthropogenic activities, and their monitoring generally includes complex gas analyzers and high operating costs.Using low-cost sensors becomes an economical alternative to measure these concentrations; however, it is necessary to calibrate them to guarantee reliable measurements [30].Therefore, the carbon monoxide and methane sensors were calibrated in this research.This calibration was based on the relationship between the sensor readings and factorycalibrated equipment.A closed chamber and ventilation system were used to improve sensor performance.With the measurements obtained, a correlation and regression analysis was carried out between the concentration of the gas measured with the factory-calibrated equipment and the voltage obtained with the low-cost sensor, thus, the equation that explains the sensor's response was received.In addition, temperature and relative humidity were measured to make corrections and minimize their effects on the signal captured by the sensor.
In this scenario, in our study, we propose the measurement of gases such as carbon monoxide and methane in the South Eastern Peruvian Amazon region.To do this, we will implement low-cost gas sensors and use RPAS (Remotely Piloted Aircraft Systems) to collect accurate and detailed data.After that, we will seek to establish mathematical models that allow us to understand and quantify the relationship between the concentration of these gases and altitude, contributing significantly to a better understanding of the environmental processes in this exceptional region.

Materials and methods
Low-cost gas detection using drones allows monitoring of air pollution in areas where this has been lacking in the past.It supports the community in making more informed decisions on air quality issues [31].Our proposal is a neutral tool, which, even with unique capabilities to capture data from advantageous perspectives, guards against any ethics violation.

Materials
We monitor continuous gas concentration using a remotely piloted aircraft system (RPAS).A prototype based on lowcost sensors was implemented to measure the concentration of carbon monoxide (CO) and methane (CH4).These data were transmitted with a radio frequency module to a ground control station, where they were received for storage and visualization through an application developed in LabVIEW 15.0 trial version (see Figure 1).Additionally, the temperature and humidity of the atmosphere were monitored to analyze their impact on the variability of CO and CH4.

Unmanned aerial vehicle
We use the Parrot AR Drone 2.0 Elite Edition, a low-cost quadcopter with an embedded control system to regulate flight parameters and achieve greater stability in the air [32].This aerial vehicle is equipped with a 720p HD camera, Wi-Fi b/g/n that provides a wireless transmission range of up to 50 meters, a pressure sensor, an ultrasonic sensor to measure altitude, an accelerometer, a gyroscope, a magnetometer, a 1000 mAh rechargeable lithium polymer battery that provides 12 minutes of flight autonomy [33].The drone was used to transport the prototype for measuring the concentration of carbon monoxide and methane in the air at different elevation levels.

Carbon monoxide sensor
The MQ-7 sensor was used to quantify the concentration of carbon monoxide gas in the air.This sensor can measure between 10 and 10,000 parts per million (ppm) of CO concentration.It comprises an Al2O3 ceramic microtube, a sensitive layer of tin dioxide (SnO2), an electrode to carry out the measurement, and a heater that provides the appropriate conditions for the measurement.It has 6 pins, 4 of which are used to collect the signals and 2 pins to supply current to the heater [34].At its output, an analog voltage signal is generated in response to changes in the surface resistance of the sensor, which depends on the temperature and humidity of the measurement environment [35].

Methane Sensor
The MQ-4 sensor was used to measure the concentration of methane gas in the air.It is a semiconductor-type sensor with high sensitivity.It can measure concentrations of 200 to 10,000 ppm [36].It comprises an Al2O3 ceramic microtube, a sensitive layer of tin dioxide, an electrode for measurement, and a heater to increase the internal temperature necessary for the other components.It has 6 pins, 4 to collect signals and 2 to provide a heating current.It requires calibration with a load resistance to adjust its sensitivity to methane.The influence of ambient temperature and humidity must be considered [37], [38].

Arduino Nano
It is a board with the same characteristics as the Arduino Uno but with reduced physical dimensions.Therefore, it is a very portable device.Its small size makes it suitable for projects requiring reducing weight, so it was selected to be integrated into the RPAS [30], [39].This development board was used to program the acquisition and processing of the polluting gases CO and CH4 and the wireless transmission of the data to the ground control station.

Arduino Uno
It is a card with an ATmega328 microcontroller that operates at 16 MHz and is based on this microcontroller for developing prototypes and projects [40].It has 14 digital inputs/outputs, 6 analog inputs, and 3.3V and 5V power pins.Alternatively, it can connect to batteries via the VIN pin.In addition, it has 32 KB of program memory, 2 KB of RAM, and 1 KB of EEPROM [41].This card was used to program the wireless reception and processing of the data measured at the Earth station.

Radiofrequency module
The NRF24L01 communication module is a transceiver (emitter and receiver) that operates in the 2.4 GHz ISM band to send data up to 1000 meters within the line of sight [42].Provides 126 selectable frequency channels, 3 data transfer rates: 250 Kbps, 1 Mbps, and 2 Mbps, supply voltage from 1.9 V to 3.6 V, low current consumption (115 mA maximum), and transmission power of +20 dBm.It communicates through a 4-pin SPI (Serial Peripheral Interface) interface with a maximum data rate of 10 Mbps [43].Two NFR24L01 modules were used to send the data from the drone to the ground station using the air as a transmission medium and the other to receive the data wirelessly.

LabVIEW
It is a graphical programming language aimed at scientists and engineers to automate their measurement systems.In LabVIEW, no written code is used, graphical representations of the circuits called virtual instruments (VI) are built, and virtual instrumentation replaces complex and expensive hardware to control physical instruments [44].LabVIEW is used with data acquisition hardware and a computer so that the user can control devices that collect, manipulate, and visualize data.Programs developed with LabVIEW are generally used for data acquisition, instrument control, and industrial automation in various operating systems [45].An interface programmed with LabVIEW is used at the control station to control the drone and collect, store, and display measured CO and methane data, as well as temperature and humidity.

Methods
The RPAS monitoring tests were carried out at the facilities of the National Amazonian University of Madre de Dios, located in the city of Puerto Maldonado (12°35'18" south latitude, 69°12'35.19"west longitude, altitude 207 meters above sea level.), district and province of Tambopata, department of Madre de Dios, Peru.The assembly of the prototype for monitoring the CO and methane parameters is shown in Figure 2.

Data acquisition
The data acquisition prototype was composed of the Arduino Nano board and the CO and CH4 sensors, coupled to the plastic casing of the AR Drone 2.0 to perform the measurement every second for a maximum period of 5 minutes in each flight test experimental at different altitude levels above the ground.
When calibrating the carbon monoxide sensor, a prior warm-up had to be carried out for 10 minutes by connecting to a power source.A lit candle to produce the CO sample, the MQ-7 sensor, the DHT22 sensor, and the TENMARS TM801 brand portable equipment were housed in the closed chamber (see Figure 3).The MQ-7 sensor was connected to an Arduino Uno board to acquire data in 5-second intervals through an application developed in LabVIEW.
where   is the concentration of carbon monoxide,  7 is the voltage generated by the MQ-7 sensor.
To calibrate the methane sensor, the gas produced by decomposing cattle manure, the MQ-4 sensor, the DHT22 sensor, and the Valiometer brand portable equipment model GPT100 were introduced into the closed chamber (see Figure 4).The MQ-4 sensor was connected to an Arduino Uno board to collect data every second with an application developed in LabVIEW.

Figure 4. MQ-4 Sensor Calibration Process
Through regression analysis with the RStudio application, equation 2 was obtained, which explains the logarithmic response of the sensor for any measured value of methane concentration.

Ground control station
The CO and CH4 concentration measurements were transmitted from the data acquisition prototype mounted on the drone to the ground control station with an NRF24L01 radio frequency module operating at 2.4 GHz.At the ground station, the data were received with another module, NRF24L01, connected to an Arduino Uno board and visualized and graphed in real-time through an interface programmed with LabVIEW (see Figure 5).

Results and discussion
Below, we present the results derived from our.The data set supporting our findings consists of 939 rows and 7 columns.The "N" column acts as the sample identifier, while "Experiment" covers experimental tests ranging from EXPERIMENT 1 to EXPERIMENT 14.The "Date" column reflects the date of each experiment."CO_ppm" quantifies the concentration of carbon monoxide in parts per million, "CH4_ppm" represents the concentration of methane in parts per million, "Altitude_m" provides the altitude in meters concerning ground level, and "Battery" indicates the percentage of the battery of the drone used.To provide an initial view of this data set, we present the first 6 instances in Table 1.

Correlation and regression analysis of carbon monoxide concentration and altitude
An initial statistical review was performed within the scope of our exploratory data analysis, and the results are summarized in Table 2.The carbon monoxide concentration in these measurements does not exhibit notable fluctuations.The maximum and minimum values barely show significant differences, suggesting that the collected samples maintain relative stability in terms of carbon monoxide concentration, regardless of variations in altitude.
This finding is further supported by Figure 6, which displays a scatter plot plotting carbon monoxide concentration about altitude over the four measurement days.It should be noted that the data are divided into four groups, corresponding to the samples collected on 2023-08-04, 2023-08-05, 2023-08-09, and 2023-08-10, designated as Group I, Group II, Group III, and Group IV, respectively.Since no significant relationship was observed between these variables, a regression analysis was decided not to be conducted.

Correlation and regression analysis of methane concentration and altitude
In this study stage, we organize the data obtained in our experimental set into groups, classifying them according to the sampling day and considering the altitude variable concerning the ground.In other words, we compare methane concentration (in parts per million -ppm) as a function of altitude (measured in meters).In Figure 7(a), we present the scatter diagram of Group I, which corresponds to the samples collected on 08-04-2023.This group comprises the data from experimental tests 1, 2, 3, 4, and 5 and has been differentiated through distinctive colors.This graph shows an inversely proportional trend between methane concentration (measured in parts per million) and altitude (expressed in meters).
The correlation and regression analysis carried out with the data from Group I, which considers the relationship between methane concentration and altitude, yielded the following results: a Pearson correlation coefficient (r) of -0.8443628 and a coefficient of determination (R2) of 0.7129.In addition, the values of the intercept equal to 39.94465 and the slope amounting to -1.30571 were identified.These data are detailed in Table 3 for your reference.

The correlation and regression analysis corresponding to
Group II was based on the data from experimental tests 6, 7, 8, and 9 carried out on 08-2023-05.The scatter graph represented in Figure 7 was generated ( b).In this case, the analysis revealed a Pearson correlation coefficient (r) equal to -0.8735921 and a coefficient of determination (R2) of 0.7632.Likewise, the values of the intercept, which was 38.24027, and the slope, which registered -1.85335, were obtained (see Table 3 for more details).
In the case of Group III, the data from experimental tests 10 and 11, collected on 08-2023-09, were used, from which the graph presented in Figure 7(c) was obtained.The correlation and regression analysis between methane concentration and altitude in this group resulted in a Pearson correlation coefficient of r=-0.9207097 and a determination coefficient of R2=0.8477.Additionally, the intercept and slope values of the regression were recorded, which were 38.3851 and -1.7554, respectively (see Table 3 for details).
For the correlation analysis of Group IV, we used the data from experimental tests 12, 13, and 14.As a result, we obtained the graph presented in Figure 7(d).The regression analysis between methane concentration and altitude of Group IV showed a Pearson correlation coefficient of r=-0.9533454 and a determination coefficient of R2=0.9089.The intercept and slope values of the regression, which were 31.13939 and -0.48763, respectively, are detailed in Table 3.
Next, we present Table 4, where the linear regression models between methane concentration and altitude relative to the ground are found.According to the results obtained in Table 3, where the Pearson correlation coefficient (r=-0.8444) is negative and close to -1, and the p-value of 2.2e-16, much lower than 0.001 (99.99% confidence) indicates that there is sufficient statistical evidence of a relationship between the variables methane concentration and altitude.In the same table, we observe a coefficient of linear determination (R^2) of 0.7129, indicating that the fit of the linear model is good because its value is close to 1. Specifically, according to [46], the 71.29% variability of methane concentration is explained by the linear regression model presented in Table 4.We can conclude that, in Experimental Group I, the linear model adequately describes the relationship between the variables methane concentration and altitude.
In relation to Group II, the Pearson correlation coefficient (r=-0.8736) is negative and close to -1, and the p-value of 2.2e-16, much lower than 0.001 (99.99% confidence), indicates that there is sufficient statistical evidence of a relationship between the variables methane concentration and altitude.The linear determination coefficient (R^2) of 0.7632 suggests that the fit of the linear model is good because its value is close to 1. Specifically, according to [46], the 76.29% methane concentration variability is explained by the linear regression model presented in Table 4. Therefore, we conclude that, in Experimental Group II, the linear model adequately describes the relationship between methane concentration and altitude variables.
Table 3 also shows that in Group III, the Pearson correlation coefficient (r=-0.9207) is negative and close to -1, and the p-value of 2.2e-16, much lower than 0.001 (99.99% confidence ), which indicates that there is sufficient statistical evidence of a relationship between the variables methane concentration and altitude.A linear determination coefficient (R^2) of 0.8477 suggests that the fit of the linear model is good because its value is close to 1.According to [46], the 84.77% variability of the methane concentration is explained by the linear regression model presented in Table 4.We conclude that, in Experimental Group III, the linear model adequately describes the relationship between the variables methane concentration and altitude.
Finally, for Group IV, the Pearson correlation coefficient (r=-0.9533) is negative and close to -1, and the p-value of 2.2e-16, much lower than 0.001 (99.99% confidence), indicates that there is sufficient statistical evidence of a relationship between the variables methane concentration and altitude.In this same group, the coefficient of linear determination (R^2) of 0.9089 indicates that the fit of the linear model is good because its value is close to 1.This indicates that 90.89% of the variability of the methane concentration is explained by the linear regression model presented in Table 4.We can conclude that, in Experimental Group IV, the linear model adequately describes the relationship between the variables methane concentration and altitude.
After the correlation and regression analysis, we can affirm that in the four experimental groups, it is observed that the concentration of methane reduces linearly with the increase in height concerning the ground level of the city of Puerto Maldonado.

Conclusions
In this study, we implemented a Remotely Piloted Aircraft System (RPAS) to monitor and analyze the concentration of carbon monoxide and methane in the Southeastern Peruvian Amazon.The RPAS consisted of carbon monoxide (MQ-7) and methane (MQ-4) concentration sensors connected to an Arduino NANO data acquisition card and an AR DRONE 2.0 Elite Edition.With the NRF24L01 module, data was transmitted and received to a ground control station using an Arduino UNO REV3 board and an application developed in LabVIEW 15.0.
We calibrate the MQ-7 and MQ-4 sensors to obtain reliable and accurate measurements.We conducted a correlation analysis between the values obtained with lowcost sensors and those recorded with portable equipment.We obtained correlation coefficients of 0.99254 and 0.97426 for each case.It was also found, through a regression analysis, that the exponential function   = 275.7583× ( 7 ) Finally, the regression analysis demonstrated that there is sufficient statistical evidence to affirm that the concentration of methane reduces linearly with the increase in height concerning the ground level of the city of Puerto Maldonado, based on the data of the five experimental groups selected from the database generated with the RPAS.

Figure 2 .
Figure 2. Assembly of the measurement prototype on the AR Drone 2.0

Figure 5 .
Figure 5. Interface programmed in LabVIEW to receive CO and CH4 measurements

Table 1 .
Carbon monoxide and methane data set

Table 2 .
Initial statistical summary

Table 3 .
General summary of correlation and regression analysis

Table 4 .
Linear regression models for experimental research groups Slope of the linear model of group i   = Intercept of the linear model of group i 2.2159better explains the response of the MQ-7 sensor and the logarithmic function  4 = 40.3409× Ln( 4 ) + 76.6351 best describes the response of the MQ-4 sensor, both based on the response (voltage) generated by each sensor.