1 Introduction

Nanoparticles manifest unique properties that depend upon morphology, size and shape that have diverse applications in field of optical and optoelectronics [1]. Oxide nanoparticles are wise choice and serve as foundation for modern and multiuse devices [2]. Oxides semiconductors are used more frequently in device manufacturing and assembling because its physical attributes are size dependent and can be adjusted accordingly as well [3]. For example Zno having 3.37 eV band gap at normal temperature, also have great excitation binding energy of 59.6 meV and possess efficient photocatalytic, optical properties and piezoelectric attributes. Owing to these properties these are hugely consumed in solar cells, gas sensors, photocatalysis and anti-bacterial substances, and ultraviolet LED devices. Zno is also a necessary unit of green luminescence phosphor in fluorescent instruments [4]. Operating conditions for ZnO for thermal stability and chemical reactions at are much stronger than the conventional already used nano-materials and their optical influence are more of dependent on the temperature. Zno is the most feasible materials that cover most of the challenging ways. So, Zno is being studied broadly recently in order to explore its further potential applications in electronics and optical electronics. Moreover, different type of doping in the ZnO (Mg/Br) can modify band gap in order to formulate UV detectors operating on light in different UV regions that can applied for photocatalytic performance [5].

ZnO photocatalytic activity is affected by local point defects which include anti-site, zinc interstitial spaces and oxygen vacancies [6]. Even so, the photocatalytic applications of ZnO are facing confront such as higher value of rate recombination for electron-holes pair generation by sunlight. For the improvement in ZnO performance as the photocatalyst, rate of recombination rate of electron-holes pair should be delayed [7]. The separation of electron–hole pair increased if surface defects trapped these electron–hole pair. Surface defects and impurities help the adsorption sites to trap the charge carriers and form photo excited electron hole pair. The particle size and increment ratio of defects enhances the photocatalytic efficiencies [8].

In group II elements, there are the presence of valence electron and high reactive series which seek great attention. If we add the alkaline earth metals with ZnO, results in improvement of luminescence intensity due to updating of the band gap energies [9]. Now a day, researchers are trying to investigate the boosting up the properties for ZnO by process of doping of some alkaline earth metal (Ba/Sr/Mg/Ca) for improving photocatalytic performance [10]. Doping influences on the particle size, band gap energy, geometry and crystalline index. In this experimental work, magnesium (Mg) will take for doping in Zinc and Mg have similar ionic charge. Pure ZnO and Mg-ZnO NPs already prepared by various physical and chemical method contains hydrolysis, spray pyrolysis, sol–gel, chemical precipitation, chemical solution and co-precipitation for observing its size and morphology [11]. These traditional ways of synthesis, sometimes associated with dangerous chemicals, high temperature and pressure that can get absorb on surface of material cause the threating in applications also. The inorganic reducing agents are toxic and can cause environmental risks [12]. Therefore, it’s the need of the current age to use eco-friendly and less hazardous techniques for synthesis of nanoparticles. Green synthesis has gained popularity over chemical and physical methods due to its safe processing, best control, low cost, less time consumption, non-toxic and environmental friendly [13, 14]. In past, preparation of metal oxide, ZnO and metal-doped ZnO nanoparticles using plant leaves extracts like Zea mays [15] moringa oleifera [16], azadirachta indica, Telfairia Occidentalis [16] gongronema latifolium [17], and Ficus religiosa [18] has been reported.

In this paper, green synthesis was used for Mg-doped ZnO decorated with Ag NPs were synthesize environmentally safe route using Ficus religiosa leaf extract. The role of Ag decoration on Mg doped ZnO is to improve the properties of Mg-ZnO nanoparticles by supporting to adjust the band gap more flexibly, changing the electronic structure and optical properties. Moreover, Ag has high solubility, more reactive sides and high ionization energy which helps in degradation process.The influence of Mg2+ ion and Ag2+ on ZnO lattice is investigated morphologically, geometrically and optically. Moreover, photocatlytic activity was checked by exploring degradation for dye methylene blue and rhodamine B.

2 Experimental Details

2.1 Materials

The chemicals, silver nitrate AgNO3, zinc chloride (ZnCl2), Magnesium chloride (MgCl2), sodium hydroxide (NaOH) and ethanol (C2H5OH) were obtain from Nano Lab, department of Physics, university of Gujrat, while the Ficus religiosa leaves were collected from garden of Govt Mian Rehmat Ali Graduate college situated in Gujranwala.

2.2 Preparation of Vitis Vinifera Extract

Taken the leaves of Ficus religiosa plant and then cleaned with some deionized water to remove any debris. Subsequently, the leaves were dried in fresh air and then placed in the drying oven at 55 ºC overnight. In next step grinded it into fine powder using electric mixer. Then 10 g of crushed leaves were added into conical flask contain 250 ml of deionized water and stir it for 30 min at 60 ºC to obtain leaf extract.

2.3 Preparation of Nanoparticles

Zinc oxide nanoparticles were synthesized by taking zinc acetate in 100 ml for 0.1 molar solution of distilled water. At 60 ºC this solution stirred magnetically and 20 ml solution of 0.5 molar sodium hydroxide (NaOH) drop-wise is entered into to the same solution set to stir for 60 min. 15 ml of ficus religiosa extract from leaves was entered to the solution and allowed to stirred for around 3 h that resulted in precipitates of white coloured in the solution [19]. Then this solution is washed with deionized water and separate out the precipitate and dried it into drying oven at 100 ºC for 8 h and then crushed it into powder form. Similarly, for the prepration of Mg doped ZnO decorated with Ag (1%) nanoparticles, 0.1 molar solution of Magnesium chloride and 1 molar solution zinc chloride was prepared and mixed in leaf extract of 100 ml and stir it for 3 h at 80 °C. Then, 1 g of AgNO3 in 100 ml was added in the 100 ml solution of water and placed in sonicator by providing ultrasonic waves for 2 h with temperature 80 °C. 20 ml solution of 0.1 molar sodium hydroxide was drop wise added at same temperature as shown in Fig. 1. The solution of magnesium chloride and zinc chloride is also added in it and stir. 15 ml of ficus religiosa leaf extract was added to the same solution while stirring it. After 2 h stirrer, grayish coloured precipitates were analyzed. The precipitates were washed 4 times with distilled water for the reduction of impurities and then seprated using a centrifuge and dried at 80 °C for 12 h. Similarly, Mg doped ZnO (0.5%, 1.5% and 2% by weight) decorated with Ag was prepared by following same method by changing concentration of magnesium chloride and keeping AgNO3 concentration constant [20]. The method followed matches previous reported work for obtaining nano-powders then characterized by various techniques for examination specific structural, morphological, optical properties.

Fig. 1
figure 1

Presents green’s synthesis process of Mg doped ZnO decorated with Ag

The photocatalytic activity of ZnO and Mg doped ZnO decorated with Ag nanoparticles were investigated by the degradation of methylene blue (MB) and rhodamine B (RhB) under sun light irradiation. Small amount (0.05 g) of each type of dye was added into distilled water for degradation process; Small category of each sample was added and stirs to check the degradations. The dye was also checked for the dark and the in light after 30 min and continues to check till it degrades maximum [21].

3 Results and Discussions

3.1 Structural Analysis (XRD Studies)

The confirmation of synthesized samples and phase crystal structure were made by X–ray diffraction (XRD) technique and results was observed in range 10º to 80º as shown in Fig. 2. The pattern of peaks that resulted that prepared samples are for pure ZnO and Mg-ZnO decorated with Ag nanoparticles was the good agreement with JCPDS (card no. 780–0075) and (card no. 84–7102). The XRD results also explored by using X’Pert HighScore Plus software that also identified Mg doped ZnO-Ag nanoparticles [22, 23]. There are some small peak in all doped samples around 28 º, which may be due to impurity left by unwanted Zn(CH3COO)2. The calculations revealed that Zn, Mg and Ag have an almost same ionic radius (0.56 Å, 0.63 Å and 0.60 Å respectively) that is predicted Mg and Ag has replaced and substituted for Zn. The crystalline size was calculated by using full width at half maximum (FWHM) of X-ray diffraction peaks came in range of 9–46 nm by Debye Sherer’s formula

$$D = \frac{k \lambda }{{\beta \cos \theta }}$$
(1)

In above formula ‘D’ is the mean crystalline size, \(k\) represents the shape factor whose value is 0.89, λ, is the wavelength of incident beam, β, is the peak value of full width half maximum and \(\theta\) is Bragg’s angle [24]. The deitals of structural parameters is presented in Table 1.

Fig. 2
figure 2

XRD pattern for undoped ZnO and Mg doped ZnO decorated with Ag nanoparticles

Table 1 Presents FWHM, d spacing and crystalline size of all synthesized nanoparticles

Peaks are broader and shifted which verified doping of Mg and Ag. As the impurity concentration increases, the quality of crystal decreases with more and extra peaks also gives the confirmation of doping. The highest peak came for pure-ZnO at (101) that shifted and changed to (111) peak for silver doping shown in Fig. 2. Moreover, a peak around 63.3 º appears show the Mg doping which increase and broaden with increase in concentration of doping [25]. Pure and Mg doped Zinc oxide decorated with Ag particles showed characteristic peaks of hexagonal wurtizite structure corresponding to reflection planes (100), (002), (101), (111), (200), (102), (110), (103), (220), (112) and (201) detected at angles 2θ of 31.9º, 34.5º, 36.3º, 38.2º, 44.3º, 47.7º, 56.7v, 63.4º, 64.7º, 66.5º and 68.1º respectively that exactly matches with already reported work [21, 26].

3.2 Morphological and Elemental Analysis

The morphology analysis of optimal sample Mg doped ZnO (1%) decorated with Ag is represented in the Fig. 3 by scanning electron microscopy. The elemental analysis was confirmed by energy dispersive x-ray technique that gave confirmation of Zn, Mg, O and Ag in prepared sample as exhibited in Fig. 4. The average crystalline size calculated 13 nm which lies within range, we calculated by XRD [27]. The shape is hexagonal wurtzite, rectangular, rod shape structure with almost uniform distribution as shown in Fig. 3 matches with already reported work [28, 35].

Fig. 3
figure 3

SEM of optimal sample show clear hexagonal, wurtzite, rod and rectangular shapes with almost uniform distribution (a) Exhibits the image for Mg-ZnO/Ag (1%) at bar length 1 μm and 100000 × magnification. (b) Presents the image for Mg-ZnO/Ag (1%) at bar length 500 nm and 200000 × magnification

Fig. 4
figure 4

(a) XPS Image of Mg-ZnO/Ag (1%) at bar length 500 nm. (b) SEM image of Mg-ZnO/Ag (1%) taken for elemental analysis (c) Green dots show the concentration and presence of Mg nanoparticles. (d) Blue dots show the oxygen content in prepared sample. (e) Red dots present the Zinc quantity. (f) Gray dots show the concentration of Ag nanoparticles (Color figure online)

3.3 FTIR Analysis

The functional groups due to interaction of chemical bounding are explored by FTIR spectroscopy and spectra of all synthesized samples are given in Fig. 5. FTIR results for pure-ZnO and Mg doped ZnO nanoparticles with 0.5%, 1%, 1.5% and 2% doping concentration by weight and decorated with Ag. These FTIR spectrums recorded down at room temperature with range limit of wave number (500–4000 cm−1). The taken FTIR spectrum contains many steaks with exceptional characteristics. The spectrum from 680 cm−1 to the 2961 cm−1 confirmed the Ag and ZnO nanoparticles presence [29]. The peaks at 3476–3530 cm−1 confirm the presence of hydroxyl group (-OH) stretching of water due to phenolic compounds [30]. The weak peak observed between 2830 cm−1 and 2937 cm−1 can be associated to vibration due to strtching of aromatic aldehydes. Finally, distinct peaks observed between 500 cm−1 and 545 is the characteristics of zinc oxide vibrations [31]. The FTIR analyzes have revealed that functional groups alcohols, phenols, responsible for in bioreduction, capping and stabilization of the nanoparticles [4].

Fig. 5
figure 5

FTIR spectrum for ZnO nanoparticles and Mg doped ZnO decorated with Ag nanoparticles with various percentage of Mg (0.5%, 1%, 1.5%, 2%)

3.4 PL Analysis

The Photoluminescence spectra for pure-ZnO and Mg doped ZnO (0.5%, 1%, 1.5% and 2%) decorated with Ag is illustrates in Fig. 6 at the excitation wavelength of 320 nm. The emission peak spectrum is observed at the 400–460 nm and other emission peaks are observed at the 550–560 nm in the visible spectrum region. These strong emissions attributed to the strong UV emission is due electron hole recombination which is lowest for Mg-ZnO/Ag (1%) [32]. The surface anion vacancies and tunneling of electron by already existed holes are responsible for the visible emission in range of 0.550 nm to 560 nm as shown in Fig. 6. It is also observed that the intensity of emission bands decreases for Mg-ZnO/Ag (1%) and then increase for higher doping concentrations (i.e. Mg-ZnO/Ag (2%)). A specific doping is preventing the recombination of photo-generated electrons and holes only, if doping increase, it may also reduce defects that resulted increase in recombination rate [33]. In PL study, the emission intensity is lowest for Mg-ZnO (1%)Ag because at this doping concentration the recombination rate is lowest which is also related to the lowest energy band gap 3.26 eV among the all synthesised nanoparticles. At this point the absorption increases due to which intensity decreases. This is due to the defects created, which are responsible for more absorption of energy resulted in decrease in intensity.

Fig. 6
figure 6

Presents PL spectrum for ZnO nanoparticles and Mg doped ZnO decorated with Ag nanoparticles with various percentage of Mg (0.5%, 1%, 1.5%, 2%)

3.5 Optical Analysis

The UV–Vis spectroscopy give absorption spectra of pure ZnOand Mg-doped ZnO decorated with Ag NPs as a function of wavelength for the range of 300 to 700 nm are shown in Figs. 7 and 8. It is observed that absorption peak increases for Mg-ZnO/Ag (1%) doping and then it decreased as concentration increases. This trend may be due to the oxygen deficiency, particle size, grain structure etc. it is noted that the absorption peak increases with the doping concentration. The increase in absorbance may be due to various factors like particle size, oxygen deficiency, and defects in grain structure [34]. The band gap is expected to redshift which is due to the reduction in band gap [28, 35]. The band gap calculated for ZnO is 3.64 eV and for (0.5%) Mg doped ZnO-Ag is 3.53 eV, (1%) Mg doped ZnO-Ag is 3.26 eV, (1.5%) Mg doped ZnO-Ag is 3.40 eV and (2%) Mg doped ZnO-Ag is 3.45 eV. The band gap decreased from 3.64 eV to 3.26 eV by doping of Mg. The band gap is decreased due to the lattice strain in sample due to dopant. The optical bandgap (Eg) is investegated from a Tauc-plot from the following relation

$$\alpha h\upsilon = \, A \, \left( {h\upsilon - Eg} \right)^{1/2}$$
(2)

where α is absorption coefficient, h is Plank’s constant, ν is the frequency of light radiation, and Eg is the band gap energy, where the value of ½ for allowed direct transition [36]. The band gap is decreased due increase in surface area to volume ratio and quantum confinements.

Fig. 7
figure 7

(a) UV–vis absorption spectra pure ZnO nanoparticles and Mg doped ZnO decorated with Ag nanoparticles with various percentage of Mg (0.5%, 1%, 1.5%, 2%) (b) Tauc plot for calculations of band gap energy

Fig. 8
figure 8

(a) Photocatalytic activity of undoped ZnO and Mg doped ZnO(0.5%, 1%, 1.5% and 2%) decorated with Ag nanoparticles using MB dye at 90 min, (b) Absorption–desorption process and photocatalytic activity of MB dye in 1% Mg doped ZnO/Ag (c) Photocatalytic degradation of MB dye by pure ZnO and Mg doped ZnO/Ag (0.5%, 1%, 1.5% and 2%) nanoparticles (d) Graph of ln[Co/C] versus time for kinetic reaction of all fabricated samples (e) Percentage degradation efficiency of undoped ZnO and Mg doped ZnO/Ag (0.5%, 1%, 1.5% and 2%) nanomaterials, (f) Stability and reusability after six number of cycles of Mg-ZnO/Ag (1%)

3.6 Photocatalytic Analysis

In the solar spectrum, the synthesized samples were analyzed for photocatalytic activity on the modeled dye methylene blue (MB) and rhodamine B (RhB). All parameters for the experiments hold on to constant except sunlight. The value PH of the synthesized solution was maintained at neutral; with the help of distilled water 1L solution of MB dye by adding 0.05 g of dye was prepared at 30 ppm in volumetric flask. 300 ml beaker was used to check the photocatalyst on magnetic stirrer by adding 20 ml dye solution in beakers. 0.025 mg of the photocatalyst was added in beakers and stirs them for 15 min. The suspension was put in dark environment for 30 min for the equilibrium related to adsorption–desorption process and then for interval (0 min, 20 min, 40 min, 60 min, 80 min, 100 min, and 120 min) exposed to solar irradiations. 2 ml was taken from every sample and investigated under UV–visible spectrometer in order to study the absorbance and degradation activity against particular photocatalyst. Percentage of degradation was calculated with help of the Lambert Beer’s Eq. (3):

$$\% \, Degradation = \, \left( {C_i - C_f } \right)/C_i \times 100$$
(3)

where Ci represents the initial concentration of dye, Cf represents final concentration of dye. Moreover, the same dye was placed without any catalyst as the reference and control center.

For determination of recombination rate constant (k) by using the Langmiur-Henshelwood (L–H) model by following Eq. (4):

$${\text{ln}}\left( {{\text{C}}_{\text{o}} /{\text{C}}} \right) = {\text{kt}}$$
(4)

k represents the rate constant that can be used to plot the photodegradation process by plotting it against the irradiation time. The value of k found to be 0.00178, 0.00245, 0.00234, 0.01835, and 0.00195 for ZnO and Mg doped ZnO/Ag (0.5%, 1%, 1.5%, 2%) respectively in case of methylene blue. The rate constant found maximum for Mg doped ZnO/Ag (1%) that indicate the improved photocatalytic activity. Similarly, the rate constant RhB dye for ZnO and Mg doped ZnO/Ag (0.5%, 1%, 1.5%, 2%) found the value 0.00178, 0.00195, 0.00312, 0.00234 and 0.00245 respectively as shown in Fig. 9. It’s very interesting Mg doped ZnO/Ag (1%) found highest rate constant that presents maximum degradation for both of dyes. The rate constant for all synthesised nanoparticles is shown in Table 2.The improved photocatalytic activity seems strongly associated with smaller size and reduced band gap helps the delay in process of hole electron recombination.

Fig. 9
figure 9

(a) Photocatalytic activity of undoped ZnO and Mg doped ZnO(0.5%, 1%, 1.5% and 2%) decorated with Ag nanoparticles using Rhodamine B dye at 90 min, (b) Absorption–desorption process and photocatalytic activity of Rhodamine B dye in 1% Mg doped ZnO/Ag (c) Photocatalytic degradation of MB dye by pure ZnO and Mg doped ZnO/Ag (0.5%, 1%, 1.5% and 2%) nanoparticles (d) Graph of ln[Co/C] versus time for kinetic reaction of all fabricated samples (e) Percentage degradation efficiency of undoped ZnO and Mg doped ZnO/Ag (0.5%, 1%, 1.5% and 2%) nanomaterials, (f) Stability and reusability after six number of cycles of Mg-ZnO/Ag (1%) for RhB

Table 2 Rate constant of all prepared samples

The reduced band gap of Mg-ZnO (1%) decorated with Ag was significantly increasing the degradation process [37]. Moreover, oxygen defects and surface area increases responsible for increases the performance of photocatalytic process as shown in Fig. 8. The degradation for various dyes evaluated and makes comparison at 90 min, which shows that Mg-ZnO (1%) decorated with Ag degrade the dye maximum and more efficiently given by Eq. (59) [38]. It can also relate with band gap of 3.26 eV gives maximum adsorption and creation of the free radicals that help in degradation process can be given as:

$${\text{Mg - ZnO}}/{\text{Ag }} + {\text{ Sunlight}} + {\text{ H}}_{2} {\text{O}} \to {\text{h}}^+ + {\text{ e}}^-$$
(5)
$${\text{OH }}* \, + {\text{h}} + \to - {\text{OH}}$$
(6)
$${\text{O}}_{2} {\text{ + e}}^- \to {\text{O}}_{2}^-$$
(7)
$${\text{MB}}/{\text{RhB dye}} + - {\text{OH}} \to {\text{Degradation}}$$
(8)
$${\text{MB}}/{\text{RhB dye}} + {\text{O}}_{2}^- \to {\text{Degradation}}$$
(9)

The band gap for 1% doping Mg-ZnO-Ag nanoparticles is the lowest that is 3.26 eV, which absorbs more energy and recombination rate is slow at this intensity which is responsible for higher degradation efficiency. We can also relate with the PL results, which shows lowest intensity for 1% doping responsible for higher absorption. In XRD calculations, the particle size is minimum for MG-ZnO-Ag (1%) concentration; it shows higher surface to area ratio and more active sites that help in higher degradation as compared to other samples. The removal effeicieny of catalyst Mg-ZnO (1%) decorated with Ag is also very good that approach to 82% after six cycle for MB and 77%, it means its catalytic behavior is very obvious as shown in Fig. 8 with standard deviation of ± 0.5.

4 Conclusions

Mg doped ZnO (0.5%, 1%, 1.5%, 2%) decorated with Ag was successfully prepared by using leaf extract of ficus religiosa plant. The XRD spectrum reveals that Mg and Ag are incorporated in ZnO nanoparticles with crystalline size range 9–46 nm and as the concentration of doping increases, the roughness increases. The SEM image presents wurtzite hexagonal, rectangular and rod shape with nearly uniform distribution. FTIR analyzes revealed that functional groups alcohols, phenols, responsible for in bioreduction, capping and stabilization of the nanoparticles. The PL shows that the recombination rate is lowest for Mg doped ZnO/Ag (1%) and which give the maximum degradation of dyes. Moreover, dislocation of hole electron pair take place in all samples. The energy band calculations gave the values for band gap ZnO and Mg doped ZnO (0.5%, 1%, 1.5%, 2%) decorated with Ag 3.64 eV, 3.53 eV, 3.26 eV, 3.40 eV, 3.45 eV respectively. The band gap found reduced for Mg doped ZnO/Ag (1%). The rate constant in degradation process is maximum by catalyst Mg doped ZnO/Ag (1%) for MB and RhB. The stability of Mg-ZnO/Ag checked after six cycles of regeneration was 83% in case MB and 74% for RhB. The results revealed that Mg doped ZnO/Ag (1%) is better in photocatalytic degradation among other concentration that can be employed to resolve environmental applications.