Abstract
The consistent detection of low-level carbon monoxide (CO) and methane (CH4) is important for safety, environmental monitoring, and early leak identification. Semiconductor metal oxides are considered to be the most promising candidates for such applications. However, their performance is usually hindered by limited speed and less sensitivity. Herein, three heterojunction systems—ZnO/SnO2 (Z/S) (n–n), NiO/ZnO (N/Z) (p–n), and SnO2/NiO (S/N) (p–n)—were synthesized through a controlled hydrothermal route. A systematic comparative study of these n–n and p–n interfaces is carried out to determine the most effective heterojunction structure for improved room-temperature CO and CH4 sensing performance. Structural and morphological studies have proved a well-defined interface with homogenous surface features. In fact, the phase purity was well proved by X-ray diffraction, the homogeneous element distribution was identified by field emission scanning microscopy/energy dispersive X-ray spectroscopy, and the surface roughness was decreased, as determined by atomic force microscopy 2D/3D profiles with Ra values of 81.547 nm (Z/S), 46.084 nm (N/Z), and 24.272 nm (S/N). Ultraviolet–visible spectroscopy confirmed the sequential bandgap narrowing: 3.2 eV for Z/S, 2.6 eV for N/Z, and 2.4 eV for S/N, indicative of enhanced electron interaction across the interfaces. J–V measurements exhibited diode-like behavior, showing a sequential decrease in cutoff voltage to 0.7, 0.6, and 0.4 V, respectively. Accordingly, electrochemical impedance spectroscopy analysis showed a decrease in charge-transfer resistance from 16.2 to 2.2 and 1.4 kΩ. Improved electron mobility has also been demonstrated from thickness measurements, which revealed that the S/N film exhibited the thinnest layer (0.4 μm) relative to Z/S (2.0 μm) and N/Z films (1.4 μm). This was further emphasized in the gas-sensing experiment, which demonstrated the clear omnipotence of the S/N heterostructure; hence, it enabled a fast response/recovery time of 15/24 s for CO and 18/42 s for CH4 at low concentrations with high sensitivity and long-term stability in ambient conditions. The improved sensing ability could be ascribed to the strong p–n junction, smallest depletion width, and low interfacial resistance. Moreover, the sensing ability of the sensor was validated using machine learning algorithms, wherein consistently, the Random Forest (RF) algorithm appeared to have a stronger predictive power than Support Vector Machine (SVM). In fact, RF performed better than SVM by achieving higher R-Squared (R2) values for each regression problem, which were generally in the range of 0.80–0.85 compared to the lower and more fluctuating performance of SVM. Likewise, a drift was noticed in the classification performance where RF achieved accuracies of 0.91/0.88 for CO and 0.93/0.89 for CH4 under A1 and A2 scenarios, respectively, outperforming SVM in all cases. Finally, this study hereby confirms that the concept of heterojunction, specifically the S/N interface, combined with machine learning-assisted analysis, provides a promising route forward for the realization of next-generation room temperature gas sensors with high sensitivity, fast response, and accurate predictive capabilities.
Keywords
Introduction
The degradation of air quality owing to the existence of toxic gases such as carbon monoxide (CO) and methane (CH4) has become one of the most prominent issues across the world due to their severe health and environmental impacts. CO is recognized as a critical pollutant in global health standards and is known to cause acute and chronic respiratory and cardiovascular diseases with long-term exposure (World Health Organization (WHO), 2021). Climate change research also emphasizes the effects of rising levels of greenhouse and toxic gases on global warming and environment change, thus increasing the need for precise, faster, and reliable gas detection methods (Parmesan et al., 2022). Metal oxide semiconductors (MOS) are identified as potential gas sensors because of their ability to be tailored electronically, exhibit multiple oxidation states, and strong gas molecule interaction (Liu et al., 2017). The early stages of gas sensor research laid down crucial guidelines in terms of sensitivity, stability, and temperature requirements (Yamazoe, 2005), while the concepts of depletion regions and surface ionosorption were the initial foundation for understanding chemiresistive phenomena (Barsan and Weimar, 2001). Finally, the performance of the sensor depends on factors such as morphology, crystallinity, defect density, and ambient conditions such as humidity and temperature (Wang et al., 2010). In light of this, nanostructured metal oxides and hybrid heterointerfaces have been extensively investigated in order to obtain high selectivity and rapid response rates for room-temperature sensors (Zhang et al., 2016). MOS gas sensors are still being developed with advancements in structural engineering, surface chemistry, and catalytic materials (Dey, 2018). Due to their high porosity and large surface area, metal-organic sensing architectures have also been investigated (Koo et al., 2019). Catalyst loading, for example, Pt-decorated SnO2 nanostructures, have shown a pronounced effect on the kinetics of CO oxidation and amplification of signals (Zhou et al., 2018). Heterojunction gas sensors have recently gained increasing attention owing to their favorable band offset, enhanced depletion regions, and fast charge separation at the interface, which are uniquely beneficial for sensing applications (Miller et al., 2014). Chemisorbed oxygen species (O2−, O−, O2−) are very important in understanding the sensing response, particularly in SnO2-based sensors, where ionosorption is responsible for electrical modulation (Gurlo, 2006). In this context, basic research on charge transfer at interfaces is a complementary source of information on electron-hole transport at semiconductor interfaces (Van de Krol and Grätzel, 2012). The extensive documentation of gas sensor materials attests to the significance of phase purity, defect levels, and surface reaction dynamics (Korotcenkov, 2013). In particular, NiO, a p-type metal oxide, displayed excellent sensitivity and selectivity in detecting reducing gases such as CO and CH4 because of the hole-accumulation mechanism (Kim and Lee, 2014). At room temperature, Z/S heterostructures demonstrated UV-enhanced gas sensing due to improved charge carrier generation and faster adsorption–desorption dynamics (da Silva et al., 2017). Further studies on SnO2 nanostructure describe the effects of nanoscale grains, oxygen vacancies, and surface states during rapid and reversible gas detection (Barsan et al., 1999). One-dimensional oxide nanostructures have also been reported to facilitate efficient conduction pathways with high surface to volume ratios, hence improved responsiveness (Choi and Jang, 2010). Room-temperature sensing studies on Z/N heterostructures highlight the importance of modified interfaces in enhancing environmental and breath-biomarker gas detection (Selvaraj et al., 2022). Doped MOS such as In-modified ZnO have shown that controlled incorporation of dopants can improve selectivity and reduce cross-sensitivity by modulating charge transport (Wang et al., 2016). Recent developments in noble-metal-sensitized composites, including Ag-modified Z/MoS2, demonstrate exceptional ppb-level detection of toxic exhaust gases due to catalytic activation and synergistic heterointerface engineering (Huang et al., 2025). Additionally, p–n heterojunctions based on emerging 2D materials continue to show promise for fast, stable, and selective gas detection due to efficient interfacial charge dynamics (Mathew et al., 2021). Parallel progress has taken place in ML, enabling new improvements in prediction accuracy, sensor design, and multi-gas classification. The ML-based frameworks have successfully been applied for the prediction and optimization in plasma systems regarding CH4 and CO2 conversions (Li et al., 2025). ML algorithms have optimized photonic crystal-based gas sensor designs for achieving superior spectral selectivity (Karmakar et al.). Time-resolved prediction of ambient CO2 and CH4 concentrations using ML models has been demonstrated for urban atmospheric monitoring (Park et al., 2025). SVM, RF, and Neural Networks have been widely used for mixed-gas classification and cross-sensitivity reduction in multi-sensor arrays (shaker Abd-Alhussain and Saleh, 2024; Zhang and Han, 2022). Furthermore, tools such as the confusion matrix provide critical evaluation of model prediction accuracy and classification performance for gas-sensing datasets (Khan et al., 2020).
Despite these advancements, challenges remain in achieving ultra-fast response/recovery times, high sensitivity between CO and CH4, reliable room-temperature operation, and robust structural–electrical correlation within heterojunction interfaces. In particular, there is a lack of systematic studies comparing n–n and p–n heterojunctions (Z/S, N/Z, S/N) in terms of their bandgap modulation, cutoff voltage behavior, charge transfer resistance, surface roughness, film thickness, and ML-assisted performance evaluation for low-ppm toxic gas detection. The work presented in this paper provides a holistic investigation of three designed heterostructures, namely Z/S (n–n), N/Z (p–n), and S/N (p–n), fabricated using a controlled hydrothermal technique. Ultraviolet–visible (UV–Vis) spectroscopy, J–V measurements, electrochemical impedance spectroscopy (EIS) analysis, atomic force microscopy (AFM), and thickness profiling in detail are correlated with low-ppm CO and CH4 gas-sensing performance at ambient temperatures. Furthermore, ML models, namely RF and SVM, have been used to evaluate the predictive accuracy and further enhance the reliability of the classification. A combination of experimental and computational methods is used to investigate the relationship between structures, interfaces, and performance in order to design next generation, low-power, highly selective gas sensors.
Literature study
The extensive literature on CO and CH4 gas sensors is displayed in Table 1.
Literature review for CO and CH4 gas sensors.
Research gaps and contribution
Recent literature clearly reveals the trend in heterojunction engineering but with specific and yet unresolved challenges.
Research gaps
Although much progress has been made, there are still many gaps in existing gas sensor literature.
Unquantified heterojunction mechanism: Most studies report enhanced sensing from heterojunctions but do not quantify the electronic factors ( No comparative design rules: Literature typically focuses on one heterojunction at a time, and there is no systemic guidance on which p–n, n–n, or p–p architecture is superior. Performance versus complexity trade-off: Many high-performing sensors rely on noble metals, MOF-derived structures, or complex processing, limiting scalability. Limited focus on stable and low-ppm gases: Few studies have addressed the dual challenge of detecting toxic low-ppm CO and chemically stable CH4 under similar testing conditions.
Contributions
The following contributions outline how this work addresses the identified research gaps directly:
Mechanistic clarification using J–V and EIS: This work quantitatively illustrates how the quality of the heterojunction affects sensor performance by correlating depletion width, Rct, and rectification ratio to sensing performance. Systematic comparison of three heterojunctions: The controlled, side-by-side evaluation among Z/S (n–n), N/Z (p–n), and S/N (p–n) leads to a clear performance hierarchy with the identification of S/N as the most effective junction. High performance using simple metal oxides: The obtained S/N sensor exhibits high sensitivity of 45.2 at 20 ppm CO, fast response/recovery, and good selectivity without using noble metals or involving complex synthesis. Targeted detection of CO and CH4: The study now demonstrates the capability for low ppb detection of CO and CH4 gases, which are normally hard to sense simultaneously. Hence, this work bridges an application gap.
Therefore, this study not only reports the development of an efficient sensor but also provides a rational design guideline to develop the next-generation noble-metal-free gas sensors by the strategic p–n heterojunction technique.
Experimental Methodology
The fabrication of metal oxide heterojunction gas sensors included the preparation of individual as well as composite nanomaterials, followed by precise deposition of these materials onto substrates. Figure 1 illustrates the major fabrication steps in a schematic manner.

Schematic representation of the sensor fabrication process: (a) Hydrothermal synthesis and post-treatment of metal oxide powders, (b) sequential layer-by-layer deposition of the sensing and functional layers onto an FTO substrate.
Synthesis of metal oxide nanostructures
Individual metal oxides (N, Z, and S) and their heterojunctions (Z/S, N/Z, S/N,) were synthesized by the hydrothermal method, as shown in Figure 1(a).
Synthesis of individual metal oxides
For the synthesis of N, the precursor solution was prepared by dissolving Nickel Nitrate Hexahydrate (Ni(NO₃)2·6H2O) and Urea (CO(NH2)2) in DI water using a magnetically stirred solution. The solution was then transferred into a Teflon-lined stainless steel autoclave, followed by hydrothermal treatment at 130 °C for 4 h. After hydrothermal treatment, the precipitate was filtered, washed with DI water and ethanol, dried at 100 °C for 24 h, and calcined at 450 °C for 6 h in an air atmosphere to obtain crystalline N powder. The hydrothermal method was used to synthesize Z and S powders using Zinc Nitrate Hexahydrate (Zn(NO₃)2·6H2O) and Tin(IV) Chloride Pentahydrate (SnCl4·5H2O) as the precursor materials, respectively, to ensure the uniformity of the morphology of the metal oxides.
One-Pot Synthesis of Heterojunction Nanostructures
The heterojunctions were synthesized using the modified one-pot hydrothermal approach. To describe the synthesis of the S/N heterostructure, for example, 2 mmol of SnCl4 · 5H2O and 1 mmol of Ni(NO₃)2 · 6H2O were mixed in 60 ml of DI water and stirred for 30 min. A solution containing 2 M urea was employed as the precipitating agent. The solution was then inserted into a Teflon-lined autoclave with a volume capacity of 100 ml and underwent hydrothermal treatment at 180 °C for 12 h. The final product was obtained through the filtration method and dried at 80 °C overnight. The N/Z and Z/S heterostructures were prepared using the same procedure with the correct concentrations.
Sensor Fabrication Process
The process for fabricating the gas sensor devices is illustrated in Figure 1(b).
Preparation of Sensing Paste and Substrate Cleaning
The synthesized nano-powders were finely ground with a mixture of ethanol and α-triphynol to form a uniform, adhesive sensing paste. At the same time, fluorine-doped tin oxide (FTO) glass substrates were cut to 2×2 cm pieces and were meticulously cleaned by successive ultra-sonication in DI water, ethanol, and IPA for 20 min each to obtain an impurity-free surface. The substrates had been dried at room temperature prior to coating.
Layer-by-layer deposition
Fabrication of the heterostructure sensors involved depositing multiple functional layers onto cleaned FTO substrates. The heterojunction sensors were prepared through the multi-step layer-by-layer deposition technique. First, a uniform base metal oxide sensing layer, for example, NiO, was deposited on the substrate using the doctor blade technique. This initial layer was then consolidated by subsequent thermal treatment for 1 h at 400 °C. After that, another metal oxide film was deposited by spin coating at 3000 rpm for 30 s to guarantee a homogeneous thin layer. For enhancing the electrical conductivity, a charge transport layer of Poly(3,4-ethylenedioxythiophene): Poly(styrenesulfonate) (PEDOT: PSS) was introduced into the device by employing the spin coating method, followed by mild drying at 60 °C for 10 min. At last, the thermal evaporation of Silver (Ag) electrodes was carried out to complete the device structure.
Structural and Functional Advantages of the Fabricated Sensors
The method adopted ensured the formation of interfacial heterojunctions between the various metal oxides that were well defined, which is significant for effective charge transfer and improved gas adsorption and desorption dynamics. The use of hydrothermal synthesis, thorough cleaning of the substrate, and layer deposition ensures improved film morphology and interfacial adhesion. All these factors combined ensure that the sensors are highly sensitive, have rapid response/recovery times, and are very stable in their operation, making these sensors highly suitable for use in environmental gas sensing applications.
Material characterization
The X-ray diffraction (XRD) was performed using a Bruker D8 Advance instrument with Cu Kα radiation to examine the crystal structure of the materials. The morphology and elemental composition of the materials were examined using field emission scanning microscopy (FESEM), which was performed using a Zeiss Sigma 300 instrument equipped with an Energy Dispersive X-ray Spectroscopy detector. AFM was performed to examine the topography of the materials using an AFM instrument from Bruker. Optical properties were examined by performing UV–Vis spectroscopy using a Shimadzu UV-2600 instrument. The J-V curves for all electrical properties were measured using a Keithley 2450 Source Meter instrument. A Biologic SP-300 potentiostat was used for performing electrochemical impedance analyses.
Results and discussion
Material characterization
Structural characterization
The crystal structure and phase identification were done using XRD for all heterojunction sensors synthesized. The XRD patterns for the Z/S, N/Z, and S/N-based sensors are shown in Figure 2. All the major peaks in the XRD patterns are indexed accurately. The XRD pattern for the Z/S sensor matched hexagonal wurtzite ZnO (JCPDS 36-1451) (Korotcenkov and Cho, 2017). Similarly, the S/N sensor matched tetragonal rutile SnO2 (JCPDS 41-1487) (Barsan and Weimar, 2001). The diffraction peaks regarding N/Z match very well with the standard patterns of bunsenite NiO (JCPDS 47-1049) (Miller et al., 2014). The structural parameters were calculated following established methods (Cullity and Stock, 2001; Langford, 1975). The average crystallite size was calculated using the Scherrer equation: D = Kλ/βcosθ, where K = 0.9, λ = 1.5406 Å, β is the FWHM in radians, and θ is the Bragg angle. The microstrain (ε) and dislocation density (δ) were calculated using ε = β/(4tanθ) and δ = 1/D2, respectively. The Z/S sensor in Figure 2(a) showed an intermediate structural property between the other two, consistent with the composite nature, wherein the material properties are often an average of the individual phases. As expected, the other extreme was represented by the lowest structural quality of the N/Z (Figure 2(b)) sensor, which had the smallest crystallite dimension of 35.7 nm and highest concentration of crystal defects of 7.85×1014 m−2. Generally, such defects act as electron trapping sites, which reduce electrical conductivity and degrade sensor performance in general. The S/N (Figure 2(c)) sensor exhibited the best structural properties as displayed in Table 2, with the largest crystallite size of 44.5 nm and lowest dislocation density of 5.07×1014 m−2. Such parameters are well-accepted as indicators of good crystalline quality for metal-oxide semiconductors, where higher charge transportation efficiency and gas sensing response are ensured directly.

XRD patterns of the (a) Z/S, (b) N/Z, and (c) S/N heterojunction sensors. The diffraction peaks in all the three sensors are indexed to their respective crystal phases, which confirm the formation of the metal oxide composite as intended.
Structural parameters of heterojunction sensors from XRD analysis.
FESEM and EDS analysis of Z/S, N/Z, and S/N heterojunction sensors: morphological and compositional correlation with gas sensing performance
The FESEM and energy dispersive X-ray spectroscopy (EDS) characterization of Z/S, N/Z, and S/N heterojunction sensors has provided key information about their nanoscale architecture and elemental composition, to which their gas sensing behaviors against CO and CH4 are directly linked.
Morphological features and their functional implications
All three sensors demonstrated FESEM images of high surface area morphologies that are suitable for gas adsorption and diffusion. The usual Z/S sensor in Figure 3(a) demonstrated a dense morphology of irregular nanoparticles that have surface roughness, which increases the gas accessibility and boosts the kinetics of the reactions (Prabakaran et al., 2024). On the other hand, the N/Z sensor in Figure 3(b) showed a granular morphology with aggregated particles of moderate porosity and interfacial contact (Vijaya Prasath et al., 2022). Contrary to the above, the S/N sensor (Rakibuddin and Ananthakrishnan, 2016) in Figure 3(c) demonstrated heterogeneous particles of different shapes and sizes that have surface roughness and develop a nanostructured environment that is efficient in gas interactions. Such morphological variation controls the formation and modulation of heterojunctions. Thus, the Z/S sensor created an n–n junction between Z and S promoting fast electron transfer and surface reactivity. The N/Z and S/N sensors developed p–n junction—N (p-type) with Z (n-type) and S (n-type) with N (p-type), respectively responsible for depletion layer modulation upon gas exposure.

FESEM and EDS characterization of the (a) Z/S, (b) N/Z, and (c) S/N heterojunction sensors.
Elemental composition and phase confirmation
EDS spectra confirm the elemental composition of each sensor. The Z/S sensor comprises Zn, Sn, and O, thus verifying the presence of Z and S phases. The N/Z sensor demonstrates strong signals for Ni, Zn, and O, indicating the formation of N and Z. The S/N sensor indicates the presence of Sn, Ni, and O peaks, which may indicate the presence of S and N phases based on the synthesis process. While EDS analysis confirms the presence of the elements in the samples, the phase analysis can be complementarily carried out through other methods such as XRD and high-resolution transmission electron microscopy (HRTEM). This may be able to verify the formation of crystalline phases and the integrity of interfaces based on established characterization procedures.
Comparative gas sensing performance
Among the three fabricated heterojunction sensors, it has been found that the S/N heterojunction sensor shows the highest sensitivity to both CO and CH4 gases. The improvement in the sensing response can be explained based on the effective construction of the p–n heterojunction between the S and N materials, leading to a strong built-in electric field. The interface electric field can improve the transport efficiency of the charge carriers during the adsorption and reaction of the gas molecules. In addition, the surface morphology of the S/N heterojunction sensor can be considered as having a large number of active sites for the strong interaction with the target gas molecules. On the contrary, the response and recovery time for the Z/S heterojunction sensor has been reported higher. The improvement in response and recovery can be attributed to the porous nature of the Z/S heterojunction sensor and the formation of the n–n junction. The smaller size of the sensor particles enables fast diffusion of gases in the sensing region. However, lack of a strong p–n junction effect limits the modulation of the charge carriers in the depletion region, resulting in a low sensor sensitivity compared to the S/N sensor. The N/Z sensor shows a moderate sensing response for both gases. Despite the fact that the p–n junction effect between N and Z materials enables the modulation of charge carriers in the depletion layer, the agglomerated structure of these materials and poor contact between them hinder the efficiency of charge carrier transfer in the sensing of gases. As such, the sensing response of the N/Z heterojunction is lower compared to the S/N heterostructure. The limitation is further evident for CH4 gas sensing, considering that higher activation energies are required for the oxidation of CH4 due to the strong C-H bonds. Thus, from the results obtained in the comparative analysis, the heterojunction type, charge transfer, and surface morphology are essential factors that influence the sensing performance of the developed gas sensors. Among the heterojunctions examined, the S/N heterojunction was found to have the most favorable electronic properties and surface characteristics for gas sensing.
HRTEM analysis and correlation with XRD, FESEM
HRTEM was used to examine the morphological properties, particle arrangement, and crystallographic properties of the prepared nanomaterial. Figure 4 gives the HRTEM images taken at various magnifications to give a complete understanding of the structural arrangement at different scales. Figure 4(a) shows the HRTEM image taken at a lower magnification (500 nm), which indicates the formation of agglomerated clusters of nanoparticles. The clusters are formed by nanoscale primary particles that are bound together by voids of lighter contrast. The presence of voids between the particles indicates a porous structure, which is ideal for improved adsorption and diffusion phenomena. The loosely packed clusters also indicate the presence of accessible surface area. Figure 4(b), taken at a higher magnification, clearly distinguishes the fundamental nanoparticles that form the agglomerates. The formation of these nanoscale particles into secondary clusters at a larger scale further supports the hierarchical structure of the material, which has been identified to possess organization at more than one scale. This hierarchical structure is highly beneficial as it provides both a high surface-to-volume ratio and continuous connectivity between particles, which is a critical requirement for efficient charge transport in sensing mechanisms. In addition, Figure 4(c) shows a selected area electron diffraction (SAED) pattern, and it is quite evident that the lattice fringes are well resolved, indicating the crystalline nature of the material formed. The interplanar spacing (d-spacing) of the lattice fringes matches quite excellently with the diffraction planes identified in the XRD analysis. Also, the particle morphology and size distribution evident in the HRTEM images are in agreement with the surface morphology and grain structure obtained from FESEM analysis, thus confirming the uniformity of morphology in nanoscale and microscale observations (Liu et al., 2023; Malik et al., 2024). In general, the results obtained from the combined HRTEM, XRD, and FESEM analyses offer conclusive proof of the development of a porous, hierarchical, and crystalline nanostructure. The porosity between particles in the HRTEM images is in agreement with the mesoporous properties deduced from BET analysis, while the agreement between HRTEM d-spacing and XRD analysis confirms the structural integrity of the material. This well-defined structural environment is expected to make a significant contribution to the improved functional performance of the synthesized nanomaterial.

(a) HRTEM image of the synthesized nanomaterial recorded at a scale of 500 nm, showing agglomerated nanoparticle clusters composed of interconnected primary nanoparticles with visible interparticle voids, indicating a porous morphology, (b) Higher-magnification HRTEM image illustrating the hierarchical assembly of nanosized primary particles into larger secondary agglomerates, confirming the multi-scale structural organization of S/N, (c) selected area electron diffraction (SAED) image.
Atomic force microscopy
AFM was employed to investigate the nanoscale surface morphology and quantify roughness parameters of the Z/S, N/Z, and S/N heterojunction thin films. AFM measurements provided 2D and 3D topographies as displayed in Figure 4 and statistical metrics summarized in Table 3. These results are discussed in correlation with FESEM observations (section “FESEM and EDS analysis of Z/S, N/Z, and S/N heterojunction sensors: morphological and compositional correlation with gas sensing performance”) and gas sensing performance toward CO and CH4.
Surface roughness parameters and gas sensing performance from AFM.
Z/S thin film
The Z/S film, as indicated in Figure 4(a), had the roughest surface with Ra = 81.547 nm, Rq = 98.483 nm, and Rpv = 406.053 nm. Thus, the AFM image indicated dome-like structures that are expected from FESEM images of aggregated granular textures (Jlassi et al., 2014). The kurtosis and skewness values of Rku = 2.378 and Rsk = −0.345 indicated extreme vertical surface features with depressions. All these are expected from the results obtained from the gas sensing measurement, where Z/S indicated good performance in CO but poor performance in CH4 due to the high activation energy required.
N/Z thin film
The Rz film as indicated in Figure 4(b) had a moderate surface roughness (Ra) of 46.084 nm, root mean square roughness (Rq) of 53.948 nm, and peak -to-valley height (Rpv) of 228.013 nm. The kurtosis (Rku) of 2.361 and skewness (Rsk) of −0.440 imply that the surface texture is such that it has deep depressions. This surface texture agrees with the FESEM results that indicated irregular nanoparticle sizes and surface texture (Bhunia et al., 2016), which enables the adsorption of gas molecules and the transfer of electrons in the p–n junction. Thus, the N/Z sensor displays balanced response-recovery characteristics and sensitivity to CO and CH4 (Akbari-Saatlu et al., 2024).
S/N thin film
The S/N thin film represented the most homogeneous surface (Figure 5(c)) with Ra of 24.272 nm, Rq of 29.215 nm, and Rpv of 149.464 nm, a high value of kurtosis, Rku of 2.930, and a near-zero value of skewness, Rsk of −0.159, indicating finely grained symmetric morphology.

AFM 2D and 3D topography images and roughness profiles for (a) N/S, (b) N/Z, and (c) S/N thin films. Values of the corresponding Ra, Rq, and Rpv in Table 3 show a high level of enhancement in uniformity and fineness in the surface features of the S/N hetero-junction.
Consequently, these AFM data are in good agreement with FESEM observations of heterogeneous yet nanostructured surfaces (Quy and Bark, 2022), thus supporting efficient p–n junction formation between S and N. Indeed, this refined architecture increases the adsorption–desorption cycles that enable rapid response and recovery. Importantly, due to the synergistic effect of the surface characteristics and heterojunction-induced charge transport efficiency (Jiang et al., 2021), the S/N sensor exhibited superior sensitivity and dynamic performance toward CO and CH4. AFM analysis confirms that the nanoscale roughness and surface uniformity are of key importance to gas sensing performance. Among the three heterojunction sensors, S/N is the one with the most favorable morphology derived from AFM, with close-packed nanostructures and homogeneous surface, pointing toward highly efficient modulation of p–n junctions. These characteristics were directly translated into high sensitivity and fast response/recovery times for CO and CH4 detection, thus verifying its superior performance compared to Z/S and N/Z sensors. The morphological analysis is in good agreement with the functional properties of the sensors, indicating a substantial nanostructured tuning via heterojunction formation.
Analysis of layer thickness for gas sensing performance
The thickness profiles of the Z/S (Akbari-Saatlu et al., 2022), N/Z (Tian et al., 2016), and S/N (Gagaoudakis et al., 2023) thin films—measured as 2.0, 1.4, and 0.4 µm as shown in Figure 6(a), (b), and (c) respectively—reveal a clear correlation between structural depth and gas sensing behavior. Although the Z/S and N/Z films have comparatively larger thicknesses, previous research reported that very thick oxide layers limit gas diffusion due to which the effective sensing volume decreases, and only the top region participates in the adsorption–desorption process (Korotcenkov, 2013; Yamazoe, 2005).

Surface morphology and thickness profiles of the (a) Z/S, (b) N/Z, and (c) S/N thin film gas sensors. Measured thicknesses of the active layers are 2.0 µm for Z/S, 1.4 µm for N/Z, and 0.4 µm for S/N, respectively.
This trend is in line with the Z/S and N/Z samples where deeper layers’ act like electronically inactive layers, leading to response kinetics with slow rates and decreased sensitivity. Conversely, despite having the thinnest active layer of 0.4 µm, the S/N sensor resulted in a high sensing performance. This improvement by heterojunction formation between S and N arises due to an efficient p–n heterojunction which enhances charge separation at the interface, providing faster electron transport across the interface (Shankar and Rishi, 2020). The reduced thickness makes the whole film activate in gas interaction in order to minimize the recombination losses for fast dynamics of adsorption–desorption. Similarly, in thin nano-structures of S/N, optimized interfacial contact combined with high surface reactivity resulted in significantly enhanced sensitivity. Thus, taking all facts together, high surface reactivity, efficient charge transfer, and full film utilization are generally combined in an S/N heterostructure, which makes this device most effective compared to the other two configurations for CO and CH4 detection. These results satisfy the previous reports where great importance is provided for the controlled film thickness along with junction engineering to realize superlative gas sensing performance. Table 4 clearly demonstrates that the superior performance of the S/N sensor is a result of a synergistic combination of excellent electronic properties (confirmed by J-V, EIS, and band gap analysis) and an optimally modified physical thickness.
Analysis of active layer thickness and its impact on gas sensing performance.
UV–Vis spectroscopy
The UV–Vis absorption spectra shown in Figure 7(a) and respective Tauc plots (Figure 7(b)) indicate explicit band gap tuning within the three heterostructures. Among them, the Z/S presents the widest gap of 3.20 eV, followed by N/Z at 2.60 eV, while S/N has shown the most pronounced narrowing at 2.40 eV. Such red-shifts are characteristic of strong interfacial electronic coupling and the formation of hybridized defect-assisted states, a behavior recently reported in oxide heterojunctions synthesized through controlled thin-film engineering (Palai et al., 2022). The significantly reduced band gap of the S/N system evidences increased electronic activation, because a smaller gap (Sitt et al., 2013) reduces the excitation energy for charge carriers, thereby increasing the material's sensitivity at typical operating temperatures. This is in line with recent studies that have found optimized p–n oxide interfaces to enable efficient charge separation and improve surface reaction kinetics. As a result, the S/N heterostructure demonstrates its superior sensing property to both CO and CH4 molecules: for CO molecules, the easy activation of electrons with the reduced gap facilitates the transfer of electrons released from the reaction of CO molecules with surface oxygen species, thus leading to a larger resistance modulation; for CH4 molecules, which require higher activation energy because of their stable C-H bonds, the electronically activated S/N interface offers an increasingly more favorable catalytic environment, thus enabling a response level that is measurable and unachievable by the wider gap (Khan et al., 2024) systems. Contrarily, the lower band gap variations observed for Z/S and N/Z systems are indicative of a weaker interface coupling and a less effective heterojunction formation, which could explain the lower sensitivity and slower charge transfer rates observed for these systems. Summarizing, the band gap evolution delivers direct electronic evidence for the performance hierarchy by confirming that the S/N heterostructure realizes the most effective band engineering thus enabling an improved charge participation and superior detection of both reactive CO and the more inert CH4 molecules. Further corroboration of the interpretation that S/N heterostructure attains most electronically activated state is delivered by progressive narrowing of optical band gap summarized in Table 5. An optimized band structure reduces excitation energy of charge carriers, thereby increasing sensitivity and surface reaction kinetics, identified recently as key determinants of superior CO and CH4 sensing performance in oxide heterojunctions.

(a) UV–Vis absorbance spectra and (b) Tauc plots of Z/S, N/Z, and S/N heterostructured thin films.
Band gap energies of the heterojunctions.
Energy band diagram
Energy band diagram for S/N heterostructure
The electronic interactions responsible for the superior gas response of the S/N heterostructure are clearly illustrated by its energy band diagram (Figure 8) (Shao et al., 2023).

Energy band diagram of the SnO2/NiO heterostructure, showing band alignment, charge transfer, and gas interaction mechanisms.
S and N have different band positions before contact; S (n-type) has a conduction band (CB) minimum at 4.55 eV and valence band (VB) maximum of 8.1 eV, while the CB and VB of N (p-type) sit at 2.15 and 5.7 eV below the vacuum, respectively. In creating this heterojunction, electrons transfer from S to N while holes transfer in the opposite direction. As a result, an internal electric field is formed at this interface. As a result of this uneven charge distribution, band bending occurs in a Type II staggered alignment where the CB of S is lower than in N, while the VB in N is higher than in S (Lo et al., 2011). This arrangement helps in the separation of the charge carriers through the presence of electrons in S and holes in N. This helps in increasing the efficiency of the charge carriers. The coupling effect helps in reducing the band gap further to 2.4 eV. This was achieved through the Tauc analysis. This helps in the easier excitation of the electrons for improvement in the baseline conductivity. The reduction in the band gap helps in reducing the activation energy for the reaction of the gas. This enables the faster detection of CO and CH4. In addition, the field enables the faster transport of the charge carriers to contribute to the faster response and recovery characteristics. All these factors confirm the role that the optimized band structure plays in the high-performance gas sensing capability of the S/N heterostructure.
Electrical and electrochemical characterization
J–V measurements
These J–V curves mainly provide clear electronic evidence for the order of performance of these three heterostructures, and the main parameters of these three heterostructures are summarized in Table 6. Sample Z/S (Lee et al., 2015), with the largest cut in voltage of 0.7 V and the lowest current of 50 μA (Figure 9(a)), has the largest transport barrier and the lowest carrier mobility, which directly affects the response of the sample to CO and CH4. Sample N/Z (Wang et al., 2008), with moderate improvement and a cut in voltage of 0.6 V and a current of 100 μA (Figure 9(b)), is limited by the interfacial resistance due to the non-completion of the band alignment, which affects the speed of the charge transfer and the modulation of the sensing.

J–V characteristics of the three heterostructured thin-film sensors (Z/S, N/Z, and S/N).
Comparative J–V parameters of the proposed heterostructures.
In contrast, sample S/N (Athira et al., 2022) has the most favorable electronic profile with a significantly lower cut in voltage of only 0.4 V and a current as high as 170 μA (Figure 9(c)), again emphasizing the excellent energy barrier and efficient charge transport at the p–n junction. Compared to sample N/Z, this improvement enables nearly 46% higher current and a 0.2 V reduction in activation threshold for faster carrier modulation, stronger resistance shifts upon gas adsorption, and thus the most sensitive and rapid CO (Michel, 2010) and CH4 detection among all samples, confirming S/N as the best heterostructure for high-performance gas sensing.
EIS analysis
As seen from Figure 10, the EIS results distinctly demonstrate the variation in charge transfer resistance among the three heterostructured sensors, and these values are quantitatively summarized in Table 7. Corresponding to the highest Rct of 16.2 kΩ (Figure 10(a)), the Z/S sample shows the largest semicircular arc in the Nyquist plot, indicating that the interfacial charge transport is sluggish and the electron exchange during gas-surface reactions encounters a big barrier.

Nyquist plots of (a) Z/S sensor, (b) N/Z sensor, and (c) S/N sensor.
Charge transfer resistance (Rct) of the sensors in air.
The arc of the N/Z sensor is moderately sized in response to the Rct of 2.2 kΩ (Figure 10(b)), reflecting that it is partially improved but still limited by the interfacial resistance. By contrast, the S/N heterostructure displays the smallest semicircle with the lowest Rct value of 1400 Ω (Figure 10(c)), which is well consistent with its superior charge transfer capability. This lowers the resistance, enabling fast electron movement during the oxidation step of CO and ensuring the required charge activation for the more challenging CH4 dissociation step, thus ensuring fast response and recovery characteristics. The gradually increased Rct values of Z/S and N/Z function as electronic bottlenecks, hindering charge mobility and thus directly accounting for their relatively poor sensing capability. Thus, based on the EIS result in Figure 8 and the corresponding data in Table 7, the S/N heterostructure is confirmed to have the most desirable interfacial electronic properties for efficient CO and CH4 detection.
Analysis of EIS for gas sensing
The Rct value obtained from the EIS results provides a clear electronic reason for the variation of gas sensing performance among these heterostructures. For CO gas sensing, the surface oxidation reaction needs efficient electron transfer from CO molecules to the metal oxide interface; S/N has the lowest Rct value, which favors this process best, resulting in a greater and faster resistance change, thus enhancing both sensitivity and response speed. CH4 sensing, on the other hand, is even more dependent on charge availability since the breaking of its stable C-H bonds is the rate limiting step, wherein this reaction demands a continuous electron supply. The low Rct of the S/N junction can enable this charge flow, and since more electrons are supplied, thereby allowing the sensor to be turned on and thus oxidize CH4 more readily, in contrast to the high resistance of the Z/S structure which resists electron flow and yields a significantly weaker and slower response.
Gas sensing performance
The gas sensing setup, as represented in Figure 11 (Kimiagar et al., 2018), allows for the evaluation of the sensing of CO and CH4 gases through the precise control of the gas flow rate, temperature, and other sensing parameters.

Schematic diagram of the gas sensing experimental setup for CO and CH4 detection.
In the case of CO gas sensing, the controlled flow of CO gas is directed into the chamber and strikes the surface of the sensor, where the CO gas is oxidized at the surface through the donation of electrons at the metal oxide surface. The donation of electrons into the surface results in the change in conductivity, which is monitored using the PICOTEST M3510A and the data acquisition system, allowing for the rapid evaluation of the change in conductivity resulting from the rapid kinetics of electron injection. It is difficult to sense the gas CH4 because of the bonds formed by C and H, as they have to be activated before the start of the reaction. The surface is heated by the heater to the required temperature for the activation of the gas CH4, and the surface has to provide the required electrons for the reaction. This is due to the precise concentration of CH4 that is delivered by the mass flow controllers. The bubbler is responsible for ensuring that the flow dynamics are stabilized in a manner that will allow the detection of the fine changes in conductivity that correspond to the slow activation process of CH4. In conclusion, the system depicted in Figure 11 presents a controlled environment that demonstrates the ease with which the electron transfer occurs in the CO oxidation reaction compared to the dissociation process that is required for the CH4 molecule, thus making it suitable for the evaluation of different heterostructures in the management of gas reactions
Chemiresistive gas detection mechanism
Chemiresistive gas sensors operate based on the following principle: the resistance of the semiconducting materials used in the sensors changes in the presence of target gas molecules. Oxygen molecules adsorb on the surface of the chemiresistive materials exposed to ambient air. This adsorption causes the trapping of conduction band electrons by the adsorbed molecules. This causes the formation of ionized oxygen species such as O2−, O−, or O2−. This adsorption generates the formation of an electron depletion region on the surface of the chemiresistive materials, thus increasing the resistance of the materials (Zong et al., 2025). When the reducing gases, such as CO or CH4, react with the adsorbed oxygen species, redox reactions occur, and the trapped electrons are released back to the conduction band. Thus, the width of the depletion region is reduced, and the electrical resistance of the sensor is changed, which is the sensing signal (Thayil and Parne, 2025b). It was recently discovered that the performance of the gas sensing was improved by using nanostructure sensing materials because they have a higher surface-to-volume ratio and active sites for adsorption (Thayil et al., 2024). Furthermore, the synthesis of nanocomposites and heterostructures enables efficient charge transfer and maximizes the interaction between the sensing surface and the gas molecules, thus improving the sensitivity, response-recovery time, and specificity of the gas sensors (Thayil and Parne, 2024a).
Sensing mechanism
The gas sensing mechanism of the proposed S/N heterostructure sensor is mainly dominated by the reaction between the target gas molecules (CO and CH4) and the adsorbed ionized oxygen species on the surface of the nanostructured metal oxide material, as well as the electronic modulation effect from the p–n heterojunction between the two materials S and N. The schematic representation of the sensing mechanism is shown in Figure 12.

Schematic illustration of the CO and CH4 gas-sensing mechanism on a nanostructured metal-oxide surface.
When the sensor is exposed to ambient air, initially oxygen molecules adsorb on the surface of the sensing material. The free electrons from the conduction band of S are captured by these adsorbed oxygen molecules, forming different ionized oxygen species in different temperature conditions. The adsorption reaction can be explained by reaction equations (1) to (4) (Han et al., 2025).
The removal of electrons from the conduction band results in an electron depletion region at the surface of S, thereby increasing the electrical resistance of the sensor. Aside from these effects of adsorption, it is also observed that the performance of the sensor is greatly affected by the formation of the p–n junction between S and N. Due to the difference in Fermi levels of S and N, electrons diffuse from S to N, accompanied by holes from N to S until equilibrium is achieved. The electrical potential barrier between S and N affects the electrical resistance of the sensor. The formation of the heterojunction improves the performance of the sensor in the detection of the presence of gas. This is due to the fact that the formation of the heterojunction between the two materials, S and N, at the interface increases the depletion region at the interface, which is crucial in the improvement of the performance of the sensor. The formation of the heterojunction also improves the performance of the sensor through the modulation of the charge carriers during the interaction with the gas. And in addition, it allows for the faster transfer of electrons from the sensing surface to the adsorbed species of oxygen. This will improve the sensing and sensitivity of the sensor. Once the CO gas is introduced into the sensor, the adsorbed species of oxygen on the sensor's surface will react with the introduced gas. This will result in the release of the electrons back into the conduction band. This will reduce the resistance of the sensor. The main reaction equations (5) and (6) for the sensor are as follows (Ciftyurek et al., 2025):
These electrons then recombine with the holes present at the heterojunction interface. This results in a significant reduction in the resistance value, which is then detected as the sensor response. The detection mechanism for CH4 gas also occurs through the oxidation mechanism. However, the CH4 molecules need more activation energy because they consist of C-H bonds. Once the molecules are activated, they react with the ionized oxygen species present on the sensor surface according to the following reaction equations (7) and (8) (Shakti et al., 2025)
These reactions create a condition where a number of electrons are injected into the conduction band, which in turn minimizes the depletion layer thickness as well as the resistance of the sensor layer. Consequently, the improved sensing properties of the S/N sensor are attributed to the cumulative effect of the improved properties of the high surface area nanostructures as well as the p–n junction interface. The improved properties of the surface area are advantageous in terms of oxygen adsorption as well as gas interaction, while the p–n junction interface is advantageous as an additional charge modulation mechanism, which maximizes the variations of the sensor resistance upon exposure to gases of interest, that is, CO as well as CH4.
Role of morphology in gas sensing performance
The morphology of the sensing material is seen to be very crucial in characterizing the gas sensing properties of MOS gas sensors. In this study, the nanostructured sensing material in the form of S/N hetero-structure has a number of advantages in characterizing the gas sensing properties of MOS gas sensors. One benefit is the high surface area (Xi et al., 2008) of the nanostructured sensing material, which increases the active site availability for gas molecule adsorption. The large surface area provides more oxygen molecules available for adsorption and ionization on the sensing material surface, generating reactive oxygen species such as O2−, O−, and O2−. The reactive oxygen species are the ones involved in the chemical reaction with the target gases, such as CO and CH4. Another benefit is the ability of the sensing material's porous structure (Sharma et al., 2024) to allow gas diffusion efficiently. This structural property of the sensing material allows for the deeper absorption of the gas molecules, not just at the surface, which enhances the sensitivity of the gas sensor. Third, the high density of grain boundaries and hetero-interfaces (Kumar et al., 2021) in the nanostructured sensing material is known to increase the gas sensing response by modulating the charge carriers upon interaction with the gas molecules. Grain boundaries are active electronic barriers in the sensing material where charge transfer is facilitated upon gas adsorption. Moreover, the close proximity between the S and N grains in the nanostructure facilitates the generation of multiple p–n junctions that improve the charge separation and transportation during the gas adsorption and reaction mechanisms. This is another significant factor that improves the sensor's response and recovery characteristics. Therefore, the unique combination of the increased surface area, gas diffusion channels, grain boundaries, and p–n junctions generated due to the nanostructure morphology improves the gas sensor performance of the proposed S/N sensor material.
Effect of humidity on sensing performance
Humidity is another important factor in the sensing environment, which may influence the gas sensing properties of the MOS sensor. When humid conditions are present, the water molecules are adsorbed on the sensing material's surface and may react with the sensing material to produce hydroxyl groups (OH−). These adsorbates may interfere with the oxygen molecules in their adsorption sites, thereby influencing the amount of ionized oxygen involved in the sensing reaction. Moreover, the presence of humidity may influence the change in the depletion layer width and resistance of the sensing material. The effect of the presence of water molecules, which might result in the introduction of charge carriers through proton conduction, might affect the resistance of the sensing material slightly. However, in the case of heterostructure-based sensors, as in the case of the S/N system, the effect of the p–n junction and the electric field at the interface increases charge separation as well as electron transport. This effect of the interface helps ensure the stability of the sensor even under different humidity conditions. Though the effect of the humidity might be felt on the rate of adsorption on the sensor surface, the heterostructure helps improve the stability of the sensor.
Evaluation of CO and CH4 gas sensing performance
The CO gas sensing characteristics (Araújo et al., 2023) of the fabricated sensors were investigated in the concentration range from 2 to 20 ppm, and the results are illustrated in Figure 13. From these results, it is observed that all of these sensors exhibit a clear increase in their sensing response with increasing concentration of CO gas, and in all these sensors, the S/N heterojunction exhibits the highest sensing performance for all concentrations of CO gas. This might be because of the efficient charge modulation in the S/N heterojunction for adsorption and reaction with the CO gas molecules in a highly efficient manner. Furthermore, the dynamic response of the sensor for 5 ppm concentration of the CO gas shows a highly efficient response for the S/N sensor, where a fast response time of 15 s and a recovery time of 24 s can be seen, which might be because of the rapid reaction of the sensor with the target gas molecules along with its stable desorption characteristics. The well-defined peaks returning to near baseline in each case for the sensor response to CO validate the good repeatability of the sensor response. Good separation in the response values for different concentrations of 2, 5, 10, 15, and 20 ppm can be seen for the sensor response, validating its good concentration-dependent characteristics along with the fact that the S/N heterostructure is a good candidate for low ppm concentration CO gas sensing.

Dynamic CO gas sensing responses of the S/N, Z/S, and N/Z sensors at concentrations ranging from 2 to 20 ppm.
The dynamic performance chart of CH4 gas sensing, as presented in Figure 14, depicts the highly sensitive and dynamic nature of the interaction with the gas molecule CH4 (Kashyap et al., 2020). When the sensor was exposed to an increased concentration of the gas molecule from 2 ppm up to 20 ppm, the sensor response (S/R) increased accordingly in a step-wise manner.

Dynamic methane (CH4) sensing response of the S/N, Z/S, and N/Z sensors at concentrations ranging from 2 to 20 ppm.
It has good reversibility, as it can return to its baseline state in a short period after the removal of the gas, and the recovery time is 42 s. The constant high value of the S/N ratio during the experiment is an indication of the reliability of the sensor and the robustness of the detection, which makes the sensor qualify for application. Figure 14 shows that the sensor response increases linearly with the concentration of the gas for both CO and CH4 gases. Among the three sensors, the S/N sensor has the highest sensitivity at all ppm levels due to the p–n heterojunction effect.
The Z/S sensor exhibits moderate sensitivity, while the lowest response is provided by the N/Z sensor. For all sensors, the sensitivity towards CH4 is slightly higher than CO, which suggests that CH4 interacts more strongly with the active sites. Table 8 summarizes the response time, recovery time, and sensitivity of the proposed fabricated sensors toward CO and CH4 gases. Among the sensors, the Z/S sensor reacts most quickly upon gas exposure, with the shortest response and recovery times for both CO (5 s/8 s) and CH4 (12 s/22 s), but its sensitivity is still relatively low, indicating a limited modulation of the depletion region as mentioned in Figure 15. The N/Z sensor exhibits a rather moderate performance in kinetics and sensitivity because of its rather average interfacial behavior. However, it is found that the highest sensitivity for these two gases is achieved by the S/N heterojunction, which is 39% for CO and 45% for CH4, since in the S/N p–n junction, there is a high built-in electric field and a wide depletion region, thus facilitating charge transfer to promote the interaction between gas molecules and adsorbed oxygen species on the surface. Their values were calculated through the standard resistive gas sensing relation shown in equation (9) (Dayekh et al., 2024),

Sensitivity of the Z/S, N/Z, and S/N sensors toward CO and CH4 gases at different concentrations.
Response, recovery times, and sensitivities of the N/Z, Z/S, and S/N sensors for CO and CH4 gases.
where S is the percentage sensitivity, Rair is the sensor resistance measured in clean air, and Rgas is the resistance recorded when the sensor is exposed to the target gas. These interactions will be more pronounced, thereby creating a higher resistance change, which in turn will ensure a higher sensing ability. In this regard, it can be noted that the response and recovery times for the S/N sensor are slightly high, that is, 15/24 s for CO and 18/42 s for CH4. This can be attributed to the fact that the depletion depth is high, and the ROS have a high ability to bind, thereby requiring a certain amount of time to ensure a complete reaction in the case of exposure or desorption in the case of recovery. Finally, these results clearly indicate that the sensitivity can be greatly enhanced through heterojunction engineering, with the S/N sensor showing the best balance for sensing ability and response times.
Selectivity analysis toward CO and CH4 gases
Selectivity is a critical parameter for practical application in gas sensor devices. The selectivity of fabricated heterojunction sensors for CO and CH4 gases is primarily determined by surface reaction kinetics and electronic band structures of sensing materials. In the case of S/N heterojunctions, a strong p–n junction is created during the fabrication of the sensor, which helps in efficient charge carrier separation and transportation during the detection of target gases. CO molecules are extremely reactive, being a reducing gas, which allows them to be easily adsorbed on chemisorbed oxygen ions such as O2−, O−, on the S surface, thereby donating their electrons to the conduction band. In the same way, even though CH4 is chemically stable because of the high bond energy of C-H bonds, the optimized band structure and reduced charge transfer resistance in the S/N heterojunction are sufficient to ensure the availability of electrons for the activation of CH4 oxidation reactions, owing to the high catalytic activity of S and hole accumulation in NiO. Thus, the response of the gas sensor is stronger for CO and CH4 gases than for any other possible interfering gases.
Long-term stability analysis
Figure 16(a) and (b) shows the long-term stability performance of the fabricated S/N sensor for CO and CH4 gases, respectively, with different concentrations of 2–20 ppm for 30 days of monitoring time. The stability test of the sensor has been performed in order to analyze the robustness, reproducibility, and reliability of the sensor's response for a long period of time. For the CO and CH4 gases, the S/N sensor has shown a highly stable response for the entire period of time with a slight reduction in the magnitude of the sensor's response with the increasing time of exposure. Even after 30 days, the sensor shows a substantial percentage of the initial response at all concentrations, establishing high stability. It is clear that the higher concentrations of gases (15 and 20 ppm) show relatively higher values of responses than the lower concentrations (2 and 5 ppm), which can be ascribed to the higher adsorption of gas molecules and better interaction with the sensing layer. Notably, the rate of response degradation is smooth and uniform, establishing that the sensing material is stable and retains its structural integrity over time. The minimal variation in sensor response over the 30-day period suggests strong resistance to aging effects and surface degradation. These results clearly demonstrate that the fabricated S/N sensor is well suited for long-term gas sensing applications, particularly for low-ppm detection of CO and CH4 gases.

Long-term stability analysis of the fabricated (S/N) gas sensor toward (a) CO and (b) CH4 at different gas concentrations (2, 5, 10, 15, and 20 ppm) over a period of 30 days.
Compared with recent mid-IR, cavity-enhanced, and catalytic systems as listed in Table 9, this proposed room-temperature S/N sensor operates at drastically lower thermal budget, yet maintains competitive response times and sensitivities for both CO and CH4. Optical systems (Chen et al. 2025; Rao et al. 2025) achieve ppb-level detection limits and sub-10-second responses, but require complex optics and controlled gas paths, making them less suitable for low-cost, distributed deployments. Catalytic NiCo2O4/Co₃O4 configurations provide strong CH4 oxidation at 400–450 °C but suffer from power consumption and long-term stability concerns. In contrast, the proposed S/N composite achieves dual-gas detection under ambient conditions, exhibiting response and recovery times on the order of tens of seconds and sensitivities in the 40–50% range. This performance positions the S/N device as an effective bridge between low-cost MOS technologies and advanced optical sensing systems in both current and emerging gas-sensing applications.
Performance comparison of the proposed sensor with the existing sensors.
Benchmarking of the proposed SnO2/NiO sensor with literature materials
In order to further check the effectiveness of the proposed S/N heterostructure gas sensor, the sensing ability of the gas sensor was compared with the sensing ability of previously proposed gas sensors using different metal oxides and composite materials. While making the comparison, the working temperature, concentration of target gas, response and recovery time, sensitivity, and complexity of the gas sensors’ synthesis were taken into consideration, as these factors are very important in assessing the effectiveness of gas sensors in real-time applications. It has already been reported that most conventional gas sensors based on metal oxides require high operating temperatures ranging from 250 °C to 350 °C for effective gas adsorption and electron transfer. In addition, there are several gas sensors reported for room-temperature operation, but they suffer from poor response and recovery time. Moreover, the reported gas sensors use catalysts such as noble metals and complex materials in the form of nanostructures, which are costly.
Instead, the proposed sensor is based on the S/N p–n junction structure fabricated using the simple hydrothermal method. This method enables efficient charge transfer and gas adsorption at the interface. The advantage of the S/N p–n junction structure is the improvement in the performance of the sensor while maintaining the characteristics at room temperature and the fast response time. A detailed comparison between the proposed sensor and the existing sensors has been provided in Table 10, which includes the advantages and disadvantages of the sensing materials.
Comparative analysis of gas sensing performance with literature.
The comparative analysis in Table 10 clearly shows that most gas sensors reported in the literature require operating temperatures between 250 °C and 350 °C to attain the required sensing performance, whereas the proposed sensor works at room temperature with fast response and recovery times. Furthermore, several reported room-temperature-based gas sensors have very poor response kinetics, which take several minutes for gas adsorption and desorption. The proposed sensor has greatly overcome this problem by having very fast response and recovery characteristics in the order of seconds. Furthermore, the literature reports often use catalysts based on noble metals and complex multi-component nanostructures. This makes the fabrication more complex and costly. The proposed sensor has the advantage of employing a simple method for fabrication through the hydrothermal method in the absence of catalysts based on noble metals. It has the advantage of being cost-effective and having high sensitivity and fast response characteristics. All this confirms the effectiveness of the engineered S/N heterojunction in improving the charge transfer and adsorption characteristics.
Machine-learning-based evaluation of CO and CH4 gas sensor performance
Model selection and deployment
Based on both classification and regression evaluation results, RF was identified as the best model for deployment in real-world applications for both CO and CH4 gas sensing systems, considering its robustness against noise, higher accuracy, and consistency in all metrics used for evaluation. Hence, this approach can be considered a reliable one in real-world applications. In addition, this approach can be used in sensor platforms for achieving higher accuracy in predictions, reducing false alarms, and adapting calibration in changing environments. The flow diagram for the ML pipeline for detected CO and Ch4 gases is given in Figure 17.

Conceptual flow diagram of the machine learning pipeline for CO, CH4 gas concentration prediction.
The process begins with the acquisition of data through sensors, followed by data preprocessing, where the signals are cleaned of any noise. At the same time, the normalization of the signals takes place. In the next step, feature engineering takes place, where features are engineered based on the signals received from the sensors, which are then used to train the models, namely SVM and RF, used in the prediction of ppm values. The performance of the models is validated through confusion matrices, as well as regression metrics such as root mean square error, mean absolute error, mean square error, and R-squared values. In this section, a comparison of both models was carried out to determine the best approach, which might be applicable in a real-time scenario, as depicted in the context of CO gas monitoring. The structured flow clearly indicates the level of conceptual understanding of the machine learning approach followed in this study.
Dataset structure and pre-processing
Two dynamic gas sensing datasets were considered in order to test the performance of the metal oxide thin film sensor for CO and CH4 detection. Both datasets contained the time response curves for the sensor's responses at specific target concentrations. The target concentrations were 2, 5, 10, 15, and 20 ppm. The time window for the CO dataset ranged from 0 to 57 s, and the time window for the CH4 dataset ranged from 1 to 62 s. The responses were arranged in the following order: R2, R5, R10, R15, and R20. They corresponded to the order in the concentration range. The datasets were cleaned from any empty rows and then normalized in order to ensure consistency in the results. Through two classification configurations A1 and A2 and three regression configurations B1, B2, and B3, supervised learning models were developed in order to ensure the performance and behavior of the sensor were fully tested.
Integrated performance analysis based on confusion matrices and error metrics
SVM and RF models were employed for benchmarking the classification and regression performance for the CO and CH4 sensors using the A1 and A2 configurations. It is evident from the results shown in Figure 18 for the A1 configuration, where each ppm channel is treated as a separate input, that the performance of the RF model is better than the SVM model for the classification of both gases. The accuracy obtained by the RF model was 0.91 compared to the accuracy of 0.84 for the SVM model for the classification of CO, as shown in Table 10. It is also evident from the results shown in Figure 18 that the classification performance is strongly diagonal dominant and has minimal off-diagonal elements for the RF model. However, the performance of the SVM model was poor in the sense that there was moderate misclassification between the classes at the mid-range concentration levels because of its non-linear transient sensitivity. The accuracy obtained by the RF model was 0.93 and the accuracy obtained by the SVM model was 0.86 for the classification of CH4.

Confusion matrices for the A1 classification model (CO and CH4) (a) SVM classifier for CO (A1). (b) Random Forest classifier for CO (A1). (c) SVM classifier for CH4 (A1). (d) Random Forest classifier for CH4 (A1). Random Forest shows robust diagonal dominance for both gases, confirming reliable ppm level classification.
For the A2 case, in which all five sensor channels are fused into a multichannel feature vector, RF again achieved superior performance. As can be seen in Figure 19, RF achieved accuracy values of 0.88 and 0.89 for the classes CO and CH4, respectively, while SVM achieved accuracy values of merely 0.79 and 0.81, respectively (Table 11). As shown in the confusion matrices, RF maintained its sharp diagonal structure and hence achieved robustness when dealing with the correlated multichannel data. In the case of SVM, there is significant confusion between the classes, especially in the overlapping region between the rising and falling transients.

Confusion matrices for the A2 classification model (CO and CH4) (a) SVM classifier for CO (A2). (b) Random Forest classifier for CO (A2). (c) SVM classifier for CH4 (A2). (d) Random Forest classifier for CH4 (A2). Adjacent class confusion can be observed in the case of SVM, while RF maintains compact diagonal structure for both gases.
Classification metrics (A1 and A2).
This is confirmed by the regression test results as well. In all B1, B2, and B3 settings, RF outperformed SVM in terms of lower RMSE and higher R2 values, as shown in Table 12. In B1 setting, RF achieved RMSE ranging from 0.89 to 1.02 and R2 > 0.80 for CO, while for CH4, RF achieved RMSE ranging from 0.85 to 1.10 and R2 > 0.80. For SVM, the error margin was larger, particularly for channels that included fast transients like R10 and R15. In B2, RF further enhanced its performance to provide RMSE < 0.90 and R2 > 0.85 for both gases; however, the nonlinear sections of the channels indicated that SVM significantly lagged behind. For B3, RF continued to provide R2 > 0.75 for CO and R2 > 0.82 for CH4, thus validating its effectiveness for real-time calibration.
Regression error metrics (B1, B2, B3 for R2–R20).
As a whole, the comparative interpretation emphasizes the differences in the sensing dynamics: whereas CO sensors have smoother transients with moderate nonlinearities, CH4 sensors have steeper rising edges with higher variations based on the concentration. However, despite the differences, in all scenarios, RF performed better than SVM in classification and regression tasks. This collective approach allows the system to address nonlinearities, multicollinearity, and transient overlaps with utmost efficiency, which consequently provides highly reliable ppm-level estimations.
Limitations and future research directions:
Although the proposed S/N heterojunction gas sensor demonstrates promising sensing performance for CO and CH4 detection at room temperature, several limitations of the present study should be acknowledged. First, the sensing measurements were mostly carried out with individual target gases under controlled laboratory conditions. In a real-world scenario, various gases as well as volatile compounds might be present simultaneously, which might affect the gas selectivity of the sensor. Therefore, a more comprehensive assessment of the sensor, including cross-sensitivity measurements with interfering gases such as NH₃, NO2, H2S, and VOCs, is necessary to evaluate the sensor's performance in a real-world scenario. Second, even though the sensor showed stable and reproducible measurements during a few sensing cycles, long-term stability as well as durability measurements of the sensor were not thoroughly studied. Prolonged exposure to reactive gases as well as environmental factors could influence the surface chemistry of the sensing material, which might compromise the performance of the sensor. Future works are therefore encouraged to carry out extended stability tests, which could last weeks or even months, to ascertain the reliability of the sensor.
Another crucial factor that merits further study is the effect of environmental parameters, such as humidity as well as temperature variations, on the performance of the sensor. This is because gas adsorption as well as desorption on metal oxide surfaces are known to be greatly affected by environmental parameters, and therefore, carrying out tests under different humidity as well as temperature conditions could provide more insights into the usability of the sensor. Besides addressing the aforementioned gaps, there are a number of future works that could improve the functionality of the presented sensing system. For example, engineering the heterojunction interface and optimizing the morphology of the nanostructure could improve the efficiency of charge transfer and gas adsorption properties, which could improve the sensor's sensitivity and response speed. Besides, the design and development of multi-sensor arrays using different kinds of metal oxide heterostructures may improve the selectivity of the sensor and may also be useful for detecting different kinds of gases at the same time. Lastly, it may also be possible to design and develop intelligent kinds of gas sensors by integrating the sensor with machine learning algorithms and IoT technologies.
Conclusion
In the present study, the comparative analysis of the three different types of heterojunctions, hydrothermally grown Z/S (n–n), N/Z (p–n), and S/N (p–n), has been carried out in detail in order to understand the significance of the interface in the room temperature CO and CH4 gas sensing. Among the sensors proposed, the S/N heterostructure has been observed to possess the best properties. From the structural studies performed on the sensors, the best crystalline properties with a crystallite domain of 44.5 nm and a low dislocation density of 5.07×1014 m−2 have been observed for the S/N sensor. In addition, the low cut-off voltage of 0.4 V and low charge transfer resistance of 1.4 kΩ have been observed for the S/N sensor. These properties were directly linked to improved sensing capabilities. The S/N sensor exhibited a high response value of 45.2 for 20 ppm CO with fast response and recovery times of 15/24 s for CO and 18/42 s for CH4, outperforming the Z/S and N/Z sensors. The sensor exhibited good sensitivity and good stability in the operation of the sensor under ambient conditions and hence proved to be good for the detection of toxic gases at low ppm values. The results are also in compliance with the ML analysis. The Random Forest model performs better than SVM in all tasks as it obtains R2 values of 0.80–0.85 in regression and classification accuracies of 0.91 (A1) and 0.88 (A2) for CO and 0.93 (A1) and 0.89 (A2) for CH4. The high diagonal dominance in RF classification indicates the robustness of the algorithms in modeling the nonlinear sensor responses with less confusion between classes.
Footnotes
Author contributions
Poundoss Chellamuthu, Thangaraj Yuvaraj: conceptualization, methodology, software, visualization, investigation, writing—original draft preparation. Mohit Bajaj: data curation, validation, supervision, resources, writing—review & editing. Oleksandr Rubanenko: project administration, supervision, resources, writing—review & editing.
Funding
The authors received no financial support for the research, authorship, and/or publication of this article.
Declaration of conflicting interests
The authors declared no potential conflicts of interest with respect to the research, authorship, and/or publication of this article.
Availability of data and materials
The datasets used and/or analyzed during the current study available from the corresponding author on reasonable request.
