Introduction

SnO2 has garnered significant attention as a versatile metal oxide material due to its outstanding electrical conductivity, optical transparency, and catalytic efficiency. These properties make SnO2 a promising candidate for a wide range of technological applications, including gas sensing1, humidity sensing, photocatalysis2,3,4,5, and energy storage6,7,8. Achieving precise control over the size, shape, and surface properties of SnO2 nanoparticles remains a significant challenge. Various synthesis parameters, including temperature, precursor concentration, and reaction time, influence their structural and functional properties. Inconsistencies in these factors often lead to variations in particle size, surface defects, and agglomeration. These challenges impact the performance of SnO2 in applications. Thus, optimising synthesis methods is essential for obtaining uniform and high-performance SnO2 nanoparticles9. Agglomeration and non-uniform particle size reduce the surface area and active sites of SnO2, limiting its performance. These issues lead to reduced sensitivity, inefficient charge transfer, and poor electrochemical stability. Optimising synthesis methods and surface modifications can help minimise aggregation and achieve uniform particle distribution. Enhancing dispersion through surfactants, hybrid materials, or controlled synthesis is crucial for improving SnO2 performance in practical applications10. Surfactants like CTAB play a crucial role in tailoring the morphology and dispersion of SnO2 nanoparticles by preventing aggregation. They create a protective layer around nanoparticles, ensuring uniform growth and controlled particle size distribution. This stabilisation enhances the surface properties of SnO2, improving its performance in applications. Additionally, CTAB influences the crystallinity and porosity of nanomaterials, optimising their functional efficiency. By regulating nucleation and growth mechanisms, surfactants help achieve well-defined nanostructures with superior stability and reactivity11. In solution, CTAB molecules self-assemble into micelles, providing a nanoscale framework that guides the controlled growth of nanoparticles. These micelles influence the morphology, porosity, and size distribution of the synthesised materials, resulting in improved structural uniformity. As a result, the enhanced surface area and tailored properties achieved through this templating process make the materials highly suitable for applications in catalysis, sensing, and energy storage12. Although several studies have examined the role of CTAB in the synthesis of different metal oxides, its specific influence on the structural and functional properties of SnO2 is not well understood. Variations in CTAB concentration can significantly impact nanoparticle size, crystallinity, and surface characteristics, yet a detailed analysis of these effects on SnO2 remains limited. Understanding how CTAB modulates SnO2 properties could provide valuable insights for optimising its performance in sensing and catalytic applications. A systematic study on this aspect would help refine synthesis techniques and enhance material efficiency. Addressing this gap could lead to advancements in SnO2-based technologies by improving its tailored functionalities. Various materials have been utilised for sensing applications, including carbon-based materials such as graphene, graphene oxide, and carbon nanotubes. Additionally, polymers like polyvinyl alcohol and polyaniline have been explored for their effectiveness in detection. Semiconductor metal oxides (SMOs), such as ZnO, SnO2, TiO2, CuO, and NiO, have also been widely studied due to their excellent electrical and chemical properties, making them suitable for advanced device development13. Among various semiconductor metal oxides, SnO2 exhibits superior sensitivity to water molecules, exceptional thermal and chemical stability, and a non-toxic nature. It is also easy to synthesise, possesses a long operational lifespan, and demonstrates high sensing performance, making it an ideal candidate for device applications14. Recent advances in humidity sensors have shown progress, yet many face key limitations. For example, SnSe/SnO2-based sensors exhibit long recovery times and require complex thermal treatments15, while nanosphere-lithography-based SnO2 sensors involve costly, multistep fabrication16. Wireless SnO2 nanowire sensors rely on CVD and FET architectures, which reduce flexibility and increase cost17. Additionally, PVA/GO-based flexible sensors show slower response and lack environmental stability testing18. These gaps emphasize the need for a cost-effective, fast, and reliable sensor platform. Based on the existing research, it can be inferred that using CTAB as a surfactant in SnO2 synthesis provides a novel approach for modifying its surface and morphology. This modification enhances the sensing characteristics of SnO2, improving its performance in detection applications. The surfactant-driven structural changes play a crucial role in increasing the material’s sensitivity, making it more efficient for various sensing tasks. These alterations pave the way for the development of advanced SnO2-based devices with enhanced functionality for practical use. In this research, a CTAB-mixed SnO2 material was synthesised using the hydrothermal method19 to enhance its structural and functional properties. The incorporation of CTAB led to a reduction in crystallite size and facilitated the formation of a well-defined flower-like morphology. Additionally, a decrease in band gap energy and internal resistance was achieved, which are critical factors for improving material performance. These structural and morphological modifications enhance the sensitivity and responsiveness of SnO2, making it a promising candidate for gas sensing and humidity sensing applications. Furthermore, due to its excellent electrical and optical properties, the optimised SnO2 material holds potential for biomedical applications such as respiratory monitoring, non-invasive breath analysis for disease detection, and biodevices for real-time health diagnostics. By integrating PEDOT:PSS as a hole-collecting layer in SnO2-based gas sensors, the overall performance can be improved, leading to more efficient and reliable sensor devices20. The findings from this study provide valuable insights into optimising SnO2-based devices for both industrial and biomedical applications.

Literature review

The related works of the effect of surfactant (CTAB) on the morphology, surface area, and band gap energy are listed in Table 1.

Table 1 Literature review.

Research gaps

Surface morphology

Although considerable research has been conducted on metal oxide nanostructures for sensing applications, certain critical areas remain underexplored, particularly when it comes to the role of surfactants like CTAB in shaping the structural and functional properties of SnO2 nanomaterials. Many existing studies only mention the use of CTAB without thoroughly investigating how precise adjustments to its concentration influence the formation of pores, surface texture, and defect distribution, all of which directly impact sensing behaviour. Moreover, the hydrothermal synthesis process, while widely applied, is often used with general conditions, with limited efforts made to finely tune the process parameters to produce hierarchical SnO2 structures with tailored porosity and surface features ideal for sensing. Another important gap lies in the lack of quantitative morphological analysis in previous works—most studies rely on basic FESEM imaging, overlooking the opportunity to extract quantitative data on particle size distribution, pore connectivity, and surface roughness, which are vital for understanding how structural properties affect sensing performance. Additionally, the connection between intentional defect creation and improved sensing properties is still not well documented, particularly for surfactant-assisted hierarchical SnO2. Overall, a more systematic approach that quantitatively links structural characteristics to device performance is needed to fully understand how controlled synthesis and surface engineering enhance device capabilities. The present work aims to fill these gaps by carefully optimising CTAB concentration, refining the hydrothermal synthesis process, and performing in-depth quantitative structural analysis, ultimately providing a clearer picture of how these factors contribute to the sensing performance of SnO2-based devices.

Surface area and porosity

The surface area of sensing materials plays a crucial role in determining the adsorption capability and diffusion properties essential for efficient gas and humidity sensing. While the use of CTAB as a structure-directing agent is known to enhance surface area, there is a lack of studies providing precise measurements of BET surface area and comprehensive analysis of pore size distribution in CTAB-assisted SnO2 nanostructures. Furthermore, the direct relationship between CTAB concentration, calcination temperature, and the resulting pore structure has not been systematically investigated, making it difficult to establish clear guidelines for tuning porosity to achieve faster response and recovery times. Addressing these gaps would enable better control over material architecture, ultimately leading to improved device performance.

Band gap and defect states

In listed reported studies, the optical band gap of SnO2 and similar metal oxides is typically determined using Tauc plot analysis based on UV–Vis spectroscopy. However, there is a noticeable lack of focus on the contribution of oxygen vacancies, defect states, and bandgap energy levels, which can play a crucial role in modulating the electronic properties and enhancing the sensing performance of the material. These defect-related states directly influence the material’s ability to interact with target gases or moisture, affecting both sensitivity and response/recovery times. Without a comprehensive analysis of these defect features, the connection between electronic structure and device performance remains incomplete, highlighting the need for deeper investigation into the electronic defect landscape of CTAB-assisted SnO2 nanostructures.

FT-IR (Fourier transform infrared spectroscopy) and surface chemistry

Another unnoticed aspect in previous studies is the use of FT-IR analysis to investigate the surface chemistry of CTAB-assisted SnO2 nanostructures. Many studies provide only basic FT-IR data or omit this analysis altogether, missing the opportunity to thoroughly examine surface functional groups, chemical bonding, and the potential presence of unremoved CTAB residues. These residual surfactant molecules, along with surface hydroxyl groups, can significantly influence the device’s response and recovery characteristics, especially in humidity sensing applications where surface interactions with water molecules play a crucial role. A more detailed surface chemistry analysis would offer valuable insights into how surface composition influences sensing behaviour, which is currently underexplored.

Electrochemical impedance study (EIS)

There is also a lack of in-depth electrochemical analysis for CTAB-modified SnO2 devices, particularly in the context of humidity and gas sensing applications. Many studies focus solely on resistance-based sensing data, while key electrochemical parameters such as charge transfer resistance (Rct) and interfacial impedance are rarely examined. These properties are directly connected to carrier transport mechanisms, surface interactions, and response-recovery dynamics of the device. Without such analysis, it becomes difficult to fully understand how hierarchical porosity, surface defects, and CTAB-induced structural changes influence charge transport processes, which are essential for optimising device performance. Conducting EIS to investigate these parameters would offer valuable insight into the correlation between material properties and sensing efficiency, which remains underexplored in much existing literature.

Addressing the research gaps

Surface morphology

This work uses precise control of CTAB concentration and optimised hydrothermal synthesis conditions to fabricate hierarchical SnO2 nanostructures with well-defined surface roughness, interconnected pores, and tailored defect density. Advanced imaging techniques, including FESEM and (High-Resolution Transmission Electron Microscopy) HRTEM, are employed to quantitatively assess particle size, pore distribution, and surface features.

XRD structure

Comprehensive XRD analysis is performed to confirm phase formation, calculate crystallite size, and estimate microstrain and dislocation density.

Surface area and porosity

This work includes BET surface area analysis and (Barrett–Joyner–Halenda) BJH pore size distribution measurements to quantify surface area and porosity. These data are systematically correlated with synthesis parameters and device performance, providing direct insight into how CTAB concentration and calcination influence porosity and diffusion efficiency.

Band gap and defect states

To build a more complete picture of electronic properties, UV–Vis spectroscopy is conducted. For composite devices, band alignment diagrams are constructed and UV–Vis data is explained, showing how heterojunction interfaces contribute to charge separation and improved sensitivity.

FT-IR analysis

This work conducts detailed FT-IR analysis to identify chemical bonding features, surface functional groups, and any residual CTAB molecules remaining after synthesis and post-treatment. This ensures that the impact of surface chemistry on device performance is fully understood and that the removal of unwanted surfactant residues is verified.

EIS

EIS is used to evaluate charge transfer resistance (Rct) and interfacial impedance, offering quantitative insights into how surface structure, defect density, and pore connectivity influence carrier transport.

Research contribution

This study bridges the identified research gaps through a comprehensive approach that includes:

  • Tailored synthesis techniques that adjust CTAB concentration to optimise morphology, surface defects, and hierarchical pore structures.

  • Comprehensive structural characterisation, including XRD and HRTEM, to capture phase formation, defect density, and interface properties.

  • The FESEM study provides both visual and quantitative insights into the morphology, including particle size, porosity, surface roughness, and defect density. This analysis establishes structural properties, enhancing understanding of structural performance relationships.

  • Detailed surface area and porosity analysis, directly linked to device performance.

  • Thorough band gap and defect mapping, particularly for surfactant-mixed devices, to understand charge transfer and electronic structure.

  • Comprehensive FT-IR analysis to monitor surface chemistry, confirm surfactant removal, and identify surface functional groups.

  • EIS to characterise charge transport and interfacial resistance under operating conditions.

Structure of this paper

This paper is structured to ensure a logical flow of methodology and findings. “Experimental section” section provides a detailed overview of the experimental analysis, covering the materials, methods, and device fabrication process. Section 3 presents the results and discussions, including characterisation techniques such as XRD, FESEM, FT-IR, HRTEM, J-V, UV–Vis, and EIS. Additionally, this section highlights key research gaps, summarises significant findings, and discusses how these findings address the identified challenges.

Experimental section

Materials and methods

A stacked flower-like SnO2 nanostructure was synthesised by modifying the molar ratio of CTAB and maintaining a constant temperature of tin chloride (Sn4+), followed by removing organic matter through calcination. As illustrated in Fig. 1a, the hydrothermal method was employed for synthesis34. Initially, in a beaker filled with 100 ml of distilled water, hydrated tin chloride (Sn4+), CTAB (at an SnO:CTAB wt% ratio of 90:10), and urea (CH4N2O) were dissolved while being continuously stirred with a magnetic stirrer. The resulting mixture was then transferred to an autoclave with a Teflon lining and heated at 120 °C for 24 h (h) in a hot air oven. Afterward, impurities were removed by centrifugation using ethanol and deionised water. The final product was dried overnight at 100 °C in an oven. The dried materials were ground into a fine powder using a mortar and pestle, then calcined at 400 °C for 6 h. The same procedure was applied to the following Table 2.

Fig. 1
Fig. 1
Full size image

(a) Hydrothermal synthesis of SnO2. (b) A pictorial representation of the device fabrication methodology.

Table 2 Summary of the preparation of tin oxide nanoparticles.

Device fabrication

Figure 1b depicts the fabrication procedure for the SnO2 thin-film device. The synthesised SnO2 nanopowder was first ground into a paste using a mortar and pestle. This paste was then applied to an FTO substrate using the doctor blade technique and annealed at 350 °C for one hour. After annealing, a thin layer of PEDOT:PSS, serving as the hole-collecting layer, was applied by spin-coating for 30 s (s) at 3000 rpm and then dried for 10 min. As shown in Fig. 1b, the electrical contacts were manually applied to the device using silver paste.

Results and discussion

XRD

The tetragonal rutile phase of SnO2 is identified by all diffraction peaks (ICDD No. 41-1445). The peaks corresponding to the (110), (101), (211), and (112) planes of the rutile SnO2 crystal are observed at 2θ values of 26.8°, 33.1°, 51.7°, and 64.1°, respectively (JCPDS No. 41-1445). Additionally, the materials synthesised via the hydrothermal method exhibit excellent crystallinity, as shown in Fig. 235. According to Table 3, the average crystallite size for SnO-1, SnO-2, SnO-3, SnO-4 and SnO-5 is 12.2 nm, 9.5 nm, 7.3 nm, 6.1 nm, and 4.8 nm, respectively. As shown in Table 3, increasing the CTAB molar ratio during SnO2 synthesis leads to a reduction in the average crystallite size from 12.2 nm to 4.8 nm. The absence of additional peaks from contaminants confirms the high purity of the SnO2 samples. Furthermore, using the Scherrer Eq. (1), the crystallite size was estimated36.

$$ D \, = \, 0.9\lambda /\beta \left( {cos\theta } \right) $$
(1)

where D is the average crystal size in nm, is the X-ray wavelength (CuKα radiation 0.15406 nm), β is the full width at half-maximum (FWHM) of the peak, and θ is the corresponding Bragg diffraction angle.

Fig. 2
Fig. 2
Full size image

XRD patterns of all the samples.

Table 3 XRD crystallite sizes calculated from Sherrer’s equation.

Micro-strain (ε)

Micro-strain refers to the internal lattice distortions present within the crystal structure, often arising from crystal imperfections, grain boundary stresses, or nanoscale effects. It is a critical parameter influencing the physical and chemical properties of the material. ε37 can be calculated using the Williamson-Hall Eq. (2).

$$\varepsilon =\beta \frac{cot\theta }{4},$$
(2)

where β is the Full Width at Half Maximum (FWHM) in radians and θ is the Bragg angle in radians. Microstrain can play a beneficial role in device performance by increasing the density of reactive surface sites and enhancing the sensitivity through lattice distortion, which promotes adsorption and desorption processes during sensing.

Dislocation density (δ)

Dislocation density quantifies the number of dislocations present in the crystal per unit area. These dislocations act as active sites that enhance the adsorption of target gas or moisture molecules, thereby improving device response. δ is calculated using the Eq. (3)38.

$$\delta =\frac{1}{{D}^{2}}$$
(3)

where D is the crystallite size in nanometres (nm), obtained from the Debye–Scherrer equation. Moderate dislocation densities are often desirable in sensing applications as they improve surface reactivity, enhance charge carrier mobility through defect-assisted pathways, and provide more active sites for molecular interactions, ultimately contributing to higher sensitivity, faster response/recovery times, and improved overall sensing performance.

Addressing the research gap through structural analysis

Correlation between surfactant concentration and structural evolution

One of the critical gaps identified in previous works is the lack of thorough investigation into how surfactant (CTAB) concentration affects the crystalline properties of SnO2 nanomaterials. In this study, XRD analysis confirms that increasing CTAB concentration during hydrothermal synthesis results in a progressive reduction in crystallite size, ranging from 12.2 to 4.8 nm. This reduction suggests that the surfactant effectively limits crystal growth, promoting smaller grain formation with a higher surface area, which is favourable for sensing applications. At the same time, the dislocation density increases significantly from 0.0067 to 0.0434 nm⁻2, indicating the presence of more crystal defects. These structural defects, including grain boundaries and dislocations, play an essential role in enhancing surface reactivity, which is critical for improving device response and recovery times.

Role of defects and surface features in device performance

The relationship between defect density and sensing performance is especially important when considering how surface defects improve adsorption and desorption kinetics in humidity/gas sensing devices. Samples with smaller crystallite sizes (like SnO-4 and SnO-5) exhibit higher dislocation densities and micro-strain, which are linked to the creation of more reactive surface sites. These sites can enhance humidity/gas molecule interaction, allowing for faster response times and improved sensitivity. This quantitative structural analysis goes beyond conventional surface morphology studies that rely only on FESEM images, which often lack numerical data on defect density or surface connectivity. By extracting crystallite size, strain, and dislocation density from XRD data, this work provides a direct connection between synthesis conditions and surface structure.

Controlled defect technical study for optimized response

The smallest crystallite size (4.8 nm) observed in SnO-5 corresponds to the highest dislocation density (0.0434 nm⁻2). These structural characteristics suggest that SnO-5 possesses the highest density of active surface sites, which can facilitate rapid humidity/gas diffusion into the sensing layer and promote faster adsorption and desorption cycles. This supports the argument that deliberate defect introduction through surfactant-assisted synthesis can be a practical strategy for improving device response and recovery times.

Bridging the research gap

This study directly addresses several gaps highlighted in the literature study by:

  • Providing quantitative structural data (crystallite size, strain, and defect density) rather than relying solely on qualitative morphology observations as listed in Table 4 and comparative graph shown in Fig. 3a and b.

  • Demonstrating how CTAB concentration and hydrothermal conditions influence the formation of structural defects and surface characteristics that are critical for sensing.

  • Presenting a structured methodology that combines surfactant-assisted synthesis with advanced structural characterisation, offering a clearer pathway for tailoring SnO2 properties to meet specific sensing requirements.

Table 4 Key insights.
Fig. 3
Fig. 3
Full size image

Comparative graph of (a) Crystallite size vs. dislocation density. (b) Crystallite size vs. micro-strain.

Summary table—structural evolution and research gap closure

Morphological characterization

The FESEM images of the synthesized nanoparticles shown in Fig. 4 indicate that incorporating a cationic surfactant (CTAB) mixture significantly influences the shape and size of SnO2 crystallites. As depicted in Fig. 4a, the SnO2 nanocomposite in device SnO-1 exhibits an irregular spherical morphology. In Fig. 4b, the SnO2 particles of device SnO-2 appear rough in shape. Rock-like structures exhibit a dense and compact morphology, resulting in a reduced surface area. This limited surface exposure restricts the material's interaction with environmental factors such as humidity and gas, potentially affecting its overall performance. As the molar ratio increases, the CTA+ cation adheres to the surface of SnO2 nanoparticles, leading to the formation of a stacked structure with a flower-like appearance, which is depicted in Fig. 4c–e39, and higher CTAB levels have been shown to improve surface characteristics and reduce particle size, thereby enhancing sensing performance by providing a larger active surface area for the adsorption of water or gas molecules. The elemental mapping and distribution are shown in Fig. 4f–j. The EDX spectrum in Fig. 4k presents the elemental composition. The summarised mapping spectrum details are provided in Table 5. Table 6 describes the observations of FESEM images.

Fig. 4
Fig. 4
Full size image

FESEM images and elemental analysis of SnO2 samples synthesized with different CTAB concentrations: (a) SnO-1, (b) SnO-2, (c) SnO-3, (d) SnO-4, and (e) SnO-5. Each image includes a scale bar representing 200 nm. (f) Elemental mapping of SnO-3 showing the spatial distribution of elements C, Au, O, and Sn. (g–j) Individual elemental maps for (g) C, (h) Sn, (i) Au, and (j) O. (k) EDX spectrum of SnO-3 showing the presence of Sn, O, Cl, and Au. The X-axis denotes energy in keV, and the Y-axis indicates signal counts.

Table 5 Map sum spectrum.
Table 6 Analysis of surface morphology (based on FESEM images).

Bridging the research gap

  • Existing studies rarely focus on the direct impact of surfactant (CTAB) concentration on SnO2 surface morphology, leaving a gap in understanding morphological evolution.

  • Most works do not visually correlate synthesis conditions (CTAB content) with changes in particle size, surface texture, and porosity, which are critical for sensing applications.

  • Prior research often lacks detailed morphological evidence supporting enhanced surface area and pore structure, which directly improves device response and recovery time.

  • There is limited work demonstrating how surfactant-assisted self-assembly leads to hierarchical nanostructures (from dense particles to flower-like formations).

  • This study bridges the gap by providing clear FESEM-based evidence of structural transformation across CTAB variations, linking morphology with improved gas/humidity sensing properties.

  • The findings offer a practical synthesis-to-performance relationship, useful for designing optimised nanostructured materials for fast and reliable sensing applications.

Brunauer–Emmett–Teller (BET) surface area analysis

The specific surface area (SBET), pore volume, and average diameter of SnO2 samples with varying CTAB concentrations are determined through nitrogen (N2) adsorption analysis using the BJH method. The BET Eq. (4) is expressed as follows:

$$\frac{1}{W((\frac{{P}_{o}}{P})-1)}=\frac{1}{{W}_{m}C}+\frac{C-1}{{W}_{m}C}\left(\frac{P}{{P}_{o}}\right),$$
(4)

where W is the weight of adsorbed gas, P is the relative pressure, Wm is the weight of adsorbate as a monolayer, and C is the BET surface area constant40. The N2 adsorption–desorption isotherms of SnO2 samples synthesised with varying CTAB concentrations are presented in Fig. 5a–e. The isotherm follows a Type IV classification according to the International Union of Pure and Applied Chemistry (IUPAC). As observed in the isotherm, gas initially fills the micropores at extremely low pressure, leading to monolayer formation at the knee region. With increasing pressure, multilayer adsorption occurs, and at higher pressure levels, capillary condensation dominates. The fabricated samples exhibit H3 hysteresis, indicating the presence of slit-shaped pores. Additionally, the absence of a limiting adsorption plateau at high P/Po aligns with the FESEM images.

Fig. 5
Fig. 5
Full size image

(a–e) Nitrogen adsorption–desorption isotherms of proposed devices, BJH plot (Inset).

The BJH pore size distribution for all samples is depicted in Fig. 5a–e Inset. Since the pore sizes and average pore widths of the samples fall within the mesoporous range (i.e., 500 Å), they conform to Type IV adsorption isotherms, which are characteristic of mesoporous materials. The specific surface area of the synthesised samples, with the calculated values summarised in Table 7. Due to the H3 hysteresis behaviour observed in the adsorption–desorption isotherm, as shown in Table 7, an increase in the CTAB concentration leads to a rise in the specific surface area of SnO2 samples from 425.71 m2/g and an increase in pore volume from 0.245 to 0.405 cm3/g. This may be attributed to the collapse of pores and the agglomeration of nanoparticles. Based on the data in Table 7, it can be concluded that the specific surface area of SnO2 nanocomposites significantly increases with higher CTAB concentrations, ranging from 53.154 to 132.702 m2/g. A higher BET surface area in nanomaterials generally signifies a greater surface area per unit mass compared to bulk materials. This enhanced surface area can offer significant advantages and a broad range of applications for nanoparticles.

Table 7 Bet surface area analysis.

Bridging the research gap through BET analysis

CTAB-assisted surface area enhancement

The data as listed in Table 7 clearly show that increasing CTAB concentration directly enhances the BET surface area, particularly in SnO-5, which achieves 132.702 m2/g. This confirms that CTAB acts effectively as a structure-directing agent, creating more porous structures with increased surface area, which is critical for improving sensing properties. Three consecutive experiments revealed that the BET surface area of the SnO-5 sample was 132.7 ± 1.2 m2/g. The standard deviation and reported error correspond, indicating a steady increase in surface area as CTAB concentration increases. In Fig. 6, the names of the SnO samples and their related CTAB concentrations are shown on the X-axis, and the corresponding BET surface area in m2/g is shown on the Y-axis.

Fig. 6
Fig. 6
Full size image

Variation of BET surface area with different CTAB molar concentrations for SnO samples (SnO-1 to SnO-5).

Relationship between pore width, pore volume, and surface area

As CTAB concentration increases, pore width decreases, indicating the formation of smaller, more uniform pores (SnO-5: 15.85 nm, SnO-1: 19.10 nm). Higher surface area (SnO-5: 132.702 m2/g) combined with smaller pores enhances adsorption efficiency, which can significantly improve response time and sensitivity in gas/humidity sensing applications. The inverse relationship between pore width and surface area indicates that controlled porosity tuning through surfactant concentration is effective. In Fig. 7a, the X-axis shows the names of the associated samples, and the Y-axis shows the cumulative percentage contribution of each parameter. The BET surface area and pore volume magnitudes are shown on the Y-axis in Fig. 7b, and the sample names are shown on the X-axis.

Fig. 7
Fig. 7
Full size image

(a) Comparative bar chart of BJH pore width (nm) and pore volume (cm3/g) for SnO-1 to SnO-5 samples. (b) Bar chart comparing pore volume (cm3/g) and BET surface area (m2/g) of SnO samples.

Pore volume vs. adsorption capacity

Samples with higher pore volume (like SnO-4 and SnO-5 with 0.243 cm3/g and 0.227 cm3/g, respectively) can provide more pathways for moisture/gas diffusion. This supports the faster response and recovery times, as the moisture/gases can diffuse in and out of the material more efficiently. This directly addresses the research gap around tuning porosity for improved device performance.

Systematic investigation of CTAB concentration and calcination impact

The stepwise increase in surface area and progressive reduction in pore size across SnO-1 to SnO-5 demonstrate a clear correlation between CTAB-assisted synthesis and the resulting nanostructure. Such clear trends help establish guidelines for optimising synthesis parameters to achieve desired surface areas and pore structures.

Graph interpretation

N2 adsorption–desorption isotherms All samples show Type IV isotherm curves with H3-type hysteresis loops, indicating mesoporous structures as shown in Fig. 5a–e. The increasing adsorption capacity at higher relative pressure (P/Po) for SnO-5 shows enhanced surface area and pore volume, aligning with the tabulated data. This confirms the formation of interconnected pores beneficial for sensing.

Pore size distribution Pore size distribution narrows with increasing CTAB content (SnO-5), confirming the formation of uniform mesopores. Narrow, well-defined pores contribute to faster molecular diffusion, which is crucial for real-time sensing applications. The high R2 value (0.99) confirms excellent linear fitting, validating the reliability of BET surface area calculations. SnO-5 has the lowest slope, indicating a higher surface area, consistent with the trend observed in Table 6.

BJH pore width distribution All samples show a peak at small pore widths, particularly for SnO-5, confirming that higher CTAB results in finer mesopores. This validates the effectiveness of CTAB in tailoring the pore structure, filling the identified research gap around systematic porosity control.

Key takeaways

  • Lack of precise BET analysis addressed—Complete quantification of surface area, pore volume, and pore size distribution is presented.

  • Direct correlation between CTAB concentration and porosity established, providing a clear guideline for tuning.

  • Link between porosity and device performance potential confirmed—Smaller pores, higher surface area, and enhanced adsorption properties directly contribute to improved device response and recovery times.

HR-TEM analysis

Figure 8a and b present the HR-TEM images of the synthesised SnO-5 sample, revealing its extremely small crystallite size. The clearly visible lattice fringes indicate a high degree of crystallinity. Notably, the well-defined lattice fringes exhibit a spacing distance of approximately 0.33 nm, which corresponds to the SnO2 (110) plane. As depicted in Fig. 8c, the Selected Area Electron Diffraction (SAED) pattern displays five broadened diffraction rings, which correspond to the (110), (101), (211), (301) and (321) reflections of cassiterite SnO241. Figure 8d gives the elemental (Sn, O, and Cu) distributions. The HR-TEM findings are in strong agreement with the XRD results, and the d-spacing is listed in Table 8.

Fig. 8
Fig. 8
Full size image

(a,b) HR-TEM images of the SnO-5 nanoparticles, (c) selected area electron diffraction pattern (SAED), (d) TEM–EDX.

Table 8 d-Spacing

Correlation between HR-TEM and XRD & addressing structural analysis gap

Cross-verification of crystallite size

The crystallite sizes (r) calculated from XRD patterns using the Scherrer formula can be compared with the sizes observed in TEM images, and it is listed in Table 8. The close agreement between these two techniques confirms that the synthesised SnO2 samples consist of uniform nanocrystals, validating the structural findings obtained from XRD.

Link between morphology and structural data

TEM images offer direct visualisation of particle shapes, surface textures, and particle-to-particle arrangements. These features complement the XRD results, which primarily describe the internal crystal structure and average crystallite size. Together, they provide a clearer understanding of how the surfactant (CTAB) influences the formation of the nanostructure.

Confirmation of specific crystal planes

The interplanar distances (d-spacing) calculated from the high-resolution TEM images can be matched with the lattice spacings derived from XRD peaks as represented in Table 8. This confirms the presence of particular crystallographic planes (hkl planes), which helps explain how different crystal facets are exposed on the particle surface—a factor that directly impacts sensing performance.

Direct contribution to closing structural analysis gap

A key gap in existing research is the limited understanding of how CTAB concentration and processing conditions alter structural properties at the nanoscale. By combining XRD and TEM data, it can be demonstrated how the surfactant-assisted synthesis process influences crystal growth direction, surface roughness, and porosity—factors crucial for optimising the adsorption and desorption behaviour in sensing applications.

Support for surface area and porosity studies

The structural information obtained through XRD and TEM complements the BET and BJH surface area and pore distribution analysis. TEM also provides a direct view of pore arrangements and interparticle spacing, which helps explain how the porous structure evolves and how moisture/gases can diffuse more effectively through these channels—crucial for sensing performance.

Confirmation of structural purity

In addition to size and morphology, HR-TEM-EDS (Fig. 8d) analysis can also confirm the chemical composition. Combined with XRD, this helps confirm that no secondary phases or unreacted residues are present in the final material, ensuring that the desired phase and purity are achieved—addressing the structural clarity and phase confirmation.

FT-IR analysis and device characterization

Figure 9 presents the FT-IR spectra of SnO2 nanoparticles. The broad peak at 3423 cm⁻1 in the FTIR spectrum is attributed to O–H stretching vibrations, originating from surface hydroxyl groups and adsorbed moisture from the environment. The presence of bonded water molecules or residues of organic compounds is probably the cause of the band around 2920 cm⁻1. The stretching of C=O bonds is mostly responsible for the absorption at 1627 cm⁻1, however bending vibrations of adsorbed water may also contribute42,43.

Fig. 9
Fig. 9
Full size image

FT-IR spectra of proposed SnO2 nano material.

Addressing the research gap through FT-IR analysis

FT-IR spectroscopy plays a crucial role in validating the successful synthesis and structural integrity of the surfactant-assisted SnO2 nanomaterial. The observed functional groups as tabulated in Table 9 and shown in Fig. 9 confirm the presence of characteristic SnO2 bonds (O–Sn–O), along with surface hydroxyl groups and organic residues associated with the use of CTAB surfactant during synthesis. The broad peak near 3423 cm⁻1 highlights surface hydroxyl groups and adsorbed water molecules, which are significant for humidity/gas sensing applications. The presence of hydroxyl groups enhances the device's surface interaction with water molecules, directly influencing sensitivity and response time—key performance factors in sensing devices. The peak at 2920 cm⁻1 also confirms O–H stretching, further supporting the presence of surface-bound moisture, which is a critical parameter for resistive sensing devices. Peaks at 1627 cm⁻1 and 1380 cm⁻1 are associated with carbonyl and water/NH₃-related vibrations, indicating the possible incorporation of residual organic species from the CTAB surfactant or synthesis byproducts. These peaks demonstrate the effectiveness of the synthesis process in incorporating surfactant molecules, which in turn influence nanostructure formation and porosity—critical for enhancing the active surface area in gas or humidity sensing. The distinct SnO2 fingerprint peak at 637 cm⁻1 (O–Sn–O stretching) confirms the formation of crystalline tin oxide and supports the structural insights gained from XRD analysis, where corresponding planes (110), (101), and (211) were identified. This cross-validation between FT-IR and XRD strengthens the material characterisation, ensuring that the synthesised nanomaterial retains its desired phase purity while introducing structural modifications through surfactant templating.

Table 9 FT-IR analysis of surfactant mixed sno2 nanoparticles annealed at 400 °C.

Research gap addressed

In prior studies, many humidity and gas devices suffered from low surface area, poor response/recovery times, and limited active sites due to non-optimised synthesis techniques. This FT-IR analysis, combined with XRD and TEM, addresses this gap by confirming the incorporation of CTAB surfactant, which enhances the porosity and surface hydroxylation of SnO2. These surface properties are directly linked to improved sensing performance, filling the gap where traditional SnO2 devices exhibited slower responses and reduced sensitivity in humid environments. By confirming the presence of both SnO2 backbone structures and surfactant-derived functional groups, FT-IR helps validate the success of the surfactant-assisted approach, providing a reliable pathway to tune the device’s surface chemistry for better performance.

Ultraviolet (UV)-Vis spectroscopy

Literature study for UV-analysis

Comparative plot of UV-study

Inferences from the comparative plot of UV-study

From the comparative analysis and plot (Fig. 10, Table 10), it is evident that the band gap energy varies significantly based on synthesis technique, doping elements, and composite material selection. The highest band gap (3.87 eV) is observed for hydrothermally synthesised SnO2, making it a suitable candidate for gas-sensing applications. In contrast, the SnO2-MoS2 composite exhibits the lowest band gap (2.68 eV), which enhances conductivity and optoelectronic performance. The trend suggests that doping elements such as aluminium and cobalt generally lead to slight modifications in band structure, while composites and thin-film deposition methods introduce substantial variations.

Fig. 10
Fig. 10
Full size image

Comparative plot of literature study and proposed SnO2 devices.

Table 10 Band gap energy analysis.

Applications based on band gap energy

Insights from the material band gap energy and their applications

Influence of band gap on material applications The performance of semiconductor materials is largely determined by their band gap energy, which influences their electronic, optical, and sensing properties. Table 11 presents a comparison of various materials based on their band gaps and related applications. The proposed SnO2 sensor (3.44–2.80 eV) aligns with established values for humidity sensing, gas detection, and photocatalysis, suggesting its capability to operate across multiple functional domains. The observed decrease in band gap further indicates enhanced electron transport, which is essential for improving sensor performance.

Table 11 Material band gap energy and their functional applications.

Effectiveness of the proposed SnO2 sensor in humidity sensing Materials within the 2.5–3.0 eV range demonstrate high surface reactivity with water molecules, making them ideal for humidity detection. The SnO2 sensor designed in this study benefits from:

  • Rapid response and recovery, due to its interaction with moisture.

  • High sensitivity, attributed to its optimized band gap and surface structure.

Multifunctional applications of the proposed SnO2 sensor Beyond humidity sensing, the tailored band gap range suggests that the fabricated SnO2 sensor can also be explored for:

  • UV photodetection, due to its ability to absorb and respond to light.

  • Electrocatalytic applications, particularly for hydrogen evolution reactions (HER).

  • Transparent conducting electrodes, which are crucial in display technologies and solar cells.

Experimental analysis

The optical properties, including absorption and bandgap energy, of surfactant (CTAB)-modified SnO2 samples were analysed using UV–Vis absorption spectroscopy. Figure 11 illustrates the bandgap energy plot for both pure and CTAB-mixed SnO2 nanomaterials. The indirect bandgap of the synthesised SnO2 was determined using the Tauc Eq. (2)52.

$$ \alpha h\nu = A\left( {h\nu - E_{g} \nu } \right)^{n} $$
(2)

where α is the absorbance coefficient, A is the constant, h is Planck’s constant, ν is the frequency of incident light, Eg is the bandgap of material, and n is the factor including the direct (n = 1/2)/indirect type (n = 2) of material. As depicted in Fig. 11a, the absorption wavelengths for SnO-1, SnO-4, and SnO-5 were found to be 360 nm, 435 nm, and 442 nm, respectively. The linear segment of the plot extends toward the energy axis, where the intercept values were calculated as 3.44 eV for pure SnO2, 2.85 eV for SnO-4, and 2.80 eV for the SnO-5 samples, respectively. Figure 11b shows that the optical bandgap slightly decreases as the molar concentration of CTAB increases.

Fig. 11
Fig. 11
Full size image

(a) Absorbance spectra, (b) Tauc plot.

Addressing research gaps

The incorporation of CTAB in the synthesis of SnO2 results in a notable reduction in band gap energy, shifting from approximately 3.44 eV to 2.80 eV, as evidenced by Fig. 11b. This decrease in band gap is primarily attributed to the formation of oxygen vacancies and surface defects, which enhance charge carrier mobility and improve photocatalytic performance. The modification of SnO2 through CTAB-assisted synthesis also facilitates better light absorption, making it highly effective for visible-light-driven photocatalysis. These structural alterations contribute to improved optoelectronic properties, further expanding the potential applications of SnO2 in environmental and energy-related technologies.

Current–voltage-(JV) characterization

The electrical characteristics of the proposed humidity devices were evaluated through photoconductivity analysis. The surfactant-modified, temperature-dependent flower-like SnO2 nanoparticles function as an n-type sensing layer. Figure 12a presents the energy band diagram of PEDOT:PSS and SnO2, illustrating that the hole injection barrier from Ag to the Highest Occupied Molecular Orbital (HOMO) level of PEDOT:PSS is 0.78 eV, while the barrier from the HOMO level of PEDOT:PSS to the valence band (Ev) of SnO2 is 2.3 eV53. The electron injection barrier between the Fermi level of FTO and the conduction band (Ec) of SnO2 is measured at 0.32 eV, while the barrier between the conduction band of SnO2 and the Lowest Unoccupied Molecular Orbital (LUMO) of PEDOT:PSS is 0.41 eV. Consequently, a significant accumulation of electrons and holes occurs at the PEDOT:PSS/SnO2 interface under a positive bias, as depicted in Fig. 12a. The p–n junction characteristics of the fabricated devices are illustrated in Fig. 12b, demonstrating an increase in forward current with rising bias voltage. This confirms the presence of a p–n junction, with turn-on (TONNE) voltages of 0.425 V, 0.321 V, 0.218, 0.162 and 0.071 V for SnO-1, SnO-2, SnO-3, SnO-4 and SnO-5 devices, respectively, as listed in Table 12. The turn-on voltage refers to the voltage at which a p–n junction begins to conduct current in the forward direction.

Fig. 12
Fig. 12
Full size image

(a) Energy band structure, (b) J–V characteristics of SnO-1, SnO-4, and SnO-5 devices.

Table 12 Calculated cut-in voltage and current.

Addressing the research gap through J–V analysis

The J-V characteristics provide essential insights into the electrical behaviour and conduction mechanism of the surfactant-modified SnO2 devices, which are crucial for evaluating their suitability for sensing and electronic applications. The variations in cut-in voltage (TON) and output current across the different samples (SnO-1 to SnO-5) demonstrate the influence of synthesis conditions, surfactant concentration, and structural modifications on the overall electrical performance. The J–V data, which are presented with corresponding error margins, show that differences in material characteristics and experimental uncertainty cause current values to vary even when cut-in voltages are similar. These variations show how the influence of CTAB concentration alters electrical conductivity and interfacial behaviour.

Key findings

  • Lower Cut-in Voltage (TON) in SnO-5 (0.071 V) highlights that this sample offers easier carrier injection and better conductivity, which can be attributed to enhanced porosity, surface area, and interconnectivity of grains, resulting from optimal surfactant-assisted synthesis.

  • Higher Current Output (2.645 μA) in SnO-5 confirms superior charge transport pathways, which directly correlates with the reduction in grain boundary resistance due to improved crystallinity and fewer defects, as supported by the complementary XRD and TEM analyses.

  • The progressive reduction in (TON) and simultaneous increase in current from SnO-1 to SnO-5 clearly establishes the beneficial role of surfactant incorporation in tailoring the charge transport properties, a crucial factor for device response enhancement.

Correlation with structural analysis and research gap

In conventional SnO2-based devices or electronic devices, one of the major limitations has been high operational voltage and limited current response, particularly due to poor grain connectivity, high defect density, and limited surface area for carrier transport. Such limitations restrict the device's sensitivity and speed, especially in humidity or gas sensing applications, where quick electronic responses are required.

The J-V study directly addresses this gap by:

  • Demonstrating how controlled surfactant-assisted synthesis can lower the cut-in voltage and enhance current flow by modifying the nanostructure (increased porosity and reduced grain boundaries.

  • Providing quantitative validation of how tailored microstructures (observed in TEM and XRD) translate into improved electrical performance.

  • Highlighting the direct relationship between structural optimization (using surfactants like CTAB) and device-level performance, which is often missing in traditional SnO2 fabrication methods.

Closing the research gap

This comprehensive correlation between structural, optical (bandgap), and electrical (J-V) properties provides a more holistic understanding of how material design strategies (using surfactants) can overcome long-standing issues in SnO2 devices, including:

  • High power consumption.

  • Slow response and recovery times.

  • Limited carrier mobility due to poor grain connectivity.

By demonstrating how tunable synthesis processes can directly enhance functional properties, this study helps bridge the gap between material design and device-level performance optimisation, ensuring practical applicability for low-power, high-sensitivity device applications.

Electrochemical impedance spectroscopy-(EIS) studies

Figure 13a–e presents the Nyquist plot of the proposed devices obtained through frequency response analysis using spectroscopy. In the case of the proposed sensing device, the resonance frequency (') is inversely proportional to the RC time constant (TRC), and it is shown in Eq. (6)54.

$${T}_{RC}=\frac{1}{2\pi f{\prime}}$$
(6)

and

Fig. 13
Fig. 13
Full size image

(a–e) Nyquist plot of the fabricated devices, (f) equivalent circuit.

\(RC=\frac{1}{2\pi f{\prime}}\) (7)

where f’ is the resonance frequency (Hz). As shown in Eq. (6), the calculated time constant (TRC) and the resonant frequency, where Zmag reaches its peak for the proposed samples, are summarised in Table 13.

Table 13 Performance parameters.

The internal resistance can be derived from the curve's diameter along the axis representing the real part of the impedance (ZRe), as the RC impedance is predominantly resistive at lower frequencies. The charge transfer resistance (Rct) and interfacial capacitance (Cit) of the proposed samples are determined using Eq. (7). For SnO-1, SnO-2, SnO-3, SnO-4, and SC-5 CTAB-modified samples, elevated internal resistance indicates a significant barrier to electron–hole recombination. Consequently, the complex impedance spectrum depicted in Fig. 13a–f tends to exhibit a semicircular shape and its equivalent circuit. In contrast, for SnO-4 and SnO-5 samples, the low-frequency semicircle of the spectrum contracts. These impedance-shifting properties make the material highly suitable for applications involving humidity/gas molecule adsorption. As outlined in Table 13, the enhanced specific surface area provides more active sites for chemical reactions. In fields such as heterogeneous catalysis, this can lead to improved catalytic activity55, accelerated reaction rates, and greater efficiency. The larger surface area also facilitates increased adsorption and absorption of molecules. According to EIS study, the interfacial capacitance (Cit) increased significantly from 3.57 ± 0.18 µF to 159.2 ± 8.0 µF, while the charge transfer resistance (Rct) decreased noticeably from 3700 ± 185 Ω for SnO-1 to 1250 ± 63 Ω for SnO-5. These modifications, which are in line with the patterns observed in J–V measurements and surface property improvements, imply improved electrochemical behaviour and enhanced interfacial charge transport as the CTAB concentration rises.

Addressing the research gap through EIS analysis

The EIS study plays a critical role in understanding the Rct, Cit, and carrier dynamics in surfactant-modified SnO2 devices. This analysis bridges the gap between material-level properties (such as surface area, grain connectivity, and defect states) and functional device performance, particularly in sensing or electronic applications.

Interpretation of results

Reduced Rct

Sample SnO-5 demonstrates a significantly lower Rct (1250 ± 63 Ω) compared to other samples (SnO-1 to SnO-4). This substantial reduction in resistance indicates improved charge transport pathways, which can be attributed to better particle connectivity and reduced grain boundary resistance due to optimised surfactant concentration.

Increased Cit

SnO-5 shows the highest Cit (159.2 ± 8.0 µF), suggesting a higher charge storage capacity, typically linked to greater surface area and enhanced surface adsorption sites, both essential for effective humidity or gas sensing.

Longer TRC

The TRC (199 ± 9.9 ms) for SnO-5 is higher compared to the other samples, indicating a slower relaxation process. This can be linked to enhanced surface interactions and longer-lived charge carriers, which is beneficial in sensing applications where adsorption and desorption processes play a key role.

Lower f’

The resonance frequency (0.8 ± 0.05 Hz) for SnO-5 is the lowest among all samples, indicating that the device exhibits better low-frequency response, which is ideal for low-frequency sensing applications, such as respiration or environmental humidity monitoring.

Addressing research gaps

In traditional SnO2-based devices, high resistance at grain boundaries and poor carrier mobility have limited their responsiveness and sensitivity. The incorporation of surfactant (CTAB) has:

  • Lowered Rct, ensuring smoother charge transport across grains.

  • Increased Cit, providing more active sites for interaction with the sensing environment.

  • Enhanced the TRC, indicating prolonged interaction between the sensing material and the analyte (humidity or gas molecules), which aids in better sensitivity.

  • Lower f’, which highlights enhanced low-frequency performance, important for real-time sensing under low-power operating conditions.

This comprehensive improvement directly addresses the gap related to the slow response, high power consumption, and low sensitivity of conventional SnO2 devices, demonstrating that surfactant-assisted structural modification can drastically enhance the electrochemical and sensing properties.

Integrating surface, electrical, and structural properties to analyse sensing behaviour

There is a substantial correlation between the material's electrical, surface, and structural properties and how well it senses dampness. Higher CTAB content decreased crystallite size and improved crystallinity, which increased the material's surface reactivity, according to XRD and HR-TEM assessments. FESEM pictures demonstrated the formation of a well-organised, flower-like shape, while BET analysis revealed a notable increase in surface area, up to 132.702 m2/g, which provided additional sites for interactions between water molecules. The sensory response was significantly influenced by these morphological and textural improvements. Additionally, electrical investigations, such as J-V and EIS evaluations, showed enhancements like increased capacitance, reduced charge transfer resistance, and a lower cut-in voltage, all of which promote quicker and more effective charge movement. Consequently, over a wide humidity range, the optimised SnO-5 sensor demonstrated outstanding performance with a quick reaction time/recovery time, high sensitivity, and little hysteresis as shown in Tables 14 and 15.

Table 14 Summary of humidity sensing performance for various sensors.
Table 15 Summary of the hysteresis error performance.

Humidity sensing mechanism

When oxygen molecules adsorb onto the surface of SnO2, they absorb electrons from the conduction band and create negatively charged oxygen species (such O⁻ and O2⁻), which is the first step in the humidity sensing process. The depletion zone and oxygen vacancies produced by this process are essential for adjusting the sensor's baseline conductivity. The amount of humidity affects the reaction when water vapour is added. Conductivity is marginally increased at lower humidity levels when water molecules chemically adsorb at the oxygen vacancy sites to create hydroxyl groups. These groups then release stored electrons back to the conduction band. Higher humidity causes physisorption to take over as water molecules create several layers on the surface through weak hydrogen bonding. As a conductive and hygroscopic polymer, PEDOT:PSS absorbs water and promotes proton transport across its matrix. A quick, reversible, and sensitive reaction to variations in relative humidity is made possible by the combination of protonic conduction in PEDOT:PSS with electrical modulation in SnO2 as shown in Fig. 14.

Fig. 14
Fig. 14
Full size image

Humidity sensing mechanism.

Overview of response characteristics and hysteresis performance of selected humidity sensors including the present work

Tables 14 and 15 compare the response time, recovery time, sensitivity, detection range, and hysteresis error of various humidity-sensing materials and highlight the effectiveness of the CTAB-assisted PEDOT:PSS/SnO2 sensor in comparison with previously reported sensors.

The CTAB + PEDOT:PSS/SnO2 sensor developed in this work has the lowest hysteresis (1.60%) and a broad humidity detection range (5–97% RH), demonstrating exceptional stability and sensitivity. It captures ultra-low humidity levels with minimal distortion and is more effective than other materials. This demonstrates its improved performance for applications requiring precise and dependable humidity detection.

Conclusion

This research successfully synthesised a surfactant-modified SnO2 nanostructured thin film on an FTO substrate using the hydrothermal method. The incorporation of CTAB played a significant role in modifying the structural, morphological, and electrical properties of the material, improving its potential for sensing applications. Among the fabricated samples, SnO-5 demonstrated superior performance, exhibiting the smallest crystallite size (4.8 nm) and the highest defect density (0.0434 nm⁻2), which enhanced adsorption and desorption processes—key factors in sensor response. The electrical characterisation revealed a low cut-in voltage of 0.071 V, indicating enhanced charge transport, which is crucial for efficient sensor operation. The EIS study further validated the electrical optimisation of SnO-5, showing the lowest charge transfer resistance (1250 Ω) and the highest interfacial capacitance (159.2 µF), signifying superior ion transport and surface activity. These experimental evidences suggest SnO-5's suitability for real-time gas and humidity sensing applications. Band gap analysis revealed a progressive decrease in band gap energy with increasing CTAB concentration, where SnO-1 exhibited the widest band gap, while SnO-5 had the narrowest (2.80 eV). This reduction in band gap energy improves electrical conductivity, making SnO-5 highly suitable for gas sensors, optoelectronic devices, and photodetectors. Additionally, the optimised band gap enables efficient light absorption, enhancing its applicability in photocatalysis, transparent conductive electrodes, and UV photodetectors. This investigation highlights that surfactant-modified SnO2 nanostructures exhibit significant potential for applications in humidity sensors, gas sensors, UV photodetectors, and transparent conductive electrodes. Future studies should focus on evaluating the long-term stability of the material, optimising device integration, and conducting real-time performance assessments in practical applications.