1 Introduction

The optical and electrical properties of the SnO2 thin films are particularly appealing, and this has attracted the interest of physicists. The intrinsic oxygen vacancies in the SnO2 thin films, which cause negative conduction and identify them as n-type conductors, are a substantial benefit. This characteristic makes the SnO2 thin films very well-suited for use in solar cells (Kiruthiga, G. et al. 2022). Broad optical bandgaps can be observed in the SnO2 thin films, with 3.8 eV bandgaps for direct transitions (Mohammad, J. F. et al. 2020) and 2.6 eV bandgaps for indirect transitions (Dong, Q. et al. 2015). Due to their broad optical bandgaps, these films are employed in a variety of applications such as LCD screens, solar cells, transparent electrodes, and lithium-ion battery systems (Kolentsov, K. et al. 2004; Di Mario, L. 2023; Uwihoreye, V. et al. 2023; Zhao, B. et al. 2020). On the other hand, different techniques, including dip-coating (Sotelo, J. G. et al. 2021), spray pyrolysis (Deyu, G. K. et al. 2019), reactive magnetron sputtering (Gangwar, A. K. et al. 2022), atomic layer deposition (ALD) (Pawar, P. S. et al. 2022; Kim, S. et al., 2021), and thermal evaporation technique.

(Kim, S. et al. 2021), have been used to fabricate SnO2 thin films. In the meanwhile, the CdS layer was synthesized via the thermal evaporation method (Keshav et al. 2021), pulsed laser deposition (Abd, Jinan A. et al. 2021), etc. Due to their individual benefits and applicability for particular applications, these approachses have been used in the fabrication of CdS layers and SnO2 thin films.

Due to their exceptional physical and mechanical features, there are a lot of thin transparent layers that are promising for enhancing photo-conversion performance in solar cell devices having heterojunctions between silicon and them. Of all the junctions studied, the n-CdS/p-Si junctions have stood out as the most promising. It should be noted that the n-CdS/p-Si solar cell manufacturing yielded outstanding overall efficiencies up 12.29%, as reported (Cai, L. et al. 2019). The results of numerical calculations that intended to examine and optimize the key components of the manufactured solar cell (Sharma, A. K. et al. 2023) revealed that efficiency of up to 10.63% could be achieved. The standard configuration for n-cadmium sulfide (n–CdS) solar cells used a base material of p-silicon (p–Si) with a bandgap of 1.12 eV (Cai, L. et al. 2019), while the n-CdS layer (absorber layer) had a bandgap of 2.4 eV (Cai, L. et al. 2019; Sharma, A. K. et al. 2023). Solar cells can be designed in an innovative way by utilizing a heterojunction between a silicon layer and the CdS thin transparent layer (Hassan, A. A. et al. 2023). This design has a special quality that only permits photons with a certain energy range to pass through the silicon layer. As a result of these photons being effectively absorbed, the photocurrent produced by the solar cell is significantly increased. The high absorption coefficients displayed by II–VI compounds in the visible spectrum region hold the key to understanding this phenomenon. These materials are essential for promoting the production of charge carriers, which enables the solar cell to efficiently transform solar energy into useful electrical energy. This ground-breaking design, which makes use of selective photon absorption, has a lot of potential for improving the functionality and efficiency of solar cells (Qasem, A. et al. 2021 c; Alshahrani, B. et al. 2021).

This study outlines a novel strategy for dealing with surface imperfections and recombination problems in solar cells by using a Si-layer-based heterostructure. To solve these problems, unique roles are achieved by combining SnO2 cap layers and CdS buffer layers. The CdS active layer’s light trapping and photon absorption are improved by the SnO2 cap layer’s function as a window layer. The CdS buffer layer ensures effective carrier flow and minimizes losses by reducing recombination centers at the SnO2–Si interface. The investigation and improvement of the SnO2/CdS/Si heterostructure with different thicknesses of the SnO2 cap layer (d = 30, 60, 90, 120, 150, and 180 nm), which aims to greatly improve photovoltaic performance and photoconversion efficiency, is what makes this research special. This study’s features are demonstrated by the proposed Ni/n-SnO2/i-CdS/p-Si/Pt heterostructure, which also advances the development of Si-based solar cell technology.

2 Materials and methods

2.1 CdS and SnO2 alloys and thin layers

The melt-quench technique was employed to fabricate the CdS bulk alloys, wherein the high-purity primary components (Cd and S) were combined as per their experimental weights. The SnO2 powder, which had a purity of 99.999%, was procured pre-made from (Sigma Aldrich Chem. Co., USA). The CdS bulk alloys were pulverized into fine powder using a metal mortar and pestle. Then, thin layers with a thickness of 100 nm were directly deposited onto 450 μm thick silicon substrates from the obtained CdS powder. The targeted weights intended for evaporation were carefully positioned within a crucible, which took the shape of a quartz funnel. To prevent the splattering of the weighted materials, a multiperforated cover was placed on top of a crucible. Additionally, The molybdenum heating wicks were positioned on the sides of the crucible. The voltage and current were gradually controlled to heat the wicks, thereby facilitating the evaporation process. The weighted materials were heated under exact monitoring until it was fully consumed, at which this moment the heating was immediately stopped. Namely, to initiate evaporation, the low tension was switched on, allowing the current to pass through the loaded evaporation sources. The current was gradually increased until the material began to evaporate. The current for the boat was slightly increased and then maintained at a constant value of 260 A until all the material in the boat had evaporated. Following evaporation, the substrate holder was rotated for a few minutes before allowing air to enter the evacuated chamber. Additionally, the deposition system remained under vacuum for approximately 5 min before allowing air into the evacuated chamber to prevent oxidation of the samples. The material source was heated to its sublimation temperature using thermal methods in a vacuum. The gradual increase in current ensured that the heating filament surrounding the material boat reached a temperature between 600 and 800 K, sufficient to induce sublimation of the material. A pressure of approximately 1.33 × 10−6 mbar was reached after a complete evacuation of the evaporation chamber. An appropriate vertical distance of 17 cm between the evaporating source and the quartz substrates (the holder of substrates) was carefully maintained. This setting ensured the deposition process on the quartz substrates was uniform and also maintained the desired height of the evaporation chamber. The substrates were constantly and carefully rotated throughout the deposition process to achieve homogeneous layer thickness. In order to avoid interference in transmittance and reflectance curves, the layer’s thickness was chosen at a lower limit of thickness. One of the main factors driving the selection of a 180 nm thickness for the SnO2 cap layer in the fabricated n-SnO2/n-CdS/p-Si solar cells as a higher thickness was to mitigate interference-related problems. Extensive experimental investigations have shown that exceeding a thickness of 180 nm can result in interference effects, leading to non-uniform transmittance within the transparency range. By keeping the thickness at 180 nm, the solar cells can maintain a more consistent and desirable optical performance.

By the evaporation of its soft powder, the SnO2 cap layers were deposited at different thicknesses (d = 30, 60, 90, 120, 150, and 180 nm) on the CdS/Si interface. This deposition procedure was carried out inside a vacuum chamber at a high pressure of 4 × 10−6 mbar, guaranteeing a complete vacuum process for the deposition. The SnO2 thin films were also deposited onto pre-cleaned glass substrates in order to study their structural, optical, and thermoelectric characteristics. To achieve higher vacuum levels, a Diffusion Pump was used after the Rough Pump procedure which only achieved a vacuum pressure of 3 × 10−2 mbar. This process enabled additional evacuation and raised the vacuum inside the deposition chamber. Prior to beginning the deposition process, a high-pressure vacuum of 4 × 10−6 mbar was maintained for one hour to ensure the removal of any impurities present on the inner walls of the evaporation chamber and within the free intermediate path of the deposited particles, as well as to get rid of moisture. This extended vacuum period allowed for overall cleaning and preparation of the deposition process, effectively minimizing the potential impact of impurities and moisture on the deposition process and resulting thin layers. The current was gradually increased from 150 to 260 A over a period of 5–6 min after the required vacuum level was reached. Once it had been attained, the current was kept constant for ten minutes. A quartz crystal thickness monitor (SQM-160-FTMS), was used to continuously track the evaporation rates for each deposition run and the resulting film thicknesses. This monitoring method provided real-time tracking of the film thicknesses during deposition and allowed for precise measurements of the evaporation rates.

2.2 Measurements and characteristics

A Shimadzu UV-2110 model dual-beam spectrophotometer was used to only measure the optical spectra of transmittance and reflectance for the SnO2 cap layers deposited on the glass. Initial measurements were made for the empty glass to create a baseline. In order to make data collecting and processing easier, the spectrophotometer was connected to a PC. With the use of this arrangement, it was possible to precisely measure and analyze the optical characteristics of the SnO2 cap layers, providing a thorough grasp of their transmittance and reflectance characteristics.

In the structural analysis, an X-Ray Diffractometer device (XRD) with model: Philips PW 1730/10 and with operation conditions of applied voltage: 40 kV, a scanning speed: 2°/min, scan time: 2 s, current: 30 mA, scattering angle: 2θ > 4° and Cu target as a reference: λ = 1.54178 Å were used to analyze the related glassy matrix descriptions of the as-deposited SnO2 layers. Furthermore, the scanning electron microscopy (SEM) technique were used to check the amorphous or crystalline state of the studied layers with model: JEOL (JSM)-T200.

The CdS buffer layer and SnO2 cap layers’ thermoelectric characteristics were examined using integral techniques. These methods entailed utilizing a Keithley 2400 Source meter instrument to measure electromotive forces (e.m.f.). The measurements were made between 300 and 500 K, which is the thermal temperature range. Copper electrodes were used as the contacts for the thermocouples linked to the measuring instrument in order to measure the e.m.f. The type of conductivity of both the CdS buffer layer and SnO2 cap layers were identified using the (e.m.f.) values obtained from these measurements.

The studied heterostructures of n-SnO2/i-CdS/p-Si were fabricated using a direct deposition method. Then, a small side of the silicon (Si) substrate was coated with a platinum strip (Pt) that had a thickness of 100 nm and a small side of SnO2 layers was then covered with a nickel strip (Ni) with a thickness of 100 nm.

An impedance analyzer device was used to evaluate the heterostructures’ dark capacitance–voltage pathways (C–V). In particular, the HP 4192 model from Hewlett-Packard was used for this process. The tests were made at a temperature of 300 °C and a frequency of 10 MHz under typical setting conditions. The measurements’ applied voltage range was adjusted to be between − 3 and 3 V. The impedance analyzer gadget was electrically connected to a personal computer to enable data collecting and analysis in order to obtain the (C–V) data.

High-purity aluminum rod contact electrodes were deposited on the SnO2 cap layer using the thermal evaporation process in order to study the characteristics of the fabricated solar cells. Then, a thermocouple was used to link these electrodes to a Keithley 2400 Source Metre. The goal was to gather current density–voltage (J–V) data for the system under study. The measurements were performed in dark and illumination conditions. A halogen lamp gave an input power (Pin) of 2800 W/m2 for the measurements in light. The measurements were conducted at a voltage range of − 3 to 3 V.

3 Results and discussion

3.1 Compositional and structural analysis

Energy-Dispersive X-ray Analysis (EDXA) is used to analyze the compositional ratios of tin (Sn) and oxygen (O) in the SnO2 cap layer. This technique is particularly valuable for characterizing the elemental composition of SnO2 bulk materials that have been finely ground into soft powders, which facilitate easy handling during the measurement process. By employing EDX analysis, as depicted in Fig. 1, the presence and ratio of Sn and O elements in the SnO2 cap layer can be confirmed. The inner table within the figure provides the atomic ratios and weights of tin and oxygen, offering detailed information regarding their respective proportions.

Fig.1
figure 1

EDX of the elements (Sn and O) in the SnO2 powder material

Figure 2 shows the map of the X-ray diffraction trajectories of the SnO2 cap layer at different thicknesses within the range of spectral scattering angles between 4° and 90°. The XRD results demonstrated the presence of crystallized phases in the zinc blended structural pattern in all XRD curves corresponding to the various SnO2 layer thicknesses. The dominant diffraction peaks as per this technique were observed at the diffraction angle, 37.90° and 81.60°, which in turn are related to Miller’s indices (101) and (301), respectively. Based on the XRD curves, it appears that the sample has grown as a single crystal structure in the SnO2 phase according to the JCPDF cards described in Table 1. This study’s results are excellently consistent with those of the corresponding reported study (Patil, G. E. et al. 2011).

Fig. 2
figure 2

XRD analysis for the SnO2 window layer at different thicknesses

Table 1 Interplanar spacing according to lattice constants and Miller’s indices in XRD analysis for the SnO2 layer at different thicknesses

The interplanar spacing \(d_{spacing}\) of the cubic structural pattern is calculated according to the values of Miller’s coefficients (hkl) according to the related formula (Kiruthigaa, G. et al. 2014):

$$d_{spacing} = \sqrt a \left( {h^{2} + k^{2} + l^{2} } \right)^{ - 0.5}$$
(1)

the obtained values are listed in Table 1. The increase in the values of the lattice constants is primarily responsible for the perceptible increase in the interplanar spacing values corresponding to the peaks at the prevalent diffraction angles given in the mentioned table. Furthermore, utilizing Debye–Scherrer’s formula listed below, the average grain size of obtained phases \(D_{Cry}\) is computed (Vorokh, Andrei Stanislavovich 2018):

$$D_{Cry} = \lambda_{Cu} \times \left( {\beta_{hkl} \times \cos (\theta )} \right)^{ - 1} \times 0.94\,$$
(2)

where, \(\lambda_{Cu} \left( {1.5418 \, A} \right)\) is the wavelength of the incident beams of CuKα target, \(\beta_{hkl}\) in this context incarnates the XRD curve width corresponded to full half-maximum width (FHMW) of the y-axis points, and \(\theta\) is Bragg’s angle. The following relationship can be used to calculate the micro-strain applied to the internal matrix of the crystalline lattice in the SnO2 cap layer using the calculated values of the average crystalline grain size, showing each dominant peak in the X-ray diffraction curve (Kiruthigaa, G. et al. 2014):

$$\varepsilon = 0.25 \times \left( {\beta_{hkl} \times \cos (\theta )} \right)$$
(3)

Furthermore, the related relationship is used to calculate the density of dislocations of the crystallisation phases in the cap SnO2 layer \(\delta = \left( {D_{Cry}^{2} } \right)^{ - 1}\)(Chander et al. 2016), and also the number total crystals within the dominant structures per unit volume is computed from the ​​relationship: \(N = \left( {d_{f} \times D_{Cry}^{ - 3} } \right)\) (Qasem, A. et al. 2023 a), where df poetrays the cap layer’s thickness. A detailed summary of the computed values of the mentioned quantities is provided in Table 2. The table shows that the average grain size increases as the SnO2 layer thickness rises, while the values of the other parameters decrease. There are a number of possible explanations for the observed increase in average grain size in the SnO2 cap layers as the SnO2 layer thickness increases. First off, when the SnO2 cap layer’s thickness increases, more atoms becomes available for nucleation, creating more opportunities for grain formation. This may result in more initial grain nuclei, which later develop into larger grains, increasing the average grain size (Sefardjella, H. et al. 2013). A greater reservoir of atoms that are available for grain development may be provided by a thicker SnO2 layer. This higher atom supply encourages grain boundary movement and coarsening at a faster rate, increasing average grain size overall. Impurities, flaws, or second-phase particles that can pin grain boundaries have less of an impact as the SnO2 layer thickness rises. The grains can expand more freely as a result of the decreased grain border pinning, which increases average grain size (Maitre, A. et al. 2008). The decrease in microstrain, dislocation density, and the overall number of crystals inside the dominant structures per unit volume in the SnO2 cap layer, on the other hand, can be accounted for by the following reasons, namely: lattice defects and stress-induced distortions are frequently linked to micro-strain and dislocations in the material. The material may undergo a relaxation of internal strains as the thickness of the SnO2 layer rises, resulting in a drop in micro-strain and the density of dislocations. The formation and mobility of crystal defects depend on the diffusion of atoms and vacancies, which can be restricted by the thicker SnO2 layer. The production and growth of dislocations may be hampered by this diffusion constraint, which may also result in fewer crystals overall in the dominating structures (Cowern, N. E. et al. 2013). The nucleation sites for crystal growth may spread out as the SnO2 layer’s thickness increases since there will be more room available for crystal formation. There are fewer total crystals per unit volume in the dominating structures as a result of the increasing distance between nucleation sites (Maitre, A. et al. 2008; Cowern, N. E. et al. 2013).

Table 2 Structural parameters of the SnO2 layer at different thicknesses

The surface morphology of the SnO2 cap layers with different thicknesses depicted in Fig. 3 is in a crystalline form, which results in unique surface properties connected to their crystal structure. The SnO2 cap layers’ crystalline structure is useful because it enhances their optical, electrical, and sensing characteristics. Because of how the crystalline grains are arranged, the surface morphology of these crystalline SnO2 cap layers has a textured appearance as per the mentioned figure. As the thickness of the cap layers changes, so do the sizes and orientations of these grains. As a result, a network of grain boundaries develops over the layer surface. The interfaces between various crystal orientations are represented by these borders, which look like uneven lines or limits. The provided figure shows how the size and distribution of these grains affect the roughness of the film’s surface by increasing the thickness of the cap layer. The results of the surface morphology analysis and the X-ray diffraction investigations completely possess the same style. As the thickness of the cap layer grows from 30 to 180 nm, it is observed that the particles, which appear as grains of various sizes change by increasing the thickness. This study’s findings were consistent with the reported ones in the related works (Girtan, M. et al. 2006; Elangovan, E. et al. 2004).

Fig. 3
figure 3

Top view of SEM micrograms for the SnO2 window layer at different thicknesses

3.2 Optical properties

It is possible to rely on the spectral frames obtained in the laboratory experiments for optical spectra (transmittance T and reflectance R) to study the optical properties of the SnO2 cap layers in the spectral range that targets three spectral regions, starting with the spectral region of ultraviolet radiation, progressing through the visible region of the spectrum, and ending with the infrared region in the range from 300 to 2500 nm as shown in Fig. 4 (a, b). As the cap layer’s thickness rises and its edge shifts from longer to shorter wavelengths, its transmittance rises as well. Numerous factors may contribute to an increase in transmittance when SnO2 cap layer thickness is increased. A high-thickness cap layer first creates a stronger physical barrier between the incident light and the material or substrate beneath it. By lowering the likelihood of light scattering or absorption within the substrate, this barrier can increase the amount of light that passes through. A thicker SnO2 cap layer can also improve the material’s homogeneity and surface smoothness, which reduces scattering caused by surface roughness and increases transparency overall. Additionally, there are more interactions between the various layers as the SnO2 cap layer thickness increases. As a result, reflection losses at the interfaces may be reduced, further increasing transmittance. Finally, because the SnO2 layer frequently possesses a greater refractive index than many substrates, including glass, the refractive index gradually decreases with increasing thickness. By allowing light to pass from the SnO2 layer to the substrate more smoothly, this steady reduction in refractive index helps reduce reflection losses. In general, by thickening the SnO2 cap layer, the transmittance can be improved because of decreased scattering, enhanced surface quality, decreased reflection losses, and improved refractive index matching (Alzaid, M. et al. 2021 a; Elsaeedy, H. I. et al. 2021 b). The reverse pattern is seen in the reflectance curves for the same layers. The link between the opposite behavior of the scattering angle caused by refractions within the system with the behavior of transmittance and reflectance, and also the linear refractive index was observed in the corresponding works (Shaaban, E. R. 2020 a; Qasem, A. et al. 2020 l). The mentioned layers with high light beam transmittance can be utilized as window layers (cap layers) in solar cells and other related optoelectronic applications due to their high transmittance (Alzaid, M. et al. 2020b; Gadalla, A. et al. 2020; Alrowaili, Z. A. et al. 2021; Ahmed, M. et al. 2021). The tracer of the average transmittance with increasing thickness will see that the average transmittance in the infrared region ranges from 87 to 96% in the first and last cap layers, respectively.

Fig. 4
figure 4

Optical spectra (T, R) for the SnO2 window layer at different thicknesses

The optical absorption coefficient (\(\alpha\)) of the SnO2 cap layers is computed according to the list below formula (Qasem, A. et al. 2021 i; Qasem, A. et al. 2020 d; Shaaban, E. R. et al. 2019 c):

$$\alpha = d^{ - 1} \ln [(1 - R)^{2} + \left( {(1 - R)^{4} + (2RT)^{2} } \right)^{0.5} /2T]$$
(4)

According to the diagram in Fig. 5, this coefficient is displayed as a function of the photon energy. As portrayed in this diagram, the optical absorption edges of the pristine SnO2 cap layers shift towards the higher energies. The shifting behavior towards the higher energy has been observed in other semiconductor materials (Shaaban, E. R. et al. 2021 b; Qasem, A. et al. 2021 h; Hitson, B. A. 2004). From this diagram, the absorption coefficient at 104 cm−1 is referred to as the optical absorption threshold. It serves as a boundary between the strong absorption region above this value, known as the Tauc region, and the exponential region below it, known as the Urbach region, where the absorption is of medium intensity. It is worth noting here that the two energies that are calculated in the Tauc region and in the Urbach region are called the Tauc energy (band gap energy, Eg) and Urbach energy (tail energy, Ee), respectively. These two energies can be referred to as “optical parameters” because they arise from the tangent and slope of the respective relationships (namely, the Tauc and Urbach formulas), rather than being derived by substituting specific values into a mathematical expression. Tauc’s energy, Eg and Urbach’s energy, Ee are computed via the related formulas: \((\alpha .h\nu )^{2} = \beta .(hv - E_{g} )\) (Qasem, A. et al. 2022 f; Qasem, A. et al. 2022 j) (see Fig. 6), and \(E_{e} = \left( {d\ln (\alpha )/d(h\nu )} \right)^{ - 1}\) (Qasem, A. et al. 2022 j) (see Fig. 7), where, \(\ln \left( {\alpha (h\nu )} \right) = \ln (\alpha_{0} ) + \left( {E_{e} } \right)^{ - 1} .h\nu\). Here, \(\beta\) portrays a constant, \(h\nu = (1241/\lambda )\,\,eV\) incarnates the photon energy related to the wavelength range of (300–2500 nm). In Table 3, the computed energies are listed. With the increasing thickness of the SnO2 cap layer, the value of bandgap energies increases. Oppositely, the tail band energies behave. The obtained results indicate that the bandgap energy increases as the thickness of the SnO2 cap layer increases since the localized state levels decrease. This, in turn, indicates that defects in the lattice decrease. On the other hand, several possible reasons could be responsible for the rise in bandgap energies with increasing the SnO2 cap layer thickness. First, when the cap layer’s thickness rises, the strain between the SnO2 layer and the substrate beneath could alter. The bandgap energies of materials as well as their electrical structures are susceptible to strain. Because of this, an increase in the bandgap energy could be caused by the increased strain brought on by the increase in thickness of the SnO2 cap layers. Secondly, the SnO2 cap layer’s increased thickness can affect the crystal’s shape or structure. The SnO2 layer can have a variety of crystal forms with varied bandgap energies, including rutile and tetragonal. A certain crystal structure may be favored by the formation of thicker layers, or it may cause structural distortions that raise bandgap energy. The impact of quantum confinement should also be taken into account. The confinement of electrons and holes within the SnO2 cap layer decreases as the layer gets thicker. The band structure may be affected by this decrease in quantum confinement, which would raise the bandgap energy. Additionally, the existence of flaws or impurities may be related to the bandgap energy increase. A bigger thickness increases the probability of defect formation, which may result in the introduction of energy levels within the bandgap. These extra energy levels have the potential to affect the effective bandgap energy. In brief, a number of reasons, including strain effects, changes in the crystal structure, changes in quantum confinement, and the existence of defects or impurities, can be led to the rise in bandgap energies with increasing the SnO2 cap layer thickness. Accordingly, these factors lead to an increase in the optical bandgap energy (Elsaeedy, H. I. et al. 2021 c; Qasem, A. et al. 2022 k; Qasem, A. et al. 2021 g). On the other hand, the optical constants and orbital transitions, as well as the changes that occur in the structural structure of the thin-film-generating alloys, may have a significant impact on controlling the optical properties and electrical properties such as conductivity, and the consequent harmonization between the properties of the material, moving the carrier, and controlling the energy of the optical band gap (Moustafa, M. G. et al. 2023 a; Moustafa, M. G. et al. 2023 b).

Fig. 5
figure 5

Absorption coefficient vs. photo energy for the SnO2 window layer at different thicknesses

Fig. 6
figure 6

Plotting of the extraction of Tauc energy for the SnO2 window layer at different thicknesses

Fig. 7
figure 7

Plotting of the extraction of Urbach energy for the SnO2 window layer at different thicknesses

Table 3 Optical parameters (Tauc energy, Urbach energy)

3.3 Thermoelectric properties

Within the temperature range of 300–500 K, the thermoelectric properties of the pristine SnO2 cap layers and the CdS buffer layer were examined using the Seebeck coefficient (thermoelectric power, S). In turn, this coefficient provided information about the thermoelectric behavior of the aforementioned layers. The Seebeck coefficient can reveal details about a material’s capacity to transform a temperature difference into an electrical voltage. Typically, it is measured in millivolts per Kelvin (mV/K) or microvolts per Kelvin (μV/K) units. The polarity of the generated voltage with respect to the temperature gradient is indicated by the sign of the Seebeck coefficient. Seebeck coefficient is computed using the following formula (Takaki, H. et al. 2017):

$$S = (\Delta V/\Delta T)$$
(5)

The analysis proved that the CdS has a conductivity of the negative type (n-type), since the Seebeck coefficient values are negative, while the analysis confirmed that the SnO2 cap layer has also negative conduction (n-type), as the Seebeck coefficient values are negative, as shown in Fig. 8 (a, b), respectively. Thus, thermoelectric power decreases with increasing the conductivity, as known for most semiconductor materials (Urmila, K. S. et al. 2014). The conduction type of Si (p-type) was confirmed in our published work (Alqahtani, A. et al. 2022). A negative conductivity is observed for both SnO2 and CdS layers in the corresponding literature (He, B. et al. 2013; Srivastava et al. 2021). One can extract the charging carriers’ concentration, \(n\)(in our case, the chrge carriers are free electrons of the CdS and SnO2 layers), using the following formula (Levin, E. M. 2016):

$$n = \left( {(8\pi^{2} .k_{B}^{2} .T.m_{s}^{*} /3qh^{2} ).(\pi /3)^{2/3} .\left| S \right|^{ - 1} } \right)^{1.5}$$
(6)
Fig. 8
figure 8

Seebeck coefficient and concentration of charge carriers in the CdS layer a and for SnO2 layers b, c

Here,\(k_{B}\) is the Boltzmann’s constant, \(T\) portrays the thermal temperature in the range of (300–500 K), \(m_{s}^{*} = 0.9m_{e} ,\,\,\,m_{e} = (9.1 \times 10^{ - 31} Kg)\)(Levin, E. M. 2016) is the effective mass of the electron, \(q\) is the electonic charge,\(h\) incarnates Planck’s constant and \(\left| S \right|\) primarily refers to the absolute value of the Seebeck coefficient. Figure 8 (a) illustrates the diagram representing the concentration of charging carriers for the CdS layer with a thickness of 100 nm. On the other hand, Fig. 8 (c) displays the concentration diagram for the SnO2 cap layer at various thicknesses ranging from 30 to 180 nm. The concentration of charge carriers increases together with the thermal temperature in the investigated range between 300 and 500 K in the buffer and cap layers as well as with the thickness of the cap layer. Thus, enhanced electrical characteristics have been observed in both thin CdS and SnO2 layers as the concentration of charge carriers in these layers increases. This behavior has been corroborated by other research studies (Zakaria, Y. et al. 2023; Yılmaz, S. et al. 2017).

3.4 Energy-band diagrams of solar cell

Figure 9 shows how the layers in the manufactured solar cells—n-SnO2/n-CdS/p-Si—are arranged. The front and back contact electrodes, the absorber layer (Si-substrate), the buffer layer (CdS), the cap layer (SnO2), and lastly the external load circuit are all shown in the diagram. This study aims to construct the layers so that the band gaps narrow gradually, starting at the surface where light enters the solar cell. The cap layer with the largest band gap energy is positioned in order to allow for the absorption of shorter wavelengths in the solar spectrum. The SnO2 thin layer is used as a window layer or cap layer in this work because of its high band gap, which varies depending on thickness (from 30 to 180 nm) and ranges from 3.35 eV to 3.95 eV. This particular design allows all solar spectrum wavelengths to pass through the cap layer and reach the CdS buffer layer. The visible region of the CdS layer has a significant absorption coefficient of about 104 cm−1 and a direct band gap of 2.4 eV. 90% of incident photons from the SnO2 layer can pass through a few nanometers of the CdS layer. Because of this, the CdS layer in our work has a 100 nm thickness. The Si absorber layer, on the other hand, has an optical band gap of 1.12 and a thickness of 450 μm.

Fig. 9
figure 9

Schematic of n-SnO2/n-CdS/p-Si heterojunctions

The energy difference \(\Delta E\) between the conduction and valence bands for each layer within the solar cell structure depicted in Fig. 10 is computed by the below formula (Hassanien, Ahmed Saeed et al. 2019; Askari, M. et al. 2015; Xie, R. et al. 2014):

$$\Delta E = \left( {4.5 - \left( {\prod\limits_{K = 1}^{P} {X_{k} } } \right)^{{1/P_{T} }} \pm \left( {\frac{{E_{g} }}{2}} \right)} \right),\,\,\,\,\,X_{k} = \left( {\frac{{E_{EA} + E_{Ion} }}{2}} \right)$$
(7)
Fig. 10
figure 10

Energy band diagram of n-SnO2/n-CdS/p-Si heterojunction devices

\(\Delta E\) refers to \(E_{CB}\) when the \(\left( {\frac{{E_{g} }}{2}} \right)\) is positive ( +), and it refers to \(E_{VB}\) when the \(\left( {\frac{{E_{g} }}{2}} \right)\) is negative ( −) in the above equation. Also, k refers to a layer’s element number, P is a measure of the element’s weight ratio, PT alludes to the sum of the weight ratios of the layer, which in (~ 100), \(E_{EA}\) incarnates -in this formulas- the electron affinity of a single layer, \(E_{Ion.}\) portrays the first ionization energy, and \(E_{g}\) is the bandgap energy of Si layer and CdS (1.12 eV for Si and 2.4 eV for CdS as we mentioned). The values of (\(E_{EA}\) and \(E_{Ion}\)) for Sn are (1.112 and 7.3439 eV) (Vandevraye, M. et al. 2013), for O are (1.461 and 13.6181 eV) (Chaibi, W. et al. 2010), for Cd are (− 0.7 and 8.99 eV) (Ferro, R., & Rodrıguez, J. A. 2000), for S are (2.077 and 10.36 eV) (Chaibi, W. et al. 2010; Lang, P. F., & Smith, B. C. 2003), and for Si-substrate (1.389 and 8.15 eV) (Chaibi, W. et al. 2010).

Figure 10 demonstrates that the CdS buffer layer possesses an electron-affinity energy of 5.07 eV, which is higher than both the electron-affinity energy of a silicon substrate (4.05 eV) and the optical gap energy of the Si absorber layer. This electronic affinity differential limits the energy discontinuity at the interface between CdS and Si. Similarly, based on the same diagram, it can be observed that the SnO2 cap layer has a higher electronic affinity energy (6.19 eV) compared to the CdS buffer layer (5.07 eV), as well as a higher energy value in the optical gap. As a result, this alignment ensures a limited increase in the energy difference at the SnO2/CdS interface, creating a convergence of energy and lattice matching. This convergence promotes optimal uniformity at the interfaces (SnO2/CdS and CdS/Si), ultimately enhancing the power output in the external load circuit. Because the SnO2 cap layer conducts electricity more efficiently than the CdS buffer layer, there is a gradual transition between the two layers. The band edges move just slightly near the interface, with a slope that depends on the electric field’s intensity. Additionally, interface barriers arise at the junctions of n-SnO2/n-CdS and n-CdS/p-Si as a result of the complete depletion of electrons by the n-SnO2 layer and of holes by the p-Si layer, respectively. Additionally, as the voltage decreases, electrons migrate toward the p-Si region and holes migrate toward the n-SnO2 layer by breaking through the barrier at the Si/CdS contact. As more charge carriers enter the heterostructure, the current density rises as a result.

3.5 AC Pathways

3.5.1 Capacitance–voltage analysis

A capacitance–voltage (C–V) examination is used to determine if the manufactured heterojunction device has a sharp or gradual transition. The capacitance of the solar cell structure is impacted by applying a reverse bias to the device. As a result, depending on the bias voltage, the device’s capacitance can change. As the reverse voltage increases, the depletion region’s thickness increases and has a more pronounced effect on the capacitance (Attia, A. A. et al. 2017). The electronic charges in the depletion region of this particular device are not consistently separated by the same distance as in a regular device. These charges are progressively separate from one another when the voltage rises because the depletion region widens. The capacitance–voltage (C–V) curves for the dark circumstances (25 °C, I0MHz, and (− 3 to 3 V) are shown in Fig. 11. As can be seen from the graph, the capacitance increases rapidly as voltage increases, with the voltage in the forward bias region having the biggest influence. Similar to this, the capacitance values rise as the SnO2 window layer’s thickness does. This is because semiconductor materials have defects that affect the behavior of the material from lifetime to relaxation (Vearey-Roberts, A. R., & Evans D. A. 2005).

Fig. 11
figure 11

C–V characteristics at (298 K and 10 MHz) in dark conditions of the fabricated solar cells

3.5.2 Electronic parameters of reverse bias

In reverse bias conditions, capacitance–voltage measurements are essential because these measurements let us extract key electrical properties by analyzing the relationship between capacitance square and reverse bias voltage. The built-in voltage (Vb), the zero capacitance (Co), the reverse bias voltage, and the capacitance of a heterostructure under reverse bias are all taken into account in the formula (Vearey-Roberts, A. R., & Evans D. A. 2005):

$$C\left( V \right) = C_{o} /\left( {\left( {V_{b} + V} \right)/V_{b} } \right)^{s} ,\,\,\,V_{b} = V_{D} + \left( {2k_{B} T/q} \right)$$
(8)

It is important to clarify that VD stands for the diffusion potential voltage, sometimes referred to as zero bias voltage, and that s stands for the grade factor, a dimensionless quantity that dictates the particular kind of heterostructure that will be produced. The value of the grade factor depends on the properties of the generated heterostructure. We can determine the electronic characteristics of the fabricated devices by graphically representing the inverse square of electrical capacitance as a function of the bias voltage. The graph shown in Fig. 12 (a) is a semantic expression for the following equation (Kopanski, Joseph J. 2007):

$$1/C^{2} = - [2(V_{D} - V)/\left( {q\,N_{D} \,\varepsilon_{r} \,\varepsilon_{o} \,\,A^{2} } \right)]$$
(9)
Fig. 12
figure 12

Plot of 1/C2 versus an applied voltage for the fabricated solar cells in the range of a (− 3, 3) volts b (− 3, 0) volts

In above formula, \(q\) appoints the electronic charge in the system (\(1.6 \times 10^{ - 19} \,\,C\)),\(N_{D}\) characterizes the dominant charge carrier concentration (namely, the number of ionized donors per unit volume), T articulates the temperature in kelvin, \(\varepsilon_{o}\) incarnates free space’s permittivity, \(k_{B}\) represents Boltzmann’s constant, the effective value of A in the mentioned equations refers to the contact area and the \(\varepsilon_{r}\) is a constant equals 10 for the SnO2 thin layer (Tongay, S. et al. 2009), and 11.9 for the silicon layer (Benhaliliba, M. et al. 2015). Essentially, the capacitance values are calculated by taking into account the real surface area of the electrodes.

There is a strong correlation between these two elements, as shown by the link between the inverse of capacitance squared and the voltage difference in forward and reverse biases of the solar cells. The results show that the capacitance squared decreases as the voltage difference rises for both forward and reverse biases. The capacitance squared noticeably collapses as a result of this drop, which is especially pronounced in the reverse bias zone. As shown in Fig. 12 (a), the capacitance squared is also influenced by the thickness of the SnO2 cap layer, with a decrease in capacitance squared corresponding to an increase in thickness. The real reason for the significant drop in the reciprocal of the capacitance square with increasing the voltage difference in this bias is the substantial growth of the Schottky barrier width as the reverse bias increases (Pintilie, L. et al. 2005). In addition to the potential difference, capacitance is typically influenced by factors such as electrode area, dielectric thickness, and dielectric stability. When a p − n junction is under reverse bias, a specific type of capacitance is formed at the depletion layer. In the context of fabricating a capacitor, the depletion layer acts as the dielectric. The reverse voltage applied determines the thickness of the depletion layer. As a result, as the thickness increases, the capacitance square value decreases. This capacitance is used in radio receiver adjusting circuits and other electronic equipment (Maeda, T. et al. 2018). The reciprocal of the capacitance square-voltage (C−2–V) characteristics in the reverse bias at 298 K and 10 MHz are shown in Fig. 12 (b). The analysis of this figure reveals a clear linear correlation between the C−2 values and the reverse bias voltage, indicating a sharp junction. This linear relationship allows for precise regulation of the carrier density in the layer region. Consequently, the carrier density in this specific area remains constant. There are various possible explanations for the obvious linear relationship between the reverse bias voltage and the capacitance square-voltage (C2–V) values in n-SnO2/n-CdS/p-Si solar cells, which indicates a sharp junction and perfect regulation of carrier density. First, a continuous carrier density in the layer region is achieved by the high-quality junction between the n-SnO2, n-CdS, and p-Si layers. This junction also enables effective charge separation and less recombination. The second factor that contributes to the linear connection is the uniform surfaces of the layers, which distribute the charge carriers uniformly over the area. Third, the unique energy levels and charge transport characteristics of SnO2, CdS, and Si may make the linear correlation easier to achieve. Fourth, well-designed layer-to-layer interfaces reduce interface states and surface recombination, supporting the linear sharp behavior. The observed linear association between the capacitance square-voltage values and the reverse bias voltage is supported by the uniform distribution of the electrical field over the layer region, allowing for fine control of carrier density (Maeda, T. et al. 2018).

The electronic parameters of fabricated heterojstructure including the carrier’s density, \(N_{D}\) (Kopanski, Joseph J. 2007) which is extracted from slope of the yielded straight lines in Fig. 12 (b), the width of the depletion region in the generated devices, \(\Psi_{d}\) (Salim, Evan T. et al. 2019; Riad, S. 2000) and the maximum electric field (Salim, Evan T. et al. 2019). These parameter are all computed based on the following equations (Kopanski, Joseph J. 2007):

$$Slope = d(C^{ - 2} )/dV = - 2 \times (q\,N_{D} \,\varepsilon_{r} \,\varepsilon_{o} \,\,A^{2} )^{ - 1}$$
(10)
$$\Psi_{d} = 8.854 \times 10^{ - 12} \left( {\frac{{\varepsilon_{r} A}}{{C_{o} }}} \right), E_{Max} = 2\left( {\frac{{V_{b} }}{{\Psi_{d} }}} \right)$$
(11)

Here, the built-in-voltage \(V_{b}\) is extracted from the intercept of the straight lines in Fig. 12 (b). The computed values of electronic parameters are listed in Table 4. It is noticed from this table that the values of Co and ND increase with increasing the SnO2 cap layer thicknees while the values of the rest parameters decrease. As a result, in our ongoing investigation, selecting the thin layer with the maximum thickness is the best option for usage in constructed solar cells. The reduction in built-in voltage values as the layer thickness increases is attributed to a reduction in the diameter of a depletion layer as the layer thickness increases (Salim, Evan T. et al. 2019). The depletion region within the devices is affected and narrows when a positive bias voltage is supplied to the fabricated solar cells. Due to the existence of stationary ions in the depletion region in an unbiased condition (no applied voltage), the region is rather broad. These stationary ions produce an electric field that resists the device’s ability to conduct current. The movement of charge carriers (electrons or holes) across the junction is prevented by this electric field, resulting in either high resistance or no current flow. The electric field produced by the unmoved ions is, however, reversed when a positive bias voltage is introduced to the device. The positively charged holes in the p-region are forced towards the negative terminal by the positive voltage while the positively charged electrons in the n-region are drawn to the positive terminal. The width of the depletion region therefore decreases. Because the applied voltage narrows the electric field’s width across the junction, the depletion region gets smaller. The electric field’s influence on the charge carriers decreases with a smaller depletion region, allowing for greater freedom of motion across the junction.

Table 4 Electronic parameters of the capacitance–voltage (C–V) characteristics at reverse bias voltage

3.6 Photovoltaic characteristics

In our continuous paths to probe the depths of the fabricated solar cells in our study, we had to measure the dark current density against the voltage difference (J–V) in the range between − 3 and 3 V. Here, this measurement resulted in first place to know the resistance of the heterostructure (\(R_{J}\)) and thus progress in our paths to extract basic parameters in this the side includes the shunt resistance (\(R_{sh}\)) and the series resistance (\(R_{s}\)). These last two resistances are referred to as the main parasitic resistances because they impose limitations on the potential benefits of solar cells and diminish their efficiency. Conducting measurements of current density as a function of applied voltage under dark conditions may seem somewhat peculiar since solar cells are primarily designed to convert light energy into electrical energy. However, such measurements are mainly useful for analyzing and verifying the properties of the fabricated device and calculating the resistances associated with this analysis. Additionally, even small differences in the intensity of incident light at the interface of produced solar cells might cause system noise and other disruptions in the illumination setup. As a result, it is thought that it is more appropriate for designers and various researchers to carry out evaluations both in the dark and in the light in order to gain entire knowledge about the manufactured heterostructure. This strategy guarantees a complete comprehension of the behavior and properties of the solar cell.

3.6.1 Efficiency parameters in the dark case

Figure 13 displays the photovoltaic characteristics of the current density–voltage relationship under dark conditions, specifically in the forward bias range of 0 to 3 V and in the reverse bias range of − 3 to 0 V. The influence of increasing the thickness of the SnO2 cap layer is demonstrated by the rise in current density with respect to the applied voltage difference in both forward and reverse biases. However, the forward bias scenario shows the improvement the most. The improvement in the current density is attributed to two important factors: the first lies in the improvement of the crystalline state of the SnO2 cap layer which ensures the arrangement of the surface atoms in an orderly manner that ensures that there are no reflections and energy loss in the surface. Thus, most of the photons of light easily pass through the cap layer (Kang, J. K., & Musgrave, C. B. 2002) and the second reason is that the energy convergence between the (SnO2/CdS) and (CdS/Si) interfaces are responsible for transferring all the holes of the Si absorber layer to the CdS buffer layer and then the SnO2 cap layer. All electrons from the buffer and cap layers are consequently successfully transported to the absorber layer. The density of the current increases throughout the fabricated solar cell as a result of this transition process, which also guarantees a constant flow of current (Kim, H. et al. 2001).

Fig. 13
figure 13

Dark (current density–voltage) characteristics of fabricated heterojunctions

Figure 14 describes the process of a semi-logarithmic procedure for the current density as a function of the applied voltage in Fig. 13. It is clear through this mathematical procedure that it is easy to distinguish two regions. The first shows an exponential behavior in the low voltage region caused by the formation of a depletion layer or a depletion region (Kavan, L. et al. 2014) between the silicon substrate and the buffer layer above it. The current density in the high voltage region deviates from the exponential behavior as shown in Fig. 14. Here, it can be asserted that the fabricated solar cells have high rectification properties and are distinctive because the exponential region in the reverse bias is narrower than that in the case of the forward bias (Zuo, L. et al. 2014; Li, C. et al. 2019).

Fig. 14
figure 14

Dark (semi-logarithm current density–voltage) characteristics of fabricated heterojunctions

From a scientific perspective, an ideal diode can be defined as having high resistance in the reverse bias and zero resistance to current flow in the forward bias. In practical terms, there is a low resistance in the case of a forward bias and a large resistance in the case of a reverse bias, as was already mentioned. The resistance of a diode (the resistance of hetero-junction, see Fig. 15) is defined as the slope of the tangent of two corresponding points on the x-axis (potential difference axis) divided by the corresponding values on the vertical axis(current density axis) according to the \(R_{J} = \left( {{{\partial V} \mathord{\left/ {\vphantom {{\partial V} {\partial J}}} \right. \kern-0pt} {\partial J}}} \right)\) formula (Gacio, D. et al. 2013). According to the map drawn in Fig. 15, the features of that map indicate that the increase in the thickness of the SnO2 cap layer leads to a decrease in the resistance of the fabricated diode in both biases, noting that the resistance shown by the diode to the passage of current in it is small in the case of the forward bias. The influence of the cap layer’s thickness enhances the density of the current flowing through the manufactured diode, signaling that this diode is appropriate for a variety of applications (Gacio, D. et al. 2013). From Fig. 15, the parasitic resistances of the fabricated diode were also identified, namely, the series resistance Rs, which corresponds to the resistance at the highest potential difference in the forward bias, and the shunt resistance Rsh, which corresponds to the resistance at the highest potential difference in the reverse bias according to the reference (Gacio, D. et al. 2013). With an increase in the thickness of the cap layer, the diode resistance decreased significantly, which greatly affected the identified parasitic resistances from Fig. 15 and listed in Table 2 which indicates that these two resistances decreased with an increase in the thickness of the SnO2 cap layer, which is indicative of an increase in diode quality with the increasing the thickness.

Fig. 15
figure 15

Heterojunction resistance for the n-SnO2/n-CdS/p-Si solar cell at different thicknesses

The quality check of the fabricated diode in addition to what has been confirmed should be done by testing the rectification rate of the device (see Fig. 16), which is defined mathematically as the ratio of the current density of forward bias to the current density of reverse bias: \(RR = \left( {J_{F} /J_{R} } \right)_{V\, = \,\,const.}\) (Uslu, H. et al. 2010). The forward current density surpasses the reverse current density as the SnO2 cap layer’s thickness is increased, resulting in a higher rectification rate. The correction rate increases exponentially when a positive voltage is applied, peaks at 3 V, and then progressively declines. Positive results from the increased cap thickness include an improved rectification ratio, which suggests that the produced solar cells work better (Uslu, H. et al. 2010).

Fig. 16
figure 16

Rectification ratio for the n-SnO2/n-CdS/p-Si solar cell at different thicknesses

3.6.2 Spectral photoresponsivity and quantum efficiency

Spectral photoresponsivity \(\Re = \left( {J_{Ph} /P_{out} } \right)\) (Alqahtani, A. et al. 2022) (see Fig. 17 (a)), (where \(J_{Ph}\) is the photocurrent density and \(P_{out}\) portrays the output power applied in the heterostructure) and spectral photoresponsivity \(\eta \% \equiv EQE = \left( {1.24 \times 10^{ - 5} .(\Re /\lambda )} \right)\) (Alqahtani, A. et al. 2022), (see Fig. 17 (b)), can be understood by comparing them within the same spectral sector. In our study, the wavelength ranges between 300 and 900 nm. From the mentioned figure, the highest photoresponsivity is 4.88 (A/W.cm2) for the thickness of cap layer at 180 nm corresponded to a maximum wavelength, \(\lambda_{\max } = 652.05\,nm\). Consequently, the photoresponsivity increases with the increasing thickness of the SnO2 cap layer and reaches 4.88 (A/W.cm2) at the highest thickness. It occurs because charge recombination n increases and light absorption intensity decreases. On the other hand, as a result of an increase in the concentration of free carriers and the potential barrier of hetero-junctions, the response intensity likewise rises with the thickness of the SnO2 cap layer (Hussein, H. I et al. 2019). When the SnO2 cap layer’s thickness is increased, the quantum efficiency increases until it becomes semi-constant, then decreases after that. Also, quantum efficiencies shift toward higher wavelengths as the cap layer thickness increases. As a result, visible and adjacent spectral region photoresponsivity increases. This behavior leads to improved optical pathways, structural morphology, and optoelectronic characteristics for fabricated solar cell devices (Table 5).

Fig. 17
figure 17

a The spectral responsivity and b quantum efficiency for the n-SnO2/n-CdS/p-Si solar cell at different thicknesses

Table 5 Series and shunt resistances in dark (J–V) conditions for the fabricated solar cell at various thicknesses

3.6.3 Efficiency parameters in the illumination case

The experimental measurements of current density as a function of potential difference under illumination conditions, (J–V)illumiation, are graphed in Fig. 18 (a). It is clear from this figure that the current density in both the forward bias and reverse bias increases with the increase in the SnO2 cap layer thickness with a noticeable increase of the current density in the case of forward bias, which indicates excellent correction properties of the fabricated hetero-structures. In a related context, we find that the mathematical calculations enable us to calculate the corresponding power in terms of voltage in illumination conditions also, namely, (P–V)illumination, as schematically represented in Fig. 18 (b). Also, the exponential behavior that appeared at low voltages in the manufactured solar cells is due to the formation of a depletion area between the SnO2/CdS and CdS/Si interfaces. The electric field at the interfaces creates a depletion region that serves as a barrier to the movement of charge carriers, hence reducing the current through the device. It is noteworthy that the depletion area decreases as the cap layer thickness increases and this, in turn, improves the correction rate of the fabricated heterojunctions as this region is narrowed (Elsaeedy, H. I. et al. 2021 a).

Fig. 18
figure 18

a Illuminated (J–V) and b (P–V) characteristics of the fabricated solar cells in the range of (− 3, 3 V)

In the forward bias, the (J–V) and P–V) characteristics in the illumination case are illustrated in Fig. 19 (a, b), respectively. The \(PCE = P_{\max } \times \left( {P_{in} } \right)^{ - 1} \%\) formula (Elsaeedy, H. I. et al. 2021 d), where \(P_{\max }\) incarnates the maximum power in Fig. 19 (b), and \(P_{in}\) is the experimental value of input power) is helped us in calculation of the power conversion efficiency (PCE) for the generated devices. On the other side, the fill factor (FF) is computed utilizing \(FF = \left( {(V_{\max } .J_{\max } ) \times (V_{OC} .J_{SC} )^{ - 1} } \right) = P_{\max } \times (V_{OC} .J_{SC} )^{ - 1}\) (Qasem, A. et al. 2021 b). Here, \(V_{\max }\) and \(J_{\max }\) are the voltage and the current density corresponds to the maximum power points \(P_{\max }\), \(V_{oc}\) is the open-circuit voltage and \(V_{oc}\) is the short-circuit current density identified from Fig. 19 (b). As shown in Table 6, these quantities are obtained and their values are compiled. The maximum power conversion efficiency (PCE) in the illumination state is 14.25% which corresponds to the SnO2 cap layer at 180 nm, as illustrated in the mentioned table. We guess that the SnO2 cap layers’ high transmission value, improved photoresponsivity and quantum efficiency, decreased reflection, and lower absorption coefficient are the primary factors in the device’s performance optimization and increased power conversion efficiency (PCE). Additionally, compared to the other cap layers, the JSC for the 180 nm thick SnO2 cap layer is higher. In fact, better optoelectronic properties may be used to explain this behavior, since more photons are absorbed into fabricated devices as a result of the decreased reflectance spectrum. In turn, this causes the absorber layer to develop more photogenerated charge carriers, increasing the JSC and Voc values. In addition, the comparatively increasing values of both (Voc, JSC and FF) are due to several factors including the reducing resistivity pathways, optimizing of grain size quality and also the decreasing in heterojstucture resistance of the SnO2 cap layer with increasing its thickness. In brief, the study amply proved that the cap layer’s thickness significantly influenced the development of the devices’ structural, optical, and photovoltaic capabilities. On the other hand, the buffer layer was essential in minimizing the energy disparity between the (SnO2/CdS) and (CdS/Si) interfaces. As a result, increased lattice compatibility resulted from better alignment of the energy levels among the layers stacked on top of one another. Thus, the studied structures’ current densities were improved, which eventually improved the PEC system’s performance.

Fig. 19
figure 19

a Illuminated (Jss–V) and b (P–V) characteristics of the fabricated solar cells in the range of (0, 3 V)

Table 6 Illuminated (J–V) and (P–V) parameters for the fabricated solar cell at various thicknesses

4 Conclusions

In order to fabricate n-SnO2/n-CdS/p-Si heterojunction devices, the SnO2 cap layer with different thicknesses was deposited over a CdS buffer layer by thermal evaporation technique. Namely, this technique was used to first deposit the CdS layer on a polished p-type silicon wafer. EDX technique was utilized to determine the distribution of elemental components in the SnO2 window layer, while the microstructural parameters were determined using XRD and SEM techniques. The Keithley 2400 Source Meter device was employed to measure the thermopower, and the UV–VIS spectrophotometer was utilized for optical measurements of the SnO2 layers. The obtained results showed that as the thickness of the SnO2 window layer increased, the structural, optical, and thermopower characteristics improved. Increasing the cap layer thickness from 30 to 180 nm resulted in an enhancement of the optical bandgap energy from 3.351 to 3.901 eV. On the other hand, the electronic parameters, including the built-in voltage, diffusion voltage, width of the depletion region, and maximum electric field, were significantly influenced by the variation in the thickness of the SnO2 window layer. With regard to the photovoltaic properties in the absence of light, both the resistance of the heterojunctions and the series resistance decrease, while the shunt resistance increases as the thickness of the window layer increases. Consequently, this leads to an increase in the correction factor of fabricated solar cells. The obtained findings indicated that a cap layer thickness of 180 nm was the most favorable choice. This thickness facilitated the formation of a high-quality electron transporting layer (ETL) with a more uniform SnO2 layer. The optimized SnO2 ETL in the solar cell under investigation achieved the highest power conversion efficiency (PCE) of 14.25%. The corresponding values for fill factor (FF), open-circuit voltage (VOC), and short-circuit current density (JSC) were 58.927%, 2.647 V, and 0.256 A/m2, respectively.