Introduction

Water, an essential compound for the sustenance of life on Earth, represents a global challenge in the twenty-first century, as the demand for clean potable water intensifies. Unadulterated water is a fundamental requirement for all living organisms. The contamination of water by various agents, including organic dyes, microorganisms, microbial toxins, heavy metal ions, fertilizers, pathogens, pesticides (Krishnamurthy et al. 2020), and pharmaceuticals, poses a significant threat to both the environment and human health. Of particular concern are heavy metal ions and organic dyes in water systems, as they present substantial risks (Sharma et al. 2022). Thus, there is a pressing need for the development of more effective water treatment techniques to eliminate contaminants from both aquatic ecosystems and the environment.

Lead (II) (Pb (II)) ranks among the most widespread and hazardous heavy metals globally. It is found in various sources, including industrial waste, mining, metal-based paints, and agricultural practices. Even at low concentrations, Pb (II) exerts severe toxicological effects on both human health and the environment. Consequently, the direct discharge of Pb (II)-containing waste into water-rich environments is detrimental (Ahmad et al. 2020; Chiew et al. 2022). Furthermore, Pb (II) exposure can impair brain function by disrupting nutrient and oxygen supply. High levels of lead exposure can lead to weakness, anemia, damage to the kidneys and brain tissue, and can harm the nervous system, especially in infants and children (Das et al. 2022).

Toluidine blue (TB), classified as a phenothiazine cationic dye, finds extensive application in biology and biotechnology for its ability to stain DNA- and RNA-rich tissues, owing to its strong affinity for acidic tissue components. Furthermore, TB is a versatile intermediate dye used in various applications across medicine, biotechnology, and the textile industry. Despite its structural similarity to methylene blue, there has been limited research on materials designed for the removal of TB from wastewater (Brandão et al. 2023; Wu et al. 2021).

Various conventional treatment methods are employed to remove dye molecules and heavy metals from aqueous wastes. These methods include flotation, extraction, photocatalysis, ion exchange, electrochemical processes, membrane filtration, electrodialysis, advanced oxidation processes, reverse osmosis, biological treatment, adsorption, coagulation, precipitation, and biosorption. These techniques offer a range of approaches for the efficient removal of pollutants from wastewater (Joshiba et al. 2021; Zheng et al. 2020; Jain et al. 2020; Zhang et al. 2020; El-Shamy 2020; Alardhi et al. 2020).

Several techniques are employed to eliminate impurities from aqueous wastes, each offering its own set of advantages. Among these techniques, biosorption stands out as an environmentally friendly and cost-effective method. It provides a simple and rapid process for impurity removal, which is further enhanced by its high capacity to take up contaminants due to the abundant binding sites available, even under varying pH and temperature conditions. Additionally, biosorption allows for the biosorbent to be reused, making it a sustainable choice (Pham et al. 2022). The biosorption method has proven to be highly effective in eliminating dye and heavy metal contaminants from wastewater. Living and non-living microorganisms, such as fungi, algae, bacteria, and yeasts, serve as unique biosorbents capable of removing contaminants from water (Radhakrishnan et al. 2022). During biosorption, the surface groups on non-living biomass adsorb heavy metal ions and dyes from aqueous solutions. Non-living biomass offers numerous advantages over living biomass, including higher removal efficiency, reduced resource consumption, independence from nutrients and additional growth media, and cost-effectiveness (Blaga et al. 2021).

The utilization of deceased bacterial biomass, featuring diverse functional groups such as amino, carbonyl, and carboxyl, has been widespread as a biosorbent for eliminating dyes and heavy metals from aqueous systems (Mohapatra et al. 2019). Nevertheless, the conventional methods of biomass separation, such as centrifugation or filtration, have posed challenges and proven ineffective in practical applications, impeding the utilization of inactivated microorganisms as biosorbents (Li et al. 2020). Immobilization technology emerges as a promising alternative for removing both dyes and heavy metals from aquatic environments. The advantages of using immobilized microorganisms over free cells in various processes, including bioprocessing, industrial biotransformation, and biodegradation, lie in enhanced recovery, regeneration, recycling, and greater stability of the biocatalyst (Sharma et al. 2022).

Magnetic nanoparticles (MNPs) offer an additional advantage as they can be effortlessly separated from the continuous phase through the application of an external magnetic field. The innovative technique of immobilizing microbial biomass cells in MNPs brings advantages in terms of chemical activity and biocompatibility (Azeez and Al-Zuhairi 2022). Immobilization with MNPs does not impede mass transfer around microorganisms, combining the benefits of cell immobilization with those of free cell fermentation. Recently, a novel magnetic nano-biosorbent (M-BNia) was developed by immobilizing Bacillus niacini (BNia) on the surface of MNPs. The outstanding biosorption characteristics of M-BNia for both heavy metals and dyes can be attributed to (1) high hydrophilicity due to a large number of hydroxyl groups in glucose units, (2) the presence of numerous functional groups (primary amino, acetamido) attracting both dyes and heavy metal ions in wastewater treatment, and (3) the high chemical reactivity and adaptable structure of the polymer chain (Giese et al. 2020).

While numerous studies have addressed the purification of dyes and heavy metals, to the best of our knowledge, no studies have focused on using metal oxide nanomaterials, such as MNPs, as immobilization carriers for BNia. Therefore, the objective of this study is to determine and introduce a novel biosorbent characterized by high removal performance, utilizing immobilization technology to immobilize BNia on the surface of MNPs. Additionally, the removal efficiencies of M-BNia nano-biosorbent, through biosorption of both Pb (II) and TB dye from aqueous solutions for the treatment of water, were evaluated. The study aims to optimize various controlling parameters (contact time, initial Pb (II) and TB concentration, initial pH, and M-BNia dosage), establish equilibrium biosorption capacity, and explain the isotherm and kinetic models (Rekhate and Srivastava 2020; Devatha and Shivani 2020).

Date and location of the research

This research lays the foundation for the study titled “Removal of Lead (II) and Toluidine Blue from Wastewater with New Magnetic Bacillus niacini Nano-Biosorbent.” The investigation was conducted between February 2021 and March 2022 in the Environmental Chemistry and Nanotechnology Laboratory at Dicle University. Notably, Bacillus niacini was cultivated at Bingol University's Microbiology Laboratory.

Materials and methods

Chemicals

Toluidine blue (TB) dye (molecular weight 305.8 g/mol), ferric chloride hexahydrate (FeCl3.6H2O), lead (II) nitrate (Pb(NO3)2), and ferrous chloride tetrahydrate (FeCl2.4H2O) were purchased from Sigma–Aldrich. HCl and NaOH from Sigma–Aldrich were used for pH adjustments of the solutions. All chemicals were utilized without further purification. All experiments and solutions in this study were prepared using ultrapure water obtained from a Sartorius arium pro UV purification system.

Characterization

The structural image and morphology of the M-BNia were examined using field emission scanning electron microscopy (SEM) (SEM, QUANTA 400F). Elemental mapping of the M-BNia was analyzed by energy-dispersive X-ray spectroscopy (EDX) (JEOL 2100 F microscope). The particle size and morphology of the M-BNia were investigated using transmission electron microscopy (TEM) (JEOL 2100F, Japan). Magnetic properties of M-BNia were analyzed using a vibration sample magnetometry (VSM). Additionally, magnetic susceptibility as a function of temperature was studied (Quantum Design PPMS-9 T). The zeta potential of the M-BNia was determined using a Zetasizer Nano ZS (Malvern Instruments Ltd., UK) at 25 °C. Particle agglomerate size distributions of the MNPs and M-BNia were assessed using a laser particle sizer (Mastersizer 2000, Malvern, England). The functional groups of M-BNia were evaluated by Fourier transform infrared spectrophotometry (FT-IR) (Perkin-Elmer Mattson 1000) over the range of 4000–400 1/cm. The Brunauer–Emmett–Teller (BET) analysis was performed to determine the surface area of the M-BNia nano-biosorbent. After precise weighing, the M-BNia nano-biosorbent was subjected to 24 h of degassing at 25 °C. The surface area was evaluated through the multipoint nitrogen adsorption method using Micromeritics-TriStar II Plus 3030 (USA).

Preparation of the Bacillus niacini PRPB1 biomass

In this study, Bacillus niacini PRPB1 were obtained from the soil by Dr. Enez, Bingol/Turkey (2019). For the bacterial isolation stage; 1 g of soil sample was taken, and 9 ml of sterile pure water was added to the sample. Then, the dilution technique was used. To obtain a single colony, the samples were planted on nurtient agar (NA) medium and incubated at 37 °C for 1 night. The resulting colony; biochemical tests such as mobility, hemolysis, amylase, and catalase were performed. To identify the bacteria, 16S rRNA analysis was performed by EpiGen to identify the bacteria. The isolated bacterium was determined to be Bacillus niacini PRPB1. The cultures of B. niacini PRPB1 were cultivated in nutrient broth (NB: peptone 5.0, meat extract 3.0) with continuous agitation at 40 °C for 24 h (shaker, 150 rpm). Microorganism cells were harvested by centrifugation at 12,000 rpm for 10 min. The resulting pellets were washed twice with 0.9% NaCl and subsequently dried in an oven at 70 °C for 1 day. The dried cells were then ground into a powder and subjected to autoclaving to ensure complete inactivation of the bacterial cells (Enez 2019).

Synthesis of M-BNia

For the synthesis of M-BNia, 1 g of 1% BNia was dissolved in 100 mL of ultrapure water, achieving a homogeneous distribution through ultrasonic bath mixing at room temperature for 60 min. Subsequently, 3 g of FeCl3.6H2O and 1.5 g of FeCl2.4H2O were dissolved in 5 mL of ultrapure water under a nitrogen atmosphere. The temperature of the iron salts solution was elevated to 85 °C, followed by the addition of 5 mL of 26% pure ammonia (NH3) solution and 50 mL of 1% BNia solution. The reaction took place at 85 °C in a nitrogen environment for 30 min and was then cooled to room temperature. The resulting black M-BNia was washed three times with 10-mL ultrapure water using an Nd–Fe–B permanent magnet. pH measurements were conducted after each washing cycle, and the process continued until the mixture in the aqueous phase reached a neutral pH (Tural et al. 2017). Following the processing, M-BNia was dried in a freeze-dryer.

Biosorption processes

Prior to commencing biosorption experiments, 1000 mg/L stock solutions of TB and Pb (II) were prepared. To achieve this, 1 g of TB and Pb (II) nitrate was precisely weighed and dissolved in distilled water within a 1-L flask, and the solution's volume was adjusted to 1 L. Subsequently, these solutions were diluted and utilized in the subsequent experiments. Batch biosorption experiments were conducted to evaluate the biosorption of TB and Pb (II) onto M-BNia. To optimize the experimental conditions, the batch studies encompassed varying pollutant concentrations (ranging from 50 to 200 mg/L), diverse contact times (ranging from 2.5 to 120 min), and pH values within the range of 3–6 for Pb (II) and 3–10 for TB. Different doses of the nano-biosorbent (1, 2, 3, 4, and 5 g/L) were also tested.

During the optimum contact time, 25 mL of pollutant solutions and the biosorbent were agitated at 260×g. The separation of the aqueous phase from M-BNia was achieved using an Nd–Fe–B permanent magnet. The concentration of remaining pollutants in the solution was quantified at a wavelength of 630 nm with a UV/Vis spectrometer (Agilent Cary 60 Spectrophotometer) and an AA6300 Atomic Absorption Spectrometer (AAS; Shimadzu, Japan). Each determination was repeated three times, and the results were reported as average values via Microsoft Excel, with error bars indicated where necessary. The corresponding biosorption capacity (qe) on the M-BNia was calculated using Eq. (1), and the percentage of TB and Pb (II) biosorption was calculated using Eq. (2):

$$ q_{{\text{e}}} ({\text{mg/g}}) = \frac{{(C_{0} - C_{{\text{e}}} ) \times V}}{m} $$
(1)
$$ {\text{Biosorption }}\left( \% \right) \, = \frac{{C_{0} - C_{{\text{e}}} }}{{C_{0} }} \times 100 $$
(2)

In Eqs. (1) and (2); qe (mg/g) represents the amount of biosorbed TB and Pb (II) at equilibrium on M-BNia; C0 (mg/L) is the initial concentration of TB and Pb (II) solution; Ce (mg/L) is the equilibrium concentration of TB and Pb (II) solution; V (L) is the initial volume of solutions; and m (g) is the dosage of M-BNia nano-biosorbent.

Desorption and reuse studies

The regenerative procedure for M-BNia in TB desorption involved immersing 50 mg of M-BNia in a 25-mL solution containing 100 mg/L TB at pH 7.0. The mixture was agitated at 260×g at 25 °C for 60 min. Following this, the dye-loaded M-BNia was separated from the solution using an Nd–Fe–B permanent magnet. Subsequently, it was combined with a 10-mL NH4OH/NH4Cl buffer at pH 10.0 for 60 min at 25 °C. The rejuvenated biosorbent underwent thorough washing with deionized water to eliminate any residual desorbing solution and was then introduced into a TB biosorption solution for the subsequent cycle. This entire process was iterated five times to evaluate the reusability.

For the assessment of M-BNia reusability in Pb (II) biosorption, the regeneration protocol was as follows: 50 mg of M-BNia was placed in a 25-mL solution with 100 mg/L Pb (II) at pH 5.6. The mixture was agitated at 260×g at 25 °C for 30 min. Subsequently, the Pb (II)-loaded M-BNia was magnetically separated from the solution using an Nd–Fe–B permanent magnet, followed by agitation with 10-mL 10-mM HCl at pH 1.0 for 30 min at 25 °C. The rejuvenated biosorbent was thoroughly washed with deionized water to remove any remaining desorbing solution and was then introduced into a Pb (II) biosorption solution for the subsequent cycle. This process was repeated five times to assess reusability.

Results and discussion

Characterization

The FT-IR spectra of MNPs and M-BNia are presented in Fig. 1a to illustrate the immobilization of BNia onto MNPs. Peaks at 1634 cm−1 and 3431 cm−1 represent the bending vibration of absorbed water and surface hydroxyl and OH stretching mode, respectively, in the MNPs spectrum. The peak at ~ 544 cm−1 in the MNPs spectrum is attributed to Fe−O vibration (Dawn et al. 2022). The peak at ~ 3390 cm−1 is related to the stretching vibrations of O–H groups of biosorbed water. In the M-BNia spectrum, the peak at 1724 cm−1 typically belongs to the carboxylic acid C=O stretch band. The C=O stretch peak at ~ 1626 cm−1 indicates possible binding to N–H groups, which appear at ~ 1522 cm−1 in the form of amide linkage (Mohammed et al. 2020). The peak at 1522 cm−1 may be associated with the asymmetric C=O stretching vibration of the carboxylate groups. The peak at 1386 cm−1 is attributed to PO43− external bending vibration. The broad band (∼1038 cm−1) of M-BNia is consistent with C−O stretching. The band at 2928 cm−1 is associated with C−H stretching in aliphatics of microbial biomass cell walls (fatty acids and carbohydrates). FT-IR analysis reveals that M-BNia undergoes changes in functional groups such as carboxyl, phosphate, and amino groups (Shan et al. 2023).

Fig. 1
figure 1

MNPs and M-BNia characterization: a FT-IR spectra; b particle size distribution; and c VSM images of MNPs and M-BNia

Figure 1b illustrates the distribution and size of MNPs and M-BNia nanoparticles and agglomerates. The MNPs and M-BNia exhibit average particle sizes (z-average) of 105.7 nm and 654.6 nm, respectively (Tural et al. 2017).

The magnetic properties of MNPs and M-BNia are 66 emu/g and 63 emu/g, respectively. The BNia coating on MNPs effectively shields the iron oxide nanoparticles from environmental conditions. As shown in the inset of Fig. 1c, solid and liquid phases are easily separated using an external magnetic field after biosorption. The saturation magnetization of M-BNia makes them highly responsive to magnetic fields (Tural et al. 2017).

The specific surface area (BET) of the M-BNia nano-biosorbent was assessed by conducting nitrogen adsorption–desorption isotherm measurements at 77 K, disclosing a surface area of 53.48 m2/g (Tural et al. 2021).

The TEM image of M-BNia in Fig. 2a reveals different contrasts: bright spots correspond to BNia, while dark ones indicate crystalline MNPs.

Fig. 2
figure 2

a TEM micrographs for M-BNia; b SEM images of M-BNia; and c EDX spectra of M-BNia

The SEM image of MNPs and M-BNia is presented in Fig. 2b. As observed in Fig. 2b, the size of the M-BNia nano-biosorbent is approximately 50 nm with noticeable aggregation.

EDX spectra in Fig. 2c show the principal components and corresponding atomic percentages of M-BNia, indicating 13.6% C, 33.70% O, 1.94% P, and 6.02% N, 0.17% S, and 44.57% Fe (Tural et al. 2018). The elements N, P, C, and S present in the structure of B. niacini are not found in the structure of MNPs. The presence of Fe in the EDX analysis confirms the successful coating of Bacillus niacini cells on MNPs.

Biosorption of Pb (II) and TB

Influence of pH

Understanding the influence of pH on the zeta potential of M-BNia is crucial for proposing a plausible biosorption mechanism for TB and Pb (II) on the M-BNia surface. The zeta potential of M-BNia was measured in the pH range of 2–7. The surface charge is vital as changes in solution pH affect the surface charge in removing the sorbate. As shown in Fig. 3a, alterations in solution pH lead to a decrease in the zeta potential value. Remarkably, around pH 2.7, the zeta potential of M-BNia reaches a zero value or an isoelectric point (IEPM-BNia = 2.7), indicating that the surface of M-BNia is negatively charged under conditions with pH > IEPM-BNia = 2.7 and positively charged at pH < 2.7 (Wen et al. 2018). In this study, the removal of Pb (II) from aqueous systems using M-BNia was tested between pH 2 and 6. The biosorption profile is illustrated in Fig. 3b. Across all studied pH ranges, pH had a significant influence, with the maximum biosorption capacity increasing with pH and peaking at 5.6. Investigations beyond pH 6 were not conducted since Pb (II) tends to precipitate to Pb(OH)2 at higher pH values. The reduced biosorption efficacy at low pH values is expected due to the competition between H+ and Pb2+ on biosorption sites. Initial interaction between Pb (II) ions and the surface of M-BNia is primarily driven by electrostatic forces. As pH increases, the bacterial surface typically carries more negative charge due to functional groups such as carboxyl (–COO), (–OH), and phosphate (–PO42−) groups. These negatively charged sites attract positively charged lead ions through electrostatic attraction. This electrostatic interaction helps bring lead ions in proximity to the bacterial surface (Ali et al. 2021; Ouyang et al. 2019). Once Pb (II) ions are close to the bacterial surface, chemical coordination or complexation reactions occur. This involves the formation of chemical bonds between lead ions and specific functional groups on the bacterial surface, such as carboxyl and phosphate groups. These coordination reactions result in the formation of coordination complexes, where lead ions are bound to the bacterial surface through covalent or ionic bonds (Qu et al. 2022).

Fig. 3
figure 3

a Zeta potential vs. pH for M-BNia in 10mM NaCl at 25 °C. M-BNia concentration was 1.0 g/L. b Effect of pH on Pb (II) ions biosorption. c Effect of pH on TB biosorption

TB biosorption onto M-BNia nano-biosorbent involves electrostatic interactions and hydrogen bonds. Figure 3c illustrates electrostatic interactions between the positively charged cationic group in TB organic dyes and the negatively charged carboxylic functional groups on the surface of M-BNia nano-biosorbent (Al-Ajji and Al-Ghouti 2021). Additionally, hydrogen bonds form between the hydroxyl groups on the biosorbent surface and the amine groups in the dye molecule. The pH effect on the biosorption capacity of M-BNia nano-biosorbent was investigated within the pH range of 3–10, using HCl and NaOH solutions to adjust the pH. Notably, there was an increase in biosorbed dyes when the pH shifted from 5 to 7. However, beyond pH 7, the biosorption of TB decreased. Zeta potential analysis in Fig. 3a reveals that the negative surface charge increases from pH 2.7 to 7.0, resulting in electrostatic attraction between the increasingly negative surface charge and the positive TB molecules. Furthermore, the surface of M-BNia nano-biosorbent contains oxygen groups, including carboxylic groups (–COOH) and hydroxylic groups (–OH) after acid treatment. At lower pH values, surface carboxylic groups become neutral due to protonation in electron-rich regions on the M-BNia nano-biosorbent surface. Consequently, the uptake of positively charged dye is limited. In contrast, at pH 7, carboxylic groups ionize, increasing negative charge density on the surface, facilitating further dye removal. Therefore, pH 7 was determined to be the optimal pH for TB biosorption on M-BNia (Chen et al. 2022). The scheme illustrating the possible adhesion of TB and Pb (II) to the M-BNia biosorbent is presented in Fig. 4.

Fig. 4
figure 4

Schematic representation of potential interactions involved in the TB and Pb (II) onto M-BNia biosorption process

Effect of contact time

Contact time is a crucial factor in all biosorption experiments, strongly influencing the efficacy of the M-BNia. Figure 5a displays the results of experiments conducted at various contact times, ranging from 2.5 to 120 min. All other variables remained constant, with a pH of 5.6, a M-BNia dosage of 5 g/L, a Pb (II) ion concentration of 100 mg/L, and a temperature of 298 K. It was observed that M-BNia achieved its maximum removal efficiency, reaching 98.6 ± 0.05%, within 30 min. Complete removal of Pb (II) from the aqueous solution is not feasible within 30 min, indicating that the optimal biosorption time for Pb (II) was determined as 30 min (Wang et al. 2018).

Fig. 5
figure 5

a Time effect on Pb (II) ions biosorption at various concentrations onto M-BNia and biosorption capacity of M-BNia. b Time effect on TB biosorption at various concentrations onto M-BNia and biosorption capacity of M-BNia

For the TB biosorption capacity, 50 mg of M-BNia nano-biosorbent was added to a 100 mg/L TB solution. The TB biosorption capacity increased rapidly with an increase in contact time, reaching biosorption equilibrium after 60 min (Fig. 5b). This rapid increase is attributed to the availability of interaction sites on the surface of M-BNia during the early stages of biosorption. The biosorption capacity of M-BNia nano-biosorbent at TB equilibrium was measured as 61.07 ± 0.212 mg/g. As the biosorption progresses, the free binding sites become fewer, resulting in a reduction in the biosorption rate, and the biosorption capacity ultimately saturates. Thus, 60 min was selected as the ideal contact time for TB removal removal (Neag et al. 2018).

Figure 5a and b demonstrates the effect of agitation time on the extent of biosorption of Pb (II) and TB on M-BNia for different initial concentrations. Biosorption onto M-BNia is fast in the first 20 min for Pb (II) and 50 min for TB, after which it becomes slower, approaching equilibrium. The continuous biosorption after 30 min for Pb (II) and 60 min for TB implies that equilibrium has been reached. This pattern is explained by the gradual occupation of available vacant sites on the M-BNia surfaces during the biosorption process.

Effect of initial Pb (II) and TB concentration

The Pb (II) retention capacity (qe) of the M-BNia nano-biosorbent was studied at different initial Pb (II) concentrations, as depicted in Fig. 6a. The results reveal a decrease in Pb2+ removal by the M-BNia nano-biosorbent as the Pb (II) concentration increases from 50 to 250 mg/L in the aqueous solution. The removal effectiveness decreased from 98.76 ± 0.42% to 50.24 ± 0.66%. This reduction in removal efficacy at higher Pb (II) concentrations may be attributed to the coating of most surface sites of the M-BNia nano-biosorbent with a high concentration of Pb (II), rendering fewer free binding sites available for biosorption. Additionally, at lower Pb (II) concentrations, the percentage of biosorption is high due to the abundance of active sites on the surface of the M-BNia nano-biosorbent. Figure 6a illustrates the biosorption capacity against different concentrations of Pb (II), indicating that the increase in biosorption capacity is associated with the higher initial concentration of Pb (II), leading to increased diffusion of Pb (II) to the surface of the M-BNia (Asadollahzadeh et al. 2021).

Fig. 6
figure 6

a Effect of initial Pb (II) ions concentration onto M-BNia and biosorption capacity of M-BNia. b Effect of initial TB concentration onto M-BNia and biosorption capacity of M-BNia. c Effect of M-BNia dosage on biosorption capacity and removal of Pb (II) ions. d Effect of M-BNia dosage on biosorption capacity and removal of TB

The effect of the initial TB concentration on the biosorption capacity of M-BNia nano-biosorbent is presented in Fig. 6b. As the TB concentration increases from 50 to 300 mg/L, there is a reduction in the percentage uptake from 96.90 ± 0.20% to 53.65 ± 1.49% for the M-BNia. This reduction is due to the utilization of active sites on the M-BNia nano-biosorbent surface by TB molecules, leaving fewer active sites available for higher concentrations.

However, a consistent increase in biosorption capacity from 24.22 ± 0.03 to 80.28 ± 0.62 mg/g for the M-BNia nano-biosorbent with increasing concentration indicates that the nano-biosorbent was not entirely saturated with TB molecules at a concentration of 100 mg/L. The higher TB concentration in the aqueous solution leads to more interaction with biosorbent active sites, resulting in a higher biosorption capacity. Therefore, a 100 mg/L dye concentration was used to ensure the optimum utilization of M-BNia active sites (Belhaine et al. 2022; Ge et al. 2019; Akpomie and Conradie 2021).

Effect of M-BNia dosage

The dosage of M-BNia nano-biosorbent plays a crucial role in the removal of Pb (II). In this study, with an initial Pb (II) concentration of 100 mg/L, the dosage of M-BNia ranged from 1 to 10 g/L. As illustrated in Fig. 6c, the biosorption rate of Pb (II) exhibited a gradual increase with the rise in the biosorbent dosage. When the dose of M-BNia nano-biosorbent increased from 1 to 10 g/L, the removal rate for biosorption increased from 56.88 ± 0.54% to 95.60 ± 0.20%. This trend can be attributed to the increase in biosorption sites on the M-BNia nano-biosorbent surface. Additionally, the concentration interaction between the biosorption sites and Pb (II) increased with the rising M-BNia nano-biosorbent dosage. Therefore, the optimal M-BNia nano-biosorbent dose was chosen as 5 g/L (Wen et al. 2018).

The biosorption of TB onto M-BNia was investigated at various biosorbent dosages (1−10 g/L). While keeping TB concentration (100 mg/L), stirring speed (200 rpm), pH (7.0), and contact time (60 min) constant, Fig. 6d demonstrates that the percentage TB removal increased from 94.55 ± 0.12% to 98.30 ± 0.08% with an increase in M-BNia dosage from 1 to 10 g/L. An insignificant increase was observed beyond 5 g/L. The elevated percent removal of TB with an increase in M-BNia dosage can be attributed to the enlarged biosorbent surface area, leading to more biosorption sites available for the process. The slight increase in %TB uptake at M-BNia dosage higher than 5 g/L may be attributed to the scarcity of remaining dye molecules in the medium. Based on these results, the M-BNia dosage of 5 g/L was selected for further experiments (Liu et al. 2022).

Modeling of biosorption isotherm

Biosorption is typically elucidated through isotherms, delineating the substance's amount biosorbed under constant temperature as a function of pressure (for gases) or concentration (for liquids) on the biosorbent. Among these isotherms, Freundlich, Langmuir, and Dubinin–Raushkevich (D–R) stand out (Tattibayeva et al. 2022). The Langmuir isotherm, predicated on monolayer biosorption (Patil et al. 2022), is expressed as follows Eq. (3):

$$ \frac{{C_{{\text{e}}} }}{{q_{{\text{e}}} }} = \frac{1}{{q_{\max } K_{{\text{L}}} }} + \frac{1}{{q_{\max } }}Ce $$
(3)

The symbols qe (mg/g), Ce (mg/L), and qmax (mg/g) represent the quantities of TB and Pb (II) adsorbed onto M-BNia, the free concentration of TB and Pb (II) at biosorption equilibrium, and the maximum biosorption capacity of M-BNia, respectively. KL (L/mg) stands for the biosorption equilibrium constant associated with biosorption enthalpy.

For assessing biosorption feasibility, the RL constant Eq. (4) is calculated. RL > 1 denotes suitability, RL = 1 is linear, 0 < RL < 1 is suitable, and RL = 0 is irreversible (Tural et al. 2021).

$$ R_{{\text{L}}} = \frac{1}{{1 + K_{{\text{L}}} C_{{\text{o}}} }} $$
(4)

The Freundlich isotherm, connecting solute concentration on the biosorbent surface to liquid concentration (Ahmadi et al. 2022), is expressed by Eq. (5):

$$ {\text{lnq}}_{{\text{e}}} {\text{ = lnK}}_{{\text{F}}} { + }\frac{{1}}{{\text{n}}}{\text{lnC}}_{{\text{e}}} $$
(5)

In this context, qe (mg/g), Ce (mg/L), KF, and n represent the quantities of TB and Pb (II) biosorbed onto M-BNia, the free concentration of TB and Pb (II) at sorption equilibrium, and the Freundlich constants associated with sorption capacity and intensity. The equilibrium constants are obtained through linear regression analysis.

The Dubinin–Raushkevich (D–R) biosorption isotherm is employed to determine the biosorption energy. The biosorption energy is derived from the slope of the isotherm graph, providing insights into the mechanism of biosorption. Described as the energy released during the biosorption of 1 mol of ions from the solution by the biosorbent, the D–R biosorption isotherm serves as an alternative to the Freundlich biosorption isotherm. Originally proposed by Polanyi, an empirical Eq. (6) compatible with the biosorption potential was later developed by Dubinin–Raushkevich (Shimizu and Matubayasi 2021; Tural et al. 2021).

$$ \ln q_{{\text{e}}} = \ln q_{{\text{m}}} - B\varepsilon^{2} $$
(6)

In this study, qe represents the amount of biosorbent per unit mass (mg/g), qm is the maximum biosorption capacity (mg/g), B denotes the D–R isotherm constant, ε signifies the Polanyi potential (kJ/mol), R represents the universal gas constant (8314 J), and T stands for temperature (K). The experiments were conducted using a 5 g/L dosage of biosorbent with varying concentrations of TB and Pb (II) (TB: 60 min at pH 7.0 and Pb (II): 30 min at pH 5.6 at room temperature). To establish biosorption isotherms, concentrations of TB and Pb (II) in the aqueous solution were measured.

In the Langmuir isotherm data presented in Table 1, the R2 correlation values for TB and Pb (II) were determined as 0.996 ± 0.001 and 0.975 ± 0.001, respectively. Correspondingly, the R2 correlation values for the Freundlich isotherm model yielded 0.970 ± 0.001 for TB and 0.921 ± 0.008 for Pb (II). Despite the slightly smaller R2 values in the Freundlich model compared to the Langmuir model, they remain significant, indicating the potential for multilayer biosorption for both TB and Pb (II) based on the Freundlich isotherm (Gautam et al. 2020). The n values, ranging between 1 and 10 for both TB and Pb (II), suggest a physical biosorption mechanism onto M-BNia, as values less than 1 indicate chemical biosorption (Tural et al. 2017). The qm values expressing the biosorption capacity from Langmuir constants were determined as 82.88 ± 0.79 mg/g for TB and 66.52 ± 0.68 mg/g for Pb (II). Calculated RL values from Eq. (4) for different TB and Pb (II) concentrations ranged from 0.143 to 0.027 for TB and 0.187 to 0.044 for Pb (II). These results collectively suggest that the sorption of TB and Pb (II) onto M-BNia is favorable (Tural et al. 2022).

Table 1 Isotherm parameters obtained for TB and Pb (II) ion removal using M-BNia

In Table 1, the average biosorption energy E (kJmol−1) in this study reveals valuable insights into the nature of the biosorption process. Specifically, for TB and Pb (II), the obtained E values are 0.845 ± 0.001 kJmol−1 and 2.10 ± 0.47 kJmol−1, respectively. These values fall below the typical range of 8–16 kJmol−1, indicating a physical sorption mechanism for the biosorption of both TB and Pb (II) onto M-BNia (Tural et al. 2017). Additionally, the R2 values for the Dubinin–Raushkevich (D–R) model were found to be small, suggesting that the biosorption process does not conform well to the D–R model under the conditions studied (Tural et al. 2017).

Modeling of biosorption kinetics

In this study, three different kinetic models (PFO, PSO, and IPD) were employed to determine the model that best aligns with the experimental data for the biosorption of TB and Pb (II). Coefficient calculations were then conducted. Biosorption kinetics were expressed as functions of time (t), where k1 represents the Lagergren biosorption rate constant (min−1), and qt signifies the amount of substance biosorbed on the unit biosorbent at time t (mg/g). Additionally, k2, the PSO biosorption rate constant, was calculated using the provided Eqs. (7) and (8) (Lagergren 1898; Ho and McKay 1999).

$$ {\text{PFO}}:\ln (q_{{\text{e}}} - q_{{\text{t}}} ) = \ln q_{{\text{e}}} - k_{1} t $$
(7)
$$ {\text{PSO}}:\frac{t}{{q_{{\text{t}}} }} = \frac{1}{{k_{2} q_{{\text{e}}}^{2} }} + \frac{1}{{q_{{\text{e}}} }}t $$
(8)

The IPD model, developed by Weber and Morris, is expressed by the following Eq. (9) (De Rossi et al. 2020; Weber Jr and Morris 1963).

$${\text{IPD}}:q_{{\text{t}}} = k_{{\text{p}}} t^{0.5} + C$$
(9)

qt: amount of substance biosorbed over time t (mg/g), kp: rate constant for the intraparticle diffusion model mg/(g min0.5), t0.5: half-time (min1/2), and C (mg/g): equilibrium rate constant for the IPD model was calculated according to the given Eq. (9).

It was observed that the experimental data showed a high agreement with PFO and PSO kinetic models (R2 > 0.924 ± 0.001 in all conditions examined for both models), but did not fit well with the IPD model (R2 > 0.802 ± 0.002). Model constants and statistical data (standard deviation and correlation coefficient values) obtained for kinetic models are presented in Table 2 (Tural et al. 2022).

Table 2 Kinetic parameters obtained for TB and Pb (II) removal using M-BNia

The high compliance of the obtained kinetic data with the two different models indicates that the biosorption of TB and Pb (II) onto M-BNia may involve more than one mechanism. The compatibility of the experimental data with PFO and PSO kinetic models shows that the biosorption capacity is proportional to the active sites on the surface of M-BNia nano-biosorbent. The experimental data do not fit the IPD model well, and the C coefficients obtained for this model are different from zero (the graph of qt versus tl/2 drawn for the model is not linear or does not pass through the origin). This indicates that diffusion into the M-BNia nano-biosorbent is not a controlling step for the rate of biosorption, and shows that biosorption kinetics are controlled by two or more mechanisms (Tural et al. 2021).

Comparison of the biosorption capacities of other biosorbents

This study compared the maximum biosorption values (qm, mg/g) for TB and Pb (II) biosorption with other sorbents, as presented in Table 3. For TB biosorption, the maximum biosorption capacity achieved was 82.88 mg/g. These values significantly surpass reported values in the literature, which were 37.40 mg/g for SiO2/Fe2O3 (Joshi et al. 2018), 94.00 mg/g for Ag-NiNPs (Yonan et al. 2022), 83.70 mg/g for CMC-MC (Brandão et al. 2023), and 34.73 mg/g for GPS (Bretanha et al. 2016). Regarding Pb (II) biosorption, M-BNia exhibited a maximum biosorption capacity of 66.52 mg/g, demonstrating its strong ability to remove heavy metals. In comparison with other adsorbents in the literature, this capacity fares well, considering values such as 210.50 mg/g for TA@MNPs (Das et al. 2022), 68.00 mg/g for QMNPS (Jiang et al. 2018), 46.18 mg/g for DMSA@Fe3O4 MNRs (Venkateswarlu et al. 2019), 90.90 mg/g for MKa@4%CB (Elanchezhiyan et al. 2021), and 19.86 mg/g for MagOPIC (Sayin et al. 2021). It is important to note that maximum biosorption capacities can vary and depend on factors such as surface modification extent, individual biosorbent characteristics, heat treatment temperatures, the decontamination analytical method used, and the initial concentration of the adsorbate. The higher biosorption capacity of M-BNia can be attributed to its increased surface area, abundant functional surface groups; this makes it a promising nano-biosorbent for the removal of both Pb (II) and TB.

Table 3 Comparison of the biosorption capacities of various adsorbents for Pb (II) and TB biosorption

Reusability

An additional advantage of M-BNia is that it can be reused after regeneration, which increases its economic benefits (Wang et al. 2021; Wen et al. 2020). As shown in Fig. 7, M-BNia was observed to be efficient (> 70%) for each of the biosorption studies even in five regeneration cycles. This has economic benefits due to the practical applicability of M-BNia nano-biosorbent in the treatment of heavy metals and toxic dyes contained in wastewater. Moreover, the high desorption efficiencies even in five regeneration cycles (> 75%) obtained for the study of TB and Pb (II) may suggest their recovery from M-BNia, which may be good for recycling purposes (Alsawy et al. 2022).

Fig. 7
figure 7

Reusability of M-BNia for Pb (II) ions and TB dye biosorption process

Conclusion

This study investigated the synthesis, characterization, and application of magnetic nano-biosorbent in the removal of pollutants, such as heavy metals and dyes, from wastewater. Dead BNia was attached to MNPs to magnetically separate the M-BNia from the supernatant. M-BNia was characterized by SEM, EDX, TEM, BET FT-IR, and VSM. The results of the SEM analysis revealed that the M-BNia completed the formation and exhibited a homogeneous distribution, and the EDX analysis revealed that the presence of N, P, C, and S, which are in the structure of the BNia, is not in the MNPs structure. The presence of various functional groups such as carboxyl, phosphate, and amino of M-BNia was evaluated by analysis of FT-IR spectra. Detection of the presence of these elements in the structure of M-BNia indicates successful coating of the BNia on the surface of MNPs. The potential state of M-BNia nano-biosorbet was investigated for the removal of hazardous TB and Pb (II) from aqueous media as a function of different parameters, such as pH of solutions, contact time, dose of M-BNia nano-biosorbent, and initial concentrations of TB and Pb (II). The Langmuir, Freundlich, and D–R isotherm and the PFO, PSO, and IPD kinetic models were tested. According to the biosorption equilibrium data, it was observed that the Langmuir adsorption model provided a better fit than the Freundlich adsorption model. The maximum biosorption capacity of M-BNia was found as 82.88 ± 0.79 and 66.52 ± 0.68 mg/g for TB and Pb (II), respectively. Moreover, the high agreement of experimentally obtained kinetic data with PFO and PSO models indicates that the biosorption of TB and Pb (II) onto M-BNia may involve more than one mechanism. The biosorption mechanisms primarily entail electrostatic interactions and hydrogen bonding between the contaminants, namely, TB and Pb (II), and the M-BNia. Additionally, M-BNia can be regenerated and used in up to five replicates, subject to a slight decrease in removal efficiency. Considering the global importance of clean water and the interest in removing pollutants that cause wastewater pollution, this synthesized M-BNia nano-biosorbent may be a promising material for the treatment of wastewater caused by heavy metals and dyes due to its easy and low-cost approach.