Introduction

Zinc oxide (ZnO) falls under the category of semiconductor materials within the II-VI group. It stands out for having outstanding qualities like exceptional transmittance and a broad band gap of about 3.3 eV. It is a desirable material in optoelectronics due to its optical characteristics [1, 2]. Zinc oxide (ZnO) is used in a variety of applications including piezoelectric semiconductors, encompassing thin film transistors, light emitting diodes (LEDs), and solar cells [3]. ZnO has been widely used as a transparent buffer layer with high electrical resistance in numerous solar cells, such as CIGS, SnS, CdTe and CZTS [1,2,3]. The buffer layer prevents shunting, facilitates band alignment, and mitigates impurity diffusion in the area between the window layer and front contact [4]. However, according to recent research, adding Mg to ZnO can increase the band gap, which reduces the amount of light absorption [5, 6]. Mg-doped ZnO (MZO) is a promising material for the window layer in thin film solar cells. MZO has been proven to be an excellent buffer layer in CdSeTe and CdTe alloyed solar cells, exhibiting outstanding transparency. It also has the benefit of tuning the energy band gap configuration in accordance with the characteristics of the absorber material [7].

The creation of MgO because of adding Mg to the ZnO structure causes a rise in the conduction band level in the semiconductor by replacing Zn2+ ions with Mg2+ ions. This shift occurs as a result of the large band gap difference between MgO (7.8 eV) and ZnO (3.3 eV). Exploiting this modified compound, known as MZO, enhances the Jsc (short-circuit current density) and yields remarkable advancements in solar cell performance [8]. Moreover, the use of MZO, composed of non-toxic elements, presents an opportunity to replace the commonly used cadmium sulfide (CdS) window layer, leading to more sustainable and cost-effective production of solar cells [9]. The concentration of Mg influences the optical and structural properties of ZnO, resulting in varying band gap values ranging from 3.3 to 3.71 eV [10]. Additionally, a combination of the hexagonal phase of zinc oxide (ZnO) and the cubic phase of magnesium oxide (MgO) may be observed in the structure [11]. Various deposition techniques, including pulsed laser deposition, spin coating, sol–gel, and RF-sputtering have been employed to fabricate MZO films [12]. The sputtering technique is widely considered to be highly optimal for thin film production with excellent homogeneity, scalability, and reproducibility at an industrial scale. Previously, RF sputtered MZO films were prepared through three techniques: i) co-sputtering by utilizing ZnO and MgO targets [10], ii) synthesis of targets with different MgO/ZnO ratios [13], and iii) incorporation of Mg on a solitary target [14]. The initial approach involved employing a target composition with a MgO/ZnO ratio of 11%. This method has been successfully applied in CdTe solar cells, resulting in efficiencies surpassing 18% [15]. Conventionally, optimizing the thin film solar cell process entails modifying the characteristics of the films within the stack. Nevertheless, the conventional practice of fabricating targets with diverse Mg concentrations at elevated temperatures (around 1000 °C) proves to be rigid and demanding in terms of energy consumption [16]. The next method improved process control by adjusting the power applied to each magnetron, resulting in precise film composition [10]. However, this method is expensive as it requires two pieces of magnetrons, RF power sources, and targets. In the third method, Mg was to be used on the target in the form of foils or discs. Nevertheless, these methods were not originally developed with solar cell fabrication in mind, which demands meticulous control over composition, as well as the deposition of compact and uniform films, and the avoidance of target contamination.

For improving the electrical properties of MZO, doping with some other metal is a feasible way. Usually, doping materials substitute Zn2+ by providing extra free electrons, which increase the electrical conductivity. Different research groups have tried to dope MZO with different materials, for example, F [17], Al [18], In [19], Ga [20], etc. Open circuit voltage (VOC) of CdTe solar cells can be improved significantly by using doped MZO in that solar cell which can reduce the interface recombination. Researchers have proved that the use of doped MZO as a high-resistance transparent (HRT) layer has improved the device’s performance [21]. Nowadays, Al has taken a significant place as a dopant material for MZO due to its non-toxic nature, availability, and low cost [22, 23]. Moreover, because of the small ionic radius of highly reactive Al, MZO exhibits relatively improved quality as it is doped with Al [24, 25].

In this study, MZO thin film have been initially deposited via RF magnetron sputtering, with different substrate temperatures. This proposed method holds significant potential as a feasible solution for fabricating thin film solar cells that integrate MZO as HRT buffer layer. After studying the structural, optical, and electrical properties of the sputtered MZO films, it has been found that there is room for improving the structural and optoelectrical properties. Therefore, the effect of Al co-doping in the MZO film is studied elaborately. However, there is no significant study has been done yet, in which AMZO films were prepared by co-sputtering of AZO (DC sputtering) and MZO (RF sputtering). Significant changes in the properties of co-sputtered films open the pathway to the researcher for further improvement of the buffer layer in CdTe solar cells confirming the enhanced cell performance.

Experimental details

The borosilicate glass substrates (3 cm × 3 cm) and with a thickness of 1.1 mm, were immersed in a solution of methanol and acetone at 50 °C and subjected to ultrasonic treatment for 10 min. Then the sample was cleaned in deionized (DI) water for 15 min. Afterward, the glass substrates were dried using industrial nitrogen.

Initially, a compound sputtering target of MZO (10% of MgO and 90% of ZnO, 99.9% pure) was used and ~ 100 nm thick MZO films were grown by RF magnetron sputtering technique. For a fixed RF power of 50 W, Ar gas was flown at a rate of 4 sccm to sputter the films for 60 min whereas the deposition pressure was 15 mTorr. For different substrate temperatures (room temperature (RT), 150 °C, 250 °C, and 350 °C), MZO films were sputtered where deposition time was fixed. For Al co-doping, the AZO target (2% of Al2O3 and 98% of ZnO, 99.9% pure) used DC power during co-sputtering with the MZO target under previously used deposition parameters. During this co-sputtering, substrate temperature was kept as RT and DC power at the AZO target was varied from 20 to 50 W for depositing Al-doped MZO (AMZO) film with different doping concentrations. Other sputtering conditions were kept unchanged. The MZO and AMZO thin films were subjected to optical, structural, morphological, and electrical properties analysis. The thickness of the films was assessed using the Dektak 150 (Veeco) Surface Profiler. The surface morphology was assessed using a Carl Zeiss Merlin Field Emission Scanning Electron Microscopy (FESEM), while the samples’ composition was determined through analysis with an Energy Dispersive X-ray (EDX) detector. The optical properties were evaluated utilizing a Perkin Elmer Lambda 950 UV–Vis spectrophotometer, while the crystal structure was examined through BRUKER aXSD8 Advance Cu-Kα diffractometer X-ray diffraction (XRD). The Hall effect measurement device (ECOPIA HMS-3000) was used to investigate the electrical properties.

Results and discussion

Analysis of MZO thin films

The highest thickness was found for the film sputtered at RT (25 °C), reaching 128 nm. On the other hand, for the films sputtered at temperatures of 150 °C, 250 °C, and 350 °C, the thicknesses were measured to be 98 nm, 94 nm, and 86 nm, respectively, as shown in Table 1. The reduction in thickness as temperature increases may be explained by the shrinkage and densification of the thin films due to particle aggregation and grain coalescence [26]. Considering the thickness changes are in the nanoscale range, therefore, these are not significant. However, researchers have previously used this type of range for MZO thicknesses to achieve efficient solar cells [27]. Figure 1a illustrates a trend in which an increase in temperature corresponds to a decrease in thickness. XRD was used to examine the crystal structure of the MZO thin film. The XRD spectra show prominent diffraction peaks at 2θ = 34.42° that can be assigned to (002) planes (JCPDS card no. 01-077-9355) with a hexagonal wurtzite structure, as indicated in Fig. 1b. Researchers have found similar planes for MZO in the past [1, 28]. MZO thin films are known to exhibit preferred crystallographic orientations during growth. At lower deposition temperatures (RT), the films may have a more random orientation distribution, resulting in a higher intensity of the (002) peak. As the deposition temperature increases (250 °C, 350 °C), the films tend to exhibit a preferred orientation, such as (0 0 2) orientation. At higher temperatures, the crystallites tend to grow larger and may undergo a change in a preferred orientation, resulting in a decrease in the intensity of the (0 0 2) peak as shown in Fig. 1b. The higher deposition temperatures can lead to structural changes within the MZO thin films. At elevated temperatures, the mobility of atoms increases, promoting atomic rearrangement and grain growth. This grain growth can induce a rise in grain dimensions and a reduction in the count of grain boundaries, consequently leading to a decline in the intensity of the (0 0 2) peak [29]. Additionally, the growth of larger grains may introduce strain and defects, such as dislocations, the normal arrangement of atoms may be disrupted by these defects, which can cause a decrease in the peak intensity [30, 31].

Table 1 XRD parameter of MZO thin films
Figure 1
figure 1

a Thickness variation with temperature and b X-ray diffraction (XRD) profile of MZO thin films.

The XRD analysis software diffrac.eva was utilized to extract the Full Width at Half Maximum (FWHM) and crystallite size values. With these values, the dislocation density (δ) and microstrain (ε) were calculated using Eqs. (1) and (2) [32]:

$$\delta = \frac{1}{{D^{2} }}$$
(1)
$$\varepsilon = \frac{\beta }{4tan\theta }$$
(2)

where, D represents the crystallite size and β represents the full width at half maximum (FWHM). The variations of FWHM, crystallite size, dislocation density, and microstrain with the substrate temperature are shown in Fig. 2a and b. Table 1 provides the normalized full width half maximum (FWHM) values, peak positions of (002) diffractions, and calculated crystallite sizes. It can be observed that at 25 °C, the FWHM value is 0.715. However, at temperatures of 150 °C, 250 °C, and 350 °C, the FWHM values are 0.904, 0.536, and 0.534, respectively. This indicates that as the temperature increases, the FWHM values generally decrease except for 150 °C, where crystallite size is increased. According to Scherrer’s formula, the crystallite size is inversely proportional to the FWHM. Therefore, a smaller FWHM value, indicating a sharper peak, corresponds to a larger crystallite dimension. The application of Debye–Scherrer’s formula yielded an average crystalline size within the range of 83.2–141.8 nm. The crystallite size was determined to be 101.6 nm for at 25 °C and decreased to 83.2 nm when the temperature was raised to 150 °C. The decrease in crystallite size observed at a temperature of 150 °C could potentially be linked to alterations in the film’s structure [33]. The decrease in crystal size can be attributed to an increase in nucleation centres [34]. Where similar type of behaviour was also observed by Guermat et al. for finding the effect of annealing temperature on the doped ZnO [35]. Furthermore, as the microstrain increases, the reduction in crystal size causes a rise in the number of imperfections within the crystal lattice, like an increased density of dislocations [34] as shown in Table 1. Then the crystallite size increased to 136.3 nm and 141.8 nm when the temperature was raised to 250 °C, and 350 °C, respectively. This behaviour can be explained by the coalescence of the crystallite of the thin films as found by Guermat et al. [34, 36]. Several literatures have also reported this incremental trend in crystallinity improvement due to the increment of substrate temperature [37,38,39].

Figure 2
figure 2

a FWHM and crystallite grain size correlation and b microstrain and dislocation density variation with temperature.

Figure 2a shows that the average size of crystallite grains exhibits a changing pattern due to temperature fluctuations. At higher temperatures, the mobility of surface atoms increases, leading to an overall increase in the average size of crystallite grains. However, this trend is not consistent across all temperature ranges. Specifically, at a temperature of 150 °C, there is a decrease in the size of crystallite grains, while at other higher temperatures, the size tends to increase. Furthermore, the full width at half maximum (FWHM) grain size shows an inverse relationship with temperature. With increasing temperature, the FWHM grain size decreases, indicating a more refined grain structure. However, it is worth noting that at 150 °C, the FWHM grain size shows an increase, deviating from the overall trend observed at higher temperatures. Figure 2b shows the variations of the microstrain and dislocation density for different substrate temperatures. When the temperature was increased from 25 to 150 °C, microstrain and dislocation density were increased. After that, a noticeable decrease in both dislocation density and microstrain was found as the temperature increases from 250 to 350 °C. This may happen due to the reduction of disarray in the lattice structure and imperfections created in the crystalline structure. The observed decrease in dislocation density and microstrain, as evidenced by the lower number of lattice imperfections resulting in lower defects and, a reduction in grain boundaries may be another reason for these decrements [40]. Due to variations in the lattice parameters between the film and the substrate, MZO thin films may display lattice strain. The intensity of the (0 0 2) peak can be reduced at higher temperatures due to the lattice strain relaxing as a result of atom diffusion and rearrangement. It is significant to note that the specific behaviours shown in the (0 0 2) peak’s intensity may differ depending on the experimental setup, the thickness of the film, and the deposition methods used. To completely comprehend the observed changes in the (0 0 2) peak intensity, more diffraction studies and microscopy would be required for further examination and characterization of the MZO thin films.

The MZO film’s absorbance and transmittance spectra were analysed within the wavelength range of 250–800 nm. The transmittance spectra, depicted in Fig. 3a were obtained by utilizing the glass substrate as the reference, known to possess an optical transmittance of approximately 95%. Similar ranges of transmittance values were found in previous studies [41]. The optical transmittance in the visible region exhibited an increase correlating with the rising concentration of Mg2+. The optical transmittance does not exhibit significant changes with high temperatures within the given wavelength ranges. In the range of 300–500 nm, there is an increase in transmittance, but the change may not be substantial. Similarly, in the range of 500–600 nm, the transmittance remains relatively consistent despite the high temperature. However, in the range of 600–800 nm, there is a noticeable decrease in transmittance with increasing temperature. Overall, the changes in transmittance with high temperature are not significant. The absorbance spectra, shown in Fig. 3b determine the capacity of a material to absorb light. It has been noticed that the absorbance coefficient remains relatively consistent at high temperatures. However, upon closer examination, it becomes apparent that the absorbance at 25 °C is notably higher compared to the higher temperature of 350 °C. The absorption edge in the UV region indicates that the band gap of the film’s changes in accordance with the temperature. In Fig. 3c the band gap of MZO films was determined by using the Tauc plot technique where the calculated energy band gap equation was [42, 43]:

$$\left( {\alpha hv} \right) = A \left( {hv - E_{g} } \right)^{n}$$
(3)
$$\alpha = \left( {2.303A} \right)/d$$
(4)
Figure 3
figure 3

a Optical transmittance spectra, b absorbance spectra, c Band gap calculation, d Urbach energy calculation.

In this equation, A and d represent the absorbance and thickness of the film, respectively. α, h, ν, and Eg correspond to the absorption coefficient, Planck’s constant, frequency of radiation, and energy band gap, respectively. Energy band gaps were found in the range of 3.72—3.75 eV (Table 2). The energy band gap of MZO films that were deposited at room temperature was calculated to be Eg = 3.75 eV which is the highest Eg and 3.72 eV was the lowest band gap for temperature of 350 °C. The band gap demonstrates a reduction at varying substrate temperatures, potentially due to the incorporation of Mg atoms into the ZnO lattice, thereby promoting the growth of crystallites. All of the calculated band gap values are in good agreement with previous studies [28, 44]. The obtained highest band gap Eg = 3.75 eV is higher than the ZnO band gap [7]. This validates that the introduction of Mg in ZnO causes an increase in the optical band gap of the semiconductor. Figure 3d shows the related graphs to find the Urbach energy. When the absorption coefficient α is less than or equal to 104 cm−1, it is commonly observed that an Urbach tail exists, where α exhibits a dependence on the photon energy as follows [45]:

$${\text{ln}}\alpha = {\text{ ln}}\alpha_{0} + \, ({\text{h}}\nu /{\text{E}}_{{\text{u}}} )$$
(5)
Table 2 Band gap and Urbach energy for various deposition temperatures of MZO

The Urbach energy, denoted as Eu, is an energy parameter that characterizes the Urbach tail. It is typically lower than the energy associated with the optical band gap. To determine the Urbach energy (Eu), the expression of the curve is analysed and the reciprocal of the slope of the linear segment is calculated. The Urbach energy (Eu) is typically described as the broadness of the localized states’ tail within the band gap. Generally, Eu is inversely proportional to the band gap, The Eu value is measured 152 meV at 25 °C and increases to 174 meV at 150 °C. Furthermore, it reaches 162 meV and 193 meV at 250 °C and 350 °C, respectively. These types of Eu values were previously observed for MZO by several researchers who mentioned these values in different research articles [9, 46].

X-ray Photoelectron Spectroscopy (XPS) measurements were performed on the MZO films that were deposited at room temperature in order to analyze the valence states of oxygen (O), zinc (Zn), and magnesium (Mg). For this, an analysis was conducted on the survey scan data, which are shown in Fig. 4a. XPS peaks primarily initiate from zinc (Zn), oxygen (O), and carbon (C). The presence of carbon is typically attributed to surface contamination, a common occurrence in XPS measurements. Besides the Mg peak was also detected. In Fig. 4b, the XPS spectrum of the Zn 2p essential level reveals two distinct peaks. These peaks, located at binding energies of 1043 eV and 1020 eV, respectively, are attributed to the Zn 2p1/2 and Zn 2p3/2 states of tetrahedral Zn2+ ions [47, 48]. This confirms that the oxidation state of zinc is + 2 in the sputtered MZO. Figure 4c shows the spectrum of the 1 s orbital of oxygen, which has a mostly symmetric peak, that deconvoluted into two peaks in the same binding energy peak 530 eV indicating that the binding energy peak is assigned to lattice oxygen O2− from the ZnO [47, 49]. The Mg 2p XPS spectrum peak shown in Fig. 4d displayed an asymmetric peak, that deconvoluted on two peaks, a low binding energy peak of 48.34 eV and a high binding energy peak of 49.07 eV. Those values confirmed 49.07 eV and 48.34 eV for metal Mg on MZO thin film [50, 51].

Figure 4
figure 4

XPS spectra of MZO thin film. a Survey spectrum, b Zn 2p, c O 1s and, d Mg 2p.

The electrical characteristics of MZO thin films were assessed using the Hall Effect measurement system as shown in Fig. 5. A magnetic field strength of 0.57 T and a probe current of 45 nA were applied. To ensure conductivity, a silver conductive paste was coated on the four corners of each 1 cm × 1 cm sample. The carrier concentration at room temperature was measured to be 1.902 × 1014/cm3 and reached its peak at 3.095 × 1014/cm3 for a temperature of 350 °C. A low carrier concentration may be caused due to the variations in defect concentration and structural factors [52]. However, it subsequently decreased to a value of 1.597 × 1014/cm3 at 250 °C and increased to 2.596 × 1014/cm3 at 150 °C. Though the values of carrier concentration seem to be varied, the order of carrier concentration of all samples is 1014. It suggests that no significant changes are observable regarding the carrier concentration values in the samples. In contrast, the resistivity demonstrated a different trend. It decreased as the temperature rose to 350 °C, reaching a minimum value of 3.886 × 103 Ω cm. However, resistivity increased to 4.004 × 103 Ω cm and 4.053 × 103 Ω cm for room temperature and 250 °C, respectively and decreased to 3.897 × 103 Ω cm for the temperature of 150 °C. Regarding the mobility values of the MZO films, they decreased at both 150 °C and 350 °C, while showing an increase at room temperature and 250 °C. Figure 5 shows that changes in concentration and temperature have insignificant effects on the carrier concentration, mobility, and resistivity values. As the temperature increases, the resistivity exhibits a downward trend. The range of electrical mobility varies from 6.197 to 11.011 cm2/Vs as tabulated in Table 3. The highest value of mobility is observed at a temperature of 250 °C, while the lowest value is recorded at 350 °C. At room temperature, the mobility value is 8.794 cm2/Vs. As the temperature increased to 150 °C. The mobility value decreased to 6.246 cm2/Vs. Every value is in good agreement with earlier study [52]. Observing the electrical parameters, it can be concluded that electrical properties do not vary significantly on the growth temperature of the MZO films.

Figure 5
figure 5

Carrier concentration, resistivity, and mobility variation with temperature.

Table 3 Electrical parameters of MZO thin films

Effect of Al doping in MZO thin films

The XRD spectra of the AMZO films is shown in Fig. 6a. It has been confirmed that the deposited AMZO films show hexagonal wurtzite crystal structure as (002) plane is found at 2θ = 34.56° [JCPD card No: 01–077-9355 (ZnO)]. Similar findings about the Mg-doped AZO film’s preferred (002) wurtzite structure may be made if the film is deposited utilizing both the metallic MZO target and the AZO ceramic target[44, 53]. The highest intense peak has been found for the film that was deposited by 50 W DC power at the AZO target. XRD analysis software diffrac. eva was utilized to extract the Full Width at Half Maximum (FWHM) and crystallite size values from the XRD data. The correlation of FWHM and crystallite size with the DC power has been shown in Fig. 6b, from which crystallite size has been observed within a range of approximately 89.1–104.9 nm. An increase in deposition power resulted in the enhancement of crystallite size, with no noticeable impact on the peak position as the DC power increased. Conversely, the FWHM of AMZO thin films exhibited a decrease in value as the deposition power was increased. This reduction in FWHM values can be attributed to an improvement in crystalline size. According to Scherrer’s formula, the crystallite size is inversely proportional to the FWHM. Therefore, a smaller FWHM value, indicating a sharper peak, corresponds to a larger crystallite dimension. The variation of dislocation density and microstrain with the deposition power is shown in Fig. 6c. Microstrain and dislocation density were decreased when the deposition power was high. The microstrain was decreased due to increased crystallite size. The observed decrease in dislocation density and microstrain is evidenced by the lower number of lattice imperfections resulting in lower defects. Reduction in grain boundaries may be the reason for these decrements [33].

Figure 6
figure 6

a XRD pattern of AMZO thin films, b correlation between FWHM and crystallite size and c correlation between dislocation density and microstrain.

The FESEM images of the surface, cross-sections, and EDX of different AMZO thin films are represented in Fig. 7a–d. Notably, these thin films exhibit clear and distinct interfaces with the glass substrates, signifying the absence of interfacial reactions or the development of interfacial compounds. From Fig. 7, it can be observed that with the gradual increment of deposition power from 20 to 50 W, the average grain size of the AMZO thin film increased linearly from 38.30 to 68.25 nm. The thickness correspondingly raised to 75.92 nm, 129.50 nm, 140.70 nm, and 174.20 nm with the deposition powers of 20 W, 30 W, 40 W, and 50 W, respectively. However, the studies conducted on DC sputtering-deposited Al-doped zinc oxide (AZO) thin films have shown that increasing the DC power during the deposition process increased the plasma power resulting in the enhancement of the films’ grain size, crystallite size, and crystal quality [54]. In particular, there is an apparent shift in the resistivity, crystallinity, and grain size of the AZO thin films with increasing power [55]. Studies on ZnO thin films revealed that higher power produced films consisting of bigger grains and better crystalline quality with increased thickness [56, 57]. The thickness of the films increases with the increment of DC power because higher sputtering power confirms the higher rate of bombardment at the sputtering target resulting in the higher sputtering rate [45]. The element ratios of Zn, O, Al and, Mg are displayed in the AMZO thin film’s EDX spectrum. All of the films exhibit a zinc-rich composition, with relatively lower levels of Mg and Al content. As the power increases from 20 to 50 W, Zn increases from 51.1 to 66.0 wt %, whereas both Al and Mg content decrease gradually. The correlation between DC power and Zn deposition ratio may be explained by an increased probability of Zn and O2 reactions at higher power levels, which leads to a higher Zn deposition in the films [58]. Therefore, the reason behind the increase in the Zn deposition ratio with increased DC power for ZnO thin film is the effect of power on the deposition process, material composition, and reaction dynamics.

Figure 7
figure 7

Surface morphology, cross section and EDX analysis images for AMZO thin films deposited at a 20 W, b 30 W, c 40 W, d 50 W.

The absorbance spectra of the films, as depicted in Fig. 8a, clearly indicate that each absorption peak is situated in the UV region. This signifies that the materials exhibit strong UV light absorption. The absorption edges were detected in the range of 310 ~ 360 nm, displaying a redshift with an increment of sputtering power. From the absorbance spectra, it can be concluded that MZO and AMZO exhibit no significant changes in optical absorptivity in the visible range. In Fig. 8b, the transmittance spectra of sputtered MZO and AMZO films exhibit that the average transmittance for the visible region exceeds average 95% for all films, which is appropriate for using as buffer material in CdTe solar cells because buffer material having minimal parasitic absorption plays a vital role in enhancing efficiency of CdTe solar cell resulting in the higher number of photon absorption that increases the number of electron–hole pairs (EHPs) [44]. From deeper observation, it has been found that, in the ultraviolet (UV) region, ranging from 310 to 360 nm, a decrease in transmittance is observed after sequential co-doping, but in the visible region (400 ~ 800 nm), no significant change has been observed due to the doping process. The absorption coefficient α for all films was calculated by relating it to the absorbance (A) and thickness (d) of the films [59]. From Eq. (4), α serves as a crucial factor in determining various parameters of thin films, including optical energy bandgap, Urbach energy etc. all of which are essential for elucidating key characteristics of the films. Figure 8c, shows the variation in absorption coefficients for all films that follow the absorbance trend of the films. In Fig. 8d, the band gap of MZO films was determined by Eq. (3). The (αhν)2 versus photon energy (hν) plot, representing the optical band gap energy, exhibits variation in the range of 3.29–3.76 eV due to changes in elemental composition. Nevertheless, it is evident that the MZO thin film possesses a broader band gap energy in comparison to AMZO. The energy band gap of MZO films that were deposited at room temperature was calculated to be Eg = 3.75 eV. After co-doping, AMZO’s energy band gap was found in the range of 3.39–3.46 eV following a decremental trend with the increment of DC power at AZO target. Higher deposition power may increase the defect in the films for which the absorbance is increased which is represented by the reduced Eg. This reduction of Eg can also be attributed to the presence of strong quantum confinements. Typically, localized energy states are formed within the forbidden energy band gap region due to the defects related to compositional changes, structural issues, impurities, phase segregation, etc. The band gap energy dropped from 3.46 to 3.39 eV when the deposition power was increased from 20 to 50 W, respectively. This band gap energy drop may be explained by the dopants’ interaction with the ZnO lattice, which affects the band gap energy by changing the electrical structure. In addition, the inclusion of Al might result in the introduction of imperfections or impurities that affect the band structure and lower the material’s band gap energy [24]. This effect is caused by Al/Mg co-doping generating impurity states, resulting in a shift the conduction band to a lower energy area and decreases the band gap energy [60]. These dopants interact to change the material’s electrical structure, which improves its optical characteristics and lowers the band gap energy.

Figure 8
figure 8

a Optical absorbance spectra, b transmittance spectra, c absorption coefficient, d band gap calculation.

The Urbach energy (Eu) found from Eq. (5), is typically described as the broadness of the localized states’ tail within the band gap. Generally, Eu is inversely proportional to the band gap. The value is measured 152 meV at 25 °C and increases to 386 meV at AMZO 20 W. Furthermore, Eu is found 106 meV, 203 meV and 265 meV when deposition power was increased to 30 W, 40 W and 50 W respectively as shown in Fig. 9 and Table 4, as well. It shows a variation of Urbach energy as a function of the dopant concentration in the films. The value of Eu was found to be increased when Al co-doped with MZO occurs. This suggests that for further doping of Al has increased the overall dopant concentration resulting in the increment of structural disorders and the number of defects in the ZnO lattice sites [61, 62]. In addition, the rise in Urbach energy indicates that Al doping introduced localized states into the energy band gap [63].

Figure 9
figure 9

Urbach energy calculation for MZO and AMZO thin films.

Table 4 Band gap and Urbach energy for MZO and AMZO thin films

To analyse the effect of Al doping in MZO and to compare the valance state of elements between MZO and AMZO, XPS analysis was performed. Survey scan of AMZO thin film as shown in Fig. 10a indicating the presence of Zn, O, Al, Mg, and C elements. The presence of carbon is frequently associated with surface contamination, as seen in investigations using XPS. Furthermore, the Al and Mg peaks were determined. Figure 10b shows the XPS spectrum in the Zn 2p region of AMZO film. Double peaks Zn 2p1/2 and Zn 2p2/3 are found on Zn 2p spectra whose binding energies are 1042 eV and 1019 eV respectively, states of tetrahedral Zn2+ ions. The following statement confirms that the oxidation state of zinc in the sputtered AMZO is + 2. Figure 10c shows XPS spectra of O 1 s orbital of oxygen that deconvoluted two peaks: a low binding energy peak of 528.60 eV and a high binding energy peak of 529 eV, indicating that the binding energy peak is assigned to lattice oxygen O2− from the ZnO. Al 2p XPS spectra shown in Fig. 10d exhibited an asymmetric peak, that deconvoluted on two peaks, a low binding energy peak of 72.55 eV is related to AlO4 group and a high binding energy peak of 73.67 eV is related to AlO6 group [64,65,66]. Figure 10e shows XPS spectra of Mg 2p for AMZO thin film displayed an asymmetric peak, that deconvoluted on two peaks, a low binding energy peak of 47.60 eV and a high binding energy peak of 48.40 eV confirmed the presence of metal Mg in AMZO thin film.

Figure 10
figure 10

XPS spectra of AMZO thin film. a survey spectrum, b Zn 2p, c O 1s, d Al 2p and e Mg 2p.

By comparing the XPS spectrum of MZO and AMZO films, it has been found that Al doping in MZO shifted the binding energy of Zn 2p and O 1s from 1020 eV (MZO) to 1019 eV (AMZO) and from 530 eV (MZO) to 529 eV, respectively. This shifting may be due to the decrement of band gap energy after Al doping in MZO from 3.7 eV (MZO) to 3.3 eV (AMZO) due to the changes in the electrical configuration close to the Fermi level. The addition of an Al atom can add a new energy level within the band gap region of MZO films resulting in the decrement of band gap energy. Usually, the dopant atoms are responsible for altering the energy level, band alignment and, electronic structures in the ZnO lattice [67,68,69,70].

Figure 11 displays the variation of carrier concentration, mobility, and (20 W, 30 W, 40 W, 50 W) of AZO. The AMZO thin films exhibited superior electrical performance (carrier concentration: 3.72 × 1020/cm3, mobility: 0.206 (cm2)/Vs, resistivity: 9.98 × 10–1 Ω-cm) compared to the MZO thin films. In summary, it was observed that the carrier concentration increased from 1.9 × 1014 to 3.72 × 1020/cm3, while the resistivity decreased from 4 × 103 to 9.98 × 10–1 Ω-cm with the incorporation of Al into the MZO film. These changes in carrier concentration can be attributed to the replacement of Mg2+ ions with Group III elements, such as In3+, Al3+, and Ga3+ ions, as per previous findings, leading to the introduction of additional free electrons in the conduction band [71]. When comparing the XRD outcomes between MZO and AMZO, it becomes evident that the inclusion of Al in MZO substantially reduces the crystallite size, leading to poorer crystallinity in AMZO compared to MZO films. Consequently, the combination of poorer crystallinity and finer grain size in the deposited thin films leads to the entrapment of free electrons within the thin film, resulting in decreased electrical mobility due to electron scattering within the grain structure [46, 72].

Figure 11
figure 11

Carrier concentration, resistivity, and mobility variation for MZO and AMZO thin films.

To validate the viability of sputtered AMZO thin films, a rudimentary CdTe solar cell was fabricated to observe the impact of optimized AMZO parameters on solar cell performance by depositing C:Cu/Ag as the back contact on top of ITO/AMZO/CdS/CdTe stacks. Figure 12a illustrates the CdTe solar cells schematic and Fig. 12b depicts the J-V curve for complete solar cells of the ITO/AMZO/CdS/CdTe/C:Cu/Ag configuration. The efficiency of 1.87% (Voc = 0.442 V, Jsc = 17.62 mA/cm2 and Fill Factor = 0.24) was achieved for the samples grown with optimized AMZO thin film as an HRT layer where the CdTe thin film was deposited at source temperature of 625 °C and substrate temperature of 595 °C and subsequently annealed in CdCl2 treatment using 0.3 mol concentration at the annealing temperature of 400 °C for 15 min. The efficiency was low which might be due to the loss of Jsc, Voc along with FF and the lower photocurrent generation. The photocurrent loss might be owing to the electron–hole-pair (EHP) recombination. Severe recombination of EHPs will also deteriorate the Voc. In addition, the cell efficiency was low probably due to the poor back contact formation or/and poor junction quality which affects the solar cell performance parameters. However, all in all, it can be concluded that thorough optimization of process such as post-deposition annealing as well as subsequent layer deposition are necessary to achieve higher efficiency of this kind of device configuration.

Figure 12
figure 12

Preliminary CdTe thin film solar cell a schematic structure and, b measured J-V characteristic curve.

Conclusion

In this study, MZO thin films were deposited initially through RF magnetron sputtering technique by varying different substrate temperatures and their optical, electrical, and structural properties were analyzed thoroughly. XRD patterns revealed that the films exhibited a hexagonal wurtzite structure with (002) plane. The film’s band gap was measured approximately 3.7 eV, surpassing that of ZnO. Interestingly, the band gap value exhibited minimal changes in response to temperature variations. Besides, electrical properties were not found to be dependent on the substrate temperature. Keeping the substrate temperature fixed at RT, further improvement of the films’ properties was achieved by Al doping in MZO. The Al incorporation in MZO films as a co-dopant with Mg led to a notable enhancement in carrier concentration from approximately ~ 1014 cm−3 (MZO) to ~ 1020 cm−3. Simultaneously, the resistivity exhibited substantial decrease, from ~ 103 Ω-cm (MZO) to ~ 10–1 Ω-cm in AMZO films. Moreover, the transmittance was not decreased due to the Al doping in MZO. XPS analysis of MZO and AMZO films suggested the change of energy band gap. These significant alterations in electrical properties were achieved without providing any heat at substrate temperature during sputtering which ensures the lower cost for fabrication. This study paves the way for enhancing the properties of MZO buffer layer by Al doping through sputtering, which holds the potential to boost the overall performance of CdTe solar cells. To validate the feasibility of sputtered AMZO thin films, a preliminary CdTe solar cell was fabricated with an efficiency of 1.87%. In-depth optimization of fabrication processes is essential to attain higher efficiency.