Introduction

Water pollution is one of the environmental problems which threats ecosystem in the Earth. Among pollutants, dyes is a big issue due to the its non-biodegradable and toxic nature. In dye molecules there are stable aromatic rings, therefore dyes may cause negative effects on living things and human beings when they are present in water (Mishra and Tripathy 1993; Hamdaoui and Chiha 2006; Silva et al. 2013; Al-Sakkaf et al. 2020). Various methods to treat dye containing water have been carried out, for instance, physical methods (e.g., adsorption, coagulation, membrane filtration), chemical methods (e.g. chemical degradation, Fenton reagents, photocatalyst), biological methods (e.g. aerobic degradation) (Rafatullah et al. 2010; Wang et al. 2019; Huang et al. 2019; Visa et al. 2019; Moosavi et al. 2020). Among these methods, adsorption is of significant interest due to its advantages such as simplicity of method, high efficiency, non-generation of toxic materials and low cost.

Many adsorbents such as activated carbon, graphene, plant biomass, clay, etc. were tested for their ability to adsorb dyes from aqueous solutions (Robinson et al. 2001; Won et al. 2005; Ho et al. 2005; Wang et al. 2013; Liu et al. 2015; Dutta et al. 2021). However, they were used as an adsorbent for either cationic or anionic dye. The adsorbent for both cationic and anionic dye has not been widely investigated. This may be due to the nature of the adsorption. It is quite difficult to find a material which contains the adsorption site for both cationic and anionic dye compound. Therefore, the simultaneous adsorption of dyes from wastewater effluent is still a challenge.

Polyaniline (PAni) may be a potential material to adsorb both cationic and anionic dye compound since its molecular structure contains nitrogen atoms which can act as nucleophile or electrophile centers. PAni may occur in various form of emeraldine base with no charge or emeraldine salts with positive charge (Sapurina and Shishov 2012). The forms of PAni are dependent on pH as illustrated in Fig. 1.

Fig. 1
figure 1

The change in structure of PAni with pH

When PAni is the form of emeraldine base, the nitrogen atom with negative charge density may be an adsorption site for cationic dye. In the other hand, when PAni is the form of emeraldine salt, the positively charged nitrogen atom may be an adsorption site for anionic dye. However, owing to the π electron conjugated system, PAni is brittle and poor in processibility. (Perrin and Oueiny 2018). Therefore, it is difficult to apply PAni as an adsorbent in practical. Recently, PAni has been used to prepare composite with polysaccharides such as chitosan, starch, bacterial extracellular polysaccharides (Janaki et al. 2012a, b, c). The obtained composites were used for the removal of dyes from aqueous solution. When polysaccharide/PAni composite is prepared, the obtained adsorbent is an environmentally friendly material because polysaccharide is a green and renewable material. So far, the capability of these materials to adsorb both anionic and cationic dye has not been investigated yet.

To prepare an adsorbent based on PAni and polysaccharide which has the high potential to apply in practical, it is required that the adsorbent is high efficiency of adsorption, environmental stability, and low cost. In this work, the adsorbent based on PAni and cellulose from sugarcane bagasse was investigated. This material is expected to be an efficient absorbent for dyes in wastewater effluent, which has been not reported in literature.

Sugarcane bagasse is the by-product of the sucrose production. The percentage of cellulose in sugarcane bagasse is about 40%, the rest is hemicellulose and lignin (Asagekar and Joshi 2014). Hemicellulose is easily hydrolyzed in acid and alkaline solution, and lignin easily oxidized in air. Therefore, it is necessary to remove hemicellulose and lignin in sugarcane bagasse. The obtained cellulose may be an ideal material for prepare a green adsorbent since it has environmental stability, and low cost. When PAni was grafted on cellulose fiber, it is anticipated to be active site for the adsorption of anionic and cationic dyes.

In this study, cellulose was extracted from sugarcane bagasse. PAni was grafted on cellulose through polymerization of aniline in the presence of cellulose and ammonium persulfate (APS) in emulsion state. Cellulose-graft-polyaniline (Cel-g-PAni) was characterized through Fourier Transform Infrared (FTIR) spectroscopy, Scanning Electron Microscopy (SEM) observation, and the determination of porosity. The relationship between conversion of aniline and the porosity of Cel-g-PAni was elucidated. The sample Cel-g-PAni with the highest conversion of aniline was used as the adsorbent of cationic and anionic dye in aqueous solution. The cationic dye and anionic dye used in this study is methylene blue (MB) and methyl orange (MO), respectively. They are the common dyes for wood, paper, printing, textile and so forth. The adsorbing capacities toward MB, MO and a mixture of MB and MO were evaluated with the respect to pH of aqueous solution. The model for adsorption of Cel-g-PAni toward the dye compounds was found and evaluated.

Experimental

Chemicals

Sugarcane bagasse was gathered in sugarcane tree Saccharum officinarum L. cultivated in the North of Vietnam in summer. Aniline (C6H7N, 99 wt%), chlorohydric acid (HCl, 36 wt%), sodium hydroxide (NaOH, 99,5 wt%) were purchased from Sigma Aldrich. Sodium dodecyl sulfate (SDS, 98 wt%), sodium hypochlorite solution (NaClO, 10 wt%), ammonium persulfate (APS, 99.5 wt%) were purchased from Nacalai Tesque Inc.

Preparation of materials

Purification of cellulose from sugarcane bagasse

The purification procudure of cellulose from sugarcane bagasse was carried out according to the process reported in literature (Nguyet et al. 2020; Nguyen et al. 2022). The sugarcane bagasse was cut into small pieces. After that, it was washed many times with tape water, followed by drying in sunlight. Lignin and hemicellulose were removed from the sugarcane bagasse, and cellulose was obtained. The procedure is as follows.

Sugarcane bagasse was soaked in a solution of HCl 4% at 50–60 °C in 4 h. After that, it was washed with distilled water until the pH of washing water was 7. The obtained powder (powder 1) was dried in sunlight for 8 h. Next, the powder 1 was soaked in a solution of NaOH 10% at 50–60 °C in 4 h to obtain powder 2. The powder 2 was washed with distilled water until the washing water was neutral (pH = 7). The powder 2 was also dried in sunlight for 8 h. Last, the powder 2 was soaked in NaClO 4% in 1 h at room temperature, followed by washing with distilled water and filtering to obtain cellulose. The cellulose was dried at 50 °C in reduced pressure for a week. In this work, the yield of cellulose obtained after the purification process was about 30 wt%. The procedure is described in Fig. 2.

Fig. 2
figure 2

Procedure for purification of cellulose from sugarcane bagasse

Preparation of polyaniline-modified cellulose

Aniline was distilled under nitrogen atmosphere before used. Cellulose was dispersed in distilled water, followed by adding SDS solution of 1 wt% in continuous stirring. Thereafter, APS was added to obtain the mixture 1. The acidity of the mixture 1 was adjust to pH = 4 by HCl solution. Next, the purified aniline in the ratio of cellulose/aniline of 100/1 wt/wt was dropped into the mixture 1. The polymerization of aniline in the presence of cellulose was carried out in 6 h in 10–15 °C to obtain the mixture 2. The unreacted aniline was removed from the mixture 1 using a rotary evaporator in reduced pressure at 65 °C. Finally, the resulting product, i.e. cellulose-graft-polyaniline (Cel-g-PAni) was washed with distilled water until the washing water was neutral, then dried. The preparation procedure was illustrated in Fig. 3.

Fig. 3
figure 3

Procedure for preparation of cellulose-graft-polyaniline

The conversion of aniline in the polymerization was calculated as following equation:

$$ {\text{Conversion}}~\left( {{\text{wt}}~\% } \right) = \frac{{m^{\prime}}}{m} \times 100 $$
(1)

where m′ is the weight of PAni in Cel-g-PAni.

m is the weight of purified aniline used in the polymerization reaction.

Characterization

Characterization of Cel-g-PAni

FT-IR spectra of the samples were performed in the attenuated total reflection mode (ATR) at resolution of 4 cm−1 in the region of 400–4000 cm−1 using a JASCO FT-IR 4600 spectrometer.

The SEM observation for samples was made in a SEM Jeol SM-200 operating at the accelerating voltage of 10 kV.

Porosity of the samples was determined using the solvent replacement method. The dried samples were weighted then immersed in an ethanol bath until the adsorption equilibrium was approached. Thereafter, the sample was taken and weighted again. The porosity was calculated as the following equation:

$$ {\text{Porosity}} \left( \% \right) = \frac{{\left( {m_{1} - m_{o} } \right)\rho_{S} }}{{\rho_{S} m_{1} - \left( {\rho_{E} - \rho_{S} } \right)m_{o} }} \times 100 $$
(2)

where mo and m1 is the weight of the sample before and after the adsorption, respectively. ρE is the density of ethanol (0.78 g/cm3). ρS is the density of cellulose (1.55 g/cm3)

The porosity of each sample was measured 3 times to take the average value.

Adsorption of methylene blue and methyl orange

Batch adsorption was performed in Erlenmeyer flasks containing 0.1 gam of an adsorbent which is cellulose or Cel-g-PAni. All MB, MO solutions used in this study were prepared by weighing and dissolving the required amounts of the sample in distilled water, followed by adjusting pH with the solution HCl 0.1 M or NaOH 0.1 M. The solution (100 mL) was added in the flask. The mixture was shaken at 150 rpm in a shaking incubator for 3 h at room temperature (30 °C) so that the adsorption attained the equilibrium. Thereafter, the mixture was centrifuged at 9000 rpm for 10 min to separate the solution and solid fraction. The batch adsorption for each adsorbent was repeated 3 times.

The UV absorption of MB solutions was measured at 665 nm which is maximum wavelength of MB in a V-730 Jasco UV–VIS spectrophotometer. Likewise, the UV absorption of MO solutions was measured at 465 nm which is maximum wavelength of MO in the same spectrophotometer. The concentration of a dye solution was determined by comparison of the absorbance of the respective solution with the calibration curve of MB and MO.

The adsorbing capacity was calculated according to the equation

$$ a = \frac{{C_{i} - C_{e} }}{m}V $$
(3)

where a (mmol/g) is the adsorbing capacity. Ci (mmol/L) is the initial concentration of the dye solution. Ce (mmol/L) is the concentration of the dye solution at equilibrium. m (g) is the weight of the adsorbent (in this study, m = 0.1 gam). V (L) is the volume of dye solution (in this study, V = 0.1 L).

The adsorbing capacity of each adsorbent was determined 3 times to take the average value.

Results and discussion

Characterization of Cel-g-PAni

The preparation of Cel-g-PAni

To prepare Cel-g-PAni with different conversion of PAni, the polymerizarion of aniline in the presence of cellulose was carried out with various amounts of APS initiator. Table 1 shows the conversion and porosity of cellulose and Cel-g-PAni prepared with different amount of APS. The conversion of aniline attained the highest value with the APS amount of 0.5 mol/kg cellulose. When the APS amount was lower than 0.5 mol/kg cellulose, the conversion of aniline decreased. This may be explained that the decrease of APS amount led the decrease of free radical concentration which was generated from APS initiator. Therefore, the conversion of aniline in the polymerization lowered. In other hand, when the APS amount was higher than 0.5 mol/kg cellulose, the conversion of aniline also decreased. This phenomenon commonly occurs in the reactions with the presence of free radicals (Pukkate et al. 2008; Duh et al. 2010). The proposed mechanism of polymerization of aniline in the presence of cellulose is shown in Fig. 4 (Sapurina and Shishov 2012; Nguyen et al. 2022). In this case, when the free radical concentration was too high, the free radicals were ready to react with each other to form a stable compound which diminished the free radicals. As the result, the the conversion of aniline in the polymerization lowered compared to the value at optimal amount of APS initiator.

Table 1 The conversion and porosity of Cel-g-PAni prepared with different amount of APS
Fig. 4
figure 4

Proposed mechanism of polymerization of aniline in the presence of cellulose and APS

FT-IR spectrum

Figure 5 shows FT-IR spectrum of cellulose and Cel-g-PAni. In Fig. 5a, the peak at 3328 cm−1 was assigned to the stretching vibration of OH group in polysaccharide. The peak at 2897 cm−1 was attributed to CH stretching vibration (Yan et al. 2009). The signal at 1026 cm−1 was assigned to stretching vibrations of C-O bonds in cellulose (Xu et al. 2013). These signals in FT-IR spectrum of the sample confirmed that cellulose was extracted from sugarcane bagasse through the procedure.

Fig. 5
figure 5

FT-IR spectrum for the samples a cellulose, b Cel-g-PAni

Figure 5b shows the FT-IR spectrum of cellulose modified with PAni, i.e., Cel-g-PAni. The shape of the characteristic signals of cellulose changed in comparison with that of pristine cellulose. This phenomenon may suggest the change in conformation of cellulose. The worthy note is that the characteristic signals of PAni were found. The signal at 1531 and 1493 cm−1 corresponded to the C = C stretching vibration of the quinoid and benzenoid rings of PAni. The signal at 1311 cm−1 belong to C – N and C = N stretching vibration of PAni (Lopes et al. 2016). The observation of these signals in FT-IR spectrum confirmed the presence of PAni in Cel-g-PAni.

SEM

The surface of cellulose and Cel-g-PAni was observed through SEM image as shown in Fig. 6. In Fig. 6a, the shape of cellulose fiber is clearly seen. After modified through polymerization of aniline, the PAni particles were found as observed in Fig. 6b. Moreover, the width of Cel-g-PAni fiber was larger than that of cellulose. This may be proposed that PAni also covered the surface of cellulose fiber. The PAni particle and PAni covered cellulose fiber may provide the active sites for the adsorption of dyes.

Fig. 6
figure 6

SEM images for the samples a cellulose, b Cel-g-PAni

Evaluation of the dye adsorption

The pH plays a significant role on the adsorption of an adsorbent. The pH of the colorant solution affects not only the surface charge of the adsorbent, i.e., cellulose and Cel-g-PAni, but also the degree of ionization of the dye. In this work, effect of pH on the adsorption of cationic dye and anionic dye was investigated.

The adsorption of cationic dye

In this study, the adsorbent, i.e. cellulose or Cel-g-PAni was added into the solution of MB 1.5 mmol/L. Table 2 shows the relationship between pH and the adsorbing capacity of cellulose and Cel-g-PAni toward MB. It was found that the Cel-g-PAni exhibits the outstanding adsorption performance in basic medium of which pH is higher than 7. It achieved the maximum adsorbing capacity of MB at pH 8. This result was due to the characteristic of Cel-g-PAni adsorbent and MB adsorbate. In basic pH, PAni occurs in a form of base with no charge, and MB is dissociated in aqueous media as follow:

Table 2 The adsorbing ability of Cel-g-PAni and cellulose toward MB at various values of pH
figure a

Through the electrostatic attraction between the nitrogen atom with negative charge density of Cel-g-PAni and the dye cation, the adsorption process occurs. However, it was noted that a stronger basic medium caused the decrease in adsorbing capacity of Cel-g-PAni. This may be explained that when concentration of OH is high, the electrostatic interaction between dye cation and hydroxyl anion (OH) occurs, which results in a lesser positive charge density of dye cation. In other hand, PAni in acid medium is in a form of salt which has positive charge. Therefore, it is difficult to adsorb MB dye cation due to the electrostatic repulsion. In this study, the optimal pH for the adsorption of Cel-g-PAni toward MB was pH = 8.

To study the equilibrium adsorption isotherm of Cel-g-PAni, the Langmuir and Freundlich models were used. The MB solutions with various initial concentrations was subjected to the adsorption experiment with Cel-g-PAni. The concentration at equilibrium was measured, then the adsorbing capacity was calculated. Table 3 shows the initial concentration and concentration at equilibrium of MB solutions, and adsorbing capacities of Cel-g-PAni at pH = 8.

Table 3 Initial concentration and concentration at equilibrium of MB solutions, and adsorbing capacities of Cel-g-PAni

The equation for Langmuir adsorption isotherm is

$$ \frac{{C_{e} }}{a} = \frac{1}{{a_{m} K_{L} }} + \frac{{C_{e} }}{{a_{m} }} $$
(4)

the equation for Freundlich adsorption isotherm is

$$ lna = lnK_{F} + \frac{1}{n}lnC_{e} $$
(5)

where a (mmol/g) is adsorbing capacity of Cel-g-PAni; Ce (mmol/L) is the concentration of colorant at equilibrium; KL (L/mmol) and am (mmol/g) is the Langmuir isothermal constants of the adsorption equilibrium and the extent of adsorbing capacity, respectively. KF and n is the Freundlich isothermal constants.

The adsorption isotherms of MB according to the Langmuir and Freundlich models are displayed in Fig. 7. The equation and correlation coefficients (R2) associated to each model were determined. It was found that the R2 of the Langmuir model (0.9961) was larger than the R2 of the Freundlich model (0.9675). The result may indicate that the Langmuir model was more suitable for describing the adsorption of Cel-g-PAni toward MB. Furthermore, in the case of Langmuir model, it was assumed that the MB adsorbate formed a monolayer on Cel-g-PAni surface, and the Cel-g-PAni had homogeneous adsorption sites on the surface.

Fig. 7
figure 7

Plots for the adsorption of Cel-g-PAni toward MB: a Freudlich model, b Langmuir model

The Langmuir equation for the adsorption of Cel-g-PAni toward MB can be expressed as follow:

$$ \frac{{C_{e} }}{a} = 0.0274 + 0.6319C_{e} $$
(6)

If 0.0274 is identical to \(\frac{1}{{a_{m} K_{L} }}\), and 0.6319 is identical to\(\frac{1}{{a}_{m}}\), it is found that: am = 1.57 (mmol/g) and KL = 23.320 (L/mmol). Compared to the Langmuir isothermal constants of other materials reported in literature, the result in this study confirms that Cel-g-PAni is a good adsorbent for MB (El Qada et al. 2006; El-Khaiary 2007; Hong et al. 2009).

The adsorption of anionic dye

In this study, the adsorbent, i.e. cellulose or Cel-g-PAni was added into the MO solution of 0.8 mmol/L. Table 4 tabulated the adsorbing capacity of cellulose and Cel-g-PAni toward MO at various values of pH. It was found that the adsorption performance of Cel-g-PAni was superior in acid medium compared to that of Cel. This result was explained based on the characteristic of Cel-g-PAni and MO. In acid medium, PAni occurs as a form of salt with positively charged nitrogen atoms, and MO is dissociated in aqueous media as follow (Table 5):

Table 4 The adsorbing ability of Cel-g-PAni and cellulose toward MO at various values of pH
Table 5 Initial concentration and concentration at equilibrium of MO solutions, and adsorbing capacities of Cel-g-PAni
figure b

The electrostatic attraction between positive charge in nitrogen atom of Cel-g-PAni and anionic dye caused the adsorption. However, at low pH, for instance pH = 3, the nitrogen atom in MO may be protonated, which forms positive charges in MO. Therefore, the electrostatic repulsion between MO adsorbate and Cel-g-PAni adsorbent occurs. Consequently, when pH was low, the adsorbing capacity of Cel-g-PAni toward MO reduced. When adsorbing capacity of Cel-g-PAni toward MB and MO at optimal pH was compared, it was found that the MB adsorbing capacity was higher than the MO adsorbing capacity. This phenomenon may be associated to the characteristic of the surface of Cel-g-PAni. The density of negative charge of Cel-g-PAni in basic pH is probably higher than that of positive charge of Cel-g-PAni in acid pH.

The MO solutions with various initial concentrations was subjected to the adsorption experiment with Cel-g-PAni. Table 3 shows the initial concentration and concentration at equilibrium of MO solutions, and adsorbing capacities of Cel-g-PAni at pH = 4.

The adsorption isotherms of MO according to the Langmuir and Freundlich models are displayed in Fig. 8.

Fig. 8
figure 8

Plots for the MO adsorption of Cel-g-PAni: a Freudlich model, b Langmuir model

The adsorption isotherms of Cel-g-PAni toward MO according to the Langmuir and Freundlich models are displayed in Fig. 8. It was found that the R2 of the Langmuir model (0.9999) was very close to 1, whereas the R2 of the Freundlich model (0.9576) which is far from 1. This result suggested that the adsorption of Cel-g-PAni toward MO was suitable for the Langmuir model. It implied that Cel-g-PAni had homogeneous adsorption sites for MO on the surface.

The Langmuir equation for the adsorption of Cel-g-PAni toward MO can be expressed as follow:

$$ \frac{{C_{e} }}{a} = 0.0377 + 1.3349C_{e} $$
(7)

When 0.0377 is identical to \(\frac{1}{{a_{m} K_{L} }}\), and 1.3349 is identical to \(\frac{1}{{a_{m} }}\), it is found that: am = 0.75 (mmol/g) and KL = 35.37 (L/mmol). The extent of adsorbing capacity of Cel-g-PAni toward MO was lower than that toward MB. However, this value is larger than that of most of the traditional adsorbents as reported in literature (Liu et al. 2015; Shah et al. 2021).

The simultaneous adsorption of cationic and anionic dyes

In practical, the dye wastewater effluent contained both cationic and anionic dyes. Therefore, we investigated the adsorption of Cel-g-PAni toward a mixture of anionic and cationic dyes. In this study, Cel-g-PAni was added into the solution of MB 1.5 mmol/L and MO 0.8 mmol/L. The adsorbing capacities of Cel-g-PAni toward colorants at different pH were shown in Table 6. Interestingly, the adsorbing capacities of MB in the presence of MO were quite identical that of MB in the absence of MO. Likewise, the adsorbing capacities of MO in the presence of MB were quite identical to that of MO in the absence of MB. In other word, the adsorptions of Cel-g-PAni toward MB and MO may be independent. The adsorption of cationic and anionic dyes did not affect each other. Therefore, Cel-g-PAni is an efficient adsorbent for a mixture of anionic and cationic dyes in practical.

Table 6 The adsorbing ability of Cel-g-PAni and cellulose in the mixture solution of MB and MO at various values of pH

Conclusion

The adsorbent based on cellulose and PAni was prepared through polymerization of aniline in cellulose emulsion in the presence of APS as initiator. The PAni was found to coat on cellulose fiber. PAni caused the increase in porosity of cellulose and acted as the adsorption site for MO and MB. The adsorption isotherms of Cel-g-PAni toward MB and MO are suitable for Langmuir model, which suggested that the material had homogeneous adsorption sites for the dyes on the surface. The optimal pH for the adsorption of MB and MO was 8 and 4, respectively. At the optimal pH, the extent of adsorbing capacity of Cel-g-PAni toward MB and MO was 1.57 and 0.75 mmol/g, respectively. In the mixture solution of MB and MO, adsorptions of Cel-g-PAni toward MB and MO was found to be independent. These values indicated that Cel-g-PAni was an efficient absorbent for dyes in practical.