Introduction

In recent years with the invention of technology and enhancement in different aspects of science, man has gained many benefits. Humans all across the globe are facing the water pollution, one of the major problems of humanity. With the increase in industrial areas, water pollution has become a dangerous element for humans, animals, and organisms living in water (Ahmed et al. 2017). One study reported previously has revealed that annually 0.7 million tons of synthetic dyes is being produced and 15% of the total production of these dyes is being discharged and poured into the water by different industries including paint, food, cosmetics, paper, and textile (Anwer et al. 2019). Discharge of dyes into water is extremely hazardous to the aquatic organisms and for humans. Another study has revealed that more than 4 million children are affected daily due to wastewater-caused diseases. Furthermore, it has also been reported that more than 1.2 billion people across the world have no access to pure water (Mansour et al. 2020). Not only dyes are contaminating water, but there are other toxic pollutants including pesticides, heavy metals, compounds containing phenol, microplastics, and pharmaceutical compounds (Rosenwinkel et al. 2005; Ma et al. 2009; Owa 2013; Palma et al. 2010; Puckett 1995).

The reported data on water pollutants indicated that the development of an efficient, eco-friendly, reliable, and cost-effective method is needed to purify polluted water. Different methods were adopted by researchers to clean the water in past (Choudri et al. 2020; Shannon et al. 2010; Yongabi 2010). These methods include advanced oxidation process, flocculation, ion exchange, biological treatment, coagulation, sedimentation, adsorption, and membrane filtration (Crini and Lichtfouse 2019; Gogate and Pandit 2004; van Loosdrecht et al. 2016). Among these methods, the advanced oxidation process is the most effective process to degrade water contaminations by of reduction and oxidation (Ghernaout 2020; Khan et al. 2020). Among advanced oxidation processes, the photocatalysis is considered as the reliable process. The photocatalysis process works on the principle of the production of radicals that react with the pollutants in water and oxidize them (Sacco et al. 2018).

With the enhancement in research, different materials have gained attention due to their potential application as photocatalysts. Synthesized semiconductor photocatalysts are being investigated by researchers for dyes removal from wastewater (Ge et al. 2019). N-type and p-type semiconductors are being investigated for photocatalysis application which includes NiO, Fe2O3 and ZnO, TiO2, respectively (Medhi et al. 2020). N-type semiconductor TiO2 was the first material used as photocatalyst for wastewater treatment (Hussain et al. 2010).

Among different transition metal oxide p-type semiconductors, NiO is one of the active materials for different applications such as gas sensors, photocatalyst, magnetic storage devices, and solar cells due to prominent electrical properties, magnetic properties, optical properties, eco-friendly, less toxic, high chemical and thermal stability, economical, easy to synthesize, and photosensitive nature. NiO has wide gap ranges from 3.2 to 4 eV having cubic crystal structure FCC with lattice constant “a” 4.17 Å and space group Fm3m (Arif et al. 2019; Sheena et al. 2014). Due to the wide bandgap of NiO, these materials are less efficient for dyes degradation in visible light because wide bandgap possesses high electron/hole pair recombination rate. Doping is a method that changes the structure, shape, and optical properties of host materials due to different properties of dopant material as compared to host material (Shakil et al. 2020). To bring the NiO in the visible range for photocatalysis and make it efficient material for photocatalysis, its bandgap is required to decrease by doping as one of the methods with different dopants (Hussain et al. 2021). By doping transition metals in NiO such as Cd, Ag, Co, Bi, and Fe, the bandgap of the NiO can be tuned remarkably (Al-Sehemi et al. 2014; Sagadevan and Podder 2015). By altering structural and optical properties of NiO through the doping process, higher efficiency of photocatalysis as compared to NiO is achieved (Khairnar and Shrivastava 2019).

Investigation of NiO and doped NiO as photocatalyst is one of the active topics in research currently. Ranjbar et al. have synthesized NiO nanoparticles through solid-state thermal reaction by decomposing nanostructures of nickel acetate which was obtained through powder nickel acetate sublimation. Effect of temperature of sublimation was investigated for NiO nanoparticles at four different temperatures. Cubic particles having average crystallite size in the range of 30 to 50 nm were observed through XRD analysis. Degradation of MB dye was investigated under visible-light irradiation. It was observed that NiO sample prepared at 350 °C temperature has greater efficiency of degradation up to 98% while decolorizing MB dye after 120-min irradiation (Ranjbar et al. 2015). Diallo et al. investigated the biosynthesized NiO particles for decolorization of MB dye under UV light and visible light. Average crystallite size 14 nm was calculated and confirmed for cubic NiO prepared samples through XRD, HRTEM, and FTIR studies. It was observed that biosynthesized NiO nanoparticles were effectively capable of degrading MB dye under suitable light irradiation (Diallo et al. 2018). Muhammad Imran et al. have adopted a green synthesis approach to synthesize Ni and NiO nanoparticles for photocatalysis application by using Hordeum vulgare seeds as a capping agent. It has been observed that the green synthesis prepared NiO is an efficient photocatalyst to degrade MB dye which followed first-order kinetics (Din et al. 2020). Ghazal et al. synthesized silver-doped NiO nanoparticles through Cydonia oblonga plant extract-mediated sol–gel technique. Several properties were observed and revealed through appropriate techniques for the confirmation of the prepared samples and the application. An increase in particle size of Ag-doped NiO has been observed with the increase in silver concentration revealed by XRD. The photocatalytic application was done by degrading RhB dye under UV light for 3 h and 20 min of irradiation. The result revealed 75% efficiency to remove RhB dye from wastewater for Ag-doped NiO nanoparticles (Ghazal et al. 2020).

In this article, NiO and novel Cd–Ag co-doped NiO, CdxAg0.30Ni0.70−xO (X = 0.0, 0.05, 0.10 and 0.15) nanoparticles have been synthesized through the sol–gel technique for wastewater treatment through degradation of RhB dye. Structural, morphological, and optical properties were investigated through X-ray diffraction (XRD), field emission scanning electron microscopy (FESEM), energy-dispersive X-ray (EDX), Fourier transform infrared (FTIR), photoluminescence (PL), and ultraviolet–visible (UV–Vis) spectroscopy, respectively. These properties would be highly advantageous for the usage of NiO and co-doped NiO as a photocatalyst in photocatalysis applications.

This work had been carried out at Department of Physics, University of Gujrat, Gujrat, Pakistan, during January–March 2021.

Materials and methods

Materials

For the sol–gel method to synthesize NiO and Ag–Cd co-doped NiO nanoparticles, nickel nitrate hexahydrate (Ni(NO3)2·6 H2O), silver nitrate (AgNO3), and cadmium nitrate tetrahydrate (Cd(NO3)2·4 H2O) salt precursors were used, while citric acid (C6H8O7) was used as the chelating agent. And ammonia (NH3) solute was utilized to maintain the pH of the samples (Ba-Abbad et al. 2015). All these materials were purchased from Sigma–Aldrich and used without any further purification.

Synthesis of nanoparticles

Synthesis of NiO and Ag–Cd co-doped NiO, CdxAg0.30Ni0.70−xO (X = 0.0, 0.05, 0.10 and 0.15) has been done by adopting sol–gel method. This technique is eco-friendly, non-toxic, cost-effective, and easy, which gives refined morphologies of the prepared samples. The detail for the preparation of proposed samples is given in the following.

To synthesize NiO, the calculated amount of nickel nitrate was dissolved in distilled water; after that, the calculated amount of citric acid with appropriate ratio with nickel nitrate was dissolved in the prepared salt solution. The mixture was kept at a magnetic stirrer for half an hour, and then, the pH was maintained up to 9–10 by adding ammonia solution dropwise. 180 °C temperature was set after maintaining pH, and the solution was kept at stirring until thick gel was formed. This formed gel was then dried in the open air and ground into fine powder. At last, this fine powder was calcinated at 550 °Ctemperature in a muffle furnace for 4 h and NiO nanoparticles were obtained (Gawali et al. 2016). A similar approach was adopted for the synthesis of Ag-doped NiO, Cd-doped NiO, and Ag–Cd co-doped NiO nanoparticles. The calculated amount of silver nitrate, cadmium nitrate, and nickel nitrate salts will be mixed in distilled water, and the rest will be the same procedure. The flowchart of the whole process is shown in Fig. 1. A similar mechanism was performed for the synthesis of NiO except for the addition of dopant precursors.

Fig. 1
figure 1

Flowchart of preparation of Ag–Cd co-doped NiO nanoparticles

Photocatalytic activity

The photocatalytic performance of NiO and Ag–Cd co-doped NiO samples was investigated through the degradation of RhB dye. For degradation purposes, dye solution was made by adding 2 ppm RhB dye in 50 mL distilled water. After that, 10 mg of each sample was added to the 50 mL dye solution separately in five beakers. To attain adsorption/desorption equilibrium, the solution was stirred in dark for half an hour. After half an hour, 5 mL solution was taken, and absorption spectra were obtained which is zero-time absorbance. After that, the solution was exposed to visible light (homemade metal halide photocatalysis reactor of 400 W power) and degradation was checked by collecting 5 mL solution after 20 min through a UV-1800 ultraviolet–visible spectroscope. The whole process of photocatalysis was performed for 2 h and 20 min. The RhB concentration was examined through absorption spectra of all degraded samples at 552 nm wavelength, and the calibration curve was plotted as shown in Fig. 2. The correlation coefficient (R2) was determined also.

Fig. 2
figure 2

Calibration curve of RhB dye

The percentage degradation efficiency was calculated using the following formula (Tahir et al. 2020b):

$$\% \,{\text{ degradation}} = \left[ {{1} - C/C_{0} } \right] \times {1}00.$$
(1)

Here, C0 is the concentration of solution without light irradiation and C is the concentration at a maximum irradiation time of 140 min.

Rate of reaction for the degradation of RhB was calculated by using the following formula (Malik et al. 2018; Tahir et al. 2018):

$$\ln \left( {C_{0} /C} \right) = k \cdot t$$
(2)

where k is called the reaction rate constant and t is the irradiation time.

Characterization techniques

X-ray diffraction technique (Bruker D8) with Cu-kα (λ = 1.541874 Ǻ) with a step of 20/min was used for investigation of structural properties in 2θ range 30°–90°. Characterization of elemental analysis and surface morphology of the synthesized samples was done utilizing field emission scanning electron microscopy (TESCAN MAIA3). Fourier transform infrared (FTIR-4100 type-A, JASCO) spectroscopy was employed to reveal the presence of functional groups in samples. Emission spectra were obtained through photoluminescence spectroscopy (FP-8200 spectrofluorometer, JASCO) in the range of 380 nm to 500 nm with 380 nm excitation wavelength. Finally, bandgap energy and photocatalytic activity were investigated through a UV-1800 ultraviolet–visible spectroscope.

Results and discussion

Structural analysis

X-ray diffraction technique was utilized to investigate the structural properties of the prepared samples. XRD graph of NiO and Ag–Cd co-doped NiO is shown in Fig. 3. In this graph, five peaks in the range of 30°–90° can be observed which were indexed as (111), (200), (220), (311), and (222), respectively. This XRD peaks are well consistent with Joint Committee on Powder Diffraction Standards (JCPDS) card no. 78–0643 which revealed the formation of the cubic structure of all prepared samples having space group Fm-3 m (Dehno Khalaji 2015). It has been observed that the peaks were slightly shifted toward a higher angle and the intensity of peaks was also decreased with an increase in doping. This behavior is evidence of Ag and Cd co-doping in NiO (Ahmed and Nabi 2020). A decrease in intensity improved the crystallinity of doped samples. The average crystallite size was determined using the Debye–Scherrer formula through full width at half maxima (FWHM) of the observed peaks (Table 1).

Fig. 3
figure 3

XRD graph of NiO and Ag–Cd co-doped NiO, CdxAg0.30Ni0.70−xO (X = 0.0, 0.05, 0.10, and 0.15) nanoparticles

The average crystallites size of NiO was 28 nm. It has been observed that the crystallite size was increased with Ag doping from 28 to 29 nm but decreased again with Cd doping. Also, the lattice parameter ‘a’ was decreased with an increase in doping. This decrement can be ascribed to few aspects, including greater ionic radii of Cd and Ag as compared to Ni, production of interstitial and vacancy defects due to doping and strain due to temperature (Al Boukhari et al. 2020). The average crystallite sizes and lattice parameters are shown in Table 1. Further, no additional peak was observed in all samples which is an indication of the purity of all samples. High crystallinity and smaller crystallite sizes of these materials lead to the prediction that these samples can be utilized as photocatalysts. These XRD results are matched with previously reported studies of NiO and doped NiO nanoparticles (Dehno Khalaji 2015; Kannan et al. 2020; Kerli et al. 2020; Ethiraj et al. 2020).

Table 1 Average crystallite sizes of the prepared samples of NiO and Ag–Cd co-doped NiO nanoparticles
Table 2 Photocatalytic performance comparison of doped NiO samples

Morphological analysis

FESEM was employed to investigate surface morphologies of the prepared samples. The FESEM images of NiO and Ag–Cd co-doped NiO are shown in Fig. 4. It is seen that the NiO has cubic-shaped particles, confirming its FCC structure and in good agreement with XRD data, while upon doping the surface morphologies of doped NiO changed from cubic-like particles to spherical-shaped particles which changed due to greater ionic radii of Ag and Cd as compared to Ni. Agglomeration can be observed in all samples as shown in Fig. 4. Agglomeration was increased with doping due to intermolecular forces and the magnetic interaction of particles (Mohammadyani et al. 2012). Also, this agglomeration is evidence of greater surface-to-volume ratios of the prepared samples which is essential for photocatalysis, because as the surface-to-volume ratio increases the surface energy gets high, to minimize this energy nanoparticle gets agglomerated (Deng and Davé 2017; Jiang et al. 2009; Pellegrino et al. 2017).

Fig. 4
figure 4

FESEM images of the prepared samples: a NiO, b Ag0.30Ni0.70O, c Cd0.05Ag0.30Ni0.65O, d Cd0.10Ag0.30Ni0.60O, e Cd0.15Ag0.30Ni0.55O

Elemental analysis

Elemental analysis was performed through the EDX technique which confirmed the presence of Ni, O, Ag, and Cd. EDX spectra are shown in Fig. 5.

Fig. 5
figure 5

EDX graphs of a NiO, b Ag0.30Ni0.70O, c Cd0.05Ag0.30Ni0.65O, d Cd0.10Ag0.30Ni0.60O, e Cd0.15Ag0.30Ni0.55O

FTIR

Functional groups analysis is important to study the verification of the sample preparation. FTIR analysis was performed in the range of 3000 to 500 cm−1 to study the presence of functional groups in all prepared samples of NiO and Ag–Cd co-doped NiO, CdxAg0.30Ni0.70−xO (X = 0.0, 0.2, 0.6 and 1.0). IR spectra for all samples are shown in Fig. 6. It has been observed that there are five broader and weaker peaks in the range of 500 to 1500 cm−1 in all compositions. The peaks at 1392 cm−1 and 1434 cm−1 were because of bending vibrations of the O–H group as samples absorbed water molecules or due to the interaction of samples with KBr (Aslam et al. 2021; Diallo et al. 2018). Similarly, the peaks at 1051 cm−1, 1085 cm−1, and 1115 cm−1 are attributed to symmetrical stretching of nitro compound N–O (Zahra et al. 2020).

Fig. 6
figure 6

FTIR graph of NiO and Ag–Cd co-doped NiO, CdxAg0.30Ni0.70−xO (X = 0.0, 0.05, 0.10, and 0.15) nanoparticles

Likewise, a band at 872 cm−1 was due to C–H bending (Arif et al. 2019). The lower frequency band in the range of 850 to 500 was attributed to the stretching vibration of the metal-oxide bond. It can be seen from Fig. 6 that two peaks at 615 cm−1 and 533 cm−1 wavenumbers were arisen due to Cd–O, Ag–O, and Ni–O bonds, respectively, which confirms M–O bonding presence in all prepared samples. FTIR spectra were well matched with earlier reported data (Fazlali et al. 2015; Ghazal et al. 2020; Torki and Faghihian 2018).

Optical analysis

Optical properties were investigated through PL for all prepared samples of NiO and Ag–Cd co-doped NiO nanoparticles CdxAg0.30Ni0.70−xO (X = 0.0, 0.05, 0.10, and 0.15) as shown in Fig. 7. PL spectra were obtained for all the samples in a range of 380 to 500 nm with an excitation wavelength of 380 nm. It has been observed that all samples gave emission peaks at 413 nm (3 eV) due to the presence of oxygen vacancies at surfaces (Deshpande et al. 2016). Also, it can be observed that the intensity is decreasing with an increase in doping which is authentication of slow electron/hole pair recombination (Murali et al. 2020). The sample with X = 0.15 Cd0.15Ag0.30Ni0.55O shows the lowest intensity peak in which electron/hole pair recombination was much slower than other samples, which indicates that this sample can be used as an efficient photocatalyst.

Fig. 7
figure 7

PL spectra of NiO and Ag–Cd co-doped NiO, CdxAg0.30Ni0.70−xO (X = 0.0, 0.05, 0.10, and 0.15) nanoparticles

Bandgap analysis

Bandgap energies of NiO and Ag–Cd co-doped NiO nanoparticles were determined through absorption spectra of UV–Vis spectroscopy, and their respective spectrum is shown in Fig. 8. To obtain bandgap energies, three samples including NiO, Cd0.05Ag0.30Ni0.65O, and Cd0.15Ag0.30Ni0.55O were examined under UV–Vis spectroscopy and their energies were calculated through Tauc’s plot (Khodair et al. 2020) as shown in Fig. 8a–d, respectively. The Tauc relation is given as follows:

$$(\alpha h\upsilon )^{2} = \, K \, (h\upsilon - E_{{\text{g}}} )^{n} .$$
(3)
Fig. 8
figure 8

Absorption spectra and Tauc’s plot of samples: a NiO, b Cd0.05Ag0.30Ni0.65O, c Cd0.15Ag0.30Ni0.55O, d absorption spectra and Tauc’s plot of all samples

Here, “Eg” is the energy of the bandgap, “” is the energy of incident photons, “α” is the coefficient of absorption, “K” is the energy independent constant, and “n” is the transition nature. Since NiO has indirect transition and the value of “n” for indirect transition is 2 (Rahman et al. 2018). The absorption spectrum and (αhυ)2 versus Eg graph of samples are shown in Fig. 8d.

From these spectra, it can be observed that samples show absorption in the visible region and bandgap energies were 3.20 eV, 2.79 eV, and 2.37 eV for samples, NiO, Cd0.05Ag0.30Ni0.65O, and Cd0.15Ag0.30Ni0.55O, respectively. The decrease in bandgap energies and the increase in Cd co-doping were observed, which might be due to the formation of new additional energy states near to valance band and an increased inhomogeneity and density of localized states (Ahmed and Nabi 2020). Also, bandgap variation can be caused by different crystallite sizes of samples (Khodair et al. 2020). The decrement in the bandgap and the increase in doping are evidences that the Ag–Cd co-doped NiO can be employed as an efficient visible-light-driven photocatalyst. Among all the samples, Cd0.15Ag0.30Ni0.55O has less bandgap energy. The results of these samples are well related to the earlier reported studies (Amor et al. 2017; Hameeda et al. 2020; Khatri and Rana 2020).

Photocatalytic performance

Photocatalysis activity was investigated through the degradation of model organic compound RhB dye. The performance was examined by exposing the solution of RhB and synthesized samples to visible light. Degradation was done followed by decolorization of RhB after exposure to light for 0–140 min with 20 min of interval. UV–Vis spectroscopy was used to study photocatalytic efficiencies of the prepared catalysts by getting absorbance spectra as shown in Fig. 9. Figure 9a shows the absorption spectra of NiO nanoparticles when an aqueous solution of dye was degraded photocatalytically in the presence of light. It has been observed that the absorbance peak was reduced down to 1.275 after 140 min of irradiation and showed 24% efficiency calculated from Eq. (1). Figure 9b shows the absorption spectrum of Ag0.30Ni0.70O particles which showed 39% efficiency after 140 min. The absorption peak was decreased down to 0.975. Similarly, Fig. 9c shows the absorption spectra of Cd0.05Ag0.30Ni0.65O which was 58% efficient for degrading RhB dye, and the absorption peak was decreased down to 0.618. Figure 9d shows the spectrum of Cd0.10Ag0.30Ni0.60O nanoparticles, and it can be observed that the absorption peak was further decreased down to 0.262 and showed 79% efficiency when Cd doping increased. Figure 9e shows the last sample Cd0.15Ag0.30Ni0.55O absorption spectrum whose absorbance was decreased significantly down to 0.003 after 140-min irradiation and showed maximum efficiency of 97%. From these spectra, it can be observed that the efficiencies are being increased while increasing Cd co-doping. Cd0.15Ag0.30Ni0.55O showed the maximum degradation efficiency of 97%.

Fig. 9
figure 9

Photocatalysis UV-Vis spectra of prepared samples a pure NiO b ag0.30Ni0.70O, c Cd0.05Ag0.30Ni0.65O d Cd0.10Ag0.30Ni0.60O e Cd0.15Ag0.30Ni0.55O f efficiencies

The possible reasons for greater efficiency might be that this sample has smaller crystallite size as can be seen from XRD, slower electron/hole pair recombination as compared to other samples, and reduced bandgap energy 2.37 eV as can be shown in PL and UV–Vis spectra, respectively (Bashir et al. 2021; Anandan and Rajendran 2015). Efficiencies of all samples are shown graphically in Fig. 9f.

Many researchers have been working on photocatalysis application of NiO and doped NiO as an effective photocatalyst, but this proposed work of NiO and Ag–Cd co-doped NiO, CdxAg0.30Ni0.70−xO (X = 0.0, 0.05, 0.10, and 0.15) is more efficient. Table 2 is incorporated which includes the comparison study of photocatalytic performances between other doped NiO materials and this work. Ethiraj, A.S., et al. (Ethiraj et al. 2020) studied the 2–4 wt.% Cu-doped NiO particles for phenolic compounds degradation. It was found that 2% Cu-doped NiO showed 85.7% efficiency, while degradation was due to a low concentration of phenol. Hameeda et al. (2020) have investigated the degradation of alizarin red (AR) using Cu-doped NiO nanocatalyst. 20% Cu-doped NiO showed the maximum degradation efficiency due to higher surface area 165.6 m2/g and lower bandgap energy 3.21 eV. Similarly, Khatri and Rana (2019) investigated the degradation of methylene blue (MB) dye using Co-doped NiO photocatalysts. It was observed that Ni0.6Co0.4O degraded MB dye in 50 min with the highest degradation efficiency, which could be due to the reason of enhancement of Co doping which affects the bandgap of NiO. With comparison to these results, it is clear that Ag–Cd co-doped NiO has higher degradation efficiency as compared to other doped NiO nanoparticles.

The kinetic properties were studied by plotting ln (C0/C) versus irradiation time as shown in Fig. 10a. It can be seen that linear plots are obtained by plotting absorbance data as ln (C0/C) versus irradiation time. From this graph, it can be concluded that these samples exhibit pseudo-first-order rate reaction, and rate reaction constant K per min is calculated accordingly as shown in Fig. 10b. The value of K (min−1) for NiO was 0.01131. The rate reaction constant was increased with an increase in co-doping of Cd, and maximum reaction rate constant K (min−1) 0.0496 was determined for the Cd0.15Ag0.30Ni0.55O sample, which is 4.39 times greater than the rate reaction constant value of NiO. The correlation coefficient R2 for the Cd0.15Ag0.30Ni0.55O sample was calculated at 0.988. Moreover, the reusability of the most efficient sample Cd0.15Ag0.30Ni0.55O was checked for six cycles as shown in Fig. 10c. Particles were separated through the centrifugation process. The nanoparticles can also be separated through dye solution through magnets at a large scale as reported in previous studies (Chen et al. 2019; Shekofteh-Gohari and Habibi-Yangjeh 2017; Palanivel et al. 2021; Rahman et al. 2020; Gebreslassie et al. 2019). The efficiency was found 95% after the sixth cycle, and no significant loss was determined. At last, an XRD pattern was obtained for the used sample after the sixth cycle as shown in Fig. 10d. It can be noticed that peaks intensity was reduced slightly after photocatalysis. These results may be due to the adsorption of dye on the surface of the catalyst (Bibi et al. 2018). These results confirmed the reusability and sustainability of our best sample.

Fig. 10
figure 10

Kinetic study of samples a plot of time versus ln(C0/C) for optimization of samples b reaction rate constant K (min-1) for samples c reusability pattern of Cd0.15Ag0.30Ni0.55O for 6 cycles d XRD pattern of Cd0.15Ag0.30Ni0.55O for RhB dye before and after photocatalytic activity

This degradation study can be described further with the photocatalytic mechanism. In a typical mechanism, electron/hole pairs were generated at conduction and valance band of Cd0.15Ag0.30Ni0.55O when the sample was irradiated under visible light which had greater energy than the bandgap energy of this sample. The photocatalytic mechanism is shown in Fig. 11. These generated electrons (ecb) react with electron acceptor oxygen O2 and form a superoxide radical anion (O2 ). Similarly, valance band holes (h+vb) react with water H2O adhering to sample surface, and hydroxyl radicals (OH) are formed which are highly reactive (Pung et al. 2012; Tahir et al. 2020a). These hydroxyl radicals (OH) and superoxide anions (*O2 ) react further with RhB dye and form degradation products H2O and CO2. The proposed reaction mechanism is given as follows:

$${\text{Cd}}_{x} {\text{Ag}}_{{0.{3}0}} {\text{Ni}}_{0.70 - x} {\text{O}} + {\text{h}}\upsilon \, \left( {{\text{visible}}} \right) \, \to {\text{ e}}^{ - }_{{{\text{cb}}}} + {\text{h}}^{ + }_{{{\text{vb}}}}$$
(4)
$${\text{e}}^{ - }_{{{\text{cb}}}} + {\text{O}}_{{2}} \to^{ \bullet}{\text{O}}_{{2}}^{-}$$
(5)
$${\text{h}}^{ + }_{{{\text{vb}}}} + {\text{H}}_{{2}} {\text{O }} \to^{ \bullet}{\text{OH}} + {\text{H}}^{ + }$$
(6)
$$^{ \bullet } {\text{O}}_{{2}}^{-} + {\text{H}}_{{2}} {\text{O }} \to {\text{ H}}_{{2}} {\text{O}}_{{2}} + {\text{ e}}^{ - }_{{{\text{cb}}}} \to^{ \bullet}{\text{OH}}$$
(7)
$${\text{RhB }}\,{\text{dye}} +^{ \bullet}{\text{OH }} +^{ \bullet}{\text{O}}_{{2}}^{-} \to {\text{ H}}_{{2}} {\text{O }} + {\text{ CO}}_{{2}} .$$
(8)
Fig. 11
figure 11

Schematic mechanism for photocatalytic degradation of Cd0.15Ag0.30Ni0.55O for RhB dye

At last, summary of all characterization data and photocatalytic performance is given in Table 3.

Table 3 Summary of characterization of data

Conclusion

A series of samples comprising NiO and Ag–Cd co-doped NiO CdxAg0.30Ni0.70−xO (X = 0.0, 0.05, 0.10, and 0.15) have been synthesized successfully for the first time through the facile sol–gel technique, and their comparative photocatalytic performance for the decolorization of RhB dye under visible-light irradiation has been witnessed. XRD analysis confirmed the formation of NiO and co-doped NiO particles along with decrement in lattice constant “a” from 4.1772 Å to 4.1679 Å and crystallite size “d” from 28 to 24 nm with an increase in doping of Ag and Cd, respectively.

Among all of the as-synthesized samples, Cd0.15Ag0.30Ni0.55O showed the maximum degradation efficiency (97%) followed by first-order kinetics having reaction rate constant K (min−1) 0.0496 with correlation coefficient (R2) 0.988 as well as the excellent sustainability along with the reusability. Also, the sample Cd0.15Ag0.30Ni0.55O showed the shortest bandgap 2.37 eV as compared to NiO (3.20 eV). The best performance of this sample after a thorough comparison has been attributed to the shortest bandgap, delayed charge carrier recombination as well as the formation of energy levels between the conduction band and the valence band.