1 Introduction

In recent years, zinc oxide (ZnO) has been investigated as a low-cost replacement of GaN in optoelectronic devices and ITO in transparent electronic devices such as solar cell, LCD screens, etc. ZnO is an II–VI group wide band gap material having 3.37 eV and exciton binding energy of 60 meV at room temperature. This material is used as a transparent conductive oxide for solar cell applications. There has been a great deal of interest in ZnO due to its potential applications in gas sensors, optical waveguides, surface acoustic devices and piezoelectric transducers [1, 2]. The intrinsic ZnO thin films are n-type semiconductors with high resistivity. The structural, optical and electrical properties of ZnO thin films can be changed by substituting them with alkaline, transition and rare earth doping elements. Particularly, Mg doped ZnO thin films are used in many applications based on the enhancement of their optical property. In order to obtain wider band gap, Mg doping content in ZnO thin film needs to be higher, at the same time the structure of Mg doped ZnO thin films should retain wurtzite structure. Hence, different growth techniques are needed to synthesize Mg-doped ZnO thin films.

Presently, several techniques are employed to create ZnO films like RF magnetron sputtering, sol–gel spin coating method, ultrasonic spray pyrolysis, pulsed laser deposition, chemical bath deposition and chemical vapour deposition. Among them, the chemical deposition method is most sought for creating thin films. Moreover, it has easy control over thin film composition and a thin film with large area can be produced at a lower cost.

In the present study, different concentration of Mg doped ZnO films were prepared by applying chemical bath deposition method. X-ray diffraction pattern has been carried out to determine the crystalline nature, the phase and size of crystallites of the deposited films. Film composition with surface morphology has been analyzed by using an energy-dispersive X-ray (EDX) with SEM. Optical absorption and photoluminescence spectroscopic analyses have been carried out to determine the optical properties of the prepared films. The effects of dopant (Mg) concentration on structural, morphological, compositional and optical properties of the deposited films were investigated.

2 Experimental methods

2.1 Preparation of ZnO and ZnO:Mg thin films

Chemicals employed in this work are AR grade reagents (99.99% purity, purchased from Sigma Aldrich). Zinc chloride (ZnCl2), ammonia is employed as source materials and magnesium chloride dihydrate (MgCl2·2H2O) is treated as a doping agent for preparing ZnO and ZnO:Mg thin films. To begin with, commercially purchased corning glass substrates are immersed in a mixture of HCl and HNO3 in the ratio (1:2) for 10 min. They are taken away after 24 h and cleaned perfectly many times using ethanol before undertaking deposition. The properly decreased and cleaned substrate surface exhibits the advantage of producing highly adhesive and uniform film.

The deposition bath consists of 0.5 M ZnCl2. The pH of the final out was raised by the adding small quantities of base ammonia. The reaction mixture is kept in solution of pH at 8–8.5 by maintaining bath temperature at ~ 70 °C. The substrate is kept vertically in the middle of the reaction solution without touching the walls of the beaker. After the deposition period, the films were cleaned and drip-dried in the air. Post deposition annealing of the film removes water molecules by producing ZnO. The annealing temperature maintained for this study is about 500 °C.

Thereafter, different concentrations (0.03, 0.06 and 0.09 mol%) of Mg doped ZnO thin film forms bath aqueous solution zinc chloride and magnesium chloride. After that, the same procedure is followed for pure ZnO thin film.

2.2 Characterization techniques

X-ray diffraction pattern of the prepared samples has been recorded by employing a X’PERT PANanalytical, X-ray diffractometer with Cukα radiation with wavelength (λ = 1.5418 Å). Surface morphology and composition of the prepared thin film samples are recorded by applying energy dispersive analysis with X-rays set up attached to scanning electron microscope (INSPECT-F Model, 30 kV). Optical absorption and transmittance measurements were removed by using a UV–Vis spectrophotometer (Perkin Elmer, Lambda 25). A Photoluminescence spectroscopic measurement of the prepared thin film samples were taken out by using a Varian carry eclipse PL spectrograph.

3 Result and discussions

3.1 X-ray diffraction analysis

X-ray diffraction patterns of pure and Mg doped ZnO thin films confirmed that all the films were polycrystalline with hexagonal wurtzite structure. The observed patterns show a good agreement with JCPDS card No. 36-1451 [3]. The diffraction peaks related to (100), (002), (101), (102), (110), (103) and (112) crystal planes are noticed in all the films. All diffraction peaks in the patterns are of hexagonal wurtzite ZnO type. Three main peaks of (100), (002) and (101) planes are shown in Fig. 1. But, for all the films, (002) peaks are stronger than others which indicate that all the samples are oriented along the c-axis direction. There is no impurity phase observed in Mg and MgO. Hence, the Mg ion can successfully occupy the lattice site rather than interstitial positions.

Fig. 1
figure 1

X-ray diffraction patterns of (A) undoped ZnO, and different concentration of Mg [(B) 0.03, (C) 0.06 and (D) 0.09 mol%] doped ZnO thin films

When compared to the Mg doped ZnO thin films, (100) and (101) diffraction peaks show low intensity among (002) diffraction peaks. As the Mg doping concentration increases, the intensity of (002) peak increases showing the crystalline quality of the improved film. At this juncture, time dopant of Mg incorporation shifts the lower diffraction angle of the (002) peak towards the XRD data. The marginal shift of the peak position means that the Mg atoms are successfully brought into ZnO lattice sites of thin films. The ionic radius of Mg2+ (0.057 nm) is smaller than Zn2+ (0.060 nm).

The average crystal size, dislocation density and strain of the samples are calculated after appropriate background correction from X-ray line broadening of the diffraction peaks of (100), (002) and (101) planes using Debye Scherrer’s formula [4].

The crystallite size and the lattice strain values for all samples are presented in Table 1. It is evident that the average crystallite size enhanced to 40.65 from 22.36 nm for ZnO having 0.09 mol% of Mg doped ZnO. The enhanced crystallite size is due to the incorporation of magnesium atoms in ZnO lattice causing substitution of the Mg2+ ion with Zn2+ sites.

Table 1 Microstructural parameters of undoped and Mg doped ZnO thin films

Table 2 shows the lattice constants ‘a’ and ‘c’ of the wurtzite structure. The lattice constants can be calculated by using the relation,

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

With the first order approximation (n = 1) for the (100) plane. The lattice constant ‘a’ is obtained through the relation \({a={\lambda }/{\sqrt {\text{3}} {\text{sin}}\theta}}\) and the lattice constant ‘c’ can be derived for the plane (002) by applying the relation \({c={\lambda }/{{\text{sin}}\theta}}\).

Table 2 Structural parameters of undoped and mg doped ZnO thin films

The volume (V) of the unit cell for hexagonal system is calculated from the equation [5],

$$V=0.866 \times {a^2} \times c$$
(2)

The unit cell volume of ZnO increases due to the substitution of Mg dopant ions. This indicates that the addition of dopant ions into host lattice reside partially in tetrahedral Zn positions. It is observed that the incorporation of Mg ions creates significant changes in Zn–O bond length. The bond lengths are assessed by using the relation [5],

$$L=\sqrt {\left( {\frac{{{a^2}}}{3}+{{\left( {\frac{1}{2} - u} \right)}^2}{c^2}} \right)}$$
(3)

where ‘a’ and ‘c’ are the lattice parameters and ‘u’ is a positional parameter. The positional parameter ‘u’ can be calculated by the relation,

$$u=\frac{{{a^2}}}{{3{c^2}}}+0.25$$
(4)

A siginificant relation exists between c/a ratio and ‘u’. In this case, the c/a ratio exhibits a small variation for Mg doped ZnO thin films. The c/a and ‘u’ parameter values are shown in Table 2. There is an increase in bond length values with Mg doped ZnO thin films when Zn2+ ions are replaced in ZnO lattice [6].

3.2 Morphological analysis

Scanning electron microscopic studies were carried out so as to confirm the morphology of ZnO thin film. From Fig. 2a micrographs, it is observed that the undoped ZnO films are homogenous without cracks and they cover the substrate well. It is also observed that in Mg doped content, the enhanced spindle structure is packed tightly on the glass substrate in (Fig. 2b, c) that obviously shows the hexagonal pillars having holes on their top surface. With more increase of Mg content, the substrate is evenly coated and the over coated ions are grown over hexagonal pillar like structures of the films. It also shows the dependent to be clear nano pillars on the surface.

Fig. 2
figure 2

SEM micrographs of a ZnO, b 0.03 mol% of Mg, c 0.06 mol% of Mg and d 0.09 mol% of Mg doped ZnO thin films

3.3 Compositional analysis

EDX spectroscopy analysis is identified for Mg doped ZnO nanostructures as shown in Fig. 3a–d. EDX is used to obtain a composition of the Mg doped ZnO. The sssspectra reveal that the film is mainly composed of Zn and O with a small amount of Si in undoped ZnO thin films. The Mg doped ZnO content of Mg is clearly exhibited in EDX spectra. Figure 3b–d is the EDS spectrum of Mg doped ZnO which obtained the peaks of O, Mg and Zn. The presence of the percentage of atomic elements varied for different concentrations of Mg doped ZnO thin films. These results indicate the presence of Zn, O, Si and Mg altogether and confirm that the Mg atoms have successfully been incorporated into the ZnO. It also revealed that Mg atoms are uniformly distributed into ZnO [7].

Fig. 3
figure 3

EDS analysis of a ZnO, b 0.03 mol% of Mg, c 0.06 mol% of Mg and d 0.09 mol% of Mg doped ZnO thin films

3.4 UV–Vis analysis

Optical transmission spectra (Fig. 4) of the undoped ZnO thin films and different concentrations of Mg doped ZnO thin films were measured for the wavelength ranging from 300 to 800 nm. High transmittance values were observed in undoped ZnO. If the doping concentration increased, the transmittance percentage decreased due to foreign atoms getting substituted in doping elements. Also, the shift in transmittance towards lower wavelength with respect to undoped ZnO confirmed about the incorporation of Mg into ZnO lattice and the observed blue shift may be due to the smaller ionic radius of Mg2+ compared to Zn2+. The band gap of the films was calculated by using Tauc’s equation,

$$\alpha {\text{h}}\nu ={\text{ A }}{({\text{h}}\nu - {\text{ }}{{\text{E}}_{\text{g}}})^{\text{n}}}$$
(5)

where ‘ν’ is the absorption coefficient, hν is the photon energy, Eg is the optical band gap energy and ‘A’ is constant, where n = 1/2 for allowing transitions, n = 2 for allowing indirect transitions, n = 3/2 for forbidden direct transitions and n = 3 for forbidden indirect transitions. ZnO is known as direct band gap system and therefore the plot of (αhν)2 versus the photon energy (hν) is believed to display linear behavior in the higher energy region, which relates to the presence of a strong absorption near the absorption edge. Extrapolating the linear portion to zero absorption coefficient (α = 0) provides optical band gap energy of the films.

Fig. 4
figure 4

Transmission spectra and inset Tauc plot of a ZnO, b 0.03 mol% of Mg, c 0.06 mol% of Mg and d 0.09 mol% of Mg doped ZnO thin films

The Tauc plot of ZnO and their optical band gap Eg values are 3.27, 3.29, 3.30 and 3.33 eV for the film growth of ZnO, different concentration (0.00, 0.03, 0.06 and 0.09 mol%) of Mg doped ZnO thin films, respectively (see inset Fig. 4). When compared to pure ZnO thin films, the contributions made by Mg2+ ions on substitutional sites of Zn2+ ions and Mg interstitial atoms decide in widening the band gap and it is created by enhancing carrier concentration, which is believed to have Burstein–Moss effect due to doping by Mg into ZnO [8].

Further, the experimental data of transmittance and absorbance were analyzed to calculate the refractive index. The curves depicting the variation of reflectance with wavelength are presented in Fig. 5a for ZnO, different concentration of Mg doped ZnO thin films. From these spectra, it is observed that the reflectance in UV–Vis regions may be due to intrinsic absorbing properties of ZnO thin films [9, 10].

Fig. 5
figure 5

a Reflectance and b extinction coefficient of (A) ZnO, (B) 0.03 mol% of Mg, (C) 0.06 mol% of Mg and (D) 0.09 mol% of Mg doped ZnO thin films

The complex refractive index denoted by ‘n*’, with real parts ‘n’ and imaginary part ‘k’ is called as the extinction coefficient (see Fig. 5b) which are calculated by using the following relations [11].

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

where R is the reflectance of the thin film and λ is the wavelength of the incident beam. Figure 6a shows the change in refractive index ‘n’ of ZnO thin films with respect to Mg doped with different concentrations and it is also a function of the wavelength. Mg doped with ZnO thin films influence the crystalline nature and crystallite size of the prepared thin films. The refractive index is found to increase in the visible region of ZnO thin films.

Fig. 6
figure 6

a Refractive index and b optical conductivity of (A) ZnO, (B) 0.03 mol% of Mg, (C) 0.06 mol% of Mg and (D) 0.09 mol% of Mg doped ZnO thin films

The optical conductivity (σ) describes the enhanced response as a function of photon energy (hν) as shown in Fig. 6b. The optical conductivity is determined by using the relation,

$$\sigma =\frac{{\alpha nc}}{{4\pi }}$$
(8)

where α is the absorption coefficient, n is the refractive index and c is the speed of light. Figure 6b shows the increased optical conductivity with increase in photon energy which may be due to the excitation of electrons by the photon energy. It is shown that the optical conductivity of the material directly depends on the absorption coefficient. The similar observation result is reported for different materials [12, 13].

The complex dielectric constant of the thin film is related to the optical transition and excitation of the phonons in the material. Complex dielectric constant can be calculated by using the relation [14],

$$\varepsilon ={\varepsilon _r}+{\varepsilon _i}={(n+ik)^2}$$
(9)

where εr and εi are the real and imaginary parts of the dielectric constants respectively and are given by

$${\varepsilon _r}={n^2} - {k^2}$$
(10)

and

$${\varepsilon _i}=2nk$$
(11)

The real part of dielectric constant is related to the property of slowing down the speed of light in the material, and the imaginary part accounts to the absorption of energy from the electric field due to dipole motion. It is observed from Fig. 7 that the imaginary part of the dielectric constant showed the same behavior as that of the real part and the only difference is that their values seem to be very less compared to the real dielectric constant values. The real and imaginary parts of dielectric constant produced enhanced optical response.

Fig. 7
figure 7

a Real and b imaginary part of dielectric constant of (A) ZnO, (B) 0.03 mol% of Mg, (C) 0.06 mol% of Mg and (D) 0.09 mol% of Mg doped ZnO thin films

3.5 Photoluminesence analysis

All PL spectra consists of three emission bands located in UV and visible regions as shown in Fig. 8. The emission spectrum of pure and Mg doped ZnO thin films apply the excitation wavelength of 325 nm. The near-band-edge UV emission at 380 nm correspond to band gap energy or near-band emission (NBE) of ZnO. The defects pertaining to deep-level emissions like zinc vacancies, oxygen vacancies, intestrial zinc and industrial oxygen result in the presence of broad band emissions in the visible range (400–500 nm) [15].

Fig. 8
figure 8

Photoluminesence spectrum of (A) ZnO, (B) 0.03 mol% of Mg, (C) 0.06 mol% of Mg and (D) 0.09 mol% of Mg doped ZnO thin films

A marginal shift of NBE having Mg doped ZnO is seen in Fig. 8b–d. It is possible to alter this NBE by slowly varying the thin optical fiber band gap. Yet an enhancement in the intensity ratio of all emissions is obtained by increasing the doping elements of Mg concentrations.

When Mg enters the ZnO lattice, it introduces lattice distortions. Since Mg has smaller Bohr radius than Zn, its band gap broadens. The conduction band edge is filled with excessive carriers provided by impurities which contribute to an increase in electrical conductivity of ZnO leading to a blue-shift of optical band-to-band transition known as the Burstein–Moss effect. The blue emission peaks found at 419 and 478 nm are attributed to transition from Zi to Oi [16]. The increase in the intensity of UV emission is attributed to improved crystal quality and a decrease in the stress of ZnO due to Mg doping.

3.6 Raman analysis

Raman studies give valuable information about vibration modes and the phase structures of ZnO thin films. ZnO maintains a wurtzite structure and comes from the C4 6V space group with two formula units per primitive cell. Eight sets of optical phonon modes at the Γ-point of the Brillouin zone are termed as Raman active mode (A1 + E1 + 2E2), Raman silent mode (2B1) and Raman inactive mode (A1 + E1) [17].

Raman spectra of undoped and Mg doped ZnO thin films are shown in Fig. 9. From the samples, the peak at about 437 cm−1 is assigned to the E2 High mode to represent the band characteristic of the hexagonal wurtzite ZnO [18]. The prominent peak spectra are dominated by the 1LO band which is located at about 1127 cm−1. This 1LO peak intensity increased by increasing the Mg doping concentration. The Raman spectra depend on the quality of the deposited ZnO thin films. It is an indication of the better crystalline quality of the Mg doped ZnO thin films. Hence, the defect density and the lattice stress are very thin for higher concentrations of Mg doped ZnO thin film [19]. This result is better in comparison with XRD [20].

Fig. 9
figure 9

Micro-Raman analysis of (A) ZnO, (B) 0.03 mol% of Mg, (C) 0.06 mol% of Mg and (D) 0.09 mol% of Mg doped ZnO thin films

4 Conclusion

Undoped and Mg doped ZnO thin films are deposited on a glass substrate through chemical bath deposition method. All deposited films displayed wurtzite structure without any Mg related secondary phases. XRD, EDS, UV–Vis, PL and miro-Raman characterizations indicated that Mg was successfully substituted into the lattice of ZnO structures. The films were crystallized in the hexagonal wurtzite phase and it presented a preferential (002) orientation with Mg2+ ion replaced by a Zn2+ ion of ZnO host matrix. The transmittance of the thin films were over 90% in the visible region. The optical band gap increased from 3.27 to 3.33 eV due to the increase in Mg concentration. The band gap values were systematically increased with respect to Burstein–Moss shift which explained the average crystalline size, internal stress and free electron concentration. The optical constants of refractive index (n), extinction coefficient (k) values are found to be decreased for Mg doped ZnO than undoped ZnO. PL spectra were examined at room temperature. All PL spectra display sharp emission in the UV range and detectable visible abroad emission peaks in the visible region. The band edge emission moves to the blue with an increase in the amount of Mg doping there by reflecting the change in excitons energy seen in the absorption spectra. The defect band is due to deep traps and it becomes predominant at higher levels of doping.