1 Introduction

Supercapacitors, addressing the increasing energy scarcity, have garnered worldwide attention as one of the promising energy storage technologies due to their high-power density and long cycle life (Hou et al. 2022). A variety of commercial electrodes with stable performance and high energy density, such as coal-based activated carbon, metal oxides, and conductive polymers, have been employed in supercapacitors. However, these electrodes are confronted with the issue of non-renewable resources (e.g., coal and petroleum) (Basha et al. 2023), which is not conducive to environmental sustainability (Wang et al. 2018). In comparison, bio-based products use a renewable carbon source and are considered an effective substitute for future sustainable development (Luo et al. 2020).

Biochar has been widely recognized as a precursor material for supercapacitor electrodes due to its porosity and cost advantages (Abioye and Ani 2015). However, the issue of dealing with the waste bio-tar generated during the production of biochar has been overlooked. Bio-tar, an unavoidable byproduct (about 10–20%) generated during the thermochemical conversion of biomass, has been a significant obstacle for the large-scale development of pyrolysis and gasification (Yao et al. 2021). The numerous polycyclic aromatic hydrocarbons contained in bio-tar are difficult to decompose during thermal conversion processes, persisting as a potential threat to the environment and human health (Abou Rjeily et al. 2021). Therefore, the proper treatment and utilization of bio-tar is crucial for promoting the development of thermochemical conversion technology for biomass.

Previous studies have reported the potential of bio-tar as a sustainable and accessible carbon precursor for the production of carbon materials due to its relatively high carbon content (60–70%) and low ash content (below 1%). The bio-tar is obtained through the condensation of high molecular substances in the pyrolysis gas during the slow pyrolysis of biomass (Jia et al. 2022). As a result, the ash content in the biomass is retained in the biochar, ensuring the purity of the bio-tar. Cheng et al. achieved the rapid polymerization of bio-oil to produce solid tar carbon with stable chemical properties and physical structure (Cheng et al. 2020). Hu et al. prepared high-density (1.63 g·cm−3) and high-yield (> 95%) carbon materials by introducing furfural to promote crosslinking during the co-polymerization of bio-oil and biochar (Guo et al. 2022). These findings demonstrate the feasibility of the construction of high-performance supercapacitor electrodes using waste bio-tar. However, to achieve outstanding energy storage properties in supercapacitor electrodes, multilayer structure and micro-mesopore distribution are crucial factors for enhancing ion transport and reducing internal resistance, respectively (Kim et al. 2022).

Various activation methods have been employed to enhance the physicochemical properties of carbon materials (Liang et al. 2021; Liu et al. 2023). KOH has been used as an activating agent to improve the specific surface area (2595 m2·g−1) of bio-tar-derived carbon materials during the pyrolysis carbonization process (Tu et al. 2021). Tian et al. employed KOH to activate a supercapacitor electrode from wood-derived bio-tar, which exhibited enhanced micro-porosity and a specific surface area of 3354.8 g·cm−2 (Tian et al. 2023). However, KOH activation tends to generate a higher amount of micropores and fewer mesopores, which could limit the performance of the supercapacitor electrode (Chen et al. 2019a, b). In response, template activation has been employed as a viable approach to modifying the pore structure during repolymerization (Li et al. 2019; Pan et al. 2018). Specifically, urea template activation occurs primarily through the doping of nitrogen into carbon materials through the reaction of ammonia free radicals generated from urea decomposition with oxygen functional groups of the carbon precursor (Inagaki et al. 2018). Successful N-doping can enhance the hydrophilicity of the electrode material and reduce internal resistance to ion transport (Leng et al. 2020). Conversely, the release of NH3 produced from urea decomposition can serve as a soft template to promote pore generation in carbon materials (Chen et al. 2019a, b). Therefore, coupling chemical and template activation can increase the number of active sites in the carbon materials and effectively enhance their porosity (Qiu et al. 2018), which would also benefit the electronic performance of the supercapacitor electrodes. However, the polymerization of bio-tar, a complex liquid byproduct, into solid biochar involves esterification, cyclization, and polycyclic polymerization, which affect the growth and evolution of the carbon skeleton structure (Zheng et al. 2023). Therefore, the bottleneck of this study lies in the regulation of bio-tar polymerization to obtain the desired pore structure and N-doping effect. Additionally, it is necessary to evaluate the economic feasibility and applicability of the synthesis of porous carbon from bio-tar. Limited attention has been given to the KOH and urea dual-activation of supercapacitor electrodes derived from bio-tar, and the potential activation mechanisms and sustainability of this dual-activation strategy are unclear.

This work aims to present an economical and sustainable strategy for the preparation of supercapacitor electrodes via bio-tar polymerization by achieving the following: (1) evaluating the effects of different regulation strategies (i.e., one-step and two-step methods) on the formation of porous carbon by bio-tar polymerization; (2) elucidating the potential activation mechanisms for the formation of porous carbon derived from bio-tar; and (3) performing energy flow and economic evaluation of these regulatory strategies.

2 Material and methods

2.1 Fabrication of samples

2.1.1 Preparation of bio-tar

The bio-tar employed in the experiment was procured from the slow pyrolysis carbonization of corn straw in Hebei, China (Yao et al. 2021). The pyrolysis temperature was set at 600 °C, with a holding time of 40 min. The bio-tar was condensed and collected from the pyrolysis volatiles at a temperature of 100 °C. At this temperature, the condensable gases in the pyrolysis volatile gas were collected, excluding water and small molecules of low boiling points. The physical properties and elemental distribution of bio-tar are listed in Additional file 1: Table S1.

2.1.2 Synthesis of porous carbon by bio-tar polymerization

For the preparation of the polymerized porous carbon materials, bio-tar was used as a direct carbon source, KOH (Shanghai Macklin Reagent, China) functioned as an activator, and urea (Shanghai Macklin Reagent, China) acted as a nitrogen source for elemental doping. Based on preliminary experiments, the mass ratio was selected as 20:20:1 for bio-tar, KOH, and urea. The materials were placed in a tube furnace for activation after thorough mixing with glass rods. The activation temperature was set at 800 °C with a heating rate of 10 °C·min−1, held for 1 h, and accompanied by 100 mL·min−1 N2 during the reaction. Low concentration HCl (0.1 mol·L−1) and deionized water were employed to clean the polymerized carbon, ensuring that the pH of the filtrate reached 7. Subsequently, the activated carbon was fully dried at 105 °C. The porous carbon obtained through the one-pot process described above was designated AC-N (④activated carbon with N-doping by one-pot). To compare and analyze the polymerization conditions under different circumstances, as illustrated in Fig. 1, another four groups were designed as controls: ① direct polymerization without any additives, ② direct polymerization with urea modification, ③ direct polymerization with KOH activation, and ⑤the polymerization of bio-tar and urea to produce biochar at 350 °C with a heating rate of 10 °C·min−1. Then, the resulting biochar was mixed with KOH for further activation. To serve as a control, the polymerization and activation conditions were consistent with the preparation parameters of AC-N. These were named BC (bio-carbon), BC-N (bio-carbon with N-doping), AC (activated carbon), and T-AC-N (two-pot activated carbon), respectively.

Fig. 1
figure 1

Preparation schedules of porous carbon derived from bio-tar

2.2 Characterization

Organic compounds in bio-tar were identified using GC–MS (QP2010, Shimadzu Co., Tokyo, Japan) equipped with a Varian DB-5 column. Thermogravimetric analysis was performed with a Thermophily-IS50 at a heating rate of 10 °C·min−1. Elemental analysis of samples was conducted using an elemental analyzer (Langenselbold, Germany). Surface functional group characteristics of the respective samples were obtained through X-ray photoelectron spectroscopy (XPS, Thermo Fisher ESCALAB 250Xi, USA). The pore size distribution of the porous carbons was analyzed after vacuum drying for 8 h at 300 °C. Nitrogen adsorption–desorption was then measured using a TriStar II 3020. The specific surface area was determined with the Brunauer–Emmett–Teller (BET) method. A Nova 600 NanoLab™ dual beam SEM/FBI (FEI, Hillsboro, OR, USA) was employed to characterize the micro-structures of the activated carbons. The crystallinity morphologies were characterized with an X-ray diffractometer (XRD) (Rigaku Corp, Tokyo, Japan). Additionally, Raman spectroscopy was employed to analyze the crystallographic structures.

2.3 Electrochemical measurements

The capacitive performance of the porous carbon was assessed using a CHI 660C electrochemical workstation (Shanghai ChenHua, China) in a three-electrode and two-electrode system with a 6 M KOH aqueous electrolyte solution under ambient conditions. The reference electrode consisted of a saturated calomel electrode, while the counter electrode was a platinum foil. The working electrode material was prepared by thoroughly mixing activated carbon, acetylene black, and polyvinylidene fluoride according to a mass ratio of 8:1:1. N-methyl pyrrolidone solvent was added to evenly grind the mixture. Subsequently, a spatula was employed to apply the mixture between two pieces of nickel foam (1 cm × 1 cm), which was then pressed at approximately 10 MPa for 3 min. The mixture was dried for 24 h at 120 °C. All of the working electrodes had masses of 3–5 mg·cm−2. A button type supercapacitor was assembled by two similar electrodes and separated by a piece of polypropylene membrane.

Test projects included cyclic voltammetry (CV), galvanostatic charge–discharge (GCD), and electrochemical impedance spectroscopy (EIS). The specific capacitance of the prepared activated carbon in the three-electrode system can be calculated using Eq. (1).

$$C_{m} = \frac{I \cdot \Delta t}{{m_{1} \cdot \Delta U}}$$
(1)

where I and ∆t represent the discharge current (A) and time (s), respectively, while m1 and ∆U denote the effective weight of carbon material (g) and effective voltage in the discharge process (V), respectively.

After assembling the button battery, the specific capacitance of a single electrode of the supercapacitor device was obtained using Eq. (2).

$$C_{s} = \frac{4I \cdot \Delta t}{{m_{2} \cdot \Delta U}}$$
(2)

where I (A) represents the discharging current, ΔU(V) refers to the potential window of the charge–discharge excluding voltage drop, Δt (s) denotes the discharging time, and m2 (g) indicates the total mass of activated carbon in both electrodes.

2.4 Energy flow and economic analysis

The system energy conversion efficiency (E) and unit energy consumption (U) are essential indices for evaluating the transformation from bio-tar to porous carbons (Yao et al. 2021). The system energy conversion efficiency can be calculated using Eq. (3), while the unit energy consumption can be calculated using Eq. (4). Specifically, the total energy input (Qin) of the system mainly includes the chemical energy of the bio-tar (Qb), the energy consumption for heating the bio-tar (Qh1), and the energy consumption for heating the carrier gas N2 (Qh2), which can be calculated using Eq. (5). The system energy output (Qout) mainly includes the chemical energy of the porous carbon material (Qc) and the chemical energy of the generated gas (Qg), which can be calculated using Eq. (6). The energy consumption for heating bio-tar and nitrogen gas can be calculated using Eq. (5).

$${{{E }}}{= }\frac{{{Q}}_{{out}}}{{{Q}}_{{in}}}$$
(3)
$${{U}} = \frac{{{Q}}_{{in}}}{{m}}$$
(4)
$${{Q}}_{{in}}{=}{{Q}}_{{b}}{+}{{Q}}_{{h1}}{+}{{Q}}_{{h2}}$$
(5)
$${{Q}}_{{out}}{=}{{Q}}_{{c}}{+}{{Q}}_{{g}}$$
(6)
$$Q_{hx} = c_{x} m_{x} \Delta t \left( {x = 1,2} \right)$$
(7)

where E and U represent the system energy conversion efficiency and the unit energy consumption (%), respectively; m denotes the yield of porous carbon (kg), Qin and Qout represent the total energy input and energy output (MJ); Qb, Qh1, and Qh2 represent the chemical energy of bio-tar, the energy required for heating bio-tar, and the energy required for heating N2 (MJ); Qc and Qg represent the chemical energy of porous carbon and gas (MJ); c1 represents the specific heat capacity of bio-tar (1.47 J·g−1·°C−1); c2 represents the specific heat capacity of N2 (1.47 J·g−1·°C−1); t denotes the temperature difference (780°C).

The potential advantages of this technology were evaluated through economic analysis. The additional income generated annually by converting discarded tar into porous carbon material can be referenced in Eq. (8). Notably, Bio-tar is considered a waste pollutant under government regulations, requiring producers to clean it to prevent environmental pollution. Therefore, the cost of bio-tar as a raw material is not included in the calculation.

$${\text{Income}}\, ({\text{year}})= {\text{Total}} \,{\text{profit}} - {\text{Total}}\, {\text{cost}}$$
(8)

3 Results and discussion

3.1 Physicochemical characteristics

3.1.1 Surface chemical properties

The physical properties and primary components of bio-tar are displayed in Additional file 1: Table S1, while the GC–MS analysis results are illustrated in Additional file 1: Fig. S1. The predominant components were aromatic compounds, accounting for 79.89%, of which polycyclic aromatic hydrocarbons (PAHs) constituted 41.62%. PAHs exhibit strong aggregation characteristics (Li et al. 2019), which could further promote the formation of bio-tar (Shukla and Koshi 2011). Additionally, a small amount of aliphatic compounds (12.79%) and aliphatic compounds (7.32%) were detected. Notably, the ash content of bio-tar was very low (only 0.98%), ensuring the production of ash-free and highly pure tar carbon following polymerization.

As depicted in Fig. 2a, all three doping processes successfully incorporated the N element. The AC-N sample, acquired through a one-pot method, demonstrated the highest nitrogen content, reaching 4.08%, surpassing that of BC-N (2.80%), and exhibiting an exceptional doping effect by the one-pot method. These results suggested that nitrogen addition was promoted during the KOH polymerization activation process, which may be attributed to the enhanced reaction of the intermediate carbon precursor with ammonia free radicals during the polymerization process (Gao et al. 2022). Notably, the nitrogen content of T-AC-N, obtained through a two-pot method, was only 1.61%, indicating that reactivation after doping caused unstable decomposition of nitrogen-containing functional groups, leading to a reduction in nitrogen content. Figure 2b illustrates the level of coalification in the tar-carbon. It was observed that the conversion of bio-tar into tar-carbon via various synthesis strategies consistently decreased the content of H and O while increasing the C content, signifying that the process of bio-tar polymerization entailed dehydrogenation, deoxygenation, and aromatization of organic components. Specifically, BC carbon exhibited high C content of 87.28% and molar ratios of H/C and O/C at 0.22 and 0.08, respectively, indicating a high degree of carbonization and poorer hydrophilicity. In addition, the presence of C-N functional group was observed in BC-N, AC-N, and T-AC-N carbons in the FTIR spectra (Additional file 1: Fig.S2), indicating the abundance of nitrogen-doped surface functional groups in carbon materials (Leng et al. 2020).

Fig. 2
figure 2

Surface chemical properties, a Element distribution, b Van Krevelen diagram. c Distribution of morphological nitrogen, d XPS spectra of BC-N carbon, e XPS spectra of AC-N carbon, f XPS spectra of T-AC-N carbon

The XPS curve (Fig. 2c–f) and split-peak fitting curve (Fig. 2d–f) revealed that BC-N contained four forms of nitrogen, predominantly pyrrolic N and pyridinic N, while AC-N mainly consisted of pyridinic N with a 62.87 at% content. As observed in the comparison of BC-N and AC-N, the introduction of KOH facilitated the transfer of oxidized N to pyridinic N and pyrrolic N, aligning with previous studies (Gao et al. 2022). This can be attributed to the reaction between KOH and oxygen-containing functional groups on the surface of biochar (Chen et al. 2020), as well as the carbon framework, occurring at higher temperatures. This reaction leads to a reduction in oxidized N production and a disruption of the carbon framework, resulting in a significant increase in pyridinic N. T-AC-N, resulting from a different doping process, primarily contained graphitic N at 48.98 at%, signifying that various doping modes led to a transformation in the form of nitrogen. In the one-pot polymerization method (AC-N), the reaction between ammonia free radicals (–NH2,=NH) decomposed by urea and oxygen-containing functional groups (–COOH–, –C=O, C–O–C, –OH) in bio-tar formed intermediate amino substances, subsequently converting into heterocyclic compounds through dehydration, condensation, and cyclization reactions. The N-doping process was integrated into the polymerization process of bio-tar, which was advantageous for recombining with carbon to form pyridinic N (Djandja et al. 2023). In contrast, the two-pot method involved N-doping followed by high-temperature activation with KOH. The high temperature removed some of the marginal nitrogen with poor stability. Moreover, nitrogen atoms could replace carbon atoms at high temperatures and enter the surface graphite structure of tar-carbon, promoting their transformation into graphitic N (Leng et al. 2020).

3.1.2 Morphological and structure characteristics

SEM was employed to characterize the microscopic morphology of porous tar-carbon. As depicted in Fig. 3, the carbon materials prepared by bio-tar polymerization exhibited a layered morphology. Following KOH activation, the three groups of activated carbons, AC, AC-N, and T-AC-N, displayed a rich micro-porous structure, while the corresponding BC and BC-N samples did not exhibit any evident pore structures; their surfaces were more compact and composed of abundant carbon spheres. These results suggested that KOH, rather than urea, significantly influenced the surface morphology of tar-carbon.

Fig. 3
figure 3

Structural characterization of the products: SEM images ae of BC carbon, AC carbon, BC-N carbon, AC-N carbon, T-AC-N carbon; and (f) N2 adsorption–desorption isotherms, (g) pore size distributions, (h) XRD patterns, (i) Raman spectra

BET analysis was utilized to further determine the specific surface area of tar-carbons. The distribution of micropores was calculated using the T-Plot method, and mesoporous pores were obtained through subtraction of the micropores. As shown in Table 1, the specific surface area of tar-carbons in each group was consistent with SEM results. Notably, the specific surface area of BC carbon obtained by direct polymerization of bio-tar without any additives was only 4.67 m2·g−1, indicating that high temperature alone (800 °C) cannot generate a rich pore structure in the tar-carbon (Qiu et al. 2022).

Table 1 The porosity parameters of activated carbons

In stark contrast, the carbons activated by KOH, such as AC, AC-N, and T-AC-N, exhibited a higher specific surface area, with micropores accounting for more than 70%. Particularly for AC-N carbon, the specific surface area obtained by the one-pot method was the largest (1298.26 m2·g−1), and the T-AC-N specific surface area obtained by the two-pot method was the second largest (1133.91 m2·g−1). It was hypothesized that the two-pot method primarily erodes the surface of the tar-carbon after polymerization, making it difficult to generate well-developed inner pores (Tu et al. 2021). Intriguingly, BC-N had a specific surface area of 204.49 m2·g−1 and a mesopore ratio of 35%, indicating that the introduction of urea exerted a soft-templating effect on the polycondensation of bio-tar (Wan et al. 2020). The evaporation of volatile gases such as NH3 generated during the decomposition of urea prompted the tar-carbon to develop certain pore structures (Chen et al. 2019a, b).

To further explore the porosity feature of the porous tar-carbons, N2 adsorption–desorption was characterized, as illustrated in Fig. 3f and g. All tar-carbons, except for BC carbons, exhibited a type IV isotherm structure. The particle size was predominantly approximately 4 nm, which was higher than the average particle size of 2 nm, indicating abundant micropores. Adsorption was robust at low relative pressures P/P0 of 0–0.4, and at high relative pressures P/P0 of 0.4–1, a certain hysteresis loop was observed, suggesting that the four types of tar-carbons exhibit a micro-mesoporous multi-level distribution structure. This structure can effectively enhance the ion transport rate, decrease the internal transmission resistance, and demonstrate high energy storage features (Li et al. 2019).

XRD and Raman spectroscopy were employed to further analyze the crystal structure of the tar carbon. As depicted in Fig. 3h and i, the XRD of five tar-carbons exhibited two diffraction peaks near 24° and 43.5°, corresponding to the typical characteristic peaks (002) and (100), respectively. BC-carbon and AC-carbon displayed narrow and high diffraction peaks at 002, indicating a strong order degree and microcrystalline linking characteristics due to direct polymerization of bio-tar without N-doping. This observation was further confirmed by Raman analysis, which revealed a strong D-peak and low ID/IG value. The higher sp2 C/ sp3 C ratio in BC-carbon and AC- carbon signified a greater degree of graphitization (Additional file 1: Table S2). The presence of sp3 carbon atoms can disrupt the long-range order of the sp2 carbon network, indicating the existence of defect sites in the sp2 carbon matrix (Gao et al. 2019). The intrinsic reason behind this result was the polymerization of aromatic hydrocarbons in bio-tar, producing a thick directional structure leading to the formation of a regular six-ring graphite structure (Font Palma 2013). The introduction of KOH, however, did not affect the basic crystal structure of tar-carbon. Conversely, the introduction of N-doping had a significant impact on the carbon skeleton. BC-N, AC-N, and T-AC-N exhibited a wide and low diffraction peak in (002), and their ID/IG values were relatively high, indicating that N-doping increased the disorder and active sites of tar-carbon (Qu et al. 2015). This effect was especially pronounced in BC-N, suggesting that amino groups from urea successfully participated in the cyclic or polycyclic polymerization process of bio-tar (Arrigo et al. 2010). These results were consistent with XPS analysis, indicating an alteration in the skeleton structure of tar-carbon and an enrichment of the surface functional groups of tar-carbon.

3.2 Formation of the porous carbon materials

Based on the analysis of physical and chemical properties of tar-carbons, it can be inferred that AC-N obtained by one-pot polymerization displayed significant advantages in pore structure and surface functional groups. These features rendered AC-N a promising electrode material for supercapacitors. Through comparative analysis, the reaction pathway for AC-N carbon obtained via the one-pot dual activation process, as illustrated in Fig. 4, was speculated. This pathway diverged notably from the principle of pore formation in solid-biochar activation (Wang et al. 2020). Instead, the reaction pathway of AC-N carbon polymerization could be simplified into four stages.

Fig. 4
figure 4

Formation of the porous carbon under dual activation

In Stage I, a series of complex reactions occurred involving bio-tar polymerization and N-doping. According to the weight loss curves of bio-tar and urea in Additional file 1: Fig. S3, the reaction temperature during this stage was approximately between 150 °C and 400 °C. During this process, the primary components of bio-tar, as well as the amino groups generated from urea decomposition, underwent various reactions, including alkylation, phenol conversion, and the transformation of monocyclic aromatic to polycyclic aromatic hydrocarbons (Zheng et al. 2023). Consequently, polycyclic aromatic hydrocarbons with condensed rings containing nitrogen were formed, ultimately leading to the production of N-doped tar-carbon materials. Additional file 1: Fig. S4c shows that the nitrogen content of tar-carbon reached 3.68%, accompanied by a relatively high yield of 32.68% in biochar, indicating that preliminary doping had been achieved at this stage. Previous research suggested that the C–N bond was formed at 300 °C, and various aminating components such as –NH2, N–H, and C–N could be observed on the biochar surface (Oh et al. 2018).

Stage II referred to the activation of urea as a soft template, occurring at a reaction temperature of approximately 350 °C ~ 700 °C. The absence of an evident pore structure in Additional file 1: Fig.S4 indicated that the activation of the soft template occurred after 350 °C. As the temperature increased to 400 °C, the C–N bonds further decomposed, which led to the reconstruction of various stable connection bonds (Zaeni et al. 2020). Combining the N presence in XPS (Fig. 2d–f), as well as the lower degree of structural defects observed in XRD and Raman analysis of AC-N (Fig. 3h, i), it can be inferred that that the structural defective sites were created on the carbon structure during N doping, forming graphitic N, pyrrolic N and pyridinic N (Shen et al. 2015). Concurrently, volatile components like NH3, generated through complex reactions between urea and bio-tar, were emitted. Meanwhile, KOH partially reacted with oxygen-containing functional groups in the carbonized biochar to produce K2CO3 and facilitated the formation of certain pore structures (Chen et al. 2020). As a result, a primary pore structure began to form in AC-N carbon.

In Stage III, KOH activation occurred, and as the reaction temperature increased, the N element present on the surface of tar-carbon migrated deeper into the carbon skeleton, promoting the formation of graphitic N. Notably, when the temperature reached 700 °C, KOH eroded the carbon skeleton in the form of K ions, resulting in the formation of a secondary pore structure. The process can be explained in three stages (Zhang et al. 2022): (1) an etching reaction occurs between K ions and carbon, generating the pore network; (2) further expansion of the pores by the gas produced by the reaction between the intermediate product (H2O and CO2) and the carbon; and (3) after the removal of K ions, a porous structure is formed due to the lattice expansion caused by K ions embedded in the carbon matrix. This further facilitated the development of abundant microporous structure in the AC-N carbon. Stage IV represented the final carbonization stage that involved the reconstruction of the tar-carbon skeleton and further graphite transformation. As the activation time increased, micropores on the surface of porous carbon were further enlarged with some undergoing transformation into mesopores. Moreover, the erosion of K ions on carbon leads to the generation of new micropores, ultimately creating a pore structure comprising micro and mesopores (Huang et al. 2016), which ultimately yields a stable AC-N carbon material enriched with N-doping and micro-mesopores.

3.3 Electrochemical performances

The five groups of tar-carbons were characterized using a three-electrode system, including GCD curve, CV curve, and EIS curve, and the specific capacitance of each tar-carbon was calculated using discharge curves. As depicted in Fig. 5, the GCD curves of AC, AC-N, and T-AC-N exhibited a highly symmetric triangular shape with no significant voltage drop, indicating that these carbons had an ideal double-layer capacitance and high coulombic efficiency, as revealed by their nearly symmetrical rectangular CV curves. Combined with the specific capacitance values obtained, it could be observed that the AC, AC-N, and T-AC-N carbons exhibited good capacitive performance, suggesting that the microporous structure generated by KOH activation was crucial for electrochemical energy storage. Among these tar-carbons, AC-N demonstrated the best performance, with a specific capacitance of up to 309.5 F·g−1 at a scan rate of 0.5 A·g−1 (Fig. 5b), higher than the commercial carbon material YP-17D (158 F·g−1) (Hou et al. 2017). This can be attributed to its high surface area and abundant surface functional groups, with the high surface area providing numerous adsorption sites for charged ions and the nitrogen-containing functional groups promoting pseudo capacitance effects (Hou et al. 2015). It is worth noting that the surface functional groups played significant roles on specific capacitance when the specific surface area had no obvious difference between AC-N and T-AC-N. Especially, the abundant pyridinic N and pyrrolic N in AC-N could produce denser electron clouds to improve the charge transfer rate (Wan et al. 2020), and graphite N is part of the sp2 carbon basal plane, causing uneven distribution of electrons and enhancing the electronic conductivity of the carbon skeleton, thus improving capacitance performance (Inagaki et al. 2018).

Fig. 5
figure 5

Electrochemical performance characteristics measured in a three-electrode system (ad) and in a two-electrode system (eh): a GCD curves at 0.5 A·g−1, b specific capacitances at different current densities, c GCD curves of AC-N at different current densities, d CV curves of all samples at 50 mV· s−1, e Nyquist plots, f CV measurement at 5 mV· s−1–20 mV· s−1, g GCD profiles at 0.5 A·g−1–20 A·g−1, h cycle stability at 0.5 A·g−1, i EIS Nyquist plot

The kinetic behavior of electrochemical characteristics was characterized by EIS analysis, as shown in Fig. 5e. The Nyquist diagram of AC-N carbon and T-AC-N carbon consists of a semi-circle at high frequency and a frequency diagonal line at low frequency. The intersection point of the high-frequency region curve and the X-intercept for these two carbons were approximately 0.45 Ω, indicating a low equivalent series internal resistance (Rs) (Zhang et al. 2021). Additionally, the semi-circular arc in the high-frequency region was small, suggesting that the charge transfer resistance (Rc) at the electrode–electrolyte interface was low. In the intermediate frequency region, there was a diagonal line around 45°, which is similar to the impedance characteristics of cylindrical hole electrodes. In the low-frequency region, AC-N exhibited a straight line almost perpendicular to the abscissa, indicating rapid diffusion of ions in the electrolyte and good capacitive impedance characteristics, mainly due to its abundant micro-mesoporous structure (Xu et al. 2021).

The electrochemical properties of porous carbon derived from various carbon precursors have been compared in previous studies, as shown in Table 2. It is evident that the multistage porous carbon derived from bio-oil in this work can achieve similar excellent electrochemical properties compared with the porous carbon reported in other reports. Moreover, the results showed that the porous tar-carbon prepared by urea as a soft template and KOH as a dual activation has the potential to prepare for supercapacitor electrode materials without a hard template, simplifying the preparation process and reducing production costs.

Table 2 Performance of supercapacitor electrodes derived from various carbon sources in three-electrode system

The excellent electrochemical characteristics of AC-N have been demonstrated in the aforementioned research results. To further explore its performance in practical application processes, two identical working electrodes of AC-N were assembled into a button-type supercapacitor, where a two-electrode test analysis was conducted. As shown in Fig. 5f and g, the CV curve presented a symmetrical isosceles triangle, while the GCD curve displayed an approximately symmetrical rectangular shape, approaching the characteristics of an ideal supercapacitor. This indicates that AC-N carbon, as an electrode material, possesses rapid ion-responsive capabilities and a relatively small equivalent series resistance (Hou et al. 2017). Notably, the GCD curve provided insight into the unipolar specific capacitance that could reach 195.2 F·g−1 at 0.5 A·g−1, and the specific capacitance still retained high values of 186.8 F·g−1 and 149.5 F·g−1 at a high current density of 1 A·g−1 and 10 A·g−1 (Fig. 5e), respectively. Furthermore, the capacitance retention was maintained at 80.1% after 10,000 cycles at 1 A·g−1 (Fig. 5h). The excellent performance of AC-N carbon can be attributed to its multi-level porous structure, rich active sites, rapid ion diffusion, and short ion transfer distances (Pershaanaa et al. 2022). And an LED indicator was successfully illuminated by a series of five interconnected button-type supercapacitors (Fig. 5h).

The EIS curve of button capacitors further elucidated the relationship between performance and material, as shown in Fig. 5i. The EIS spectrum can be separated into two regions, a semi-circle of high frequency and a vertical line of low frequency, and the equivalent circuit model was depicted with the black measurement curve (Msd) and the red fitting curve (Cad), where Rs represents equivalent electrolyte resistance (Wu et al. 2020). Rct represents the resistance involved in the adsorption–desorption of the electroactive substance, Zw represents the Warburg resistance, and CPE represents the constant phase element. It is noteworthy that the values of Rs and Rct were 0.56 Ω and 0.05 Ω, respectively, indicating that the electrode has excellent electrical conductivity and small charge transfer resistance (Zhu et al. 2022). These findings further demonstrated the possibility of the simple one-pot synthesis of porous carbon materials using tar as raw material, urea as soft template and KOH as activator.

3.4 Techno-economic assessment

3.4.1 Energy balance analysis

As a novel approach in bio-tar treatment, it is necessary to evaluate the energy conversion efficiency and economic viability to determine the sustainability of the technique. Herein, a biomass pyrolysis carbonization project in Hebei, China, was taken as a case study. The raw material processing capacity was 500 kg·h−1, and the waste bio-tar production was 30 kg·h−1 (Yao et al. 2021). The energy flow processes for the synthesis of supercapacitor porous carbon using both one-pot and two-pot strategies are shown in Fig. 6a and b, respectively, and the estimation basis of energy flow and economic analysis is found in Additional file 1: Table S2. Notably, the unit energy consumption of porous carbon produced reflects advancements in methodology (Liu et al. 2021). The energy consumption in the one-pot method was 9.58 MJ·kg−1, which was significantly less than 13.46 MJ·kg−1 in the two-pot method. The primary reason is that the secondary heating in the two-pot process consumes a significant amount of electricity (64.94 MJ), including N2 heating loss (3.82 MJ), and results in substantial energy loss during production. However, the one-pot method eliminates this step, reducing energy consumption.

Fig. 6
figure 6

Energy flow and economic assessment for treating 30 kg of bio-tar: a energy flow of one-pot strategy, b energy flow of two-pot strategy; c economic assessment

3.4.2 Economic assessment

From an economic perspective, one-pot polymerization activation is an effective means of converting bio-tar into high-value carbon materials, yielding a profit of $1.64 ~ $2.38 per kilogram of bio-tar processed (Additional file 1: Table S3), without considering the initial investment and labor costs (Fig. 6c). Assuming normal operation, the project would produce 1,500 kg of activated carbon from 9000 kg of bio-tar annually, generating a revenue of $147.86 ~ $213.86 thousand. In terms of input costs (Fu and Grant 2015; Choy et al. 2005), the consumption of KOH and N2 accounts for 84% of the total expenditure. Note that this analysis is based on a batch processing system. By implementing a scaled-up strategy, partial KOH recovery and more efficient N2 utilization can be achieved, leading to reduced operational costs and ultimately higher economic returns. Further investigations are required to consider various aspects of continuous operation, such as initial investment, productivity, and labor costs. Such studies would be of great significance for the commercial application of bio-tar.

4 Conclusions

In this study, waste bio-tar was successfully converted into porous carbon materials by dual-activation synthesis and applied to supercapacitors. N-doping efficiency and porosity of the bio-tar derived electrodes from individual activation were significantly enhanced by the dual activation approach, and the activation effects were synergistically reinforced in the one-pot strategy. The reaction processes and mechanisms of the dual-activation approach at various stages were inferred through multiple characterization analyses. In addition, the porous carbon derived from the one-pot strategy exhibited the highest capacitance (309.5 F·g−1 at 0.5 A·g−1) in the three-electrode configuration and achieved 80.1% retention after 10,000 cycles in a two-electrode symmetric system. Moreover, the one-pot dual-activation strategy of converting bio-tar into high-value carbon materials consumed 9.58 MJ·kg−1, and brought a profit of $1.64 ~ $2.38 per kilogram of bio-tar processed. The goal of future research is to further improve the yield of porous carbon from bio-tar and optimize the pore structure for a wider range of applications.