Introduction

Metal chalcogenides semiconducting compounds were extensively investigated for many years, because of their confirmed usefulness in various optoelectronics device applications. These semiconducting compounds include selenides, sulfides, and tellurides [1,2,3,4,5]. Among, all cadmium sulfide (CdS) belonging to the II–VI group, is an important semiconductor, due to its wide-spread applicability in optoelectronics devices like photodetectors, solar cells, light emitting diodes, thin film transistors, optical waveguide, etc., [6,7,8,9,10,11]. The CdS is an inorganic solid compound, in yellow color appearances, with promising intrinsic n-type material, and is considered environmentally friendly due to its elemental composition. This material is primarily chosen for its flexibility in the design of various devices, making it a preferred choice for window layer applications along with several semiconductors such as CdTe, Cu2S, and, CulnSe2 [12, 13]. The CdS possesses a direct band gap Eg = 2.42 eV at room temperature and holds a remarkable wavelength transparency range, around 500 nm, due to its ability to efficiently absorb incident light with only a few microns of CdS material [14, 15]. CdS thin films were extensively studied for their potential in various technological applications and their advantageous characteristics like; high chemical stability, ease of growth, photoconductivity, high electron affinity, cost-effectiveness, facilitating easy ohmic contacts, maintaining low resistivity, etc. To enhance current density in thin film solar cells, it is essential to keep CdS layers extremely thin to enable increased photon transmission to the absorber layer [16,17,18]. Several techniques used for the preparation of CdS thin film are; sputtering, molecular beam epitaxy, pulsed laser deposition and thermal evaporation [19,20,21,22,23]. As reported in the literature, thermal evaporation is a cost effective and convenient growth method. It is versatile, suitable for thin films, and for creating CdS nano structures like nanocrystals, nanowire and nano rods [24, 25]. Kong et al. investigated CdS thin films annealed at different temperatures (300–500 °C) in various atmospheres. Results showed that annealing in air with a CdCl2 coating improved CdS film crystallinity and grain size, enhancing its suitability as a solar cell window layer [26]. Suman et al. demonstrated the post-deposition CdCl2 activation treatment on thermally evaporated CdS films. Results showed that activation temperature significantly influenced film properties. CdS films air-annealed at 100 °C were suitable as window layers for Cd-based heterojunction solar cells [27]. Chander et al. investigated the properties of electron beam-evaporated polycrystalline CdS films through thermal annealing. Results showed that the direct band gap decreased from 2.57 to 2.43 eV, while electrical conductivity increased with higher annealing temperatures [28]. Rahman et al. investigated spin-coated CdS thin films and their annealing conditions. Results showed that the optical band gap varied from 2.12 to 2.75 eV, depending on the annealing. Changing the annealing environment influenced several optical properties, offering the potential to customize CdS films for specific applications [29]. Keshav et al. demonstrated that room-temperature vapor-evaporated CdS thin films favored a cubic structure. Despite annealing, the films retained this cubic structure, relieving strain. The change in intensity due to post-annealing was linked to surface-to-volume ratio alterations. Annealed films exhibited increased mobility (85–114 cm2/V·s), with no significant changes in carrier concentration or resistivity, indicating improved crystallinity [30]. Patara et al. investigated the impact of annealing on Ni-doped CdS thin films deposited on glass and ITO substrates using spray pyrolysis. Results revealed significant sensitivity to annealing temperature. The band gap of the films, determined through absorption spectroscopy, decreased from 2.88 to 2.81 eV upon annealing [31].

After reviewing the literature, we found a few individual studies that discuss how film annealing temperature affects photovoltaic properties [32,33,34,35]. We also found studies that look into how doping affects CdS photovoltaic properties [36,37,38]. In the present study, the thermal evaporation method was used to prepare CdS thin films and annealed them at different temperatures between 100–400 °C in air and vacuum. To the best of our knowledge, this is the first report on the structural, optical, and electrical properties of CdS thin films annealed in air and vacuum at different temperatures, respectively.

Experimental procedure

A highly pure (99.999%) CdS material was used for the fabrication of thin films of CdS by using a Balzar BAK 640 high-vacuum coating unit maintaining a vacuum at ~ 1.0 × 10−5 mbar at 25 °C temperature on glass substrate by using thermal evaporator machine. The cleaning of the substrate is a vital procedure before depositing films onto the substrate. For this purpose, the substrates were firstly dipped into H2SO4 solution for 3–4 h and then washed in running water. The ultrasonic bath with a frequency of 40 kHz was used to remove particles from a substrate surface. By using isopropyl alcohol and acetone, the substrates were cleaned again and lastly, dried by employing warm, filtered air pumped around the room. After clamping in the chamber a glow discharge was employed for three minutes to remove adsorbed particles from the substrates and contamination from the chamber.

The rate of deposition and thickness of the films was monitored by a device FTM8 equipped with a tiny quartz crystal. A 0.80 nm/s CdS deposition rate was maintained during the coating of the films at 25 °C. Uniform films were obtained and the film was deposited on annealed sample in a vacuum of ~ 1.0 × 10−5 mbar subsequently, they were air annealed at a temperature that varied between 100–400 °C. Rutherford backscattering spectrometry (RBS) with a He++ beam having an energy of 2.085 MeV using a silicon surface barrier with a resolution of 30 keV was used to find the thickness and stichometry of the deposited films.

At room temperature, structural analysis was revealed using an X-ray Bruker D8 diffractometer. For optical parameters, Perkin Elmer's spectrophotometer with UV Win software in the wavelength range of 300–2500 nm was used. The transmission data that was fitted was used to determine the energy band gap of the films. Morphological images were obtained using a TESCANMAIA-3 type SEM with an Octane Elite EDX scanner. The electric resistivity of films was assessed by using a Keithly 2410-C meter.

Results and discussion

Figure 1 shows the combined RBS spectrum of unannealed and annealed films. The Fig. 1 revealed that the prominent peak in the spectra corresponds to Cadmium (Cd) and sulfur (S). Additionally, signals for silicon (Si), calcium (Ca), and oxygen (O) were also perceived, which were likely obtained from the substrate. The IBM ion beam analysis software was used to analyze the acquired RBS data. Here, the near-surface absolute atomic concentrations of Cd and S were determined, and the ratio of Cd to S was calculated to determine the composition of CdS thin films. These calculations revealed that the near-surface layer has a Cd to S ratio of 1.00 within the experimental error of about 3%, for a single dip and continuous dip-grown CdS films. Whereas for the multiple dip films, the ratio is 0.92. For continuous or multiple dip films, the Cd to S ratio remains constant regardless of the number of dips, as long as there are two or more.

Fig. 1
figure 1

Unannealed and annealed CdS RBS spectrum

Figure 2 represents the room temperature XRD pattern of air and vacuum-annealed CdS thin films, respectively. The XRD spectrum of CdS thin films, however, shows distinct peaks at 2θ of ~ 26.49, 47.73, and 26.50, 47.76 corresponding to (002), (103) planes matched with JCPDS # 41-1049 [39]. XRD pattern also revealed that CdS thin films have a hexagonal structure (with space group = P63mc). Sharp and clear peaks confirm the pure crystalline phase. It was also observed that the vacuum-annealed thin film shows a preferential orientation of its grain for higher temperatures ≥ 200 °C. Whereas in the vacuum-annealed thin films, a sharp peak growth was observed at the (002) reflection plane. This may be due to the freeing of random strain resulting in an improvement in the crystalline quality of the films in comparison to the as-deposited thin films [23].

Fig. 2
figure 2

Room temperature XRD pattern of CdS thin films a air and b vacuum annealed

The average crystallite size of thin films was calculated by using Scherer’s formula:

$${\text{D}} = \frac{k\lambda }{{\beta \cos \theta }}$$
(1)

here k = 0.94 and λ = 1.54178 Å have been used. β is the full width at half maximum of the intense peak and θ is the Bragg’s angle.

d-spacing was calculated by Bragg’s formula

$${\text{d}} = \frac{\lambda }{2\,\sin \theta }$$
(2)

Lattice constants (a and c) for the hexagonal structure were obtained by the following equation:

$$\frac{1}{{d^{2} }} = \frac{4}{3}\left( {\frac{{h^{2} + hk + k^{2} }}{{a^{2} }}} \right) + \frac{{l^{2} }}{{c^{2} }}$$
(3)

Dislocation density and lattice strain were calculated using equations

$$\updelta = 1/{\text{D}}^{2}$$
(4)
$$\upvarepsilon = \frac{\beta \,\cos \theta }{4}$$
(5)

The various structural attributes such as lattice constants (a, c), the crystallite size (D), d-spacing, dislocation density (δ), and strain (ε) are listed in Table 1.

Table 1 Lattice parameters of CdS thin films at different annealed temperatures

The EDX spectra of air and vacuum-annealed CdS thin films are displayed in Figs. 3 and 4. EDX spectra indicate that the experimental results of Cd and S are well-matched with the theoretical data. A little bit of change in the concentration of Cd and S may be due to (1) an increase in the annealing temperature, (2) collision between Cd and S atoms during the evaporation as per the kinetic theory of gases [40, 41], and (3) presence of Si, Na and Ca atoms (as these are the components of the soda-lime glass substrate). The elemental percentage for various thin films is given in Table 2.

Fig. 3
figure 3figure 3

EDX spectra and SEM images of CdS thin films a as-deposited, be air annealed at different temperatures

Fig. 4
figure 4figure 4

EDX spectra and SEM images of CdS thin films a as-deposited, be vacuum were heated to different temperatures

Table 2 Elemental composition and physical properties of CdS thin films

The inset in Figs. 3 and 4 represent SEM images of air and vacuum-annealed CdS thin films at different temperatures (i.e. 100, 200, 300, and 400 °C), respectively. It can be observed that the grown thin films have a flat and smooth surface as the annealing temperature increases. Some small pores have appeared for air annealed at 200 °C, this may be due to the manumission of hydroxide molecules from the film's surface [42, 43]. Thus, more fine and smooth surfaces were obtained in vacuum-annealed thin films.

Figure 5 represents the absorbance and transmission spectra (inset) following wavelengths between 300–1400 nm (i.e. visible, and infrared regions) of as-deposited, air, and vacuumed anneal CdS thin films at various temperatures. Figure 5 (insets) shows that transmittance gradually increases as the annealing temperature increases and a maximum transmittance of ~ 85% in the visible region for the process of heating and cooling air and removing all air particles so that it becomes pure and devoid of any contaminants in thin film at 400 °C. This gradual increase in the transmittance of these films was found with annealing temperature, which may be caused by the even and the same-like nature of the thin films that were deposited [44, 45] (as well supported by Fig. 3). It was observed from the absorbance spectra that all films exhibited strong absorbance in the visible region, which gradually decreased as the wavelength increased, reaching the lowest point in the infrared region (IR). This imperial behaviour suggests that all thin films could be used as buffer materials for solar cells due to their high transmittance in the visible spectrum. Furthermore, the absorbance decreased with increasing temperature, indicating the potential changes in the material structure and properties during heating and slow cooling. The absorbance (A) data were calculated from transmission (T) data using Beer–Lambert’s equation: A = 2 − log (T).

Fig. 5
figure 5

Transmission spectrum of CdS thin films a air and b vacuum annealed at different temperatures

Furthermore, the well-known Tauc formula αhν = ( − Eg)1/2, was used to calculate the band gap (Eg). Calculating the energy band gap involved by plotting the linear part of (αhν)2 vs curves to (αhν)2 = 0 as shown in Fig. 6a, b. The linear dependence of (αhν)2 as a function indication of the direct band-gap material. The Eg was calculated by extending the straight line towards the x-axis (i.e. the energy axis) giving the optical band-gap. The measured band gap of the CdS thin films before any treatment was roughly 2. 393 electron volts (eV). The obtained value matched well with the existing literature results [29]. After treatment with air and vacuum annealing, the CdS thin films exhibited band gaps ranging from 1.632 to 1.668 eV, respectively. This indicates that both vacuum-annealed and air-annealed films exhibit metallic behavior.

Fig. 6
figure 6

a and b Tauc plots variation of band-gap (Eg) of CdS thin films at different annealing temperatures

The change from a cubic to a hexagonal phase and a decrease in strain within the film may be the reason for the smaller band gap. Another option is that the CdS film’s size of the grains gets bigger due to the annealing process. The size of the grains affects the optical band gap because of the quantum confinement effects [32]. Overall grain size, strain, dislocation density, the crystalline phase transition from cubic to hexagonal, sulfur and cadmium evaporation that affects the film's stoichiometry, oxidation, and deterioration of the film are the factors and processes that influence the band gap.

Figure 7a, b reveals how temperature has an impact on the band gap (Eg), the crystallite size (D), and dislocation density (δ) of the CdS thin films for air and vacuum, respectively for 100–400 °C temperatures. The evaluated band gap energies (Eg) of CdS films decrease as the annealed temperature increases in comparison to the as-deposited thin films. The most feasible reason is the decomposition of hydroxides during annealing temperature caused a reduction in the band gap [42]. However, the comparative analysis of CdS film shows that band gap values for vacuum annealed film are slighter lower than air film. It has been found that the film's average crystallite size is increased due to temperature rise. The reason may be due to decreases in the dislocation density respectively with temperature resulting in an improved crystallinity level of the films [19]. However, some distinctions were observed on comparison in the crystallite size of air-annealed thin film and vacuum-annealed thin film at 200 °C and 400 °C, this may be due to the lattice strain effect resulting in changed d-spacing of the crystal but at the higher temperature, the reorganization of the thin films and crystallinity factor may pronounced more and showed variation in the crystallite size and hence affect the band gap [46].

Fig. 7
figure 7

a and b variation of band-gap (Eg), the crystallite size (D), and dislocation density (δ) of CdS thin films at different annealing temperatures

The electrical resistivity and conductivity of as-deposited, air, and vacuum-annealed CdS thin films are shown in Fig. 8a, b. The maximum value of resistivity of ~ 2.1 × 106 Ωcm was recorded for an as-deposited thin film of order same as reported [47]. Furthermore, the resistivity value was found to increase from ~ 0.00358 × 106 to 1.354 × 106 Ωcm and from 0.00796 × 106 to 0.606 × 106 with an increase in annealing temperature for air, and vacuum annealed CdS thin films, respectively. The increase in the resistivity of the films may be due to (1) slight changes in the concentration of Cd and S, and (2) the increase in the concentration of Si, Na, and Ca as trace elements confirmed by EDX (as shown in Figs. 3, 4). Therefore, overall there was optimized electrical resistivity and conductivity were recorded for air and vacuum-annealed CdS thin films (listed in Table 2).

Fig. 8
figure 8

Electrical resistivity and conductivity of CdS thin-films a air and b vacuum annealed at different temperatures

Conclusions

At various temperatures, the structure, surface morphology, optical, and electrical characteristics of air-annealed and vacuum-annealed CdS thin films were examined. The CdS thin films have a hexagonal crystal structure (with space group = P63mc) and are highly oriented along with plane (002) and average crystalline size lies in the range of 21.91–33.19 nm for air and vacuum-annealed thin films. In the visible region of the optical spectrum, the films exhibit high transmission and strong absorbance and absorbance decreases gradually from the visible to the infrared region. The band gap varies from 1.64 to 1.67 eV and 1.63 to 1.67 eV for air and vacuum-annealed CdS thin films. Optimized electrical resistivity and conductivity were observed in CdS thin films. Based on the above-presented results in this study, the good optical transmittance, low resistivity, and tunable band gap suggest the possibilities for photovoltaic cells.