Efficient room temperature carbon dioxide gas sensor based on barium doped CuO thin films

For a safe environment, harmful-gas sensors of low cost and high performance are essential. For CO2 gas sensing applications, Ba-doped CuO thin films with 4 mol% and 6 mol% Ba were produced on glass substrates using the successive ionic layer adsorption and reaction approach. Utilizing various techniques, crystallographic structures, nanomorphologies, and elemental compositions were examined to assess the impact of doping on the characteristics of the films. According to the structural and morphological analyses, the nanocrystalline films consisted of irregularly shaped nanoparticles, which assembled to form a rough surface with unequal grain sizes. Because of its nanoporous nature, the CuO:6% Ba thin film exhibited the most substantial nanomorphological change and the highest gas sensing capability. At varied CO2 gas flow rates, the maximum sensor response (9.4%) and Rair/RCO2 ratio (1.12) at room temperature (RT = 30 °C) were observed at 100 SCCM. By optimizing the sensor’s operating temperature, the sensor response value reached 82.2% at 150 °C, which is approximately eight times the value at RT. Selectivity, reusability, repeatability, detection limit, and quantification limit were all tested. It shows excellent response and recovery times of 5.6 and 5.44 s. In comparison to prior literature, the improved sensor is suited for use in industrial applications.


GRAPHICAL ABSTRACT Introduction
In more recent times, environmental pollution has emerged as a significant issue as a direct result of the expansion of industrialization and the human population. The four main types of environmental pollution are noise, water, air, and soil contamination. The contamination of both the air and the water is particularly harmful, not only to people but also to the ecosystem. Researchers have developed various tools, such as gas sensors, air quality control, water purifiers, and so on, to address these difficulties and find solutions [1]. Because of the widespread use of industrial processes, the atmosphere now contains a variety of potentially harmful gases, including CO 2 , NO 2 , NO, and others. CO 2 is well known as one of the most dangerous contaminants that may be released into the atmosphere. Emissions of carbon dioxide occur from a wide number of sources, such as the manufacturing of automobiles, the generation of electricity, the burning of fossil fuels, other industrial operations, and so on. Carbon dioxide emissions have been associated with several negative effects, both on people and the environment. As a result of this, it is necessary to build low-cost and high-sensitivity sensor devices that can detect the presence of hazardous gases in the surrounding environment. CO 2 gas may be detected using a variety of gasmonitoring devices, such as metal oxide semiconductors, conducting polymers, and metal oxide/ polymer composites [2].
Researchers are becoming more interested in metal oxide semiconductor gas sensors as a result of their excellent long-term stability, compact size, and straightforward detection process [2]. The performance of metal oxides that are chemically and physically stable, such as ZnO, WO 3 , and TiO 2 [3][4][5], has been significantly improved. However, the selective detection of CO 2 gas continues to be a challenge for such sensors. As a result, we have investigated how well a sensor based on CuO can detect CO 2 . Since CuO is a p-type semiconducting material with a medium bandgap of 1.2-1.9 eV, it is well suited for use in the manufacturing of gas sensors that can function at temperatures in the moderate range [6,7]. It is usual practice to combine nanostructured metal-oxide-semiconductor (MOS) materials with noble metal additions to enhance the gas-detecting capabilities of a sensor, notably its sensitivity [8,9]. The fabrication of MOS gas sensors at a cheap cost and in large quantities requires the substitution of noble metals for materials that are free of noble metals. Chemical doping of non-noble metals, on the other hand, has been proven in experiments to increase the gas-detecting characteristics of MOSs by changing morphologies and surface treatments. By introducing impurities into the material, this is possible. A few scientists have investigated the potential use of doped CuO in gas sensing. As described by Tang et al. [10], Pt-doped CuO nanoflowers were used in the development of extremely sensitive hydrogen sulfide (H 2 S) gas sensors. By doping copper oxides with Zn, Lupan et al. [11] reported the development of hydrogen-sensing elements with high sensitivity and selectivity. Cretu et al. calculated the Zn-doped CuO's hydrogen sensing properties using density functional theory (DFT) [12]. In recent work, Choi and colleagues investigated how the presence of aliovalent dopants affected the gas-sensing properties of CuO [13]. Due to the adaptable properties and applications of CuO nanostructures, many different preparation techniques have been established to produce them. These methods include pulsed laser deposition, thermal oxidation, ultrasonic spray pyrolysis, chemical bath deposition, hydrothermal, sol-gel, electro-deposition, sputtering, and the successive ionic layer adsorption and reaction (SILAR) technique [14][15][16][17][18][19][20][21]. Each of these methods of preparation offers a variety of benefits, the specifics of which are contingent on the application. SILAR is a low-cost, low-temperature technique for the development of nanostructured thin films. The simplicity of SILAR, its low cost, moderate reaction conditions, repeatability, outstanding material use efficiency, controllability, and the feasibility of large-area coating are what set it apart from other methods. The non-uniformity of the CuO films made using the SILAR method-films with differences in their thickness, structure, and properties-has previously been observed in a few studies [22][23][24][25].
Numerous researchers employ the technique of doping to increase the effectiveness of host materials in terms of their morphological, chemical, and electrical properties. [26][27][28]. This procedure increases the material's usability for a wide range of technological applications in addition to improving the material's physical qualities. Vanadium, strontium, manganese, zinc, cerium (III), and iron are examples of dopants that have been used to alter the properties of CuO [29][30][31][32][33][34]. Compared to other types of dopants, the ionic radius of Ba 2? ions (1.35 Å ) is greater than that of Cu 2? ions (0.73 Å ), which promotes the incorporation of Ba 2? at Cu 2? lattice sites and changes the band structure and band gap values of the pure CuO material. CuO has been synthesized in several techniques [35][36][37][38][39][40][41][42][43][44], but the SILAR technique allows the direct deposition of thin films onto glass substrates simply and cost-effectively at low-temperatures.
So, it is meaningful to employ the SILAR approach to produce CuO and Ba-doped CuO nanostructured films on glass substrates at room temperature (RT) for gas sensing applications. In this work, a cationic solution containing NH 4 OH is used as the complexing agent, and an anionic solution comprised of hot water heated to 90°C is used to produce the nanofilms by the SILAR approach. It has been carefully examined how Ba-doping and its ratio affect the structures, morphologies, and optical behaviors of CuO films. Additionally, undoped and Ba-doped CuO nanofilms have been investigated for CO 2

CuO and Ba-doped CuO thin films synthesis
For depositing high-quality CuO films, clean glass substrates are essential, as contamination of the substrate surface results in undesired crystallization and the creation of non-uniform films. Glass substrates were ultrasonically cleaned for 10 min after being first purged with acetone and then deionized water.
As a cationic precursor, dried CuCl 2 solution was utilized to create a CuO thin film. The solution consisted of 100 mL of CuCl 2 Á2H 2 O at a concentration of 0.06 M. To modify the pH of the solution, a 9:1 solution of pure ammonia was added, as shown in Fig. 1a. The pH of the solution was determined to be * 9 using a pH meter. As a result of this reaction, [Cu (NH 3 ) 4 ] 2? is formed when the substrates are submerged in this solution. The substrate was then dipped in the anionic precursor for 20 s while being heated to 85°C. The adsorbed copper ammonia complex is then transformed into Cu(OH) 2 . Distilled water was then used to clean the substrate at RT for 20 s to eliminate the copper species that were only loosely linked. As a result, one cycle of Cu(OH) 2 deposition using SILAR has been finished. Note that the procedures described above were performed under ultrasonication. To produce high-quality thin films, these 40 SILAR cycles were performed several times. The hot distilled water is discarded after every five runs and replaced with fresh water. The created films were then rinsed with distilled water and dried in the air. To convert Cu(OH) 2 to CuO, the films were finally annealed in a furnace at 500°C for 4 h in the air. The choice of this annealing temperature is based on previous literature in order to reduce the band gap and guarantee that only CuO is formed [22,23]. Similarly, the 4 mol% and 6 mol% Ba-doped CuO films were prepared, whereas the cationic precursor solution was doped with varying concentrations of barium chloride, BaCl 2 Á2H 2 O.

Samples characterization
The crystallographic structures were investigated by X-ray diffraction utilizing the PANalytical X'Pert Pro X-ray diffractometer (XRD, Holland) with a copper source (CuKa1, k = 1.5406 Å ) and a scan range of 5°-80°with a step size of 0.04°. The nanomorphologies and elemental compositions were investigated using a scanning electron microscope (SEM) and energy dispersive x-ray microscopy (EDX) (JEOL JED-2300, Japan). The optical behaviors of the deposited films were studied by a double-beam spectrophotometer (Perkin Elmer Lamba 950, USA).

Gas sensing measurements
The gas sensing measurement system involves the basic measurement circuit for commercial metal-oxide gas sensors. To perform gas sensing experiments, a 1.0-L three-neck round-bottom flask equipped with rubber O-rings at the top of two of its necks has been prepared. There is a gas intake neck, an exit neck, and an electrical signal receiving neck on the flask. A 100% CO 2 gas sample is provided from a gas cylinder (supplied by the Beni-Suef Factory for medical and industrial gases, [ 99.999%) with synthetic air in the flask. As shown in the diagram for the schematic, Fig. 1b. The gas flow rate is monitored with the assistance of an Alicat MC-500SCCM-D gas mass flow controller (Hethel, Norwich, UK). Both ends of the sample were coated with a very thin layer of Ag before being attached via copper wires to the Keithley measurement-source device (model 2450, Tektronix, Beaverton, OR, USA) to collect charges on the edges of thin films. It is important to point out that the experimental apparatus was maintained at RT (30°C) during the process of data collection. The conductive silver paste was utilized throughout the process of establishing ohmic contacts on both ends, which functioned as electrodes. After adjusting the quantity of CO 2 that was introduced into the chamber, the sensor's voltages were quantified and analyzed. For the selectivity test, CO 2 , NO, CO, and NH 3 gas cylinders of high purity ([ 99.999%) were purchased and used synthetically with air.

Results and discussion X-ray diffraction analysis
As can be seen in Fig. 2, X-ray diffraction was utilized to investigate the nanoparticles' phase structure as well as the crystallite size after pure and Ba-doped CuO films, had been formed using SILAR for a total of 40 cycles. All the measured diffraction peaks are consistent with the monoclinic structure of CuO (space group C2/c), as stated by standard card number 03-056-2309. The monoclinic structure of CuO is the most stable crystal structure, as determined by the air phase of CuO [45]. Based on the relative peak intensities, the XRD charts demonstrate that the formed films have a polycrystalline structure. The two major peaks have been assigned to the (-111) and (111) planes, respectively. Numerous earlier experiments on CuO films produced peaks that were quite similar [46]. The (-111) plane is the favored crystal plane of the nanocrystallites because it has a strong peak intensity. At a Ba doping level of 6%, a less prominent peak appeared at an angle of 2h = 65.41°; this peak corresponds to the (022) plane. Ba is not responsible for any peaks that have been identified. This indicates that Ba 2? ions are held very securely within the atomic structure of CuO. The absence of peaks associated with contaminants (such as Cu, Cu(OH) 2 , Cu 2 O, or CuCl 2 ) also refers to the growth of superior single-phase, pure, and doped CuO nanocrystallites that are chemically pure [47].
The non-crystalline nature of both the undoped and Ba-doped CuO nanofilms that were deposited may be deduced from the intense and distinct diffraction peaks. As displayed in Fig. 2, the peak intensity also increases as the doping concentration of CuO with Ba is raised to higher levels. This suggests that there was a progressive improvement in the crystal quality of the films as the percentage of doping increased. The crystallite size (D) was estimated via Scherrer's equation (Eq. 1) [48].
where 'k' is the shape factor (k = 0.9), 'k' is the wavelength of the X-rays; 'b' is the full width at halfmaximum (FWHM) of the diffraction peaks (in radians), and 'h' is the Bragg's diffraction angle. The interplanar distance (d) value of the as-grown and annealed CuO thin films was found with the help of Bragg's law, (Eq. 2) [49].
Using Eqs. 3 and 4, we calculated the strain (e) introduced into the thin films as a result of lattice distortion, and the minimum dislocation density (d) was determined [23].
Moreover, the texture coefficient (T C ) and the Bragg R-factor (R B ) were determined from an XRD spectrum to evaluate the amount of preferred orientation of the crystallites in the deposited films by utilizing the following relationships (Eqs. 5, 6), respectively [50].
The measurement is referred to as the peak intensity I (hkl), whereas the peak intensity I o (hkl) is an estimate based on theory. For the (hkl) plane, I (hkl) and I o (hkl) stand for the relative intensity that was measured and the relative intensity that was measured using the standard JCDPS card, respectively; N stands for the number of diffraction peaks that are going to be taken into consideration. Table 1 displays the values of T C , which also show that the (-111) plane is the optimum crystal-line orientation for all films with T C values that are larger than 1. The findings of this analysis are consistent with those of several other works that have come to similar conclusions in the past. A decline in crystal quality and structure was observed as the dislocation density increased. Consequently, the morphological and optical properties of thin films are highly sensitive to defect concentration. The relationship between crystallite size and dislocation density acts in the opposite direction. The XRD peak broadens as a result of microstrain. Table 1 displays the results of this analysis. Smaller crystallites in the 6% Ba-doped film (D = 18.8 nm) could improve the thin film's sensitivity to CO 2 gas sensing. The microstrain (e) in the film structure is essential to surface properties. At 6% Ba, the strain value goes up to 0.169% if the doping ratio is increased [51]. The presence of tensile residual stress, as indicated by a positive microstrain, suggests that the thin films are broadening due to nonuniform atomic displacements to the reference-lattice positions.
A lower crystallization along a given plane in the film is represented by a higher value of dislocation density. The 6% Ba-doped sample had the most defects (28.16 9 10 -4 nm -2 ). The pinning effect on the surface atomic motions expands as the dislocation density rises and the film loses its crystallinity. This prevents the creation of new crystallites and leads to the growth of finer grains [52]. Measuring model-to-XRD data fit. Every video has a low RB, which indicates that there is a high degree of concordance between the results of experiments and the fitting models.

EDX spectra
The EDX spectra were measured for the pure film, CuO:4% Ba film, and CuO:6% Ba film, and the results are presented in Fig. 3a, b, c. The EDX examination and quantitative analysis of the CuO and Ba-doped CuO films' results revealed that the synthesized thin films were mostly made up of the Cu and O signals for the CuO film and the Ba signal for the CuO:4% Ba and CuO:6% Ba films. This provides additional evidence that the thin films generated are just as pure as the XRD data indicated. Figure 3b, c depicts the appearance of a Ba influence in the spectrum, which brings the ratio between Cu and O down to 0.86 and 0.80 for CuO:4% Ba film and CuO:6% Ba film, respectively. This is demonstrated by the inset quantitative tables in the graphs. Because the EDX interaction volume and the electron beam's penetration depth are greater than the thickness of the CuO and Ba-doped CuO thin films, the Si signal is detected from the glass substrate. The EDX signals that were produced may contain information regarding both the glass substrate and the deposited film; as a result, the quantitative analysis might not have been as accurate as it could have been.

Morphological study and surface roughness
It is widely known that the performance of a thin film as a gas sensor is significantly related to its morphological features. Using scanning electron microscopy, the morphological structures of the pure and Ba-doped nanostructured CuO films were examined. SEM images of undoped and Ba-doped CuO nanofilms are shown in Figs. 4a-c. The CuO film consisted of irregularly shaped nanoparticles, and the material itself had a rough morphology and an unequal grain size. As seen in the inset of Fig. 4a, there are also several agglomerates and nanoplates. Figure 4b, c shows the influence of Ba doping on the thin films' shape and grain size. The nanoparticles are aggregated and accumulated as nanoclusters in Ba-doped CuO films. The average size of the nanoparticles  Fig. 4g, h, i is estimated by the ImageJ software. The average size of nanoparticles was calculated under 1 lm magnification, and the ImageJ program was used to obtain the size distribution (Fig. 4g, h, i). After magnification, it became clear that the average size of the nanoparticles of pure CuO is approximately 140 nm. As for the size of the nanoparticles of CuO doped with Ba, it decreased from 70 to 30 nm with an increase in the doping ratio from 4 to 6%. The Ba 2? ions lower the growth rate by consuming the OH ions, which causes a greater abundance of smaller grains. Therefore, when the density of the nanoparticles increases, the CuO nanoparticles shrink and become more uniform. As  shown in Fig. 4c, the CuO:6% Ba film doesn't have enough grain development [53], so there are many pores between the nanoparticles, which increases the ability to use CuO:6% Ba for gas sensing applications [54]. ImageJ was used to analyze the surface roughness of pure CuO, CuO:4% Ba, and CuO:6% Ba, and the results are shown in Fig. 4d-f, respectively. Because of the formation of pores and the nonuniform growth of the CuO:6% Ba thin film, the surface roughness of CuO:6% Ba is greater than that of CuO:4% Ba and pure CuO. This causes increased surface area and gas sensitivity [54]. As shown in Table 2, the roughness parameters of CuO and Ba-doped CuO thin films were determined by Gwydion. The symbol (R a ) for the arithmetic average roughness represents the absolute average of the base length. For simplicity, the Ra value represents the average surface roughness over the whole length of the measurement that was carried out. The root-mean-square roughness (RMS), R q , is a common parameter that indicates the variance in height. Being relatively unaffected by scratches, contaminants, and measurement noise, this parameter allows for straightforward statistical treatment and reliable results. The maximum height of roughness (R t ) indicates the highest peak height plus its maximum valley depth. Due to its reliance on peak values, max height is highly sensitive to scratches, contamination, and measuring noise, despite its widespread application. The average maximum height of roughness (R tm ) indicates the average of the highest peak height plus its maximum valley depth Skewness (R sk ). This metric is associated with the dispersion of heights. R sk = 0 indicates the normal distribution, R sk [ 0 implies that the standard deviation is greater than zero, and R sk \ 0 implies that the standard deviation is smaller than zero. Kurtosis (R ku ) is used to examine the level of contact between two objects, as it is related to the geometry of the peaks and valleys at their tips. Height is distributed properly when R ku = 3, discontinuously when R ku-[ 3, and uniformly when R ku \ 3. Table 2 shows the values of R a , R q , R t , R p , R pm , R sk , and R ku for pure CuO and Ba-doped CuO thin films. Figure 5 shows the room-temperature optical absorbance (A) and transmittance (T) spectra of undoped and Ba-doped CuO films. Figure 5a shows that all films have strong visible absorption bands. As NIR wavelengths grow, absorption decreases dramatically. Strong UV and visible absorption intensities are attributed to electronic transitions from 2p O -2 (valence band) to 3d/4 s metal ion orbitals (conduction band) [45]. Figure 5b shows that all films transmit light similarly. The films' visual transmittance is almost nil due to strong absorption. All films' transmission rises above 800 nm.

Optical properties
The absorption coefficient (a) was computed using absorbance (A) and film thickness (t) (Eq. 7).
The optical bandgap is a primary factor in determining a semiconductor's ability to absorb light (E g ). It is commonly accepted that CuO is a direct-allowed semiconductor. As given in Eq. 8, where a 0 is a constant independent of energy, and the optical absorption coefficient (a) is proportional to the square root of the incident photon energy (E g ) [55]. Figure 5c is a graph of (aht) 2 vs. photon energy (ht), from which we can extrapolate the straight-line part to obtain the bandgap values. From this graph, we can conclude that an increase in the doping ratio results in a wider bandgap, where the bandgap is increased from 1.59 to 1.68 eV and 1.75 eV for pure CuO, CuO:4% Ba, and CuO:6% Ba, respectively. The E g trend is in line with what XRD and SEM tests have found, and an increase in tensile stress causes the blue shift of the optical bandgap [56].

Current-voltage characteristics
To study the influence of increasing Ba doping on the CO 2 -sensing characteristics of CuO thin films, the CO 2 -sensing properties of each sample were evaluated systematically. The current-voltage (I-V) characteristics of undoped and Ba-doped CuO films over a voltage range of 0 to 10 V in a normal air and pressure environment at a room temperature of 30°C and in the presence of CO 2 gas at a flow rate of 50 standard cubic centimeters per minute (SCCM) are illustrated in Fig. 6. All of the thin films demonstrated linear I-V characteristics, indicating that ohmic electrical contact exists between the electrodes and the thin films. It is relevant to the sensing material's ability to transmit charge carriers without any disruptions [57]. The use of Ba doping increased the devices' electrical conductivity. Conductivity increases as Ba doping increases in the presence of CO 2 , as shown in Fig. 6. At the same voltage (10 V) for pure CuO, Fig. 6a, the current doesn't change, while for CuO containing 4%Ba, Fig. 6b, the current increases from 7.33 to 8.55 lA, and for CuO:6% Ba, Fig. 6c, the current increases from 1.22 to 4.28 lA as the CO 2 flows through the system. According to these results, Ba-doping improved the sensing response of CuO to CO 2 . The optimizing effect emerges in CuO:6% Ba, which raises the conductivity more than three times the original value. This phenomenon can be explained by the fact that the particle size is getting smaller [58].

Dynamic response
In this test, the synthesized sensitive layers were subjected to different CO 2 gas flow rates while being balanced with air at RT. The results of these tests were analyzed. In addition to this, tests for cross-interference and studies of response and recovery characteristics were carried out. Figure 7 the dynamic resistance responses of CuO:4%Ba and CuO:6%Ba films in CO 2 and air atmospheres. The measurements were made at different CO 2 flow rates of 20, 40, 60, 80, and 100 SCCM balanced with air. Because of the interaction between the CO 2 gas and the surface of the Ba-doped CuO sensors, there is a change in the concentration of charge carriers, which contributes to the change in sensor resistance. CuO exhibited p-type behavior, which means that it conducts using positive holes rather than electrons as the majority charge carrier. Because CO 2 is an oxidizing Figure 5 Optical properties of pure CuO and Ba-doped CuO thin films; a absorbance and transmittance spectra and b plots of (ahm) 2 versus hm to determine E g . gas and Ba-doped CuO sensors' resistance reduces when exposed to various flowrates of CO 2 gas, this demonstrates the p-type material response of Badoped CuO. Therefore, the Ba-doped CuO gas sensor's current increased and the resistance decreased when it was exposed to the non-polar and oxidizing CO 2 gas molecules [58]. Also, Fig. 7 depicts how the change in CO 2 flow rate between 20 and 100 SCCM at RT affected the temporal responses of Ba-doped CuO sensors. The sensors' resistance decreased as the CO 2 flow rate increased, proving the suggested sensors' proper operation. Once the gases could leave, the sensors' resistance was reset to the initial value. The sensor response is elevated as the doping level is raised, as seen in Fig. 7a, b. For CuO:6% Ba and CuO:4% Ba, respectively, the ratio R air /R CO2 increases to 1.12 and 1.04 at a flow rate of 100 SCCM.
Sensor response, response time, and recovery time Figure 8a illustrates the relationship between the values of the R air /R CO2 ratio and the flow rate of CO 2 gas ranging from 20 to 100 SCCM. Also, the response (R%) of the sensor can be obtained from Eq. (9).
The value of R CO2 is obtained from the dynamic response after a predetermined amount of time spent in CO 2 exposure, and R air is determined after exposure to air under the same pressure and temperature [59]. From Fig. 8b, as the gas flow rate increases, the CuO thin film becomes more sensitive as the doping level increases. The response of CuO:4% Ba increased from 1.79 to 2.97% when the flow rate was increased from 20 to 100 SCCM, as shown in Fig. 8b, while the response of CuO:6% Ba increased from 4.1 to 9.4%.
After CO 2 has been introduced, the response time is measured as the amount of time the sensor takes for the relative resistance change to reach 90% of the value at the steady state. Figure 8c depicts the relationship between the estimated response time of the Ba-doped CuO sensors and the gas flow rate. The amount of time required for the sensor to achieve a resistance that is 10% higher than its initial value is referred to as the recovery time. An estimate of the time needed to recover at each flow rate is obtained from Fig. 7, and the results are depicted in Fig. 8d. For a flow rate of 100 SCCM, the response time for CuO:6% Ba is 5.6 s, whereas the response time for CuO:4% Ba is 5.9 s. Additionally, CuO:6% Ba recovers in 5.4 s, while CuO:4% Ba recovers in 6.4 s at the same flow rate. This demonstrates that the response and recovery times are lowered by increasing the doping percentage and that the optimal doping ratio is 6%. This indicates that the CuO:6% Ba sensor has the fastest response and recovery times to CO 2 gas due to its high surface roughness, which enhances its responsiveness and recovery to CO 2 gas [59][60][61].
Reusability, repeatability, detection limit, and the limit of quantification The rate at which a gas sensor maintains its performance over time is an important consideration for its use in practical applications. Figure 9a depicts the change that occurred in the R air /R CO2 ratio of CuO:6% Ba film after it was subjected to 100 SCCM CO 2 for a continuous 5 cycles of gas on and off at RT. As shown, there is almost no change, showing great repeatability. In addition, as can be seen in Fig. 9b, the CuO:6% Ba sensor was subjected to a flow rate of 100 SCCM CO 2 for one month, and this exposure was repeated once per day at RT. The data shown in this figure demonstrates that the first response of the sensor remained practically unchanged during the thirty days of continuous testing. This demonstrated that the material utilized to make the sensor was of high quality and could withstand long-term operation. Throughout the test, the response value of the sensor hovered around 9.69%. This demonstrated that the sensor is reliable and has a high capacity for reuse.
Equation 10 allowed for the calculation of the sensor's detection limit (DL) based on the standard deviation (SD) of the sensor response and the slope of the straight segment.
The detection limit for CuO:4% Ba was determined to be 2.13 SCCM, while the slope was 2423.5 X/s, and the standard deviation was 1715.97. On the other hand, the detection limit for CuO:6% Ba was calculated to be 0.123 SCCM, while the slope was 45469.69 X/s, and the standard deviation was 18255.69. The DL results indicate that the CuO:6% Ba film is more effective than the CuO:4% Ba film since it has the lowest detection limit [62].  Using Eq. (11), we were able to determine the sensor limit of quantification (QL), representing the smallest number of CO 2 molecules detectable.
The limit of quantification for CuO:4% Ba is calculated to be 7.1, and for CuO:6% Ba, it is calculated to be 0.402. According to QL values, the CuO:6% Ba sensor is more efficient than the CuO:4% Ba sensor because it has a lower QL.

Effect of temperature and sensor response
As can be seen in Fig. 10a, it was observed that the response of the CuO:6% Ba sensor improved when the operating temperature was increased up to 150°C. These improvements were followed by declines as the operating temperature increased. With a sensor response value of 82.2% at 150°C, which is approximately eight times the value at RT, this indicates that the ideal operating temperature for CuO:6% Ba is 150 ± 5°C.
When defining the capabilities of gas sensors, selectivity is an essential aspect that must be taken into consideration. The selectivity of gas sensors based on metal oxides is a key area of challenge. Most of the time, the method that is used to evaluate the selectivity of a sensor is to subject the device that is being tested to a variety of gases and then measure the sensor response ratio for each gas using Eq. (12).
Therefore, the CuO:6% Ba sensor response was evaluated by subjecting it to a flow rate of 100 SCCM of CO 2 , CO, NH 3 , and NO at ambient temperature. Figure 10b shows that the sensor was more sensitive to CO 2 than to any of the other tested gases Figure 10c depicts the results of the study that compared the selectivity of various gases to CO 2 . The percentages for these gases are as follows: 43.61% for NO, 25% for CO, and 16.67% for NH 3 .

Gas sensing mechanism
Chemi-resistance is the concept that the film's electrical conductivity or resistance will alter when it is exposed to a target gas. The transferring of charge carriers that occurs when gases are adsorbed on the surface of metal oxides (MOX) allows for the electrical conductance to be tuned based on the type of majority carriers existing on the MOX and the properties of the interacting gas (oxidizing or reducing). For instance, the conductivity of p-type MOX improves when it interacts with an oxidizing gas, but on the other hand, the resistivity of p-type MOX increases when it interacts with reducing gases. Typically, the acceptor level in a p-type semiconductor like CuO, NiO, Co 3 O 4 , and Cr 2 O 3 is close to the valance band. At ambient temperature, the acceptor level is often fully ionized (filled), leaving gaps in the valance band (Fig. 11a) [63]. After the surface of the CuO has been exposed to air, the oxygen in the air will be adsorbed on the CuO surface. This occurs because of the CuO's surface states trapping electrons. Band bending and an increase in hole concentration near the interface are the consequences of this, and the outcome is the formation of a layer at the CuO surface that accumulates holes (holeaccumulating layer HAL) (Fig. 11b) [63]. This results in a reduction in the resistance of the CuO. Because oxidizing gases have a strong attraction for electrons, CO 2 is classified as an oxidizing agent [62]. The molecules interact with the surface of the CuO either by directly adsorbing onto it or by reacting with oxygen that has already been adsorbed. In either Figure 10 a Effect of temperature on the response of CuO: 6% Ba thin film at a flow rate of 100 SCCM diluted by air and RT; b sensor response; and c selectivity of the CuO: 6% Ba for various gases at a 100 SCCM flow rate diluted by air at RT. scenario, the adsorption of oxidizing gases causes electrons to be liberated from the surface of the CuO. This results in a rise in the width of the HAL (Fig. 11c), in addition to a decrease in the resistance of the CuO. Table 3 compares the CO 2 gas sensing properties of our proposed sensor with those of previously reported MOX-based sensors [64][65][66][67][68]. This table details the benefits of the proposed sensor, including its high gas response, short response time (5.6 s) and recovery time (5.44 s), and low operating temperatures (RT up to 150°C). These benefits, along with the low detection limit and strong selectivity, increase the potential for industrial use of the suggested CO 2 sensor in this work.

Conclusion
The undoped and Ba-doped CuO thin films are successfully synthesized by the SILAR technique. The effect of doping on the structural, morphological, optical, and gas-sensing properties of Ba-doped CuO thin films has been studied. In comparison to pure CuO and CuO:4% Ba thin films, the CuO:6% Ba thin film exhibits the smallest crystallite size (18.8 nm) and the highest level of surface roughness. The Figure 11 Structure of the energy bands around the surface of the material when it is interacting with oxygen and CO 2 gas: a before there was any interaction with the surface b the adsorption of oxygen results in the capture of electrons and the creation of a layer that accumulates holes, and c the oxidation of surface charge that occurs because of the contact with the CO 2 gas. EC refers to the position of the conduction band, EF refers to the position of the Fermi level, EV refers to the position of the valance band, q refers to the charge of the electron, and qVS refers to the potential barrier. sensor, constructed with a Ba-doped CuO electrode, operates at room temperature (30°C) and achieves a maximum sensing response of 9.4% at a 100 SCCM flow rate of CO 2 gas. CuO:6% Ba thin film shows high selectivity towards CO 2 relative to CO, NH 3 , and NO gases. Also, it shows excellent response and recovery times of 5.6 and 5.44 s, respectively. CuO:6%Ba performs at 150°C, where the sensor response is enhanced and increases to 82.2% at 150°C, which is approximately eight times the value at RT.

Acknowledgements
Not applicable.

Data availability
The data presented in this study are available on request from the corresponding author.

Declarations
Conflict of interest The authors declare no conflict of interest.
Informed consent Not applicable.

Open Access
This article is licensed under a Creative Commons Attribution 4.0 International License, which permits use, sharing, adaptation, distribution and reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons licence, and indicate if changes were made. The images or other third party material in this article are included in the article's Creative Commons licence, unless indicated otherwise in a credit line to the material. If material is not included in the article's Creative Commons licence and your intended use is not permitted by statutory regulation or exceeds the permitted use, you will need to obtain permission directly from the copyright holder. To view a copy of this licence, visit http://c reativecommons.org/licenses/by/4.0/.