Introduction

Industrial effluents from processes like circuit board plating, mining/smelting, and electroplating, which contain heavy metals (e.g., Cadmium (Cd), Copper (Cu), and Zinc (Zn)), can pose environmental and public health risks, even in small amounts (Sajid et al. 2024; Bautista-Patacsil et al. 2020). Evading this heavy metal contamination is extremely challenging, given the carcinogenic properties and toxicity accompanying heavy metal ions. Recent Studies are seeking to lower heavy metal concentrations in water matrices. Prevalent techniques include electrolytic techniques (Lai et al. 2008), solvent extraction (Wilson et al. 2014), membrane separation (Otrembska and Gega 2016), and precipitation (Kavak 2013). However, these techniques often encounter economic and technical challenges, particularly in treating effluents with low concentrations of heavy ions.

Other prominent techniques for water sterilizing are chelating resins and ion exchange. They are highly effective for recovering metal ions from low-concentration solutions like waste effluents and wastewater (both surface and underground) (Habiba et al. 2017). This method has gained significant attention in recent decades, utilizing bio-sorbents (renewable resources), nanoparticles (NPs), synthetic resins, or magnetic composite microsorbents. Natural biomaterials such as chitosan, algal biomass, alginate, and agricultural waste contain reactive groups for further modification. These materials can be grafted with other groups and formed into beads or fine particles (micro or nanoscale) to improve sorption capacity and kinetics (Upadhyay et al. 2021).

Chitosan (Cs) (deacetylated chitin), among the various available adsorbents, is a popular choice for removing heavy metals due to its exceptional chemical qualities, environmental friendliness, and abundance of sorption sites (Zhang et al. 2016). In addition, its surface hydroxyl (OH) and amino groups (NH2) exhibit polycation chelating characteristics due to its natural hydrophilic properties (Bakshi et al. 2020; Edo et al. 2024; Knidri et al. 2018). Such material enhances the loading capacity for metal cations through their chelating properties or ion exchange, utilizing the lone pair of electrons on OH and NH2. Additionally, it introduces a new method for attaching functional groups, such as amine or heterocyclic groups. Also, it enhances capacity and allows for use over a wide pH range, whether acidic or alkaline. However, raw polymers like chitosan are typically low in porosity and intraparticle diffusion, primarily causing limitations in their sorption capabilities.

To address this, we can modify the polymer by forming hydrogels, which expand the structure, or design micro or nanoscale particles to create thin-layer structures that enhance mass transfer properties. These modifications open new possibilities for increasing both selectivity and metal loading capacity for magnetic chitosan NPs. Sorption materials modified by mixing magnetic particles with chitosan hold the following features: they possess both magnetic and chitosan properties; they demonstrate excellent sorption performance; they facilitate rapid and efficient solid–liquid separation; and they demonstrate great mechanical strength, flexibility, and ease of use (Shaumbwa et al. 2021; Wu et al. 2008; Madera-Santana et al. 2018). Moreover, magnetic chitosan NPs degrade over time, reducing long-term environmental impact compared to synthetic materials. In general, the application of magnetic chitosan is considered environmentally friendly due to its biocompatibility, biodegradability, and efficiency in pollutant removal if it is managed properly (Niu and Jiahe 2023). However, magnetic chitosan faces a diffusion limitation after reaching a certain point due to a finite number of active sites for sorption these sites can become saturated, leading to a decrease in the sorption rate and available capacity (Chang et al. 2006).

One popular application of ongoing research on polymer @ magnetic chitosan nanocomposites is soil remediation. In this application, magnetic chitosan can be employed to remove pollutants from contaminated soils. It often binds to toxic substances and gets removed from the soil using magnetic separation techniques, thus aiding in the decontamination process (Zhu et al. 2013). Further research and applications of magnetic chitosan materials have been conducted for water treatments through sorbing additional metal ions, such as Cr (IV), Ni2+, Pd2+, Cd2+, Hg2+, Mn2+, and Fe3+.

While our research primarily concentrates on magnetic chitosan, it is important to acknowledge the existence of various other magnetic particles, such as maghemite (Fe2O3), magnetite (Fe3O4), and ferrite minerals of the form MFe2O4, where M can be Fe, Mn, Cu, Zn, Co, among others. Fe3O4 is widely used in magnetic chitosan materials due to its superior performance, exhibiting ferromagnetism compared to the super-paramagnetic of Fe2O3. Fe3O4 samples, known for their biocompatibility, chemical stability, high magnetic susceptibility, low cost, and versatility in applications such as biomedicine (Ding et al. 2015; Mohammadi-Samani et al. 2013; Ganapathe et al. 2020; Qi et al. 2022), water treatment (Abdollahi et al. 2015; Chu et al. 2024), and catalysis (He et al. 2010; Jia et al. 2017; Shokri et al. 2023), have greater magnetization and coercivity fields than Fe2O3.

In this paper, we not only evaluate various preparation techniques and sorption capacities of distinct magnetic chitosan materials but also examine the environmental factors influencing the corresponding sorption mechanism and capacity. Also, we focus on comparing sorption methods and their capabilities. Furthermore, the functionalization of magnetic chitosan’s structural, textural, morphological, and antioxidant properties was assessed.

To compete against oxidative stress and bacterial infections, biomedical materials have demonstrated enormous promise in antioxidant, and antibacterial applications. They can reduce oxidative damage, scavenge free radicals, and improve general health. Additionally, these materials have antibacterial qualities that prevent the formation of microorganisms and lower the risk of illnesses. Antioxidant and antibacterial biomedical materials provide a two-pronged approach to healing and avoiding problems. Nonetheless, issues like biocompatibility and property optimization must be resolved. Thus, teamwork is essential to progressing the field and transforming healthcare.

Nanomaterials prove effective in preventing and combating microbial resistance (Alavi and Hamblin 2023; Li et al. 2024; Pelgrift and Friedman 2013). In comparison to traditional antibiotics, antibacterial NPs offer several benefits, such as breaking down bacterial membranes, evading antibiotic resistance mechanisms, targeting bacteria through diverse strategies simultaneously, and serving as efficient antibiotic carriers (Haldorai et al. 2015a; Gupta et al. 2019; Makabenta et al. 2021). To eradicate bacteria without resorting to traditional antibiotic resistance mechanisms like permeability regulation or biofilm formation, researchers explored the use of metal or metal oxide NPs (Alavi et al. 2022; Hamza et al. 2022a).

Our efforts in the current work focused on: First, the synthesis and examination of two novel sorbents. To synthesize them, magnetic chitosan NPs (MC) are functionalized by grafting either diethyl 2-amino-4-methyl-3-oxaspiro [5.5] undecane- 1,5- dicarboxylate (S2) or ethyl 4-amino-5-cyano-2-methyl-3-oxaspiro [5.5] undecane-1-carboxylate (S1). Before being evaluated for Cd2+, this material was subjected to a wide range of analytical procedures for physical and chemical characterization. Second, the sorption, initially in an aqueous and artificial solution (using the standard criteria of metal desorption, sorption isotherms, pH effect, and uptake kinetics). The ability of the sorption material to remediate industrial effluent gathered in an Egyptian tannery unit is evaluated in a subsequent phase. Notably, in the presence of basic and acidic solutions, third, investigating the ability of chitosan to enhance the overall effectiveness as a biological agent when hybridized with Fe3O4 NPs and two various components (S1 and S2). The effectiveness of the synthesized composites was examined as active agents against Staphylococcus aureus and Klebsiella pneumonia, representing Gram-positive and Gram-negative bacteria, respectively. Their antioxidant activity was evaluated using the DPPH method (Table 1).

Table 1 List of used symbols in this paper

Materials and methods

Materials

Damao Chemical Agent Company (Tianjin, China) provided the ferrous sulfate (FeSO₄⋅7H₂O), ammonium ferric (III) sulfate dodecahydrate ((NH₄)Fe(SO₄)₂⋅12H₂O), chitosan (DA: 75%), epichlorohydrin (98%), dimethylformamide (DMF; 99.8%), methanol (99%), sodium hydroxide pellets (for pH adjustment), and acetone. Sigma-Aldrich provided the cyclohexanone, malononitrile, ethyl cyanoacetate, and ethyl acetoacetate (S.D. Fine Chemicals Ltd., 98% min. test). Reaction monitoring was done using thin-layer chromatography (TLC), and the mobile phase consisted of a mixture of benzene and methanol (8:2 volume ratios). Damao Chemical Agent Company (Tianjin, China) provided the analytical-grade reagents for this study, and double- or triple-distilled water was used to generate all the solutions. The standard solution for the experiment was produced using analytical-grade Cd(NO₃)₂·4H₂O from Sigma-Aldrich (Merck, Darmstadt, Germany).

Synthesis of sorbents

Synthesis of magnetic chitosan nanoparticles (MC)

Using the hydrothermally co-precipitation approach, magnetite chitosan was produced (Hamza et al. 2022b; Abuessawy et al. 2023). Utilizing 5 g of hydrated iron (II) sulfate and 5 g of iron(III) chloride, the pH was adjusted to 12 using a 5-M sodium hydroxide solution at 45 °C, following the dissolving of 1.5 g of chitosan in 200 mL of acidified water (containing 6% (w/w) acetic acid solution). The solution's pH was brought down to a range of 10.4–11.4. Following precipitation, the reaction was vigorously stirred at 85–90 °C for one hour. The generated magnetite chitosan NPs were removed from the solution using a magnetic control, and the next step involved multiple washes with acetone and water.

Activation of MC

By creating a crosslinking effect, this step improves the produced NPs’ chemical stability and keeps them from dissolving in acidic liquids. The alkaline solution at pH 10 of 0.01 M EPI (0.067 M NaOH solution) was combined with the wetted magnetic chitosan NPs from the previous step in a 1:1 molar ratio of EPI solution to chitosan magnetite NPs. At 70 °C, the mixture was stirred for two hours. The crosslinked chitosan that was formed was gathered by the magnetic bar and repeatedly cleaned with ethanol and water to get rid of the unreacted components. (Scheme A1) (See Supplementary Information) (Hamza et al. 2021).

Scheme1
scheme 1

Schematic diagram of atomic absorption spectroscopy (AAS)

Ethyl 4-amino-5-cyano-2- methyl-3-oxaspiro[5.5] undecane-1-carboxylate (S1)

50 ml of methyl alcohol were combined with little bits of sodium metal (0.69 g) in a round-bottomed flask. Sodium methoxide was formed once all of the sodium particles had dissolved at 25 °C. Subsequently, 3.81 ml of ethyl acetoacetate, 1.65 ml of malonitrile, and 3 ml of cyclohexanone were added, and the mixture was refluxed for 12 h. A precipitate formed was washed with water and then dried. After separating the crude product from ethanol, a yield of 8.5 g for sample S1 was obtained.

Diethyl 2-amino-4-methyl-3-oxaspiro[5.5] undecane- 1,5- dicarboxylate (S2)

In a round-bottom flask, 50 mL of methyl alcohol and 0.69 g of sodium metal were mixed. Sodium methoxide was formed at 25 °C. Once all of the sodium particles had dissolved 3.81 ml of ethyl acetoacetate, 3 ml of ethyl cyanoacetate, and 3 ml of cyclohexanone were added to the flask. This mixture was refluxed for a day at 120 °C. After a precipitate was developed, it was diluted with 100 mL of ethyl alcohol, filtered, and dried, yielding 8.3 g of sample S2.

Functionalization of activated MC by samples (S1, and S2)

A round-bottom flask holding a mixture of 5 g of either ethyl 4-amino-5-cyano-2-methyl-3-oxaspiro[5.5] undecane-1-carboxylate (S1) or diethyl 2-amino-4-methyl-3-oxaspiro[5.5] undecane-1,5-dicarboxylate (S2) in 150 ml DMF with (7 g) of activated chitosan NPs (MC), and 1 ml of NaOH (5 M) to adjust pH to roughly 10. After 10 h of refluxing the mixture at 80–85 °C, the final product S1@MCSA” and S2@MCSB” were separated using a magnetic control, rinsed with ethanol and water, and allowed to dry for five hours at 50 °C (Fouda et al. 2021; Fouda 2024) (Scheme A2.)(see SI).

Characterization of materials

H1 nuclear magnetic resonance spectroscopy (H1NMR) was employed to determine the composition of substances S1 and S2. A Bruker AC 200 spectrometer recorded the spectra (200MHz for H1). X-ray diffraction (XRD) patterns were obtained at 25 °C using a Bruker D8 Advance X-ray diffractometer with monochromatized Cu/Kα radiation (40 kV, 40 mA). The morphology of sorbents and a semi-quantitative analysis were observed using Thermo Fisher Scientific's Phenom ProX scanning electron nanoscope (SEM, The Netherlands) with EDX facilities. The textural characteristics of the sorbents were examined through the BJH method and a Nanomeritics Tri-Star II surface analyzer (Norcross, GA, USA). Before analysis, the samples underwent degassing for 12 h at 100 °C. Regarding TGA analysis, a Netzsch STA 449 F3 Jupiter thermogravimeter (NETZSCH-Geratebau GmbH, Selb, Germany) was employed with a temperature ramp of 10 °C /min (under an oxygen atmosphere). A Malvern Instruments Model Zetasizer Nano ZS laser Zeta Meter was employed to measure the zeta potential.

Cd (II) ions sorption from aqueous solution

Role of pH in the sorption of Cd (II) ions

The pH of the solution was adjusted to 2.0, 4.0, 6.0, 8.0, and 10.0 using a solution of 0.1 mol/L HCl and NaOH in order to examine the impact of pH on the sorption performance of the as-synthesized MC, SA, and SB nanocomposites, respectively. 0.005 g of sorbents was added to 100 ml of Cd (II) (25 mg/L) solution at different pH values. The aforementioned experiments were set up and run for 180 min at 25 °C in a constant temperature oscillator After equilibrium for 180 min. After sorption, all samples were centrifuged, and Cd (II) in the supernatants was measured using atomic absorption spectroscopy (AAS) that was used to achieve the uptake investigation of Cd (II)ions (Fouda et al. 2022a).

Sorption kinetics experiments

To investigate the Sorption kinetics, 0.005 g of the as-designed MC, SA, and SB nanocomposites were added to a centrifuge tube along with 100 mL of a 25 mg/L Cd(II) solution at pH 6. After that, the centrifuge tube was placed in a constant temperature oscillator. This oscillator was set up to oscillate at a temperature of 25 °C and 150 rpm for 0, 10, 20, 30, 45, 90, 120, and 180 min. Once removed, the supernatant was stored for later analysis. We applied Pseudo-first, second-order definitions of the sorption kinetics, and intraparticle diffusion methods (Jafari-Sales and Pashazadeh 2020).

Modeling of sorption isotherm and the impact of the starting Cd2+ ions concentration

The sorption isotherms of Cd (II) were investigated using 0.005 g of the as-designed MC, SA and SB nanocomposites in 100 mL of an initial concentration of 5, 10, 15, 25, 50, 100, 200, and 300 mg/L Cd (II)solution at pH 6. After that, the sample was placed in a constant temperature oscillator with a temperature setting of 25 °C and rotated for 120 min at 150 rpm. The procedure indicated above was used to determine the supernatant.

Impact of temperature on the sorption process

The effect of temperature on the process of cadmium sorption was evaluated. Lastly, the thermodynamic functions of the as-designed nanocomposites were found at temperatures of 298, 308, and 318 K with Cd (II) concentrations of 25 mg/L. Following sorption, each sample was centrifuged, and the amount of Cd (II) in the supernatants was determined using atomic absorption spectroscopy (AAS), which allowed for the uptake of Cd (II) ions to be investigated as shown in Scheme 1.

Desorption and regeneration experiments.

0.005 g of the sorbents were combined with 100 ml of a pH 6.0 solution (Co = 25 mg/L) for the desorption investigations, and the mixture was shaken for two hours at 150 rpm using a reciprocal shaker. To get rid of any Cd(ÌI) ions that had not yet been adsorbed, the cadmium-loaded nanocomposite was separated and cleaned with distilled water. After that, the sorbents were desorbed for four hours using 50 ml of 0.1 M Na2EDTA. Subsequently, the sorbents were gathered and cleaned for future usage using distilled water and 0.1 M NaOH. This sorption–desorption cycle was carried out five times to verify the nanocomposites' reusability.

Utilizing tanneries wastewater

The effluent from the tannery was collected on the tenth day of Ramadan in Robbiki Leather City, Cairo, Egypt (GPS: N: 30° 17′ 898′′, E: 31° 76′ 840′′). In batch systems, sorption studies were conducted at pH values ranging from 2 to 10. The contact time was 24 h.

Antibacterial activities

The disk diffusion method was employed to assess the effectiveness of synthesized compounds S1, S2, S1@MC, and S2@MC against pathogenic bacteria, including Gram-positive Staphylococcus aureus ATCC 6538 and Gram-negative Klebsiella pneumoniae ATCC 700603. The bacterial strains were initially sub-cultured in 100 mL of nutrient broth, which contained 5 g/L peptone, 3 g/L beef extract, and 5 g/L NaCl in 1 L of distilled water. The cultures were then incubated at 37 °C for 24 h. Subsequently, 100 µL of bacterial culture (adjusted to an OD of 1.0) were spread evenly onto Mueller-Hinton agar plates (pre-prepared by Oxoid) and allowed to solidify under sterile conditions. Paper disks (7 mm in diameter) were then loaded with 100 µL of the synthesized compounds (at a concentration of 10 mg/mL), allowed to dry, and placed onto the surface of the inoculated agar plates. Disks containing the solvent (DMSO) were used as negative controls. The plates were refrigerated for one hour to ensure complete diffusion before being incubated at 37 °C for 24 h (Kanagesan et al. 2016). After incubation, the diameter of the clear zone around each disk was measured.

Antioxidant activities

The DPPH scavenging method was used to evaluate the antioxidant effectiveness of the synthesized samples S1, S2, S1@MC (SA), and S2@MC (SB). In this method, various concentrations (ranging from 2 to 1000 µg/mL) of synthesized samples were prepared in Milli-Q H2O. Initially, DPPH was dissolved in ethanol to a concentration of 0.1 mM. Approximately 1 mL of the ethanolic DPPH solution (0.1 mM) was mixed with 0.1 mL of S1, S2, SA and SB. The mixture was then kept at 25 °C for 60 min with shaking at 100 rpm in the dark (Bajpai et al. 2015). After the incubation period, the absorbance of the generated color was measured at 517 nm in the dark using a UV spectrophotometer. The absorbance (A) was recorded against an ethanolic DPPH solution blank. The following equation was used to compute the antioxidant property:

$$\left( {\% \, } \right) \, = \frac{{A_{{{\text{blank}}}} - A_{{{\text{Sample}}}} }}{{A_{{{\text{blank}}}} }}$$
(1)

Results and discussion

Characterization of sorbents

FTIR spectroscopy

The infrared spectrum of a chemical substance can serve as a fingerprint for identification. All sorbents exhibit chemical alterations at different stages of the production process, as identified through FTIR analysis as shown in Fig. 1. According to the IR spectrum of S1, a very small peak at 3441 cm−1 can be assigned to the stretching vibrations of N–H. The characteristic peaks at 2933 and 2861 cm−1 are attributed to CH-Aliphatic. The two absorption peaks at 1650 cm−1 and 2311 cm−1 represent the C = O stretching vibrations and CN, respectively. Moreover, the peak at 1146 cm−1 represents (C–C) stretching vibrations.

Fig. 1
figure 1

FTIR spectra of various synthesized samples S1, S2, MC, SA, and SB

In the spectrum of magnetic chitosan (MC), magnetite presence can be confirmed by the peak at 609 cm−1. The typical bands of the β-D-glucose unit are also noted. The activation process of the composite (MC) is evident through the appearance of the C–Cl bond (at 609 cm−1) and epoxy ring (at 1020 cm−1). A strong peak at 3460 cm−1 is attributed to the OH group.

After the hybridization of S1 with MC, two differences are readily apparent from a comparison of IR spectra: (i) the appearance of the peak at 2311 cm−1 related to CN becomes more pronounced, and (ii) the peak at 3428 cm−1 becomes stronger and sharper. All characteristic peaks exist simultaneously in the IR spectrum of SA, indicating that the composite was successfully synthesized (Hassan et al. 2017).

On the other hand, the FTIR spectrum of sample S2 showed a broad band at 3318 cm−1 attributed to NH₂. Well-defined band two small bands of CH-Aliphatic can be seen at 2926 and 2855 cm−1. The sharp peak at 1626 is concerned with C = O. Moreover, 1HNMR spectroscopy was used to characterize S1 and S2 compounds by appearance of amino group at 8.4 ppm, the spectrum is displayed in Fig. A2 (a, b).

The intensity of strong and broad absorption decreased by associating MC with S2, suggesting that hydrogen bonds and electrostatic forces might have formed between the synthetic sample S2 and the magnetic chitosan particles to form the magnetic nanocomposite SB.

XRD analysis

The study employed powder X-ray diffraction research to inspect the structural characteristics of magnetic NPs in chitosan, as well as their ability to hybridize S1 and S2 compounds. Figure 2 displays the XRD patterns of compounds S1, S2, S1@Fe3O4–chitosan “SA”, and S2@Fe3O4–chitosan “SB”. Six distinct peaks are visible at 2θ in compounds S1, S2@Fe3O4–chitosan: (220), (311), (400), (422), (511), and (440). The diffraction strength of the peaks in the XRD patterns demonstrated the reverse spinel structure and purity of the Fe3O4 NPs. The conclusions demonstrated that MNPs-chitosan overloaded with S1 and S2 have the anticipated Fe3O4 crystallite shape.

Fig. 2
figure 2

Powder X-ray diffraction (XRD) patterns of compounds S1, S2 and SA, SB nanocomposites

Morphological analysis

SEM images of S1, S2, and SA, SB nanocomposites are shown in Fig. A3. As can be seen in Fig. A3 (a, b), respectively, compound S1 exhibits an irregular shape with rough surfaces tightly packed together, while compound S2 showed rough surfaces with rugged shapes with some cavities and channels. The hybridization of two compounds S1 and S2 with magnetic chitosan are shown in Fig. A3 (c, d), respectively. SA nanocomposites are found to be non-uniform with interstitial holes and canals between pieces of broken glass, while SB nanocomposite clarifies several quasi-needle and flat discotic structures with heterogeneous cavities and canals. After the visualization of nanocomposites with SEM, TEM revealed that S1 and S2 were both monodispersed, smooth-shaped, and had no aggregation, with a particle size of around 0.44–0.68 nm for S1 and 0.25–0.32 nm for S2 (Fig. A4 (a, b), (d, e)) (See SI), respectively.

Figure A4 (g, h) shows TEM for SA nanocomposites, where the magnetite NPs, appearing as dark entities, are incorporated within the matrix of the functionalized biopolymer (light-colored), displaying sizes ranging approximately between 20 and 39 nm. The distribution of magnetite NPs is generally uniform, suggesting irregular morphology, with some forming agglomerates. In the case of the SB nanocomposite, as shown in Fig. A4 (j, k) via TEM, particle sizes range from approximately 15 nm to 38 nm. The observed particle sizes of both S1@MC and S2@MC confirm the successful formation of nanocomposites. The SAED pattern, providing information about crystallinity, lattice parameters, crystal structure, and orientation, is presented in Fig. A4 (c, f, i, l) for S1, S2, SA, and SB nanocomposites, showcasing ring patterns indicative of crystalline structure formation (Hamza et al. 2022c).

Textural analysis

The textural characteristics of the proposed SA and SB nanocomposites are assessed using the N2 sorption–desorption isotherms (Fig. A1). The IUPAC classifies all of the isotherms as type II, and their closed hysteresis loops make them easily identifiable. The hysteresis type is primarily defined by mesoporous materials in the P/Po range of 0.20–99 that have agglomerated plate-like and/or spherical particles with slit-shaped pores (Hamza et al. 2022c). The functionalization process affects the textural properties. As indicated in (Table A1)(See SI), the specific surface area (SBET, m2 g⁻1), pore volume (Vp, cm3 g⁻1), and pore diameter (nm) for the MC compound were found to be 3.6258 m2 g⁻1, 0.033385 cm3 g⁻1, and 40.612 nm. SA was measured to be 8.66 m2 g⁻1, 4.89 cm3 g⁻1, and 22.573 nm, and 9.72 m2 g⁻1, 6.49 cm3 g⁻1, 26.699 nm for SB, respectively.

Thermogravimetric analysis

Thermogravimetric analysis (TGA) is a valuable technique for probing the thermal stability and thermal degradation behavior of materials. As illustrated in Table A2 and Fig. 3, two sorbents (SA, SB) showed three mass losses, which occurred at 109–350.5 °C and 375 °C—573 °C. About 4–5 weight percent is lost in the first mass loss, which is caused by the discharge of water that has been absorbed at the sorbents' surface. The mass loss in the second degrading step is 54.6% and 56.4%, respectively. The third phase (up to 450 °C) reveals the total weight loss is 82.1% and 60.3%, respectively.

Fig. 3
figure 3

TGA Thermogram of (a) “SA” and (b) “SB” nanocomposites

Zeta potential analysis

Figure 4 shows the MC and S2@MC(SB) titration profiles, determined using the pH drift method. The point of zero charge (pHpzc) was estimated by adjusting the pH of the sorbents in a 0.01 M NaCl solution to a range between 2 and 10 using 0.01 M NaOH and 0.01 M HCl. After adding 0.2 g of the sorbent to 50 cm3 of the solution, the final pH was recorded after 24 h. Surface sorption on magnetic chitosan (MC) is attributed to the Fe–OH groups present on the iron oxides’ surface. The magnetite surface maintains a positive charge up to a pH of approximately 6.8. The modification is evidenced by the shift in pHpzc from 6.8 to 4.8 for S2@MC(SB). This acidic shift in SB sorbent is mainly due to the presence of carboxylic groups and the spiro structure (Al-Khaldi et al. 2015). At a pH above pHpzc, the surface of SB exhibits a negative charge and an increased capacity for removing cationic Cd (II).

Fig.4
figure 4

the pH-zeta potential of MC and SB nanocomposites

Sorption studies

This section explores the elimination of hazardous ions, such as Cd2+, through the utilization of synthesized sorbents. Delving into their interaction profiles and incorporating mechanistic insights, the text outlines the remediation efficiencies of these nanocomposites.

pH’s impact on Cd (II) sorption

To maximize the elimination of Cd (II), the pH range of 2.0–10.0 was examined for the functionalized magnetite chitosan-heterocyclic nanocomposites as produced. The surface charge of the sorbents and the metal’s speciation characteristics determine the sorption of heavy metals. When pH levels are above 3, the predominant cationic species present is Cd2+ (Al-Khaldi et al. 2015). Generally, Cd (II) can be found in solution as Cd2+, Cd(OH)+, Cd(OH)2, Cd(OH)3, and Cd(OH)42– with different pH values (Galhoum 2023; Mashhadikhan et al. 2022).

The removal of Cd2+ by MC increased from 66.2% to 90.8%, with a rise in pH from 2.0 to 10.0 (Fig. 5), while Cd2+ amputation by SA and SB nanocomposites increased from 68.9% to 95% and from 70.9% to 95.15% with pH up to 6.0 (Morshedy et al. 2021). The rise in pH values enhances the sorption of Cd2+. This is due to the deprotonation of the reactive groups, which leads to a reduction in the repulsion of cadmium cations and thus increases the sorption capacity (Langmuir 1918). At high pH values (i.e., pH ˃7), creating hydrolyzed species may hinder metal sorption. It is important to note that the cadmium starts to precipitate at pH levels above 8.5. Conversely, the sorbent surface becomes highly protonated at lower pH levels, leading to electrostatic repulsion between Cd (II) and the protonated surface. This makes it incapable of providing the active sites for Cd (II) uptakes. Furthermore, there is a greater chance of sorbent dissolving in an acidic liquid.

Fig.5
figure 5

The impact of pH on the sorption efficiencies of sorbents for Cd2+ removal in both aqueous solution and tannery effluents. The profiles of the sorption capacities toward Cd2+ are also examined

The likelihood of dissolution and degree of protonation on the sorbent surface diminishes steadily with increasing pH and reaches zero at pHpzc. The SB nanocomposites had pHpzc values of 4.8. Cd (II) sorption onto the steadily enlarged surface at pH > pHpzc occurs because the sorbent's negative charge surface affords binding sites for Cd (II). In contrast, the removal percentage of Cd (II) by SB nanocomposites reached equilibrium at pH = pHpzc. Scheme 2 depicts a potential process for Cd (II) sorption. Consequently, pH 6.0 is ideal for Cd (II) sorption (Morshedy et al. 2021).

Scheme 2
scheme 2

Possible mechanism of the sorption of Cd2+ onto SA and SB nanocomposites

The uptake percentage (%), amount adsorbed per unit mass of adsorbent at equilibrium (qe), and distribution ratio (Kd) were given as follows:

$$\% {\text{ uptake }} = \frac{{C_{{\text{o}}} - C_{{\text{e}}} }}{{C_{{\text{o}}} }} x 100$$
(2)
$$q_{{\text{e}}} = \left( {C_{{\text{o}}} - C_{{\text{e}}} } \right)\frac{V}{m}$$
(3)
$$K_{{\text{d}}} = \frac{{C_{{\text{o}}} - C_{{\text{e}}} }}{{C_{{\text{o}}} }}x\frac{V}{W}$$
(4)

where m (g) is the mass of the nanocomposite, and V (L) is the total volume of the solution. Co and Ce (mg/L) represent the initial and equilibrium concentrations of Cd2.

Uptake kinetics

As demonstrated in Fig. A5, the sorption of cadmium in aqueous solution and tannery effluent by MC and SA and SB nanocomposites was fast within the first 50 min of contact time and reached equilibrium in 180 min. Due to the increased binding affinity of SA and SB nanocomposites toward cadmium, MC had a substantially lower removal capacity than SA and SB nanocomposites. To further understand the removal process, the kinetics of the SA and SB nanocomposites were fitted into a pseudo-first order, a pseudo-second order, and an intraparticle model (Fig A (6, 7, 8))(See SI). The parameters acquired through the model fitting are shown in Table A3 (See SI).

The pseudo-second-order model (R2 ~ 0.99) best captures the dynamics of SA and SB among the three. While the sorption of cadmium also decreased significantly, by about 95.15% > 95% > 90.8% for S4 > S3 > S*, respectively. For tannery effluent, the removal efficiency decreased from S4t > S3t > S*t, respectively. During the first contact period, 50 min and 180 min were sufficient to complete the sorption equilibration.

The fast uptake rate revealed that cadmium capture was primarily driven by surface complexation due to the exposure of numerous sorption sites on the surface of SA and SB. The cadmium sorption rate slowed down as the sorption sites were gradually filled by it, eventually reaching equilibrium. The pseudo-first order, pseudo-second order, and intraparticle diffusion models were used to investigate the kinetics behavior of magnetic particles. The associated equations are written as follows:

Pseudo-first-order model

$$\ln \left( {q_{e} - q_{t} } \right) = \ln q_{e} - K_{1} t$$
(5)

Pseudo-second-order model

$$\frac{t}{{q_{t} }} = \frac{1}{{K_{2} q_{e}^{2} }} + \frac{1}{{q_{e} }}t$$
(6)

Intra-particle diffusion

$$q_{t} = K_{{\text{diff }}} t^{0.5} + C$$
(7)

where the rate constants of the intraparticle, pseudo-first-order, and pseudo-second-order diffusion models are denoted as \({K}_{\text{diff}}\) (mg g min−1/2), \({K}_{1}\) (min−1), and \({K}_{2}\) (g mg−1 min−1) for the sorption process, respectively. The amounts of Cd2+ adsorbed sorbent at equilibrium and at various times t (min) are represented as \({q}_{e}\) and \({q}_{t}\) (mg/g). The slope of the ln (\({q}_{e}\)\({q}_{t}\)) against t plots can be exploited to estimate the value of k1. Plotting t/\({q}_{t}\) vs t yields a straight line with 1/\({K}_{2}{q}_{e}\) 2 for the intercept and 1/\({q}_{e}\) for the slope.

The results show that the correlation coefficient (R2 > 0.99) in the pseudo-second order was larger than the correlation coefficient in the pseudo-first order, and the values of qe (cal) in the pseudo-second order were nearly identical to qe (exp) (Table A3). As a result, the pseudo-second-order model fits the Cd (II) sorption data the best. It is proposed that Cd (II) sorption is regulated by chemisorptions, complexation, or chelation on the surface active sites (amino and carboxylic groups) of sorbents. In addition, the experimental values (qe,exp) and the predicted equilibrium sorption capacities (qe, cal) differ significantly. Although not very well, the calculated sorption capacities (qe, cal) for the pseudo-first-order reaction were 5.42, 5.33, 5.69, 5.13, 5.21, and 5.24 for S*, S3, S4, S*t, S3t, and S4t, respectively,hydrophilic nano-environment on the while the experimental sorption capacities Qeexp (mg/g) for S*, S3, S4, S*t, S3t, and S4t were 45.24, 46.36, 47.34, 42.74, 43.59, and 44.25, respectively. For the pseudo-second-order model, the estimated sorption capacities (qe, cal) were 24.75, 29.85, 40.32, 28.25, 33.56, and 23.70 for the S*, S3, S4, S*t, S3t, and S4t, respectively. These results imply that the pseudo-second-order model can appropriately describe the kinetic data (Langmuir 1918).

The rate control activities in the sorption process were evaluated using intraparticle diffusion (Table A3 and Fig.A8): A multi-linear plot with three main stages, where the exterior surface sorption (macropore diffusion) and progressive sorption (micro-/meso-pores) represent the first two stages. This suggests that both boundary layer and intraparticle diffusion influence the sorption rate.

Sorption isotherms

The two well-known isotherm equations, the Langmuir and Freundlich equations, were employed in this study to derive the isotherm parameters. The Langmuir isotherm model is appropriate for monolayer adsorption onto a surface with a limited number of identical and equivalent sites. On the other hand, the Freundlich isotherm model, an empirical equation that was widely applied in multilayer adsorption, takes into consideration the uneven distribution of adsorption heat and affinities over the heterogeneous surface of the absorbent (Shan et al. 2015). For describing the thermodynamic behaviors of Cd2+ adsorption, the Langmuir and Freundlich isotherm models were utilized, and their mathematical representations can be expressed as follows:

$$\frac{{C_{e} }}{{q_{e} }} = \frac{{C_{e} }}{{q_{\max } }} + \frac{1}{{q_{\max } b}}$$
(8)
$$\log q_{e} = \log K_{{\text{f}}} + \frac{1}{n}\log c_{e}$$
(9)

where b is the Langmuir parameter in L/mg expressing an affinity of the sorbate for the binding sites, and \({q}_{\text{max}}\) is the maximal amount of cadmium. The linear plot of \({C}_{e}\)/\({q}_{e}\) versus \({C}_{e}\) can be leveraged to estimate b and \({q}_{\text{max}}\). \({K}_{\text{f}}\) (L/g) and n (dimensionless) are the Freundlich model constants, which represent the level of adsorption and nonlinearity. The intercept value of \({K}_{\text{f}}\) and the slope value of n is calculated using the plot of ln \({C}_{e}\) versus ln \({q}_{e}\) for the sorption, respectively. Sorption isotherm tests are carried out as a function of the starting cadmium concentration to understand the sorption behavior and investigate the maximum cadmium sorption capacity of sorbents. The linear forms of the Langmuir and nonlinear Freundlich models (Fig. A (10, 11))(SI) are used for matching the experimental isotherm data and minimizing the corresponding error functions.

Cadmium sorption increased significantly as the initial cadmium concentration increased until it reached its maximum value of 270 mg Cd2+/g, as shown in Fig. A9. Compared to the Freundlich model, the sorption isotherms of the various nanocomposites: MC, SA, and SB, along with the tannery effluents: S*t, S3t, and S4t fitted well to the Langmuir equation. This suggests that the sorption of Cd2+ ions onto the surface of different sorbents may be monolayer adsorption with a constrained number of sorption sites. The Langmuir Qmax are 243.90, 250, 270.27, 212.76, 237.09, and 238.09 for S*, S3, S4, as well as the tannery effluents S*t, S3t, and S4t, respectively. It is worth noting that K is set to the following values: 1.17, 2.22, 1.23, 1.46, 0.44, and 0.57, respectively. This highlights that different nanocomposite samples produce higher Cd2+ sorption potential than magnetic chitosan.

The characteristics of the two simulation models reveal a strong linear fitting of the Langmuir model. Table A4 contains a list of all the isotherm parameters derived from the two models. The Langmuir model’s simulation of the linear regression coefficients (R2) is substantially greater than the Freundlich model.

Thermodynamic studies

To replicate the natural sorption process of cadmium, the standard Gibbs free energy change (ΔG°), standard enthalpy change (ΔH°), and standard entropy change (ΔS°) of thermodynamics are computed at various temperatures. The positive or negative values of ΔG°, ΔS°, and ΔH°, respectively, indicate spontaneous or non-spontaneous increases or decreases in randomness, as well as endothermic or exothermic states. A general equation can be used to calculate ΔG° (Abo El-Yazeed et al. 2020):

$$\Delta G^{O} = \, - \, RT \, LnK^{o}$$
(10)
$$\Delta G^{O} = \, \Delta H^{o} - \, T \, \Delta S^{o}$$
(11)

where TK) and K° stand for the Kelvin temperature and the thermodynamic equilibrium constant, respectively, and R is the ideal gas constant (8.314 J mol−1 K−1). Fig. A (12, 13) shows the Ln Kd versus 1/T linear plots. From Eq. (10) and (11), we get the following formula (Wu et al. 2023; Say et al. 2006):

$$LnK^{o} = \frac{{ \Delta S^{o} }}{R} - \frac{{\Delta H^{O} }}{RT}$$
(12)

The plot between lnKd and 1/T was used to calculate the values of ΔG⁰, ΔH⁰, and ΔS⁰. Van't Hoff is not a straightforward method, but it is accurate for calculating thermodynamic properties at solid-solution interfaces. As a result, the ΔSo and ΔHo are discovered, and all of the thermodynamic parameters (ΔGo, ΔSo, and ΔHo) are reported in Table A5.

The feasibility and spontaneity of Cd (II) sorption were reflected by the negative value of ΔG⁰ for sorbents. The exothermic nature of the Cd (II) sorption process is indicated by the negative values of ΔH⁰ for S*, S3, S4, S*t, S3t, and S4t (− 15.148, − 13.60, − 13.18, − 18.163, − 16.820, and − 16.06 kJmol−1), respectively. It may be predicted that diffusion of Cd(II) sorbent was decreased with a temperature rise. The positive values of ΔS⁰ for S*, S3, S4, S*t, S3t, and S4t (152.37, 147.80, 146.83, 160.94, 157.08, and 154.93 kJmol−1, respectively) demonstrate a randomness increase at the metal solution interface and solid surface during Cd(II) sorption. This may enhance the sorbent’s affinity for Cd (II). Consequently, the thermodynamic parameter results indicated that the Cd (II) sorption process is exothermic and feasible (Mouden et al. 2023; Ardean et al. 2020; Hassan et al. 2022; Lemessa et al. 2024).Table A6 compares previously reported functionalized magnetic chitosan, and it is apparent that these sorbents are more favorable due to their shorter contact time and higher sorption capacity.

Regeneration study

Research and economic feasibility are crucial in determining the reuse of the sorbents and the recovery of heavy metals, both from practical and environmental perspectives. To achieve this, 0.1 M Na2EDTA was used as an elution agent to desorb the cadmium-adsorbed nanocomposites. The regeneration efficiency of three sorbents in five consecutive desorption cycles is shown in Fig. 6.

Fig.6
figure 6

Reusability study of MC, SA and SB nanocomposites for Cd2+ ions. (pH = 6, sorbent dose = 0.005 g/100 mL; Co = 25 mg L.−1; t = 120 min)

It has been noted that the synthesized nanocomposites have maintained good performance for five cycles with slight changes limited to 6% in the sorption/desorption ability of Cd(II). The desorption capacities of these nanocomposites were around 87.89%, 91.5%, and 93.89% for S*, S3, and S4, respectively, for the first cycle. The loss of sorbents during the washing phases and partially desorbed active sites on them may cause the sorption reduction of Cd(II) observed after more than three cycles (Alyasi et al. 2020). These findings suggest that Na2EDTA is a good regenerator, and the nanocomposites in their original form could be utilized frequently as reliable sorbents for treating contaminated water in real-world applications.

Mechanism study

Cadmium sorption by magnetic chitosan and both sorbents SA and SB were evaluated. According to the results of sorption kinetics and isotherm, the kinetic data at an optimal pH 6 could be accurately described using a pseudo-second-order equation. This suggests that Cd(II) sorption is primarily governed by chemisorption, occurring through complexation or chelation at the active surface sites. NH, Ester, OH, and CΞN are the functional groups in charge of the sorption of metal ions, as shown in Scheme 2. The pH level influences the binding mechanism. For example, at pH levels greater than the point of zero charge (pHpzc), Cd(II) sorption increases as the negatively charged sorbent surface provides binding sites for Cd(II).

The sorption process was best described by the Langmuir adsorption isotherms, as evidenced by linear regression coefficients (R2) that were significantly higher compared to those of the Freundlich model. Furthermore, the Langmuir model best suits monolayer adsorption onto a surface with a finite number of equal and equivalent sites. In addition to temperature studies, which are necessary to determine the thermodynamic parameters that confirm our mechanism is physisorption. Finally, the hydrophilic nano-environment on the nanocomposite surface further facilitates this interaction, enhancing cadmium sorption effectiveness. This nano-environment encourages cadmium entry and increases the sorption efficiency of SA and SB nanocomposites (Janjhi et al. 2023).

Antimicrobial activities

The development and optimization of antimicrobial active composites are regarded as a crucial advancement in improving effective treatments for microbial infections (Mohamed et al. 2022). Effectively targeting and removing resistant bacteria have recently drawn researchers’ attention to developing new active compounds. In this work, our strategy involves synthesizing new compounds with special structures and operational mechanisms. This process involves developing and evaluating various chemical structures, which can be adjusted to improve their effectiveness against resistant bacteria while reducing potential damage to human cells (Haldorai et al. 2015b). Using active compounds with antibacterial properties for cadmium removal can lessen dependence on harmful chemicals, fostering more environmentally friendly practices (Fouda et al. 2022b; Shokri et al. 2023).

In our investigation, we analyzed the effectiveness of the synthesized sorbents SA and SB, along with their respective heterocyclic bases S1 and S2, in inhibiting the growth of pathogenic bacteria, specifically S. aureus and K. pneumoniae, using the disk diffusion method. It is important to note that the solvent system (DMSO) displayed no antibacterial activity against either Gram-positive or Gram-negative bacteria. Both the untreated and modified sorbents (S1, S2, SA, and SB) demonstrated significant efficacy, with clear zones of inhibition. The zones of inhibition against S. aureus and K. pneumoniae following treatment with S1 and SA were (16 ± 0.4 and 10 ± 0.7 mm) and (20 ± 0.2 and 18 ± 0.4 mm), respectively. Similarly, treatment with S2 and SB resulted in zones of inhibition of (19 ± 0.4 and 17 ± 0.7 mm) and (22 ± 0.2 and 20 ± 0.4 mm), respectively. As illustrated in Fig. 7, the effectiveness of polymers SA and SB surpasses that of both S1 and S2, likely owing to the inclusion of magnetite NPs. Compared to its non-functionalized counterpart, a recent research effort found that chitosan functionalized with magnetite NPs showed improved antimicrobial properties against both Gram-negative and Gram-positive bacteria (Draviana et al. 2023).

Fig. 7
figure 7

Clear Zone of S1, S2, SA, and SB nanocomposites

There is a link between the characteristics of the incorporated S1@CS-Fe3O4 (SA) and S2@CS-Fe3O4 (SB) NPs and their antimicrobial effects. The crystal sizes of both sorbents, SA and SB, were small (20.0 nm and 15.0 nm, respectively, as shown in Fig. A4 (g, h) and (j, k)). These NPs were dispersed, spherical, and highly distributed, which are crucial properties for enhancing the antimicrobial efficacy of CS-Fe3O4 NPs at low concentrations (10.0 mg/mL) against all tested bacteria. They reported that our synthesized NPs possess superior physical and chemical properties compared to traditional organic and artificial antimicrobial agents. These advantages include smaller crystal sizes, reduced average particle size, increased stability, and higher potency for interacting with pathogenic bacteria (Yeamsuksawat et al. 2021; Gomha et al. 2018).

Antioxidant activities

Discovering novel substances with antioxidant properties is of utmost importance in the health and medicine sectors. Free radicals can lead to a range of diseases, such as cancer, heart disease, and neurological disorders. Therefore, finding new antioxidant molecules is crucial for devising new treatments and preventive strategies for these diseases. NPs are promising candidates as antioxidant compounds due to their unique physicochemical characteristics, such as small sizes and a high surface-to-volume ratio, which enhance their activity and interaction with biological systems, improving their ability to scavenge free radicals (Yen and Der 1994; Chen et al. 2020).

In this investigation, the DPPH technique was used to examine the antioxidant activity of samples S1, S2, and the as-synthesized S1@MC (SA) and S2@MC (SB) nanocomposites, as described in reference (Mercado et al. 2018). The antioxidant capacity of these samples was found to be concentration-dependent, increasing with higher NP concentrations and vice versa (Boulebd et al. 2022). The radical scavenging capacity of the uncoated and chitosan-coated compounds increased in the following order: S1 < S2 < SA < SB < Ascorbic Acid, as indicated in Table A7. The highest scavenging activity for samples SB, SA, S2, and S1 was recorded at 1000 µg/mL, with percentages of 96.63%, 94.20%, 91.87%, and 90.48%, respectively. These results are slightly significant compared to ascorbic acid (98.65%), which was used as a positive control (Fig. 8).

Fig. 8
figure 8

DPPH-radical scavenging ability of S1, S2, SA, and SB at different concentrations (2 – 1000 μg mL − 1)

The DPPH free radical scavenging capacity of S2 exceeds that of S1. This difference is attributed to the inductive and resonance effects, which make the –C≡N group in compound S1 a strong electron-withdrawing group. It has been observed that electron-withdrawing groups can increase the bond dissociation energy (BDE) of N–H bonds and reduce their free radical scavenging ability. In contrast, the –CHCOOC2H5 group in compound S2 is considered a weaker electron-withdrawing group compared to the –C≡N group (Kovacic and Somanathan 2013).

The proposed SB and SA show higher scavenging activity than the two organic bases (S2 and S1) due to the presence of magnetite chitosan NPs. Many mechanisms have been developed for the antioxidant activity of chitosan as well as its derivatives: (i) this includes amino groups that can donate electrons, enabling it to protect cells from oxidative stress and scavenge free radicals; (ii) inhibiting the activity of involved enzymes in the production of reactive oxygen species; (iii) preventing the formation of undesirable reactive oxygen species, hence reducing oxidative damage, by binding chitosan to metal ions like iron and copper (Hatami Kahkesh, et al. 2023). The ability of metal ions with antioxidant effects to eliminate free radicals has been reported in several studies (Shokri et al. 2023; Hastak et al. 2018). When S2@MC and S1@MC NPs are formed, the chitosan coatings on the surfaces of the organic bases S2 and S1 shrink. This results in a notable surge in the exposed chitosan surface area, which in turn improves chitosan's ability to interact with free radicals, metal ions, and enzymes, thereby reinforcing its natural antioxidant activity [77].

Conclusion

Two new modified heterocyclic-magnetite chitosan nanocomposites, labeled SA and SB, were synthesized as sorbents for removing cadmium ions from aqueous solutions and tannery water. These sorbents were characterized using FTIR, XRD, TGA, BET, SEM, SAED, TEM pattern analysis, and pHpzc. Under optimal conditions (pH 6.0, contact time 120 min, and adsorbent dosage 0.005 g/100 ml), the adsorption capacities of the aqueous solution and tannery water for Fe3O4, functionalized with Ethyl 4-amino-5-cyano-2-methyl-3-oxaspiro[5.5]undecane-1-carboxylate and Diethyl 2-amino-4-methyl-3-oxaspiro[5.5]undecane-1,5-dicarboxylate, were 243.90, 250, 270.27, 212.76, 237.09, and 238.09 mg/g, respectively. The sorption isotherm followed the Langmuir isotherm, indicating that the nanomaterials significantly remove heavy metals like Cd(II) from tannery effluent and aqueous solution. Additionally, the modified sorbents were tested for antibacterial activity, showing beneficial effects against Escherichia coli (ATCC 11229) and Staphylococcus aureus (ATCC 25923). Moreover, SA and SB demonstrated moderate antioxidant activity, with results slightly lower than ascorbic acid in most tests. This response can be improved by increasing the antioxidant concentration while avoiding negative health effects.