Introduction

In recent years, significant efforts have been made to address the pollution caused by industrial and human activities, which pose environmental hazards. Releasing toxic compounds such as heavy metals, chemicals, pharmaceuticals, and greenhouse gases into the environment harms human health and ecosystems [1,2,3]. Unfortunately, the emission of these pollutants is inevitable due to increased industrial activities and production to meet human needs. Therefore, the focus lies on reducing emissions and controlling pollution. Environmental pollution accounts for approximately 22% of diseases and 23% of deaths worldwide [1]. Among the crucial strategies to combat this issue, the removal and separation of environmental pollutants from aquatic, soil, and air environments play a vital role. Adsorption is a widely recognized method that is easy to implement, highly efficient, and cost-effective for removing and separating environmental pollutants [2]. Various materials are employed in the adsorption process, including porous carbon, metal-organic frameworks, zeolite, silica aerogel, and porous clay [4,5,6]. Porous carbon, in particular, garners significant interest due to its accessibility and the ability to utilize inexpensive materials for its preparation. It is one of the oldest and most essential adsorbents for purifying and adsorbing environmental pollutants [7].

Porous carbon refers to carbon-based materials with an enhanced internal pore structure. These materials are predominantly derived from various carbon-rich precursors. The critical attributes of porous carbon, including its large surface area, high porosity, and diverse pore structure consisting of micro, meso, and macro pores, along with functional groups on the carbon surface, enable its versatile applications, particularly in the environmental field. Functional groups such as oxygen, hydrogen, sulfur, and nitrogen atoms facilitate the adsorption of pollutants [8]. The preparation of porous carbon involves two stages: carbonization and activation. The carbonization stage is primarily aimed at removing volatile components. In contrast, the activation stage is crucial for enhancing the surface area and creating pores to improve the porosity of the carbon material. Three activation processes can be employed: physical, chemical, and physiochemical. In the physical activation process, the raw material undergoes carbonization in an inert gas like nitrogen or argon at temperatures ranging from 300 to 600 °C. Subsequently, the activation process takes place by introducing water vapor or carbon dioxide at temperatures between 700 and 900 °C [9]. Activation time, temperature, and the type of raw material are key factors influencing the properties of porous carbon in this process. However, this method has drawbacks such as high-temperature requirements, low efficiency, long processing time, high energy consumption, and limited surface area of the resulting product. Nevertheless, the absence of chemical agents and the environmentally friendly nature of this method without byproducts have made it more appealing from an environmental perspective [10]. In the chemical activation process, chemical agents like zinc chloride (ZnCl2), potassium hydroxide (KOH), sodium hydroxide (NaOH), and phosphoric acid (H3PO4) are utilized. This method is more straightforward than the physical activation, as carbonization and activation can be carried out simultaneously in a single step [11]. Chemical activation offers advantages such as lower process temperatures, shorter processing time, higher carbon yield, controllable porosity, and increased surface area [12, 13]. However, it has some disadvantages, including corrosion issues and the need for thorough washing steps [14]. Parameters affecting chemical activation include the type of activator, method of combination, weight ratio of activator to carbon precursor, and heating method [15, 16].

The physiochemical activation method lies between chemical and physical activation, combining some advantages and disadvantages of both approaches [17]. Among the chemical activators, KOH is considered the most effective, as it leads to the highest surface area [18]. Studies have shown that KOH prevents tar formation, facilitates the removal of non-carbonaceous materials, accelerates pyrolysis, and generates pores in the porous carbon structure [19, 20]. The pores formed in KOH-activated porous carbon result from KOH evaporation from occupied sites within the material. However, the yield of porous carbon produced by KOH activation is lower (10–40%) than other activating agents like ZnCl2 and H3PO4. Increasing the amount of potassium hydroxide leads to micropores on the carbon surface, while mesopores decrease due to the properties of KOH [21]. During the activation process, potassium infiltrates the carbon matrix, expanding existing pores and creating new ones through gasification reactions. Potassium penetrates the carbon matrix and during gasification (through the listed reactions), it causes expansion of existing pores and creation of new pores. As such, increasing potassium hydroxide concentration plays a key role in developing porosity in porous carbon. The mechanism of activation follows the reactions below:

$${\text{2KOH }} \to {\text{ K}}_{{\text{2}}} {\text{O }} + {\text{ H}}_{{\text{2}}} {\text{O}}$$
$${\text{C }} + {\text{ H}}_{{\text{2}}} {\text{O }} \to {\text{ H}}_{{\text{2}}} + {\text{ CO}}$$
$${\text{CO}} + {\text{H}}_{{\text{2}}} {\text{O}} \to {\text{H}}_{{\text{2}}} + {\text{CO}}_{{\text{2}}}$$
$${\text{K}}_{{\text{2}}} {\text{O }} + {\text{ CO}}_{{\text{2}}} \to {\text{ K}}_{{\text{2}}} {\text{CO}}_{{\text{3}}}$$

Achieving surface areas greater than 1000 m2/g typically requires a potassium hydroxide to precursor ratio of around 2–7. However, this increases the cost of material preparation and poses environmental hazards due to the use of concentrated alkali, necessitating carbon washing [22, 23]. Some researchers have explored alternative approaches to improve potassium distribution and enhance surface area and porosity. For example, Ludwinowicz and Jaroniec [24] incorporated potassium oxalate into a resorcinol-formaldehyde resin, followed by polymerization and heat treatment to produce porous carbon. Their results demonstrated that proper potassium distribution within the precursor structure increased surface area and porosity.

Liu et al. [25] studied the preparation of microporous carbon for CO2 adsorption by adding potassium carboxylate to glucose. They utilized a hydrothermal process and introduced carboxyl functional groups on glucose by adding acrylic acid. The researchers investigated the impact of acrylic acid on the surface area of the resulting porous carbon for CO2 adsorption. The hydrothermal method facilitated the formation of carboxyl functional groups on the hydrochar. The subsequent addition of potassium hydroxide led to the exchange of K+ ions in solution with H+ ions of the carboxyl functional groups. This process resulted in the formation of potassium carboxylate functional groups, which enhanced the distribution of potassium ions on the hydrochar. Performing activation after this step reduced the required amount of activating agent and mitigated the negative effects of chemical activation. The study highlighted the significance of potassium ion distribution in increasing the surface area of porous carbon by creating functional groups.

Lignin is recognized as the second most abundant natural polymer and the predominant phenolic polymer in nature. It is interconnected with cellulose in lignocellulosic biomasses through ether or ester bonds. Lignin, along with cellulose and hemicelluloses, forms the main cellular structure of lignocellulosic materials, featuring an amorphous three-dimensional structure composed of phenylpropane units. Lignin exhibits a complex cross-linked structure and contains functional groups such as aliphatic hydroxyl, phenolic hydroxyl, and methoxy groups, which influence its chemical properties and reactivity [26]. Lignin can be separated from the lignocellulosic matrix through various methods, but these procedures often result in structural changes and introduce structural heterogeneity. Industrial lignin types include Kraft lignin, organosolv lignin, soda lignin, and lignin derived from bioethanol production [27]. The utilization of these industrial lignin is gaining interest in various sectors due to their abundance, low cost, non-toxicity, and high carbon content. One notable application is the production of porous carbon materials, including hydrogels, aerogels, carbon fibers, and microporous carbon. These materials retain the fundamental properties of the precursor lignin in terms of structure and surface chemistry [28]. For instance, porous carbon derived from lignin exhibits a high surface area and porosity, possesses an ordered structure, and demonstrates strong adsorption capacity [29].

This study investigates the production of microporous carbon from lignin using an ion exchange process to improve potassium hydroxide distribution and minimize its usage as an activating agent. Furthermore, the study explores the potential use of the resulting microporous carbon as a cost-effective and eco-friendly adsorbent for lead metal adsorption.

Materials and Methods

Materials

Kraft lignin was procured from Sigma Aldrich Co. (USA), while acrylic acid, potassium persulfate, potassium hydroxide, and lead nitrate were obtained from Merck, Germany.

The Preparation of Porous Carbon

This section compares porous carbon samples prepared from lignin-acrylic acid copolymers with untreated pure lignin. The effect of varying the potassium hydroxide activating agent concentration on surface area, pore volume, and pore diameter was investigated. The preparation of porous carbon from lignin-acrylic acid copolymers involves several key steps:

First, 5 g of Kraft lignin was mixed with 200 mL of distilled water and varying ratios of acrylic acid (5–15 wt%). The mixture was stirred at 200 rpm for 1 h to ensure thorough mixing and initiate copolymerization. Next, 0.5 wt% potassium persulfate based on the acrylic acid content was added to initiate polymerization before hydrothermal treatment. The mixture was then transferred to a Teflon-lined autoclave and heated to 180 °C, with the duration depending on the acrylic acid concentration. After hydrothermal treatment, the copolymerized samples were combined with 20, 50 or 100 wt% potassium hydroxide. The samples were subsequently dried at 70 °C for 24 h. To carbonize the dried copolymer samples, they were powdered and pyrolyzed under nitrogen in a tube furnace. The temperature was increased stepwise up to 800 °C to decompose the material and form a porous carbon structure. Finally, the activated carbon samples were washed with 1 M HCl solution for 1 h to remove ash, followed by pH adjustment with distilled water washes. The samples were dried at 100 °C for 12 h. In contrast, the pure lignin samples did not undergo the copolymerization step before carbonization. The effect of these additional treatments on the final porous carbon properties was evaluated.

Structural Characterizations

The phosphorus-31 nuclear magnetic resonance (31P NMR) test was performed to measure the number of functional groups in the samples using a Bruker model 400 Hz AvanceCore device. The prepared samples were treated with 2-chloro-4,4,5,5-tetramethyl-1,3,2-dioxaphospholane (TMDP). For this, the sample (30 mg) was dissolved in dimethylformamide/pyridine (1:1 volume ratio) and then combined with 100 mL of a solution of N-hydroxy-5-norbornene-2,3-dicarboxylic acid imide (HONB, 20 mg/mL) and chromium (III) acetylacetonate (5 mg/mL) as an internal standard solution and the relaxation agent.

Fourier-transform infrared (FT-IR) spectroscopy was used to identify functional groups in the samples. Spectra were obtained in transmission mode on a PerkinElmer Spectrum1 spectrometer over the wavenumber range 1300 to 1700 cm−1.

X-ray diffraction (XRD) patterns were collected using a Philips PW1730 diffractometer with Cu Kα (λ = 1.54178 Å) radiation. Scans were performed from 10° to 70° 2θ with a step size of 0.04° and a counting time of 99.45 s per step.

Raman scattering spectra were acquired with a Teksan N1-541 spectrometer equipped with a 532 nm Nd:YAG laser. Spectra were collected over the range 4000−1000 cm−1 using a laser power of 0.7 mW and an integration time of 100 s.

To investigate the surface morphology of the microporous carbon samples that were synthesized, field emission scanning electron microscopy (FE-SEM) was employed. The analysis was conducted using a TESCAN model MIRAII instrument from the Czech Republic. The FE-SEM analysis included capturing images of the samples at two distinct magnification levels: 20,000 times (20 kx) and 140,000 times (140 kx). Throughout the examination, the FE-SEM instrument operated at an accelerated voltage of 15 kV.

Brunauer–Emmett–Teller (BET) Test

The BET test was conducted using a Belsorp device to analyze the samples. Before the test, the samples underwent a vacuum treatment at 120 °C for 1 h to eliminate any moisture present in the samples. Subsequently, the dried samples were placed inside the BET test device to perform the analysis. The BET test is commonly employed to determine the specific surface area of materials by measuring gas adsorption.

Adsorption Test

To perform the lead ion adsorption test, first 0.1 g of porous carbon powder was added to a beaker containing 100 mg/L lead metal solution. The pH was adjusted to 2, 5, 8, and 11 using buffer solutions. The mixture was stirred at 200 rpm for 2 h to allow adsorption. Afterward, the mixture was centrifuged at 9000 rpm to separate the liquid and solid phases. The supernatant was analyzed by atomic absorption spectroscopy using a PerkinElmer AAS2380 instrument to determine the residual lead concentration. Based on the results, pH 8 exhibited maximum lead removal efficiency and was selected as the optimal pH. Additional tests were performed with adsorbent doses (0.1, 0.2, 0.5, and 1 g) and initial lead concentrations (50 to 600 mg/L) at the optimal pH. A contact time study of up to 360 min was also conducted. The adsorption equilibrium data was used to develop isotherm models and determine parameters. The adsorption kinetics results were applied to kinetic models to elucidate the rate-controlling mechanisms. This systematic testing enabled comprehensive characterization of the lead adsorption behavior onto the microporous carbon adsorbent.

Adsorption Experiments

The optimal Pb2+ adsorption capacity of the microporous carbon was determined by optimizing experimental conditions, including pH, pollutant concentration, adsorbent dosage, and temperature. To analyze the adsorption isotherms, Langmuir, Freundlich, Temkin, and Dubinin-Radushkevich models were applied and related constants were calculated.

A 1000 mg/L Pb2+ stock solution was prepared by dissolving lead nitrate (Pb(NO3)2) in double distilled water. Desired concentrations ranging from 50 to 600 mg/L were obtained by diluting the stock solution as needed. A calibration curve (R2 = 0.99) was constructed using standards of 5, 10, 15 and 20 mg/L. An atomic absorption spectrophotometer with an accuracy of ± 0.1 mg/L was used to determine final Pb2+ concentrations after adsorption.

The effect of pH on adsorption was investigated by preparing four 50 mL solutions with pH 2, 5, 8 and 11 containing 100 mg/L Pb2+. These solutions were mixed with 0.5 g adsorbent in 100 mL flasks and agitated at 100 rpm for 6 h. The solid and liquid phases were separated by centrifugation and the residual Pb2+ in solution was measured.

The adsorption capacity at equilibrium and Pb2+ removal percentage (Re%) were calculated based on Eqs. 1 and 2:

$$q_{t} = \frac{{\left( {C_{0} - C_{e} } \right)V}}{m}$$
(1)
$$R_{e} \,\% = \left( {\frac{{C_{0} - C_{e} }}{{C_{e} }}} \right) \times 100$$
(2)

where qt (mg/g) is the adsorption capacity of microporous carbon for Pb2+ at time t (min), C0 and Ce (mg/L) are the liquid phase Pb2+ concentrations before and after adsorption. V (L) and m (g) are the adsorbate volume and the dry adsorbent weight used, respectively.

Adsorption Kinetics

The kinetic data was evaluated using pseudo-first-order, pseudo-second-order, Elovich, and intraparticle diffusion models. In Eq. 3 for pseudo-first-order kinetics, it is assumed the adsorption rate depends on adsorption capacity. In contrast, in the pseudo-second-order model (Eq. 4), adsorption is controlled by chemisorption involving valence forces from electron sharing or transfer between the adsorbent and adsorbate.

$$\log (q_{e} - q_{e} ) = {\text{log}}\left( {q_{e} } \right) - \frac{{k_{1} t}}{{2.303}}$$
(3)
$$\frac{t}{{q_{t} }} = \frac{1}{{k_{2} q_{e}^{2} }} + \frac{t}{{q_{e} }}$$
(4)

where qt and qe (mg/g) are the Pb2+ adsorbed per gram of adsorbent at time t (min) and equilibrium. k1 (1/min) and k2 (mg/(g.min)) are the rate constants of pseudo-first-order and pseudo-second-order models, respectively. The initial adsorption rate (h) can be calculated from the pseudo-second-order rate constant using:

$$h = k_{2} q_{e}^{2}$$
(5)

Adsorption Isotherms

Isotherm tests involved agitating 50 mL of Pb2+ solutions with concentrations of 50–600 mg/L and 0.5 g of microporous carbon for 360 min at pH 8 and 200 rpm. The Langmuir, Freundlich, Temkin, and Dubinin-Radushkevich isotherm models were used to describe the adsorbent’s characteristics. The linear forms of these models are given in Eqs. 6 and 10.

Langmuir linear model:

$$\frac{{C}_{e}}{{q}_{e}}=\frac{{C}_{e}}{{q}_{m}}+\frac{1}{{K}_{L}{q}_{m}}$$
(6)

  

Freundlich linear model:

$$log{q}_{e}=log{K}_{F}+\frac{1}{n}log{C}_{e}$$
(7)

 

Temkin linear model:

$$q=\frac{RT}{{B}_{T}}\text{l}\text{n}\left({K}_{T}c\right)$$
(8)

  

Dubinin–Radushkevich (D–R) linear model:

$$q={q}_{m}\text{exp}(-{\beta \epsilon }^{2})$$
(9)

  

Adsorption energy:

$$E=\frac{1}{\surd 2\beta }$$
(10)

  where Ce and qe are as defined before, qm (mg/g) is the maximum single-layer adsorption capacity, KL (L/mg) is the Langmuir constant related to the adsorption affinity, KF (mg/g)(L/mg)1/n and n are the Freundlich constants indicative of the adsorption capacity and adsorption intensity, respectively. R is the gas constant, T is temperature, Bt and Kt (L mg−1) are Temkin constants, β (kJ2 mol−2) is the D–R model energy constant, and ε (kJ mol−1) is the D–R adsorption potential. When E is less than 8 kJ mol−1, the adsorption is physical, and when 8 < E < 16 kJ mol−1, it is chemical adsorption.

Results and Discussion

31P NMR

The 31P NMR technique was utilized to quantify the concentrations of carboxyl, aliphatic hydroxyl, and phenolic hydroxyl functional groups in the lignin samples. This provides insight into the chemical changes induced by the hydrothermal process and acrylic acid modification. The pristine, unmodified lignin contains low levels of carboxyl groups (0.13 mmol/g) and abundant aliphatic and phenolic hydroxyls (Table 1). After hydrothermal treatment alone without acrylic acid, the carboxyl concentration decreases slightly to 0.08 mmol/g. This suggests some decarboxylation reactions are occurring to remove carboxyl groups. However, adding 5–15 wt% acrylic acid during the hydrothermal process leads to a substantial increase in carboxyl groups from 0.13 up to 0.25–0.28 mmol/g. This indicates the successful grafting of the acrylic acid monomers onto the lignin polymer backbone, resulting in the introduction of new carboxyl moieties derived from the acrylic acid repeating units. The reaction is facilitated by free radical polymerization initiated by potassium persulfate under high temperature and hydrothermal pressure conditions [30]. Meanwhile, the concentration of phenolic hydroxyl groups decreases gradually with increasing acrylic acid addition. This implies that phenolic hydroxyl sites on the lignin are likely involved in the grafting reaction as initiation sites for acrylic acid radical coupling. On the other hand, the aliphatic hydroxyl content remains relatively unchanged.

Table 1 Effect of acrylic acid addition on lignin functional groups during hydrothermal pretreatment as determined by 31P NMR

FT-IR

Figure 1 presents the FT-IR spectra of unmodified lignin and lignin copolymerized with varying amounts of acrylic acid (5%, 10%, and 15% AA). The broad band around 3400 cm−1 in all spectra indicates O–H stretching of phenolic and aliphatic groups, while the band around 2900 cm−1 corresponds to C–H stretching in methyl groups. The carbonyl peak at 1700 cm−1 in lignin and acrylated lignin arises from carbonyls conjugated with aromatic rings. Lignin’s aromatic skeleton is characterized by three peaks around 1591, 1518, and 1427 cm−1. The AA-lignin spectra exhibit new intense bands at 1558 and 1406 cm−1, attributed to carboxylic acids and symmetrical stretching of carboxylate anions (–COO–), demonstrating the incorporation of polyacrylic acid chains. Carboxylate formation results from acrylic acid grafting onto lignin via free radical polymerization, as proposed in the reaction mechanism. These peaks are absent in unmodified and hydrothermally treated lignin without AA, confirming acrylic acid’s role in introducing new carboxyls rather than hydrothermal degradation. Bands at 1510 and 1427 cm−1 in AA-lignin, assigned to lignin’s aromatic skeleton, indicate successful co-polymerization with poly acrylic acid. Furthermore, the 1038 cm−1 peak intensity, arising from non-etherified Ph-OH groups in lignin, decreases after AA modification, suggesting the participation of phenolic hydroxyls in the polymerization. In summary, the FT-IR spectra provide clear evidence for acrylic acid grafting onto lignin during hydrothermal treatment, as demonstrated by the characteristic carboxylate bands. Retention of lignin’s aromatic skeleton vibrations shows the polymeric structure remains intact after AA modification [31].

Fig. 1
figure 1

FT-IR spectroscopic analysis demonstrating carboxyl incorporation on lignin via hydrothermal acrylic acid copolymerization

The hydrothermal process conditions (high temperature and pressure) in the presence of potassium persulfate (KPS) initiator leads to homolytic cleavage of KPS to generate sulfate radicals (SO4−•) (Fig. 2). These highly reactive radicals can abstract hydrogen atoms from phenolic hydroxyl groups on the lignin polymer backbone, resulting in lignin phenoxy radicals. Simultaneously, under hydrothermal conditions, acrylic acid monomers dissociate to form acrylic acid radicals, which can propagate by reacting with additional monomers to generate growing polyacrylic acid radical chains. The lignin phenoxy radicals and multiplying polyacrylic acid radicals can then combine via radical recombination reactions, leading to the grafting of the polyacrylic acid chains onto the lignin polymer structure. This occurs by forming new carbon-.

Fig. 2
figure 2

Reaction of acrylic acid and lignin in the presence of potassium persulfate during the hydrothermal process

oxygen bonds between the acrylic acid units and the aromatic rings of the lignin. Overall, this radical-initiated graft polymerization mechanism enables direct introducing carboxyl groups from the acrylic acid monomer onto the lignin backbone in a one-step hydrothermal process mediated by potassium persulfate. The resulting carboxyl functionalities provide beneficial acidic sites for ion exchange reactions with potassium cations, improving subsequent activation with potassium hydroxide. This proposed free radical grafting mechanism offers a technical explanation consistent with the experimental evidence showing a successful acrylic acid modification of lignin to incorporate carboxyl groups during the hydrothermal pretreatment step. The introduced carboxyls facilitate more efficient downstream activation and production of high surface area microporous carbons from lignin.

BET

Table 2 presents the BET results of the microporous carbons prepared using varying percentages of acrylic acid. Including acrylic acid in the hydrothermal pretreatment step significantly improves the textural properties of the final microporous carbon produced through KOH activation of modified lignin. Remarkably, adding as little as 5% acrylic acid relative to the lignin weight leads to significant improvements in the BET surface area, total pore volume, and average pore diameter, resulting in a highly microporous material (Table 2). The introduction of acrylic acid grafting brings about a remarkable 119% increase in surface area, elevating it from 283 m2/g without acrylic acid to 619 m2/g with 5% acrylic acid grafting. This substantial enhancement can be ascribed to the carboxyl functional groups incorporated into the lignin polymer structure during the hydrothermal process. These carboxyl groups engage in ion exchange reactions with potassium cations, producing uniform dispersion of potassium carboxylate moieties. This optimized potassium distribution enables more efficient gasification and intercalation during KOH activation, leading to the generation of additional porosity and surface area. Moreover, the total pore volume doubles from 0.12 cm3/g without acrylic acid to 0.26 cm3/g with the 5% acrylic acid modification. The well-dispersed potassium carboxylate species created by the ion exchange reactions facilitate increased pore development as the KOH activation progresses. This is due to the ability of the exchanged potassium ions to penetrate and expand the carbon structure through intercalation and etching processes, resulting in higher porosity and pore volume. Furthermore, the average pore diameter decreases from the mesopore range at 1.72 nm without acrylic acid to microporous sizes of 1.67 nm with the addition of 5% acrylic acid. The abundant generation of microporosity is likely a result of the uniform dispersion of potassium ions, which leads to the creation of numerous small pores during KOH activation. The introduced carboxyl functional groups may also act as templates, promoting the formation of micropores. Generally, grafting acrylic acid onto lignin before KOH activation significantly improves the surface area, pore volume, and microporosity development. These enhancements optimize the textural properties of the synthesized microporous carbon material, making it well-suited for various applications, including adsorbents and other uses that benefit from high surface area and porosity.

Table 2 The effect of acrylic acid level on the surface area of the prepared porous carbon

Effect of Hydrothermal Time

The hydrothermal process serves multiple purposes in producing porous carbon materials, including grafting acrylic acid to introduce carboxyl groups and inducing structural changes in the lignin polymer. The duration of the hydrothermal treatment can have a significant impact on the properties of the resulting porous carbon after subsequent KOH activation. Table 3 displays the effects of extending the hydrothermal duration on the characteristics of the porous carbon. At a constant 5% acrylic acid level, increasing the hydrothermal time from 6 to 12 h leads to a slight increase in the BET surface area from 619 to 630 m2/g. Further extending the time to 18 h results in a more substantial enhancement, with the surface area reaching 800 m2/g. The pore volume also exhibits a gradually increases from 0.26 to 0.34 cm3/g as the hydrothermal time is prolonged. These improvements can be attributed to more extensive carbonization processes during longer hydrothermal reaction times. Carbon–carbon bonds are formed, while ether and hydrogen bonds are broken, increasing the carbon content and altering the chemical structure of the lignin precursor. This modified precursor is more conducive to developing high surface area and porosity during the subsequent KOH activation step. Furthermore, longer hydrothermal durations allow for more complete grafting of acrylic acid and the formation of higher concentrations of carboxyl functional groups. These effects collectively facilitate the activation process and enable the generation of microporous carbon materials with optimized textural properties. However, it is important to note that excessively long hydrothermal times may result in decomposition reactions that reduce the overall carbon yield.

Table 3 Impact of hydrothermal time on the surface area of porous carbon

Effect of Activating Agent

The ratio of the potassium hydroxide (KOH) activator to the lignin precursor plays a crucial role in determining porosity development during the synthesis of microporous carbons. Table 4 examines the effects of increasing the KOH to lignin ratio from 0.2 to 0.5 to 1. When using a KOH ratio of 0.2 (20% KOH), the acrylic acid-modified lignin achieves a surface area of 619 m2/g after activation. Remarkably, increasing the ratio to 0.5 (50% KOH) results in a significant enhancement, boosting the surface area to 1708 m2/g, accompanied by a substantial increase in pore volume from 0.26 to 0.82 cm3/g. However, further increasing the ratio to 1 (100% KOH) leads to a decline in surface area and pore volume. The enhancement observed at the 0.5 ratio is attributed to the optimized dispersion of potassium facilitated by the acrylic acid pretreatment. The introduction of abundant carboxyl groups onto the lignin structure enables excellent distribution of potassium through ion exchange, resulting in the formation of potassium carboxylates. This allows the 0.5 KOH level to intercalate and react, generating high porosity. At the 1 ratio, the effects of the acrylic acid are diminished. The higher concentration of KOH causes phase separation and heterogeneous migration of potassium, disrupting the uniform distribution. Consequently, the achievable activation is limited, exhibiting behavior similar to conventional KOH impregnation. Comparatively, testing an unmodified lignin sample at a 1 ratio without acrylic acid leads to significantly lower surface area (1146 m2/g) and pore volume (0.73 cm3/g) than the 0.5 ratio with acrylic acid (surface area of 1708 m2/g and pore volume of 0.82 cm3/g). This further confirms the critical role of the hydrothermal acrylic acid pretreatment in optimizing the KOH activation process.

Table 4 BET results from variations in the potassium hydroxide to lignin ratio in the preparation of microporous carbon

The substantial surface area boost from acrylic acid pretreatment exhibited in Fig. 3a aligns closely with the trends observed in the BET data provided in Table 4. Without acrylic acid, Table 4 shows a gradual surface area increase from just 14 m2/g at a 0 KOH ratio to 89 m2/g at 0.2 ratio as low levels of KOH help develop some porosity. This continues rising to 380 m2/g at a 0.5 ratio and peaks at 1146 m2/g at the maximum 1 ratio as abundant KOH enables increasing activation. Correspondingly, Fig. 3a displays a dramatic escalation in achievable surface area when incorporating 5% acrylic acid before activation, with the effects most pronounced at lower 0.2 and 0.5 KOH ratios. The exceptional surface areas attained with acrylic acid modification, rising from 619 m2/g at 0.2 ratio to 1708 m2/g at 0.5, confirm the ion exchange mechanism fosters optimized pore development below 1 ratio versus minimal impacts beyond 1 ratio where sufficient KOH diminishes benefits. Therefore, Fig. 3a closely matches the trends of Table 4, verifying acrylic acid pretreatment allows matched and even improved surface areas using far less KOH versus unmodified lignin.

Paralleling the surface area impacts, Fig. 3b shows outstanding escalations in cumulative pore volumes from adding acrylic acid before activation compared to Table 4, especially at lower KOH ratios below 1. Table 4 displays very limited porosity for lignin without acrylic acid at 0 to 0.2 ratios with pore volumes below 0.12 cm3/g that gradually reach 0.73 cm3/g at a maximum 1 ratio after substantial KOH addition enables porosity development. In contrast, Fig. 3b presents remarkable boosts in achievable cumulative pore volumes when applying an acrylic acid pretreatment at 0.2 and 0.5 ratios. The pore volumes attained at 0.26 and 0.82 cm3/g well surpass those achieved even at higher 1 ratio in Table 4 without modification, confirming tremendous porosity augmentation from the potassium carboxylate dispersion effects below 1 ratio. Therefore, similar to the surface area impacts, Fig. 3b verifies remarkable amplification in pore volumes beyond unmodified KOH activation controls from Table 4, enabled by acrylic acid functionalization to optimize porosity especially at lower activator levels.

Fig. 3
figure 3

Comparison of the effect of adding acrylic acid on a the surface area and b the pore volume of microorous carbon prepared with different ratios of potassium hydroxide

The results presented in Table 5 provide information on the surface area, pore volume, and average pore diameter of microporous carbon samples derived from lignin using different ratios of potassium hydroxide (KOH) to lignin without employing acrylic acid modification. As the KOH ratio increases, there is a gradual improvement in the textural properties of the activated carbon materials. At a 0 KOH ratio without activation, the carbon derived from lignin exhibits a very low surface area of only 14 m2/g and a pore volume of 0.09 cm3/g. Introducing a small amount of KOH at a 0.2 ratio increases the surface area to 89 m2/g and the pore volume to 0.12 cm3/g. This demonstrates that even a low level of KOH contributes to some extent to pore development through intercalation and gasification reactions with the lignin-based carbon. Further increasing the KOH ratio to 0.5 leads to additional improvements, with the surface area increasing to 380 m2/g and the pore volume reaching 0.20 cm3/g. This indicates that a moderate amount of KOH can activate the lignin-derived carbon more extensively. The highest ratio of 1:1 KOH results in the carbon sample achieving a surface area of 1146 m2/g and a pore volume of 0.73 cm3/g. The abundant presence of KOH enables significant activation by promoting extensive pore formation. However, comparing these results to the acrylic acid-modified samples in Table 5 reveals that achieving high surface areas without pretreatment requires extremely high levels of KOH. Incorporating acrylic acid enables excellent activation even at lower 0.5 KOH ratios. However, the highest ratio of 1:1 KOH results in the carbon sample achieving a surface area of 1146 m2/g and a pore volume of 0.73 cm3/g. The abundant presence of KOH enables significant activation by promoting extensive pore formation. As shown in Table 5, average pore diameters at the 1:1 ratio are in the small mesopore range around 2.38 nm.

Table 5 Surface area analysis of porous carbon prepared from lignin without acrylic acid

FE-SEM

Figure 4 showcases FE-SEM images of the synthesized microporous carbon samples, which were produced using different ratios of lignin to potassium hydroxide (KOH) activator, with and without the addition of acrylic acid. In Fig. 4a, the sample without acrylic acid pretreatment displays a non-uniform morphology at higher magnification, exhibiting both porous and non-porous regions across the surface. This suggests that the activation process was not highly efficient or extensive. While the presence of porous regions indicates partial pore development via KOH intercalation and gasification reactions, the existence of large non-porous domains suggests restricted activation and insufficient porosity throughout the sample. This heterogeneous pore distribution is attributed to inadequate penetration and diffusion of the KOH activator into the bulk of the lignin precursor. Without acrylic acid functionalization, potassium likely remained concentrated on the surface rather than dispersing uniformly within the lignin matrix. Consequently, pore etching and expansion during activation were confined to the near-surface region, preventing the creation of abundant porosity within the material’s interior. As a result, only moderate improvements in surface area and pore volume were observed compared to unmodified lignin. In contrast, Fig. 4b displays the sample prepared with acrylic acid pretreatment, revealing a highly porous structure throughout the entire imaged area, characterized by a dense network of micropores. The presence of numerous small pores, ranging from 2 to 10 nm, indicates extensive pore generation during the activation process. This significant enhancement in porosity is achieved through acrylic acid pretreatment. Introducing carboxyl groups facilitates the uniform dispersion of potassium throughout the lignin via ion exchange reactions during the activation step, optimizing the distribution of the KOH activator. With potassium ions evenly dispersed within the precursor, the activating agent can react extensively, leading to the creation of abundant porosity on the surface and within the bulk of the material. Gasification proceeds thoroughly from within, facilitating effective pore etching and expansion. This ultimately enables the development of a high internal surface area and pore volume.

Fig. 4
figure 4

FE-SEM analysis of micropore formation (a1, 2) without (ratio 1:0.5) and (b1, 2) with (ratio of 1:0.5:0.05) acrylic acid pretreatment

EDS

Figure 5 illustrates the results of the EDS analysis and elemental mapping conducted on the optimized microporous carbon sample prepared with acrylic acid pretreatment. The EDS spectrum provides a quantitative breakdown of the elemental composition present on the surface of the carbon material. Carbon is the predominant element, accounting for 91.6 wt% of the sample. This high carbon content is expected since the material was derived from lignin, a naturally abundant biopolymer. Oxygen is the next most abundant element, comprising 6.9 wt% of the sample. This corresponds to residual oxygen-containing functional groups on the carbon surface, including carboxyl groups introduced through the acrylic acid grafting. Nitrogen makes up 0.9 wt% of the sample, potentially originating from air exposure during processing or nitrogenous components present in lignin. Lastly, potassium constitutes 0.6 wt% of the sample. This residual potassium content is attributed to the KOH activator, which intercalates into the carbon pores during activation but is not entirely removed during the washing process. The elemental mapping images visually represent the spatial distribution of carbon, oxygen, and potassium across the analyzed sample area. As expected, carbon is observed throughout the mapped region due to its dominant presence in the material. Oxygen and potassium signals are dispersed within the carbon matrix. The residual potassium is evenly distributed rather than concentrated in clusters, indicating that the carboxyl-assisted activation facilitated the uniform distribution of potassium during the process.

Fig. 5
figure 5

Elemental mapping and EDS analysis of the optimized microporous carbon

XRD

Figure 6 showcases the X-ray diffraction (XRD) patterns of two microporous carbon samples synthesized using a 1:0.5 lignin to KOH ratio, with and without acrylic acid modification. Both samples exhibit two broad peaks centered around 23° and 44° 2theta, corresponding to the (002) and (100) planes associated with the graphitic structure of carbon materials [32]. The presence of these peaks confirms that the synthesized microporous carbons possess some level of short-range graphitic crystallinity. However, the sample treated with 5% acrylic acid during hydrothermal pretreatment displays more pronounced (002) and (100) diffraction peaks than the unmodified lignin sample. The increased peak intensities indicate a higher degree of graphitic crystallinity in the acrylic acid-modified sample. The increased crystallinity can be attributed to incorporating carboxyl functional groups resulting from acrylic acid grafting [13]. The abundance of carboxyl groups allows for the uniform dispersion of potassium ions via ion exchange during the activation process. This optimized distribution of potassium facilitates the development of a graphitic carbon structure. Furthermore, the electron-withdrawing nature of the carboxyl groups may stabilize the aromatic rings in lignin, preventing excessive oxidation during KOH activation. This preservation of the crystalline graphitic structure contributes to the increased degree of graphitic crystallinity observed in the acrylic acid-modified sample. In contrast, in the absence of acrylic acid pretreatment, the KOH activator remains concentrated on the surface of lignin particles rather than dispersing uniformly. This results in a more disordered and amorphous carbon structure with lower crystallinity, as evidenced by the weaker XRD peaks.

Fig. 6
figure 6

X-ray diffraction pattern of graphitic structure in lignin-derived porous carbons

Figure 7 presents the Raman spectra of two microporous carbon samples prepared using a lignin-to-potassium hydroxide ratio 1:0.5, with and without acrylic acid modification. Both samples exhibit two prominent peaks at approximately 1340 cm−1 (D band) and 1580 cm−1 (G band). The D band represents disordered or defective carbon structure vibrations, while the G band signifies sp2 hybridized graphitic carbon. The relative intensities of the D and G bands are used to estimate the graphitic character and disorder within carbon materials. The ID/IG intensity ratios of both samples are comparable, measuring 1.03 and 1.02. This indicates that the two carbons possess comparable degrees of structural disorder resulting from oxidation and gasification reactions during KOH activation. While XRD analysis revealed slightly higher graphitic crystallinity in the acrylic acid-modified sample, the similar ID/IG ratios obtained from Raman spectroscopy suggest that both samples have identical overall graphitic content and disorder. This implies that the activation process induces structural defects, reducing differences in initial crystallinity. The presence of distinct D and G bands confirms the successful conversion of lignin into a porous carbon structure containing disordered and graphitic sp2 hybridized carbon. The Raman data corroborates the XRD patterns, ensuring the optimized synthesis of microporous carbon material with the desired porous structure. The results demonstrate that acrylic acid pretreatment facilitated the attainment of high surface area and porosity during activation. Still, it did not significantly alter the fundamental graphitic nature compared to carbons derived from unmodified lignin. Both samples experienced comparable degrees of structural disruption and retention of graphitic carbon, as evidenced by the intense, overlapping D and G bands and equivalent ID/IG ratios.

Fig. 7
figure 7

Raman spectra demonstrating similar graphitic content with and without acrylic acid

Effect of pH and Temperature on pb Removal Efficiency

Figure 8 depicts the influence of pH and temperature on the adsorption efficiency of lead ions (Pb2+) onto the synthesized microporous carbon adsorbent. The findings highlight the substantial effect of pH and temperature on the adsorption behavior. The solution pH is critical as it determines the surface charge of the carbon adsorbent and the speciation of the metal ions. At pH levels below the carbon’s point of zero charge (pHpzc), the surface acquires a positive charge. In this scenario, Pb2+ adsorption occurs primarily through electrostatic attraction to negatively charged ions. However, the high concentration of H+ ions competes with Pb2+ for binding sites, reducing removal efficiency. At higher pH, the carbon surface becomes more negatively charged, promoting stronger electrostatic attraction between the positively charged Pb2+ ions and the carbon. Simultaneously, reducing H+ concentration reduces the competition, enhancing adsorptive interactions. This explains the gradual increase in Pb2+ removal from 41.8% at pH 3 to 98.4% at pH 8. Temperature also exerts a significant influence on Pb2+ adsorption. Elevated temperatures cause dehydration of the hydrated Pb2+ ions, reducing their hydrated ionic radii. The smaller dehydrated Pb2+ ions can more easily access binding sites within the pores of the carbon adsorbent. This enhanced diffusion is facilitated by reduced steric hindrance. Furthermore, the thermal energy promotes chemisorption interactions. The endothermic nature of the process indicates that adsorption is enhanced at higher temperatures. However, this effect eventually levels off as the binding sites become saturated. The optimal Pb2+ adsorption efficiency is achieved at higher pH values where the carbon surface carries a negative charge and at elevated temperatures that facilitate diffusion and chemisorption of Pb2+ ions. These results underscore the significant impact of solution chemistry and temperature on the adsorptive removal of Pb2+ by the microporous carbon adsorbent.

Fig. 8
figure 8

Effect of pH (a) and temperature (b) on lead removal efficiency

Effect of Contact time

Figure 9 illustrates the impact of contact time and initial lead (Pb2+) concentration on the adsorption behavior of Pb2+ ions onto the microporous carbon adsorbent. Two key parameters are examined: the percentage of Pb2+ removal and the adsorption capacity at different time intervals. The rate of Pb2+ removal represents the proportion of Pb2+ ions from the initial solution concentrations that were adsorbed onto the carbon adsorbent. As shown in Fig. 9a, the removal percentage is initially high across all concentrations but gradually decreases until it reaches equilibrium. This decline can be attributed to the availability of vacant active sites on the carbon surface for Pb2+ adsorption through electrostatic attraction and ion exchange. As these sites become occupied over time, the removal rate decreases due to a lack of available binding sites. At higher initial Pb2+ concentrations, the equilibrium removal is lower because of the higher ratio of pollutant to the adsorbent, meaning that the fixed adsorbent dosage cannot adsorb as large a percentage of the ions. The adsorption capacity (Fig. 9b) represents the amount of Pb2+ adsorbed per gram of the carbon adsorbent at different time points. The adsorption capacity initially increases rapidly as Pb2+ ions readily bind to the abundant active sites. Eventually, it reaches equilibrium when the remaining sites become more challenging to occupy due to repulsive forces between the adsorbed ions. The equilibrium capacity is higher for solutions with higher initial Pb2+ concentrations because more ions are available for binding. The rapid initial uptake followed by a plateau indicates the saturation of the carbon’s readily available adsorption sites over time. The equilibrium time estimates the minimum contact time required for maximum Pb2+ removal by the adsorbent. These trends highlight the high adsorption potential of the microporous carbon, particularly at lower concentrations where equilibrium is achieved more quickly. The results contribute to understanding the adsorption mechanism and kinetics, which are crucial for the practical application of the carbon adsorbent in Pb2+ removal processes.

Fig. 9
figure 9

Lead removal efficiency (a) and adsorption capacity (b) as a function of contact time at different initial concentrations

Figure 10 presents the adsorption isotherms for lead (Pb2+) uptake by the synthesized microporous carbon using four commonly used isotherm models: Langmuir, Freundlich, Temkin, and Dubinin–Radushkevich (D–R). The corresponding model parameters can be found in Table 6. Adsorption isotherms play a crucial role in understanding the interaction between pollutants and adsorbents, and they are essential for optimizing the design and operation conditions of adsorbents. The Langmuir model assumes monolayer adsorption on a homogeneous surface with uniform binding sites. The Freundlich model describes heterogeneous multilayer adsorption. The Temkin model considers indirect interactions between the adsorbent and the adsorbate. The D–R model determines adsorption energy based on pore filling. By examining the linear regression fits and R2 values in Fig. 10; Table 6, it is evident that the Langmuir model provides the best description of the experimental data, with the highest R2 value of 0.99. The excellent fit of the Langmuir model suggests that the adsorption of Pb2+ occurred through monolayer coverage on the carbon surface at uniform binding sites. The maximum Pb2+ adsorption capacity, calculated from the Langmuir model, was 371 mg/g. On the other hand, the Freundlich, Temkin, and D-R models showed poorer correlation, indicating that multilayer adsorption, indirect interactions, and pore filling were less significant in this adsorption process. The Langmuir constant KL, related to the binding affinity, was calculated to be 0.132 L/mg, indicating favorable adsorption. The data obtained suggests that the Langmuir isotherm model is the best fit, meaning that the primary mechanism for Pb2+ uptake by the microporous carbon adsorbent is homogeneous monolayer adsorption. The analysis of the isotherms is crucial for understanding the adsorption behavior and mechanisms involved, and it aids in selecting the optimal operational conditions for practical applications of the carbon material.

Fig. 10
figure 10

Adsorption isotherms for lead uptake by microporous carbon a Langmuir, b Freundlich, c Temkin, and d Dubinin–Radushkevich models

Table 6 Isotherm parameters for lead adsorption onto microporous carbon

Adsorption Kinetic

Table 7; Fig. 11 display the adsorption kinetics of Pb2+ onto the microporous carbon material, which was evaluated using several standard kinetic models, including pseudo-first-order, pseudo-second-order, Elovich, and intraparticle diffusion models. Among these, the pseudo-second-order model provided the best fit to the experimental data based on the higher correlation coefficients (R2 values close to 1) and close agreement between the calculated and experimental adsorption capacities. The excellent fit with the pseudo-second-order kinetics suggests that chemisorption interactions are likely the rate-limiting step controlling the adsorption of Pb2+ by the microporous carbon. The rapid initial uptake observed indicates fast chemisorption on readily available active sites, while the plateau reached over time signifies the gradual saturation of these chemisorption sites as they become occupied. The poorer fits obtained with the pseudo-first-order, Elovich, and intraparticle diffusion models indicate that adsorbate concentration, heterogeneous binding sites, and diffusion into pores are less influential in adsorption kinetics. The chemisorption interactions probably involve ion exchange between Pb2+ ions in solution and counter ions on the carbon surface, as well as coordination between Pb2+ and oxygen-containing functional groups on the carbon. The kinetics analysis provides strong evidence that chemisorption is the predominant mechanism governing the rate of Pb2+ adsorption. These insights into the factors controlling the adsorption dynamics are valuable for practical applications involving the use of microporous carbon material for removing Pb2+ from wastewater. Understanding the adsorption kinetics allows the process to be designed and optimized effectively.

Table 7 Kinetic parameters for lead adsorption by microporous carbon
Fig. 11
figure 11

Kinetic modeling of lead adsorption by microporous carbon: a pseudo-first-order model, b pseudo-second-order model, c Elovich model, and d intraparticle diffusion model

Thermodynamic Adsorption

The thermodynamic analysis of lead (Pb2+) adsorption onto the microporous carbon adsorbent at different temperatures is depicted in Fig. 12. The positive value of enthalpy change (ΔH°) indicates that Pb2+ adsorption onto the microporous carbon is an endothermic process. As temperature increases from 298 to 328 K, the adsorption capacity (qe) rises from 271 to 302 mg/g. This enhancement can be attributed to several factors:

  1. 1.

    The endothermic nature suggests higher temperatures promote chemisorption interactions between Pb2+ ions and functional groups on the carbon surface. The thermal energy enhances the mobility and diffusion of ions into the micropores to access binding sites.

  2. 2.

    The positive entropy change (ΔS°) value of 0.116 kJ/mol K implies increased randomness at the solid-solution interface during Pb2+ adsorption. This arises from the dehydration of hydrated Pb2+ ions and the release of water molecules [33].

  3. 3.

    The calculated enthalpy changes of 25.41 kJ/mol confirm chemisorption is the predominant mechanism, as physisorption typically involves ΔH° of − 20 to 0 kJ/mol.

  4. 4.

    The Gibbs free energy change (ΔG°) becomes more negative as the temperature rises from − 8.13 to − 10.44 kJ/mol, indicating the process is more thermodynamically favorable at higher temperatures [34, 35].

  5. 5.

    The chemisorption interactions likely involve ion exchange of Pb2+ with counter ions on the carbon surface and coordination with oxygen-containing functional groups.

The positive ΔH° and ΔS° values prove the endothermic nature of Pb2+ adsorption. The elevated adsorption capacity with rising temperature is attributed to enhanced diffusion and chemisorption. The thermodynamic insights are valuable for optimizing the adsorbent’s operating conditions.

Fig. 12
figure 12

Thermodynamic analysis of lead adsorption onto microporous carbon

Conclusions

This study successfully synthesized microporous carbon with a high surface area from lignin using an acrylic acid pretreatment approach. Acrylic acid grafting onto lignin via hydrothermal treatment introduced abundant carboxyl groups, confirmed by NMR and FT-IR analysis. The carboxyls enabled ion exchange with potassium during KOH activation, optimizing carbon dispersion. Acrylic acid pretreatment substantially improved the textual properties, increasing surface area and pore volume compared to unmodified lignin. Optimal conditions were 5% acrylic acid and 6 h hydrothermal time. With lignin:KOH:acrylic acid ratio of 1:0.5:0.05, exceptional BET surface area of 1708 m2/g and pore volume of 0.82 cm3/g were attained, demonstrating the efficacy of acrylic acid pretreatment for activation at low KOH levels. Langmuir modeling revealed an outstanding Pb2+ adsorption capacity of 271 mg/g for the microporous carbon. Pseudo-second-order kinetics suggested chemisorption controlled the adsorption rate. Thermodynamic analysis indicated the endothermic nature of Pb2+ adsorption, further enhanced at higher temperatures by chemisorption and ion exchange. In summary, acrylic acid pretreatment was an efficient method to produce high surface area carbon from lignin using minimal KOH. The resulting carbon showed great potential as a Pb2+ adsorbent via chemisorption.