1 Introduction

Cadmium sulfide (CdS) is one member of semiconductor materials that has a bandgap above 2.4 eV and can absorb photons in the visible range [1]. CdS is extensively applied as a window layer in CdTe photovoltaic applications [2]. Cadmium oxide (CdO) is n-type semiconductor material that has high optical transmittance in the visible and near-infrared ranges [3]. The optical bandgap of CdO films varied widely depending on the preparation procedures and the changes in carrier amount owing to native defects [4, 5]. Also the optical bandgap of CdS was affected by the kind of doping element and/or the method of preparation [6].

The function of oxygen in semiconductor sulfide compounds has been a focus of study for decades. The chemical hydrogen generation for catalyzed reduction of organic pollutants was obtained using highly active MoCu oxysulfide prepared by hydrothermal method [7]. The new 2D vanadium oxysulfide nano-spindles decorated carbon textile composite was applied as an advanced electrode for high-performance pseudocapacitors [8]. Sn(OxS2−x) displayed low absorption coefficient and larger bandgap as compared with SnS2 films [9]. Abdeta et al. fabricated a novel silver molybdenum oxysulfide (AgMoOS) bimetallic oxysulfide catalyst for highly efficiency catalytic reduction of organic dyes and chromium (VI) [10]. Abay et al. prepared a novel V-doped Bi2(O,S)3 oxysulfide catalyst for highly efficient catalytic reduction of 2-nitroaniline and organic dyes [11]. The advantage of the obtained ternary system such as ZnS1−xOx over binary compound parents is the possibility to control its lattice parameters, energy bandgaps, and other optical characteristics via changes the composition x [12]. The optical bandgap of zinc oxysulfide Zn(O,S) exhibited a bowing effect depended on the amount of S and O in the system [13]. This tuning in optical bandgap nominated the resulted material to apply as buffer layer for CIGS solar cell [13]. The copper indium gallium selenide (CIGS) solar cells with ZnMgO window using high rate deposited Zn(O,S) buffer layer with optimal [O]/([O] + [S]) ratio displayed an acceptable efficiency [14]. Furthermore, CdS is more favorable than ZnS due to the compatibility between lattice structures of CdS with CIGS and therefore constructs a favorable band alignment [15]. Ballipinar et al. found that Cd(S, O) film belongs to n-type semiconductor materials with high transparency in the visible range [16]. In addition, Cd(S, O) films represented an alternative to CdS buffer layer in the heterojunction solar cells which suffer from the shortcoming of poor stability and high sub-bandgap absorption [16]. CdS prepared by physical vapor deposition in the absence of oxygen undergoes extensive interdiffusion with CdTe during high temperature processing [17]. In contrary, the existence of oxygen in CdS has a dramatic impact on the interdiffusion process [17]. The higher level of oxygen used to prepare CdS by the chemical bath deposition (CBD) is thought to be responsible for producing higher efficiency than devices formed via close-spaced sublimation (CSS) or evaporation [18,19,20]. Furthermore, CdS nanowires or colloidal quantum dots exhibited nonlinear optical properties [21, 22].

Sulfur deficiency was used to upgrade optical characteristics of meta-chalcogenides [23]; sulfur-deficient nanocrystallite tungsten disulfide (WS2) thin films displayed large value in the nonlinear optical parameters [24]. By varying the Zn/S non-stoichiometric ratio, the optical bandgap could be tailored, and the photoluminescence spectrum changed dramatically [25].

There are different methods [26,27,28,29,30] to prepare nanomaterials and thin film samples, among them the sol–gel spin coating method which is simplest, inexpensive, large-area thin film deposition technique, minimal matter wastage, and no manoeuver of toxic gases [31].

In this work, sulfur deficiency was used to modify and improve the optical properties of spin-coated CdS film. The structural, optical, Raman spectroscopy, and photoluminescence data were analyzed to explore the effect of sulfur deficiency on the structural and optical characteristic of CdSx (x = 1.0, 0.8, 0.6, 0.4, and 0.2) films.

2 Methods and materials

CdSx thin films were prepared by the sol–gel spin coating method. 1 ml of cadmium acetate solution (1 M) and 1 ml of thiourea solution at a designated concentration (1, 0.8, 0.6, 0.6, 0.4, and 0.2 M) were stirred at 60 °C for 30 min to obtain a homogeneous solution. The pH (6) of the solutions was adjusted by adding 150 µl of acetic acid to the mixed solution. The glass substrates were cleaned using acetone and isopropanol for eliminating any dust or contaminants, and then rinsed with deionized water. Subsequently, the substrates were spin-coated by the precursor solutions at 3000 rpm for 30 s and consequently dried at 120 °C for 10 min. Afterward, they were annealed at 300 °C for 30 min in air.

The X-ray diffraction pattern of the films were obtained by A PANalytical X'Pert Pro MPD diffractometer equipped with copper source (40 kV, 30 mA) and grazing incidence x-ray diffraction (GIXRD) using Empyrean diffractometer with CuKα radiation (λ = 0.1540 nm), having the accelerating voltage of 45 kV and 30 mA. Optical measurements were performed at room temperature using JASCO 670 UV–Vis–NIR spectrophotometer ranging from 400 to 2500 nm. Raman scattering spectroscopy was performed on HORIBA JOBIN YVON Raman HG2S spectrometer, with 514.5 nm excitation wavelength of an Ar ion laser. Room temperature photoluminescence (PL) measurements were carried out using Lumina fluorescence spectrometer at excitation wavelength of 325 nm. X-ray photoelectron spectroscopy (XPS) measurement was achieved using a Thermo Scientific XPS (Model: KALPHA surface analysis) machine in the range of 0–1000 eV with Al Kα source and was calibrated using C 1s line.

The direct optical bandgaps (Eg) for different thin films were got by fitting the data to Tauc’s formula [32]:

$$\alpha hv = \beta \left( {hv - E_{{\text{g}}} } \right)^{0.5}$$
(1)

where is the incident photon energy, β is a constant that depends on the transition probability, and α is the absorption coefficient, \(\alpha (\lambda )= \frac{2.303 A(\lambda )}{t},\) where (t) is the film thickness ~ 325 nm.

The refractive index (n), extinction coefficient (k), real (εr) and imaginary (εi) dielectric constant parts, surface energy loss function (SELF), volume energy loss function (VELF), optical conductivity (σopt), linear optical susceptibility (χ(1)), nonlinear third order of the optical susceptibility (χ(3)), and nonlinear refractive index (n2) of different films were computed from [33]:

$$n = \frac{1 + R}{{1 - R}} + \sqrt {\frac{4R}{{\left( {R - 1} \right)^{2} }} - k^{2} }$$
(2)
$$k = \frac{\lambda \alpha }{{4\pi }}$$
(3)

The refractive index dispersion can be analyzed in terms of the single-effective oscillator model proposed by Wemple and DiDomenico (WDD model) [34, 35].

In this model, the relation between the refractive index (n) and the photon energy (hν) is defined as:

$$n^{2} \left( {h\nu } \right) = 1 + \frac{{E_{o} E_{{\text{d}}} }}{{E_{0}^{2} - \left( {h\nu } \right)^{2} }}$$
(4)

where Eo (single-oscillator energy) and Ed (average strength of interband optical transitions) are single-oscillator constants.

The long wavelength refractive index (n), average interband oscillator wavelength (λo), the average oscillator strength (So), the lattice dielectric constant (εl), and the ratio of carrier amount to the electron effective mass (e2/πc2)(N/m*) for each film can be obtained using the following relations [36]:

$$\frac{{n_{\infty }^{2} - 1}}{{n^{2} - 1}} = 1 - \left( {\frac{{\lambda_{0} }}{\lambda }} \right)^{2}$$
(5)

Or

$$\left( {n^{2} - 1} \right) = \frac{{S_{o} \lambda_{0}^{2} }}{{1 - \frac{{\lambda^{2} }}{{\lambda_{0}^{2} }}}}$$
(6)

where

$$S_{0} = \frac{{n_{\infty }^{2} - 1}}{{\lambda_{0}^{2} }}$$
(7)
$$n^{2} = \varepsilon _{L} - \left( {\frac{{e^{2} N}}{{4\pi ^{2} c^{2} m^{*} }}} \right){\lambda ^{2}}$$
(8)
$${\varepsilon }_{r}={n}^{2}-{k}^{2}$$
(9)
$${\varepsilon }_{i}=2nk$$
(10)
$$SELF=\frac{{\varepsilon }_{i}}{{({\varepsilon }_{r}+1)}^{2}+{\varepsilon }_{i}^{2}}$$
(11)
$$VELF=\frac{{\varepsilon }_{i}}{{\varepsilon }_{r}^{2}+{\varepsilon }_{i}^{2}}$$
(12)
$${\sigma }_{opt}=\frac{\alpha nC}{4\pi }$$
(13)
$${\chi }^{(1)}=\frac{1}{4\pi }\left({n}^{2}-1\right)$$
(14)
$$\chi^{\left( 3 \right)} = 1.7 * 10^{ - 10} \left( {\chi^{\left( 1 \right)} } \right)^{4} = 1.7 * 10^{ - 10} \left( {\frac{{n^{2} - 1}}{4\pi }} \right)^{4}$$
(15)
$${n}_{2}=\frac{12\pi }{n} {\chi }^{(3)}$$
(16)

where h, \(\upupsilon\), B, λ, and C are Planck's constant, frequency of the incident light, a constant known as the disorder parameter, wavelength, and the velocity of the light, respectively.

3 Results and discussion

3.1 Structural investigations

Applying θθ x-ray diffraction geometry, the obtained diffraction patterns (not shown) disclosed only diffuse scattering referring to amorphous phase for all CdSx films. So, we tried the grazing incidence geometry and the obtained diffraction patterns are depicted in Fig. 1a. The patterns also exhibited high diffuse scattering for all films but superimposed with very broad two peaks characterizing the cubic zincblende phase of the CdS. Applying Rietveld refinement [37] using MAUD software [38], Fig. 1b–d, the cell parameter (a) decreased from 5.9 to 5.75 Å with the deficiency parameter (x), which is attributed to the incorporation of O ions to compensate for S ions deficiency produced in the CdS lattice. Inclusion of O and the formation of CdO phase for sulfur deficiency x = 0.2, 0.4, and 0.6 are confirmed by Raman and XPS analysis. Replacing sulfur ions of radius (1.84 Å) by O ions (1.38 Å) resulted in reduction of the cell parameter. The obtained average crystallite size and the lattice microstrain are (3.4, 3.3 nm) and (0.038, 0.045) for CdS and CdS0.8, respectively. The crystallites resemble quantum dots and the microstrain became higher due to the high level of defects and lattice mismatch between the glass and film samples [39,40,41,42].

Fig. 1
figure 1

a XRD data and bd Rietveld refinement analysis for grazing incidence geometry for CdSx films

Raman spectroscopy was also employed to investigate the microstructure of the CdSx films. II–VI semiconductors are often to crystallize in the hexagonal wurtzite as well as the cubic zincblende structure [43,44,45]. The Raman vibration modes of either phase coincide very closely with the other; however, the number of obtained vibration modes would be enough for realizing the material properties. In present work, cubic CdS, there are two observable Raman active modes: the transverse optical (TO) and longitudinal optical (LO) modes. However, under normal conditions, very often the (TO) mode cannot be observed, and only the (LO) mode and its overtones are detected. In the normal Raman scattering configuration, the transverse optical (TO) modes in a crystalline semiconductor or insulator are not detectable due to the structure symmetry restrictions and low scattering intensity [46]. Figure 2 depicts the Raman spectra obtained for CdSx (x = 1.0, 0.8, 0.6, 0.4, and 0.2). In these spectra, the much-enhanced Raman scattering enabled detecting Raman TO modes, which are not observable in the normal scattering condition, the peak around 250 cm−1 is the cubic CdS TO mode [47,48,49]. The first-order 1LO and its second-order overtone of 2LO, characteristic of CdS [50,51,52], are dominant in the recorded spectra. The first-order 1LO Raman peak appeared around 300 cm−1 for all films except x = 0.2, where this peak disappeared. The second-order overtone of 2LO optical peak is observed for the films with x = 0.0, 0.8, and 0.6 with increasing intensity and a blue shift with the value of (x). The enhancement of 2LO relative to 1LO with increasing sulfur deficiency may arise from the intraband Frohlich mechanism [53]. For the films with x = 0.6, 0.4, and 0.2, Raman peaks appear around 850 and 1075 cm−1, characteristic of CdO [54,55,56,57]. These peaks manifest the incorporation of O ions into the CdS lattice to compensate the S ions deficiency. The CdO phase existed in the films as a minor phase dispersed in the main CdS phase. Raman spectroscopy is a short-range probe technique and can effectively identify minor phase in nanomaterials; therefore, Raman scattering is very sensitive in detecting minor phase than the XRD. [46]. Also, for the films with x = 0.6, 0.4, and 0.2, the CdS 2LO overlapped with Raman peaks resulting CdO formed from adsorbed oxygen. The splitting occurred for the peak at 600 cm−1 as well as the appearance of new peak at 900 cm−1 may be attributed to inclusion of O to compensate S deficiency, causing imperfection due to forming Cd–S and Cd–O bonds in the CdS lattice. Reducing the particles size to nanoscale as well as the presence of imperfections, impurity, and valence band mixing in the nanostructures leads to breakdown the selection rule of phonon momentum and permits phonons with l ≠ 0 to contribute to Raman scattering [58,59,60]. Accordingly, some new forbidden vibration modes may emerge [61].

Fig. 2
figure 2

Raman spectra for CdSx films

For further investigating the composition of the formed thin films, XPS measurements were performed for the sample with x = 0.6. The XPS survey spectrum is shown in Fig. 3a where only characteristic peaks of Cd, S, and O are observed beside the C signal coming from the adventitious CO2 [62]. The narrow scan of the core-level Cd 3d spectrum, given in Fig. 3a, comprising two obvious peaks located at 405.7 and 412.5 eV which are consistent with binding energies reported for the levels Cd 3d5/2 and Cd 3d3/2 [62,63,64]. Also, the biding energy difference is 6.8 eV corresponding to Cd2+ [64]. The Gaussian fitting of the S 2p core-level spectrum is given in Fig. 3c which contains two peaks centered at 162.2 and 163.5 eV, which is the characteristic of the S 2p3/2 and S 2p2/1 of S2−, respectively [63,64,65]. The peak centered at 169 eV corresponding to sulfur or S−O bond generally exists [62, 66] when one of the precursors is organic sulfide. The integrated intensity obtained from fitting the Cd 3d and S 2p spectra are then used to determine the atomic percent of Cd and S ions. The obtained intensities are divided by the photoionization cross-section for the core level of each element using the values reported in Yeh and Lindau [67]. The calculated S to Cd ratio is 0.58 which is very near to that intended experimentally (x = 0.6). Figure 3d depicts the O 1s core-level spectrum containing only a distinct peak at binding energy of 532.2 eV, which is the characteristic of O2− [68]. The atomic percent of oxygen calculated from the O-signal is high compared to the sulfur deficiency present which may be attributed to the absorbed CO2.

Fig. 3
figure 3

XPS spectra for CdS0.6 thin film, a survey spectrum, and bd narrow spectra for Cd 3p, S 2p and O1s, respectively

3.2 Optical properties

The optical absorbance and reflectance spectra for CdSx thin films at room temperature are displayed in Fig. 4. All films revealed a lower/higher absorbance at the higher/lower wavelength range, Fig. 4a. The absorbance of the CdS film was reduced slightly as the amount of sulfur reduced except film with 80% sulfur, it increased slightly. The variation in absorbance of CdSx films may relate to the presence of surface defects created upon reduction of the sulfur amount in CdSx films and the creation of CdO phase, Raman spectroscopy analysis part [69]. Furthermore, as noticed from the Fig. 4b, the reflectance spectra for CdS and CdS0.8 films exhibited a similar trend with enhancement in the reflectance values as the amount of sulfur reduced. This increase may be argued to the leakage of sulfur and absent of oxygen insertion instead of sulfur caused a shrinking of the bond length between Cd ions and the existence of sulfur ions; therefore, the reflectance increased. Upon reduction of more sulfur, the reflectance of the films changed totally due to the formation of CdO phase in addition to the CdS phase (Raman part). Moreover, all films at lower wavelength range are higher than that the reflectance at the higher wavelength range. In the lower and higher wavelength ranges, the reflectance of CdS0.8 film is higher than the other films except in the wavelength range of 400–600 nm, and the reflectance of all CdSx films is higher than that of CdS and CdS0.8 films. The reflectance of all films is between 1 and 10%. This enhancement in the reflectance of the films in the different wavelength ranges may be useful to use these films in photovoltaics applications [45].

Fig. 4
figure 4

a Absorbance and b reflectance spectra for CdSx films

Furthermore, CdS and CdO exhibited a direct bandgap transition; therefore, Cd(S,O) is considered also as a direct bandgap semiconductor material [16]. By plotting a relation between of (αhν)2 and (), Fig. 5a, and using Eq. 1, the optical bandgap (Eg) can be extracted by extrapolating the linear region of (αhν)2 to zero value. Figure 5b, reveals the variation of the optical bandgap with the sulfur deficiency. The Eg value of CdS is 2.49 eV which is higher than the value of the bulk CdS (2.42 eV) and is in agreement with the results obtained by other research groups [16]. For example, CdS prepared by conventional chemical bath deposited (CBD) has Eg = 2.42 eV and CdS prepared with the sol gel method has Eg = 2.48 eV [16, 70]. As the amount of sulfur changed in CdS1−x films, the Eg values changed, and it became larger (2.58, 2.56 eV)/smaller (2.47, 2.46 eV) than that of CdS as the amount of sulfur is (0.6 and 0.4)/ (0.8 and 0.2), respectively. The Eg value of Cd(S, O) fabricated by CBD became lowered than the Eg value of CdS prepared with the same method [16]. Previously, our group found that the Eg values of nano-CdS1−x (x = 0, 0.03, 0.05, 0.1) are less than the values of the parent compounds: CdS and CdO due to the presence of bowing effect in the formed system [32, 71]. Generally, for semiconducting materials, there are many competitive structural parameters that affect the bandgap, and they are correlated with each other: the crystallite size, lattice strain, and lattice constant. Eg is changing inversely with the crystallite size [72] and with the number of defects (lattice strain) [73, 74], but inversely with lattice constant [75]. Meanwhile, the lattice parameters decrease with increasing crystallite size while lattice strain decreases with increasing crystallite size [76, 77]. The reduction in Eg for the films x = 0.2 and 0.8 may be argued to the pronounced increase in the lattice microstrain (x-ray part). On the other hand, the increase in the Eg values of the films x = 0.6 and 0.4 as compared with CdS film may argue to Burstein Moss influence [78] or quantum confinement effect for its smaller particle size [79].

Fig. 5
figure 5

a Tauc relation and b optical band dependent on the amount of sulfur for CdSx films

The refractive index is an essential parameter for optical materials and their uses. Therefore, it is important to calculated optical constants of the films. The variations of k and n values with the wavelength are displayed in Fig. 6. As revealed from the Fig. 6a, the k value was reduced in the wavelength up to 500–600 nm depended on the amount of sulfur in the CdSx films, after that, it increased as the wavelength increased. The k value of CdS film prepared previously with sol–gel spin coating method was reduced as the wavelength increased [70]. The reduction/rising in the values of k as the wavelength varied illustrated the success/failure of moving electrons from valence and conduction bands [80]. Furthermore, the k values of the films with sulfur deficiency are less than that of CdS film except CdS0.8 film where the k value was slightly increased. The decreasing in the k value may be related to the decreasing in the absorption procedure as a result of the deficient of excess free carriers and vice versa [81].

Fig. 6
figure 6

a Extinction coefficient (k) and b refractive index (n) for CdSx films

Figure 6b displays the wavelength dependence of n values CdSx films. The n values for CdS and CdS0.8 films exhibited a similar trend, where they reduced in the lower and higher wavelength ranges as the wavelength increased (normal dispersion). On the other hand, in the wavelength between 500 and 900 nm, the n values increased with increasing in wavelength (anomalous dispersion). Other films exhibited a similar feature except they have anomalous dispersion in the wavelength between 370 and 480 nm. In the whole wavelength range, CdS0.8 has a highest n value than other films except in the wavelength range, λ = 430–540 nm, other defective CdSx (x = 0.6, 0.4, 0.2) films have higher n values. This variation in the n value upon sulfur deficiency may result from the changing in the polarizability of the film [82].

The values of Eo (single-oscillator energy) and Ed (average strength of interband optical transitions) of the different films (Table 1) can be obtained from the slope and intercept of the linear fitted of the relation between (n2 − 1)−1 and ()2 (Eq. 4, Fig. 7a). According to the table, both values of Eo and Ed were reduced as the amount of sulfur decreased in CdSx film and reached their lowest values in CdS0.6 film. The reduction in Ed value indicated the reduction in the interband optical transitions.

Table 1 The optical parameters of for CdSx films
Fig. 7
figure 7

Variation of a (n2 − 1)−1 vs. ()2, b (n2 − 1)−1 vs. λ−2, and c n2 vs. λ2 for CdSx films

The long wavelength refractive index (n), average interband oscillator wavelength (λo), the average oscillator strength (So), the lattice dielectric constant (εl), and

the ratio of carrier amount to the electron effective mass (e2/πc2)(N/m*) values can be obtained (Table 1) from the slope and intercept of the linear fitted of the relations between (n2 − 1)−1 vs. λ−2 and n2 vs λ2 and used the Eqs. (58), Fig. 7b, c. As listed in Table 1. The values of n, λo, So and (e2/πc2) (N/m*) changed irregularly dependent on the amount of sulfur in CdSx film. These variations in the optical characteristics may cause an optimization in various optical parameters of CdSx film to be appropriate for the application in the optical coatings, filters, switches, etc.

Figure 8 illustrates the changes in the real (εr) and imaginary (εi) parts of the dielectric constant and the surface and volume energy loss functions (SELF and VELF) for all CdSx films with the photon energy. As displayed in Fig. 8a, the εr increased as the photon energy increased. εi for CdS and CdS0.8 films have two peaks in the lower and intermediate photon energy ranges while other films have one peak at the intermediate photon energy range. CdS0.8 has a higher εr and εi values while other defective films have lower dielectric constant values as compared with CdS film. The lower dielectric values and hence the lower capacitance in CdSx (x = 0.6, 0.4, 0.2) films nominated them to apply in fast photo-detection applications [83]. The variations in εr and εi values upon changed the amount of sulfur in CdSx film may be related to the variation in the number of defects and/or CdO phase created in the films and altered the dipole motion, respectively [84]. In addition, the value of VELF is larger than the value of SELF in all CdSx films, Fig. 8c, d. The values of VELF and SELF depended on the amount of sulfur deficiency amount and the measuring photon energy range, where the VELF and SELF have maximum values in CdS0.6 film at 4 eV. Furthermore, the variation of optical conductivity (σopt) with the photon energy is shown in Fig. 9 for all films. As reveled from the graph, the σopt nearly unchanged as the photon energy increased up to 2.5 eV. Beyond this range, it increased with increasing in the photon energy and reached its maximum value at 4 eV after that it reduced and then increased again with further increasing in the photon energy of the incident wave. The sharp peak for σopt values at 4 eV is associated with the maximum absorbance of the samples at this energy range, inset of Fig. 4a.

Fig. 8
figure 8

a Real (εr), b imaginary (εi) parts of dielectric constant, c surface energy loss function (SELF), and d volume energy loss function (VELF) for CdSx films

Fig. 9
figure 9

Optical conductivity for CdSx films

The σopt value in the whole measuring range was enhanced as the amount of sulfur became 80%, with further sulfur deficiency in CdSx, the σopt reduced as compared with CdS. The improvement in the σopt value for CdS0.8 film may be related to amount of the defects produced inside the film facilitated the transferee of the electrons from valence band (VB) to conduction band (CB) and hence the optical conductivity was enhanced. Figure 10 displays the photoenergy dependent on the nonlinear optical parameters (NLO), χ(1), n2, and χ(3) for all CdSx films. As revealed from the figure, the three NLO parameters increased as the photon energy increased except CdS0.2; at higher photon energy range, the NLO decreased with increasing the photon energy. Furthermore, the NLO parameters were enhanced as the amount of sulfur became 80% in CdSx films, but with other sulfur deficiency ratio, the three parameters reduced as compared with CdS film. These variations in the NLO values with sulfur deficiency may argue to the variation in the production of serious free radical centers that strengthen/weaken the local polarization and consequently the NLO parameters [85]. The enhancement in NLO parameters for CdS0.8 film nominated it to be utilized in different nonlinear optical and photonic applications.

Fig. 10
figure 10

a Linear optical susceptibility (χ(1)), b nonlinear third order of the optical susceptibility (χ(3)), and c nonlinear refractive index (n2) for CdSx films

3.3 Photoluminescence data analysis

The photoluminescence (PL) spectra for the CdSx films with deficient sulfur are shown in Fig. 11. All spectra show broad emission plateau 2.26–2.75 eV comprising sub-peaks. Previous studies on CdS nanoparticles also revealed a broad emission in this range, which was assigned to the recombination of trapped charge carriers at surface states [50,51,52, 86,87,88]. When defects are present in the crystal structure, or at the crystal surface, the traps may form in these defects and the emission due to the recombination of trapped electrons and holes will be shifted to the higher wavelengths. When the excitation energy is above the bandgap energy, the direct recombination of the electrons and holes from the conduction and valence band is named as the band edge emission. Photoluminescence studies are carried out to get the information regarding different energy states available between valence and conduction bands, which are responsible for radiative recombination. Applying Gaussian fitting, the spectra could be decomposed to sub-peaks, Fig. 12a–e, with energies corresponding to green and blue colors. As listed in Table 2, all CdSx films emit four greens and one blue color except x = 0.4 that emits two blues colors. The surface defects in CdS could originate from either sulfur vacancies or interstitial and/or cadmium vacancies, depending on the availability of the cations or anions [51, 52]. In the present work, the molar ratio of Cd to S is higher than 1.0 which ruled out the possibility of Cd vacancies and S interstitial. Two surface states (2.18−2.43 and 1.97−2.12 eV) have been observed for CdS nanoparticles and attributed to shallow-trapped states from S2− vacancy defects [51]; accordingly, a proposed energy-level diagram is sketched in Fig. 12f. Upon exciting the sample with λ = 325 nm (3.81 eV), the photogenerated electrons of CdS NPs will be excited to the CB. The main portion of the photoexcited electrons are trapped by the S-surface states, which decay through transition to the valence band generating green colors [50,51,52, 86,87,88]. Part of the electrons at the CB bottom relax to the bottom of the CB on a time scale of < 100 fs [89] then decay through to the valence band afterward giving rise to the blue color, Table 2. Looking carefully at Fig. 11, one can notice the increase in PL intensity upon increasing the sulfur deficiency which is attributed to the increase in sulfur vacancies leading to the creation of more S-trapped states [50]. The PL intensity increases reaching maximum for x = 0.6 then decreases with further increase in S deficiency. This may be interpreted as a result of high oxygen diffusion into the CdS lattice and the formation of CdO phase.

Fig. 11
figure 11

PL spectra for CdSx films under 325 nm

Fig. 12
figure 12

af Gaussian fitting and g proposed energy-level diagram for CdSx films

Table 2 Decomposed PL sub-emission peaks for CdSx films under λexc = 325 nm (3.81 eV)

4 Conclusions

All CdSx films belong to the cubic zincblende phase of the CdS. The cell parameter decreased with increasing the deficiency parameter (x). The composition ratio of different element in the formed thin films was confirmed using XPS analysis. Raman analysis confirmed the presence of CdO phase together with CdS phase at high deficiency of sulfur. The absorbance of the CdS film was reduced slightly as the amount of sulfur reduced; except the film with 0.8 sulfur, the absorbance was increased slightly. The Eg values became larger (2.58, 2.56 eV)/smaller (2.47, 2.46 eV) than that of CdS as the amount of sulfur is (0.6 and 0.4)/ (0.8 and 0.2), respectively. The k values of the films with sulfur deficiency are less than that of CdS film except CdS0.8 film where the k value was slightly increased. The lower dielectric values and hence the lower capacitance in CdSx (x = 0.6, 0.4, 0.2) films nominated them to apply in fast photo-detection applications. The optical parameters of CdSx film varied as the amount of sulfur changed to be appropriate for the application in the optical coatings, filters, switches, etc. The σopt value in the whole measuring range was enhanced as the amount of sulfur became 80%; with further sulfur deficiency in CdSx, the σopt reduced as compared with CdS. The enhancement in NLO parameters for CdS0.8 film nominated it to be utilized in different nonlinear optical and photonic applications. All films emitted green and blue colors. The increase in PL intensity especially in the film with x = 0.6 may be benefit to apply in optoelectronic applications.