Introduction

Intrinsic and doped ZnO are intensively researched materials that are relevant for a wide range of applications, including optical coatings, optoelectronic devices [1] (such as touch screens and light-emitting diodes) and thin film photovoltaics [2] (TFPVs). In particular, magnesium-doped zinc oxide (Zn1−xMg x O), a wide band gap, n-type semiconductor material, is interesting because of its tunable band gap depending on the amount of incorporated Mg [3]. This property is for example attractive for the application as buffer layer in solar cells, as it can be employed to optimize energy band offsets with various absorber materials [4]. Zn1−xMg x O films with different Mg contents leading to cubic and hexagonal structures and largely different band gaps have been applied as gate insulator and channel in TFT devices [5]. Other applications include stimulated emission devices [6] and UV photodetectors [7]. Besides its remarkable properties, Zn1−xMg x O is a “green” material, as it consists of low-cost, earth-abundant and non-toxic elements.

So far, Zn1−xMg x O films are mainly deposited by vacuum techniques, such as molecular beam epitaxy (MBE) [8, 9], pulsed laser deposition (PLD) [3, 10], atomic layer deposition (ALD) [11, 12] or sputtering [13, 14]. In order to decrease capital investment and maintenance costs for deposition equipment, solution-based techniques can be highly advantageous. Among them, chemical bath deposition (CBD) has been successfully implemented in the deposition of high-quality ZnO films for various applications. In CBD, a solid substrate is immersed in a heated solution containing precursor metal salts and other additives. A thin film is deposited on a substrate through a controlled chemical reaction. Metal oxides can be deposited by this method from aqueous solutions, which are typically alkaline and contain a base (as a source of hydroxide), a metal ion and a complexing agent to control the hydrolysis of the metal ion. Besides that, crystal morphology-controlling agents are needed to design specific film morphologies [15]. Important solution properties are the pH and the concentrations of the metal salts, as well as the additives. The most significant process parameters are temperature, deposition time and stirring rate.

The available literature on chemical bath-deposited Zn1−xMg x O films is limited to a few publications [1619]. They either report a low incorporation of Mg [16, 18] or do not quantitatively analyse the amount of Mg in the deposited films [17]. Besides that, possible mechanisms determining the chemical bath deposition of Mg-doped ZnO have never been explained. Additionally, each study uses a different solution chemistry. By using triethanolamine and hydrochloric acid for the deposition of Zn1−xMg x O films, an incorporated amount of 30 mol% Mg was claimed by Chawla et al. [17]. However, this was not confirmed by a composition analysis. Flower-shaped Zn1−xMg x O with incorporated Mg content of 1.5 mol% was deposited by Ravi et al. [16] using a chemistry of sodium hydroxide and ammonia. Polet et al. [18] deposited aligned Mg-doped ZnO nanorods using hexamethylenetetramine as hydroxide source, but the amount of Mg in the film was limited to 0.85 mol%. In the paper of Maekawa et al. [19], a novel method for the chemical bath deposition of Zn1−xMg x O films via a mixed gel of Zn(OH)2 and Mg(OH)2 with a subsequent annealing step at 500 °C was proposed. Despite the claimed high amounts of Mg in the film (as high as 48 mol% Mg), XRD spectra do not show peak shifts due to the substitutional incorporation of the smaller Mg atom in the lattice.

This paper provides for the first time a fundamental investigation of the chemical bath deposition of Zn1−xMg x O films. The growth properties, such as the growth rate, film orientation, surface morphology and dopant incorporation, are discussed with respect to the solution chemistry and evaluated from the experimental data and speciation modelling, introducing the crucial role of face-selective adsorption of various Mg and citrate species on the growth behaviour. Limitations of the Mg incorporation in the films are also addressed and compared to Zn1−xMg x O films deposited by other techniques. Finally, the paper discusses the optical properties of the films, demonstrating the widening of the energy band gap with the Mg content, as has been seen in the literature for Zn1−xMg x O films deposited with a variety of vacuum-based techniques.

Materials and methods

Mg-doped ZnO films were deposited on Nexterion® D borosilicate glass substrates (2.5 × 2.5 cm). The glass substrates were cleaned with Hellmanex® III washing solution under sonication at 50 °C and then rinsed with DI water (DI, 18 Milli-Q/cm) and isopropanol. A seed layer of ZnO, based on a modified recipe from Fuchs et al. [20], was spin-coated at 2000 rpm for 60 s on the substrate, from a solution of 50 mM ZnO in 5 M NH4OH, followed by 5 min annealing on a hot plate, in air, at 100 °C. A single deposition was carried out on a 2.5 × 2.5 cm polyethylene terephthalate (PET) substrate that was treated in the same manner as the borosilicate glass.

The compositions of the used solutions A–H are shown in Table 1. As basic constituents, the solutions contained 40 mM of zinc nitrate hexahydrate (Zn(NO3)2 × 6H2O, Sigma-Aldrich 96482) and 0.7 M of ammonium hydroxide (NH4OH, Sigma-Aldrich 221228) dissolved in DI water (18 Milli-Q/cm). The total solution volume was 100 mL and the pH 10.8 at 25 °C. Solutions A–D contained 1 mM of citric acid (CA, C6H8O7, Sigma-Aldrich 251275) and 0, 5, 10 and 15 mol% of magnesium nitrate hexahydrate (Mg(NO3)2 × 6H2O, Sigma-Aldrich 237175), respectively. For solutions E–H, the CA and the Mg salt concentrations varied as shown in Table 1. The 150-mL beaker containing the solution was closed with a lid and heated up to 80 °C under stirring on the hot plate. At a solution temperature of 80 °C, measured with a thermocouple inserted in the beaker, the substrate was immersed vertically for the deposition. The sample was removed from the bath after 15 min, dipped in DI water and finally blown dry with air to remove excess precipitates from the film’s surface.

Table 1 Compositions of chemical bath solutions A–H

For the investigation of the film growth, the pH value was adjusted through the solution bath heating period. With increased heating time, the pH decreased, as shown in Fig. 1, for solution B. During the deposition time of 15 min, the pH decreased by 0.1. An experiment with a completely sealed deposition bath showed that the pH decrease mainly arises from reactions in the solution such as precipitation of Zn(OH)2 or Mg(OH)2. The ammonia evaporation is negligible during the short deposition time.

Figure 1
figure 1

Temperature and pH profile depending on bath solution heating time for solution B

The surface morphology of each sample was studied by scanning electron microscopy (SEM, Zeiss Supra 40). The crystal structure was characterized by X-ray diffraction using Cu Kα radiation (XRD, XPert MPD). Fourier transform infrared spectroscopy (FTIR, Bruker Vertex 70) was used to measure the transmittance in the range 300–1000 nm, which was used to calculate the optical band gap of the material. Inductively coupled plasma atomic emission spectroscopy (ICP OES, Optima 5300 DV) determined the Zn:Mg ratio in the films. Speciation calculations were performed with the Hyperquad Simulation and Speciation software [21] with complex stability constants and thermodynamic data from the NIST complex stability database [22].

Results and discussion

The growth of the Mg-doped ZnO films is in general influenced by various parameters, such as temperature, solution pH, nature of the substrate, the level of supersaturation and the solution composition. Thermodynamic analysis of the solubility and speciation of undoped ZnO in an aqueous solution showed that, when using a solution chemistry with ammonia, the solubility of ZnO is lower at higher temperatures, which is referred as retrograde solubility [23]. This behaviour is due to the lower stability of the soluble [Zn(NH3)4]2+ complex at higher temperatures, leading to a supersaturation of Zn(OH)2 and providing, therefore, the thermodynamic driving force for the ZnO film growth. This also means that film growth is only possible in a certain pH range. The experiments have shown that when the Mg dopant was omitted (solution A), reasonable film deposition was only achieved in a narrow pH window between 8.4 and 9.7 (Fig. 2). For solutions B–D varying amounts of the Mg dopant were added, but the supersaturation of the Zn species remained the main driving force for film deposition. It was seen that the pH window where deposition occurs narrows with the introduction of Mg in the solution. Simultaneously, with increasing amount of Mg, the deposition window shifts to lower pH values (Fig. 2). The much narrower pH window compared to the undoped ZnO suggests a lower driving force due to the presence of Mg species. The reasons for this may be face-selective adsorption of aqueous Mg complexes onto certain charged ZnO crystal faces, as well as the precipitation of solid Mg(OH)2 in the solution. These aspects will be addressed in the discussion on the film morphology.

Figure 2
figure 2

pH dependence of Zn1−xMg x O deposition for solutions A–D

Due to the narrow pH window where deposition takes place, the film thickness varies strongly with small changes of the solution pH. To demonstrate this, Fig. 3a–d shows SEM images of samples from solution A and B at pH value of 9.1 ± 0.05 and 9.2 ± 0.05 (both at 80 °C). While the films deposited at higher pH from solution A and B have a thickness of 760 and 600 nm, respectively (Fig. 3b, d), at the slightly lower pH, the films are only 500 and 300 nm thick (Fig. 3a, c). The crystal structure of these films was analysed by XRD and is shown in Fig. 4. Indeed, it was observed that the small change in the pH did not affect the crystal structure of the films, but solely the thickness. A detailed discussion of the influence of the Mg dopant on the film morphology under a constant pH of 9.1 for solutions A–D is given in the following section.

Figure 3
figure 3

SEM pictures of Zn1−xMg x O films deposited from a solution A at pH 9.1, b solution A at pH 9.2, c solution B at pH 9.1, d solution B at pH 9.2, e solution C at pH 9.1 and f solution D at pH 9.1

Figure 4
figure 4

XRD spectra of Zn1−xMg x O films deposited from solutions A–D at pH 9.1 and 9.2

Further, it is worth noting that Zn1−xMg x O films were also grown on a flexible PET substrate from the solution B, obtaining similar film growth properties as on the glass substrate. In this paper, however, we will exclusively elaborate on the film characterization on glass.

Morphology

The Zn1−xMg x O film morphology is strongly influenced by the solution properties. A comprehensive overview on the parameters that alter the ZnO morphology was presented by Govender et al. [24]. Since in the present experiments temperature, pH and chemical reagents were kept constant, the changes in the film morphology can be solely attributed to the amount of various Mg species in the solution. Scanning electron microscopy revealed different film morphologies for films deposited from solutions A–D at substrate immersion pH 9.1 at 80 °C (Fig. 3a, c, e, f). All films were smooth, with high compactness. X-ray diffraction confirmed that each solution composition resulted in films with a distinct texture, as seen in Fig. 4. All peaks can be assigned to the hexagonal ZnO zincite phase (ICDD 00-036-1451). Solution A and D led to Zn1−xMg x O films with a very prominent peak from the {0001} plane reflection. Films deposited from solutions B and C have polycrystalline nature. While B shows peaks from the {10\( \bar{1} \)0} and {11\( \bar{2} \)0} planes, solution C gave rise to a prominent peak from the {10\( \bar{1} \)1} planes, with smaller peaks ascribed to the {10\( \bar{1} \)0}, {10\( \bar{1} \)2}, {11\( \bar{2} \)0}, {10\( \bar{1} \)3} and {11\( \bar{2} \)2} plane reflections.

An explanation for the different surface morphologies is given by face-selective adsorption of Mg and citrate species onto specific charged ZnO crystal planes. To show what type of Mg and citrate species are present in the solution under the experimental conditions, speciation modelling was used. Following complex formation reactions with complex stability constants from the NIST database [22] were considered for the hydrolysed magnesium ion and citric acid:

$$ {\text{Mg}}^{2 + } + 2{\text{NH}}_{3} \;({\text{aq}}) \leftrightarrow \left[ {{\text{Mg}}\left( {{\text{NH}}_{3} } \right)_{2} } \right]^{2 + } ({\text{aq}})\quad \log \,\beta = - \,18.29\;(25\,^\circ {\text{C}}),\; - \, 2.5{ \,(}80\,^\circ {\text{C)}} $$
(1)
$$ {\text{Mg}}^{2 + } + \left( {{\text{C}}_{6} {\text{H}}_{ 5} {\text{O}}_{7} } \right)^{3 - } \leftrightarrow \left[ {{\text{Mg}}\left( {{\text{C}}_{6} {\text{H}}_{5} {\text{O}}_{7} } \right)} \right]^{ - } \;({\text{aq}})\quad \log \,\beta = 4.89\;(25\,^\circ {\text{C}}), \, 4.67\;(80\,^\circ {\text{C}}) \, $$
(2)
$$ {\text{Mg}}^{2 + } + {\text{H}}_{2} {\text{O}} \leftrightarrow \left[ {\text{Mg(OH)}} \right]^{ + } \;({\text{aq}}) + {\text{H}}^{ + } \quad \log \,\beta = - \,11.42\;(25\,^\circ {\text{C}}),\; - \,9.59\;(80\,^\circ {\text{C}}) \, $$
(3)
$$ {\text{C}}_{6} {\text{H}}_{5} {\text{O}}_{7} {\text{H}}_{3} + 3{\text{OH}}^{ - } \leftrightarrow \left[ {{\text{C}}_{6} {\text{H}}_{5} {\text{O}}_{7} } \right]^{3 - } \;({\text{aq}}) + 3{\text{H}}_{2} {\text{O}}\quad \log \,\beta = 14.29\;(25\,^\circ {\text{C}}),\;14.26\;(80\,^\circ {\text{C}}) \, $$
(4)

To calculate speciation diagrams at 80 °C, it was necessary to approximate the temperature-dependent stability constants with the Van’t Hoff equation using enthalpy values from the NIST database [22]. The influence of the ionic strength in the solution was neglected. It has to be noted that, because of these approximations and the reliability of complex formation constants in general, the model cannot provide absolute quantitative results. Speciation modelling is only a qualitative tool to show trends in the stabilities of certain Mg species. Considering these models, aqueous Mg species present at 80 °C are the negatively charged [Mg(Cit)], as well as the positively charged Mg2+ and [Mg(OH)]+, as seen in Fig. 5. Further, citric acid is till pH 9.5 completely complexed as [Mg(Cit)] in the solutions B–D.

Figure 5
figure 5

Magnesium and citric acid speciation diagrams for solutions B–D at 80 °C with data from the NIST database [22]

In terms of ZnO face stabilities, it is well known that the nonpolar {10\( \bar{1} \)0} is more stable than the {10\( \bar{1} \)1} and the least stable face is the polar {0001} [25, 26]. Despite the fact that the {0001} plane is thermodynamically not stable, many experiments with different deposition methods yield films with a pronounced (0001) texture. The reason is that the {0001} face can be stabilized by lowering the surface energy through different mechanisms, like adsorption of foreign atoms, surface reconstruction or charge transfer within the crystal [27].

It is well known that different additives in the solution can favour the growth of specific faces by affecting the relative stability of the different planes. Undoped ZnO films deposited from the solution A exhibited in all cases only the (0001) ZnO film texture. This can be explained by face-selective adsorption of non-zinc species in the solution. Complex formation constants help to understand which species are present under the experimental conditions. Since Zn forms stronger complexes with ammonia (log β = 9.3 [22]) than with citrate (log β = 6.25 [22]), citric acid is only in the form of the dissociated citrate ion (Cit3−). As seen in many investigations on solution-deposited ZnO under similar conditions [28, 29], Cit3− is a strong crystal morphology-controlling agent for obtaining a Zn-terminated (0001) ZnO surface texture. The strong adsorption onto the {0001} ZnO plane arises from the free rotation around the single bonds of the three carboxylate groups, which allows the Cit3− to adopt to the geometry of the zinc atoms of the {0001} plane [28, 30] (Fig. 6a). Further, the {0001} ZnO plane has the highest density of zinc atoms, so the probability of all three COO groups to bind selectively to this plane is much higher compared to other planes. The Cit3− stabilizes the {0001} plane and hinders the growth along the [0001] direction. It fosters, therefore, lateral growth of the ZnO grains and thereby compact films.

Figure 6
figure 6

Schematic structure of a Mg and citrate species, b ZnO crystal planes and c Zn1−xMg x O film orientations deposited from solutions A–D

Further, ZnO faces in contact with an aqueous solution show a net surface charge, which is determined by their isoelectric point (IEP). The IEP of a specific surface defines the pH for which the total surface charge is zero (below the IEP the surface charge is positive). It depends on the crystal surface and on the charged species in the solution. The IEP values of different ZnO faces reported in the literature are between 8.7 and 10.2 [3134]. The depositions of the present study were conducted at pH value of 9.1, and thus within the reported IEP value window. Consequently, small modifications in the solution constituents can lead to the modification of the polarity of specific ZnO faces. Richardson and Lange [23] pointed out that the {0001} plane most likely maintains a net positive charge for pH values even larger than 9.5. A positively charged {0001} ZnO plane would provide an additional electrostatic driving force for the adsorption of the anionic Cit3−. If the electrostatic force is the main trigger for the adsorption of Cit3− onto the {0001} ZnO plane, it will mean that the {10\( \bar{1} \)0} and the {10\( \bar{1} \)1} planes are most likely negatively charged, otherwise they would be favoured over the {0001} because of their higher stability. A schematic view of the suggested charges of the ZnO crystal faces can be seen in Fig. 6b.

If 5 mol% Mg is added (solution B), the citrate is completely complexed as [Mg(Cit)] (log β = 4.89 [22]) (see speciation diagram in Fig. 5) because Mg forms only very weak complexes with ammonia (log β = − 18.29 [22]). Compared to Cit3−, [Mg(Cit)] contains only one acidic COOgroup (Fig. 6a), resulting in a weaker adsorption, and hence lower stabilization of the {0001} ZnO plane, which leads to the emergence of other, thermodynamically favourable planes. Further, positive Mg species, such as Mg2+ and [Mg(OH)]+, are present in the solution, which can adsorb onto negatively charged surfaces of the ZnO crystals. The concentration values of all Mg and citrate species in the solutions at pH 9.1 are displayed in Fig. 7. Data were taken from the speciation simulations as displayed in Fig. 5. The fact that the growth direction of the films with the addition of Mg changes from [0001] to the [10\( \bar{1} \)0] could indicate that the nonpolar surface {10\( \bar{1} \)0} is negatively charged (its IEP < 9.1) and can further be stabilized by the adsorption of positive Mg species as argued before (see also Fig. 6c). This would give rise to the film doping, as discussed in the next chapter.

Figure 7
figure 7

Concentrations of Mg and citrate species in solutions A–H at pH 9.1

Zn1−xMg x O films deposited from solution C showed a distinctive [10\( \bar{1} \)1] growth direction. The same arguments as for solution B can also be applied in this case. A reason why the [10\( \bar{1} \)1] is favoured over the [10\( \bar{1} \)0] orientation can be the higher amount of [Mg(OH)]+ present in the solution (see Fig. 7), which acts as precursor for the homogenous precipitation of Mg(OH)2. This strong precipitation might cause [Mg(Cit)] to lose the Mg ion also in the form of Mg(OH)2, because the stability of the [Mg(Cit)] complex is rather low. Therefore, a small amount of Cit3− can be expected in the solution, which can again adsorb onto the {0001} ZnO plane. The otherwise rather unstable {10\( \bar{1} \)1} surface plane can be stabilized through adsorption of Mg2+ ions, which are in high concentrations present in the solution (see Figs. 5 and 7). It is not clear whether this simultaneous adsorption onto various planes, or a certain reconstruction leads to the pyramidal (10\( \bar{1} \)1) film texture. Both explanations are plausible and supported by the low film growth rate observed during deposition from solution C (see also film thickness in Fig. 2).

Solution D contained the highest amount of magnesium salt (15 mol%) which causes an even higher concentration of [Mg(OH)]+ in the solution. This results in a high amount of Mg(OH)2 precipitates. This was also experimentally seen, because more white Mg(OH)2 precipitates rendered the solution from translucent to “milky”. Similar to the situation in solution C, it is very likely that in solution D rather high amounts of Cit3− are present, which stabilize the {0001} plane (Fig. 6c).

In order to demonstrate the crucial role of citric acid, two more depositions were done from solutions containing 5 mol% Mg. One solution did not contain citric acid (solution E). The other (solution F) contained the double amount of citric acid concentration (2 mM) than the one employed in solutions A–D. Both depositions were done at pH of 9.1. In the case of solution E, besides the various zinc species, only Mg2+ and [Mg(OH)]+ (Fig. 7) are present. Without citric acid, the {0001} ZnO plane cannot be stabilized and nanorods are obtained instead of a compact film (see SEM picture in Fig. 8a). In contrast to that, in solution F, containing higher amount of citric acid, Mg is mainly present as [Mg(Cit)], whereas the concentration of positive Mg species is very low (Fig. 7). The film grows primarily along the [10\( \bar{1} \)0] direction, like in the case of solution B (with 1 mM citric acid), showing that the [0001] growth direction cannot be obtained unless Cit3− is present. The presence of [Mg(Cit)] is, therefore, not adequate to promote the [0001] growth direction. The experiment also shows that the positively charged species Mg2+ and [Mg(OH)]+ do not seem to influence considerably the film texture.

Continuing with the variation of the citric acid concentration, solutions G and H were prepared. The intention was to investigate whether the [10\( \bar{1} \)1] and [0001] growth directions of the films from solutions C and D can be altered through the presence of higher amounts of [Mg(Cit)], which is expected to prevent homogeneous precipitation of Mg in the solution. Indeed, samples deposited from solutions G and H exhibited a prominent peak from the {10\( \bar{1} \)0} planes with additional ones from {10\( \bar{1} \)1} and {11\( \bar{2} \)0}, as seen in Fig. 9. The SEM investigation of films from solutions G and H revealed elongated grains but smooth films, as displayed in Fig. 8. These findings show that the citric acid and its complex [Mg(Cit)] have a critical role in preventing precipitation and thus leading to the occurrence of distinct surface textures.

Figure 8
figure 8

SEM pictures of Zn1−xMg x O films deposited at pH 9.1 from a solution E, b solution F, c solution G and d solution H

Figure 9
figure 9

XRD spectra of Zn1−xMg x O films deposited from solutions F, G and H at pH 9.1

Mg incorporation into the ZnO lattice

Depositions were carried out in solutions containing different mol% of Mg salt (solutions A–D: 0, 5, 10, 15 mol% Mg). A correlation of the Mg content in the Zn1−xMg x O films with the Mg content in the solution was expected. ICP OES analysis showed, however, that films deposited from solution B contained, with 1.55 mol% Mg, the highest amount of dopant. Further, films deposited from solutions C and D contained 0.75 and 0.41 mol% Mg, respectively. These findings show that an increase in Mg content in the solution leads to a decrease in Mg content in the film. In order to explain this, the influence of the growth mechanism on the Mg incorporation was examined more precisely.

Mg incorporation is most likely hindered by the thermodynamic solubility limit under equilibrium conditions of Mg in ZnO with 4 mol% [35]. Incorporation mainly happens through adsorption as explained by Joo et al. [33]. This further suggests that high amounts of adsorbed Mg species on multiple ZnO planes will lead to higher Mg concentrations in the deposited film.

Films deposited from solution G with a high number of adsorbed species (mainly [Mg(Cit)] as can be seen in Fig. 7) lead to a (10\( \bar{1} \)0) ZnO texture with 2.1 mol% Mg in the film. This maximum Mg incorporation of 2.1 mol% is in accordance with calculations from Joo et al. [33], who determined that the maximum solubility of Mg in ZnO to be around 2% at 60 °C. One might argue that a further increase in the [Mg(Cit)] concentration in the solution as adsorbent might lead to higher Mg incorporation in the film. Experimentally it was seen, however, that the driving force for film deposition is very low with higher amounts of [Mg(Cit)] present. A reason may be that the adsorbed bulky [Mg(Cit)] species are blocking incoming species that are important for the film growth. A possible solution to this can be a simultaneous increase in the deposition temperature, although in an aqueous solution this is limited to the boiling point of water.

Figure 10 shows that the transmittance of Zn1−xMg x O films is > 80% in the range between 400 and 1000 nm. To demonstrate that the band gap of the deposited films increases with higher amounts of incorporated Mg, as seen with various deposition techniques, the optical band gap values were extracted via Tauc plots, as shown in Fig. 10. Table 2 lists the measured Mg content in the films and the band gap values of the films deposited from solutions B–D, G and H. The graph in Fig. 11 displays this correlation. It can be seen clearly that the band gap widens from 3.41 to 3.55 eV for samples containing 0.41–2.1 mol% of Mg.

Figure 10
figure 10

Transmittance and Tauc’s plots for films deposited from solutions D, G and H

Table 2 Band gap and determined amount of incorporated Mg via ICP OES for solutions B–D, G and H
Figure 11
figure 11

Band gap in dependence of Mg content in films deposited from solutions B–D, G and H

The increase in the band gap with the Mg content is seen in films deposited by different vacuum- and solution-based methods at various temperatures. For example, Zn1−xMg x O, grown by PLD at 600 °C, led to a band gap increase from 3.36 to 3.99 eV for Mg contents from 0 to 33 mol% [3]. ALD-grown films at lower temperature of 120 °C yielded band gap values from 3.25 to 3.6 eV for 0–20 mol% Mg [36] and 3.2–3.9 eV for 0–33 mol% Mg [37]. Films sputtered without substrate heating showed an increase from 3.24 to 4.2 eV for films incorporating 0–46 mol% Mg [12]. In all these examples, for low amounts of incorporated Mg (< 10 mol%), the increase in band gap does not exceed 0.2 eV. The variation in band gap for the deposited films in the present study was 0.14 eV, which is in line with the limited maximum Mg incorporation of 2.1%. A similar behaviour was reported by Polat et al. [18] for CBD grown Zn1−xMg x O, with an increase in band gap of 0.06 eV for films with 0.84 mol% Mg relative to the undoped ones.

To further confirm that Mg is indeed incorporated in the lattice, X-ray diffractograms were measured (Fig. 12). The tetrahedral ionic radius of Mg is with 0.57 Å [38] smaller than that of Zn with 0.60 Å [38]. Thus, Mg incorporation should cause lattice shrinkage, which shifts the XRD peaks to higher 2Θ angles. Small changes of the {10\( \bar{1} \)0} and {10\( \bar{1} \)1} plane peaks were seen for samples deposited from solutions B, G and H (see Fig. 12), which incorporated the highest amount of Mg. A similar small peak shift with Mg incorporation was reported for metal organic chemical vapour deposited (MOCVD) [39] or sputtered Zn1−xMg x O films [12]. Further, the hexagonal lattice constants a and c of all samples were calculated and are displayed in Fig. 13. It can be seen that the lattice parameters a and c decrease with higher Mg content in the film, although especially for lattice parameter a the decrease is very small. This is in accordance with results of Ohtomo et al. [3] (PLD deposition) and Ogata et al. [9] (MBE deposition) who reported a decrease in lattice parameter c, while for Mg contents < 10% lattice parameter a remains practically constant. In summary, XRD spectra confirmed the incorporation of small amounts of Mg into the ZnO lattice.

Figure 12
figure 12

Peak shifts of {10\( \bar{1} \)0} and {10\( \bar{1} \)1} ZnO faces from solution B, G and H

Figure 13
figure 13

Lattice parameter a and c in dependence of the Mg content in the deposited films

Conclusions

Zn1−xMg x O films were deposited based on a new formulation for chemical bath deposition, varying the concentrations of the chemical reagents. It was found that film growth is only possible in a narrow pH window, which is controlled through supersaturation of the Zn(OH)2 species due to the lower stability of the [Zn(NH3)4]2+ complex at higher temperatures. Scanning electron microscopy and X-ray diffraction revealed a distinct (0001), (10\( \bar{1} \)0) or (10\( \bar{1} \)1) ZnO surface texture, depending on the concentration of Mg in the solution. This behaviour was investigated by speciation modelling and explained by face-selective adsorption of certain Mg species onto ZnO planes. The optical band gap for the compact films varied in the range of 3.41–3.55 eV. XRD confirmed Mg incorporation into the ZnO lattice up to 2.1 mol%, as determined by ICP OES.