Introduction

The rapid progress of industry has promoted high-quality economic development, however, it has posed severe threats to the survival of humanity, such as environmental pollution, especially water pollution. Notably, industrial wastewater is the main source of water pollution, of which about 20% comes from the dye industry (Routoula and Patwardhan 2020). More than 700,000 tons of dyes are produced each year globally, with the current expected compound annual growth rate of 5.9%. Unfortunately, at least 120,000 tons of dyes are emitted to water bodies by various paths (Andreas et al. 2021). Most dyes are toxic, carcinogenic, mutagenic and non-degradable, so improper emissions of dyes have brought serious harm to humans and ecosystems (Mittal et al. 2021; Uddin 2021). Some measures need to be taken to deal with dye-containing effluents.

Currently, the effective methods for the treatment of dyes in water include photocatalysis (Khasevani et al. 2021), electrochemistry (de Oliveira et al. 2011; Hu et al. 2022), biodegradation (He et al. 2021; Gurav et al. 2021), membrane separation (Yu et al. 2021) and adsorption (Xu et al. 2022; You et al. 2022; Mittal et al. 2020). Compared to other treatment processes, adsorption is considered as one of the most promising methods for treating wastewater because of its low cost, accessibility, simplicity and higher efficiency in removing pollutants (Momina and Ahmad 2023). Most studies only report the selective or single adsorption of cationic or anionic dyes by adsorbents (Shi et al. 2022a; Li et al. 2022; Tan et al. 2023). However, the actual dye wastewater contains varieties of dyes that have different charges on their surface, it is more attractive to remove both anionic and cationic dyes simultaneously with amphoteric adsorbent in an economically viable and environmentally friendly manner. Up to now, many amphoteric adsorbent materials have been invested by researchers (An et al. 2021; Azha et al. 2018; Zhou et al. 2018). Natural polymers possess the advantages of abundant, degradable and eco-friendly (Li and Yang 2021; Zhao et al 2022), which can be used as the support matrix to prepare composite adsorbent materials after cross-linking (Kayan and Kayan 2021), or chemically modified to generate new functional groups. For example, Jawad and co-workers modified chitosan with epichlorohydrin and aluminum silicate minerals to develop an amphoteric composite adsorbent (CHS-ECH/ZL) for the removal of the cationic dye Methylene Blue and the anionic dye Reactive Red 120 (Jawad et al. 2020).

Cellulose, as the polymer of β-(1 → 4)-linked d-glucopyranosyl units (French 2017), is the most abundant natural polymer and renewable resource on Earth (Chang and Zhang 2011; Wei et al 2022), making it a versatile material with a wide source and low price (Chen et al. 2020b). Cellulose nanofibers (CNFs) are nanoscale polymeric materials isolated from natural cellulose fibers. A large number of hydroxyl groups on cellulose chains provide sites for chemical modification. The biodegradability, non-cytotoxicity and biocompatibility (Aimonen et al. 2022; Pandey 2021; Munk et al. 2016; Surendran and Sherje 2022), as well as its high specific surface area and self-assembling ability (Abouzeid et al. 2019; Li et al.2018), make CNFs an excellent environmentally friendly adsorbent material. The TEMPO-oxidized cellulose nanofibers (TOCNs) were obtained by TEMPO-mediated oxidation and high-pressure homogenization. During TEMPO-mediated oxidation, C6-carboxylic acid sodium groups formed on the surface of the cellulose microfibrils regularly and selectively (Isogai et al. 2011; Isogai 2021; Wu et al. 2021), so that cationic dyes can be adsorbed on the negatively charged TOCNs surface by electrostatic interaction (Zhu et al. 2022; Xue et al. 2022).

Considering that diverse dyes have different electrical charges in the effluent, cationic groups need to be introduced to construct amphoteric adsorbents so that both cationic and anionic dyes can be adsorbed simultaneously. DMDAAC is a cationic monomer containing a quaternary ammonium group. PDMDAAC is the polymer of DMDAAC, which has positive charges in aqueous solution. Based on this property, one feasible measure is to prepare amphoteric adsorbents by compositing DMDAAC with TOCNs.

In this study, a facile and low-cost nanocellulose-based amphiphilic adsorbent was prepared by in situ polymerization of DMDAAC in the presence of TOCNs as anchoring points (TOCN/PDMDAAC), which possessed carboxylate anions and quaternary ammonium cations. SEM–EDS, FTIR, XPS and BET were utilized to characterize the amphoteric adsorbents. Conductivity titration and pH titration were introduced to characterize the carboxylate active site content of adsorbents and dissociation degree. In addition, the effects of critical factors on the adsorption process such as the initial concentration of the dyes, the pH of the solvent, the contact time, ionic strength and the temperature on the adsorption properties of the dyes MO and MB were investigated. Further, the possible adsorption mechanisms of beads were explored and explained by equilibrium isotherms, kinetics and thermodynamics. Finally, the adsorption behavior of MB and MO mixed system was also investigated.

Materials and methods

Materials

Softwood bleached kraft pulp (SBKP) was purchased from Nippon Paper Industries (Tokyo, Japan). 2,2,6,6-tetramethylpiperidinyl-1-oxide (TEMPO) was provided by Sigma-Aldrich Corporation (Saint Louis, USA). NaClO aqueous solution (free available chlorine > 5%) and dimethyl diallyl ammonium chloride (DMDAAC) were obtained from Aladdin (Shanghai, China). NaBr, NaOH, sodium borohydride, hydrochloric acid, potassium persulfate, methylene blue (MB), methyl orange (MO), ethanol, and calcium chloride were provided by Sinopharm Chemical Reagent Co., Ltd (China). All chemicals used in this study were of analytical-grade reagents. The deionized water was made in the laboratory and used in the whole experimental process.

Preparation of TOCNs

The TEMPO oxidation method was applied to oxidize SBKP for obtaining TOCNs. Firstly, 0.032 g TEMPO and 0.2 g NaBr were weighed and dissolved in 200 mL deionized water, then 2 g SBKP was added and stirred well, followed by the addition of 5.65 mL NaClO aqueous solution. The reaction was carried out under magnetic stirring for 90 min. During the whole reaction period, the pH of the reaction system was adjusted to about 10 with 0.5 M NaOH aqueous solution. After that, 0.2 g sodium borohydride was added and then stirred for 3 h. The surface C6-OH groups of cellulose were partially converted to -COONa after TEMPO oxidation, and the nanocellulose was uniformly dispersed in an aqueous medium (0.5 wt%) after high-pressure homogenization at 30 MPa (GYB40-10S, Shanghai Dong Hua High Pressure Homogeneous Pump Works).

Preparation of TOCN hydrogel beads

The dispersion of 100 mL of 0.5 wt% TOCNs was stirred on a magnetic stirrer for 30 min and then vacuum pumped for 30 min to remove the excess air bubbles. 200 mL, 0.1 mol L1 calcium chloride solution was prepared as the cross-linking bath and the nanocellulose dispersion was dropped into the calcium chloride solution with a 1 mL syringe. Subsequently, the nanocellulose hydrogel beads formed rapidly. After sufficient washing in deionized water, TOCN hydrogel beads were obtained.

Preparation of TOCN/PDMDAAC composite aerogel beads

50 g wet weight of TOCN hydrogel beads were dispersed into 100 mL deionized water. 0.3 g potassium persulfate initiator and 5 mL DMDAAC were added into a three-necked flask and stirred with TOCN hydrogel beads uniformly. The reaction was carried out in an oil bath with a reaction time of 3 h at 323 K. When the reaction was finished, the composite beads were filtered through deionized water and washed several times to remove the excess reagent. Then, the composite hydrogel beads were freeze-dried at 215 K into composite aerogel beads and finally stored in a desiccator. The composite aerogel beads were referred as TOCN/PDMDAAC.

Characterization

The surface morphologies and elemental analysis of the bead samples were obtained using a scanning electron microscope (SEM) (Hitachi S-4800, Japan) and energy-dispersive X-ray spectroscopy (EDS) (X-Max N80, UK) with an accelerating voltage of 5 kV. All samples were coated with a conductive platinum layer before testing. The internal pore sizes distribution and specific surface area of TOCN beads and TOCN/PDMDAAC were carried out by ASAP 2460 fully automatic specific surface area and porosity analyzer (Micromeritics, USA). The surface elements of the bead samples were characterized by an X-ray photoelectron spectrometer of ESCALAB model 250Xi (Thermo Fisher Scientific, USA). The chemical structures of the composite beads were assayed by testing the dried samples using a Nicolet 6700 Fourier transform infrared (FT–IR) spectrometer (Thermo Nicolet, USA). The absorbance of the dyes MB and MO was quantified using a UV–Vis spectrophotometer (PerkinElmer, USA). The surface potential of the composite beads was analyzed using a zeta potential meter (Malvern, UK). Using conductometric titration to determine the carboxylic content in TOCN beads and TPCN/PDMDAAC by DDS-307A (Shanghai INESA Scientific Instrument Co., LTD, China). The pH titrations of hydrochloric acid-acidified TOCN beads and TOCN/PDMDAAC were conducted to determine the acid-dissociation constant (pKa) by pH meter of ST3100 (Ohaus, USA). It should be noted that hydrogel beads need to be freeze-drying (215 K, 20 Pa) before SEM–EDS, BET, XPS and FT–IR testing.

Adsorption experiments

The effects of dye adsorption behavior were investigated by batch treatment method. In single system of dye (MO or MB), experiments were performed with 20 mL vials containing 5 mL MO or MB solutions in a constant temperature shaker. The initial concentration of the two dyes was gradually increased from 0.05 to 5 mmol L−1. The pH of 5 mmol L−1 MO and MB aqueous solutions was adjusted from 2 to 9 using 0.1 M HCl and 0.1 M NaOH, while the TOCN aerogel beads (TOCN beads) were treated as the control under same experimental conditions to compare the amphoteric adsorption capacity of TOCN/PDMDAA. At pH 7, 298 K, the effect of contact time on the adsorption of 5 mmol L−1 MB and MO by TOCN/PDMDAAC was investigated. The influence of adsorption capacity by ionic strength was shown by the addition of NaCl, which was carried out at concentrations of 0.05 mmol L−1, 0.01 mmol L−1, 0.005 mmol L−1 and 0.001 mmol L−1. The effect of temperature on absorption properties at 298 K, 308 K and 318 K was discussed. 0.01 g TOCN/PDMDAAC was added into 5 mmol L−1 MO, MB solutions, respectively. In binary MB and MO system, the behavior of TOCN/PDMDAAC absorbent with both adsorbates was explored at pH 7, 298 K. One of the dyes was maintained at the concentration of 5 mmol L−1 as the single system, and the other dye was blended at concentrations of 0.5 mmol L−1 and 0.05 mmol L−1, respectively.

The dye concentrations after adsorbing were determined by using the UV–Vis spectrophotometer (Lambda750S, USA) at the absorption wavelengths of 464 nm (λmax, MO) and 662 nm (λmax, MB) in the single dye system. The equilibrium adsorption capacity (qe) was calculated by Eq. (1). In the binary system, the absorbance values of the binary system of MB and MO at 664 nm and 464 nm were measured to obtain the calibration coefficients, and the concentrations of MB and MO were calculated by solving the binary linear equations (Pathania et al. 2023).

$$\begin{array}{*{20}c} {q_e = \frac{(C_0 - C_e )V}{m}} \\ \end{array}$$
(1)

where qe (mg g−1) represents the equilibrium adsorption capacity, C0 (mg L−1) is the initial concentration, Ce (mg L−1) represents the adsorption equilibrium concentration, V (L) is the volume of the dye solution, m (g) is the dry weight of the nanocellulose-based beads.

Results and discussion

Characterization of TOCN beads and TOCN/PDMDAAC

Fourier transform infrared spectroscopy (FT–IR)

The chemical structures were analyzed sequentially by Fourier transform infrared spectroscopy (FT–IR). As shown in Fig. 1, the peak at 3445 cm−1 was O–H stretching vibration of TOCN beads. The characteristic peak at 1633 cm−1 was C=O stretching vibration in –COO, which indicated that there were carboxylate groups generated in cellulose by TEMPO oxidation. FTIR analysis revealed that DMDAAC had bands at 3089 cm−1, 3024 cm−1, 960 cm−1 and 1643 cm−1, due to C–H stretching vibration, C–H bending vibration and C=C stretching vibration. The peak at 3518 cm−1 was an expansion vibration of O–H indicating the presence of water in the copolymer product in DMDAAC (Jia et al. 2023). The FT–IR of TOCN/PDMDAAC was analyzed as follows, the peaks related to carbon–carbon double bonds of DMDAAC at 3089 cm−1, 3024 cm−1, 1643 cm−1 and 960 cm−1 disappeared. It concluded that DMDAAC was successfully polymerized to PDMDAAC. The characteristic peak at 1278 cm−1 belonged to the stretching vibration of C–N in PDMDAAC (Celestino et al. 2019), proving the successful composite of PDADAAC and TOCNs. The peak of the O–H stretching vibration of TOCNs in the composite beads shifted from 3445 cm−1 to 3508 cm−1, which was influenced by steric hindrance (steric effect) of PDMDAAC, causing the breakdown of the hydrogen bonding network of nanocellulose. In addition, the C=O stretching vibrational peak in −COO of TOCN beads shifted from 1633 cm−1 to 1622 cm−1, since the interaction between −COO and Ca2+ interfered with the positively charged PDMDAAC. The above analysis may provide evidence for the success of DMDAAC in situ polymerization based on TOCNs as an anchor. After the adsorption of the dye by TOCN/PDMDAAC, the C = O stretching vibration peaks in −COO at 1622 cm−1 of the amphoteric adsorbent were shifted to 1607 cm−1 and 1608 cm−1, respectively, due to the electrostatic interactions between the dye molecules and TOCN/PDMDAAC. The O–H stretching in TOCN/PDMDAAC shifted from 3508 cm−1 to 3447 cm−1 and 3451 cm−1, proving that there was hydrogen bonding between dyes and TOCN/PDMDAAC in addition to the electrostatic interaction for absorbing dyes.

Fig. 1
figure 1

FT–IR spectra of TOCN beads, DMDAAC, TOCN/PDMDAAC, MO-TOCN/PDMDAAC and MB-TOCN/PDMDAAC

X-ray photoelectron spectroscopy (XPS)

X-ray photoelectron spectroscopy can provide the surface elemental composition of samples’ surface layers with thicknesses of 2–10 nm. TOCN/PDMDAAC was analyzed by X-ray photoelectron spectroscopy. The elemental components of TOCN beads are C, H, and O (Cheng et al. 2017), which lacks the N, and Cl elements. Figure 2a–c showed the survey scan of TOCN/PDMDAAC. In Fig. 2a, N 1s and Cl 2p peaks can be observed, respectively. As Fig. 2b, c showed, the N 1s appeared at C–N (399.4 eV) (Kaur et al. 2018; Xiang et al. 2018) and Cl 2p peak at 196 eV (Nan et al. 2020), which can be taken as evidence for the successful in situ polymerization of PDMDAAC with TOCNs as an anchor point.

Fig. 2
figure 2

a XPS spectrum of C, N, O, Cl in TOCN/PDMDAAC. b XPS spectrum of N in TOCN/PDMDAAC. c XPS spectrum of Cl in TOCN/PDMDAAC

Conductometric titration

The carboxylic content of TOCN beads and TOCN/PDMDAAC were determined by conductivity titration (Antoniw et al. 2023; Fraschini et al. 2017). The results were calculated by supporting information Eq. S1. TOCN beads and TOCN/PDMDAAC were dispersed in deionized water, respectively, and added with 0.01 mol L−1 NaCl. The pH of the system was adjusted to 2 with 0.1 mol L−1 hydrochloric acid, after which conductivity titration was carried out with a standard solution of 0.1 mmol L−1 of NaOH. The experimental results in Fig. S1 showed that the carboxylic content of the TOCN beads and TOCN/PDMDAC were 0.95 mmol g−1 and 0.83 mmol g−1, respectively. TOCN/PDMDAAC carboxylic content was lower compared to TOCN beads, which can be explained by the polymerized PDMDAAC occupying part of carboxylates.

pH titration

pH titrations of hydrochloric acid-acidified TOCN beads and TOCN/PDMDAAC were conducted to determine the acid-dissociation constant (pKa). TOCN beads and TOCN/PDMDAAC were kept in deionized water, respectively and the pH of the system was adjusted to 2 with 0.1 mol L−1 of hydrochloric acid, and then titrated with 0.1 mmol L−1 of NaOH standard solution. The pKa was calculated from the titration curve. The maximum value of the first-order derivative of calculus was used as the equivalence point, since the steepest slope represented the deprotonation of all charged carboxylic groups. The corresponding pH of half the volume of sodium hydroxide required for the equivalent point was the reported pKa (Antoniw et al. 2023). Results of pKa by calculation were shown in Fig. S2. The pKa of TOCN beads was 3.9, and the pKa of TOCN/PDMDAAC was 4.23.

Scanning electron microscopy and Energy-dispersive X-ray spectroscopy (SEM–EDS)

The surface morphology and elemental analysis of TOCN beads and TOCN/PDMDAAC composite beads was observed by scanning electron microscopy (SEM) and energy-dispersive X-ray spectroscopy (EDS). Figure 3a–f show the surface and cross-section morphology of the samples. In Fig. 3a, b, the mesoporous structure of several nanometers to tens of nanometers on the surface of TOCN beads can be observed. Figure 3d, e visually show the surface morphology structure of TOCN/PDMDAAC, which can be observed that tens to hundreds of nanometers of PDMDAAC polymerized on the surface of TOCN beads and had a rougher surface. Figure 3c showed a cross-section of the TOCN beads, whose interior is similar with the surface with a porous structure. Figure 3f represented a cross-section of TOCN/PDMDAAC with granular material newly observed, indicating that PDMDAAC was also polymerized inside the beads to fill or cover larger pores, which reduced the average pore size of the composite beads compared to the cross-section of the TOCN beads (Fig. 3c). The elemental maps and analysis of TOCN/PDMDAAC were characterized in Fig. S4 of the supporting information, where element N was detected at an amount of 5.68% and the distribution of N elements relatively coincided with the location of the particles indicating the success of in situ polymerization of PDMDAAC anchored by TOCNs.

Fig. 3
figure 3

SEM images of the surface morphology of a, b TOCN beads, d, e TOCN/PDMDAAC, c and f cross-section of TOCN beads and TOCN/PDMDAAC

Brunauer–Emmett–Teller (BET)

To explore the internal structure of TOCN beads and TOCN/PDMDAAC, the changes in specific surface area and its pore size distribution were measured with a specific surface area analyzer. Figure 4a shows the nitrogen isothermal desorption curves of TOCN beads and TOCN/PDMDAAC. The specific surface areas of TOCN beads and TOCN/PDMDAAC were 246 m2 g−1 and 170 m2 g−1, respectively, which indicated that the specific surface area of TOCN/PDMDAAC decreased slightly after in situ polymerization. Figure 4b showed the pore size distribution curves of beads. The pore size distribution of TOCN/PDMDAAC was more centrally shifted towards smaller pore sizes than TOCN beads. The average pore sizes of TOCN beads and TOCN/PDMDAAC were obtained as 10 nm and 5 nm, respectively. The results showed that PDMDAAC was not only dispersed on the surface of the TOCN beads, DMDAAC also entered into the surface and interior of the bead network structure by good hydrophilicity during polymerization, forming granular PDMDAAC in situ near large pore size, which reduced the average pore size of the composite bead.

Fig. 4
figure 4

a Curves of nitrogen isotherm adsorption–desorption of TOCN beads and TOCN/PDMDAAC. b Pore distribution curves of TOCN beads and TOCN/PDMDAAC

Swelling test

0.1 g of TOCN beads and TOCN/PDMDAAC were immersed in deionized water, respectively. The swelling ratios of the adsorbent were detected at different time intervals over a period of 1680 min in Fig. S3. The swelling ratio SR (%) was calculated according to Eq. S2 in the supporting information. TOCNs contain hydrophilic groups of -OH and −COO and TOCN beads are the hydrophilic three-dimensional porous material with a swelling rate of 4140% (Gan et al 2018). The swelling rate of the composite beads of TOCN/PDMDAAC was 8850%, due to the introduction of cationic polymers PDMDAAC, the higher osmotic pressure inside the TOCN/PDMDAAC during swelling in water made the composite beads show more pronounced swelling compared to the TOCN beads (shan et al. 2023).

TOCN/PDMDAAC adsorption performance analysis

Effect of the initial concentration of the dye

To compare the adsorption performance of TOCN beads and TOCN/PDMDAAC on cationic and anionic dyes, 0.05–5 mmol L−1 MB and MO dye solutions at pH 7 were prepared to study the effect of the initial concentration of dyes on the adsorption performance of amphoteric adsorbents. The adsorption capacity of the adsorbent was calculated by UV–Vis spectrophotometry after adsorbing in dye solutions of different concentrations. From Fig. 5a, The adsorption capacity increased when the concentration of MB, MO dye increased, which indicated that as the concentration of the dye increased, the driving force for the dye to overcome the mass transfer from the aqueous phase to the solid phase was more significant, and the dye was more easily adsorbed to the adsorption sites. However, the adsorption sites and capacity are limited. At higher initial concentrations, the rate of increase of adsorption reduced and the effect of concentration on the adsorption capacity was not obvious. The adsorption gradually reached equilibrium until the adsorption sites saturated rapidly after the initial concentration reached a high enough level (Jin et al. 2023).

Fig. 5
figure 5

a Effects of the initial concentration of dyes on the adsorption of MO and MB by TOCN beads and TOCN/PDMDAAC. b Effects of pH on the Zeta potential of TOCN beads and TOCN/PDMDAAC. c Effects of pH on the adsorption of MO by TOCN bead and TOCN/PDMDAAC. d Effects of pH on the adsorption of MB by TOCN beads and TOCN/PDMDAAC

Additionally, the adsorption capacity of the composite beads for the cationic dye MB did not decrease significantly compared to the TOCN beads. It indicated that the addition of PDMDAAC did not have a significant negative effect on the adsorption of MB by the beads. The carboxylic group content of TOCN beads and TOCN/PDMDAAC was tested by conductivity titration. The results showed that the difference in carboxyl group content between the TOCN beads (0.95 mmol g−1) and TOCN/PDMDAAC (0.83 mmol g−1) was not remarkable, which may explain the slight decrease in the adsorption capacity of MB by TOCN/PDMDAAC. Influence of the dissociation degree of dyes and adsorbents on adsorption at pH 7 has also been investigated. MB has a pKa of 3.8 (Chen et al. 2017; Gupta et al. 2024), therefore, at pH 7, MB is predominantly cationic which could interact with the negatively charged carboxylate of TOCN/PDMDAAC, who has a pKa of 4.23, by electrostatic interaction. The adsorption capacity of MO (pKa 3.4) (Oyarce et al. 2021) by TOCN/PDMDAAC was considerably higher than TOCN beads, binding to the cationic polymer PDMDAAC by electrostatic interaction at pH 7.

Effect of pH

The pH of the solution affects the existent form of the functional groups of the adsorbent (Chen et al. 2020a, b). The Zeta potential values of TOCN/PDMDAAC and TOCN beads were measured at pH values ranging from 2 to 9. In Fig. 5b, the TOCN beads showed a positive potential at pH 2, with pH increasing, TOCN beads showed a negative potential. After in suit polymerization of PDMDAAC, TOCN/PDMDAAC still showed positive potential at pH 3, as the pH increased, TOCN/PDMDAAC showed negative potential. Notably, the Zeta potential of TOCN/PDMDAAC showed an overall increase in potential value compared to TOCN beads. Quaternary ammonium cations in PDMDAAC interact electrostatically with the carboxylate anions on TOCNs, leading to the change of negative potential on nanocellulose. Increased zeta potential due to the introduction of cationic polymers (Dong et al. 2022). Figure 5c, d illustrate the saturation adsorption values of TOCN beads and TOCN/PDMDAAC on MO and MB at different pH. Both TOCN beads and TOCN/PDMDAAC had the highest adsorption capacity (403 mg g−1 and 534 mg g−1, respectively) for the anionic dye MO at pH 2. In excess of H+ solution, protonation of TOCNs occurred. Therefore, one of the mechanisms of MO adsorption by TOCN beads was attributed to hydrogen bonding interaction. The red shift of the hydroxyl peak in the FT–IR spectrum also verified that MO interacted with TOCN/PDMDAAC by hydrogen bonding. Notably, the electrostatic interaction between the strong cationic PDMDAAC and the anionic dye MO allowed TOCN/PDMDAAC to have a higher adsorption capacity for MO than TOCN beads. With pH increasing, the adsorption of MO gradually decreased as the carboxyl groups deprotonate, while PDMDAAC remained hydrolyzed and positively charged, providing active sites for TOCN/PDMDAAC to adsorb anionic dyes in the alkaline environment. On the other hand, the adsorption capacity of MB was gradually increased. The equilibrium adsorption of MB by TOCN/PDMDAA was 575 mg g−1 at pH 9. This phenomenon can be explained by deprotonation of the TOCN/PDMDAAC (pKa 4.23), which augmented numerous negative active sites to adsorb cationic dye MB (Chen et al. 2023). It indicated that electrostatic interaction played a significant role in the adsorption process. At pH 7, TOCN/PDMDAAC demonstrated good adsorption capacity for both MO and MB, which were 390 mg g−1 and 515 mg g−1, respectively. All the above data demonstrated that TOCN/PDMDAAC had an amphoteric adsorption capacity to adsorb both anionic and cationic dyes, which can be applied in different pH solutions.

Effect of contact time

To investigate the effect of contact time on the adsorption of MB and MO by TOCN/PDMDAAC. Figure 7a shows the pattern of adsorption amount of TOCN/PDMDAAC with adsorption time at pH 7, 298 K. From Fig. 7a, the adsorption process of the adsorbent on the dye was carried out in segments. In the initial stage of 30 min, as the small molecule dyes fully interacted with the nanocellulose adsorbent binding sites, the composite beads showed rapid and effective adsorption of both MO and MB making the adsorption amount increase rapidly in a short time. As the adsorption proceeded, the adsorption rate decreased caused by the adsorption sites gradually reduced. Finally, the adsorption equilibrium was reached at 90–100 min.

Effect of ionic strength

The electrostatic interaction between the adsorbent and adsorbate is affected by applied ions that may change the surface charge of the adsorbent (Chen et al. 2020a). Ion strength experiments were performed to determine whether electrostatic interaction was the adsorption mechanism. NaCl was modeled to explore the effect of different concentrations of ions on adsorption capacity. The results in Fig. 6 showed that at low NaCl concentrations (0.001 mol L−1), the adsorption capacity of both dyes increased slightly. MB increased from 505 mg g−1 to 525 mg g−1 and MO increased from 382 mg g−1 to 391 mg g−1. Rare amounts of NaCl had an enhancing effect on the adsorption of dyes by oppositely charged adsorbents (Gomes et al. 2023). As the NaCl concentration increased, Cl occupied the adsorption sites of the adsorbent. The adsorption capacity of MO dye was obviously reduced. The adsorption capacity of MB dye was not significantly reduced at a Na+ concentration of 0.005 mmol L−1. This may be due to the fact that Na+ is a low-affinity ion-exchange counter ion on anionic materials used for ion exchange and that Na+ can be more easily replaced by cationic materials with greater affinity (MB) (Hubbe et al. 2019). The adsorption capacity of MB dyes gradually decreased with increasing Na+ ion concentration. It is demonstrated that the adsorption mechanism of MB, MO dyes by amphoteric adsorbents involves electrostatic interactions.

Fig. 6
figure 6

Ionic strength on adsorption of MO and MB by TOCN/PDMDAAC

Adsorption kinetics

Adsorption process of the three mass transfer processes are external diffusion (film diffusion), internal diffusion (intraparticle diffusion) and adsorption onto the active site. The rate-limiting step of the adsorption process is revealed by studying the kinetic studies (Wang and Guo 2023). To explore the adsorption kinetics of TOCN/PDMDAAC to reveal the rate-limiting step, Eq. (2) pseudo-first order kinetic model (PFO) in nonlinear (Tran et al. 2017), Eq. (3) pseudo-second order kinetic model (PSO) in nonlinear (Tran et al. 2017) and Eq. (4a,4b) intraparticle diffusion model (the Weber-Morris model) (IPD) are fitted to the TOCN/PDMDAAC adsorption data, respectively (Wang and Guo 2022).

$$\begin{array}{*{20}c} {q_t = q_e (1 - e^{ - k_1 t} )} \\ \end{array}$$
(2)
$$\begin{array}{*{20}c} {q_t = \frac{q_e^2 k_2 t}{{1 + k_2 q_e t}}} \\ \end{array}$$
(3)
$$\begin{array}{*{20}c} {q_t = k_{D1} t^{0.5} \quad 0 \le t \le t_1 } \\ \end{array}$$
(4a)
$$\begin{array}{*{20}c} {q_t - q_{t = t1} = k_{D2} (t - t_1 )^{0.5}\quad t_1 < t \le t_2 } \\ \end{array}$$
(4b)

where qt (mg g−1) and qe (mg g−1) represent the adsorbed amount of target adsorbate at time t and equilibrium. k1 (min−1) and k2 (g mg−1 min−1) are the PFO, PSO and IPD rate constants, respectively. kD1 and kD2 (mg (g min0.5)−1) are the parameter of the IPD. t is the contact time (min).

The fitting results and kinetic parameters of the PFO and PSO were shown in Fig. 7b, c and Table 1. In order to gain more insights into adsorption kinetics, we further explored the intraparticle diffusion model. IPD investigates whether the adsorbate diffusion in the pores of the adsorbent is the rate-limiting step in the adsorption process. Equation 4(a), (b) were employed to fit the adsorption process. Several times tried to find the optimal division to derive the optimal R2 for IPD (Wang and Guo 2022). The intraparticle diffusion, pseudo-first order kinetic model and pseudo-second order kinetic model were evaluated by comparing the R2. IPD was simulated in Fig. 8a–h and the kinetic parameters were given in Table 1. The fitting results suggested that pseudo-second order kinetic model could better model adsorption process and implied the rate-limiting step of TOCN/PDMDAAC, while the R2 for the pseudo-second order model were 0.9977 and 0.9992. The saturation adsorption amount of TOCN/PDMDAAC calculated from the pseudo-second order model was also closer to the experimental value. PSO model revealed the interaction of the TOCN/PDMDAAC active sites with the MB, MO in the mass transfer process of adsorption (Wang and Guo 2020). Furthermore, the interpretation of the relevance of the optimal-fitted results of PSO is still generally discussed. Hubbe and coworkers concluded that adsorption behavior consistent with the PSO model can usually be explained by diffusion or the surface interactions. He pointed out that the adsorption kinetics of cellulosic materials depend mainly on diffusion-limited processes, such as the heterogeneous distribution of the pore sizes, the affinity and the charge interactions between the adsorbent and the adsorbate (Hubbe et al. 2019).

Fig. 7
figure 7

a Effect of contact time on the adsorption of TOCN/PDMDAAC towards MO and MB, b PFO fitting curves for MB and MO adsorption by TOCN/PDMDAAC, c PSO fitting curves for MB and MO adsorption by TOCN/PDMDAAC

Table 1 PFO, PSO and IPD parameters of TOCN/PDMDAAC
Fig. 8
figure 8

ai The IPD’s fitting results of TOCN/PDMDAAC towards MO and MB based on different division

Adsorption isotherms

The isotherm model integrated the equilibrium data and adsorption properties of the adsorbent and adsorbent masses, allowing the description of the interaction mechanism of the adsorbent and adsorbates at a constant temperature (Al-Ghouti and Da’ana 2020). According to the isotherm model, the saturation adsorption amount was obtained by adsorption isotherm experiments at 298 K. The nonlinear forms of (5) Freundlich isotherm model, (6a) Langmuir isotherm model and (6b) RL constant separation factor and (7) Temkin isotherm model were chosen to discuss the adsorption theory of TOCN/PDMDAAC (Tran et al. 2017).

$$\begin{array}{*{20}c} {q_e = K_F C_e^\frac{1}{n} } \\ \end{array}$$
(5)
$$\begin{array}{*{20}c} {q_e = \frac{q_m K_L C_e }{{1 + K_L C_e }}} \\ \end{array}$$
(6a)
$$\begin{array}{*{20}c} {R_L = \frac{1}{1 + K_L C_0 }} \\ \end{array}$$
(6b)
$$\begin{array}{*{20}c} {q_e = B\ln (K_T C_e )} \\ \end{array}$$
(7)

where qe (mg g−1) and qm (mg g−1) represent the adsorbate’s equilibrium and maximum adsorption capacities, respectively. Ce (mg L−1) is the dye concentration in the aqueous phase at equilibrium. C0 (mg L−1) is the initial adsorbate concentration. KL (L mg−1) is a Langmuir constant concerning adsorption energy. RL is a constant separation factor (dimensionless) of the solid–liquid adsorption system. KF ((mg g−1) (mg L−1)−n) represents the Freundlich constants and n (dimensionless) is the Freundlich intensity parameter, indicating the magnitude of the adsorption driving force or the surface heterogeneity. KT (L mg−1) represents the binding constant of the Temkin isotherm equilibrium and B is the Temkin constant related to the adsorption energy (Zhan et al. 2021).

The fitting results and the parameters of the correlated adsorption isotherm model are shown in Fig. 9 and Table 2. The correlation coefficient values(R2L) indicated that the Langmuir isothermal model was the most appropriate isothermal model to describe the interactions of the adsorbent and adsorbate. The adsorption of dye molecules occurred at specific homogeneous sites and monolayers were adsorbed on the TOCN/PDMDAA. The separation factor (RL) (6b) can be calculated as an indicator of favorable adsorption degree (Webber and Chakkravorti 1974). In Table 2, the calculated results of 0 < RL < 1 showed that the adsorption was favorable. Based on the Langmuir isotherm model, the saturation adsorption amounts of MO and MB by TOCN/PDMDAAC were calculated to be 404.86 mg g−1 and 520.83 mg g−1, respectively.

Fig. 9
figure 9

a Adsorption isotherms for the adsorption of TOCN/PDMDAAC towards MO and MB. Adsorption isotherm models: b Freundlich,  c Langmuir,  d Temkin for the adsorption of TOCN/PDMDAAC towards MO and MB, respectively

Table 2 Adsorption isotherm parameters for the adsorption of TOCN/PDMDAAC

Adsorption thermodynamics

In order to investigate the effect of temperature on the adsorption performance of TOCN/PDMDAAC, the change in adsorption capacity of the adsorbent at different temperatures (298 K, 308 K, 318 K) was utilized to characterize the thermodynamic behavior of the adsorbent. Figure 10a described that as the temperature rose, the adsorption of dye molecules per unit mass of adsorbent increased, it showed an endothermic nature of the absorption process. Thermodynamic parameters such as Gibbs free energy change (ΔG \(^\circ\), kJ mol−1), enthalpy change (ΔH \(^\circ\), kJ mol−1) and entropy change (ΔS \(^\circ\), J mol−1 K−1) of dye molecules adsorbed on composite beads were calculated according to van’t Hoff Eq. (8), (9), (10), which have been evaluated in Table 3. In Fig. 10b, a plot of qe/Ce versus T was constructed and shown.

$$\ln K_D = \left( { - \frac{\Delta H^\circ }{{RT}} + \frac{\Delta S^\circ }{R}} \right)$$
(8)
$$\Delta G^\circ = - RT\ln K_D$$
(9)
$$\Delta G^\circ = \Delta H^\circ - T\Delta S^\circ$$
(10)

where KD equaling (qe/Ce) is the distribution coefficient of the solute ions. R is the ideal gas constant (8.314 J mol−1 K−1) and T is the absolute temperature in Kelvin (Sheha and El-Zahhar 2008).

Fig. 10
figure 10

a Effect of temperature on the adsorption of TOCN/PDMDAAC towards MO and MB. b Curves of 1/T-ln(qeCe) based on van’t Hoff equation

Table 3 Thermodynamic parameters for the adsorption of TOCN/PDMDAAC

With negative ∆G \(^\circ\) values, the spontaneity and feasibility of the adsorption process of dye molecules by TOCN/PDMAAC were confirmed. The positive value of ∆H \(^\circ\) further verified that the MO and MB adsorption process by TOCN/PDMDAAC was endothermic. The rising temperature increased the amount of dye adsorption and benefited the adsorption process.

Binary MB and MO system

In order to investigate the adsorption capacity of the adsorbent and the synergistic or competitive relationship between MB and MO in the adsorption process. The initial concentration of one dye was maintained at the same concentration as the initial concentration in the single system (5 mmol L−1) and the other dye at the initial concentration of 0.05 mmol L−1 and 0.5 mmol L−1 were blended, respectively. The result was shown in Fig. 11, in the binary dye system, compared with the single system, the adsorption capacity decreased when the other dye was added at a lower concentration (CMO = 5 mmol L−1, CMB = 0.05 mmol L−1 or CMO = 0.05 mmol L−1, CMB = 5 mmol L−1), which showed a competitive relationship, while the adsorption capacity increased when the other dye was added at a higher concentration (CMO = 5 mmol L−1, CMB = 0.5 mmol L−1 or CMO = 0.5 mmol L−1, CMB = 5 mmol L−1), which showed a synergistic relationship between the two dyes in the adsorption process. It could be explained that in high dye initial concentration, as all the surface adsorption sites were occupied, some previously adsorbed dye molecules become new adsorption sites, and positively charged MB dyes can be adsorbed onto MO molecules by electrostatic attraction, as well as MO (Ma et al. 2018; Shi et al. 2022a, b). Meanwhile, due to the aromatic structure of MB, MO molecules, dimers can be formed between dye molecules through EDA interactions, and excess dyes can form larger aggregates through electrostatic interactions, which indicated that oppositely charged MO and MB dyes can promote each other’s adsorption ability (Shi et al. 2022a, b). On the contrary, in the lower concentration of the applied dyes, the adsorption behavior was influenced by a certain amount and limited third dimension (Hubbe 2021) of adsorption sites, which showed a competitive relationship.

Fig. 11
figure 11

Comparison of adsorption capacity of binary MB and MO systems with single dye system

Conclusion

The TOCN/PDMDAAC amphoteric adsorbent with carboxylic acid and quaternary ammonium groups was successfully obtained. TOCN/PDMDAAC was measured by FT–IR, BET, SEM–EDS and XPS tests. Accordingly, the corresponding results confirmed that DMDAAC successfully polymerized in situ with TOCN as the anchor point. The carboxylic acid content of TOCN/PDMDAAC determined by conductivity titration was 0.83 mmol g−1. Initial concentrations of dyes, pH, contact time, temperature and ionic strength had effects on the performance of composite beads to adsorb MO and MB. The higher pH was more favorable for the uptake of MB, while the adsorption capacity of TOCN/PDMDAAC containing cationic polymers for MO was significantly higher than TOCN beads at the same pH, since electrostatic interaction was the driving force in the adsorption process of TOCN/PDMDAAC. At pH 7, based on the equilibrium adsorption capacity of MO (390 mg g−1) and MB (515 mg g−1), TOCN/PDMDAAC can be proved to be an effective amphoteric adsorbent. Redshift of MO-TOCN/PDMDAAC and MB-TOCN/PDMDAAC hydroxyl peaks in FT–IR indicated that hydrogen bonding was also one of the interactions between dyes and TOCN/PDMDAAC. Various models were analyzed for the adsorption behavior of TOCN/PDMDAAC towards MO and MB. Adsorption kinetic studies showed that the adsorption process of TOCN/PDMDAAC was more compatible with PSO, which implied that the interaction between the dyes and adsorbent adsorption active sites played a decisive role in the mass transfer process of adsorption. According to the adsorption isotherm model, the adsorption process of MO and MB on TOCN/PDMDAAC was in general agreement with the Langmuir isotherm model. The adsorption of dyes occurred at specific homogeneous sites and monolayers were adsorbed on the TOCN/PDMDAA. Thermodynamic studies showed that it was an endothermic and spontaneous process in which the absorption capacity of TOCN/PDMDAAC increased with rising temperature. The adsorption behavior of binary mixed dye systems of MO and MB has also been investigated. Notebly, the addition of the other dye at a higher concentration exhibited a synergistic adsorption. In conclusion, a nanocellulose-based amphoteric adsorbent was successfully constructed by an economical, environmentally friendly and simple method. Therefore, we expect that the work will promote the development of wastewater purification.