1 Introduction

Microorganisms are very diverse and include all the bacteria. It lives in every part of the biosphere, including soil, on rocks, inside roots, buried under miles of Earth, in compost piles and toxic waste, etc. Gram-negative bacteria can cause many types of infections and are spread to humans, animals in a variety of ways. Escherichia coli and Vibrio cholera are the common cause of waterborne and food-borne pathogens and responsible for E. coli and cholera infection respectively. Salmonella typhi is a waterborne pathogen and responsible for well known Typhoid fever. In the way, nanomaterials are considered as antibacterial agents due to their size, structure, and surface properties [1]. Metal oxide nanoparticles such as ZnO and MgO have been investigated as inorganic antibacterial agents [2, 3].

Nanocomposites have excellent properties such as high melting point, low density, low coefficient of thermal expansion, high thermal conductivity, high hardness, good chemical stability, improved mechanical properties such as higher specific strength, better wear resistance, and specific modulus have a potential candidate for various industrial fields [4]. Zinc oxide is an important transition metal oxide and n-type semiconductor with an energy gap of 3.3 eV. It has unique chemical, physical, optical properties, high electrochemical stability, biocompatibility, efficient photocatalytic and excellent antibacterial activity. ZnO nanoparticles are used for enormous application, such as nanogenerators, mechanical actuators, piezoelectric sensors, photodetectors, photocatalysts and bio-medical fields [5, 6]. Cadmium oxide (CdO) is a known n-type semiconductor with an optical band gap (2.2–2.5 eV). CdO nanoparticles have been widely investigated due to its significant optical, electrical, chemical properties and catalytic action [7]. It is largely used in degradation applications (organic compounds, dyes, pigments and many of the environmental pollutants). Magnesium oxide (MgO) is a versatile oxide material with a large band gap (7.2 eV), excellent thermodynamic stability, low dielectric constant and refractive index. It finds extensive applications in catalysis, ceramics, toxic waste remediation, paint and superconductor products [8,9,10].

By the fusion of these three nanoparticles, the individual characteristics of the metal oxides (CdO, MgO and ZnO) are contributed to the nanocomposite (CdO–ZnO–MgO). In the current study, we have focussed on the synthesis of CdO–ZnO–MgO (microwave-assisted method) and evaluate its efficiency in degradation [Methylene blue (MB) and Congo red (CR)], biological (antibacterial) applications. The study also presents a comparative synthesis of differently mixed metal oxide nanocomposites (Table 1) by different methods. From the Table 1, microwave assisted method has more advantages such as (shorter reaction time and enhanced reaction rate, improve the yields and high energy of efficiency) compared with some other preparation methods (hydrothermal, co-precipitation).

Table 1 Synthesis of mixed metal oxide nanocomposites

2 Materials and methods

2.1 Materials

Cadmium acetate dihydrate [Cd(CH3COO)2·2H2O], zinc acetate dihydrate [Zn(CH3COO)2·2H2O], magnesium acetate dihydrate [Mg(CH3COO)2·2H2O] and sodium hydroxide (NaOH) were in analytical grade and purchased from Merck.

2.2 Preparation of CdO, MgO and ZnO nanoparticles

1 M of Cd(CH3COO)2·4H2O was dissolved in 20 ml of deionized water. 2 M of NaOH was dissolved in 20 ml of double distilled water and added to the above solution under stirring for 15 min at room temperature (A). The stirred solution was placed in a domestic microwave oven (2.45 GHz, 750 W) for 10 min. The precipitate was washed with double distilled water and ethanol and placed again in the oven for 10 min. The product was annealed at 673 K for 2 h. For the synthesis of MgO and ZnO nanoparticles, the same procedure was followed with Mg(CH3COO)2·2H2O, Zn(CH3COO)2·2H2O as starting material and annealing was performed at 673 K for 2 h.

2.3 Synthesis of CdO–ZnO–MgO nanocomposite

CdO–ZnO–MgO nanocomposite was prepared using a simple microwave-assisted method. 1 M of Cd(CH3COO)2·2H2O, Zn(CH3COO)2·2H2O and Mg(CH3COO)2·2H2O and, 2 M of NaOH were prepared separately using deionized water as a solvent. At the time interval of 30 min stirring, Cd(CH3COO)2·2H2O solution and Mg(CH3COO)2·2H2O solution was added to Zn(CH3COO)2·2H2O under constant stirring. After that base solution of NaOH was added drop by drop. The final solution was stirred for 1 h at room temperature. The stirred solution was placed in the domestic microwave oven (2.45 GHz, 750 W) with convection mode and irradiated for 30 min. The precipitate was washed thoroughly with deionized water and ethanol. The washed precipitate was irradiated for 15 min in a microwave oven resulting with a solid powder. The solid powder was annealed at 673 K for 2 h to obtain CdO–ZnO–MgO nanocomposite.

2.4 Instrumentation

The structures of the materials were investigated using powder X-ray diffraction (XRD) on a Philips XPert Pro diffractometer (using Cu Kα radiation at a wavelength of 1.5406 Å) in the range of 10°–70° with a scan speed of 1°/min. The morphology was examined by FESEM (Carl Zeiss) and TEM (JEOL-JEM-2100F) respectively. The energy dispersive X-ray spectrometry (EDS) results were measured by Bruker. The molecular structure was confirmed using JASCO 460 plus FTIR spectrometer by KBr pellets technique in the middle IR region between ranges from 400 to 4000 cm− 1. The linear optical absorption characteristics were recorded using a Perkin Elmer Lambda 25 spectrophotometer.

2.5 Photocatalytic activity

Photocatalytic activity of nanocomposite was evaluated by studying the photodegradation of MB and CR dye solution under sunlight irradiation. 2.5 mg of the prepared nanocomposite was added to a quartz photoreactor containing 100 ml of a 1 mg/l MB and CR aqueous solution. After stirring in dark (2 h), the mixture was irradiated in sunlight with the intensity fluctuation of 950 ± 25 W/m2. The residual MB and CR in the aqueous solution were analyzed by checking the absorbance at 664 nm (MB) and 493 nm (CR) in the UV–Vis absorption spectra. Further, the samples were collected at regular intervals (for every 30 min) to determine the percentage of the degradation of MB and CR. The collected samples were filtered and centrifuged to remove the undissolved particles in the sample and the UV–Vis spectrum was recorded. The degradation percentage of the dye in the presence and absence of nanocomposite is calculated from the following equation

$$\eta =[({{\text{C}}_{\text{o}}} - {{\text{C}}_{\text{t}}})/{{\text{C}}_{\text{o}}}] \times 100\% ,$$
(1)

η is the percentage of degradation, Co is the initial concentration of the dye (mg/l) and Ct is the concentration of the dye after irradiation in the selected time interval (mg/l) [25].

2.6 Antibacterial assay

The antibacterial activity of CdO–ZnO–MgO nanocomposite was tested against both gram-positive and gram-negative bacteria. Clinical isolates of E. coli, Pseudomonas aeruginosa, V. cholera, Klebsiella pneumoniae, Proteus vulgaris, S. typhi and Bacillus subtilis were sub-cultured in nutrient broth for 24 h at 37 °C. This study was carried out in the agar well diffusion method. CdO–ZnO–MgO nanocomposite was mixed (5 mg/ml) with sterile distilled water and loaded into the well at different concentration varied between 25 and 100 µg/ml. For positive control, concentration varying between 25 and 100 µg/ml, standard antibiotic chloramphenicol (0.5 mg/ml) was used. These doses were selected based on the preliminary data obtained from earlier studies. After 24 h of incubation at 37 °C, the zone of inhibition (ZOI) was measured [25].

3 Results and discussion

3.1 Structural studies

XRD pattern of the prepared CdO, MgO and ZnO nanoparticles are shown in Fig. 1a–c. It is clear that CdO nanoparticles were paired well with the face centred cubic phase of CdO (JCPDS card no. 05-0640). ZnO nanoparticles were well matched with the hexagonal crystalline structure of ZnO (JCPDS card no. 65-3411). ZnO nanoparticles were well matched with the cubic crystalline structure of MgO (JCPDS card no. 77-2364). XRD pattern of CdO–ZnO–MgO nanocomposite is shown in Fig. 1d. The XRD pattern of CdO–ZnO–MgO nanocomposite confirms that the three kinds of phase such as predominant phase are cubic CdO, hexagonal ZnO and the small peaks evident for cubic MgO. The diffraction peaks are well matched with the standard JCPDS card no. 05-0640 (CdO), 65-3411 (ZnO) and 77-2364 (MgO). The average crystallite size (D) of the prepared nanocomposite is calculated using Debye–Scherrer’s formula

Fig. 1
figure 1

XRD patterns of a CdO, b ZnO, c MgO and d CdO–ZnO–MgO nanocomposite

$${\text{D}}={\text{K}}\lambda /\beta \cos \theta ,$$
(2)

where K is the shape constant (0.9), λ is the wavelength of X-ray (1.5406 Å), β is the full width at half maximum and θ is the diffraction angle.

Dislocation density (δ) is calculated using the equation,

$$\delta =1/{{\text{D}}^2}.$$
(3)

The evaluated lattice parameter, crystallite size and dislocation density for prepared CdO–ZnO–MgO nanocomposite is reported in Table 2.

Table 2 Structural parameters of CdO–ZnO–MgO nanocomposite

3.2 Morphological studies

SEM shows the agglomerated spherical nanoparticles of CdO (Fig. 2a), ZnO (Fig. 2b) and MgO (Fig. 2c). The morphology of synthesized CdO–ZnO–MgO nanocomposite is determined by FESEM analysis. Figure 3a shows typical FESEM images of prepared CdO–ZnO–MgO nanocomposite at different magnifications which indicate the formation of agglomerated rod-like structure. TEM images of the rod-like structure with average length 18 nm and diameter 8 nm (Fig. 3b). The EDS spectrum of CdO, ZnO and MgO is shown in Fig. 4a–c. The EDS spectrum of the prepared nanocomposite is shown in Fig. 4d. It notices the separate peaks of cadmium (Cd), zinc (Zn), magnesium (Mg) and oxygen (O) with no other impurities.

Fig. 2
figure 2

FESEM images of a CdO, b ZnO and c MgO nanoparticles

Fig. 3
figure 3

a FESEM, b TEM micrographs of CdO–ZnO–MgO nanocomposite

Fig. 4
figure 4

EDS image of a CdO, b ZnO, c MgO nanoparticles and d CdO–ZnO–MgO nanocomposite

3.3 Functional group analysis

The FTIR spectrum of CdO–ZnO–MgO nanocomposite is shown in Fig. 5. The observed strong peaks at 697 cm− 1 are assigned to the Mg–O stretching vibration and the longitudinal optical phonon modes, which are characteristic of well defined MgO crystallite respectively [26]. The sharp peak at 863 cm− 1 is a characteristic metallic bond of CdO vibration [27]. The peak at 566 cm− 1 is confirming the Zn–O stretching vibration [28,29,30,31]. The recorded peak at 1441 cm− 1 is attributed to bending vibrational mode of the carbonyl group. The peak at 1061 cm− 1 is attributed due to stretching of Mg–OH. Stretching of hydroxyl groups is observed at 3422 cm− 1.

Fig. 5
figure 5

FTIR spectrum of CdO–ZnO–MgO nanocomposite

4 Optical properties

4.1 Linear optical studies

The optical absorption spectrum is shown in Fig. 6a. The corresponding energy band gap spectrum is calculated from Tauc’s relation

Fig. 6
figure 6

a UV–Vis absorption spectrum and b optical bandgap of CdO–ZnO–MgO nanocomposite

$$\alpha {\text{h}}\nu ={\text{A}}{({\text{h}}\nu - {E_{\text{g}}})^{\text{n}}},$$
(4)

where A is the characteristics parameter (free of photon energy) for this transition, h is the Planck’s constant, ʋ is the frequency of light and Eg is the optical energy bandgap. The parameter n characterizes the transition process involved and takes the value 2 for direct allowed transition and 1/2 for the indirect allowed transition. The plot of (αhʋ)2 versus hʋ is shown in Fig. 6b, from which the optical energy bandgap (Eg) is estimated as 2.67 eV by extrapolating the linear part up to zero on the energy axis. Therefore, tuning of the optical bandgap is suitable for several applications such as photovoltaics, photocatalysis, and thermoelectrics [25, 32, 33].

4.2 Photocatalytic activity

The efficiency of the CdO–ZnO–MgO nanocomposite was evaluated against the MB and CR dye degradation under sunlight irradiation. The degradation of MB dye solution (λ = 664 nm) and CR dye solution (λ = 493 nm) was monitored using UV visible spectrometer as shown in Figs. 7 and 8. Under sunlight irradiation, the main absorption peak of MB and CR was gradually decreased in the presence of CdO–ZnO–MgO nanocomposite. The degradation (91%) of the MB dye solution was achieved within 120 min.

Fig. 7
figure 7

Time dependent absorption spectrum of CdO–ZnO–MgO nanocomposite for MB under direct sunlight irradiation

Fig. 8
figure 8

Time dependent absorption spectrum of CdO–ZnO–MgO nanocomposite for CR under direct sunlight irradiation

The prepared CdO–ZnO–MgO nanocomposite showed good activity due to the unique morphology, effective charge separation and crystalline nature. The photocatalytic performance of CdO–ZnO–MgO nanocomposite was demonstrated by kinetic studies and the decomposition was followed pseudo-first order kinetic equation

$${{\text{C}}_{\text{t}}}={{\text{C}}_{\text{o}}}{{\text{e}}^{ - {\text{Kt}}}}.$$
(5)

Alternatively

$$\ln ({{\text{C}}_{\text{o}}}/{{\text{C}}_{\text{t}}})={\text{Kt,}}$$
(6)

where C and Co are the concentration of the dye solution at different time intervals t and initial concentration at t = o min. K is the first order rate constant. The rate constant of CdO–ZnO–MgO nanocomposite is 0.02039 and 0.01345 min− 1 for the degradation of the MB and CR dye respectively (Tables 3, 4).

Table 3 Comparison of MB dye with some other metal oxide nanocomposites
Table 4 Comparison of CR dye with some other metal oxide nanocomposites

The degradation process is mainly influenced by the bandgap of material. The controlled band gap of the CdO–ZnO–MgO nanocomposite (2.67 eV) from the actual band gap of CdO (2.3 eV), ZnO (3.2 eV) and MgO (5.6 eV) may be due to the formation of Fermi energy level and defects in the crystal system. The defect present in the crystal system indicates the creation of oxygen vacancies, which leads to the generation of photon-induced charge carriers. The recombination rate of charge carriers declined due to the charge carriers trapped by oxygen vacancies. Then the formation of free radicals takes place because the charge carriers react with the adsorbed oxygen species and water molecules. The degradation process takes place of them because of the free radicals produced which act on the dye molecules feasibly on azo bonds [34, 35].

4.3 Proposed photodegradation mechanism

Mechanism for the degradation of dye solution was expressed in the following equations

$${\text{CdO-ZnO-MgO}}+{\text{h}}\upsilon \to {\text{CdO-ZnO-MgO}}\;\left( {{\text{e}}_{{{\text{CB}}}}^{ - }+{\text{h}}_{{{\text{VB}}}}^{+}} \right),$$
$${\text{CdO-ZnO-MgO}}\;\left( {{\text{e}}_{{{\text{CB}}}}^{ - }} \right)+{{\text{O}}_2} \to {\text{CdO-ZnO-MgO}}+{{\text{O}}_{{2^\cdot }}},$$
$${{\text{H}}_2}{\text{O}} \to {{\text{H}}^+}+{\text{O}}{{\text{H}}^\cdot },$$
$${}^{\cdot }{{\text{O}}_2}+{{\text{H}}^ - } \to {}^{\cdot }{\text{H}}{{\text{O}}_2},$$
$${\text{CdO-ZnO-MgO}}\;\left( {{\text{e}}_{{{\text{CB}}}}^{ - }} \right)+{}^{\cdot }{\text{H}}{{\text{O}}_2}+{{\text{H}}^+} \to {{\text{H}}_2}{{\text{O}}_2},$$
$${\text{CdO-ZnO-MgO}}\;\left( {{\text{h}}_{{{\text{VB}}}}^{+}} \right)+{\text{Dye}} \to {\text{degradation}}\;{\text{products,}}$$
$${\text{HO}}_{2}^{ - }+{{\text{H}}^+} \to {{\text{H}}_2}{{\text{O}}_2},$$
$${\text{H}}{{\text{O}}_{{2^\cdot }}}+{{\text{e}}^ - } \to {\text{HO}}_{2}^{ - }.$$

CdO–ZnO–MgO nanocomposite is illuminated under the sunlight radiation which leads to the formation e in the conduction band and h+ in the valence band. As the photogenerated electrons are transferred to the conduction band and valance band. The electron reacts with molecular oxygen to produce less toxic superoxide anion radical (\({{\text{O}}_{{2^\cdot }}}\)) through a reductive process. The hole in the valance band can attract electrons from water or hydroxyl ions to generate most reactive hydroxyl radical (OH) through an oxidative process. The superoxide anions react with electron–hole pairs and generate H2O2. The negatively charged hydroxyl radical (OH) and superoxide radicals (O2). The combination of metal oxide generates more active catalytic centres which facilitate the photodegradation performance [36, 37].

4.4 Antibacterial activity

In the present work, the relative antibacterial activities of CdO–ZnO–MgO nanocomposite towards the gram positive and gram negative bacteria were studied. It was also observed that the ZOI increases significantly with increasing the concentration of 100 µg/ml is the optimum concentration of nanocomposite for inhibiting the growth of bacterial test organisms (Fig. 9). It is shown that CdO–ZnO–MgO nanocomposite is an effective antibacterial agent for both gram-positive and gram-negative bacteria strains (Table 5).

Fig. 9
figure 9

Antibacterial plate photos of CdO–ZnO–MgO nanocomposite

Table 5 Antibacterial activity of CdO–ZnO–MgO nanocomposite against bacterial pathogenic organisms, mean zone of inhibition (mm)

To compare the gram-positive and gram-negative bacteria, the observed inhibition zone was higher in gram negative bacteria because of differences in cell wall structure of the chemical composition. From these ZOIs measurements, it could be stated that metal oxide nanocomposite possesses effective antibacterial property. The antibacterial activity of metal oxide nanoparticles may either directly interact with the microbial cells or to produce secondary products that cause damage to the bacterial cell wall. There are several mechanisms behind the antibacterial activity of metal oxide nanomaterials.

The responsible factors for antibacterial activity of CdO–ZnO–MgO nanocomposite are as follows:

  1. (i)

    The release of heavy metal ions,

  2. (ii)

    Generation of reactive oxygen species,

  3. (iii)

    Surface morphology.

Only a very few reports are available on the antibacterial properties of mixed metal oxide nanocomposites. CdO–ZnO–MgO nanocomposite was activated by UV light, to increase electron–hole pairs. The holes split the H2O molecule from the suspension of CdO–ZnO–MgO nanocomposite into hydroxyl radicals (OH) and hydrogen ion (H+). Dissolved oxygen molecules are converted to less toxic superoxide radical anion (\({\text{O}}_{2}^{ - }\)) which reacts with hydrogen ions (H+) to produce \({\text{HO}}_{2}^{ - }\) radical. These hydroxyl radicals on collision with electrons produce hydrogen peroxide (H2O2) molecules. The generated H2O2 molecules can penetrate the cell membrane and arrest the biological process in the bacteria.

The negatively charged particles of hydroxyl radicals OH and \({\text{O}}_{2}^{ - }\) (superoxide radical anion) cannot penetrate into the cell membrane and must remain in contact with the outer surface of the bacteria. But the active anionic molecules are effective toxic to bacterial substance. In addition, they cause severe damage to proteins, lipids, DNA and profiles of the outer wall of the bacteria, thereby leading to the destruction of the bacteria.

The production of the electrons is of the conduction band and holes of the valence band. Holes are able to react with water sticking to the CdO–ZnO–MgO nanocomposite surface to form hydroxyl radical (OH), simultaneously oxygen, on the CdO–ZnO–MgO nanocomposite surface is reduced to superoxide by generating electrons which lead to the generation of OH.

The second reason for the antibacterial activity of CdO–ZnO–MgO is its ability to produce the heavy metal ions such as Cd2+, Zn2+ and Mg2+ ions. The heavy metal ions come into contact with the cell membranes of the microbe. The cell membrane has a negative charge and Cd2+, Zn2+ and Mg2+ ions with a positive charge mutually attract and the Cd2+, Zn2+ and Mg2+ ions penetrate into the cell membrane and reacts with the sulfhydryl (–S–H) groups inside the cell membrane. As a result, the microbe becomes so damaged that the cells lose the ability of growth through cell division, which leads to the death of the microbe.

The nanoparticles with uneven surface texture due to rough edges and corners contribute to the mechanical damage of the cell membrane. From the FESEM and TEM images, it is clear that the CdO–ZnO–MgO nanocomposite has uneven ridges on their outer surface which lead to the antibacterial activity.

Figure 10 shows various mechanisms of antibacterial activities of nanocomposites. Generally, bactericidal agents are much preferred in the clinical filed because bactericides lead to rapid and better recovery from bacterial infections and also minimize the possibility of the emergence of drug resistance (Table 6). Since the CdO–ZnO–MgO nanocomposite (composite structure) exhibited relatively better activity against all the tested pathogens (gram-negative bacteria culture). Therefore, it may be concluded that the creation of active species of photoinduced reaction is the main sources towards the bacterial toxicity in the case of metal oxide nanocomposites [46,47,48,49,50,51,52,53,54].

Fig. 10
figure 10

Typical diagram of antibacterial activity mechanism

Table 6 Comparison of antibacterial activity with some other metal oxide nanocomposites

5 Conclusion

CdO, ZnO, MgO nanoparticles and CdO–ZnO–MgO nanocomposite was synthesized by the microwave assisted method. Prepared metal nanoparticles and nanocomposite were characterized by various physicochemical techniques. Prepared nanocomposite exhibits dye degradation percentage 91% (MB) and 81% (CR) dye respectively. Moreover, the nanocomposite also performs as a good antibacterial agent towards P. vulgaris and V. cholera. Thus, this present study introduces new route applications of CdO–ZnO–MgO nanocomposite in environmental and biomedical areas.