I. INTRODUCTION
Currently, tremendous research efforts have been attracted to explore clean and sustainable energy to power our civilization due to the growing population and limited supplies of fossil fuels.Reference Augustyn, Simon and Dunn1–Reference Feng, Song, Huang, Xu and Liu4 However, effective and feasible utilizations of these energy sources are still facing a number of challenges, such as seeking strategies to cope with the intermittent and unstable nature and uneven regional distribution of most sustainable energy sources.Reference Liu, Zhang, Song and Li5,Reference Zhai, Lu, Wang, Wang, Mathis, Liu, Li, Tong and Li6 Developing reliable energy storage devices that enable storage, employment, and distribution of the harvested, clean, and sustainable energy regardless of time, space, and location is therefore a promising strategy deserving long-term research endeavors.Reference Yu, Lin, Feng, Zeng, Tong and Lu7–Reference Zeng, Yu, Meng, Fang, Lu and Tong9
Supercapacitors, also known as electrochemical capacitors or ultracapacitors, are a family of energy storage device competent to store and release energy with ultrahigh power and super-short time (e.g., in seconds or even sub-seconds).Reference Lu, Liu, Zhai, Wang, Yu, Xie, Ling, Liang, Tong and Li10–Reference Yao, Huang, Zhang, Gao, Wu, Cheng, Xiao, Wang, Li and Zhou15 The remarkable power density of supercapacitors is at the root of their charge storage mechanisms, i.e., by forming electrical double layer capacitance (EDLC) and/or proceeding with pseudocapacitive reactions.Reference Augustyn, Simon and Dunn1 EDLC comes from the electrostatic charge accumulated at the electrolyte/electrode interfaces. Therefore, it is highly dependent on the ion-accessible surface area of the electrode materials.Reference Zhang, Liu, Li, Yu, Luo, Tong and Li16 Pseudocapaitance is associated with reversible and fast faradic reactions, which include under-potential deposition, surface, and sub-surface redox reactions and intercalation processes without triggering phase changes.Reference Augustyn, Simon and Dunn1,Reference Song, Liu, Qian, Zhu, Yao, Duoss, Spadaccini, Worsley and Li17 Whether EDLC or pseudocapacitance, boosting the number of electrons that can be stored in the electrolyte/electrode interfaces is critical for enhancing the capacitance of supercapacitors. Though pseodocapacitive materials in general have large theoretical capacitances, their poor electrical conductivity accompanied with sluggish ion diffusion are the two major culprits that limit their capacitive performance.Reference Song, Liu, Yao, Li, Kou, Huang, Feng, Wang, Tong, Liu and Li12,Reference Song, Liu, Yao, Kou, Feng, Liu and Li13,Reference Yao, Zhang, Kou, Song, Liu and Li18
Alternatively, EDLC materials, such as activated carbon, carbon nanotube, and graphene, are capable of charging and discharging more rapidly than pseudocapacitive materials due to their remarkable electrical conductivity. Yet, the specific capacitance of carbon materials is still in the range of 100–200 F/g for decades.Reference Liu, Zhang, Song and Li5,Reference Zhang, Liu, Li, Yu, Luo, Tong and Li16 It is reported that porous carbon-based materials suffer from the electrode kinetics problems that are raised from the inner pore ion transport. The exact mechanism of the ion transport in the porous carbon matrix is very complicated since many factors, such as size distribution, the tortuosity, the connectivity, the shape of the pores, the chemistry of the electrolyte, as well as the electrode/electrolyte interfaces, all need to be carefully considered.Reference Wang, Li, Liu, Lu and Cheng19 Among these complicated factors, the resistance of the ion transport in the inner pores and the ion diffusion distance are the most critical ones. Large ion transport resistance and long ion diffusion distance will lead to a significantly increased current–potential drop (IR drop) and low ion-accessible surface area at fast charging and discharging rates therefore leading to a severe capacitive fade. Simply increasing the specific surface area of carbon materials by introducing large population of micropores could unlikely further push their capacitance significantly because some micropores remain inaccessible for ions in electrolytes.Reference Liu, Zhang, Song and Li5,Reference Song, Liu, Qian, Zhu, Yao, Duoss, Spadaccini, Worsley and Li17 For example, activated carbon usually has a high specific surface area of more than 1000 m2/g, but its specific capacitance usually lingers around 100 F/g because of the excessive inaccessible micropores.Reference Liu, Zhang, Song and Li5
Recently, porous carbon materials with hierarchical porous structures have been intensively studied.Reference Chen, Zhang, Liang, Kong, Guan, Chen, Wu and Yu2,Reference Zhang, Lin, Lin, Yin, Lu, Liu and Zhao20–Reference Yuan, Zhou, Zhou, Zou, Mo and Xia22 At this stage, the exact requirement for hierarchical porosity is that the porous materials must contain at least two kinds of pores.Reference Liu, Zhang, Song and Li5 It is known that pores can be classified into three categories based on the pore width (i.e., macropores, pore width is larger than 50 nm; mesopores, pore width is between 2 and 50 nm; and micropores, pore width is smaller than 2 nm).Reference Song, Liu, Qian, Zhu, Yao, Duoss, Spadaccini, Worsley and Li17 For energy storage applications, these multiscale pores should be interconnected with each other for ion transport. Hierarchical porous carbon materials with multisized pores can augment the ion-accessible surface area and concurrently facilitate ion diffusion via providing a reduced diffusion distance.Reference Wang, Li, Liu, Lu and Cheng19 The macro and mesopores can act as ion-buffering reservoirs to minimize the ion diffusion distance to the inner surface of the materials. Hard template (such as silica templates,Reference Chaudhari, Kwon and Yu23 metal oxide templates,Reference Wang, Yan, Wang, Wei, Zhang, Jing and Fan24 salt templates,Reference Zhu, Li, He, Zhao, Liu, Shi and Zhang25 organic templates,Reference Ewert, Weingarth, Denner, Friedrich, Zeiger, Schreiber, Jäckel, Presser and Kempe26 and ice templatesReference Zhang, Liu, Li, Yu, Luo, Tong and Li16) and soft template (surfactant templates,Reference Liu, Zhang, Song and Li5 and polymer templatesReference Dutta, Bhaumik and Wu3) methods have been generally used in fabricating hierarchical porous carbon materials. For example, Zhang and Liu et al. recently developed a highly porous and self-standing carbon foam with a nitrogen-doped multiscale pore network through the silica and ice template method.Reference Zhang, Liu, Li, Yu, Luo, Tong and Li16 After performing KOH activation, the surface area of the obtained carbon foam reached nearly 3000 m2/g. In conjunction with the excellent electrical conductivity as well as the hierarchical porosity involving micropores, mesopores, sub-micron pores, and large micropores, this foam delivered a specific capacitance of 236 F/g at a ultrahigh current density of 500 A/g, which has never been achieved before. Moreover, recent studies also demonstrated that heteroatom (e.g., N, O, P, B) doping in carbon was potent to boost the electrical conductivity, improve the wettability, and contribute pseudocapacitance, all of which are favorable for further advancing the capacitive performance.Reference Dutta, Bhaumik and Wu3,Reference Han, Xu, Ding, Pan, Dou and MacFarlane27–Reference Qie, Chen, Xu, Xiong, Jiang, Zou, Hu, Xin, Zhang and Huang30 These surface functionalities or doped heteroatoms play critical roles to enhance the semiconducting, mechanical, and electrical properties of the carbon materials.Reference Dutta, Bhaumik and Wu3 Currently, extensive attentions have been attracted to employ reversible redox reactions to further improve the performance of carbon materials. Oxygen functional groups, such as phenol or quinone/hydroquinones, can contribute one electron to the redox reactions. Phosphorus atoms can stabilize O groups during the gas phase catalysis and the charge storage process, which improves the reaction selectivity and stability. While boron atoms doped in the carbon matrix can enhance the reactivity of the carbon surface, the nitrogen doping is able to induce a shift of the Fermi level to the valence band in the carbon materials, which is important for enhancing the performance of the capacitive electrodes.Reference Dutta, Bhaumik and Wu3 Typically, there are two categories of methods to synthesize heteroatom-doped carbon electrodes. Pyrolysis of nitrogen-containing precursors (e.g., biomass materials and polymers) in chemically inert atmosphere is one strategy. For example, Qie et al. reported a 3D hierarchical porous carbon structure fabricated through a facile chemical activation process using polypyrrole microsheets as the precursor.Reference Qie, Chen, Xu, Xiong, Jiang, Zou, Hu, Xin, Zhang and Huang30 The synthesized carbon structure possessed a high-level heteroatom doping with 7.7 at.% of N and 12.4 at.% of O and a specific surface area of 2870 m2/g. It exhibited a high specific capacitance of 236 F/g at a current density of 2 A/g and 182 F/g at 30 A/g. Another class of method is to anneal carbon materials at high temperatures in ammonia.Reference Dutta, Bhaumik and Wu3,Reference Luo, Wang, Heron, Allen, Morre, Maier, Stickle and Ji31 It is reported that nitrogen atoms can be doped into carbon in ammonia at a temperature as low as 550 °C.Reference Luo, Wang, Heron, Allen, Morre, Maier, Stickle and Ji31 These incorporated N sites can further react with NH3, introducing micro and/or mesopores and, therefore, increasing the surface area.Reference Luo, Wang, Heron, Allen, Morre, Maier, Stickle and Ji31
Herein in this work, we integrated the aforementioned two protocols together and developed novel nitrogen-doped carbon “spider webs” supported on the carbon cloth via pyrolysis of polyaniline nanofibers, a widely used nitrogen-containing conducting polymer, directly in ammonia atmosphere. Experimental characteristics illustrated that this strategy gave birth to a higher N doping level and larger ion-accessible surface area than those of the samples annealed in the conventional inert atmosphere (e.g., N2 or Ar) and thus provide higher electrical conductivity and a better rate performance. The as-prepared carbon “spider web” (PA700) exhibited a large gravimetric capacitance of 266 F/g at a scan rate of 2 mV/s. Even at a high scan rate of 500 mV/s, PA700 can still retain a capacitance of 164 F/g, evidencing its excellent rate capability. These values are substantially higher than those of the control samples treated in N2. In addition, PA700 also showed good cycling stability, with 90% capacitance retention after 5000 charging/discharging cycles. We believe this work demonstrated here can encourage other researchers to further explore a diverse array of heteroatom-doped carbons with other polymers, thus paving the way to further advance the performance of carbon-based supercapacitors.
II. EXPERIMENTAL SECTION
A. Materials
The carbon cloth (AvCarb carbon fabrics) was purchased from Fuel Cell Earth Company (Woburn, Massachusetts). The graphite foils were purchased from SLG group (Wiesbaden, German). Aniline (99%, analytical grade) and H2SO4 (98 wt%) were purchased from Fisher Scientific Company (Waltham, Massachusetts). Aniline was used after purified at 100 °C for 40 min under a pressure of 80 kPa. Other chemicals were used as received.
B. Preparation of heteroatom-doped arachnoid carbon materials
Polyaniline nanofibers (as precursors) were electrochemically deposited on a commercial carbon cloth (1 × 1 cm) via an electro-oxidation method. First, 0.1 M aniline and 0.5 M H2SO4 were used as the electroplating solution. Electrochemical deposition was conducted via a cyclic voltammetry technology from −0.3 to 0.8 V versus SCE at a scan rate of 50 mV/s for 60 cycles in a three-electrode electrolytic cell using the carbon cloth, saturated calomel electrode (SCE), and graphite foil as the working electrode, reference electrode, and counter electrode, respectively. The as-prepared polyaniline electrode was washed by deionized water and ethyl alcohol for cleaning and then dried in a vacuum electric oven for 10 h at room temperature. Subsequently, the polyaniline precursor was annealed in ammonia atmosphere at 500 °C, 600 °C, and 700 °C for 1 h in a tube furnace to obtain PA500, PA600, and PA700 electrodes, respectively. As a control sample, the polyaniline nanofibers were also treated in nitrogen at 700 °C for 1 h, and the resultant sample is denoted as PN700. The mass loadings of the active materials were calculated by measuring the mass difference of the same electrodes before electrochemical deposition and after the annealing treatment using an analytical balance having a sensitivity of 0.01 mg (Citizen Scale, CX 265). The active mass loadings of the electrodes were kept the same of about 1 mg/cm2 by adjusting the electrodeposition duration.
C. Characterizations
A scanning electron microscope (SEM; FEI Quanta 3D FEG dual beam, Hillsboro, Oregon) was used to probe morphologies of the synthesized samples. X-ray photoelectron spectroscopy (XPS) was performed by an XPS spectrometer (ESCALAB 250Xi, Thermo Scientific Escalab, Waltham, Massachusetts) with Al Kα radiation (λ = 8.34 Å) as the excitation source. All the XPS data were calibrated using the C 1s peak at 284.6 eV as the reference. The mass loadings of the active materials were calculated by measuring the mass difference of the same electrodes before the electrochemical deposition and after the annealing treatment using an analytical balance having a sensitivity of 0.01 mg (Citizen Scale, CX 265, Mumbai, India). The ion-accessible surface area of the samples was qualitatively characterized via the UV-vis absorption spectra (U-3010, Hitachi, Tokyo, Japan), which were collected from the original methylene blue (MB) solution (8 mg/L in water) and the MB solutions after putting the samples in for 24 h. The samples were immersed into an 8 mg/L MB aqueous solution for 24 h. After that, some dye molecules were adsorbed on the carbon surface, and therefore the color intensities of the remaining MB solutions are lowered as some MB molecules adsorb on the electrode surface and are removed with the electrodes. The UV-vis absorption spectra collected from these MB solutions exhibit the typical absorption peaks for MB. Electrochemical performance of the single electrodes was evaluated via a three-electrode cell in a 1 M H2SO4 aqueous electrolyte using a CHI 660D electrochemical workstation (CH instruments Inc., Austin, Texas). A saturated calomel electrode (SCE) and graphite foil were used as the reference electrode and counter electrode, respectively. Cyclic voltammetry measurements were conducted in the three-electrode cell from −0.2 to 0.7 V versus SCE in 1 M H2SO4 electrolyte at different scan rates. Electrochemical impedance spectroscopy (EIS) was carried out at an open circuit potential of the testing electrode with a perturbation of 5 mV and a frequency range from 10 mHz to 20 kHz.
D. Calculations
The gravimetric capacitance of a single electrode from the cyclic voltammetry profile was evaluated based on Eq. (1):
where C g is the gravimetric capacitance in the unit of F/g, ΔU is the potential window (V), S is the area enclosed by the corresponding cyclic voltammograms (A V/g), v is the scan rate (V/s), and m is the mass loading of active materials on the electrode (mg).
III. RESULTS AND DISCUSSIONS
A. Morphologies and chemical composition characterization
A schematic illustration of our synthetic strategies is depicted in Fig. 1(a). The polyaniline nanofibers (serving as the carbon precursors) were first fabricated by cyclic voltammetry from −0.3 to 0.8 V versus SCE at a scan rate of 50 mV/s in a three-electrode cell filled with 0.1 M aniline and 0.5 M H2SO4 as the electrochemical plating electrolyte, as shown in the left side of Fig. 1(a). The carbon cloth, saturated calomel electrode (SCE), and graphite foil were used as the working electrode, reference electrode, and counter electrode, respectively. After the electrochemical deposition, polyaniline nanofibers with a diameter of 80–100 nm were uniformly deposited on the carbon fiber surface [Fig. 1(b)]. These nanofibers are interconnected with each other, forming a highly porous 3D network, which is beneficial for ion and charge transport. The N-containing polymer, such as polyaniline, was widely used as the carbon precursor to fabricate N-doped porous carbon materials, benefiting from their high content of heteroatoms (N and O) and the intrinsic porous architectures. Therefore, polyaniline fibers were used as the precursor to further conduct the annealing treatment. After annealing in N2 for 1 h, the fiber-based structure was mostly preserved with some observable partial aggregations that can be attributed to the melting of polyaniline at such a high temperature [Fig. 1(c)]. These aggregations may decrease the ion-accessible surface area and block the ion diffusion in the porous carbon matrix, which can lead to a lower rate performance. Interestingly, a highly porous spider web-shaped structure can be seen after annealing the polyaniline precursor directly in ammonia atmosphere for 1 h [Fig. 1(d)]. Each carbon filament is interconnected with each other to build up the 3D hierarchical porous structures. As can be seen from the SEM images, these carbon webs are full of mesopores and macropores. The TEM image was also collected to confirm the mesoporosity in PA700. [Fig. 1(d) inset]. The mesopores ranging from 25 to 40 nm in PA700 were highlighted by the dashed lines. This observation provides direct evidence for the existence of mesopores in PA700. This bi-modal porosity can act as an ion-buffering reservoir to shorten the electrolyte ion diffusion distance to the inner part of the electrode surface therefore ensuring a superior rate capability for the material compared to its nonporous counterparts.Reference Song, Liu, Yao, Li, Kou, Huang, Feng, Wang, Tong, Liu and Li12 In addition, the interconnected carbon filaments afford multidirectional fast charge transfer expressways to largely reduce the charge transfer resistance of the electrode.Reference Zhang, Liu, Hou, Kou, Yue, Guan and Li21 This morphology transformation from the fiber-like structure to the novel spider web-shaped structure could be attributed to the melting and the burn off of the polyaniline in ammonia at such a high temperature. It is reported that nitrogen atoms can be doped into carbon in ammonia at a temperature as low as 550 °C.Reference Luo, Wang, Heron, Allen, Morre, Maier, Stickle and Ji31 These incorporated N sites can further react with NH3, introducing micro and/or mesopores and therefore inducing the morphology change.Reference Luo, Wang, Heron, Allen, Morre, Maier, Stickle and Ji31 In addition, ammonia can also react with the oxygen functional groups in the polymer chain to introduce N doping and etch the carbon matrix, leading to multiscale porosities.
(a) Schematic illustration of the major synthesis procedures for the nitrogen-doped spider-web-shaped carbon networks supported on carbon cloth. (b) The SEM image of the as-synthesized polyaniline fibers. (c) The SEM image of PN700 and (d) The SEM image of PA700. Inset shows the TEM image for PA700; the mesopores in PA700 are highlighted by the dashed lines.
To testify our hypothesis that the pyrolysis of polyaniline under ammonia atmosphere could increase the ion-accessible surface area, the UV-vis absorption spectra were collected for the original MB solution and the MB solutions after inserting and immersing samples of PANI, PN700, and PA700 for 24 h, respectively. The dye-adsorption method is widely used to qualitatively estimate the ion-accessible surface area of porous materials containing mesopores and macropores.Reference Feng, Song, Huang, Xu and Liu4,Reference Wang, Wang, Lu, Ling, Yu, Zhai, Tong and Li32 In a typical protocol, the sample is completely submerged into an 8 mg/L MB aqueous solution for 24 h. Afterward, a certain amount of dye molecules will adsorb on the sample surface, leading to a reduced color intensity of the MB solutions. Consequently, the MB concentration lessens the absorbance at the maximal absorption wave length of MB, which can be directly gauged by a UV-vis spectrometer. As can be seen from Fig. 2(a), all the UV-vis absorption spectra exhibit the typical pattern of MB, with the highest absorption peak observed at 665 nm. Among all the spectra, the maximal absorbance of the one measured after interacting with PA700 is the lowest. This observation confirms the hypothesis that PA700 has the largest surface area because it adsorbed the most MB molecules. This enhancement should be attributed to the highly porous structure derived from the pyrolysis of polyaniline in ammonia. The web carbon networks with multiscale pores can facilitate the ion diffusion into the interior parts of the materials and therefore are expected to achieve prominent rate capability and capacitance.
(a) UV-vis absorption spectra collected from the original MB solution (8 mg/L in water) and the MB solutions absorbed by the samples (PANI, PA700, and PN700). (b) The N 1s core-level XPS spectrum for PANI. (c) The N 1s core-level XPS spectrum for PN700. (d) The N 1s core-level XPS spectrum for PA700. (e) The O 1s core-level XPS spectrum for PN700. (f) The O 1s core-level XPS spectrum for PA700.

The chemical composition of all the synthesized samples is revealed by XPS and the results are summarized in Table I. XPS measurements were conducted by an XPS spectrometer (ESCALAB 250Xi, Thermo Scientific Escalab) with Al Kα radiation (λ = 8.34 Å) as the excitation source. All the XPS data were calibrated using the C 1s peak at 284.6 eV as the reference. Table I displays the element content of the samples derived from the XPS survey spectra, which are not shown here. This table presents the following points that are worth discussing. First, the heteroatom content (both N and O) of PN700 and PA700 is lower than that of PANI, as high-temperature carbonization processes are known to partly eliminate the heteratoms.Reference Yao, Zhang, Kou, Song, Liu and Li18 The oxygen atoms are expected to come from inherent dopants (e.g., sulfate ions in our case) and –OH or quinone groups in the over-oxidized polymer chain of PANI that is introduced during the electrochemical deposition process. It is reported that the electrochemical over oxidation of PANI produced benzoquinone/hydroquinone and p-aminophenol/benzoquinoneimine, which contain a large amount of oxygen functional groups.Reference Zhang, Zhou, Wang, Wu and Bai33 Second, the atomic content of N in PA700 is 9.72 at.%, higher than that of PN700 (7.72 at.%). The increment in the N content can be rationalized by some previous studies showing that ammonia can react with the oxygen functional groups anchored on the carbon surface at a temperature as low as 550 °C, leading to additional N doping.Reference Luo, Wang, Heron, Allen, Morre, Maier, Stickle and Ji31 Third, it is intuitive to conclude that the oxygen content of PA700 should be lower than that of PN700 as we claim that oxygen functionalities are prone to be converted to nitrogen functionalities by ammonia. However, we actually observed that the O content of PA700 slightly increased as compared to PN700. We need to emphasize here that it is not contradictory to our claim, as the carbon content of PA700 is appreciably lower than that of PN700. The “abnormal” observation suggests that ammonia preferably etched more carbon atoms rather than converting oxygen atoms, given the dominated concentration of carbon. In addition, the pyrolysis of PANI in N2 also burned off the oxygen functionalities on the carbon surface to produce CO2 evolution.
The element content of the samples derived from the XPS survey spectra.

To further identify the types of various functionalities varied by the ammonia annealing, XPS N 1s and O 1s core level spectra were collected. Figure 2(b) shows the N 1s core level spectrum of PANI, which is deconvoluted into three synthetic peaks associated with three different types of N functionalities: imine nitrogen (–N=, 398.7 eV), amine nitrogen (–NH–, 399.5 eV), and positively charged nitrogen (–N+–, 401.1 eV).Reference Luo, Kong, Jia, Luo, Lu, Zhang, Qiu, Li and Yu34,Reference Wang, Yao, Bi, Huang, Wang and Chen35 After the pyrolysis of PANI in N2 for 1 h, the surface functionalities were changed. As shown in Fig. 2(c), the N 1s core-level XPS spectrum of PN700 can be deconvoluted into three different types of N, i.e., pyridinic N (N-6, 398.3 eV), pyrrolic N (N-5, 399.8 eV), and quaternary N (N-Q, 400.8 eV).Reference Huang, Liu, Song, Li and Liu36–Reference Yang, Zhong, Bao, Zhou, Wei and Zhou38 Pyrrolic N (N-5) groups refer to the N atoms incorporated in the five-membered heterocyclic rings bonded with two adjacent carbon atoms. They contribute two p electrons to the C–N–C π system. N-6 groups exist at the edges of the carbon planes, linked with two adjacent carbon atoms and donating one p electron to the aromatic system. Quaternary N (N-Q) refers to the N atoms that are doped in a co-planar fashion into the graphite layers to substitute the carbon atoms in the hexagonal π system. The N-5 and N-6 groups generally locate at the edge of the graphite plane, while N-Q could be either at the edge or in the bulk. As shown in Fig. 2(d), the N 1s spectrum of PA700 can also be deconvoluted into three peaks, i.e., N-6 (398.4 eV), N-5 (399.9 eV), and N-Q (400.8 eV), respectively. However, the concentration ratio (evaluated by integrating the peak area of the corresponding synthetic peak and dividing it with the total peak area of all the synthetic peaks) of N in PA700 is in sharp contrast to that of PN700. PA700 shows a much higher content of N-Q (37.8%) than that in PN700 (18.8%). Since N-5 and N-6 are p-electron donors to the π system, they are expected to increase the electrical conductivity of the doped network. N-Q with positive charges serves as an electron acceptor, which facilitates electron transfer.Reference Yang, Zhong, Bao, Zhou, Wei and Zhou38,Reference Li, Xu, Wang, Ding, Zahiri, Holt, Tan and Mitlin39 Therefore, the different concentration ratios of the nitrogen functionalities introduced during the pyrolysis of PANI in ammonia or in nitrogen can induce different physical and chemical properties and thus affect the electrochemical properties of the as-prepared carbon materials.
The O 1s core-level XPS spectra of PN700 and PA700 were collected and can be deconvoluted into three synthetic peaks: quinone group at the binding energy of 530.6 eV, hydroxyl group (C–OH) at the binding energy of 531.9 eV, and the ether-type oxygen atoms in the esters and anhydrides (C–O–C) at the binding energy of 533.4 eV.Reference Huang, Liu, Song, Li and Liu36 As shown in Figs. 2(e) and 2(f), the atomic ratio of these oxygen functionalities in PN700 and PA700 are substantially different. These oxygen functionalities in carbon materials can react with NH3, forming the N-containing groups.Reference Luo, Wang, Heron, Allen, Morre, Maier, Stickle and Ji31 PA700 exhibited a much lower content of quinone group (21.8%) than that of PN700 (37.8%). This result indicates that ammonia may be more likely to remove quinone groups during the annealing treatment. In addition, it is reported that these oxygen functional groups can enhance the wettability of the electrode surface, which can facilitate the electrolyte infiltration into the interior parts of the porous electrode.Reference Huang, Liu, Song, Li and Liu36,Reference Li, Xu, Wang, Ding, Zahiri, Holt, Tan and Mitlin39 Moreover, the oxygen groups can also provide pseudocapacitance and, therefore, further improve the capacitive performance of the materials.Reference Song, Liu, Xu, Feng, Yao, Kou, Liu and Li40 Taking together, ammonia annealing brings the effect of enhancing N contents, in addition to improving the surface area as we discussed in the above paragraph. Both factors in principal improve the capacitive performance by rendering the enlarged surface area for charge accumulation, improved pseudocapacitance, as well as boosted water wettability and reduced charge transfer resistance.
B. Electrochemical performances of PANI, PN700 and PA700 electrodes
The electrochemical performances of the electrodes were tested in a three-electrode cell containing the 1 M H2SO4 electrolyte using SCE and graphite foil as the reference and counter electrodes, respectively. To optimize the annealing temperature in ammonia, PANI nanofibers were annealed at 500 °C, 600 °C, 700 °C, and 800 °C in a tube furnace for 1 h. The as-prepared samples were denoted as PA500, PA600, PA700, and PA800, respectively. Figure 3(a) exhibits the cyclic voltammetry curves of these samples at a scan rate of 100 mV/s. PA700 shows the significantly larger area enclosed by the CV curve than that of PA500, PA600, and PA800, indicating it achieved the largest capacitance at the tested scan rate. This may be attributed to the higher carbonization degree of the PANI precursor at a higher temperature (700 °C), which leads to better electrical conductivity.Reference Huang, Liu, Song, Li and Liu36 However, when the temperature was further increased from 700 to 800 °C, the content of the O and N functionalities would be decreased, leading to a decreased pseudocapacitive contribution.Reference Luo, Wang, Heron, Allen, Morre, Maier, Stickle and Ji31,Reference Huang, Liu, Song, Li and Liu36 Hence, we chose PA700 as the electrode to conduct the following experiments. Figure 3(b) shows the cyclic voltammetry curves of PA700 at different scan rates from 5 to 200 mV/s. These near-rectangular CV curves collected at all the scan rates evidence the excellent rate capability of PA700, which can realize fast charging and discharging without compromising too much of the electrode’s performance. Comparison of the CV curves of PA700 and PN700 at a scan rate of 100 mV/s is shown in Fig. 3(c). The enclosed CV area of PA700 is substantially larger than that of PN700, meaning its higher electrochemical activities. In addition, a couple of reversible redox peaks were observed in the cyclic voltammetry profile of PA700, whereas that of PN700 shows none. This echoes the fact that different chemical compositions (i.e., with different contents of heteroatom doping) influences the electrochemical behavior. The higher N doping level of PA700 compared with that of PN700 may be the reason for the discernible redox peaks. The gravimetric capacitances of PA700 and PN700 at different scan rates are shown in Fig. 3(d). PN700 shows a medium gravimetric capacitance of 218 F/g at a scan rate of 2 mV/s. When the scan rate was increased 250 times to 500 mV/s, only 32% of the capacitance retention (70 F/g) can be retained. However, PA700 can deliver high specific capacitances of 266 F/g, 253 F/g, 245 F/g, 242 F/g, 230 F/g, 218 F/g, 200 F/g, and 164 F/g at scan rates of 2 mV/s, 5 mV/s, 10 mV/s, 20 mV/s, 50 mV/s, 100 mV/s, 200 mV/s, and 500 mV/s, respectively. PA700 also exhibits an excellent rate performance with a capacitance retention of 61% when the scan rate increased from 2 to 500 mV/s (250 times). These high gravimetric capacitances and excellent rate performances are much better than those of the recently reported N-doped carbon materials, such as a nitrogen-doped activated carbon CA800 (235 F/g at current density of 1 A/g, and 67% capacitance retention when the current density increased 11 times from 1 to 11 A/g),Reference Li, Liu, Li, Yang, Shen, Huang, Xiang and Li41 N-enriched carbon nanowires NE-CNWs-700 (∼210 F/g at current density of 2 A/g, and 61% capacitance retention when the current density increased 50 times from 0.1 to 5 A/g),Reference Yuan, Zhou, Zhou, Zou, Mo and Xia22 N-doped hollow carbon spheres PNHCS (213 F/g at current density of 0.5 A/g, and 55.6% capacitance retention when the current density increased 20 times from 0.5 to 10 A/g),Reference Han, Xu, Ding, Pan, Dou and MacFarlane27 heteroatom-doped carbon NOC-500 (141 F/g at current density of 0.43 A/g, and 57% capacitance retention when the current density increased 100 times from 0.43 to 43 A/g),Reference Huang, Liu, Song, Li and Liu36 N-doped porous carbon nanofibers N-CNFs-900 (202 F/g at current density of 1 A/g, and 81% capacitance retention when the current density increased 30 times from 1 to 30 A/g)2, Lignin-derived hierarchical porous carbon LHPC (165 F/g at current density of 0.05 A/g, and 74% capacitance retention when the current density increased 200 times from 0.05 to 10 A/g),Reference Zhang, Lin, Lin, Yin, Lu, Liu and Zhao20 and hierarchical porous carbon foams HPCFs (206 F/g at current density of 1 A/g, and 88% capacitance retention when the current density increased 10 times from 1 to 10 A/g).Reference Zhang, Liu, Hou, Kou, Yue, Guan and Li21 These results undoubtedly confirm that our PA700 exhibits great potential as a high-performance supercapacitor electrode capable of being charged and discharged quickly.
(a) CVs of PANI annealed at different temperatures (500, 600, 700, and 800 °C) in ammonia. (b) CVs of PA700 at different scan rates from 5 to 200 mV/s. (c) CVs of PA700 and PN700 at a scan rate of 100 mV/s. (d) Specific capacitance of PA700 and PN700 as a function of the scan rate (rate capability performance).

Additionally, we also carried out EIS, which can give more information about the enhanced capacitive performance of PA700. Therefore, the EIS data of PA700 and PN700 were collected at an open circuit potential with a perturbation of 5 mV in a the frequency range from 10 mHz to 20 kHz using the CHI 660D electrochemical workstation. EIS tests were also conducted in a conventional three-electrode cell, using PN700 and PA700, SCE electrode, as well as graphite foil as the working electrode, reference electrode, and counter electrode, respectively. Nyquist plots of both electrodes are shown in Fig. 4. Both plots display a semicircle in the high-frequency region, followed by linear line leans at a scant of 45° in the medium-frequency region and a near-vertical linear spike in the low-frequency domain. These characteristics represent the near-ideal capacitive performance of the tested electrodes.Reference Song, Liu, Yao, Li, Kou, Huang, Feng, Wang, Tong, Liu and Li12,Reference Song, Xu and Liu42 The intercept at the horizontal axis in the high-frequency region refers to the equivalent series resistance of the electrode.Reference Song, Xu and Liu42 PA700 exhibits a negligible equivalent series resistance of ∼0.48 Ω as a result of its excellent electrical conductivity. This value is smaller than that of some other reported carbon-based materials, such as N-doped activated carbon CA800 (0.75 Ω),Reference Li, Liu, Li, Yang, Shen, Huang, Xiang and Li41 hetero-atom doped carbon NOC-500 (0.96 Ω),Reference Huang, Liu, Song, Li and Liu36 carbonized eggshell membrane CESM-300 (2.1 Ω),Reference Li, Zhang, Amirkhiz, Tan, Xu, Wang, Olsen, Holt and Mitlin43 and 3D graphene foam 3DGH (3.8 Ω).Reference Zhai, Lu, Wang, Wang, Mathis, Liu, Li, Tong and Li6 The charge transfer resistance (R ct) of the electrode can be evaluated from the diameter of the semicircle in the real part.Reference Song, Liu, Yao, Li, Kou, Huang, Feng, Wang, Tong, Liu and Li12 PA700 also shows substantially smaller charge transfer (the diameter of the semi-circle) resistance than that of PN700, indicating its faster charge transfer kinetics on the electrode surface. This should be attributed to the ammonia treatment which introduced a higher content of N-Q, as shown in Figs. 2(c) and 2(d). N-Q can exhibit positive charge properties and induce electron acceptors, which could facilitate the charge transfer of the carbon materials.Reference Yang, Zhong, Bao, Zhou, Wei and Zhou38,Reference Li, Xu, Wang, Ding, Zahiri, Holt, Tan and Mitlin39 Therefore, these EIS data further confirm the advantages of our ammonia treatment in improving the capacitive performance of the porous carbon materials.
EIS study of PA700 and PN700 electrodes: Nyquist plots for PA700 and PN700. EIS was carried out at open circuit potentials with a perturbation of 5 mV in a frequency range from 10 mHz to 20 kHz.

Cycling stability is one of the most importance factors that affects the practical applications of the supercapacitor electrodes. Therefore, to evaluate the practicable application of PA700, cyclic voltammetry was conducted at a fast scan rate of 200 mV/s for 5000 cycles in a three-electrode system. As shown in Fig. 5, PA700 exhibits a good cycling stability of ∼90% capacitance retention after 5000 charging and discharging cycles. The slightly decreased capacitance could be ascribed to the partial loss of the O and/or N functionalities on the carbon matrix, which can also be observed in the other reported heteroatom-doped carbon materials.Reference Yu, Lin, Feng, Zeng, Tong and Lu7,Reference Huang, Liu, Song, Li and Liu36 The inset of Fig. 5 shows the cyclic voltammetry curves of the first cycle and the 5000th cycle for PA700 during the cycling test. The enclosed area of the cyclic voltammetry curves is similar, further confirming its good cycling stability. In addition, after the long-term cycling stability tests, the reversible redox peaks at about 0.3 V versus SCE still can be observed in the CV curve of the cycled sample (the inset in Fig. 5), indicating that the introduced heteroatoms in the carbon matrix of PA700 was electrochemically stable.
Cycling stability of PA700 at a scan rate of 200 mV/s during 5000 charge–discharge testing cycles. Inset shows the CV curve collected at the first cycle and the 5000th cycle.

To sum up, we ascribe the excellent capacitive performance of PA700 for the following reasons. First, the nitrogen-doped “spider webs” carbon materials can provide multiscale pore structures (e.g., macropores and mesopores). These interconnected hierarchical pores can act as ion-buffering reservoirs to shorten the ion diffusion distance to the interior part of the electrode surface. Second, the pyrolysis of polyaniline under ammonia without the structural aggregation can realize a higher ion-accessible surface area than that of the conventional nitrogen-treated sample. Third, the additional introduced N-containing functionalities via the ammonia treatment can provide stable pseudocapacitive properties for the electrode. In addition, the enhanced content of N-Q during ammonia treatment that can exhibit positive charge properties and induce electron acceptors reduces the charge transfer resistance of the carbon materials.
IV. CONCLUSION
Herein, a highly porous nitrogen-doped carbon “spider web” is developed via the pyrolysis of polyaniline in ammonia atmosphere. The hierarchical porosity in the “spider web” structures can provide a large ion-accessible surface area and shorten the ion diffusion distance, which are good for facilitating the electrode transport kinetics. Comparing with the conventional annealing treatment under the inert atmosphere, ammonia treatment can introduce more N-containing functionalities into the yielded carbon structures. These introduced N functional groups can not only provide pseudocapacitance but also induce improved electrical conductivity for the carbon materials. Therefore, the PA700 electrode exhibited a specific capacitance of 164 F/g at a scan rate of 500 mV/s, whereas PN700 only achieved 70 F/g at the same scan rate. In addition, PA700 also exhibited a good cycling stability of ∼90% capacitance retention in 5000 cycles. These results undoubtedly confirm that our PA700 electrode is a type of promising supercapacitor electrode with the ability of fast charging and discharging. Our work could open up endless opportunity for the fabrication of other heteroatom-doped carbon electrodes from other polymers carbonization at high temperatures.
ACKNOWLEDGMENTS
Xiao-Xia Liu gratefully acknowledges financial support from National Natural Science Foundation of China (Nos. 21273029 and 21673035). Yat Li acknowledges support by National Aeronautics and Space Administration (NASA) Grant No. NNX15AQ01. Yu Song acknowledges the financial support from China Scholarship Council. We also acknowledge the help for SEM image acquisition offered by Dr. Tom Yuzvinsky from the W.M. Keck Center for Nanoscale Opto-fluidics at the University of California, Santa Cruz.





