Introduction

Water contamination has been one of the most serious environmental issues in recent years. Textile industry discharge poses a significant threat to it due to the presence of various organic dyes such as congo red (CR), Rhodamine 6G (Rh 6G), methyl orange (MO), and methylene blue (MB) in usable water. Organic dyes are toxic, non-biodegradable, potentially carcinogenic, and posing a major threat to the environment as well as human health (Jayaraj et al. 2018). In the modern era of globalization, synthetic dyes have emerged as a significant contributor to water pollution (Vasantharaj et al. 2021). Adsorption and photocatalysis represents a promising technological approach for wastewater treatment (Prajapati et al. 2021; Singh et al. 2021; Yaou Balarabe et al. 2023), particularly for those containing challenging-to-remove organic compounds (Lau et al. 2020). Photocatalysis technology is not only an environmentally friendly but also generates no secondary pollution, particularly in its effective degradation of various pollutants. The degradation of pollutants is attributed to the production of reactive oxygen species (ROS) (Zheng et al. 2022). In recent times, there has been extensive research on metal-oxide photocatalysts (Balarabe and Maity 2022; Perween and Ranjan 2017; Balarabe et al. 2022a), primarily driven by their properties, which include non-toxicity, harmlessness, and outstanding photocatalytic and antibacterial capabilities (Jayaraj et al. 2018). The sol–gel method is a versatile and important technique in materials science and chemistry. It involves the formation of a sol, a colloidal suspension of solid particles in a liquid, followed by gelation to create a three-dimensional network of interconnected particles (Bokov et al. 2021) and its versatility, scalability, and ability to produce tailored materials make it a valuable technique in materials science and beyond. Metal oxide-based semiconductor photocatalysts such as ZnO, TiO2, CuO, CdS, and SnO2 have been extencively explored due to their strong oxidizing capacity, non-toxic properties, and comparatively affordable cost (Balarabe et al. 2022b). However, most of these semiconductor metal oxide-based photocatalysts primarily absorb in the UV region, which results in untapped energy in the visible region of the solar spectrum (Agrawal et al. 2021). Among the various catalyst, zinc oxide (ZnO) nanoparticles (NPs) play a vital role as a photocatalyst materials in presence visible/UV light irradiation (Lau et al. 2020; Zheng et al. 2023). ZnO has a wide band gap of 3.37 eV and a large excitation binding energy of 60 meV at room temperature (Yang et al. 2017a, b), making it a suitable candidate as a semiconducting material for vast applications in electronic and optoelectronic devices such as ultraviolet sensors (Capper et al. 2011), solar cells, laser diodes, gas, and biosensor (Mustafa et al. 2023; Giri and Chakrabarti 2016; Al-Hardan et al. 2013; Zhao et al. 2010). In addition, ZnO exhibits high conductivity, high optical transparency, and thermal stability (Zhan et al. 2013) in a hydrogen-rich environment (Lee et al. 2002). Recently, ZnO has emerged as a potential photocatalyst due to its high activity, high electron mobility, ability to reduce electron–hole pair recombination, low cost, and environmental stability features (Vinh et al. 2021). ZnO is a material that has undergone extensive research and engineering to provide solutions to a wide range of challenges in various fields, including photocatalysis (Mekasuwandumrong et al. 2010; Yadawa et al. 2023; Khan et al. 2020), heterogeneous catalysis (Rajesh et al. 2015), UV photodetectors (Tian et al. 2014), solar cells (Wong et al. 2012), gas sensors (Jang et al. 2021; Lin et al. 2019), photocatalyst and photoelectrochemical water splitting (Maeda and Domen 2010), photovoltaic devices (Ravirajan et al. 2006), piezoelectric transducers (Wang et al. 2006), thin-film transistors (Lin et al. 2015), wastewater treatment (Singh et al. 2023) and hydrogen generation (Zayed et al. 2019), and numerous other applications. The observed phases in ZnO have wurtzite, zinc-blende, and rock salt (Wróbel and Piechota 2008; Yadawa et al. 2023) crystal structures.

Modulating the bandgap energy of ZnO via a doping process has become an important task, as it can significantly alter the optical and electrical properties of ZnO. Several dopants such as aluminum, chromium, indium, and gallium have been successfully incorporated into ZnO for use in different applications such as gas sensors and transparent conductive layers. Magnesium-doped ZnO has been used in optoelectronic applications, including deep UV sensing (Minemoto et al. 2000; Ip et al. 2004). Many researchers have reported that non-metal doping with N, C, or S impurities can effectively be modifying the optical properties and electronic structure of intrinsic ZnO (Bai et al. 2012; Kumari et al. 2019; Debbichi et al. 2013). Among non-metal dopants, sulfur (S) doped ZnO has more effective attention because of its size difference between S (1.84 A°) and O (1.40 A°) and high electronegativity (Yang et al. 2017a, b). It leads additional oxygen and zinc vacancies to develop, which promotes O2 adsorption and the capture of photo-induced electrons, resulting in outstanding optical characteristics and high photocatalytic efficiency (Zhang et al. 2012).

In this study, we have synthesized the pure ZnO NPs with a spherical shape, Mg-doped ZnO particles with a large diameter microsphere shape due to aggregation of particles, and also the S-doped ZnO particles with a flower-like thin nanosheet structure using sol–gel methods. Herein, MgSO4.7H2O and NH2CSNH2 were used for the high-quality doping of Mg and S in parent ZnO nanoparticles. The doping of Mg and S atoms brought about significant changes in the surface morphology, crystallinity, and optical properties of the hexagonal wurtzite structure of ZnO nanoparticles. The synthesized pure ZnO, Mg-ZnO, and S-ZnO nanoparticles were characterized using powder XRD, FESEM, FTIR, UV–Vis-DRS, XPS, PL, and BET surface area analysers. Furthermore, pure ZnO, Mg-ZnO, and S-ZnO nanoparticles were utilized for the degradation of Rhodamine 6G (Rh 6G) dye in presence of visible light emitting diode (Vis-LED) irradiation. In addition to these, a comprehensive evaluation has been conducted to estimate the impact of different operational parameters, including doped and undoped stoichiometry, solution pH, catalyst dosage, and radical trapping experiment using different scavengers such as tert-butyl alcohol (TBA), potassium iodide (KI), and benzoquinone (BZ) on the photocatalytic degradation kinetics of an aqueous solution of Rh 6G dye under Vis-LED irradiation at room temperature (RT).

Experimental procedure

Materials

Zinc acetate dihydrate (98%) was purchased from Sigma-Aldrich and it was used without further purification. Monoethanolamine (MEA) (100%, GR Merck) and ethanol were used as solvents. Magnesium (II) sulfate heptahydrate (MgSO4.7H2O) (99% extra pure, Sigma-Aldrich) and thiourea (NH2CSNH2) (98.5% pure, Loba Chemie) were also acquired for the experiments. Di-ionized water was used throughout the experiments. The synthesized samples were stored in the desiccators, which attained vacuum utilizing lab scale mechanical pump. Analytical-grade glass beakers (Durasil) were utilized for the experiments. The pH of the solution was monitored and kept constant using a digital pH meter (Toschcon CL 54 +).

Synthesis of ZnO, Mg-ZnO, and S-ZnO nanoparticles from sol–gel method

Zinc oxide (ZnO) sol was prepared as reported in our previous research paper (Yadawa et al. 2023) using the sol–gel method followed by doping magnesium and sulfur dopants into previously prepared ZnO to obtain the Mg-ZnO and S-ZnO nanoparticles. First, using Monoethanolamine as a stabilizing agent, zinc acetate dihydrate (1.09 g) was mixed with 3.05 mL of Monoethanolamine at room temperature for 10 min. Then, 10 mL of ethanol was added as a solvent to the previous solution and stirred continuously at 60 °C for 2 h to produce ZnO sol. To synthesize magnesium and sulfur-doped ZnO nanoparticles, 2 wt % of magnesium (II) sulfate heptahydrate was added for Mg-doped ZnO nanoparticles and 2 wt % of thiourea was added for S-doped ZnO nanoparticles to the previously prepared ZnO sol. The mixture was stirred for 2 h at 60 °C. Initially, the solution was entirely transparent, but towards the end of the synthesis, it turned milky white, confirming the synthesis of Mg-ZnO and S-ZnO nanoparticles. Mg-ZnO nanoparticles exhibited a yellowish-white powder color, which aids in the creation of Mg-ZnO powder. After producing the ZnO, Mg-ZnO, and S-ZnO sols, they were allowed to be converted into gelation-type sol at room temperature for 12 h before being preheated at 180 °C for 1 h and calcined in a muffle furnace at 500 °C for 2 h at a heating rate of 5 °C/min. Subsequently, these solid samples were crushed in mortar pastel to obtain a fine powder of ZnO, Mg-ZnO, and S-ZnO nanoparticles.

Characterization of nanoparticles

Microstructural characterization

A comprehensive investigation of the structural characterization of sol–gel synthesized ZnO, Mg, and S-doped ZnO nanoparticles were carried out using Powder X-ray Diffractometer (EMPYREAN-QTY1, Malvern PANalytical, Netherlands). The PXRD measurements were carried out in the 2θ range of 20–80° (step size of 0.003°) with Cu Kα (λ = 0.15406 nm) radiation. The qualitative elemental analysis was done by EDX, attached with FESEM (JSM-7900F, JEOL, Japan). Elemental mapping corresponding to BSE images was performed by EDXS. FESEM analysis, nanoparticles were gold (Au) coated (90 Sec) before introducing into the FESEM chamber. Accelerating voltage ranging from 5 to 10 kV was used to capture these images. For functional group tracing, FTIR analysis was performed (Spectrum Two, Perkin-Elmer).

Optical characterization

The Optical properties of synthesized nanoparticles were investigated using a UV–Vis NIR spectrophotometer (Cary 5000 with DRS 2500, Agilent Technologies) in the wavelength range of 200–800 nm to determine their absorbance and optical band gap. Photoluminescence (PL) analysis was carried out in order to gain a deeper understanding of the surface characteristic of the nanoparticles. The PL emission spectra of nanoparticles were recorded by an Agilent Cary Eclipse spectrophotometer with an excitation wavelength of 277 nm. During PL analysis, the excitation and emission monochromators were positioned perpendicular to each other. To gain insight into the various states responsible for PL emission, the experimentally obtained spectra were subjected to multipeak Gaussian fitting.

Measurement of photocatalytic activity

We first perform the adsorption in the dark then photocatalytic degradation with a concentration of 5 PPM Rhodamine 6G (Rh 6G) dye aqueous solution (pH 7.0) in a custom-made jacketed transparent vessel. In the photocatalytic degradation studies, we used a visible light emitting diode (Vis-LED) that emitted white light (R-41138967 DC 12 V-5050 Strip LED, 1 Amp.) as the visible-light source. Its spectra clearly indicated blue light emitted at around 450 nm and more broadband stokes-shift light emitted at around 500–600 nm. The Vis-LED unit size was 4 mm × 4 mm) and the LED array was not contagious, but they were spaced out at an average of 1.5 cm. A jacketed transparent double-wall glass photoreactor with a working volume of 1000 mL was wrapped with a 5 m long Vis-LED flexible strip containing 240 Vis-LED units. To eliminate the influence of stray light, the complete assembly is housed inside a black box. Using a visible light source in the photocatalytic process, we used Vis-LED. To investigate the visible light photocatalytic activity of the synthesized catalyst ZnO, Mg-ZnO, and S-ZnO powders, an aqueous solution with a different pH value 4, 7, 10, and 12 of an aquous solution of 5 PPM Rh 6G was used. Furthermore, to investigate the effect of catalyst dosage for the degradation kinetics, we have taken previously prepared 100 mL of Rh 6G aqueous solution with a different catalyst dosage as 5, 10, and 20 mg with constant dye concentration and other parameters. After that, prepared dye aqueous solution with catalyst were exposed to light to investigate the kinetics of photocatalysis, and 2 mL of solution is taken out and centrifuged after each 30 min interval. The centrifuged solution’s supernatant was collected and used for the UV–Vis measurement. We studied the kinetics of degradation by measuring the concentration of Rh 6G with time and recording the characteristics of its peak at 526 nm wavelength.

Results and discussion

X-ray diffractogram of powder samples

Figure 1(a–c) shows the PXRD patterns of pure ZnO, Mg-ZnO, and S-doped ZnO nanoparticles. The PXRD pattern of pure ZnO displays seven major peaks at 2θ values 31.88°, 34.57°, 36.36°, 47.71°, 56.80°, 63.09°, and 68.14°, which correspond to diffraction from (100), (002), (101), (102), (110), (103), and (112) planes, respectively, as shown in Fig. 1(a). The XRD patterns align well with pure ZnO nanoparticles (JCPDS: 01–080-0075), with the hexagonal wurtzite structure (Abed et al. 2015; Garcia-Martinez et al. 1993; Hoggas et al. 2015). The lattice constants of pure ZnO were calculated to be a = b = 3.2539 Å and c = 5.2098 Å (Abed et al. 2015; Garcia-Martinez et al. 1993). The powder XRD shows a polycrystalline ZnO, Mg-ZnO, and S-doped ZnO nanoparticles formation of the hexagonal wurtzite phase of ZnO, which can be indexed as a cubic system. The diffraction spectrum also shows that no additional secondary phases have formed with Mg dopant in the ZnO crystal lattice, and no substantial modifications are observed in the XRD pattern of the Mg-doped ZnO NPs. However, the intensity of the XRD peak decreases with Mg doping (shown in Fig. 1b) confirming the slender loss in crystallinity is due to the lattice distortion. Doping of Mg2+ ions into the crystal lattice of ZnO allows a minor amount of strain, which causes the lattice to exchange ions, resulting in a change in crystal regularity. However, very careful inferences indicate that the peak position shifts towards lower angle values as observed with Mg doping into the ZnO matrix, particularly for the peak located at (101) plane 36.36°, which is found to shift towards a lower value with Mg doping, which can be attributed to the replacement of Zn2+ ions by Mg2+ ions (Umaralikhan and Jaffar 2017). It has been extensively established in the literature that the insertion of dopant materials changes the lattice properties of the host materials due to variations in the atomic radii of the host materials. Furthermore, dopant ions may substitute Zn2+ ions in the host lattice of Mg2+ ions (Talam et al. 2012). However, the basic structure of ZnO NPs remains unchanged, keeping their original wurtzite structure. This suggests that the majority of the Mg2+ ions enter the lattice as substitution ions to replace the Zn2+ ions and do not occupy the vacant regions. Because the ionic radius of the substituted dopant Mg2+ (R = 0.66 Å) is less than that of Zn2+ (R = 0.74 Å) (Umaralikhan and Jaffar 2017, Labhane et al. 2015), the observed shift corresponds to a relatively small amount of lattice strain due to Mg2+ entering ZnO.

Fig. 1
figure 1

(ac) The powder X-ray diffractograms (XRD) of pure Mg and S-doped ZnO NPs calcined at 500 °C

Figure 1(c) shows the XRD patterns of S-doped ZnO samples. This XRD results show the unique peak with a diffraction angle (2θ) at 40.1 and 51.4° corresponding to the reflection plane is (102) and (103) represents a new phase of wurtzite ZnS (Ebrahimi and Yarmand 2019). Since the most intense peak of XRD can be ascribed as crystal growth with preferential orientation, we found the (100), (101), (102), (110), and (103) planes as the most intense planes in the X-ray diffraction pattern represents the hexagonal wurtzite structure of ZnO. Along the crystal plane of (101), magnesium (Mg) and sulfur (S) doping promotes grain size reduction from 19.458 nm to a minimum of 13.898 and 12.624 nm, respectively (Yang et al. 2017a, b; Yang et al. 2016). In both Mg and S doping elements, the grain size drops from the Scherer-Formula, indicating that a larger amount of grain size change occurs in the case of S dopant because it may form an impurity phase instead of entering the lattice of ZnO nanostructures.

The crystallite size was calculated with the help of the Debye-Scherer equation (Perumal et al. 2015; Patterson 1939).

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

where λ is the wavelength of Cu-Kα X rays (λ = 0.15406 nm), β is full width at half maxima (FWHM) of diffraction peaks, and θ is the diffraction angle. Although it is baffling to get exact values of crystallite sizes using the Debye-Scherer method, which is used to extract information on purely strain-related broadening.

Effect of doping on lattice parameters

The physical properties of pure and doped ZnO NPs can be assessed by observing the crystallite size, lattice parameters, lattice strain, and dislocation density of the given sample (Manikandan et al. 2018; Pradeev Raj et al. 2018). The lattice parameters of a wurtzite phase are calculated using Eq. (4), where a = b and c are the lattice parameters and dhkl is the interplanar distance corresponding to its Miller indices (hkl). The lattice strain (ε) for pure ZnO, Mg-ZnO, and S-ZnO were calculated by the following equation (Pradeev Raj et al. 2018; Vargas et al. 2021).

$$\varepsilon =\frac{{\beta }_{hkl}\mathrm{Cos}\theta }{4}$$
(2)

The variation in the average crystallite sizes and micro strains present in particles is measured by using the Williamson-Hall equation (Mote et al. 2012) as demonstrated in Table 1.

Table 1 Lattice parameters of pure ZnO, Mg and, S-doped ZnO NPs
$${\beta }_{hkl}\mathrm{Cos}\theta =\frac{0.9 \lambda }{D}+4\varepsilon \mathrm{Sin}\theta$$
(3)

Here, \({\beta }_{hkl}\) is denoted as the full width at half maximum (FWHM), θ is the Bragg diffraction angle, D is the average crystallite size (nm) in the direction perpendicular to the diffracting lattice planes, λ is the wavelength of the incident X-ray, and ε is the average microstrain in the diffracting volume.

$$\frac{1}{{{d}^{2}}_{hkl}}=\frac{4}{3}\left( \frac{{h}^{2}+{k}^{2}}{{a}^{2}}\right)+ \frac{{l}^{2}}{{c}^{2}}$$
(4)

The lattice constant a = b and c for a plane (100) and (002) plane is calculated by (Vargas et al. 2021).

$$a=\frac{\lambda }{\sqrt{3}Sin(\theta )}$$
(5)
$$c=\frac{\lambda }{Sin(\theta )}$$
(6)

The dislocation density (δ) is calculated from Eq. (7) (Vargas et al. 2021).

$$\delta =\frac{1}{{D}^{2}}$$
(7)

Table 1 shows that, when the Mg2+ ion replaces the Zn2+ ion in the lattice, the lattice parameter values increase. The increase in lattice parameters can be attributed to the elevation of crystal structure distortion monitored by Mg2+ incorporation. We calculated the lattice strain and found that the lattice strain increases after doping, causing distortion in the local crystal structure because of the differences in the atomic radius of Zn2+ (0.74 Å) (Perumal et al. 2015) and Mg2+ (0.57 Å) (Labhane et al. 2015).

Figure 2 shows a plot of as-prepared pure and dopant ZnO nanoparticles with 4sinθ along the x-axis and βhkl Cosθ along the y-axis. The crystallite size was calculated from the y-intercept of the linear fit, and the strain was calculated from the slope of the fit. Equation 3 represents the uniform deformation model (UDM) (Mote et al. 2012), in which the strain was considered to be uniform in all crystallographic directions, thereby accounting for the crystal’s isotropic character. Therefore, material properties are unaffected by the direction in which they are measured.

Fig. 2
figure 2

Williamson-Hall equation plot of βhkl Cosθ vs 4Sinθ of pure ZnO, Mg-ZnO, and S-ZnO NPs

FESEM images, EDX, and mapping analysis

Figure 3a, d, b, e, c, f represents the FESEM analysis of sol–gel prepared ZnO, Mg-ZnO, and S-ZnO nanoparticles. These show the surface morphology at magnifications is × 30,000 and × 50,000, respectively. FESEM images of ZnO nanoparticles as seen to be spherical (Vishwakarma and Singh 2020) with a size of 25 to 30 nm diameter. The FESEM images of Mg-doped ZnO nanoparticles, it is evident that the particles undergo surface aggregation and form a large number of regular microspheres with varying diameters in the range of 0.3 to 0.6 µm. The aggregation of particles on the surface is attributed to the high surface energy of the synthesized Mg-doped ZnO nanoparticles (Priscilla et al. 2021; Roxy et al. 2021). The surface morphologies and microstructure of S-doped ZnO nanoparticles exhibit a flower-like nanosheet structure (Yang et al. 2017a, b; Ardakani and Rafieipour 2018). These S-doped ZnO nanosheets possess well-defined hexagonal nanostructures with sharp edges and extremely narrow thicknesses of approximately 15 to 20 nm (Fujita et al. 2005). Energy-dispersive X-ray spectroscopy (EDX) analysis was used to determine the chemical composition of the elements in ZnO, Mg-ZnO, and S-ZnO nanoparticles. The obtained EDX spectra of ZnO demonstrated the presence of various elements, with Zn (53.0%) and O (45.6%) being predominant elements, as depicted in Fig. 3g. EDX spectra of Mg-doped ZnO nanoparticles clearly revealed the elemental composition of Zn (32.4%), O (58.4%), and Mg (9.2%) in Fig. 3h. From the EDX spectrum of S-doped ZnO nanostructures, its elemental composition was confirmed to be Zn (29.3%), O (52.1%), and S (18.7%) in Fig. 3i. It gives evidence of S atoms successfully incorporated into the ZnO nanostructures. The addition of Mg and S doping elements into the ZnO nanostructure changed the structural and optical properties of ZnO significantly.

Fig. 3
figure 3

(a, d, b, e, d, f) The FE-SEM morphology of ZnO, Mg-ZnO, and S-ZnO NPs, respectively, at 30 and 50 kX magnification; gi EDX; and jl elemental mapping analysis of ZnO, Mg, and S-doped ZnO NPs, respectively

Figure 3j–l displays the mapping analysis of ZnO, Mg-doped ZnO, and S-doped ZnO nanostructures, respectively. The distributions of these two elements like Zn and O are uniform in ZnO nanoparticles. The dissemination concentration of O is smaller than that of Zn which is shown in Fig. 3j. The Zn concentration in the mapping distribution of ZnO is greater than that of the EDX results. As a result, the results indicated that Zn is the main component of ZnO, and the O content is low but uniformly distributed on the surface of ZnO nanoparticles. Figure 3k represents the mapping analysis of Mg-doped ZnO nanostructures, and the element Mg, Zn, and O are uniformly distributed on whole surfaces of ZnO. Mapping analysis of S-doped ZnO nanostructures also observed that the element Zn, S, and O are uniformly distributed on ZnO surfaces. Also, Fig. 3l shows the homogeneous distribution of the S element in the S-doped ZnO powders, and the S concentration is greater as compared with the Zn and O elements.

Fourier transformed infrared (FTIR) spectra analysis

Figures 4a, b represents the FT-IR spectra of as-prepared ZnO, Mg-ZnO, and S-doped ZnO NPs in the range of 4000–700 cm−1 and 700–450 cm−1 wavenumber, respectively. In the IR spectra of pure and doped ZnO samples wide band was observed due to the presence of hydroxyl group (-OH) at a wavenumber of 3450 cm−1. The composite nanoparticles exhibit several IR absorption peaks, which are the combination of the stretching bonds and bending vibrations of Zn–O, Zn-OH, and Mg-ZnO (Vargas et al. 2021) in between the IR region of 600–450 cm−1 (Fig. 4b). Mg-ZnO and Mg-O bands are observed to present at a low wavenumber of 490, 498, and 602 cm−1 for the Mg-doped ZnO sample (Vargas et al. 2021). The IR spectra in Fig. 4a show that the doping of Mg and S atoms increased the intensity as well as the broadening of IR peaks with slight displacement in comparison to ZnO NPs. The change in the peak position indicated the successful incorporation of Mg and S into the hexagonal crystal structure of ZnO (Talam et al. 2012; Labhane et al. 2015).

Fig. 4
figure 4

a, b The FT-IR spectra of ZnO, Mg-ZnO, and S-doped ZnO nanoparticles

UV–Vis diffuse reflectance spectra (DRS) and energy band gap calculation

The light absorption properties of synthesized ZnO-NPs with doping of Mg and S were obtained with a UV–Vis spectrophotometer in the wavelength range of 200–800 nm at room temperature (RT). Figure 5a shows the absorbance spectra of as-synthesized ZnO, Mg-ZnO, and S-ZnO samples at RT. The optical bandgap (Eg) was calculated using the Tauc method (Aga et al. 2022; Rana et al. 2015) indicated in Fig. 5b–d. Typically, the optical band gap (Eg) for the synthesized ZnO, Mg, and S-doped ZnO NPs could be obtained by plotting (αhν)2 versus hν, where α is the absorption coefficient, h is the Planck’s constant, ν is the frequency of the radiation, and hν is the photon energy. The calculated value of the energy band gap of ZnO, Mg-ZnO, and S-doped ZnO NPs were 3.05, 2.93, and 2.32 eV, respectively. Moreover, this flower-like nanosheet structure of sulfur doped ZnO (S-ZnO) particles has responsible to reduce the band gap from 3.05 to 2.32 eV.

Fig. 5
figure 5

a UV–Vis DRS data in terms of absorbance and bd Tau-plots used for extracting the energy band gap of ZnO, Mg-ZnO, and S-ZnO NPs, respectively

The nanoparticles prepared from the sol–gel method show a red shift in the optical band gap, giving a value of Mg-doped ZnO and S-doped ZnO from 3.05 to 2.93 eV and 2.32 eV, respectively. The decrease in bandgap might be attributed to the formation of defects with the introduction of doping elements (Zhuang et al. 2011; Zheng et al. 2007).

X-ray photoelectron spectroscopy (XPS) analysis

The surface structure and chemical states of samples ZnO, Mg-ZnO, and S-doped ZnO were investigated using X-ray photoelectron spectroscopy (XPS), and the corresponding XPS elemental spectra are shown in Fig. 6a–d. Zn 2p XPS spectra are shown in Fig. 6a for ZnO, Mg, and S-doped ZnO nanopowder. The two well-defined XPS peaks of Zn 2p can be seen at 1021.87 eV and 1044.97 eV in pure ZnO attributing to 2p3/2 and 2p1/2 spin–orbit interaction. The binding energy (B.E.) difference in the corresponding two peaks is 23.1 eV which indicates that the Zn atom is in a + 2-oxidation state (Wu et al. 2017). But in the case of Mg-ZnO and S-ZnO samples, Zn 2p XPS spectra slightly shifted towards the higher binding energy with diminished peak intensity.

Fig. 6
figure 6

a Zn2p3/2 and b O1s XPS peaks of ZnO, Mg-ZnO, and S-ZnO NPs and c Mg1s and d S2p3/2 XPS peaks of Mg-doped and S-doped ZnO NPs

In Fig. 6b, the O 1 s peak of the high-resolution spectrum were Gaussian fitted into three deconvoluted peaks of O1, O2, and O3 for pure ZnO sample. The O1s peak spectra can be decomposed into three components O1, O2, and O3 located at a particular binding energy of 530.56 eV, 531.79 eV, and 532.58 eV. The low binding energy peak located at 530.56 eV (O1) corresponds to the O2− ions within the hexagonal wurtzite structure of ZnO (Coppa et al. 2003), while the peak at 531.79 eV (O2) attributed to the O2− in the oxygen deficient region within the matrix of ZnO (Lai and Lee 2008) and the higher binding energy peak located at 532.58 eV (O3) originates to the presence of hydroxyl group (OH) on the surface of ZnO (Chen et al. 2000). Conversely, the O1s XPS spectra of the Mg and S-doped sample is deconvoluted into only one peak at around 532.42 eV and 532.11 eV, respectively, which can be attributed to hydroxyl groups (OH) are presented on the surface of the ZnO (Chen et al. 2000). From Fig. 6c, it can be obtained that the bonding energy peak for Mg 1 s in Mg-doped ZnO is 1305.31 eV, and Mg can be expected to be in the + 2-oxidation state (Aksoy et al. 2012). Figure 6d shows the two well-defined S2p core level peak spectra in the form of S2p3/2 and S2p1/2, respectively. These S2p3/2 spectra were deconvoluted into the two peaks at around 161.91 eV for S2− ions and 163.15 eV for sulfur-related compound SO2, respectively, while another higher binding energy S2p1/2 peak spectra deconvoluted into two peaks at around 168.88 eV and 169.66 eV, which is related to sulfate ion (SO4), respectively (Rodriguez et al. 1999).

Photoluminescence (PL) spectroscopy

The photoluminescence emission spectra have been affected by numerous aspects such as inter-level separation of the electronic states, lifetimes, charge transfer, and separation efficiency of the photogenerated carriers (Wu et al. 2017). Figure 7 shows a comparison of emission spectra recorded in the visible region of calcined powders of zinc oxide, Mg-doped ZnO, and S-doped ZnO nanopowders generated by the bulk sol–gel method. In the visible region, two emission bands have been observed, one at 487 nm and the other around 523 nm. The second band can be attributed to the transition from the conduction band to the valence band since the energy (~ 2.37 eV) is close to the band gap calculated using the previously presented DRS data (~ 2.32 eV). The PL emission intensity of Mg-doped ZnO is greater as compared to pure ZnO, indicating the presence of more surface oxygen vacancies in Mg-doped ZnO sample because there is less recombination of charge carriers (electrons and holes) within the material. Conversely, in the case of S-doped ZnO nanoparticles, reduction in PL emission intensity can be attributed to enhanced carrier lifetime (Mirzaeifard et al. 2020), suggesting the sulfur-doped ZnO nanoparticles have longer-lived carriers.

Fig. 7
figure 7

Emission spectra of three samples recorded for two peaks in the range (i) 470–500 nm and (ii) 510–540 nm

BET surface area and pore size analysis

Brunauer–Emmett–Teller (BET) analysis was carried out to access the specific surface area (SBET), average pore diameter (BJH), and pore volume of sample ZnO, Mg-ZnO, and S-doped ZnO nanoparticles. Figure 8a displays the N2 adsorption–desorption isotherms from the BET graph and Fig. 8b pore size distribution of sample ZnO, Mg-ZnO, and S-ZnO, respectively. According to the Brunauer’s classification of five types of adsorption isotherms, the adsorption isotherms and pore size distribution of sample ZnO, Mg-ZnO, and S-doped ZnO nanoparticles indicated that the type IV isotherm, and the hysteresis loop belong to H1 (Zheng et al. 2022; Sing 1985).As increases pressure, multilayer adsorption progressively transforms into capillary condensation. This phenomenon causes the adsorption isotherm in a specific pressure range to rapidly grow, causing the curve to get steeper and the adsorption amount to increase significantly. When P/P0 is close to 1, adsorption saturation occurs, and the adsorption–desorption curve tends to be flat, suggesting that the aperture range has reached its extreme limit (Sing 1985). Therefore, the isotherm indicates that the microspores are filled with the N2 gas at extremely low pressure.

Fig. 8
figure 8

a Nitrogen adsorption–desorption isotherms and b pore size distribution of pure ZnO, Mg-ZnO, and S-ZnO NPs, respectively

Table 2 demonstrates the diminished specific surface area, pore diameter, and pore volume of magnesium and sulfur-doped samples Mg-ZnO (13 m2/g), and S-ZnO (5 m2/g) as compared with pure ZnO (18 m2/g) (Sivakami et al. 2016). The reduction of specific surface area, pore diameter, and pore volume because of the agglomeration of Mg-doped ZnO nanoparticles to form a regular microsphere structure.

Table 2 Textural properties of ZnO, Mg-ZnO and S-doped ZnO samples calcined at 500 °C

Photocatalytic degradation studies

Photocatalytic activity of Rhodamine 6G (Rh 6G) dye

The photocatalytic degradation activity of the pure ZnO, Mg-ZnO, and S-ZnO nanoparticles were analyzed by using aqueous solution of Rhodamine 6G (Rh 6G) dye under visible light emitting diode (Vis-LED) source (R-41138967 DC 12 V-5050 Strip LED, 1 Amp.). Thereby, a high surface area facilitates the adsorption of reaction molecules, while small, spherical particle sizes are beneficial for minimizing internal diffusion resistances of molecules (Wang and Lin 2008). To demonstrate the effect of higher absorption in low wavelength regions, we performed the degradation of Rh 6G dye in the presence of visible light at constant room temperature (RT) in the presence of ZnO, Mg-ZnO, and S-ZnO catalyst samples. Figure 9a–c shows the UV absorption spectra of aqueous dye solutions after being exposed to Vis-LED source in the presence of nanoparticle samples at various time intervals. These data show that dye degradation is effective, as the intensity of the absorption peaks decreases with time.

Fig. 9
figure 9

a–c UV–Vis absorbance spectra and d kinetics study of Rh 6G with ZnO, Mg-ZnO, and S-ZnO NPs, respectively, under visible light irradiation

The reaction kinetics of Rhodamine 6G (Rh 6G) degradation with photocatalyst was investigated by the Langmuir–Hinshelwood model (Perween and Ranjan 2017; Yadawa et al. 2023; Singh et al. 2021), which shown in Eq. 8.

$$-\mathrm{ln}\left(C/{C}_{0}\right)=kt$$
(8)

Here, k is the reaction rate constant in (min−1). The rate constants plots have been deduced from ln(C/C0), (where C and C0 are the instantaneous and initial concentrations of Rh 6G, respectively) versus irradiation time (t) curve by linear fitting. The kinetics curves for the decay of the signal at a corresponding peak wavelength (λ = 526 nm) with time (up to 9 h) are presented in Fig. 9d.

The degradation rate constant of pure ZnO nanoparticles (kZnO = 0.00344 min−1) is approximately 3.2 times faster than the Mg-ZnO (kMg-ZnO = 0.00104 min−1) and S-doped ZnO (kS-ZnO = 0.00108 min−1) particles at room temperature because due to the high surface area of the pure ZnO nanoparticles could provides more active surface reaction sites as compared to Mg and S-doped ZnO particles.

A comparison study of the photocatalytic dye degradation rate constant (min−1) measured of our samples ZnO, Mg-ZnO, and S-ZnO to other reported values in various systems in bulk or thin film forms are reported in Table 3.

Table 3 A comparison of the photocatalytic degradation rate constant values with different catalysts reported in the literature

Effect of solution pH and catalyst dosage on the photocatalytic activity

Since industrial wastes can contain a range of pH-valued solutions, it is essential to evaluate the performance of the photocatalysts in a wide range of pH values of the reactant solution. Besides, pH play a crucial role during the photocatalytic degradation activity of Rh 6G. As a result, this work demonstrates the photocatalytic activity of pure ZnO nanoparticles at four different pH values. By keeping a constant catalyst content and dye concentration throughout the experiments, varied pH values in the range of 4–12 were used. Figure 10a depicts the effect of pH on Rh 6G degradation kinetics and it is observed that the photocatalytic degradation rate constant in basic medium (pH = 10 and 12) is lowest due to the poor generation of OH radicals and decrease in its reaction with Rh 6G dye molecules (Thejaswini et al. 2016). Whereas, the photocatalytic degradation in acidic medium is higher at pH value 4. The highest photocatalytic degradation rate is achieved with a neutral pH (7) conditions. Overall, it was found that the neutral solutions (pH 7) demonstrated the best photodegradation but acidic and basic conditions demonstrated considerably lower and lowest photodegradation, respectively (Zheng et al. 2022; Kumar Jayaraj et al. 2018). There is no longer a favorable contact between neutral dye molecules and the negatively charged surface of the pure ZnO nanoparticles photocatalyst when the pH of the solution is higher because the cationic dye molecules are converted to neutral form. It is widely accepted that the degree of interaction between cationic dye molecules and the negatively charged OH radicals affects the photocatalytic degradation. Thejaswini et al. revealed that the effect of pH values on K co-doped Al-ZnO NPs was detected, with the maximum rate of degradation observed at pH 8, resulting in identical results (Thejaswini et al. 2016).

Fig. 10
figure 10

a The effect of solution pH and b catalyst dosage on Rh 6G photodegradation using pure ZnO NPs, respectively

Figure 10b depicts the results on the effect of photocatalyst dosage in the degradation of Rh 6G dye molecules. The amount of pure ZnO nanoparticles photocatalyst content is varied from 50 to 200 mg, to study the effect of degradation with increasing photocatalyst quantity at constant volume of dye solution. The results show that the degradation rate constant increases from 50 to 100 mg dosage using a series of 5 ppm of dye concentrations at optimized neutral (pH 7) conditions. The reason behined the enhanced degradation rate constant is attributed to the increased exposure of dye molecules to the catalyst, the greater adsorption of dye molecules onto the catalyst’s surface, and the consequent generation of highly reactive radical intermediates that facilitate faster dye degradation in a photocatalytic process using ZnO as the catalyst. This enhances the photocatalyst’s adsorption of hydroxyl ions, resulting in the generation of radical intermediates and faster dye degradation (Thejaswini et al. 2016). However, beyond the 100 mg dosage of photocatalyst, the degradation rate constant of Rh 6G decreases up to 200 mg dosage in presence of Vis-LED irradiation. This marginal decrease in degradation rate constant at 200 mg dosage of the catalyst may be due to the aggregation of photocatalyst, due to the increase in the density of the catalyst particles at the area of illumination, which eventually results in the light scattering effect that prevents effect photocatalytic degradation. A similar results has been reported for the degradation of dyes by TiO2 and ZnO materials (Goncalves et al. 1999). Hence, based on the observed data, the optimal amount of photo catalyst dosage is found to be 100 mg.

Radical trapping experiment

Radical trapping experiment is performed to identified which type of chemical reactive species is involved in the photocatalytic degradation to degrade the Rh 6G dye with 5 PPM solution of fixed concentration. Figure 11 demonstrates the radical trapping experiment is the track variation of C/C0 of the aqueous dye solution with different types of scavenger molecules added such as tert-butyl alcohol (TBA) for hydroxyl (OH) radicals, potassium iodide (KI), and benzoquinone (BZ) for superoxide (O2) radicals in the experiment. The role of scavenger used in the aqueous solution of Rh 6G dye could inhibit the photocatalytic degradation rate constant by the trapping specific species (Zheng et al. 2022). By using scavenger potassium iodide (KI) and benzoquinone (BZ) in the aqueous solution of Rh 6G, then it does not cause significant effect on the photocatalytic degradation rate constant upon comparing without using scavenger (no scavenger). When KI and BZ scavengers are introduced into the photocatalytic reaction solution of Rh 6G, then the observed degradation efficiency is lowest upon comparing to the solution which have no scavengers shown in Fig. 11.

Fig. 11
figure 11

Photocatalytic degradation of Rh 6G by pure ZnO nanoparticles under Vis-LED irradiation in the presence of scavengers: tert-butyl alcohol (TBA), potassium iodide (KI), and benzoquinone (BQ) to capture OH radicals

However, by adding TBA scavenger in the photocatalytic reactant mixture, then the observed degradation efficiency is slightly lower than the no scavenger solution of Rh 6G. Therefore, in this radical trapping experiment, it can be clearly understood that the photodegradation becomes slow (Jayaraj et al. 2018) with the presence of particular scavengers molecules for a particular radical species (OH and O2). Thus, the obtained results in Fig. 11 imply that the C/C0 ratio is less when BQ scavenger is added in the photocatalyst reactant mixture, and then it is suggested that the superoxide radicals (O2) are the foremost responsible in the photodegradation of Rh 6G rather than the hydroxyl radicals (OH). A similar results have been reported by the similar kind of contribution of the superoxide radicals (O2) for the photodegradation with organic pollutants Rhodamine B (Rh B) (Liu et al. 2017).

Conclusion

Magnesium and sulfur-doped zinc oxide (ZnO) nanoparticles can be easily synthesized using the non-aqueous sol–gel route. The XRD results confirm that the phase structure of ZnO is hexagonal, and the crystallite size (d) decreases with the doping of Mg and S atoms due to the development of lattice strain (ɛ) in the ZnO crystal lattice. The effect of Mg and S doping element in the ZnO crystal lattice resulted in a reduced energy band gap of Mg-ZnO (2.93 eV), and S-ZnO (2.32 eV) as compared to pure ZnO (3.05 eV) nanoparticles. The high surface area of pure ZnO nanoparticles has responsible to enhanced the photocatalytic degradation rate constant for Rh 6G dye with a factor of 3.2 times as compared to the Mg and S-doped ZnO particles under visible light emitting diode (Vis-LED) irradiation at room temperature. Additionally, it has been found that the dose of the photocatalyst as well as the pH values of the reactant mixture have a significant impact on the photocatalytic process. The highest possible degradation rate constant (0.00344 min−1) was achieved at neutral (pH 7) reactant solution and optimal 100 mg of catalyst dosage. Relatively lower and significantly lower degradation rate constants were achieved in the case of acidic and basic media, respectively. In addition to this, the superoxide radicals (O2) are the foremost responsible in the photodegradation of Rh 6G rather than the hydroxyl radicals (OH).