1 Introduction

In the beyond few a long time, semiconductors have attracted fantastic attention. Among them, CdS is the most interesting because it has generated great interest in various applications of optoelectronics, photovoltaics, catalysis, and biological sensing [1,2,3,4]. CdS is n-type semiconductor and has an immediate optical energy gap of about 2.45 eV, which is usually recommended as a window sheet in solar cells. In addition to that CdS has a high photosensitivity and consequently performs an important position in provider production inside the solar cells [5, 6]. Structural and optical properties, making CdS a good candidate to be used as an insulating or buffer layer, are a prerequisite for a repeatable and efficient heterogeneous reaction in solar cells [7, 8]. Light absorption in the buffer layer (as an instance, band-gap energy, CdS = 2.4 eV) reduces the spectral response of the solar cell inside the blue region of the solar spectrum, because the photogenerated charge providers in the buffer layer are only in part accumulated. Analysis of polycrystalline thin-film solar cells identifies the absorption in the cadmium layer of the heterogeneous conduction as taking a large share in the total light loss [9, 10]. However, this loss due to light absorption is not the only consequence caused by the buffer layer. Many strategies were mentioned for the deposition of CdS thin films. These encompass thermal evaporation [11], sputtering [8], chemical bathtub deposition [12], spray pyrolysis [13], metal organic chemical vapor deposition (MOCVD) [14], molecular beam epitaxial approach [15], electro-deposition [16], photochemical deposition [17], and so forth. Among them, electron beam gun technique is a powerful technique for preparation of high-quality thin solid films. Therefore, on this research, the influence of CdS film thickness at the structural, morphological, and optical traits of CdS film has grown on glass substrates. The optical constant and the film thickness were decided with high accuracy in the basic segmentation spectroscopy (SE) strategies and software. The accurate values for optical constants, film thickness, and strength gap of the films are essential parameters in sun cells and photovoltaic packages. On the other hand, this framework pursuits to have a look at the dependence of darkish (I–V) characteristics in ahead and opposite bias at the film thickness and the voltage in the range of (− 2 to 2) volts.

2 Experimental details

High-purity (99.999%) CdS powder (Alrich chemical compounds organization, USA) became evaporated from molybdenum boat to form the dielectric layer onto ultrasonically cleaned glass substrate kept at regular temperature (150 °C), using a thermal evaporation unit (Denton Vacuum DV 502 A) and a vacuum of about 10–6 Pa. The substrate was circled at a gradual speed of five rpm to gain a uniform CdS thin film. The deposition rate and the film thickness had been controlled using a quartz crystal screen DTM-100. The deposition rate was maintained at 2 nm/s during evaporation of the films. The effect of film thickness on CdS has been studied at 5 different thicknesses (100, 150, 200, 250, and 300 nm). The films had been evaporated in a nitrogen environment to avoid any oxidation of the film. The constitution of the organized samples has been studied via XRD analysis (Philips X-ray diffractometry (1710)) with nickel filtered the radiation of Cu Kα that has wavelength = 0.15418 nm). The XRD results had been delicate with the aid of the use of the Rietveld method with GSAS-II software [18, 19].

The composition analysis of the resulting film was performed by an (EDXS) unit (Philips XL), which was operated at an accelerating voltage of 30 kV. The error in determining the percentage of any element in the film does not exceed 2%. Atomic force microscope (AFM, model MLCT-MT-A) was used to analyze the morphology of the film surface.

Use the rotating compensator tool (J.A. Woollam, M-2000) to measure the SE parameters (ψ and Δ) of the CdS film in the wavelength range of 300–1100 nm. Ellipsometric statistics are performed at 70°. All measurements are performed at room temperature. The optical constants of the CdS films have been decided through fitting the version characteristic to the measured information the use of J.A. Woollam Corporation evolved WVASE32 program.

The heterojunction device of the Ni/n-CdS/p-CdTe/Pt solar cell was fabricated via deposition of the CdTe thin layer (500 nm) on the CdS thin films at five different thicknesses (100, 150, 200, 250, and 300 nm) which were deposited on pre-cleaned glass substrates. The front electrode contact was made by depositing a semi-transparent grid of platinum (Pt) fingers (100 nm) directly onto the surface of the CdTe thin layer, while the back contact electrode was attached to the CdS thin film deposited on the glass substrates, which was nickel (Ni) and had a thickness of 100 nm. The front and back electrode contacts were considered ohmic for the small voltages. The current–voltage (I–V) measurements for the generated device were carried out using a standard circuit (Keithley 610 and 617 as a voltage source and current meter) to determine the current through the heterojunction at various thicknesses of CdS. At room temperature, the dark (current–voltage) characteristics were obtained in a completely dark chamber,

3 Results

3.1 Structural characterization

Figure 1 illustrates the XRD pattern of CdS powder and the basic simulation test of Rietveld refinement using X'Pert HighSore (version 1.0e) software based on the CdS card. Therefore, the mirror image traces of the CdS powder are attributed to the hexagonal shape (wurtzite type, JCPDS 10-0454) [19,20,21,22].

Fig. 1
figure 1

XRD pattern of CdS powder with Rietveld Refinement

Figure 2 displays the XRD of as-grown CdS thin film with various thicknesses on glass substrates. The treated samples showed a hexagonal CdS structure with crystal planes (100), (002), and (101). Regardless of the processing environment, as the crystallinity of the film increases, increasing the film thickness results in an increase in peak intensity [23].

Fig. 2
figure 2

X-ray diffractograms of the different thicknesses of CdS thin films

Then, the crystal structures of the different thicknesses of the films were refined in terms of the Rietveld method [18]. The Rietveld refinement results are presented as an examples in Fig. 3 (a, b, and c). The successful refinement is confirmed by the very small difference between the measured and refined intensities as revealed in Fig. 3 (a, b, and c) and the low R-factors scheduled in Table 1. According to the refined lattice parameters, as shown in Table 1, the lattice parameter is plotted in Fig. 4. As the film thickness grows, the lattice parameters a and c decrease.

Fig. 3
figure 3

X-ray diffractograms of the three thicknesses a 100 nm, b 200 nm, and c 300 nm of CdS thin films with Rietveld Refinement

Table 1 Values of lattice parameters (a and c), volume of unit cell, crystallize size, lattice strain, dislocation density, surface roughness, and RMS surface roughness of different thicknesses of CdS thin films
Fig. 4
figure 4

Lattice parameters a and c of a wurtzite CdS films that extracted from Rietveld Refinement

XRD data were additionally analyzed to estimate the scale of crystallite, D, and microstrain, e, of the CdS film with exceptional thicknesses by way of the usage of the Scherrer and Wilson equations [11, 24, 25]. By analyzing XRD pattern in terms of Scherrer (\(D = 0.9\lambda /\beta \cos \theta\)) and Wilson equations (\(e = \beta /4\tan \theta\)) equations [11, 24] crystallite size, D, and microstrain, e of as a function of film thickness of CdS could be identified after performing the correction \(\left( {\beta = \sqrt {\beta_{{{\text{obs}}}}^{2} - \beta_{{{\text{std}}}}^{2} } } \right)\).

In which β is the broadening that equals the difference in profile width between the films βobs and the standard (silicon) βstd.

The crystallographic properties were highly affected by the presence of dislocation density. The dislocation density is the dislocation lines number per unit area inside the thin film. The crystallite size, D is related to the dislocation density, δ by the relation (δ = 1/D2). The estimated values of crystallite size and dislocation density as well as the values of microstrain are listed in Table 1. It is found that with increasing of the film thickness, the mean D of the CdS films increases, whereas the microstrain reduces (See Fig. 5). The increase in the crystallite size illustrates a reduction of the dislocation density and crystal imperfections within the lattice, thereby reducing internal microstrain. To probable clarify this behavior, higher thickness of the film may additionally mean a better compact stresses in the equivalent film, which can also suggest a much fewer efficient tensile stress and/or strain during the manner of the granule growth, as a result, leading to a larger grain size. The consequences of thickness dependent of ZnS (that comparable of CdS) thin films are in accord with the ones given by using another agencies [26,27,28].

Fig. 5
figure 5

Crystallite size and lattice strain of CdS nanofilms

AFM studies have been used to microscopically describe the surface morphology of CdS films with different thicknesses. Figure 6 shows 3-dimensional (3D) AFM images of 100, 200, and 300 nm films. The picture shows that the surface of the film is clearly dense and evenly arranged. The oriented normal distribution of the elongated grains has similar guidelines, confirming that the positioned favorable orientation grains grow toward the (002) plane. The micrographs of CdS films of different thicknesses were analyzed in detail to determine the microscopic surface morphology parameters, including grain length, surface roughness, and root implied rectangular (RMS) surface roughness, as shown in Table 1. The facts indicate that the grain size will increase with increasing film thickness. However, it was found that the inside roughness and RMS surface roughness increase with the thickness growth.

Fig. 6
figure 6

AFM images of CdS thin films deposited at thicknesses a 100 nm, b 200 nm, and c 300 nm

3.2 Optical properties in terms of spectroscopic ellipsometric

Semiconductor skinny films have many crucial technical programs, along with optoelectronic device. The presentation of CdS films in large part relies upon on their optical residences and thickness. Spectroscopic ellipsometry (SE) has been used to identify the optical constants precisely. The SE is non-damaging optical strategies and uses layer model to achieve an outcome results.

The spectroscopic ellipsometric outcomes of CdS films evaporated on transparent glass measured by way of SE method are changed into within the spectral variety of 300–1100 nm at an prevalence angle of 70°, and the information is amassed in intervals of 5 nm. The confused mirrored image is eliminated through the use of roughen substrate backs. Spectroscopic ellipsometry without delay information angles Ψ and , which can be connected to the complex mirrored or reflected image coefficients (Fresenal’s coefficient) of the polarized light by the subsequent equation [27,28,29,30]:

$$\rho = \frac{{r_{p} }}{{r_{s} }} = \tan \psi \exp (i\Delta ),$$
(1)

wherein Ψ, , rp, and rs are mentioned the angle received from the amplitude ratio among the parallel polarized wave (p) and perpendicularly polarized wave (s), the polarized waves exchange. The Spectral ellipsometric facts ψexp and Δexp of CdS/glass films among outcomes of CdS thickness are provided in Fig. 7. The optical values of n, k, and d of the CdS films are determined by using least-squares regression evaluation and mean square error function (MSE) to change the spectral dependence of ψexp and Δexp into the correct version to obtain unidentified fitting parameters with high precision. The Levenberg–Marquardt regression rule set is completely based on the record-matching estimation and the modeling facts of ψ and Δ, and is used to reduce MSE and select the effectiveness of subsequent versions [31, 32]:

$${\text{MSE = }}\frac{{1}}{{{2}N - M}}\sum\limits_{i = 1}^{N} {\left( {\left( {\frac{{\psi_{i}^{\bmod } - \psi_{i}^{\exp } }}{{\sigma_{\psi ,i}^{\exp } }}} \right)^{2} + \left( {\frac{{\Delta_{i}^{\bmod } - \Delta_{i}^{\exp } }}{{\sigma_{\Delta ,i}^{\exp } }}} \right)^{2} } \right)}$$
(2)

in which M is the appropriate parameters range and N is the number of ψexp and Δexp pairs included in the fitting, and that i is the index of summation. The values of \(\psi_{i}^{\exp }\), \(\Delta_{i}^{\exp },\) and \(\psi_{i}^{\bmod }\), \(\Delta_{i}^{\bmod }\) are called the measured and modeled values, respectively. \(\sigma_{\psi ,i}^{\exp }\) and \(\sigma_{\Delta ,i}^{\exp }\) are the standard deviations of \(\psi_{i}^{\exp }\)and \(\Delta_{i}^{\exp }\), respectively.

Fig. 7
figure 7

Spectral ellipsometric data ψ and Δ for various thicknesses of CdS thin films grown on glass substrate

Use the Complete Ease SE software program to use the appropriate optical model to evaluate the SE parameters through nonlinear regression coefficients [33]. In the existing examine, the model is built to provide a stacked-layer shape, that is particularly composed of 3 layers: a pitcher substrate, CdS absorber layer, and a rough layer. The rough layer is modeled by using the effective medium approximation (EMA) that is the suitable device to establish the morphology of the multilayer film configuration. More details about EMA are available and described in index [34]. Besides, the glass layer is modeled by using Cauchy version belt in Complete EASE software, while the CdS layer is modeled with the aid of the usage of the B-spline computational process. The B-splines are a recursive set of polynomial splines. More details about polynomial splines are noted in details in ref. [28]. Figure 8a, b shows the spectral changes of ψexp. and Δexp of CdS/glass of 100 and 300 nm CdS layer thicknesses, respectively), which are suited to the calculated ψical and Δical data received using the above recommended model. As the thickness of the CdS layer increased from 100 to 300 nm, the fitting process produced a very low MSE value, from 1.17 to 1.77, and the surface roughness of the CdS film increased from 1.66 nm to 3.76 nm. In addition, the interference pattern in the spectrum is caused by the coherence of a pair of reflections in the film [35]. The fitted optical constants, namely the refractive index, n and extinction coefficient, k of CdS films with different thicknesses, are shown in Figs. 9 and 10, respectively.

Fig. 8
figure 8

Spectral ellipsometric data ψ and Δ for a 100 nm and b 300 nm for CdS thin films.grown on glass substrate. Experimental results are indicated by symbols, and the solid lines represent the model fit data

Fig. 9
figure 9

Dispersion refractive index for CdS with different thicknesses

Fig. 10
figure 10

Extinction coefficient against wavelength for CdS with different thicknesses

In addition, it was observed that the refractive index increased with the increase of the thickness of the CdS layer, which was attributed to the enhance in crystallinity, which led to the enhance in grain size [36]. Figure 9 shows the k spectral behavior of CdS/glass films with various CdS layer thicknesses obtained from the above model. Obviously, a significantly lower extinction coefficient is observed at the absorption edge, which confirms that the light is absolutely stopped in this variety [37].

The absorption coefficient (α) of CdS/glass films with diverse CdS layer thicknesses was calculated in terms of k value that extracted from SE model via the subsequent relation [38]:

$$\alpha \;\, = \,\;\frac{4\pi k}{\lambda }.$$
(3)

Figure 11 shows the relationship between α and for CdS/glass films with extraordinary CdS layer thickness. As well the absorption behavior increases as the thickness of the CdS layer increases, especially in the UV range [39]. In addition, the non-zero value of light absorption observed at energies less than the original absorption edge is owing to light absorption at the grain boundaries [40, 41].

Fig. 11
figure 11

Absorption coefficient against photon energy for CdS with different thicknesses

At strong absorption region, where α > 104 cm−1, The optical energy band gap \(E_{g}^{opt}\) of varies thicknesses of CdS can be calculated using the Tauc relation of the following expression that can be used [42]:

$$(\alpha h\nu )^{{}} = \alpha_{o} (h\nu - E_{g} )^{p},$$
(4)

where \(\alpha_{o}\) and p are constant and exponent. Equation 4 is the one that determines the type of optical transformations, whether they are allowed or not, depending on the p value. Since the CdS film is polycrystalline, as shown by X-ray diffraction, the transition will most likely be permissible, i.e., a p value of half (p = 1/2) [43,44,45,46]. Figure 12 shows the relationship of (αhν)2 on the vertical axis with on the horizontal axis of different thicknesses of CdS layer. The value of the gap energy, \(E_{{\text{g}}}^{{{\text{opt}}}}\) is determined by extending the line part of (αhν)2 to cut the horizontal axis, at a zero value of (αhν)2, which is the value of the gap energy. Figure 13 shows the energy gap, \(E_{{\text{g}}}^{{{\text{opt}}}}\) values as a function of CdS film thickness. It is observed that the value of \(E_{{\text{g}}}^{{{\text{opt}}}}\) of CdS film decreases as the thickness of the CdS layer increases. Various information have been published to explain that the band gap decreases with the increase of semiconductor film thickness, such as the quantum size effect [47, 48], structural parameters [49], the appearance of impurities [50, 51], and the reduction of stress and potential density of dislocations [52, 53]. In this study, the observed decrease in the optical \(E_{g}^{opt}\) of CdS/glass films with the increase in CdS layer thickness is attributed to structural and microstructural parameters, e.g., increment in particle size, the reduction in lattice parameters, and lattice microstrain. In this study, the observed decrease of \(E_{{\text{g}}}^{{{\text{opt}}}}\) for CdS/glass films with increasing thickness of CdS layer is attributed to change in microstructures, e.g., diminish in lattice parameters, enlarge in crystallize size, and fine lattice compaction.

Fig. 12
figure 12

Variations of (αhν)2 versus photon energy () for CdS films with different thicknesses

Fig. 13
figure 13

Optical energy gap, \(E_{{\text{g}}}^{{{\text{opt}}}}\) as a function of CdS film thickness

3.3 Photovoltaic characteristics for fabricated solar cell

The main parameters of the fabricated solar cells are extracted in this work in the temperature range of 100 to 300 nm to determine the behavior of dark (I–V) characteristics for the forward and reverse bias applied in the range of − 2 to 2 V. The diagram of studied p–n junction is illustrated in Fig. 14.

Fig. 14
figure 14

The diagram of studied p–n junction n-CdS/p-CdTe Cell

The current \(I\) is related to the applied voltage \(V\) and the rest of the parameters of the fabricated diode is the following famous equation [54]:

$$I = I_{01} \left( {\exp \left( {\frac{{q\left( {V - IR_{{\text{s}}} } \right)}}{{n_{1} k_{{\text{B}}} T}}} \right) - 1} \right) + I_{02} \left( {\exp \left( {\frac{{q\left( {V - IR_{{\text{s}}} } \right)}}{{n_{2} k_{{\text{B}}} T}}} \right) - 1} \right) + \left( {\frac{{V - IR_{{\text{s}}} }}{{R_{{{\text{sh}}}} }}} \right).$$
(5)

In this formula, \(I_{0}\) symbolizes the saturation current, n epitomizes the quality factor of the fabricated diode), \(q\) is the electronic charge which is equal to \((1.6 \times 10^{ - 19} \,\,C)\) and \(k_{{\text{B}}}\) recaps the Boltzmann constant. The rest parameters in Eq. (5) represent the parasitic resistances which include the shunt resistance \(R_{{{\text{sh}}}}\) and series resistance \(R_{{\text{s}}}\).

3.4 The pathway of (current–voltage) dependence

Figure 15 depicts the dark (I–V) features for the manufactured diode in forward and reverse bias for the variable thickness of CdS and applied voltage in the specified ranges. It will be clear from this figure that the current increases as the thickness of the film increases. Figure 16 shows the dependence of the current on the applied voltage in the forward bias and reverse bias to highlight the success of the studied solar cell synthesis with high efficiency so that the current in the forward bias is higher than the current in the reverse bias (I–V). These graphs depict the increase in the current behavior of the generated solar cell in the case of the forward bias, which increases dramatically in the low-voltage region. The development and formation of a depletion (exhaustion) region between the CdS thin film formed on the glass substrate and the CdTe thin film deposited on it are related to the exponential behavior in the low voltages. It should be observed that the exponential behavior of the reverse current of the examined manufactured solar cell in the depletion zone, i.e., in the low-voltage region, is lower than the exponential behavior of the forward current in the same region. As a result, the fabricated solar cell can be said to have exceptional rectification characteristics.

Fig. 15
figure 15

The dark (I–V) characteristics for the fabricated solar cell

Fig. 16
figure 16

Current versus the applied voltage for the p–n junction of solar cell at various thicknesses of CdS in the range of (− 2, 2) volts

4 Conclusions

CdS films with diverse thicknesses (100–300 nm) are deposited on the glass substrates (CdS/glass) by evaporation. The influence of thickness on optical traits of the (CdS/glass) is considered with the aid of usage spectroscopic ellipsometric (SE). The structural examination tells that CdS/glass film includes a wurtzite hexagonal CdS film form structure. It is discovered that as the CdS film thickness increases, lattice constants and strain decrease, even as the crystallites size increases. The consequences received from SE display that the general behavior of the optical constants, n and k for the CdS/glass film increases with the raise of CdS layer thickness. The outcomes in addition display that the \(E_{{\text{g}}}^{{{\text{opt}}}}\) with direct nature reduces as the thickness increases from 100 to 300 nm. It is accomplished that the optical constants of CdS films enhance, as the CdS film thickness increases. Furthermore, it is discovered that the deposition of CdS glass substrate increased absorption with increase in the film thickness and then reduced the band gap. On the other hand, the constructed solar cell’s forward and reverse biases have been thoroughly analyzed. In the case of forward bias, the current behavior of the generated solar cell increases, which increases significantly in the low-voltage region. The development and formation of the depletion (depletion) region between the CdS film formed on the glass substrate and the CdTe film deposited thereon is related to the exponential behavior at low voltage.