1 Introduction

Cadmium sulphide (CdS) with a wide and direct bandgap of 2.42 eV at room temperature belongs to the group II-VI chalcogenide semiconductors [1]. This inorganic compound has been widely used in many applications due to its suitable optoelectronic properties. Some of these applications include lasers [2], sensors [3], radiation detectors [4], photoresistors [5], and photovoltaics [6,7,8]. In its photovoltaic applications, the wide-bandgap n-CdS have been recognised as an appropriate window material and heterojunction partner with the lower bandgap absorber materials such as CdTe and CIGS [6, 9, 10]. Different growth techniques have been used to grow polycrystalline CdS thin-film. Some of these techniques are metal organic chemical vapour deposition (MOCVD) [11], vacuum evaporation, closed-space sublimation (CSS) [12], spray pyrolysis [13], chemical bath deposition (CBD) [14] and electrodeposition (ED) [15]. As compared to other growth techniques, the ED and CBD have attracted a lot of attention due to their simplicity, scalability, manufacturability, cost-effectiveness, ability to grow uniform and compact thin-films on rough substrates and no requirement for the complex instruments [16]. Generally, the chemical bath deposited CdS (CBD-CdS) layer has been grown from different precursors using alkaline and aqueous solution. The main four precursors for CBD-CdS comprise cadmium chloride (CdCl2), cadmium sulphate (CdSO4) [17], cadmium nitrate (Cd(NO3)2) [18], and cadmium acetate (Cd(CH3CO2)2) [19]. These precursors have been used as the source for providing Cd ions and most often thiourea (SC(NH2)2) has been commonly utilised as the source for supplying their sulphur ions. On the other hand, the growths of electrodeposited CdS (ED-CdS) thin-films have been carried out from acidic and aqueous solutions using two- and three-electrode systems [20, 21]. Also, these reports show that four different sulphur precursors have been most frequently used to grow ED-CdS thin-films. These precursors include sodium thiosulphate (Na2S2O3) [22], thioacetamide (C2H5NS) [23], ammonium thiosulphate (NH4)2S2O3 [24], and thiourea (TU) [20, 25]. In nearly all these precursors, CdCl2 has been utilised as the source for providing Cd ions. This paper, presents the growth of CdS thin-films using two different ED and CBD methods. In both growth methods, the same TU precursor were used as the source for providing sulphur ions and the results are presented, analysed and discussed in the following sections.

2 Experimental details

2.1 Preparation of both ED and CBD baths

In this work, all the substrates and chemicals were purchased from Sigma-Aldrich Ltd, UK. The electrolytic bath used for deposition of CdS thin-films were comprised the thiourea (SC(NH2)2) and cadmium chloride hydrate (CdCl2xH2O) both with the same purity of 99.995%. The aqueous solution was prepared by dissolving 0.3 M SC(NH2)2 and 0.2 M CdCl2xH2O in 800 ml de-ionised (DI) water contained in 1000 ml capacity polypropylene beaker. Thereafter, the polypropylene beaker was placed in 2000 ml pyrex glass beaker containing some DI water to achieve uniform heating of the aqueous solution using magnetic stirrer hot plate. The pH of the aqueous solution was set to a value of 2.70 ± 0.02 at room temperature using diluted HCl or NH4OH. The prepared solution was then electro-purified at 700 mV, the cathodic potential below the required potential for reduction of Cd2+, ions for ~ 100 h [25] in order to achieve higher levels of purity and homogeneity. During the deposition the temperature of the aqueous solution was maintained at 85 ± 2 °C.

The aqueous solution of CBD-CdS layers were prepared by dissolving of 4 × 10–3 M of cadmium acetate dihydrate (Cd(CH3CO2)2.2H2O), 20 × 10–3 M of SC(NH2)2 and 6 × 10–2 M ammonium acetate (NH4C2H3O2) in 100 ml of DI water contained in 200 ml of pyrex glass beaker. All the chemicals used for the deposition of CBD-CdS were reagent grade with purity of greater than 99.995%. Prior to CBD process, the NH4OH solution was used to set the pH value of the aqueous solution to 9.10 ± 0.02 at room temperature. Afterward, the glass beaker containing the aqueous solution was placed on the magnetic stirrer hot plate and the bath temperature was gradually increased to 80 ± 2 °C. For achieving uniform and homogeneous deposition of CBD-CdS layer, the aqueous solution was moderately and continuously stirred during the thin-film growth. Growth time was 20 min for the layers studied in this work.

2.2 Substrate preparation

The substrates used for both ED- and CBD-CdS were the fluorine-doped tin oxide coated glass (TEC-7 glass/FTO) with the sheet resistance of ~ 7 Ω/square. For ED-CdS, the glass/FTO substrates were cut into (2 × 3) cm2 dimensions and then cleaned thoroughly using ultrasonic bath containing detergent solution for 30 min to get rid of any contaminants and residual particles. To achieve better cleanliness, the glass/FTO substrates were cleaned again using methanol and acetone and subsequently rinsed with DI water. Finally, the glass/FTO substrates were dried under the stream of N2 gas and were immediately transferred into the electrolytic bath for the deposition of CdS thin-films. Subsequently, the CdS layers were grown potentiostatically on cleaned glass/FTO substrates using a computerised Gill AC potentiostat. In this study the ED-CdS thin-films were grown using two-electrode system. The two electrodes used were high-purity graphite rods, one electrode attached to the glass/FTO substrate serves as the cathode and the other one serves as the counter electrode (anode). The graphite rods was attached to the glass/FTO substrate using insulating polytetrafluoroethylene (PTFE) tape, the remaining exposed contact area of FTO/electrolyte, ~ (2 × 2) cm2, was left for the deposition of CdS layer.

Similar to ED-CdS thin-films, the same cleaning procedure was performed for CBD-CdS layer before the growth. During the deposition, the substrates were placed vertically in the aqueous solution using a holder. After the completion of the CBD process (~ 20 min), the samples with the deposited area of ~ (2 × 2) cm2 were removed from the bath. After deposition, both ED-CdS and CBD-CdS were rinsed with DI water and dried again under a stream of N2 gas. Prior to characterization, both ED-CdS and CBD-CdS samples were also cut into two (2 × 1) cm2 parts. The first part remained as-deposited (AD) and the second part was heat-treated (HT) at 400 °C for 20 min in the air.

2.3 Experimental techniques

The experimental techniques used in this paper comprise of all the material characterisation techniques including X-ray diffraction (XRD), thickness measurements, optical absorption measurements, scanning electron microscopy (SEM), and photoelectrochemical (PEC) cell measurements. In this article, all the measurements and material characterisation were carried out at room temperature (300 K).

The structural properties of ED-CdS and CBD-CdS thin-films comprising the identification of phases, preferred orientation, and crystallite size estimation were carried out using Philips PW 3710 X’pert diffractometer with Cu–K\(\alpha\) monochromator of the wavelength of 1.54 Å at a source tension and current of 40 kV and 40 mA, respectively. Thickness measurements were experimentally carried out using optical depth profilometer (UBM Microfocus), and theoretically estimated using Farady’s law of electrolysis as shown in Eq. (1) [26] for ED-CdS layer.

$$T = \frac{JMt}{{n\rho F}}$$
(1)

where, T is the thickness of the thin-film, J is the average deposition current density, M is the molar mass of the CdS (144.46 g/mol), t is the deposition time, n is the number of electrons transferred in the reaction for formation of 1 molecule of CdS (n = 2), ρ is the density of CdS (4.82 g/cm3) as reported in the literature [27], and F is the Faraday’s constant (96 485 C mol−1).

The optical properties of the CdS thin-films were studied between the wavelength ranges of (200–800) nm using Ultraviolet–Visible (UV–Vis) Cary 50 scan spectrophotometer. Prior to optical measurement a cleaned underlying glass/FTO substrate was scanned to exclude it from the result obtained for the glass/FTO/CdS substrate under investigation.

The morphological information of the ED-CdS and CBD-CdS layer surfaces was obtained using FEI Nova200 NanoSEM. The electron beam voltage was adjusted to 5 kV and the micrograph was taken at a magnification of × 60,000. The electrical conductivity type of the both ED-CdS and CBD-CdS layers were determined using PEC cell measurement technique. In this method, a semiconductor/liquid junction is formed by immersing a glass/FTO/CdS sample into 20 ml of DI water containing 0.1 M Na2S2O3. The voltage of semiconductor/liquid junction is measured under both dark (VD) and illuminated condition (VL) for 30 s. The difference in the magnitude of VL and VD, (VLVD), represent the PEC signal and the mathematical sign represent the conductivity type of the deposited thin-film. In this arrangement, the negative PEC signal indicates the n-type electrical conduction and positive PEC signal shows the p-type electrical conduction.

3 Results and discussion

Prior to electrodeposition of CdS, the approximate ranges of cathodic deposition potential were determined using cyclic voltammetry. The comprehensive study including the cyclic voltammetry, optimization of the cathodic deposition potential (797 mV), and heat treatment temperature (400 °C for 20 min in air) were predetermined as detailed in a previous work [25, 28] based on the structural, optical, morphological, and compositional characteristic properties of the ED-CdS layers. The overall electrochemical reactions at the cathode for the formation of ED-CdS thin-film from acidic and aqueous solution containing 0.3 M SC(NH2)2 and 0.2 M CdCl2xH2O is shown in Eqs. (2)–(6):

$${\text{Cd}}^{2 + } + 2e^{ - } \to {\text{Cd}}$$
(2)
$$2{\text{H}}^{ + } + 2e^{ - } \to {\text{H}}_{2}$$
(3)
$${\text{O}}_{2} + 2{\text{H}}_{2} {\text{O}} + 4e^{ - } \to 4{\text{OH}}^{ - }$$
(4)
$${\text{SC}}({\text{NH}}_{2} )_{2} \to {\text{H}}_{2} {\text{S}} + {\text{NH}}_{2} {\text{CN}}$$
(5)
$${\text{Cd}}^{2 + } + {\text{H}}_{2} {\text{S}} \to {\text{CdS}} \left( {\text{S}} \right) + 2{\text{H}}^{ + }$$
(6)

It should be noted that, in this work, no visible precipitations of elemental S or CdS particles were observed in the deposition electrolyte showing a stable bath using thiourea precursor during the growth.

The chemical reaction mechanism for the formation of CBD-CdS from alkaline and aqueous solution containing a combination of 4 × 10–3 M Cd(CH3CO2)2.2H2O, 20 × 10–3 M SC(NH2)2, 6 × 10–2 M (NH4C2H3O2), and NH4OH is shown in Eq. (7)–(11) [25, 29]:

$${\text{NH}}_{3} + {\text{H}}_{2} {\text{O}} \leftrightarrow {\text{NH}}_{4}^{ + } + {\text{OH}}^{ - }$$
(7)
$${\text{Cd}}^{2 + } + 4{\text{NH}}_{3} \leftrightarrow {\text{Cd}}({\text{NH}}_{3} )_{2} ^{2 + } \left( {\text{S}} \right)$$
(8)
$${\text{Cd}}^{2 + } + 2{\text{OH}}^{ - } \leftrightarrow {\text{CdOH}}_{2} \left( {\text{S}} \right)$$
(9)
$${\text{SC}}({\text{NH}}_{2} )_{2} + 2{\text{OH}}^{ - } \leftrightarrow {\text{S}}^{2 - } + 2{\text{H}}_{2} {\text{O}} + {\text{H}}_{2} {\text{CN}}_{2}$$
(10)
$${\text{Cd}}^{2 + } + {\text{S}}^{2 - } \leftrightarrow {\text{CdS }}\left( {\text{S}} \right)$$
(11)

NH4OH acts as complexing agent; thiourea delivers S2−, NH4C2H3O2/NH4OH acts as buffer. Generally, in the CBD-CdS process, two reaction mechanisms take place. The first mechanism is homogeneous reaction (cluster by cluster) and the second mechanism is heterogeneous reaction (ion by ion) [29, 30]. In the homogeneous reaction colloidal particles of CdS grows in the solution which precipitate in the bath and on the substrate. The results are powdery and non-adherent layers. In the heterogeneous reactions as shown in Eqs. (9)–(11), the CdS layers grow ion by ion on the substrates and the results are a well-crystallised and well-adherent CdS layers on the substrates. The unfavourable homogenous reactions may be suppressed by reduction of TU and cadmium acetate concentrations and increasing ammonium hydroxide and ammonium acetate concentrations at lower temperatures [29, 30].

3.1 Material characterisations

All the ED-CdS layers in this work were grown on glass/FTO substrate at optimised cathodic potential of 797 mV and heat treatment temperature of 400 °C for 20 min in air [25]. Also, all CBD-CdS layer were grown on glass/FTO substrate and the optimal deposition temperature, growth time, and post-deposition heat treatment for CBD-CdS thin-film were 80 ± 2 °C, 20 min, and 400 °C for 20 min in air, respectively [28].

3.1.1 X-ray diffraction analysis

Figure 1a and b illustrates the typical XRD patterns of the AD and HT ED-CdS layers and Fig. 1c and d shows the XRD pattern of the AD and HT CBD-CdS layers scanned between 2\(\theta\) angle of 10° and 70°. The ED-CdS and CBD-CdS layers were grown on glass/FTO substrates with the same thickness of ~ 200 nm. From observation, the ED-CdS layers were shown to be polycrystalline with only hexagonal (H) crystal structure under both the AD and HT conditions. Also, the CBD-CdS films were shown a polycrystalline nature, however, a mixture of two phases (cubic and hexagonal) was observed only in AD CBD-CdS layer. After heat treatment, only hexagonal phase of the CBD-layers remained and the cubic phase was completely vanished. The mixture of hexagonal and cubic phases have also been reported for the AD ED-CdS layers grown from different precursors such as Na2S2O3 [22], C2H5NS [23], and (NH4)2S2O3 [24]. In these reports the hexagonal phase were also shown to be much stable than those of cubic phase at higher temperature. Also, Zelaya-angel et al. [31] in their published work have shown that “In particular, the CdS semiconductor, which presents a highly stable hexagonal structure (α-CdS, can also be obtained in the metastable cubic phase, β-CdS”. In their report, different techniques including x-ray spectra, bandgap shift, and photoacoustic spectroscopy (PAS) techniques have been used for CBD-CdS characterization. Base on the evidences observed in their report they have shown that “the CdS semiconductor has a critical temperature around 300 °C at which a cubic to hexagonal-lattice transition occurs". This could be the reason for disappearance of cubic phase after heat treatment at 400 °C for 20 min in air as shown in this work.

Fig. 1
figure 1

XRD patterns for a AD, and b HT (400 °C for 20 min in air) ED-CdS thin-film grown at cathodic potential of 797 mV for 2 h duration, and c AD, and b HT (400 °C for 20 min in air) CBD-CdS thin-films. Note that, both ED- and CBD-CdS layers were grown on glass/FTO substrate with the thicknesses of \(\sim\) 200 nm

In XRD micrographs of AD and HT ED-CdS, four peaks were observed at 2θ values in the range (25.5–25.6)°, (26.5–26.7)°, (28.1–28.4)°, and (48.1–48.2)°. These peaks respectively represent the diffractions from the (100)H, (002)H, (101)H, and (103)H planes. Similar to ED-CdS layer, the first three peaks were also observed in the CBD-CdS film before and after heat treatment. However, the (103)H peak have only been seen in ED-CdS layers. Also, the appearance of the (103)H phase above 400 °C for CdS film grown by photochemical deposition and thermal annealing methods have been reported by Ichimura et al. [32] and Ramirez et al. [33], respectively. Also, Kaur et al. [34] has reported that “the structure of CBD CdS is determined by the deposition mechanism. When the CdS crystal lattice is constructed on the substrate with the ions migrating in the solution, the crystal structure is hexagonal. When the CdS particles are formed in the solution and then precipitate on the substrate, CdS is zinc blende cubic". Also, they have shown that "The as-deposited film is dominantly zinc blende cubic. The cubic phase remains dominant until the annealing temperature becomes higher than 400 °C. By the annealing at 450 °C, the XRD pattern turns to that of hexagonal phase". Moreover, in the AD CBD-CdS layer small peak was observed at 2θ angle of 43.9° which is related to the diffraction from (220)C plane which after heat treatment vanished. For both ED-CdS and CBD-CdS, the dominant (002)H peak at 2\(\theta\) angle of (26.5–26.7)° coincide with underlying glass/FTO peak. The underlying glass/FTO peaks in XRD micrograph are marked by asterisk (*).

The crystallite size, D, of both AD and HT ED-CdS and CBD-CdS was estimated using the Scherrer’s formula shown in Eq. (12), where λ is the x-ray wavelength (1.54 Å), β is the full width at half maximum (FWHM) of the diffraction intensity in radians, θ is the Bragg angle (See Tables 1 and 2 for the summary of the obtained XRD data).

$$D = \frac{0.94\lambda }{{\beta \cos \theta }}$$
(12)
Table 1 XRD analysis of as-deposited and heat-treated (400 °C for 20 min in air) ED-CdS layers
Table 2 XRD analysis of as-deposited and heat-treated (400 °C for 20 min in air) CBD-CdS layers

The estimated crystallite size of the AD ED-CdS and CBD-CdS was in the range ~ (11–38) nm and ~ (11–32) nm, respectively. This indicates that there was only a slight difference between the crystallite sizes of AD-CdS layers deposited by the two different ED and CBD growth methods. After heat treatment, the crystallite sizes of both ED-CdS and CBD-CdS were increased to the values in the range ~ (22–44) nm and ~ (22–53) nm, respectively. These results depict that the crystallite size values of CBD-CdS were slightly higher than those of ED-CdS after heat treatment. The increase in crystallite size and XRD peak intensity of the ED-CdS and CBD-CdS layers after heat treatment can be as a result of re-crystallisation and crystallite coalescence, reduction in stress/strain and improvement in the structural properties and crystallinity of CdS layers [35]. These results show that for the low temperature growth techniques such as ED and CBD, the post-deposition heat treatment is a crucial step to enhance the material quality of the CdS thin-films. It is worth noting that, the growth techniques and growth conditions can affect the crystallite sizes of the CdS thin-films. In ED and CBD growth technique, the crystallite and grain sizes can be influenced by different growth conditions including type of precursors, pH values, growth temperatures, post-growth heat treatment temperatures and pH [22,23,24]. As reported in the literature, the CdS grown by high temperature growth methods produce larger crystallites and grains as compared to those of low temperature growth methods including ED and CBD [36, 37].

3.1.2 Thickness measurement

Figure 2a shows the theoretical and experimental thicknesses of the ED-CdS layers as a function of growth time. The ED-CdS layers were grown on glass/FTO substrate for different durations between 2 and 6 h. The average current density during the growth for the ED-CdS layers was ~ 268 μAcm−2. The growth time (2 to 6 h) and average current density were used and were substituted in Eq. 1 and then theoretical thicknesses were estimated. Both theoretical and experimental values showed approximately linear increase in film thickness with growth time. Based on the observations, the theoretically estimated ED-CdS layer thicknesses were higher than those of experimentally measured thicknesses. This is due to loss of some electronic charges in the deposition electrolyte during the ED of CdS layers. The two solid lines in Fig. 2a show the extrapolation to the point of zero (t = 0). This simply means when no current passes through the deposition electrolyte, no deposition will take place. It should be noted that, in this study the experimental error in thicknesses measurement using optical depth profilometer (UBM Microfocus) was about ± 50 nm.

Fig. 2
figure 2

a Theoretical and experimental thickness variation against growth time for the as-deposited CdS layers grown at cathodic potential of 797 mV, and b Variation of as-deposited CBD-CdS thickness against dip number (#). Note that, each dip means the completion of chemical reaction for CBD-CdS within the period time of 20 min

Figure 2b shows the variation of CBD-CdS thickness as a function of dip number. The CBD-CdS also showed almost linear increase in thickness with increasing dipping numbers. In this report, it was experimentally observed that for each sample dipping into CBD bath, ~ 90 nm of CdS thin-film was deposited on glass/FTO substrate within 20 min (completion time of chemical reaction in CBD process).

3.1.3 Optical properties analysis

Figures 3a and b show the typical Tauc’s plot of AD and HT ED-CdS and CBD-CdS thin-films, respectively. The (αhν)2 was plotted against (hv) where α is the absorption coefficient, and hv is the energy of incident photons. The ED-CdS layers were grown on glass/FTO substrate for 2 h durations with the layer thickness of ~ 200 nm. Also, CBD-CdS were grown on the same substrate with the same thickness of ~ 200 nm. Afterward, the approximate direct bandgap values of the CdS layers were obtained by extrapolating the straight-line to the photon energy axis where the (αhν)2 = 0 and the results are tabulated in Table 3. According to the results, both AD ED-CdS and CBD-CdS layers, showed bandgap values of 2.54 and 2.48 eV, respectively. In the literature the reported bandgap values for the CdS thin-film with hexagonal and cubic crystal structures at room temperature are 2.57 and 2.40 eV, respectively [38]. The high bandgap value observed for the AD CBD-CdS can be due to the mixture of hexagonal and cubic phases. In addition, the higher bandgap value in AD ED-CdS as compared to those of AD CBD-CdS thin-films can be due to the S-richness and nano crystalline nature or presence of tiny pinholes and gaps in the ED-CdS layers [25]. Also, the quantum confinement effect can be another reason for the observation of higher bandgap values in the AD ED-CdS and AD CBD-CdS as compared to that of bulk CdS [39]. These pinholes or gaps in between CdS grains can provide easy path for UV–Vis light to pass through during optical absorption measurements which can cause the increase in energy bandgap. The formation of these tiny pinholes or gaps can be related to the nature of electrodeposition technique where the CdS layer tends to grow upward normal to the FTOsubstrate (see Fig. 4a and b). Before heat treatment, the absorption edges of the both CdS layers were not very sharp. However, after heat treatment at 400 °C for 20 min in air, the gradient of the optical absorption in both ED-CdS and CBD-CdS layers were increased and the bandgap values were reduced and shifted towards lower photon energy of 2.42 eV which coincide with that of bulk CdS (hexagonal phase) as reported in the literature [39]. The increase in the gradient of the optical absorption can be related to the recrystallization, grain growth, and reduction of the scattering centers in both ED-CdS and CBD-CdS layers.

Fig. 3
figure 3

Optical absorption spectra of a AD and HT ED-CdS layers, and b AD and HT CBD-CdS layers. Note that both ED-CdS and CBD-CdS layers were grown on glass/FTO substrate with the same thickness \(\sim\) 200 nm and both layers were heat-treated at 400 °C for 20 min in air

Table 3 Optical bandgap values of the AD and HT ED-CdS and CBD-CdS layers with the same thickness of \(\sim\) 200 nm. Note that both ED-CdS and CBD-CdS layers were heat-treated at 400 °C for 20 min in air
Fig. 4
figure 4

SEM micrographs of ED-CdS and CBD-CdS thin-films under both AD and HT conditions. Note that the thicknesses of both ED-CdS and CBD-CdS layers were \(\sim\) 200 nm and the heat treatment temperature was 400 °C for 20 min in air

3.1.4 Morphological properties analysis

A typical SEM micrographs of the ED-CdS and CBD-CdS under both AD and HT conditions are depicted in Fig. 4. The SEM micrographs of AD and HT ED-CdS layers (Fig. 4a and b, respectively) show that the FTO surface was fairly covered with CdS grains and the deposited film showed a good adhesion to the FTO surface. Also, some gaps were observed in between the ED-CdS grains. The occurrence of these gaps can be due to the upward growth nature of the electrodeposition technique and the substrate used. The FTO substrates are known to have rough and spiky surface. During electrodeposition, the electric fields at these spikes are higher than those of the valleys. In this case, nucleation starts at these spikes and tends to grow upwards perpendicular to the FTO surface. This will create columnar-like growth for the ED thin-films as seen in Fig. 4a and b. The columnar growth behaviour has some advantages and disadvantages. The disadvantages of columnar growth are pinholes formation and creation of non-uniformity and shunting path in the ED layers. The advantages of the columnar growth are the high crystallinity, high electrical conductivity and high mobility along the columnar shape grains [40]. The average grain sizes obtained from the SEM micrograph of AD ED-CdS thin-films were in the range (100 to 230) nm. After HT (400 °C for 20 min in air), slight increase in the average grain sizes of ED-CdS in the range (110 to 260) nm were observed.

Figure 4b and c, show the SEM micrographs of the AD and HT CBD-CdS thin-films, respectively. The SEM micrograph shows a compact and uniform coverage of the FTO surface with CBD-CdS grains without observing pinholes in between the grains. The CBD-CdS film also showed a good adhesion to the FTO surface. The average grain size values of the AD CBD-CdS layers were in the range (90 to 200) nm which was slightly lower than those of the AD ED-CdS layers. The uniform distribution of the grains in the CBD-CdS thin-films can be due to the nature of this growth technique unlike the electrodeposition technique where electric current is required to deposit the thin-films. In addition, in CBD-CdS growth technique, the deposition is taking place in an alkaline solutions with pH values in the range (9.0–13.7) [29, 41] whereas in electrodeposition of CdS thin-films are taking place in acidic solutions. These differences in growth conditions can affect the morphological properties of the ED-CdS and CBD-CdS layers [20, 25]. By looking at the surface morphology of Fig. 4c and d, no noticeable change in the grain sizes of the CBD-CdS were observed before and after heat treatment. It should be noted that the large grains observed in the SEM are consisting of cluster of crystallites observed using XRD measurements. High resolution SEM has shown that these large grains are the agglomerations of small crystallites [25].

3.1.5 Photoelectrochemical (PEC) cell measurement

Tables 4 and 5 depict the PEC signals of the ED-CdS and CBD-CdS under both the AD and HT conditions, respectively. The PEC cell measurement was used instead of Hall Effect measurement technique due to the lower resistive path of the underlying glass/FTO substrate [25, 42]. The ED-CdS thin-films were grown on glass/FTO substrates at different cathodic potential range from 792 to 802 mV for 2 h durations (see Table 4). The CBD-CdS layers were also grown on glass/FTO substrate with different Cd:S ratios of 5.0:1.0 to 1.0:5.0 as shown in Table 5. As observed in Tables 4 and 5, all the ED-CdS and CBD-CdS thin-films under both AD and HT conditions showed negative PEC signal which represents the n-type electrical conductivity. In both ED-CdS and CBD-CdS layers, the values of negative PEC signal increased after heat treatment as compared to those of AD layers. This shows that the materials quality and electrical properties of the CdS thin-films were improved upon heat treatment. This shows that the post-deposition treatment is an essential step to enhance the electronic properties of the CdS layer.

Table 4 Results of PEC measurements of the AD and HT ED-CdS
Table 5 Results of PEC measurements of the AD and HT CBD-CdS

The n-type conductivity nature of CdS layers is related to the presence of S vacancies and Cd interstitials in the crystal lattice of this material as reported in the literature [43]. The S vacancies and Cd interstitials are generally known as intrinsic donor defects. Because CdS layer always shows n-type electrical conductivity, therefore, it can be used for PEC cell calibrations prior to PEC cell measurement.

4 Assessment of the fabricated glass/FTO/n-CdS (ED)/ n-CdTe/Au and glass/FTO/n-CdS (CBD)/n-CdTe/Au solar cells under illuminated and dark conditions for comparison

This section presents the comparison of the device performance of glass/FTO/n-CdS (ED)/n-CdTe/Au and glass/FTO/n-CdS (CBD)/n-CdTe/Au solar cells. For this reason, ED-CdS and CBD-CdS layers with the same thickness of 90 nm were grown on glass/FTO substrates. Then, n-CdTe layers with the thickness of 1.5 µm were grown on the glass/FTO/n-CdS (ED) and glass/FTO/n-CdS (CBD) substrates using electrodepostion method. Afterward, CdTe layers were heat-treated with CdCl2 + CdF2 treatment at 450 °C for 12 min in air. The comprehensive details of the CdTe layer optimisation process including growth voltage and heat treatment conditions also predetermined in the previous works [28, 44]. The solar cell devices were made by deposition of 100 nm thick gold (Au) layers of 1 mm radius on the glass/FTO/n-CdS (ED)/n-CdTe and glass/FTO/n-CdS (CBD)/n-CdTe structure. The evaporation of metal back contact (Au) was carried out using Edward Auto 306 high vacuum (10–7 mbar) metallizer with an FTM7 film thickness monitor. The device parameters of the fabricated solar cells under both dark and illuminated conditions were extracted using fully automated Rera system. Prior to measurements, the Rera system was calibrated using a silicon-based reference solar cell with light intensity of 1000 Wm−2 (AM 1.5) at room temperature and results are shown in Table 6 and Fig. 5a–e.

Table 6 Summary of device results for glass/FTO/n-CdS(ED)/n-CdTe/Au and glass/FTO/n-CdS(CBD)/n-CdTe/Au solar cells for comparison of device performances
Fig.5
figure 5

The comparison of JV curves under illuminated condition for glass/FTO/n-CdS(ED)/n-CdTe/Au and glass/FTO/n-CdS(CBD)/n-CdTe/Au solar cells. All CdTe layers were heat-treated with CdCl2 + CdF2 at 450 °C for 12 min in air

For both fabricated glass/FTO/n-CdS(ED)/n-CdTe/Au and glass/FTO/n-CdS(CBD)/n-CdTe/Au solar cells, approximately close values of open circuit voltages (Voc) and short circuit current densities (Jsc) were observed. The main difference between the fabricated solar cells based on ED-CdS and CBD-CdS window layers was observed in their fill factors (FF). The FF and also overall efficiencies of the solar cells fabricated using CBD-CdS layers were higher than those solar cell fabricated using ED-CdS layers (See Table 6 and Fig. 5a–e). The lower FF observed for glass/FTO/n-CdS(ED)/n-CdTe/Au solar cells as compared to glass/FTO/n-CdS(CBD)/n-CdTe/Au devices can be due to presence of pinholes in the ED-CdS layers and nature of electrodeposition growth technique as previously shown in SEM microghraphs (Fig. 4). In electrodeposition growth method due to the presence of electric field during the growth the possibility of pinholes formation in the ED-CdS layers are higher than those of CBD growth technique. This is because both ED-CdS and ED-CdTe crystallites tends to grow upward normal to the glass/FTO substrate. The upward or columnar growth of the ED-CdS and ED-CdTe crystallites produces non-uniformity creating pinholes in the CdS layers whereas in CBD growth technique the CdS layers are more uniform, compact and smooth than those of ED-CdS layers due to absence of the electric filed during the growth. In general, the presence of pinholes in the CdS window layers create shunting paths and can drastically reduce the solar cell efficiency due to the short-circuiting of front and back contacts after metallization [16]. Once the pinholes due to columnar growth are covered, the ED-CdS is expected to be very similar to CBD-CdS in terms of device performance. The IV characteristics of a Schottky diode under dark condition can be expressed by Eqs. (13) [16]:

$$I_{{\text{D}}} = {\text{SA}}^{*} T^{2} \cdot \exp \left( {\frac{{ - e\phi_{{\text{b}}} }}{kT}} \right)\left[ {\exp \left( {\frac{ - eV}{{nkT}}} \right) - 1} \right]$$
(13)

where

$$I_{{\text{o }}} = {\text{SA}}^{*} T^{2} \cdot \exp \left( {\frac{{ - e\phi_{{\text{b}}} }}{kT}} \right)$$
(14)

In Eqs. (13) and (14), Io represents the reverse saturation current, S is the contact area (cm2), A* is the effective Richardson constant for thermionic emission (12 Acm−2 K−2 for n-CdTe), T is the temperature in Kelvin (300 K), e is the electronic charge (1.602 × 10–19 C), V is the applied voltage and k is the Boltzmann constant (1.3806 × 10–23 J K−1).

When the externally applied voltage is greater than ~ 75 mV (V ≥ 75 mV), the term \(\exp \left( {\frac{eV}{{nkT}}} \right)\) in Eq. (13) become much larger than unity, i.e. \(\exp \left( {\frac{eV}{{nkT}}} \right) \gg 1\) therefore, Eq. (13) can be simplified to the following form:

$$I_{{\text{D}}} = I_{{\text{o }}} \left[ {\exp \left( {\frac{ - eV}{{nkT}}} \right)} \right]$$
(15)

By taking the natural logarithm of Eq. (15), it can be rearranged as:

$$\ln I_{{\text{D}}} = \frac{eV}{{nkT}} + \ln I_{{\text{o }}}$$
(16)

Now, converting the Eq. (16) into base-ten logarithmic form, Eq. (16) can be re-written as:

$$Log_{10} I_{{\text{D}}} = \left( {\frac{e}{2.303nkT}} \right) \cdot V + Log_{10} I_{{\text{o}}}$$
(17)

The plot of Log10ID versus the applied voltage (V) across the device in Eq. (17) is useful to obtain a number of solar cell parameters including diode rectification factor (RF), ideality factor (n), reverse saturation current (Io) and barrier height (ϕb). Also, the series resistance (Rs) and shunt resistance (Rsh) can be evaluated from I-V curve under dark condition. The log-linear plot of Log10ID versus V is shown in Fig. 6.

Fig. 6
figure 6

Typical Log-linear IV characteristics of a diode measured under dark condition. For convenience, both forward current (IF) and reverse current (IR) are plotted in the same quadrant by changing the sign of the reverse voltages

The RF of the device can be obtained by dividing the forward current (IF) by reverse current (IR) at a given voltage (V = 1.0 V) as shown in Eq. (18):

$${\text{RF}} = \left( {\frac{{I_{{\text{F}}} }}{{I_{{\text{R}}} }}} \right)_{V = 1.0 V}$$

Also, in Fig. (6), by extrapolating straight-line portion in the plot of log10ID versus V, the gradient of the straight-line can be obtained. From the gradient, n value can be calculated as shown in Eq. (18):

$${\text{Gradient}} = \frac{e}{2.303 nkT}$$
(18)

The Linear–linear, Log-linear IV curves, and summary of solar cell parameters of glass/FTO/n-CdS(ED)/n-CdTe/Au and glass/FTO/n-CdS(CBD)/n-CdTe/Au solar cells under dark condition are shown in Fig. 7a–d, Tables 7 and 8.

Fig. 7
figure 7

The Linear–linear and Log-linear IV curves of a, b glass/FTO/n-CdS(ED)/n-CdTe/Au and c, d glass/FTO/n-CdS(CBD)/n-CdTe/Au solar cells under dark condition, respectively

Table 7 Summary of solar cell parameters of the glass/FTO/n-CdS(ED)/n-CdTe/Au obtained after measurement under dark condition
Table 8 Summary of solar cell parameters of the glass/FTO/n-CdS(CBD)/n-CdTe/Au obtained after measurement under dark condition

In this work, solar cells fabricated using ED-CdS and CBD-CdS showed high values of series resistance in the range (861–4562) Ω as shown in Tables 7 and 8. This can be one of the reasons for observing low efficiencies for both devices made using ED-CdS and CBD-CdS. On the other hand, most of the devices showed high values of Rsh in the range (0.1–5.0) MΩ respectively. It should be noted that for the high efficiency solar cells, the Rs should be as low as possible and Rsh should be as high as possible. The Rs is caused by the bulk resistance of the semiconductor material, the resistance of the electrical contacts and the interconnections. The main impact of the large Rs is to reduce the Voc, FF and the gradient of the log-linear curve at the high forward-bias region, hence, increasing the n value [16]. The Rsh is caused by the current leakage across the junction (recombination of the photo-generated charge carrier before separation due to the weak junction potential) and manufacturing defects. The low Rsh reduces the FF and also leaks off some current which in turn reduces the efficiency of the solar cells [16]. For an ideal diode, the Rs = ∞ and Rsh = ∞.

The measured dark Io values for the devices made by ED-CdS and CBD-CdS were in the range (0.25–1000) × 10−8A and (0.12–15.84) × 10–8 A, respectively (See Tables 7 and 8). For most cases, the Io values of device fabricated using CBD-CdS were lower than those solar cells fabricated using ED-CdS. This can be one of the reasons for observing higher efficiency values for devices fabricated using CBD-CdS. In the high efficiency solar cells the Io value is lower because of decreased recombination in the depletion region which indicates a healthy junction with reduced defects. The presence of the defects in the crystal lattice can increase the Io values because these defects act as trapping or recombination centers which reduce the life time of charge carriers [45]. Also, by looking at the results shown in Tables 7 and 8 it can be observed that for both fabricated glass/FTO/n-CdS(ED)/n-CdTe/Au and glass/FTO/n-CdS(CBD)/n-CdTe/Au solar cells, the lower n and Io values yield higher ϕb values whereas solar cells with the higher n and Io values showed lower ϕb values. From the ϕb presented in Tables 7 and 8, it can be seen that the Fermi level pin at different defect states of > 0.56 eV to > 0.79 eV below the conduction band minimum [16]. It should be noted that the observed barrier heights are underestimated due to large n values. The highest value of the ϕb (> 0.79 eV) was observed for devices fabricated using CBD-CdS as compared to ϕb (> 0.77 eV) of devices made using ED-CdS. The higher ϕb means higher Voc and higher efficiency for solar cells. The RF of both glass/FTO/n-CdS(ED)/n-CdTe/Au and glass/FTO/n-CdS(CBD)/n-CdTe/Au solar cells were in the range (100.7–103.5) and (101.2–102.9) as shown in Tables 7 and 8. Although, the efficiency values of glass/FTO/n-CdS(ED)/n-CdTe/Au solar cells were lower than those of glass/FTO/n-CdS(CBD)/n-CdTe/Au solar cells, the highest RF value of 103.5 was observed for solar cells fabricated using ED-CdS as the window layer. In high efficiency solar cells, a large RF is desirable, although for efficient solar cells, the RF of ~ 103 is sufficient [16].

5 Conclusions

In this work, the characteristic properties of CdS layers grown by two different growth techniques including electrodeposition and chemical bath deposition techniques were successfully explored and discussed. In both growth methods the same thiourea precursor was used as a source for providing sulphur ions. The structural, optical, morphological, and electronic properties of the ED-CdS and CBD-CdS were studied. All the AD and HT ED-CdS layers show a polycrystalline crystal structure with a preferred orientation along (002) hexagonal plane. All the AD CBD-CdS show a mixture of hexagonal and cubic phases with the preferred orientation along (002) plane while the cubic phase showed to be unstable and disappeared after heat treatment. In both growth methods, the improvement in crystallinity of CdS thin-films was observed after heat treatment. The estimated crystallite size for the AD and HT ED-CdS and CBD-CdS layers show the values in the range ~ (11–38) and ~ (22–54) nm, respectively. The crystallite sizes of the HT CBD-CdS layers showed to be slightly higher than those of HT ED-CdS films. The optical analysis depicted the higher bandgap value of 2.54 eV for the AD ED-CdS layers as compared to 2.48 eV of the AD CBD-CdS thin-films. After heat treatment the CdS grown by both ED and CBD methods were reduced to 2.42 eV which corresponds to the bulk bandgap of hexagonal phase CdS. The gradient of the absorption edge and \((\alpha hv\))2 of the CBD-CdS showed to be sharper and higher than those of ED-CdS under both the AD and HT conditions. The morphological analysis indicated the uniform and compact coverage of the FTO surface by the CdS grain and no pinhole were observed in the SEM micrograph of CBD-CdS while the ED-CdS layers show the columnar growth morphology with some tiny gaps or pinholes in between the grain. The electrical conduction type of both ED-CdS and CBD-CdS films showed to be n-type before and after heat treatment. In both deposition methods the magnitude of PEC signal were increased after heat treatment. The devices fabricated using CBD-CdS layers as window layer showed better FF and conversion efficiencies than those devices fabricated using ED-CdS layers due to compact morphology and uniform coverage of the FTO surface by the CBD-CdS layer. Based on device performance results, ED-CdS layers suffer from the presence of pinholes due to the columnar growth nature of the ED technique. Once pinhole is treated in ED-CdS layer, the device performance should be similar to those devices fabricated using CBD-CdS.