1 Introduction

The discharge and use of synthetic dyes in different industries like textile, printing, ink, food, paper, and plastics are an environmental health issue relating to mainly advanced and well-developed countries [1]. The overall dye consumption of the textile industry globally is in surplus of 107 kg annually, and probably 90% of this ends up on fabrics. On the other hand, around 1 million kg year−1 of dyes are discharged into the water bodies through the textile industries [2]. Mostly, synthetic dyes are organic and aromatic in nature, thus making them physically, biologically, chemically, optically, and thermally stable. On the basis of structure, they are classified as cationic and anionic forms [3]. For the present work, methylene blue (MB) has been chosen as a model dye. The MB is an extensively used dye in the clothing and viewing industries, coloring paper, dyeing cottons, medicinal purposes, tannin units, etc. The complex aromatic structure of MB provides it stability against attack by microorganisms, as well as physical and chemical stressors [4], and in addition the MB is a basic dye readily soluble in water [5]. Without proper treatment and removal of these synthetic dyes, they remain in the environment and cause a serious problem to survival of both the aquatic ecosystem by reducing photosynthesis and terrestrial ecosystem. Most of these dyes are responsible for allergic reactions, intestinal cancer, and dermatitis and skin irritation because of the existence of aromatic groups that make them nonbiodegradable, carcinogenic, toxic, and mutagenic. On the other hand this is also a serious threat to the economy of the country which can itself impart different problems [6, 7].

Thus, there is need to develop latest technologies based on easily available materials, for the dye removal from textile wastewaters and production of eco-label products in the global markets [8]. Since then, researchers are struggling for the removal of dyes from contaminated water by using various techniques such as photodegradation, electrocoagulation, biochemical degradation, electrochemical degradation, oxidative degradation, and adsorption. But adsorption is widely considered one of the most distinguished and economically possible techniques for the removal of dyes in wastewater, as this technique can be easily operated, has high efficiency, is cheap, and is reproducible [9].

On the other hand, the selection of suitable adsorbents is also a big challenge and is based on the basis of performance, high efficiencies, and environment concerns [10]. Most commonly, adsorbents are based on activated carbons for their high effectiveness and structural characteristics for dye removal. Unfortunately, activated carbon owing to its difficulty in separation from adsorption assembly and further disposal results in secondary pollution [11]. These constraints on industrial scale consumption of activated carbon have inspired researchers to develop alternative and locally available removal methods [12] with cost-effective and environmental-friendly biosorbents based on biosorption, i.e., accumulation or intake of chemicals by biomass. Accordingly, various studies have been carried out with the adsorption of dyes in a broad range of cost-effective biosorbents; e.g., sugarcane bagasse, raw and acid-treated pine powder, wood sawdust, hazelnut shell, sugar beet pulp, coconut coir, watermelon rind, mango peel, rice husk, cashew nut shell, and pomegranate [11] were investigated to estimate their potential for wastewater treatment.

Similarly, the adsorbent material built at nanoscale showed high surface area due to additional adsorption sites and wide and large dimension pores in addition to simple phase separation that candidate them as new strategy that increases their application in wastewater treatment [12]. Recently, Fe3O4 magnetite nanoparticles (Fe3O4-MNPs) have been rigorously examined because of their superparamagnetic properties like high thermal stability and high coercivity and low Curie temperature [13, 14]. In addition to these properties, Fe3O4-MNPs are also nontoxic and help in separation processes.

The present study focused on the suitability of pine needles (PN) also called leaves and banana peel (BP) magnetic composites for MB dye adsorption. These are low-cost, renewable, and environmental-friendly adsorbents whose supply is sustainable. PN belong to the conifer family having genus Pinus of the Pinaceae family and native to the Northern and Southern Hemisphere. They are evergreen, long lived, and monoecious. Some of the usages of PN are reported such as extracting essential oil, packing box, fiberboard, producing lingo-sulfonate, and making pine wool [15] and medicine [16]. The fallen pine needles are used for the removal of organic contaminants not only to overcome the disposal problem but also provide low-cost and efficient adsorbent [17].

Banana is the most consumed fruit in the world and used as a staple food in many countries with a yearly production of over million tons. Due to large consumption of this fruit, it produces many tons of garbage in household and markets that cause environmental debris and discharge problem. BP has been reported as an efficient biosorbent with low cost for several contaminant dyes and heavy metal removal, including synthetic, cationic, and anionic dyes [18]. Therefore, there are chemical constituents present in BP; one of the major compounds is phenolic compound, and carotenoids, celluloses, and flavonoid are also present. The functional groups hydroxyl, carboxylic, and amine are main constituents that are responsible for MB dye removal [19].

In this aspect, it takes novel and different approach for further exploration of Fe3O4 magnetite nanoparticles modified with PN and BP for removal of MB from aqueous and wastewater media. As there is need to develop more effective, low-cost, and eco-friendly adsorbents based on easy methods based on cheap routes. For this purpose, coprecipitation method was followed because it is practicably the easiest approach based on green synthesis of MNPs to produce magnetic nanoparticles chemically. Moreover, the modification of PN and BP with magnetic nanoparticles will also support the separation of adsorbents and improve dye removal. Besides, waste management would be an additional benefit by utilizing agricultural waste of PN and BP to clean the environment.

The aims of the current study are the following: to synthesize a composite of PN and BP with iron oxide magnetic nanoparticles (Fe3O4); to characterize the composites by SEM, XRD, FT-IR, and TGA; to perform the optimization studies as initial dye concentrations, biosorbent dose, contact time, pH, and temperature; to investigate the kinetics, equilibrium, and thermodynamic parameters; and finally to check the real-time analysis as an application.

2 Materials and methodology

2.1 Chemicals and reagents

All the chemicals and research supporting materials used for the present study were of analytical grade. MB, iron sulfate (FeSO4.7H2O), sodium hydroxide (NaOH), iron chloride (FeCl3.6H2O), and salts for buffers were purchased from Sigma-Aldrich. All the experiments were repeated in triplicates.

2.2 Synthesis of magnetically modified biosorbents

As Abbottabad is known as city of chinar and pines, the fallen PN were collected from COMSATS University Islamabad, Abbottabad Campus, and nearby areas, and the BP were collected from household garbage and shops. The collected samples were washed using tap water followed by washing with distilled water to remove all surface dust and other attached impurities and then cut down into small pieces. Furthermore, the clean biosorbents were sun-dried at ambient temperature and later on grounded and sieved (300–400-µm mesh size) to form powders. These fine powders were preserved in airtight jars until further use in composite formation [19]. The chemical in situ coprecipitation method was used to synthesize magnetic nano-composites of biosorbents. Briefly, 3.1 g of FeCl3·6H2O and 2.1 g of FeSO4.7H2O iron oxide salts were added in 40 mL distilled water each. These two solutions were dissolved with constant stirring followed by heating up to 80 °C on magnetic stirrer and hot plate (Abron Exports), and 10 mL of NH4OH was added to raise the pH of the solution. The blackish/brownish precipitates were formed, and then 10 g of biosorbents (PN and BP) were added separately and stirred further for 30 min until the settling down of precipitates in the bottom. The solution was then cooled at room temperature and filtered. Further, the magnetically modified precipitates were followed by washing and drying in an oven at 102 °C until complete dryness. These precipitates were again passed through the final grinding and sieving process in nanosized sieve. The formation of magnetic composites was then confirmed by applying external magnetic field.

2.3 Characterization

XRD was done by X-ray diffractometer (JDX-3532 and JEOL). Scanning electron microscopy was used for surface morphology of the of biosorbents (SEM, JSM 5910, JEOL, Japan). The different functional groups of the samples were confirmed by Fourier transform infrared spectroscopy (FT-IR, PerkinElmer), while the thermal stability of biosorbents was carried out through a thermogravimetric analyzer (STA-6000, PerkinElmer).

2.4 Point of zero charge (PZC)

The PZC of magnetically modified biosorbents was found by adding 20 mL of 0.1 mol/dm3 sodium chloride in different flasks. The pH was adjusted from 2 to 10 by adding 0.05-M HCl and 0.05-M and 0.05-M NaOH. After adjusting pH, 0.1 g of biosorbents was added in each conical flask, and after 60 min of stirring on orbital shaker, the final pH was noted, and change in pH (ΔpH) was calculated as.

Point of zero charge = initial pH- ΔpH.

2.5 Adsorption studies

A 1000-ppm stock solution of MB was prepared in deionized water, and the working standards were prepared in the concentration range from 2 to 10 mg/L by following dilution method. The calibration curve for MB was found at wavelength of λmax 664 nm with UV–visible spectrophotometer (T80 UV–Vis Spectrometer, PG Instruments Ltd.) having R2 value 0.977. The adsorption capacities of modified biosorbents were studied by using MB. Batch adsorption experiments were performed in orbital shaker by taking 0.1 g of biosorbents added into 25 mL of dye solution and placed in shaker for 60 min that was preset at 250 rpm in order to reach the adsorption equilibrium. The adsorbent was removed by magnetism or filtration, and the final dye concentration (Cf) was measured by a UV/visible spectrophotometer at initial wavelengths of 664 nm. Equations (1) and (2) were used for the adsorption capacity (qe) and percentage removal (% removal), respectively:

$$qe=(Ci-Ce)V/W$$
(1)
$$\%removal=(Ci-Ce/Ci)\times 100$$
(2)

where Ci is the initial concentration (mg/L) of the dye, Ce is the final dye concentration (mg/L) at time t (min), V is the final volume (L) of the solution, and W (g) is the weight of the adsorbent added.

The effect of contact time for MB was investigated at different shaking times (10, 20. 30, 40. 50, 60, 80 min). The effect of biosorbent dose was determined by the addition 40-ppm MB solution in 30 mL of different conical flasks followed by the addition of modified biosorbents in the range of 0.05–0.3 g for 60 min. The trials were performed by means of a range of dye concentrations 5–45 mg/L. The effect of temperature was examined from 10 to 60 °C adjusted by water bath for 30 min.

2.6 Kinetic study

From the conditions optimized in aforementioned experiments, the kinetic and thermodynamic equilibrium analysis was established. The kinetic study was carried out by the addition of 0.1 g (w/v) of each adsorbent in different flasks containing 30 mL of MB dye solution having concentration of 40 mg/L followed by agitation on orbital shaker at 250-rpm intervals, and the contact times were 10, 20. 30, 40. 50, 60, and 80 min at room temperature. Pseudo–first-order [20], pseudo–second-order [21], and intra-particle diffusion models [22] were used, according to Eqs. (3), (4), and (5), respectively.

$$\mathit{log}\left({q}_{\mathrm{e}}\right.-{q}_{\mathrm{t}})=\mathit{log}{q}_{\mathrm{e}}-({K}_{\frac{1}{2.303}})t$$
(3)
$${t}_{\mathrm{q}/\mathrm{t}}=\frac{1}{{K}_{2}{q}^{2}e}+\left(1|{q}_{\mathrm{e}}\right)t$$
(4)
$${q}_{\mathrm{t}}={K}_{\mathrm{pt}{1/}_{2}}+C$$
(5)

where qe and qt (mg/g) are the amounts of MB adsorbed at equilibrium at any time, respectively; k1 (min−1), k2 (g/mg/min), and kp (mg/(g min0.5)) are the rate constants for sorption of pseudo–first-order, pseudo–second-order, and intra-particle diffusion models (diffusion rate constant) of reactions; and C is the intercept of linearity plot.

2.7 Isotherm study

To evaluate the best fit sorption model of isotherm, the data of equilibrium were investigated by different isotherms (Langmuir, Freundlich, and Temkin models) [23], and they are given in below equations:

$$\frac{1}{{q}_{e}}=\left(1|qm{k}_{L}\right)\frac{1}{{C}_{e}}+\frac{1}{{q}_{m}}$$
(6)
$$\mathit{log}\;q_e=log\;K_f+(1/n)logC_e$$
(7)
$${\mathrm q}_{\mathrm e}=\mathrm B\;\ln\;K_{\mathrm t}+\mathrm B\;\ln\;C_{\mathrm e}$$
(8)

where qm is the maximum adsorption capacity per unit mass of adsorbent in mg/g, qe (mg/g) is the adsorption capacity at equilibrium, Ce is the equilibrium dye concentration in mg/L, KL is the Langmuir adsorption constant, KF is the Freundlich constant, and n is the Freundlich intensity, and their values are calculated by slopes and intercepts of the graphs. KT is the Temkin isotherm equilibrium binding constant (L/g), B is the constant related to energy of adsorption of dyes (J/mol) (B = RT/bT), bT is the Temkin isotherm constant, R is the universal gas constant (8.314 J/mol/K), while T is the temperature at 298 K. The values of n and KF are calculated by slopes and intercepts of the graphs.

2.8 Thermodynamic study

The thermodynamic parameters including the Gibbs free energy (∆G°), enthalpy of the system (∆H°), and entropy (∆S°) change were examined from the adsorption isotherms and calculated by using Eqs. (9, 10, and 11):

$$ln{K}_{d}={q}_{e}/C$$
(9)
$$\mathit{ln}{K}_{\mathrm{d}}=\frac{\Delta {S}^{0}}{R}-\frac{\Delta {H}^{o}}{RT}$$
(10)
$$\Delta {G}^{o}=\Delta {H}^{o}-T\Delta {S}^{o}$$
(11)

where R is the universal gas constant, T is the temperature (K), and Kd is the distribution constant. The values of ∆H° and ∆S° could be calculated by the respective intercepts and slope of graph.

3 Results and discussions

The SEM results of PN and PB before and after modification are shown in Figs. 1 and 2 at 2-µm resolutions. For pine needles (Fig. 1a), the waxy surface was observed and the essential role of wax on the outer surface of needles was detected due to the regulating water management of the needle. The wax structure, nonetheless, was important too. Under moderate conditions, transformation of the wax layer is a natural phenomenon. The physical processes liable for structural modification seem to be essential in inhibiting the water loss from needles. The dried pine needles have sugars, fats, fiber, and protein [24]. Besides, the pine needles are slim and the length of leafs of conifer is 2.3 cm with 75% of leaves shorter than 6 cm. The radius of the conduits (ducts) that transport the water and sugar in the phloem cells is below 3μ [25]. Therefore, the vessels in the pine needle carbon may help to construct pores, and the surfaces are irregular and porous [26]. While in banana peel as can be seen from Fig. 1b before modification displayed that the peels have an irregular and porous surface with heterogeneous rough morphology having crater-like pores of banana peel. The surfaces (PN and BP) having irregular or rough shape and the surface revealing microrough surface are supposed to promote the adherence of noxious contaminants as the porous structure is in favor of adsorption by providing enough space for immobilization or trapping pollutants [27, 28]. In case of after modification (Fig. 2a and b) with magnetite, both the adsorbents, the pine needles, and banana peel show rough morphology and enhance surface area, with dent-type shape. The deposition of magnetite was confirmed clearly by after modification reflecting loading of compound on the smooth surface of biosorbents [29]. The adsorbents had porous framework structures, whereas magnetite comprised tightly bound nanoparticles.

Fig. 1
figure 1

a SEM of PN and b BP before modification with iron oxide

Fig. 2
figure 2

a SEM of PN and b BP after modification with iron oxide

BP and PN both have amorphous structures before modifications, and they did not show any characterization peaks relevant to their structure. Both biosorbents were incorporated with the magnetite to enhance their surface property and was analyzed through powdered X-ray diffraction technique for the confirmation of iron oxide nanoparticles. The XRD pattern of biosorbents with iron oxide was given in Fig. 3a and b. The characteristic peaks at 2Ɵ = 27, 30, 35, 43, 58, and 62.7 ̊ corresponded with (111), (220), (330), (400), (511), and (422), respectively, which is strong in accordance with Fe2O3 particles (Reference code 00–039-1346). The peaks of Fe indicate that the iron oxide is effectively impregnated on the MBP surface. The peaks of Fe2O3 that are well matched with the reference peaks set as a reference according to standard values. The characteristic peaks in case of MPN appeared at 2θ = 27, 30, 35, 43, 58, and 62.7 ̊ corresponded with miller indices at (111), (220), (330), (400), (511), and (422), respectively, which is strong in accordance with Fe2O3 particles (Reference code 00–039-1346). Comparing the XRD peak of particular biosorbents with reference pattern of Fe2O3, the formation of magnetic composite of both samples BP and PN was confirmed based on the standard pattern of Fe2O3 [30]. The particle size calculated for MCPN was 32.15 nm, and for MCBP, it was 25.26 nm.

Fig. 3
figure 3

a XRD analysis of MCPN and b MCBP

Fourier transform infrared (FT-IR) of both the adsorbents before and after MB adsorption was determined in the range of 400 to 4000 cm−1 to confirm surface functional groups. The spectra were achieved with several peaks of functional groups as illustrated in Fig. 4a, b, c, and d. In case of MCPN before and after adsorption spectrum as shown in Fig. 4a and b, the peaks at 3399.8 and 3370.4 are accredited to the O–H stretching vibration of hydroxyl-groups and (N–H) stretching vibration of amine groups. The absorption bands at about 2919 and 2921 cm−1 can be accredited to the stretching vibrations of C–H bonds in alkanes. The peaks at 2849.2 and 1650 cm−1 correspond to organic sulfates, and 1623 and 1375 cm−1 belong to C = C stretching (conjugated alkene). While the bands at 1514.6 correspond to N–O stretching (nitro compound), 1058 and 1050 cm−1 reflect C–N stretching, peaks at 1375 cm−1 belong to O–H bending (phenol), 632 and 587 cm−1 correspond to Fe–O bond, respectively.

Fig. 4
figure 4

a FT-IR of MCPN before and b after MB removal; c FT-IR of MCBP before and d after MB removal

However, in MCBP before and after adsorption, the bands at 3370.4 and 3371 cm−1 were assigned to free hydroxyl group stretching and at 1627.8 and 2921 cm−1 correspond to CH bending. While the peaks at 1407.4 and 1650 cm−1 belong to S = O stretching and peaks at 1076.4 and 1050 cm−1 are related to C–O stretching (primary alcohol). On the other hand, the peaks at positions 612 and 587 cm−1 correspond to Fe–O bond, respectively. The carboxylic acid and free OH played a substantial role in the removal of MB. The significant reduction in the intensity of OH and C–H peaks especially at 3371.16 and 2921.6 cm−1 was recorded that was the confirmation of functional groups of BP responsible for the removal of cationic MB [31]. Iron oxide makes the surface more enhanced and increase adsorption property of dye in combination with biosorbents, so the sorption of MB showed additional peaks. For after adsorption and modification spectra, the peaks at 587.12 cm−1 were the confirmation of biosorbent magnetization. In after adsorption spectrum of both the biosorbents, there was a decrease in peak intensity, and it might be because MB act as cation in aqueous solutions and show interaction with the –OH group present on the surface of biosorbents [32].

The TGA of MCPN as shown in Fig. 5a reflected the mass loss started at 100 °C. This mass loss between 100 and 300 °C could be due to the first endotherm. But from 400 to 700 °C, no significant mass loss was observed. The small endotherm might be due to the melting or softening of the lignin and waxy particles of the PN. The mass loss from 300 to 700 °C was mainly due to desorption of the extractive less volatile components. At 300 °C, the exothermic reaction occurs, and minor mass loss is observed at about 400 °C, due to char recombination and evolution of many products due to pyrolysis of pine needles. The mass loss at 700 °C was 64.3% and the remaining compound was 35%. This residue was the indication of those organic compounds that can be retained at 700 °C and not completely decompose at particular temperature.

Fig. 5
figure 5

a TGA of MCPN and b MCBP

Similarly, in case of MCBP as shown in Fig. 5b, significant weight loss was observed at 100–300 °C that was due to the waxy constituents, cellulose, and lignin of the BP. The mass loss around 300 °C was correlated to the exothermal condition and at about 600 °C was due to desorption of some constituents. The temperature ranges between 400 and 600 °C showing minimum weight loss. The remaining compound was 43.5% at 700 °C as a residue that prevents weight loss and is not completely decomposed [32].

3.1 Optimization study

Various factors affect the adsorption of MB dye on modified biosorbent such as MB concentration, dose of adsorbent, and pH. The effects of these factors were observed by performing different practices according to the parameters.

3.2 Effect of solution pH

The pH study of aqueous medium is a very imperative factor in adsorption affecting the connection among dye and the biosorbent as protonation of binding sites on the biosorbent surface is responsible for dye speciation which may modify the surface charge of biosorbent and chemistry of the solution’s dye [33]. According to Fig. 6a, with the increase in pH from 2 to 11 for MCPN and 2 to 12 for MCBP, the rate of adsorption also increased, showing direct relationship between pH and adsorption value of MB dye on both adsorbents. It was found that at pH 2, the plot of qe values for MCPN and MCBP and thereafter, the gradual increasing trend was followed. However, with a rise in pH from 2 to 11 and 2 to 12, the adsorption capacities turn out to be increased and reached at maximum at pH 10. There is a rise in electrostatic interaction among MCPN, MCBP, and MB owing to deprotonating of active sites existing on the surface of MCPN at basic pH, which can be displayed below [34].

Fig. 6
figure 6

Effect of pH (a), biosorbent dose (b), time (c), concentration (d), and temperature (e) for MB adsorption onto MCPN and MCBP

$$\begin{array}{c}-\mathrm{COOH}+{\mathrm{H}}^{+}\to -{\mathrm{COO}}^{-}+{\mathrm{H}}_{2}\mathrm{O}\\ -\mathrm{OH}+{\mathrm{OH}}^{-}\to -{\mathrm{O}}^{-}+{\mathrm{H}}_{2}\mathrm{o}\end{array}$$
(12)

Hence, pH 10 was chosen as an optimal for subsequent study as the percentage removal of MB at alkaline pH was significantly high, though the result revealed that the MCPN can adsorb MB above wide pH range.

The point of zero charge, as displayed in Fig. 7, plays a significant role in explaining the interaction of adsorbent surface and adsorbate. The effect of pH is described by PZC value of MCPN and MCBP, as the MB is positively charged, and the maximum adsorption took place above the PZC. This phenomenon helps in the separation of both cationic and anionic species that can be easily separated, adsorbed, attracted, and regenerated [35]. The PZC of both the adsorbents were obtained at pH 4 as the MB is a cationic dye that shows maximum adsorption where the sorbent surface has negative charge, i.e., above PZC.

Fig. 7
figure 7

PZC plot of MCPN and MCBP

3.3 Effects of biosorbent doses

The results of biosorbent doses on MCPN and MCBP are shown in Fig. 6b; it was found that the adsorption capacity (qe) increased with increasing biosorbent dose in the range of 0.05–0.35 g owing to the presence of more number of adsorption sites signifying longer-term diffusion and biosorption into the matrix’s sorbent [36]. The adsorption capacity increased gradually until 0.15 adsorbent dosage but slightly further increased in amount from 0.15 to 0.30; almost constant trend was observed. Thus, to get the better adsorption capacity, 0.15 g was selected as an optimal mass of the adsorbent in subsequent experiments.

3.4 Effect of dye concentration

Adsorbate concentration is a significant factor for the improvement of economical adsorption process. Different concentrations of MB were selected by getting initial dye concentrations (ranging from 5 to 45 ppm) to determine the performance of MCPN and MCBP adsorbents as illustrated in Fig. 6d. The adsorption capacity was increasing with increase in dye concentration up to 30-ppm solution as initial faster rate of dye uptake depends on the availability of binding sites and active functionalities on the adsorbent surface and great driving force and quick transfer of MB dye cation to the MCPN surface of. On the other hand, by the passage of time, the adsorption of MB turned to be slow, and equilibrium was attained because the vacant sites became saturated up to certain dye concentration; thus, adding more dye concentration cannot increase the rate of adsorption as all sites were occupied which resist the free dye molecules existing in the solution owing to their charge repulsion [34, 37].

3.5 Effect of contact time

The time effect on sorption can be evaluated for the possible speed of reaction, binding, and removal of dye molecules by the biosorbents. The sorption time of MB on MCPN and MCBP is demonstrated in Fig. 6c, respectively, and it was found that adsorption capacity of MCPN was increased until 60 min of stirring as initially all sites were vacant and the solute concentration was high [27]. So increase in the rate of adsorption capacity was observed. After some period, stability or decrease in the dye uptake was observed owing to the saturation of active sites on the biosorbents. Finally, in adsorption equilibrium, the adsorption and desorption rates were equal, and no more apparent increase in percentage removal was observed. The MB adsorption on MCBP shows an initial rapid adsorption in the first 60 min trailed by a slow adsorption that progressively reaches to equilibrium. The adsorption can grasp equilibrium within 60 min. The percentage removal with time indicates the transfer of dye molecules from liquid phase. The adsorbent surface at which there is decrease in adsorption capacity was that point where absorbance value decreased. It was due to non-availability of biosorbents to adsorb dye molecule and might be the desorption phenomenon of dye occurred.

3.6 Effect of temperature

Temperature plays an important role in the optimization of the adsorption as it affects the adsorption rate by changing the solubility and interactions of molecules with the adsorbate. Its effect was studied with initial dye concentration of 30 ppm in the range of temperature from 10 to 80 °C as given in Fig. 6e. An increase in qe was observed due to increase in temperature that enhances the diffusion rate of dye from solution to adsorbent surface and reduces the transfer resistance between dye solution and boundary layer of the MCPN and MCBP. In other words, it can be said that the increase in adsorption capacity could be due to intra-molecular diffusion and difference in pore size of the adsorbents. However, high adsorption capacity of MB at wide temperature ranges endorses the potential of MCPN waste as a substitute adsorbent for removal of MB dye from industrial effluents which is in good agreement with already reported literature [38].

3.7 Equilibrium study

Biosorption isotherms describe the relationship between the equilibrium concentration of the analyte (Ce) and the adsorbent uptake (Qe) and also offer insights into the nature of the biosorption process [39]. The biosorption isotherms of MB dye are presented in Fig. 8, and the values of isotherm constants along with R2 are itemized in Table 1. It is noticeable that the Temkin model was best fitted in the experimental data displaying maximum R2 (0.959 for MCBP) as compared to the Freundlich (0.914 for MCBP) and Langmuir (0.8441 for MCBP) models. On the other hand, the MCPN was found best fitted with the Freundlich model exhibiting highest R2 0.998.

Fig. 8
figure 8

a and d Langmuir isotherm, b and e Temkin isotherm, and c and f Freundlich isotherm for MB adsorption onto MCPN and MCBP

Table 1 Adsorption isotherm parameter results of MB adsorption on MCPN and MCBP

3.8 Kinetic study

The kinetic of biosorption is one of the significant parameters for describing the rate and mechanism of the biosorption and can be used to help design appropriate biosorption technologies [40, 41]. The kinetics of MB dye on MCPN and MCBP as shown in the plot demonstrated that the rate of adsorption increases with rise in time up to 1 h and further increases in time resulting to approach equilibrium which indicates that the MCPN and MCBP are the effective biosorbents requiring little contact time. The speedy increase in biosorption rate at the initial time period was due to accessibility of a big number of sites for sorption, but then it slowly reduced with decrease of available sites. The data were examined by three models, i.e., pseudo-first and second orders, intra-particle diffusion, and Weber-Morris, and the corresponding graphs for these orders are illustrated in Fig. 9, while the kinetic parameters of MCPN and MCBP are presented in Table 2.

Fig. 9
figure 9

a Pseudo–first-order, b pseudo–second-order, and c Weber-Morris model for MB adsorption onto MCPN

Table 2 Kinetic parameters for MB adsorption onto both biosorbents

For pseudo–first-order and intra-particle diffusion models of MB dye biosorption, the R2 were relatively low (0.919, 0.988 for MCPN and 0.912, 0.988 for MCBP), suggesting poor fit of these model to the kinetic data. However, in case of pseudo–second-order model, the R2 were significantly greater (0.999 for MCPN and 0.999 for MCBP). Moreover, the experimental values of qe were closer to values of q as compared by pseudo–first-order model. Pseudo–second-order model was best fit showing chemisorption for the uptake of MB by MCPN. This is due to possibility of involvement of sharing electron/exchange among cations of dye and the functional groups present on the biosorbents. The occurrence of second-order sorption kinetics is in good agreement with other sorption studies concerning chemisorption leads to these processes [34, 41, 42].

3.9 Comparison study of MCPN and MCBP with other adsorbents for MB dye removal

Upon comparison of MCPN with MCBP, the adsorption capacity of MCPN was found higher than its counterpart MCBP, while the comparison of adsorption capacities of MCPN and MCBP with already reported biomass-based adsorbents has been revealed in Table 3. It was observed that the MCPN and MCBP adsorption capacities are good enough as compared to other biomasses for MB removal. Conversely, the use of activated carbon is expensive and regeneration remains a problem from water that causes more contamination. The proposed biomasses can be utilized for the removal and detoxification of dyes from industrial wastes loaded with synthetic, carcinogenic, and toxic dyes in highly efficient and eco-friendly way.

Table 3 Adsorption capacities of various adsorbents reported for removal of MB

4 Thermodynamic analysis

Figure 10a and b and Tables 4 and 5 demonstrate the parameters of thermodynamics evaluated for the biosorption study. At various temperatures, the values ∆G° were negative signifying that the processes were spontaneous and ∆G° came to be more negative by elevating temperature values illustrating that the temperature has positive effect on feasibility of MB dye biosorption. The values of ∆H were observed to be positive (1845.7 J/mol for MCPN and 11,598 for MCBP), indicating the endothermic nature of the processes. The positive values of ∆S (7.91 J/mol for MCPN and 7.458) advocated the increased randomness on the solid liquid interface for the period of the sorption of MB dye on biosorbents.

Fig. 10
figure 10

a Plot of lnkd versus 1/T for MB adsorption onto MCPN and b plot of lnkd versus 1/T for MB adsorption onto MCBP

Table 4 Thermodynamic parameters of MCPN and MCBP
Table 5 Real-time analysis of MCBP and MCPN

as found by using UV/Vis spectrophotometer that is at λmax 664 nm. Then filtrate was treated with MCPN and MCBP separately through applying previously optimum conditions, and the final concentration of MB was again observed at λmax 664 nm. From Table 5, it was observed that maximum adsorption capacity is shown by MCPN.

5 Conclusions

In the current study, the magnetized composites of PN and BP were synthesized and the successfully utilized as biosorbents for MB dye removal from the aqueous and textile wastewaters. In characterization study, the SEM and XRD studies reflected rough and irregular surfaces of biosorbents loaded with magnetite on the surface, while FT-IR confirmed the presence of the functional groups responsible for binding to adsorbate and TGA showed the complete degradation and % weight loss with respect to temperature. It was observed that the rate of adsorption was influenced by the different parameters like pH, adsorbent dose, contact time, temperature, and dye concentration. The isotherm models exposed that the Freundlich isotherm was the best suited for MCPN and the Temkin model for MCBP. The kinetic data was well fitted to pseudo–second-order kinetic model. In thermodynamic parameters, it was observed that the reaction was endothermic in both cases. The maximum adsorption capacity of MB was obtained through PN composite. This research reveals the active usage of sustainable and biodegradable resources from agricultural waste into a valuable biosorbent for application of dye removal from wastewaters.