Polyaniline as a Nitrogen Source and Lignosulfonate as a Sulphur Source for the Preparation of the Porous Carbon Adsorption of Dyes and Heavy Metal Ions

Using agricultural and forestry wastes as raw materials, adsorbent materials were prepared for dye adsorption in wastewater, which can minimize the environmental load and fully realize sustainability by treating waste with waste. Taking lignosulfonate as a raw material, due to its molecular structure having more reactive groups, it is easy to form composite materials via a chemical oxidation reaction with an aniline monomer. After that, using a sodium lignosulfonate/polyaniline composite as the precursor, the activated high-temperature pyrolysis process is used to prepare porous carbon materials with controllable morphology, structure, oxygen, sulfur, and nitrogen content, which opens up a new way for the preparation of functional carbon materials. When the prepared O-N-S co-doped activated carbon materials (SNC) were used as adsorbents, the adsorption study of cationic dye methylene blue was carried out, and the removal rate of SNC could reach up to 99.53% in a methylene blue solution with an initial concentration of 100 mg/L, which was much higher than that of undoped lignocellulosic carbon materials, and the kinetic model conformed to the pseudo-second-order kinetic model. The adsorption equilibrium amount of NC (lignosulfonate-free) and SNC reached 478.30 mg/g and 509.00 mg/g, respectively, at an initial concentration of 500 mg/L, which was consistent with the Langmuir adsorption isothermal model, and the adsorption of methylene blue on the surface of the carbon material was a monomolecular layer. The adsorption of methylene blue dye on the carbon-based adsorbent was confirmed to be a spontaneous and feasible adsorption process by thermodynamic parameters. Finally, the adsorption of SNC on methylene blue, rhodamine B, Congo red, and methyl orange dyes were compared, and it was found that the material adsorbed cationic dyes better. Furthermore, we also studied the adsorption of SNC on different kinds of heavy metal ions and found that its adsorption selectivity is better for Cr3+ and Pb2+ ions.


Introduction
The scarcity of forest resources has become a global environmental and energy problem.Forests are important ecosystems on Earth, maintaining the global ecological balance and providing a large amount of raw materials for human life [1].With the increase in population, part of the forest land is transformed into agricultural land and other types of land, and a large number of trees are cut down, resulting in the reduction of forest resources.The total area of global forests was 4128 million hectares in 1990, and it was reduced to 3999 hectares in 2015 [2].The development of inexhaustible biomass resources and bio-based new materials has become an important way to solve the forest resources crisis faced by modern society [3].Lignocellulose is an extremely rich renewable resource on Earth, and its total carbon accounts for about 30% of the global organic carbon [4].The main components of lignocellulosic fibers are cellulose, hemicellulose, and lignin, of which lignin has the most complex structure and is an amorphous, cross-linked threedimensional network macromolecule [5].Lignin is rich in renewable natural aromatic biopolymers, and it has many functional groups in its structure, such as phenolic hydroxyl, alcoholic hydroxyl, carbonyl, and methoxyl, so it can not only be used as an alternative raw material for aromatic chemical products but also has a great potential for development in many fields [6,7].Porous carbon materials with a large specific surface area, highly developed pore structures, and good thermal stability are easy to mass-produce and widely used in energy storage, adsorption, and other fields [8,9].Activated carbon synthesized from natural carbon sources such as biomass, biomass waste, and industrial waste has been a hot research topic in recent years due to the high availability of raw materials [10].The paper industry produces a large amount of industrial waste lignosulfonate every year.With up to 60% carbon, lignin also has high aromaticity, high calorific value, and abundant active sites, which makes it an ideal carbon source for constructing activated carbon [8].Qu et al. [11] reported a method to transform lignin into pore-rich foamy carbon via heating only, and the resulting lignin-derived carbon has a bulk density of up to 0.62 g•cm −3 with excellent strength properties.Silva et al. [12] selected lignin residual from the second-generation ethanol process as a raw material and prepared it into activated carbon using the chemical activation method.This lignin-based activated carbon is the only activated carbon that can remove bromocresol green and also has excellent adsorption performance for methylene blue (MB) and methyl red dyes, with removal rates of 96.8% and 94.1%, respectively.Polyaniline (PANI) is a polymer made through the reaction of aniline in aqueous hydrochloric acid and ammonium persulfate.It is simple to synthesize, environmentally friendly, and also possesses unique redox behavior, significant electrical conductivity, corrosion resistance, high-temperature resistance, and easy to blend with other materials [13].The structural composition of PANI's electronic group, amino group, and its imide derivatives provide it with significant chelating properties.In addition, its high specific surface area and porosity, the coexistence of benzoquinone ring, hole conducting nature, and positive charge acquired during protonation are important factors for its excellent dye adsorption capacity [14].Nerka et al. [15] prepared PANI/ZnO nanocomposites using in situ polymerization for the removal of methyl orange dye.The experimental results showed improved removal of methyl orange from this composite as compared to pure ZnO nanoparticles and pure PANI.
Reactive dyes are often used in various industrial production, such as clothing [16], paper printing [17], leather [18], and cosmetics [19].With the rapid development of industrial technology, there has been an exponential growth of polluted wastewater containing large amounts of residual dyes and dyeing aids [20].Dyes are severely toxic, carcinogenic, and adversely affect human and animal health when entering water bodies, and their complex molecular structure makes them difficult to degrade [21].Heavy metal pollution is also one of the important factors leading to pollution and shortage of water bodies.These heavy metal ions present in water are difficult to convert into non-toxic and non-hazardous substances using biodegradation as compared to organic pollutants [22].Heavy metals in water can be easily absorbed by living organisms and then enter the food chain and accumulate in the organisms, thus threatening the life and health of the organisms [23].Therefore, how to manage industrial wastewater containing reactive dyes and metal ions has become an important proposition facing the world.Carbon materials, with a high specific surface area and special surface chemistry, show excellent pollutant adsorption capacity in wastewater treatment [24].Compared to ordinary carbon materials, carbon materials doped with heteroatoms increase the chemisorption of carbon materials due to the increased surface defects and chemically active sites of the material [25].Heteroatom-doped carbon materials have better adsorption properties and can be well used for the adsorption and separation of various pollutants.Based on this, Shi et al. [26] proposed to prepare a novel Cu/N doped modified lignin adsorbent by reacting lignin with triethylenetetramine and CuCl 2 as raw Polymers 2023, 15, 4515 3 of 16 materials, and the adsorption amount of As(V) was 253.5 mg/g.This suggests that the pollutant adsorption capacity of the lignin carbon material can be effectively enhanced by doping with the heteroatoms N. In this work, nanostructured lignin/polyaniline complexes were successfully prepared from lignin using a simple and controllable chemical oxidative polymerization method and used as prepolymers and porous oxygen/nitrogen/sulfur co-doped activated carbon materials were prepared via KOH activation and carbonization.The effects of the preparation conditions on the morphology, structure, and properties of the products were explored, and the adsorption properties of dyes from lignin/polyaniline porous carbon materials were investigated.In particular, we also used SNC to test the adsorption capacity of different dye molecules for different heavy metal ions.

Synthesis of Adsorbent Materials
The carbon material used for adsorption was obtained via two-step calcination, and we prepared an oxygen/nitrogen/sulfur co-doped carbon material for the adsorption of dyes and heavy metal ions using polyaniline as the N source and lignosulfonate as the S source, and the specific steps and processes are shown in Figure 1.
Polymers 2023, 15, x FOR PEER REVIEW 3 of 16 adsorption and separation of various pollutants.Based on this, Shi et al. [26] proposed to prepare a novel Cu/N doped modified lignin adsorbent by reacting lignin with triethylenetetramine and CuCl2 as raw materials, and the adsorption amount of As(V) was 253.5 mg/g.This suggests that the pollutant adsorption capacity of the lignin carbon material can be effectively enhanced by doping with the heteroatoms N. In this work, nanostructured lignin/polyaniline complexes were successfully prepared from lignin using a simple and controllable chemical oxidative polymerization method and used as prepolymers and porous oxygen/nitrogen/sulfur co-doped activated carbon materials were prepared via KOH activation and carbonization.The effects of the preparation conditions on the morphology, structure, and properties of the products were explored, and the adsorption properties of dyes from lignin/polyaniline porous carbon materials were investigated.In particular, we also used SNC to test the adsorption capacity of different dye molecules for different heavy metal ions.

Synthesis of Adsorbent Materials
The carbon material used for adsorption was obtained via two-step calcination, and we prepared an oxygen/nitrogen/sulfur co-doped carbon material for the adsorption of dyes and heavy metal ions using polyaniline as the N source and lignosulfonate as the S source, and the specific steps and processes are shown in Figure 1.Firstly, we prepared lignosulfonate/polyaniline composites in a previous stage [27], and then, the composite was pre-carbonized.The composites were vacuum-dried for 12 h, placed in a tube furnace under a nitrogen atmosphere at 400 °C for carbonization, and kept for 1.5 h.The carbonized product was ground to powder using mortar and pestle.
Next, carbon materials were activated with KOH.The KOH and carbon material mass ratio was a 1:1 mix, to which distilled water was added and stirred to a uniform solution and then dried to a solid.It was heated to 700 °C in a tube furnace at a 5 °C/min heating rate under inert gas and carbonized for 2 h.The carbonization of the product was washed with weakly acidic 1 M HCl and then rinsed several times with distilled water.The product of carbonization was pulverized to a powder using a mortar and pestle, after Firstly, we prepared lignosulfonate/polyaniline composites in a previous stage [27], and then, the composite was pre-carbonized.The composites were vacuum-dried for 12 h, placed in a tube furnace under a nitrogen atmosphere at 400 • C for carbonization, and kept for 1.5 h.The carbonized product was ground to powder using mortar and pestle.
Next, carbon materials were activated with KOH.The KOH and carbon material mass ratio was a 1:1 mix, to which distilled water was added and stirred to a uniform solution and then dried to a solid.It was heated to 700 • C in a tube furnace at a 5 • C/min heating rate under inert gas and carbonized for 2 h.The carbonization of the product was washed with weakly acidic 1 M HCl and then rinsed several times with distilled water.The product of carbonization was pulverized to a powder using a mortar and pestle, after which it was dried until a constant mass was obtained.Finally, the O/N/S co-doped porous carbon material was obtained.When the carbonization temperatures were 700 • C, they were labeled SNC, and the undoped lignin was NC [28].SNC was chosen as the adsorbent material, and NC was used as the control group.

Characterization
The surface morphology of SNC and SNC after adsorption of dyes and the elemental distribution of EDS were observed using a field emission scanning electron microscope (SEM, FEI Quanta 200, Hillsboro, OR, USA).X-ray photoelectron spectroscopy (XPS, AXIS Ultra DLD, Kratos, Manchester, UK) was used to investigate the surface chemical properties of SNC and SNC after the adsorption of dyes, including the relative content of elements as well as the type and relative content of chemical functional groups.The surface chemistry of SNC and SNC after dye adsorption was investigated, including the relative elemental content as well as the type and relative content of chemically functional groups.The specific surface area and pore size distribution of SNC were calculated by measuring the nitrogen adsorption-desorption isotherms using Brunner-Emmett-Taylor analysis (BET, QUADRASORB-EVO, Quantachrome Instruments, Boynton Beach, FL, USA).The physical structure of SNC is shown in the Supplementary Materials Figure S1 [28].
Adsorption methods are described in the Supplementary Materials.The adsorption processes and mechanisms are explained via kinetic, isothermal, and thermodynamic modeling fits and combinations [29,30].
The adsorbed amount of the dye and the rate of removal were calculated according to the following Equations ( 1) and (2).
Thermodynamic adsorption experiment: A single variable method was adopted.A total of 0.1 g of methylene blue dye was dissolved in 1000 mL of distilled water to prepare a 100 mg/L stock solution, diluted into different initial concentrations (50,100,150,200,250,300,350, 400, 500, 600, 700, and 800 mg/L) of methylene blue solution.Weighed 10 mg of the materials NC700 and SNC700, respectively.Accurately weighed 10 mg of material NC700 and SNC700 were placed in 25 mL of MB solution, respectively, and the adsorption was carried out via oscillation in a thermostatic oscillator at a vibration rate of 150 rpm/min for 1 h.Afterward, the adsorption was carried out in the methylene blue solution with an initial concentration of 200 mg/L in a thermostatic oscillator at 85 • C, 70 • C, 55 • C, 40 • C, 25 • C, and 10 • C (i.e., 358, 343, 328, 313, 298, and 283 K) with a vibration speed of 150 rpm/min.The adsorption was carried out in a constant temperature oscillator at an oscillation speed of 150 rpm/min for 1 h.In all the above samples, the absorbance after adsorption was measured, and the corresponding adsorption concentration was calculated from the standard curve (Figure S4).Kinetic adsorption experiment: A total of 10 mg of the material was weighed and placed in 25 mL of MB solution with an initial concentration of 200 mg/L and placed in a thermostatic oscillator at 25 • C with a vibration speed of 150 rpm/min for adsorption for 10, 20, 40, 60, 80, 100, and 120 min, respectively.Then, the absorbance after adsorption was measured, and the corresponding adsorption concentration was calculated from the standard curve.The adsorption amount and removal rate of the dye were calculated according to the following Equations ( 1) and (2).
Rhodamine B, Congo red, and methyl orange have the same adsorption principle and similar steps.As shown in Figure S2, the maximum absorption wavelength of methylene blue is 664 nm, the UV absorption wavelength of Congo red is 488 nm, the maximum absorption peak of MO is about 466 nm, and the absorbance at the maximum wavelength of rhodamine B is 492 nm.
Desorption after SNC adsorption: After 2 h of adsorption, the solids were filtered to obtain a sample of the SNC adsorbed dye, and the SNC carbon material with adsorbed dye was treated with 25 mL of 0.1 mol/L HCl and 10% ethanol solution to wash away the dye stored in the SNC.The desorption rate (Des) of the dye was calculated as (Equation ( 3)): Adsorption of heavy metals: In the first stage, the samples were placed in a Pb 2+ standard solution (which can be diluted to different concentrations according to the actual situation) for adsorption.Then, the Cr 3+ , Pb 2+ , Ni 2+ , Cu 2+ , Zn 2+ , and Cd 2+ concentration in the supernatant was detected using an inductively coupled plasma mass spectrometer (ICP-MS, iCAP RQ, Thermo Scientific, Dreieich, Germany).To ensure accuracy, each experiment was conducted three times.The formula for the adsorption capacity Q e (mg/g) of LS/PANI can be calculated with reference to that of the dye above.

Effect of Time on Adsorption Performance and Adsorption Kinetic Study
Kinetic studies help understand the optimum time when adsorption equilibrium is reached, which is important in analyzing the adsorption mechanism.The efficiency of an adsorbent depends not only on the adsorption capacity but also on the rate of uptake of pollutants from wastewater.
The kinetics of the two dyes were further investigated based on the data from the pseudo-first-order model and pseudo-second-order kinetic model, which are shown in Equations ( 4) and ( 5), respectively.Based on the pseudo-first-order kinetic model and the pseudo-second-order kinetic model, respectively, the experimental data were processed using a linear fitting method to analyze the adsorption process of the SNC material.
Pseudo-first-order kinetic model: ln(q e − q t ) = ln q e − k 1 t where q e -equilibrium adsorption amount, mg/g; k 1 -adsorption rate constant, min −1 ; q t -adsorption amount at time t, mg/g.Pseudo-second-order kinetic model: where q e -equilibrium adsorption amount, mg/g; k 2 -adsorption rate constant in this model, g/mg/min; q t -adsorbed amount per unit mass of adsorbent at any adsorption time t, mg/g.
Particle diffusion equation: Adsorption time is an important parameter to study the adsorption kinetics.In a MB solution, with the increase in adsorption time, the removal rate and adsorption amount of MB increased gradually.The removal rate of the dye could reach 90.41%, whereas the removal rate of NC could only reach 84.42% (Figure 2a,b).Through the study of kinetic model parameters in Table 1, the pseudo-second-order kinetic model of SNC (R 2 ≥ 0.97) fitted better than the pseudo-first-order kinetic model (R 2 ≥ 0.82), and the actual adsorption amount did not differ much from the pseudo-second-order kinetic theoretical adsorption amount (453.42 mg/g), and the linear fitting to the pseudo-second-order kinetic data as shown in Figure 2c, the correlation coefficient was still above 0.99.This result suggests that Polymers 2023, 15, 4515 6 of 16 this adsorption process is chemisorption.MB is a cationic molecule, and the adsorption on carbon is carried out through the processes of electrostatic interaction, hydrogen bond formation, electron donor-acceptor relationship, and π-π electron dispersive force between functional groups on the surface of carbon and MB molecules.In addition to the specific surface area and porosity of the carbon adsorbent, groups such as aromatic rings, -C=O, -C-O-C-, -OH, -NH 2 , -C=S, -C=N, -S=O, and so on, play an important role in enhancing the adsorption capacity of MB in water [31,32].It is known that the synthesized SNC materials have most of the groups such as -C=O, -C=S, and -C=N, which can form chemical bonds with dye molecules.
Polymers 2023, 15, x FOR PEER REVIEW 6 of 16 amount did not differ much from the pseudo-second-order kinetic theoretical adsorption amount (453.42 mg/g), and the linear fitting to the pseudo-second-order kinetic data as shown in Figure 2c, the correlation coefficient was still above 0.99.This result suggests that this adsorption process is chemisorption.MB is a cationic molecule, and the adsorption on carbon is carried out through the processes of electrostatic interaction, hydrogen bond formation, electron donor-acceptor relationship, and π-π electron dispersive force between functional groups on the surface of carbon and MB molecules.In addition to the specific surface area and porosity of the carbon adsorbent, groups such as aromatic rings, -C=O, -C-O-C-, -OH, -NH2, -C=S, -C=N, -S=O, and so on, play an important role in enhancing the adsorption capacity of MB in water [31,32].It is known that the synthesized SNC materials have most of the groups such as -C=O, -C=S, and -C=N, which can form chemical bonds with dye molecules.As shown in Figure 2d, using the intra-granular diffusion model to analyze the possible diffusion mechanism of carbon materials, the results from the data parameters in Table 2 can show that the adsorption process is a segmented linear relationship, including two main stages: the first stage is for the membrane diffusion stage of the dye molecules, the curve rises faster, K are greater than K , for physical adsorption.The second stage is progressive adsorption, where the adsorption rate slows down and finally reaches the adsorption equilibrium.Each stage did not pass through the origin, indicating that the intra-granular diffusion is not the only quick-control step, and the adsorption process may involve other complex reactions.

Samples
Pseudo-First-Order Adsorption Kinetic Model Pseudo-Second-Order Adsorption Kinetic Model As shown in Figure 2d, using the intra-granular diffusion model to analyze the possible diffusion mechanism of carbon materials, the results from the data parameters in Table 2 can show that the adsorption process is a segmented linear relationship, including two main stages: the first stage is for the membrane diffusion stage of the dye molecules, the curve rises faster, K i1 are greater than K i2 , for physical adsorption.The second stage is progressive adsorption, where the adsorption rate slows down and finally reaches the adsorption equilibrium.Each stage did not pass through the origin, indicating that the intra-granular diffusion is not the only quick-control step, and the adsorption process may involve other complex reactions.Freundlich assumed that adsorption can occur through the formation of multilayers on the nonhomogeneous surface of the adsorbent.The equation of the Freundlich isothermal adsorption model (Equation ( 7)):

Samples
where Q e -equilibrium adsorption amount, mg/g; C e -equilibrium concentration, mg/L; K F -adsorption equilibrium constant; n-intensity factor.
Langmuir assumes that a monomolecular layer adsorption is formed on the surface of the adsorbent; furthermore, it also refers to the adsorption of only one molecule of adsorbent at an adsorption site, resulting in a decrease in intermolecular forces with increasing distance.This isotherm also assumes that the adsorbent surface is homogeneous with similar and potentially equivalent adsorption sites.Langmuir isothermal adsorption model equations (Equation ( 8)): where K L -Langmuir constant, L/mg; Q m is the maximum adsorption capacity per unit mass of adsorbent, mg/g.
Figure 3a shows that the adsorption amount increased rapidly to the adsorption equilibrium with the increase in the initial concentration of dye.At an initial concentration of 500 mg/L, the adsorption equilibrium amount reached 478.30 mg/g and 509.00 mg/g for NC and SNC, respectively.The initial tortuosity indicated that as additional sites are filled in the adsorbate, it increases the challenge for a solute molecule to find a usable vacancy site [33].However, this trend does not apply to all carbon adsorbents, where some of the high specific surface area carbons showed lower adsorption capacity, and the current adsorption was dominated by chemisorption.
Methylene blue adsorption isotherm is a component of thermodynamic adsorption.It describes the equilibrium relationship between the amount of MB adsorbed on NC and SNC adsorbed at a certain temperature and the amount adsorbed in the solution.Figure 3b,c were further linearly fitted to validate the model's reasonableness.When modeling the MB dye, the adsorption process is more in line with the Langmuir adsorption isothermal model, as can be seen from Table 3 correlation coefficients, where MB forms a homogeneous monolayer coverage on the surface of the carbon material, and there are no further interactions between adsorbent layers.In addition, Qm, which can also be calculated from Table 3, the value of dye adsorption using the Langmuir model was 671.78 mg/g, which is higher than that of NC, and the difference in the adsorption capacity may be attributed to the excellent pore size of SNC.The reason for the larger Qm may be that the adsorbent SNC has many carboxyl, sulfonate, amine, and phenyl functional groups, which can easily form electrostatic interactions, boosting the MB uptake capacity.It is, of course, possible that at higher MB dye concentrations, multilayer adsorption of MB is possible via stacking of planar molecules.The n values of the Freundlich isotherms are in the range of 2.97-3.19,which indicates that the adsorption of MB is a favorable process [34].Methylene blue adsorption isotherm is a component of thermodynamic adsorption.It describes the equilibrium relationship between the amount of MB adsorbed on NC and SNC adsorbed at a certain temperature and the amount adsorbed in the solution.Figure 3b,c were further linearly fitted to validate the model's reasonableness.When modeling the MB dye, the adsorption process is more in line with the Langmuir adsorption isothermal model, as can be seen from Table 3 correlation coefficients, where MB forms a homogeneous monolayer coverage on the surface of the carbon material, and there are no further interactions between adsorbent layers.In addition, Q m , which can also be calculated from Table 3, the value of dye adsorption using the Langmuir model was 671.78 mg/g, which is higher than that of NC, and the difference in the adsorption capacity may be attributed to the excellent pore size of SNC.The reason for the larger Q m may be that the adsorbent SNC has many carboxyl, sulfonate, amine, and phenyl functional groups, which can easily form electrostatic interactions, boosting the MB uptake capacity.It is, of course, possible that at higher MB dye concentrations, multilayer adsorption of MB is possible via stacking of planar molecules.The n values of the Freundlich isotherms are in the range of 2.97-3.19,which indicates that the adsorption of MB is a favorable process [34].From Figure 4a,b, it can be seen that the increasing temperature accelerated the adsorption rate of the carbon material and increased the adsorption amount, and the SNC adsorption amount reached 480.99 mg/g at 85 • C, and the removal rate also showed an increasing trend until 96.2%.According to Equations ( 9)-( 11), the summarized information of the thermodynamic parameters, as shown in Table 4, can be obtained.Since ∆G 0 < 0, ∆H 0 > 0, and ∆S 0 > 0 confirms that the adsorption of MB on the carbon-based adsorbent is a spontaneous and feasible adsorptive heat transfer process, and the reaction increases the disorder of the interface between the solid-liquid two-phase.The absolute values gradually increase, and the driving force for the adsorption of MB increases with increasing

Samples Langmuir Adsorption Isotherm Model Freundlich Adsorption Isotherm Model
Polymers 2023, 15, 4515 9 of 16 temperature.During adsorption, MB molecules are adsorbed from the solution onto the surface of the SNC.When MB molecules are adsorbed onto the surface of the adsorbent, the state of the system changes, and the number of states of the system associated with the dye molecules decreases since the adsorption sites on the surface of the SNC are limited.The adsorption process itself also leads to an increase in the disorder of the system, which results in an increase in entropy.
values gradually increase, and the driving force for the adsorption of MB increases with increasing temperature.During adsorption, MB molecules are adsorbed from the solution onto the surface of the SNC.When MB molecules are adsorbed onto the surface of the adsorbent, the state of the system changes, and the number of states of the system associated with the dye molecules decreases since the adsorption sites on the surface of the SNC are limited.The adsorption process itself also leads to an increase in the disorder of the system, which results in an increase in entropy.

The Applicability of SNC to the Adsorption of Various Pollutants and Cyclic Performance
In addition, the adsorption capacity of SNC for RhB, CR, and MO at equilibrium was 410.2, 323.6, and 375.4 mg/g, respectively, at an initial concentration of 500 mg/L.The adsorption performances of SNC for various cationic and anionic dyestuffs were very good, but the cationic dyestuffs were significantly better than the anionic dyestuffs.None of the differences in the adsorption capacity were very large, so the molecular structure and size of the dyes were the main reasons that would play a role.We also tested the adsorption capacity of SNC for various metal ions and organic dyes (Figure 5a,b).The adsorption capacities of SNC for Cr 3+ , Pb 2+ , Ni 2+ , Cu 2+ , Zn 2+ , and Cd 2+ were 28.7, 32.4,2.9, 7.9, 4.7 and 5.1 mg/g, respectively.It can be seen from these results that the SNC has strong adsorption capacity for Pb 2+ and Cr 3+ and presumably also has good selectivity.The amino group of

The Applicability of SNC to the Adsorption of Various Pollutants and Cyclic Performance
In addition, the adsorption capacity of SNC for RhB, CR, and MO at equilibrium was 410.2, 323.6, and 375.4 mg/g, respectively, at an initial concentration of 500 mg/L.The adsorption performances of SNC for various cationic and anionic dyestuffs were very good, but the cationic dyestuffs were significantly better than the anionic dyestuffs.None of the differences in the adsorption capacity were very large, so the molecular structure and size of the dyes were the main reasons that would play a role.We also tested the adsorption capacity of SNC for various metal ions and organic dyes (Figure 5a,b).The adsorption capacities of SNC for Cr 3+ , Pb 2+ , Ni 2+ , Cu 2+ , Zn 2+ , and Cd 2+ were 28.7, 32.4,2.9, 7.9, 4.7 and 5.1 mg/g, respectively.It can be seen from these results that the SNC has strong adsorption capacity for Pb 2+ and Cr 3+ and presumably also has good selectivity.The amino group of SNC is the critical base and can complex well with the boundary acid.Pb(II) has the lowest hydration energy and can bind stably with the amino group.It is also stated in the theory of HSBA that Cu 2+ , Pb 2+ , and Zn 2+ are the critical acids, Cd 2+ is the soft acid, and Cr 3+ is a hard acid [35].Therefore, SNC has better adsorption properties for Pb 2+ .The maximum values of adsorption per unit mass of lignin-based carbon material adsorbent reported in the recent literature are summarized in Table 5 [26,[36][37][38][39][40][41][42][43][44][45][46][47][48][49][50].As can be seen from Table 5, the values of dyes and heavy metals adsorbed in the present study are comparable to exceeded by other reported adsorbents of lignin-based carbon material.However, compared to MOF, porous polymers, and mesoporous silica, lignin/PANI-based carbon materials still have some shortcomings (e.g., in terms of specific surface area), but they have a wide range of functional groups that are beneficial for adsorption [51,52].The recycling performance of adsorbents in water purification processes is an evaluation indicator for the development of cost-effective processes in today's society.As shown in Figure 5c, we cycled the SNC adsorption/desorption four times and used 0.1 mol/L HCl and 10% ethanol as eluent [53], and the MB removal decreased from 90.2% to 76.4% after four cycles with good reusability.Therefore, SNC can be considered as an economical adsorbent.
polymers, and mesoporous silica, lignin/PANI-based carbon materials still have some shortcomings (e.g., in terms of specific surface area), but they have a wide range of functional groups that are beneficial for adsorption [51,52].The recycling performance of adsorbents in water purification processes is an evaluation indicator for the development of cost-effective processes in today's society.As shown in Figure 5c, we cycled the SNC adsorption/desorption four times and used 0.1 mol/L HCl and 10% ethanol as eluent [53], and the MB removal decreased from 90.2% to 76.4% after four cycles with good reusability.Therefore, SNC can be considered as an economical adsorbent.6a-e, the SEM surface morphology shows that the pore distribution of SNC is uniform and the porosity is high, and after the adsorption of MB, RhB, MO, and CR dyes on SNC, the surface morphology is filled with small molecules, and the pores are filled with small molecules as well.The elemental composition (C, N, O, and S) in SNC, SNC+MB, SNC+RhB, SNC+CR, and SNC+MO was investigated using EDS spectroscopy, as shown in Figure 7a-e.The content of O decreased from 11.4% to 8.3%, 5.1%, 4.9%, and 6.9% after adsorption, which may be attributed to the fact that the carbon material has more oxygen-containing functional groups in the lignin during the calcination process, and after adsorption of the dye molecules aggregated on the surface, and the dye molecules were less oxygenated.The contents of C, O, N, and S in SNC+MB were 79.7%, 8.3%, 8.2%, and 3.8%, respectively.The uniform distribution of dye on the adsorbed surface can be seen from the EDX (Figure 7).

Adsorption Mechanism and Physical Properties of MB and Pb 2+ by SNC
As shown in Figure 6a-e, the SEM surface morphology shows that the pore distribution of SNC is uniform and the porosity is high, and after the adsorption of MB, RhB, MO, and CR dyes on SNC, the surface morphology is filled with small molecules, and the pores are filled with small molecules as well.The elemental composition (C, N, O, and S) in SNC, SNC+MB, SNC+RhB, SNC+CR, and SNC+MO was investigated using EDS spectroscopy, as shown in Figure 7a-e.The content of O decreased from 11.4% to 8.3%, 5.1%, 4.9%, and 6.9% after adsorption, which may be attributed to the fact that the carbon material has more oxygen-containing functional groups in the lignin during the calcination process, and after adsorption of the dye molecules aggregated on the surface, and the dye molecules were less oxygenated.The contents of C, O, N, and S in SNC+MB were 79.7%, 8.3%, 8.2%, and 3.8%, respectively.The uniform distribution of dye on the adsorbed surface can be seen from the EDX (Figure 7).As shown in Figure 8a, the peaks of C, O, N, and S appeared in the XPS spectra of SNC, SNC+MB, SNC+RhB, SNC+MO, and SNC+CR, with the highest intensity of the oxygen peak in SNC, which is consistent with the EDS results.As shown in Figure 8b, there are five peaks in the C 1s XPS spectra of SNC: 8.7% in the C=N/C=O group at 288.1 eV, 20.3% in the C-O group at 285.9 eV, 14.7% in the C-N/C-H group at 285.3 eV, 50.3% in the C-C group at 284.8 eV, and 5.7% in the C=C group at 284.3 eV.As shown in Figure 8b, after the adsorption of MB, chemical reactions such as complexation and π-π conjugation occurred between some C atoms, resulting in significant changes in the peak area and binding energy of C 1s and a decrease in the C-C density.As shown in Figure 8c, there are four peaks in the XPS spectrum of N 1s of SNC: 43.4% of -N + = group at 401.1 eV, 37.8% of C-N group at 400.2 eV, 13.5% of -NH-group at 399.4 eV, and 5.4% of C=N group at 398.7 eV.As shown in Figure 8f, after the adsorption of MB, the -NH groups decreased, probably due to the hydrogen bonding between the -NH groups and MB.As shown in Figure 8d  As shown in Figure 8a, the peaks of C, O, N, and S appeared in the XPS spectra of SNC, SNC+MB, SNC+RhB, SNC+MO, and SNC+CR, with the highest intensity of the oxygen peak in SNC, which is consistent with the EDS results.As shown in Figure 8b, there are five peaks in the C 1s XPS spectra of SNC: 8.7% in the C=N/C=O group at 288.1 eV, 20.3% in the C-O group at 285.9 eV, 14.7% in the C-N/C-H group at 285.3 eV, 50.3% in the C-C group at 284.8 eV, and 5.7% in the C=C group at 284.3 eV.As shown in Figure 8b, after the adsorption of MB, chemical reactions such as complexation and π-π conjugation occurred between some C atoms, resulting in significant changes in the peak area and binding energy of C 1s and a decrease in the C-C density.As shown in Figure 8c, there are four peaks in the XPS spectrum of N 1s of SNC: 43.4% of -N + = group at 401.1 eV, 37.8% of C-N group at 400.2 eV, 13.5% of -NH-group at 399.4 eV, and 5.4% of C=N group at 398.7 eV.As shown in Figure 8f, after the adsorption of MB, the -NH groups decreased, probably due to the hydrogen bonding between the -NH groups and MB.As shown in Figure 8d, the O 1s XPS spectrum of SNC has three peaks: 61.2% of C=O groups at 532.8 eV, 34.7% of O-H groups at 531.4 eV, and 4.1% of C-O groups at 530.2 eV.As shown in Figure 8g, after the adsorption of MB, the density of O-H groups decreases from 34.7% to 25.8%, but that of C=O groups increases significantly from 61.2% to 41%.61.2% to 68.0%.The changes in the peak area and binding energy of -OH are due to the hydrogen bonding between -OH and -S, -NH, and N=N in MB [54]. Figure 8h shows the adsorption mechanism diagram of the presumed SNC adsorption of the dye MB and the heavy metal ion Pb 2+ [36].Due to the presence of lignosulfonates, the SNC has sulfonic acid groups and hydroxyl, amino, and carbonyl groups, and all of these functional groups are involved in the adsorption of Pb 2+ .Amino groups on the SNC will provide the active site for binding to metal ions.For example, Pb 2+ can be adsorbed onto the Figure 8h shows the adsorption mechanism diagram of the presumed SNC adsorption of the dye MB and the heavy metal ion Pb 2+ [36].Due to the presence of lignosulfonates, the SNC has sulfonic acid groups and hydroxyl, amino, and carbonyl groups, and all of these functional groups are involved in the adsorption of Pb 2+ .Amino groups on the SNC will provide the active site for binding to metal ions.For example, Pb 2+ can be adsorbed onto the SNC through N and O complexation with the amino, carboxyl, and hydroxyl groups.The carboxyl and hydroxyl groups can bind Pb 2+ by electrostatic attraction and ion exchange [36].Hydrogen bonding connections and π-π stacking also exist between MB and SNC.In addition, SNC has a high specific surface area (511 m 2 /g, Figure 8i), so there will be pore filling [28].In summary, the mechanisms of Pb 2+ adsorption via SNC include ion exchange, complexation, and electrostatic interaction, and the mechanisms of MB adsorption include π-π conjugation, pore filling, hydrogen bonding, and electrostatic attraction.

Conclusions
In this study, oxygen-nitrogen-sulfur co-doped porous carbon materials prepared from lignin were used as effective dye adsorbents to study the adsorption properties of MB dye.The optimum adsorption conditions for removing MB dye were as follows: adsorbent dosage of 10 mg, initial dye concentration of 500 mg/L, adsorption time of 120 min, and temperature of 85 • C. The adsorption of MB dye by nitrogen and sulfur co-doped porous carbon materials conformed to the Langmuir adsorption model and pseudo-second-order adsorption kinetic model and belonged to the monomolecular layer adsorption dominated via chemical adsorption.Moreover, we tested the adsorption performance of SNC on different dyes and heavy metal ions and found that SNC had the best adsorption effect on cationic dyes (MB, RhB), and the highest adsorption on Cr 3+ , Pb 2+ ions, which were 509.0 mg/g, 410.2 mg/g, 28.7 mg/g, and 32.4 mg/g, respectively.In addition, SNC also has good recycling performance and can be used as an effective adsorbent for removing organic dyes and heavy metal ions from water.

Supplementary Materials:
The following supporting information can be downloaded at https: //www.mdpi.com/article/10.3390/polym15234515/s1, Figure S1 S1: Organic dyes with different charge types and sizes; Table S2: Information on the molecular structure of different heavy metal ions.

Figure 1 .
Figure 1.Flow chart of SNC preparation and adsorption application.

Figure 1 .
Figure 1.Flow chart of SNC preparation and adsorption application.

Figure 2 .
Figure 2. (a) Influence of time on adsorption capacity of MB (the inset is a digital photo of the SNC before and after adsorption); (b) effect of time on removal rate of MB; (c) linear fitting of NC and SNC in pseudo-second-order dynamics of MB; (d) linear fitting diagram of NC and SNC intra-particle diffusion models.

Figure 2 .
Figure 2. (a) Influence of time on adsorption capacity of MB (the inset is a digital photo of the SNC before and after adsorption); (b) effect of time on removal rate of MB; (c) linear fitting of NC and SNC in pseudo-second-order dynamics of MB; (d) linear fitting diagram of NC and SNC intra-particle diffusion models.

Polymers 2023, 15 , 4515 8 of 16 ∆S 0 - 16 Figure 3 .
Figure 3. (a) Effect of initial concentration on adsorption capacity of MB; (b) linear fitting of Langmuir model in MB; and (c) linear fitting of Freundlich model in MB.

Figure 3 .
Figure 3. (a) Effect of initial concentration on adsorption capacity of MB; (b) linear fitting of Langmuir model in MB; and (c) linear fitting of Freundlich model in MB.

Figure 4 .
Figure 4. (a) Effect of temperature on adsorption capacity of MB; (b) effect of temperature on removal rate of MB; (c) and adsorption of MB InKd and 1/T curve diagram.

Figure 4 .
Figure 4. (a) Effect of temperature on adsorption capacity of MB; (b) effect of temperature on removal rate of MB; (c) and adsorption of MB InK d and 1/T curve diagram.

Figure 5 .
Figure 5. (a) Adsorption of different kinds of dyes by SNC; (b) adsorption of different kinds of heavy metal ions by SNC; (c) and cyclic performance of adsorption and desorption of SNC.

Figure 5 .
Figure 5. (a) Adsorption of different kinds of dyes by SNC; (b) adsorption of different kinds of heavy metal ions by SNC; (c) and cyclic performance of adsorption and desorption of SNC.

Figure 6 . 16 Figure 7 .
Figure 6.SEM images for SNC before and after adsorption of the dyes, (a) SNC; (b) SNC+MB; (c) SNC+RhB; (d) SNC+CR; and (e) SNC+MO.Polymers 2023, 15, x FOR PEER REVIEW 12 of 16 , the O 1s XPS spectrum of SNC has three peaks: 61.2% of C=O groups at 532.8 eV, 34.7% of O-H groups at 531.4 eV, and 4.1% of C-O groups at 530.2 eV.As shown in Figure 8g, after the adsorption of MB, the density of O-H groups decreases from 34.7% to 25.8%, but that
: (a) Raman spectra of SNC700; (b) XRD patterns of NC and SNC; Figure S2: Absorbance curves of MB, CR, MO, RhB; Figure S3: Absorbance curves of SNC before and after adsorption of four dyes; Figure S4: MB standard curve; Table

Funding:
This research was funded by the National Natural Science Foundation of China, grant number 32271797.Institutional Review Board Statement: Not applicable.Data Availability Statement: Data are contained within the article.

Table 1 .
NC and SNC kinetic model fitting parameters.

Table 1 .
NC and SNC kinetic model fitting parameters.

Table 2 .
Parameters of NC and SNC intra-particle diffusion models.

Table 3 .
Isotherm parameters of NC and SNC adsorption of MB.

Table 4 .
Thermodynamic parameters of NC and SNC adsorption of MB.

Table 5 .
Partial research progress on adsorption of dyes and heavy metal ions by lignin-based carbon material adsorbents.

Table 5 .
Partial research progress on adsorption of dyes and heavy metal ions by lignin-based carbon material adsorbents.