1 Introduction

Zinc oxide (ZnO) is a non-toxic inorganic material, which could provide potentially useful features such as excellent chemical and thermal stability, high transparency and bio-compatibility. Moreover, ZnO has engrossed much attention, because of its numerous device applications which include field effect transistors (FETs), sensors, light emitting diodes and photo-detectors. In addition to that, ZnO is one of the most effective oxides for killing different pathogenic and non-pathogenic bacteria. Most importantly, zinc oxide is listed as “generally recognized as safe (GRAS)” by the U.S. Food and Drug Administration [1]. Hence, ZnO can be used as an efficient candidate for many potential applications which include drug carriers, cosmetics, packaging materials, storage containers, water purification and antibacterial sprays and thus it has fascinated much, the scientific community. ZnO thin films can be prepared using different fabrication methods such as chemical bath deposition (CBD) [2], plasma enhancing metal oxide chemical vapour deposition (PEMOCVD) [3], sol–gel [4], pulsed laser deposition (PLD) [5], RF magnetron sputtering [6] and spray pyrolysis [7]. Of these methods, spray pyrolysis technique has several advantages over the other methods which include low cost, safety, easy handling and large area deposition [8]. Now-a-days, various elements like Al, F, Mn, Sb, N and Mg are doped with ZnO films due to their suitability for diverse potential applications.

In the present study, we planned to study the effect of Mg doping on certain physical properties along with the antibacterial activity of ZnO thin films to explore the role of ZnO:Mg films in many prospective applications. This inorganic material is of relevance to a number of industrial sectors including environmental, food, synthetic textiles, healthcare, medical care, as well as construction and decoration. From the literature survey, it was understood that even though the ZnO:Mg films have been used for many applications such as FETs, sensors, optoelectronics and disinfectant technology as antibacterial agent, ZnO:Mg film is not considered as a promising candidate for transparent electrode applications because of its high resistivity. It is well known that the electrical properties of ZnO films can be improved by the addition of anionic elements like fluorine (F) [9]. Keeping the above perception in mind, in the present study, fluorine is doped simultaneously with Mg in ZnO thin films, in order to improve the efficiency of ZnO:Mg films so as to make it suitable for transparent electrodes together with other potential applications.

2 Materials and methods

2.1 Film preparation

ZnO:Mg:F thin films were deposited onto glass substrates by employing a simplified spray pyrolysis technique using perfume atomizer (generally used for cosmetics) [10]. In conventional spray pyrolysis technique, normally, a compressor, a solution reservoir and spray gun assembly are used. But in this simplified spray technique, all these parts are substituted by perfume atomizer, since it collectively performs all the functions of the above mentioned parts. In addition to the low cost apparatus, this spray technique using perfume atomizer has several advantages over the conventional spray pyrolysis method: atomization due to hydraulic pressure without any need for compressed carrier gas, fine atomization avoiding large droplets, enhanced wettability between sprayed microparticles and the previously deposited layer. The precursor solution was prepared using high purity zinc acetate dihydrate (Zn(CH3COO)2·2H2O—0.1 M) dissolved in a mixture of doubly deionized water, methanol and acetic acid with the volume proportion of 7:2:1, respectively. Magnesium chloride (MgCl2·6H2O) and ammonium fluoride (NH4F) were used as dopant precursors for Mg (4, 8, 12 and 16 at.%) and F (20 at.%) respectively. This starting solution was stirred continuously for 1 h to get a clear and homogeneous solution. The solution was intermittently sprayed onto preheated glass substrates of dimensions 75 × 25 × 1.35 mm3. Before the deposition process, the glass plates were ultrasonically cleaned in order to improve the adhesive nature of the films. The temperature of the substrates were maintained at 340 ± 5 °C using a temperature controller with chromel–alumel thermocouple. The spray interval was kept as 5 s. To confirm the reproducibility of the films, the experiment was repeated several times. The nozzle to substrate distance and the spray rate were kept as 30 cm and 0.16 mL/spray as these values found to be optimum for the other deposition conditions followed.

2.2 Film Characterization

Thickness of the films was estimated using both stylus technique (profilometer: Surf Test SJ- 301) and weight gain method. The mean value of the sample thickness was found to be in the range of 580–630 nm. The electrical resistivity of the films was determined using four point probe technique with vander Paw configuration. The structural properties of the films were studied using X-ray diffractometer (PAN alytical-PW 340/60 X’ Pert PRO) with X-ray (Cu–Kα) of wavelength 1.5406 Å. The optical transmittance was recorded using a UV–Vis NIR double beam spectrophotometer (LAMBDA-35) in the wavelength range of 300–1,100 nm. Photoluminescence (PL) studies were carried out using a spectro-flurometer (Jobin Yvon_FLUROLOG-FL3-11) with xenon lamp (450 W) as the source for the excitation wavelength of 325 nm. The SEM images were obtained by employing scanning electron microscope (HITACHI S-3000 H).

2.3 Evaluation of antibacterial activity

Antibacterial activity of ZnO:Mg:F films against Escherichia coli (E. coli) was explored using liquid culture test. For this test, 20 mL of nutrient broth was inoculated with 200 μL of E. coli. Then the samples (square in shape with the dimension of 1 cm × 1 cm) were immersed in the medium and then placed in orbital shaker (at a temperature of 37 °C) at 200 rpm. The same procedure was followed for the control plain glass plate. The optical density at 600 nm (OD600 nm) of this medium (the bacteria and sample) was measured using Digital Spectrophotometer 169.

3 Results and discussion

3.1 Electrical studies

The variation in the electrical resistivity of the Mg + F doped ZnO films (ZnO:Mg:F) as a function of Mg doping level is shown in Fig. 1. The Fig. 1 clearly depicts that, the resistivity gradually increases with Mg doping level. The variation in resistivity can be analyzed on the basis of the following facts and reported reasons: as the oxidation number of Zn2+ is the same (+2) as that of Mg2+, the substituted Mg2+ ions on Zn2+ sites does not donate free electrons to the ZnO lattice. Therefore, the resistivity of the film should be remained as constant. But, the resistivity of Mg doped ZnO films are found to increase with Mg doping level which may be due to the degradation of native defects such as interstitial Zn2+ ions and oxygen vacancies (VO) with the incorporation of Mg2+ ion into ZnO lattice [11, 12]. This decrease in interstitial Zn2+ ions and VO may be another reason for this increase in the resistivity of the ZnO films. In addition to that, the mismatch in the ionic radii of Mg2+ (0.066 nm) and Zn2+ (0.074 nm) that leads to a lattice distortion which in turn causes an increase in the resistivity of the films. The same trend in resistivity variation has been reported by several researchers [11, 1316] for Mg doped ZnO films prepared by different deposition techniques viz. sputtering, sol–gel and PLD as tabulated in Table 1. But, an interesting point to be mentioned here is that, even though the trend is the same, the magnitude of the resistivity obtained in the present study is remarkably lesser than the reported values (Table 1) which must be attributed to the presence of anionic dopant F in the system. It is well known that, each of the fluoride ions (F) incorporated into the oxygen sites (O2−) of the ZnO lattice donates one electron to the system, thereby increases the carrier concentration which in turn causes a reduction in the resistivity.

Fig. 1
figure 1

Variation in electrical resistivity of ZnO:Mg:F films as a function of Mg doping level

Table 1 Variation in electrical resistivity of ZnO:Mg films reported in earlier studies

3.2 Structural studies

The X-ray diffraction profiles (Fig. 2) of ZnO:Mg:F films revealed that all the films exhibited hexagonal wurtzite structure with the preferential orientation along the (002) (JCPDS card No. 36-1451) plane irrespective of the level of Mg doping. It is a known fact that, the growth orientation always develops into a crystallographic direction which has the lowest surface energy. Hence, as the surface energy density of the (002) orientation is the lowest in a ZnO crystal, the obtained result is an expected one. It is interesting to observe that no peak corresponding to MgO was detected up to 8 at.% of Mg doping level, but beyond that level a weak diffraction peak corresponding to (200) plane of MgO (JCPDS card No. 45-0946) is observed. This result clearly implies that up to 8 at.% of Mg doping level, the Mg2+ ions are incorporated only substitutionally into the Zn2+ sites of the hexagonal wurtzite structure without forming any separate MgO phase. Huang et al. [16] observed an MgO peak corresponding to (222) plane for sol–gel deposited ZnO:Mg films for 8 at.% of Mg doping level. Even though, the preferential orientation is not altered by Mg doping level, the degree of preferential orientation is declined gradually with the increase in Mg doping level.

Fig. 2
figure 2

XRD patterns of simultaneously (Mg + F) doped ZnO thin films

The crystallite size (D) is calculated using the well known Scherrer’s formula [9, 17],

$$ D = \frac{0.94\;\lambda }{\beta cos\;\theta } $$

where λ is the wavelength of X-ray used (1.5406 Å), β is the full width at half maximum of diffraction peak and θ is the Bragg’s angle. The decrement in the calculated D values (Table 2) is another evident for the above mentioned degradation in the crystallinity. The calculated value of the lattice parameter ‘c’ decreases from 5.2046 to 5.1895 Å (Table 2) with the increase in the doping level suggesting the enhancement of Mg incorporation into the ZnO lattice [18]. This decrease in ‘c’ is due to lesser ionic radius of Mg2+ (0.066 nm) than that of the Zn2+ (0.074 nm). It is also observed that there is a slight right shift in the (002) peak of ZnO phase (Fig. 3) which is another strong supporting evidence for the appropriate incorporation of Mg2+ into the Zn2+ sites.

Table 2 Structural and optical parameters of ZnO:Mg:F films
Fig. 3
figure 3

Expanded portions of XRD patterns in the 2θ range of 30°–40°

3.3 Optical studies

The optical transparency of all the ZnO:Mg:F films is more than 80 % (Fig. 4) with sharp fundamental absorption edge at around 370 nm irrespective of the Mg doping level. The absorption edge gradually shifts towards shorter wavelength side (blue shift) with the increase in the Mg doping level (inset of Fig. 4). The optical band gap (Eg) values are calculated from the plots drawn between the first derivative of transmittance with respect to the wavelength (dT/dλ) and the average wavelength (λavg) (Fig. 5). From the plots, it is observed that the blue shift of the absorption edge corresponding to the optical band gap energy increases as the incorporation of Mg2+ ions into the ZnO matrix increases. Generally, the blue shift obtained for transparent conducting oxides like ZnO, while intentionally doped with suitable dopants in order to improve the carrier density, is due to the Moss–Burstein (MB) effect. But, as already mentioned in the electrical studies, the incorporation of Mg2+ into the Zn2+ sites does not create free carriers. Moreover, we can’t expect an increase in carrier density as the ‘F’ doping level is constant. Hence, in the present study, the obtained blue shift should not be associated with the MB effect. Therefore, the reason for this blue shift caused by the Mg doping can be explained as follows: The difference in the ionic radii of Zn2+ and Mg2+ ions which causes the increased defect centres in the ZnO lattice may be the origin for this broadening of Eg [19]. In addition to that, since Mg atoms being more active than Zn atoms can react with oxygen preferentially [16], and hence the creation of MgO phase with the increase in Mg doping level is an expected one as observed in the XRD patterns (Fig. 1). As this MgO has a higher band gap energy (7.7 eV) [20] than ZnO (3.37 eV), the increase in the Mg2+ incorporation (Mg 3 s-states) gradually augments the blue shift of the absorption edge as observed in inset of Fig. 4. That is, the Mg 3 s-like states have higher energy than that of Zn 4 s-level [21], and this assertive contribution of Mg 3 s-states broadens the optical band gap by heightening the bottom of the conduction band.

Fig. 4
figure 4

Transmittance spectra and broadened portion of absorption edge (inset) of ZnO:Mg:F films

Fig. 5
figure 5

The dT/dλ versus λavg plots of doubly (Mg + F) doped ZnO films

3.4 Photoluminescence studies

Figure 6 shows the room temperature PL spectra of Mg + F doped ZnO thin films. The emission spectra consist of a strong UV peak at ≈392 nm along with a weak emission peak at ≈576 nm in the visible region. Generally, the UV peak corresponds to the near band edge (NBE) transition, whereas the visible emission in ZnO is attributed to the introduction of deep-level defects [21]. From the Fig. 6, it is observed that, the UV peak shifts towards the lower wavelength side (blue shift) with the increase in Mg doping level as also observed by Zhang et al. [22] which supports the broadening of optical band gap as discussed in optical studies (Sect. 3.3). This result confirmed that the incorporation of Mg into the ZnO lattice can be used for tuning the optical band gap desirably and hence it seems that the optimum incorporation of Mg has the potential to enhance the efficiency of ZnO based optical devices. Moreover, the intensity of UV peak increases up to 8 at.% of Mg doping level and then decreases with further doping (Fig. 6). This reduction in UV intensity is probably due to the influence of increased defects caused by the introduction of MgO phase as discussed in structural studies (Sect. 3.2). This increase in defect density is also evidenced by the red shift of visible band (inset of Fig. 6) beyond 8 at.% of Mg doping level as this shift is owing to the introduction of relevant defects in ZnO:Mg films as reported by Xue et al. [21].

Fig. 6
figure 6

Photoluminescence spectra of ZnO:Mg:F films (Inset—shift of visible band)

3.5 Surface morphology

SEM images of undoped and simultaneously (Mg + F) doped ZnO films are shown in Fig. 7a–c. From the Fig. 7, it is observed that the surface morphology of the ZnO films is governed by Mg and F doping. With the increase in the Mg content, the grain size becomes smaller which in turn increases the smoothness of the film. Moreover, the drastic decrease in the grain size of Mg (8 at.%) + F doped ZnO films (Fig. 7b) than that of undoped ZnO film (Fig. 7a) may be due to the simultaneous incorporation of F and Mg both of which have a tendency to reduce the grain size as reported by Shinde et al. [23] and Madahi et al. [24], respectively. The grain size then decreases slightly with further doping (16 at.%) of Mg as observed in Fig. 7c. In other words, enhancement in the surface-to-volume ratio is observed with the increase in Mg doping level.

Fig. 7
figure 7

SEM images of undoped and (Mg + F) doped ZnO films with different doping levels. a Undoped ZnO, b Mg (8 at.%) + F (20 at.%), c Mg (16 at.%) + F (20 at.%)

3.6 Antibacterial activity

Antibacterial activity of ZnO:Mg:F films against E. coli was investigated using liquid culture test by monitoring the optical density (OD) of each sample at 600 nm. The observed OD values are plotted against Mg doping level as shown in Fig. 8. Generally, the antibacterial activity of metal oxides is due to the interaction of highly reactive oxygen species (ROS) such as hydroxyl group (OH), superoxide anions (\( O_{2}^{ \cdot - } \)), and hydrogen peroxide (H2O2) which have a tendency to slow down the bacterial growth [25]. According to Talebian et al. [26], for ZnO, the antibacterial activity is mainly attributed to the release of H2O2, whereas for MgO, it is caused by the production of \( O_{2}^{ \cdot - } \). As hydrogen peroxide (H2O2) is a powerful oxidizing agent, it is harmful to the cells of living organisms. That is, it directly penetrates into the cell membrane of the bacteria that generates severe damages to the inner part of the cell membrane and inhibits the growth of the cell or even kills them. So, it can be simply said that the H2O2 is a primary factor for antibacterial activity. At the same time, the \( O_{2}^{ \cdot - } \) will attack the carbonyl carbon atom which is present in the peptide linkages of the cell wall proteins and leads to the destruction of the bacteria. Hence, in the present study, not only the ZnO phase, but the introduction of MgO phase with increase in Mg doping level (as discussed in structural studies) may also enhance the antibacterial activity which would results in oxidative damage of the cell membrane or inside of the cell due to the production of H2O2 and \( O_{2}^{ \cdot - } \) respectively [27]. In addition to that, the increase in surface-to-volume ratio caused by the Mg and F incorporation, as observed from the SEM images (Fig. 7) enables more reactive surface to interact with E. coli, depressing the growth of the bacteria to a larger scale. A similar behaviour was reported by Jones et al. [28]. They reported that the smaller ZnO particles were more toxic to bacteria than bigger particles.

Fig. 8
figure 8

Growth analysis of E. coli against the Mg doping level of ZnO:Mg:F films

4 Conclusions

ZnO:Mg:F thin films fabricated employing a simplified spray pyrolysis technique using perfume atomizer were found to have good physical properties. The structural studies confirmed the hexagonal wurtzite structure of ZnO:Mg:F films. The enhancement in the surface-to-volume ratio with the incorporation of Mg and F into the ZnO matrix yields a well pronounced antibacterial activity. The PL studies supported the structural and optical results. The wide optical band gap energy combined with good transparency implies that these films are desirable for many optoelectronic applications. Moreover, the reduction in the resistivity due to the simultaneous doping of F with Mg in ZnO thin films evinces the possible enhancement of its potentially active role in transparent electrodes.