Influence of Nitrogen and Sulfur Doping of Carbon Xerogels on the Performance and Stability of Counter Electrodes in Dye Sensitized Solar Cells

In this work, carbon xerogels (CXGs) doped with nitrogen or sulfur have been investigated as DSSC counter electrodes. CXGs have been prepared by a sol–gel method from resorcinol and formaldehyde and subsequent carbonization. Nitrogen doping has been carried out by introducing melamine into the synthesis process along with resorcinol and formaldehyde, while sulfur has been incorporated by direct reaction of the carbon material with elemental sulfur. The counter electrodes for DSSCs have been prepared by airbrushing on conductive glass (fluorine-doped tin oxide, FTO), and their electrochemical behavior has been evaluated, observing that the introduction of heteroatoms such as nitrogen or sulfur leads to an improvement in efficiency compared to the undoped material thanks to a decrease in charge transfer resistance.


Introduction
Dye-sensitized solar cells are good candidates for next-generation photovoltaic devices due to their low cost, simple fabrication process, and suitable power conversion efficiency [1][2][3][4].A conventional DSSC consists of a photoanode (PA) based on dye-sensitized titanium dioxide (TiO 2 ) film, an electrolyte containing iodide/triiodide redox couples, and a counter electrode (CE) based on a platinum thin film.The counter electrode collects electrons from the external circuit and reduces the triiodide (I 3 − ) to iodide (I − ), used as a mediator in regenerating the sensitizer after electron injection into the photo-anode [5][6][7][8].A fast reduction reaction at the counter electrode can significantly increase the performance of a DSSC [9,10].Therefore, considering its crucial role for efficient DSSCs, the ideal counter electrode material must have good electrical conductivity, catalytic activity, and chemical stability.
The most commonly used counter electrode material is Pt, deposited onto a conductive fluorine-doped tin oxide (FTO) or indium-doped tin oxide (ITO) glass substrates, due to its excellent electrocatalytic activity for I 3 − reduction and high electrical conductivity for efficient electron transport [11][12][13].Still, its high cost and corrosive characteristics in currently used electrolytes hinders its practical application in long-term DSSC devices [14].Low-cost alternative candidates to Pt, such as carbonaceous materials [15][16][17][18][19], conductive polymers [20], metal sulfides [21][22][23], metal phosphides [24], metal selenides [25,26], oxides [27], and other cost-effective materials [28], have been widely investigated and have demonstrated good catalytic performance for triiodide reduction.In particular, carbonaceous materials are attractive to replace platinum due to their high electronic conductivity, good stability, high reactivity for triiodide reduction, and low cost [29].The lower intrinsic catalytic activity of carbon compared to platinum can be compensated by the considerably larger active surface area of the electrode structure that characterizes porous carbon materials, providing many reduction sites and hence a low charge transfer resistance.Carbonaceous materials show impressive electrocatalytic activity because of their multi-edge porous morphology, which provides active sites for electrochemical reactions and high corrosion resistance toward liquid electrolytes.Among the various allotropes of carbon, amorphous porous carbons with a high specific surface area and unique porous structure are good candidates as CE materials for DSSCs.In particular, carbon gels (aero-, cryo-, and xerogels) are nanoporous carbons that are widely employed in energy-related applications.Both carbon aerogels and cryogels have been previously used as CE, with good performances [30][31][32].However, the synthesis of carbon aerogels and cryogels are expensive and time-consuming, whereas carbon xerogels are easier to produce.These carbon materials possess unique properties (mesoporosity, high purity, electrical conductivity, etc.) that can be further tuned by doping with heteroatoms, such as N, S, B, or P [33][34][35].Nitrogen-doped carbon xerogels have already been studied for different catalytic applications, such as hydrogen adsorption, removal of contaminants, lithium batteries, catalyst supports for fuel cells, etc. [36][37][38][39][40][41][42].Doping carbon materials with nitrogen or sulfur not only improves their conductivity, as has been previously established [34,43], but also the activity and durability of the catalysts due to the introduction of both nitrogen/sulfur functionalities and structural defects [22][23][24][25][26][27][28][29]32].
In the present work, nitrogen-doped and sulfur-doped carbon xerogels are synthesized and compared to bare carbon xerogels as CEs in DSSCs.It appears that the doping strategy leads to an improvement in DSSC performance, maintaining proper stability with cycling.

Synthesis and Doping of Carbon Xerogels
Carbon xerogels (CXGs) were synthesized as in previous works [34,43], following a solgel method widely used in the literature for these kinds of materials [44][45][46].Appropriate amounts of reagents were mixed and stirred in deionized water for 30 min: 1.16 mg mL −1 sodium carbonate, 0.20 g mL −1 formaldehyde, and 0.35 g mL −1 resorcinol.The pH solution was adjusted to 6 by adding some drops of diluted nitric acid and stirred for another 30 min.Afterward, the mixture was poured into closed vials that were placed in an oven to cure and form the gels using the following procedure: 24 h at 25 • C, 24 h at 50 • C, and 72 h at 85 • C. The resulting gel was sub-critically dried in air, 5 h at 65 • C and 5 h at 110 • C.Then, the obtained powder was pyrolyzed in N 2 atmosphere in a tubular furnace for 2 h at 150 • C; 1 h at 300 • C; 1 h at 600 • C and 2 h at 800 • C, using a heating rate of 2 • C min −1 in all cases.
Nitrogen doping was carried out by incorporating melamine in the precursor mixture (resorcinol, formaldehyde and sodium carbonate).In this case, 3.48 mg mL −1 of sodium carbonate, 0.14 g mL −1 of melamine and 0.35 g mL −1 of resorcinol were mixed and stirred in distilled water at 90 • C until the solution became yellow and transparent.Afterward, the yellow solution was cooled down to room temperature before adding the formaldehyde (0.20 g mL −1 formaldehyde) to the mixture that was stirred for another 30 min, prior to pouring it into closed vials.The mixture followed then the same curing, drying and pyrolysis procedures as previously described for the undoped CXG.Sulfur doping was carried out by a sulfurization process as in a previous work [34], consisting of direct reaction of elemental sulfur (Sigma-Aldrich, Burlington, MA, USA) with the carbon xerogel to obtain a nominal 5 wt.% of sulfur.The mixture of S and CXG was heat-treated at 160 • C for 12 h in Ar.Afterward, a leaching procedure with toluene was carried out to dissolve eventual traces of free-sulfur not anchored to the carbon xerogel matrix.Other parameters obtained included the pore volume, calculated by the single-point method, and the average pore size, obtained from the Barrett-Joyner-Halenda (BJH) method.XPS spectra were acquired with an ESCA Plus Omicron spectrometer (Scientia Omicron, Uppsala, Sweden) set with a Mg anode (1253.6 eV), 150 W power, over an area of 1.75 mm × 2.75 mm.C1s, N1s, and S2p signals were attained at 0.1 eV step, 0.5 s dwell, and 20 eV pass energy.Data analysis and quantification were performed using CasaXPS software (Casa Software Ltd., CasaXPS Version 2.3.15,Teignmouth, United Kingdom).considering a Shirley background subtraction and a line shape consisting of Gaussian-Lorentzian (70:30) line.Elemental analysis was employed to determine the chemical composition (C, N, S and H) of the doped samples using a Thermo Flash 1112 analyzer (Thermoscientific, Waltham, MA, USA).
To prepare the counter electrodes, doped and undoped carbon xerogels were mixed with 15 wt.%TiO 2 (Degussa P90) as a binder and dispersed in ethanol.Then the slurry of carbon materials was sprayed onto FTO/glass substrates, followed by a sintering process in inert atmosphere at 450 • C for 10 min.For the sake of comparison, Pt counter electrodes were prepared similarly by depositing H 2 PtCl 6 aqueous solution (5 mM) on FTO/glass substrate and subsequent sintering at 450 • C for 30 min.
The photo-anodes were obtained by spraying a thin film of TiO 2 aqueous solution, obtained from TiCl 4 (40 mM), and then following a spray coating deposition of TiO 2 paste commercial powder (Degussa P90) dispersed in water and iso-propyl alcohol (50% v/v) and Triton surfactant, onto the FTO [37].Subsequently, the photo-anodes were sintered at 450 • C in air for 30 min to allow the TiO 2 nanocrystals to partially melt together to assure electrical contact and mechanical adhesion on the FTO.The last step consists of dye sensitization by immersing the photo-anodes in 0.5 mM ruthenium dye solution (N719, Solaronix, cis-diisothiocyanato-bis(2,2 -bipyridyl-4,4 -dicarboxylato) ruthenium(II) bis(tetrabutylammonium)) in ethanol for 18 h.
The liquid electrolyte consisted of 0.4 M LiI, 0.04 M I 2 , 0.3 M 4-tertbutylpyridine (TBP) and 0.4 M tetrabutylammonium iodide (TBAI) in acetonitrile.A spacer (Surlyn ® SX1170-60, Solaronix SA, Aubonne, Switzerland) with a thickness of 60 µm was used to contain the electrolyte between the photo-anode and the counter electrode.The active area of the cells was 0.28 cm 2 (circle of 6 mm diameter).
The DSSCs operating under simulated solar illumination were connected to an Autolab Potentiostat/Galvanostat (Metrohm) equipped with a frequency response analyzer (FRA).Polarization curves of the assembled DSSC were registered under simulated AM 1.5 solar illumination (Osram, 300 W) at room temperature.For this, the incident light intensity was adjusted to 100 mW cm −2 with a photometer (3M Photodine Inc.) (3M, Madrid, Spain).Electrochemical impedance spectroscopy (EIS) experiments were carried out in the frequency range 100 mHz-100 kHz at the open-circuit potential (OCP), with an amplitude of 0.01 V rms.Series (R s ) and charge transfer resistances (R ct ) were calculated from the intercept of the Nyquist plot at zero imaginary impedance at high frequency (R s ) and low frequency (R s + R ct ), respectively.

Physical-Chemical Characterization
Carbon xerogels were thoroughly characterized by several characterization techniques.Table 1 shows the textural features of CXG, N-CXG and S-CXG obtained from the N 2 adsorption-desorption isotherms, shown in Figure 1.

Carbon Material
Ø pore [ The pristine CXG presents both high surface area and pore volume of 660 m 2 g −1 and 1.79 cm 3 g −1 , respectively, mostly coming from wide mesopores, 23 nm wide, representing 90% of the porosity of the material (Vmeso = 1.64 cm 3 g −1 ).Upon doping, these features decrease, but N and S-doped CXG still present high values of surface area and porosity, namely, 495 m 2 g −1 for the N-CXG and 387 m 2 g −1 for the S-CXG.In general, N-doped carbon xerogels present lower porosity values, since the porous structure of melamine-formaldehyde mixtures are usually more fragile (lower mechanical strength) and thus are more prone to collapse upon drying [43].S-CXG also presents lower values of surface area, pore volume and average pore size (with respect to the pristine CXG).It has been established that sulfur molecules (S6 and S8) formed during the sulfurization process can only access to large pores, which explains the decrease in both mesoporous volume and average pore size [34,47].The chemical composition of the carbon materials was investigated by means of elemental analysis and X-ray photoelectron spectra.Table 2 shows the atomic and weight percentages of C, N and S for the different materials, and Figure 2  The pristine CXG presents both high surface area and pore volume of 660 m 2 g −1 and 1.79 cm 3 g −1 , respectively, mostly coming from wide mesopores, 23 nm wide, representing 90% of the porosity of the material (V meso = 1.64 cm 3 g −1 ).Upon doping, these features decrease, but N and S-doped CXG still present high values of surface area and porosity, namely, 495 m 2 g −1 for the N-CXG and 387 m 2 g −1 for the S-CXG.In general, N-doped carbon xerogels present lower porosity values, since the porous structure of melamineformaldehyde mixtures are usually more fragile (lower mechanical strength) and thus are more prone to collapse upon drying [43].S-CXG also presents lower values of surface area, pore volume and average pore size (with respect to the pristine CXG).It has been established that sulfur molecules (S 6 and S 8 ) formed during the sulfurization process can only access to large pores, which explains the decrease in both mesoporous volume and average pore size [34,47].
The chemical composition of the carbon materials was investigated by means of elemental analysis and X-ray photoelectron spectra.Table 2 shows the atomic and weight percentages of C, N and S for the different materials, and Figure 2 shows the speciation obtained from the deconvolution of the XPS spectra for N1s and S2p orbitals.Doped carbon xerogels present a similar weight % of the heteroatom (N or S), namely, 3.4 wt.% of N and 4.2 wt.% of S.   XPS spectra were deconvoluted for each doped sample.N-CXG (Figure 2a) presented five N functionalities: pyridinic N (398.2eV), pyrrolic N and pyridonic N (399.7 eV), graphitic N (401.0eV), and oxidized N (403 eV).N-CXG presents an important XPS spectra were deconvoluted for each doped sample.N-CXG (Figure 2a) presented five N functionalities: pyridinic N (398.2eV), pyrrolic N and pyridonic N (399.7 eV), graphitic N (401.0eV), and oxidized N (403 eV).N-CXG presents an important contribution of N-pyrrole (54 at.%), followed by N-pyridine (30.8 at.%), and a small amount of graphitic N (7.9%).On the other hand, S-CXG (Figure 2b) was composed of two contributions: a doublet at 164-166 eV associated to carbon-bonded sulfur (C-S-C, 86 at.%), and a second doublet at 168-170 eV, ascribed to high-valence sulfur of sulfate or sulfate-like species (representing the 14 at.%).

Electrochemical Characterization
DSSC cells were assembled with the bare CXG and the two doped CXG as c electrodes, and their photocurrent-voltage (j-V) characteristics are depicted in Fi The most relevant photovoltaic parameters are summarized in Table 3.

Electrochemical Characterization
DSSC cells were assembled with the bare CXG and the two doped CXG as counter electrodes, and their photocurrent-voltage (j-V) characteristics are depicted in Figure 4.The most relevant photovoltaic parameters are summarized in Table 3.By comparing the different polarization curves, the doping of carbon xerogels clearly influences their behavior as counter electrodes.On the one hand, the open circuit potential (OCP) increases 23-34 mV upon doping the xerogel, where nitrogen appears to have a more positive effect than sulfur on this parameter.An enhancement of OCP is associated with a higher electron injection rate and lesser back electron transfer [48], thus in this case the incorporation of nitrogen or sulfur aids in providing a better electron injection at the counter electrode/electrolyte interface.A positive effect on the slope of the polarization curve at low current density for the doped carbon catalysts was also found.This is usually related to the electrical conduction of the system, and the differences encountered could be attributed to a better electron conductivity in N-CXG and S-CXG materials compared to the bare CXG, since all the other parameters (electrolyte, glass substrate, etc.) remained identical [34].The reason could be found either in the carbon material itself (better electrical conductivity associated to heteroatom doping), or due to a better carbon-FTO contact.
In terms of cell efficiency, the doping with sulfur leads to an increase of 12% while the doping with nitrogen originates an improvement of 20% when compared to undoped counter electrode (see Table 3).The main differences are encountered in the fill factor (FF), since the short-circuit current density (j sc ) remained very similar (or even decreased) upon the utilization of doped xerogels.The FF value accounted for the influence of several phenomena, including the quality of CE catalyst film contact with the FTO substrate, the series resistance or the recombination reaction at the photoanode.The cells were built using the same electrolyte and photoanode configuration, thus the differences could be ascribed mainly to changes at the CE.The individual influence of different CEs on the performance will be discussed in detail below (EIS results).A DSSC cell was assembled with a Pt counter electrode following the same procedure as the other carbon-based cells for the sake of comparison (Figure 4).The Pt counter electrode presented a higher catalytic activity the triiodide/iodide redox reaction than the carbon xerogel-based counter electrodes, thus resulting in a better performance.Nonetheless, the efficiency of the doped carbon materials is promising for this application, considering there is no precious metal.
Although the efficiency data for CXG are still far from a similar cell mounted with a Pt counter electrode, as can be seen by comparing the data in Table 3, these results outperform previous performance values obtained using similar DSSCs with counter electrodes based on carbon nanofibers [18] or reduced graphene oxide quantum dots [14].The larger surface area for carbon xerogels, as observed in N 2 physisorption experiments, compared to the former carbon materials, may explain the difference since a greater density of active sites is expected to be correlated with the surface area.
Like in previous publications [14,18], herein we used a simple photoanode configuration in order to avoid side effects, together with a thick spacer (60 µm) between electrodes to contain the electrolyte aimed to improve reproducibility and stability.These two facts negatively influence the power conversion efficiency compared to typical values in the literature, but allowed us to obtain a good reproducibility and stability for the experiments.Therefore, our main attention was focused on the behavior related only to the counter electrode, as this was the purpose of the work.
Electrochemical impedance spectroscopy (EIS) was used to individuate the cell behavior.The Nyquist plots obtained for the different cells based on carbon xerogel counter electrodes are depicted in Figure 5.Typically, Nyquist plots for DSSCs comprise two or three semicircles, attributed to the charge transfer resistance of counter electrode/electrolyte interface, titanium dioxide/electrolyte interface and mass transport of triiodide species (in the order from high to low frequency) [49].The series resistance (R s ), i.e., the impedance at high frequency and phase 0 • , was very similar for all cells (6.1-6.3Ω cm 2 ), in agreement with the similar architecture of the cell and composition of the electrolyte used for all experiments.In our case, two semicircles were found in the cells equipped with doped carbon xerogel counter electrodes whereas only one semicircle was observed for the undoped CXG.In the latter, one of the charge transfer processes most probably dominated the whole Nyquist spectrum therefore showing a unique semicircle.The total contribution to charge transfer was considered as R ct = R ct1 + R ct2 , individuated by subtracting the real part of the impedance at high frequency (R s ), to the one at a low frequency (phase = 0 • in both cases).The values for R ct are summarized in Table 3.To our knowledge, there are no standardized protocols to evaluate the stabil DSSCs.Yun and coworkers reviewed the most important features influencing the sta assessment of counter electrodes in DSSCs [50], identifying some key techniques for determination and highlighting the relevance of electrochemical stability.Cyclic vo metry has been described as an adequate tool to assess short-term stability of counte trodes as an alternative to platinum, although it may not give insights on long-term bility.In this work, continuous cyclic voltammetry was carried out, completing 10 tential cycles, from open circuit voltage to short circuit (under continuous illumin 100 mV • s −1 ), in order to investigate the electrochemical stability of different cells.this procedure was applied to a DSSC mounted with a Pt counter electrode, it cau  To our knowledge, there are no standardized protocols to evaluate the stability of DSSCs.Yun and coworkers reviewed the most important features influencing the stability assessment of counter electrodes in DSSCs [50], identifying some key techniques for their and highlighting the relevance of electrochemical stability.Cyclic voltammetry has been described as an adequate tool to assess short-term stability of counter electrodes as an alternative to platinum, although it may not give insights on long-term stability.In this work, continuous cyclic voltammetry was carried out, completing 100 potential cycles, from open circuit voltage to short circuit (under continuous illumination, 100 mV • s −1 ), in order to investigate the electrochemical stability of different cells.When this procedure was applied to a DSSC mounted with a Pt counter electrode, it caused a decrease in the fill factor (FF) from 0.6 to 0.5, resulting in a decrease in efficiency from 3.6% to 2.9% [14].The work by Syrrokostas and collaborators indicated the dissolution of Pt in the electrolyte as the cause for the loss in performance with cycling [51].
The curves before and after 100 cycles for the DSSCs based on CXGs are included in Figure 6.Interestingly, there was a negligible effect of cycling on the polarization curve for all DSSCs.This indicates that the short-term stability of CXG for this application is good and that the doping procedures do not influence the electrochemical stability upon potential cycling.

Conclusions
Two different doping procedures have been investigated to modify carbon xer chemical composition, aimed at their application as counter electrodes in dye-sensit solar cells.Nitrogen has been incorporated using melamine in a sol-gel method for car xerogel production.A concentration of 3.4 wt.% nitrogen was achieved (4.5 at.% by X in the form of pyrrolic/pyridonic and pyridinic species, while maintaining proper cro/mesoporous structures compared with undoped xerogel, whereas, sulfur has been corporated by direct thermal treatment in the presence of elemental sulfur.In this c the concentration of sulfur was 4.2 wt.%.The XPS results revealed a larger concentra with 8.1 at.%, with C-S-C as the main species, and indicating that this procedure ma modified the carbonaceous surface and not the bulk composition.
Both doping strategies led to an improvement in DSSC performance compared to undoped counterpart.In particular, nitrogen doping resulted in the best approach 0.0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9

Conclusions
Two different doping procedures have been investigated to modify carbon xerogel chemical composition, aimed at their application as counter electrodes in dye-sensitized solar cells.Nitrogen has been incorporated using melamine in a sol-gel method for carbon xerogel production.A concentration of 3.4 wt.% nitrogen was achieved (4.5 at.% by XPS) in the form of pyrrolic/pyridonic and pyridinic species, while maintaining proper micro/mesoporous structures compared with undoped xerogel, whereas, sulfur has been incorporated by direct thermal treatment in the presence of elemental sulfur.In this case, the concentration of sulfur was 4.2 wt.%.The XPS results revealed a larger concentration

N 2
physisorption was performed in a Micromeritics ASAP 2020 instrument (Micromeritics, Norcross, GA, USA) at −196 • C. The specific surface area was calculated by applying the Brunauer-Emmet-Teller (BET) model to the obtained adsorption-desorption isotherms.
depicts the spectra for the C1s contribution of each carbonaceous material.The three-carbon materials presented five to six contributions: (1) C-C non-functional structures (284.6 ± 0.2 eV); (2) C defects moieties attributed to carbon atoms located in defective regions (285.5 ± 0.4 eV); (3) C-O from carbon present in phenolic, alcoholic or ether groups (286.7 ± 0.3 eV); (4) C=O from carbon in the form of carbonyl, quinone groups (287.8 ± 0.2 eV); and (5) Cπ transition interband or plasmon peak (290 ± 0.3 eV).For the nitrogen-doped material, N-CXG, the contribution of C bonded to N (C≡N) appears at 288.4 eV, so it cannot be distinguished from the contribution of C=O, being both of them included in the same peak in Figure3b.For the sulfur-doped carbon material, an additional peak at 286.8 eV is included, related to carbon bonded to sulfur (C-S).

Figure 4 .
Figure 4. DSSC polarization curves for bare and doped carbon xerogels as counter electrodes and compared with Pt.

Figure 4 .
Figure 4. DSSC polarization curves for bare and doped carbon xerogels as counter electrodes and compared with Pt.

( a )
Open circuit potential; (b) short circuit current density;(c) fill factor;(d) charge transfer resistance.

Figure 5 .
Figure 5. Impedance spectra at OCP for bare and doped carbon xerogels as counter electrode.

Table 2 .
Chemical composition for CXG, N-CXG and S-CXG determined from elemental analysis and XPS.obtained from the deconvolution of the XPS spectra for N1s and S2p orbitals.Doped carbon xerogels present a similar weight % of the heteroatom (N or S), namely, 3.4 wt.% of N and 4.2 wt.% of S.

Table 2 .
Chemical composition for CXG, N-CXG and S-CXG determined from elemental analysis and XPS.

Table 3 .
Performance parameters of DSSC with CXG as counter electrode.