Introduction

Nitrides of carbon represent a family of materials, which includes two layered analogues of graphite with layers consisted of sheets of (poly(tri-s-heptazine imide) and 1,3,5-triazine imide, respectively, as well as different products of incomplete condensation with pending amino groups [1] and, more recently, linear [2] and two-dimensional [3] triazine imides.

Carbon nitrides have become a hotspot in the materials science in the recent years due to a wealth of attractive properties that they possess. Both heptazine-based and 1,3,5-triazine-based structures exhibit fascinating thermal endurance, superior stability against oxidation and hydrolysis, biocompatibility and semiconducting properties with moderate and easily tunable bandgaps, corresponding to excitation with near UV or even blue-violet light, which makes them undoubtedly interesting for photoelectronics and photocatalysis [4].

Bulk heptazine-based graphitic carbon nitride is typically synthesized by simply pyrolyzing (even often without a need for inert atmosphere) of nitrogen-rich precursors—most typically, melamine, dicyandiamide, urea or their mixtures [1]. However, in a great number of implementations, including virtually all the electrochemical applications as well as uses for electronics and photocatalysis, it is prerequisite to deposit the material on a support, forming a film.

Many film deposition techniques, e.g., growing a film from a precursor melt or molten salt with a precursor [5, 6], vacuum sputtering [7], chemical vapor deposition (CVD) [8], electrolysis of soluble precursors using the support as an anode [2], have been successfully used and provided the production of smooth and well-ordered films.

Nonetheless, from the viewpoint of equipment simplicity, industrial feasibility and process cost, solution or suspension-based approaches are always preferred. Suspensions of carbon nitrides are well known. Following the analogue (albeit very imperfect from the structural viewpoint) of graphitic carbon nitride with graphite, chemical or ultrasonic exfoliation are typically used with the objection of obtaining a suspension of graphene-like carbon nitrides nanosheets in a solvent. The suspension is subsequently deposited on the chosen support by one of the standard liquid coating techniques (e.g., dropcasting, spincoating, dipcoating, doctor blade, spraying and still others).

However, no industrially feasible technique for exfoliation of graphitic carbon nitride have been proposed so far. Ultrasonic exfoliation in water and organic solvents typically requires tens of hours of sonication. Furthermore, the concentrations of exfoliated nanosheets are generally very low (in the order of few grams per liter) [9, 10].

Another possible approach to liquid coating techniques implies the use of soluble precursors. Although melamine is well known to be very poorly soluble in all common solvents, other popular precursors for carbon nitride, dicyandiamide and urea, can easily be dissolved in both water and organic solvents.

Howbeit, according to our observations and quite expectably, the low molecular weight of these compounds leads to their crystallization during solvent evaporation after the composition is applied and, similarly as with coatings derived from nanoparticles, to formation of carbon nitride particles weakly bound to the support instead of forming a smooth film. Hence, an ideal hypothetical carbon nitride film precursor should be a polymer or supramolecular complex that could form a gel upon evaporation of the solvent.

Intriguingly, the approach to synthesis of carbon nitride materials, starting from reactions of precursors in a solvent is well known, but these condensation reactions typically result in formation of non-soluble, crosslinked products, which are further crosslinked by annealing.

For instance, in the work by Ok-Hee Kim et al. [11], carbon nitride material has been synthesized by the condensation of melamine and cyanuric chloride in N,N-dimethylformamide; Xu et al. [5] used as precursor a supramolecular complex of cyanuric chloride with 2,4-diamino-6-phenyl-1,3,5-tiazine (benzoguanamine). However, to the best of our knowledge no solution-based approaches allowing obtaining mechanically robust carbon nitride coatings have been proposed to date.

On the other hand, this approach does exist and is well developed for carbon-based materials without a substantial nitrogen content. Partially ordered forms of carbon with folded graphitic nano-ribbons, erroneously called “glassy carbon” or, more precisely, pyrolytic carbon, are known from mid-1950s [12, 13]. These materials have emerged into a golden standard in electrochemical measurements, being exceptionally stable in both anodic and cathodic polarization regimes and showing no own catalytic activity.

Pyrolitic carbons are typically synthesized by pyrolysis of crosslinked polymeric precursors, more often phenol–formaldehyde resins. By pyrolizing crosslinked polymer films deposited on carbon or ceramic substrates, pyrolitic carbon coatings can be obtained.

Pyrolitic materials with some nitrogen content, obtained from polymers, are also well known, although to our knowledge none of them has been reported to have fraction of nitrogen even near to that of graphitic carbon nitride (57.1 at%) and their poor long-term electrochemical stability has recently been reported and related with typically low graphitic nitrogen content in these materials [14].

Although pyrolytic carbons are unique electrochemical materials due to their electrochemical inertness and possibility to produce electrodes with complex shapes [13], there are three inherent properties of these materials that complicate their use in many practical fields. High elastic modulus and brittleness impede fabrication of thin films and filaments, eminent hydrophobicity results in poor wetting of electrodes in water-based systems, while high fabrication temperature leads to practical unfeasibility of functional composites production that would involve pyrolysis of polymeric precursors of glassy carbon with catalytically active complexes or nanoparticles.

According to our findings, all these issues can be simultaneously addressed by incorporation of high amounts of nitrogen into pyrolytic carbon matrix.

In this work, we report the synthesis of three soluble polymers, one of which is completely triazine-based and other two represent block polyimides of triazine with nitrogen-rich heterocyclic amines. Pyrolysis of dried polymer films results in the materials with high nitrogen content, low density, exceptional stability to oxidation and reduction and XRD and AFM patterns closely resembling pyrolytic carbons.

Experimental section

Materials and methods

All chemicals have been purchased from Sigma Aldrich and used without any additional purification. Anhydrous 99.8% pure N,N-dimethylacetamide (DMAc) (Sigma Aldrich), < 0.005% water, has been used as a solvent in all polymer syntheses. 3.18 mm thick, carbon cloth (CC) sheets and glassy carbon plates for electrodes fabrication have been purchased from Alfa Aesar.

2-amino-4,6-dichloro-1,3,5-triazine was obtained from cyanuric chloride by ammonolysis in acetone-water solution according to the procedure described by Baliani et al. in the Supporting Information provided for their publication [15]. 5-aminotetrazole was obtained by drying the corresponding monohydrate (purchased from Sigma Aldrich) in air at 105 °C for 24 h according to the procedure described in [16], followed by keeping the product two weeks in vacuum desiccator over P2O5.

NMR spectra have been recorded using a VARIAN Mercury VX400 spectrometer.

SEC chromatography installation consisted of an Agilent 1260 Isocratic Pump, manual sample injector Rheodyne Model 7125 with 20 mL loop, two PLgel 5 mm Mixed-D 30 × 7.5 mm linear columns (MW 200–400.000) 75,970 and 97,293 plates/m (1/2 ht)) with an Agilent 1100 series refractive index detector.

JASCO 4700 spectrometer has been used for FTIR spectra recording. Infrared spectra have been processed in free SpectraGryph software.

Thermogravimetric analysis has been carried out with SETARAM SENSYS EVO 3D Tech. For analysis, sample (of around 10 mg) was placed in platinum pan and heated at a constant rate of 4 °C/min.

Elemental analysis of the samples was performed using Perkin Elmer EA2400 serie II elemental analyzer after sample incineration at 930ºC.

UV–Vis diffuse reflectance spectroscopy measurements were carried out using a Shimadzu UV-3600 equipment with BaSO4-coated integration sphere.

JEOL model 1011 and Thermo Fisher SCIOS 2 with field emitter have been used for transmission and scanning electronic microscopy/EDX, respectively.

STM scanning has been performed on Pico SPM II (Pico +) system.

XRD (X-ray diffraction) measurements were made using a Siemens D5000 diffractometer (Bragg–Brentano parafocusing geometry and vertical θ-θ goniometer) fitted with a curved graphite diffracted-beam monochromator, incident and diffracted beam Soller slits, a 0.06º receiving slit and scintillation counter as a detector.

Contact angles have been measured by the static sessile drop method using Kyowa Interface Science DM211 goniometer for films.

Autolab PGSTAT204 with FRA32M has been used for all electrochemical experiments. Free EIS Spectrum Analyzer software has been used for profile fitting.

Polymer precursors synthesis and characterization

Three nitrogen-rich triazine-based polymers have been synthesized by self-condensation and condensation reactions, respectively. N,N-dimethylacetamide (DMAc) has been used as a solvent and N,N-diisopropylethylamine (DIPEA) as a non-nucleophilic base in all cases (Fig. 1). Sodium and potassium carbonates were also tested and found to be effective acid scavengers for these syntheses, although their utilization derives in prominent increase of reaction suspension viscosity, which complicates the lab-scale synthesis by setting on the need for intensive mechanical stirring.

Figure 1
figure 1

Reaction schemes for the syntheses of precursors

The first polymer, [azanediyl (2-chloro-1,3,5-triazine-4,6-diyl)], further abbreviated as poly(CYA-Cl-NH), have been synthesized by self-condensation of 2-amino-4,6-dichloro-1,3,5-triazine.

Two other polymers, poly[(2-chloro-1,3,5-triazine-4,6-diyl (5-iminotetrazol-2-yl)], further abbreviated as poly(CYA-Cl-AMTAZ), and poly [(2-chloro- 1,3,5-triazine-4,6-diyl (5-carboxy-3-iminotriazol-1-yl)], further abbreviated as poly(CYA-Cl-AMCARTRIA), were synthesized by condensation of 5-aminotetrazole and 3-amino-1,2,4-triazole-5-carboxylic acid, respectively, with cyanuric chloride. All the three polymers were originally obtained in the form of 5% wt. solutions in DMAc, containing also DIPEA and DIPEA·HCl.

The detailed synthesis protocols were as follows:

Synthesis of poly [azanediyl (2-chloro-1,3,5-triazine-4,6-diyl)], further abbreviated as poly(CYA-Cl-NH)

8 mmol (1.32 g) of 2-amino-4,6-dichloro-1,3,5-triazine and 24 mmol (3.10 g) of N,N-diisopropylethylamine (DIPEA) were dissolved in 10.3 g of DMAc. The vial was purged with Ar and sealed. The solution was refluxed at room temperature for 20 min, then heated to 110 °C and left under reflux at this temperature for 72 h.

Synthesis of poly [(2-chloro-1,3,5-triazine-4,6-diyl (5-iminotetrazol-2-yl)], further abbreviated as poly(CYA-Cl-AMTAZ)

8 mmol (0.68 g) of 5-aminotetrazole and 24 mmol (3.10 g) of N,N-diisopropylethylamine (DIPEA) were dissolved in 20 g of DMAc. The solution was cooled down to -5 °C. In continuous Ar flow, a solution of 8 mmol of cyanuric chloride (1.48 g) in 6.18 g DMAc was added to the mixture dropwise under cooling in ice + NaCl bath and intensive stirring so that the temperature would not have exceeded 0 °C. After finishing the addition, the solution was refluxed at room temperature for 20 min, then sealed, heated to 70 °C and left under reflux at this temperature for 24 h.

Intensive production of heat and color change to fluorescent-yellow take place immediately after addition of the first portions of cyanuric chloride, indicating that the formation of conjugated condensation products starts instantly even at low temperatures. It is of critical importance to maintain the temperature below 0 °C during all the process of cyanuric chloride addition. At higher temperatures, an insoluble product is formed, probably as a result of cross-linking due to known noticeable reactivity of the last chlorine atom in cyanuric chloride at elevated temperatures [11].

Synthesis of poly [(2-chloro-1,3,5-triazine-4,6-diyl (5-carboxy-3-iminotetriazol-1-yl)], further abbreviated as poly(CYA-Cl-AMCARTRIA)

8 mmol (1.02 g) of 3-amino-1,2,4-triazole-5-carboxylic acid was suspended in 20 g of DMAc and 40 mmol (5.20 g) of N,N-diisopropylethylamine (DIPEA) were added to the suspension. In continuous Ar flow, a solution of 8 mmol of cyanuric chloride (1.48 g) in 10.62 g DMAc was added to the mixture dropwise at room temperature. In contrast with the CYA-Cl-AMTAZ synthesis, no color change nor heat production have been mentioned during the monomers mixing stage of the reaction towards CYA-Cl-AMCARTRIA, indicating much lower reactivity. For this reason, no cooling of the reaction mixture has been used. After finishing the addition, the solution was sealed, heated to 110 °C and left under reflux at this temperature for 72 h.

NMR characterization of as-synthesized polymer solutions was performed with 1H spectra of as-synthesized solutions (i.e., in non-deuterated DMAc).

Spectra (provided in the SI) of all the polymers in DMAc do not reveal any signals related to reagents (2-amino-4,6-dichloro-1,3,5-triazine and 5-aminotetrazole, respectively) neither imide hydrogens of the products. The spectra contain only peaks of DMAc, DIPEA and DIPEA·HCl. The position of neutral DIPEA signals as well as the chemical shift of ammonium hydrogen in DIPEA hydrochloride was previously established by recording a spectrum of DIPEA + DIPEA·HCl solutions in DMAc with concentrations corresponding to the expected concentration of these species in polymers solutions.

Solvent exclusion chromatography (SEC, GPC) of the polymers was carried out for as-synthesized solutions, diluted by DMF with LiBr. Table 1 summarizes the results with molecular masses, corresponding with all peaks believed to be linked with products. Numerical indexes go along with numbers of peaks, provided in the SI.

Table 1 Molecular masses, determined by SEC

It is important to emphasize, however, that SEC experiments conducted in this study were undoubtedly affected by two inevitable issues: the standard used for calibration (PMMA) was very different from examined polymers in chain mechanics and polarity; the samples were injected “as synthesized”, which resulted in impurities peaks way more intensive than polymer peaks. Consequently, the molecular weight values obtained in both SEC analyses can only be considered true by the order of magnitude.

Preparation of polymer precursor coatings from DMAc solutions and FTIR characterization of their annealing at different temperatures

Application of as-synthesized solutions of all three polymers on any thermally stable support (glassy carbon, carbon cloth, Al2O3 ceramics plate or Ti foil have been used in our experiments) with subsequent drying at 110 °C for 24 h allows evaporating the solvent as well as DIPEA and its hydrochloride (ascertained by drastically reduced intensity of sharp peaks with maximums at 2920 and 2960 cm−1 in FTIR spectrum, corresponding with the absorption of DMAc and DIPEA species, as discussed below in this chapter) and obtaining smooth, well-adhered films.

In order to examine the process of thermal transformation of the precursors, the films applied on glassy carbon plates were subjected to pyrolysis in Ar atmosphere. The temperature range that is practically used for pyrolytic synthesis of carbon nitride materials is well established and relatively narrow, according to all the cited literature sources [1, 3,4,5,6, 8, 10, 11, 17, 18]. When using melamine or dicyandiamide as starting materials, condensation to melem (2,5,8-triamino-heptazine) and similar oligomeric intermediates is typically believed to start at about 350 °C [1, 19]. Temperatures above 700 °C are commonly reported to cause decomposition of most carbon nitride materials. In our experiments, in agreement with the latter, pyrolysis at temperatures exceeding 650 °C always resulted in disappearance of coating.

In all experimental runs, the standard pyrolysis procedure started from annealing the sample at 200 °C for 1 h, followed by ramping the temperature at 1 °C per minute to the desired temperature—300, 350, 400, 450, 500 or 550 °C. Non-annealed films spectra were recorded after standard drying (110 °C for 24 h in air). The spectra recorded for all three precursor polymers as well as for the annealed materials derived therefrom show peculiar similarity in the position of peaks, albeit the intensity of absorption steadily decreases with increase of pyrolysis temperature (Figs. 24).

Figure 2
figure 2

Infrared spectra of poly(CYA-Cl-NH) films on vitreous carbon support, annealed at different temperatures

Figure 3
figure 3

Infrared spectra of poly( CYA-Cl-AMTAZ) films on vitreous carbon support, annealed at different temperatures

Figure 4
figure 4

Infrared spectra of poly(CYA-Cl-AMCARTRIA) films on vitreous carbon support, annealed at different temperatures

As can be seen from the spectra provided (Figs. 24), all the precursor polymers as well as films obtained by their annealing, show wide high-intensity band composed by overlapping peaks in between 1450 and 1800 cm−1, diffuse absorption region placed between 2600 and 3700 cm−1 and sharp peak around 816 cm−1. Two small sharp peaks at 2920 and 2960 cm−1, disappearing after annealing at 400 °C or above, were assigned to the remaining DMAc and DIPEA species, respectively, decomposing at high temperatures.

The DMAc and DIPEA salt characteristic peaks were acquired by preliminary recording the corresponding spectra of pure DMAc and DIPEA*HCl samples. These absorption maximums with much higher intensities appear in the spectra of films, dried at lower temperatures or lesser time.

Thermogravimetric characterization of polymers annealing

For the purpose of TGA characterization, DMAc as-synthesized solutions of all three precursor polymers were placed in Petri dishes with liquid layer thickness of about 1 mm and dried in air at 110 °C for 20 days in order to provide a maximum possible efficiency of DMAc and DIPEA species removal. It was previously found out in our experiments that DMAc/DIPEA/DIPEA·HCl solution with the ratio of components similar to that found in as-synthesized polymer solutions, completely evaporates at this temperature and in the same layer within 12 h.

Taking into account previously mentioned disappearance of all polymeric films at annealing temperatures exceeding 650 °C, we have recorded TGA in the temperature range from 70 to 700 °C (Fig. 5).

Figure 5
figure 5

TGA curves for the three precursor polymers

For all curves, at temperatures below 160 °C, only minor depletion of mass has been observed, presumably linked to evaporation of traces of DMAc and DIPEA/DIPEA·HCl.

Albeit additional research is needed to explore the pathway of decomposition, it can be assumed that the pattern of mass loss in the interval from 180 to 260 °C, nearly identical for all the three materials, is related to the decomposition of the polymer-bound DIPEA, i.e. DIPEA serving as counter-cation for the polymer and hence not sublimed in the DIPEA-HCl form during preliminary drying.

At higher temperatures, the actual transformation of polymer chains supposingly starts. Increased mass loss dynamics demonstrated by poly(CYA-Cl-AMCARTRIA) above 300 °C can be related to decarboxylation of the precursor.

Although it would have been logical to expect the poly(CYA-Cl-AMTAZ) precursor to exhibit comparatively quicker decomposition or/and lower onset temperature due to presence of unstable tetrazole ring, its actual mass loss curve have not demonstrated any significant differences from other polymers. It goes in line with the observation already made in the FTIR spectra analysis, supporting the assumption that tetrazole cycle stability in triazineimide-linked polymers is fairly high in comparison with monomeric tetrazole compounds.

All preliminary transformations terminate above 400 °C for all the three polymers, with subsequent process likely corresponding to steady decomposition of already formed carbon nitride product, which goes in line with minor FTIR spectra changes above this point. This process accelerates above 600 °C, resulting in complete disappearance of all materials in the temperature range from 640 to 690 °C.

Elemental analysis

Elemental analysis was performed on samples, prepared according to the same procedure as used for TGA. The results for mass % contents of C, N and H are provided in the Table 2.

Table 2 Elemental analysis results for the synthesized polymers

It was expected that the remaining mass of samples to be represented mainly by chlorine and oxygen. Although the elemental analysis procedure did not allow us to determine these elements, we attempted to estimate their content using FSEM-integrated EDX spectrometry. EDX spectrometry can only be viewed as a rough semi-quantitave technique for light elements such as C, N and O, while typically providing more reliable results for Cl. Although the figures were fluctuating boldly between samples, for all the measured instances of films the atomic % contents of carbon and nitrogen, calculated in the assumption of zero hydrogen content due to inability of EDX to detect hydrogen, were in ranges 45–52 and 31–45 at%, respectively, thus being well in agreement with elemental analysis data.

For chlorine (also in the assumption of zero hydrogen content) the values were measured to be in the range 0.2–0.4 at% for poly(CYA-Cl-NH) samples and 0.5–0.9 at% for poly(CYA-Cl-AMTAZ) and poly(CYA-Cl-AMCARTRIA). Oxygen content for all the samples fluctuated in the 0.3–0.6 at% range regardless the precursor, but increasing noticeably for samples kept in air before measurement.

Thus, it can be concluded that values, obtained in the course of EDX measurements, although lack accuracy, allow stating that all the remaining mass of the samples can be explained by presence of relatively small amounts of chlorine and oxygen. The oxygen (and hence hydrogen) contents are at least partially related to the presence of absorbed water, so measurement procedure with complete moisture protection is to be implemented for precise determination of oxygen and hydrogen. Higher apparent content of hydrogen in poly(CYA-Cl-AMCARTRIA)-derived films is probably related to increased water absorption rate of this film.

UV–Visible diffuse reflectance spectroscopy and optical bandgap determination

Films, annealed in Ar atmosphere, derived from all three precursors on Ti foil support without secondary treatment were taken for characterization. The represented spectra are baseline-corrected, BaSO4-coated white standard plug used for recording the baseline. Pure Ti foil DRS has been determined and have shown more efficient reflection than the standard BaSO4 plug which resulted in values exceeding 100% for Ti reflection.

As can be observed in the Fig. 6, all polymers demonstrate very similar UV reflection behavior. Optical bandgaps for three polymer-derived materials were determined by outlining the corresponding Tauc plots (provided in the SI).

Figure 6
figure 6

UV–VIS DRS for annealed coatings on Ti support

The optical bandgaps were calculated to be 1.88, 1.99 and 1.71 eV for poly(CYA-Cl-NH), poly(CYA-Cl-AMTAZ) and poly(CYA- Cl-AMCARTRIA), respectively. These values are way below the bandgap of graphitic and polymeric carbon nitride, typically reported to be 2.8–2.9 eV [4, 5], and correspond with visible light excitation (623 to 725 nm). Hence, all the materials can be regarded as low-bandgap semiconductors.

We suppose that the reduced bandgap values are related to carbon doping of the films. It can easily be noted that the bandgap correlates with the content of nitrogen in the annealed sample, with CYA-Cl-AMTAZ-based sample 49.26% N wt. demonstrating the highest bandgap (1.99 eV), followed by samples based on CYA-Cl-NH with 47.31% N wt. and 1.88 eV and, finally, on CYA-Cl-AMCARTRIA containing 42.12% N wt% and showing the lowest bandgap of 1.71 eV. For such a low bandgap range, noticeable dark conductivity can be expected.

SEM, TEM and STM characterization

SEM of all annealed films demonstrate non-informative, extremely smooth surfaces without any noticeable patterns at all available magnifications up to 100 K. TEM of films, mechanically scratched out of Ti support, reveals their hazy structure with small nebulous clumps. No obvious distinction between films, derived from different precursors, has been mentioned. The corresponding TEM images are provided in the SI.

High-resolution STM microscopy (Fig. 7), carried out in non-contact mode in ambient conditions, supports the conviction that surface of all the films is smooth down to the level of hundreds nanometers. At higher magnification the FM mode scans show wave-like protrusions on the surface sized in the range of dozens of nanometers and small (2−5 nm) ripple, which can be related to chaotically packed protuberances of melon-like nanoribbons. STM images of glassy carbons, existing in the literature ([20, 21]), support this point of view, demonstrating similar granular, fiber-like or groove-like nanostructures on their surface, although typically of marginally larger size.

Figure 7
figure 7

High resolution STM images of poly(CYA-Cl-AMTAZ) film on Ti substrate, annealed at 550 °C

XRD of annealed films and glassy carbon powder reference

As it was previously shown in TGA experiments, drying and subsequent pyrolysis of polymeric precursors in thick layers (more than 200 µm after solvent drying) implies incomplete evaporation of DMAc and DIPEA species, typically leading to altered structure and mechanical properties.

For this reason, samples for XRD characterization were prepared by means of spreading as-synthesized solutions of polymers on 100 µm Ti foil with subsequent drying for 24 h at 110 °C and annealing in Ar with starting temperature of 200 °C, final temperature of 550 °C and 1 °C/min ramp. The resulting coating thickness was in the range from 30 to 55 µm according to microscopic measurement. The annealed foils with carbon nitride coatings were then dissolved in 5% hydrofluoric acid at room temperature, the exfoliated carbon nitride flakes washed with deionized water to neutral pH and dried on paper filter at 110 °C in air for 24 h. They were grinded before XRD characterization, although due to extreme mechanical resilience of films, the shape of the resulting particles remained lamellar with 10–15 µm average diameter. Glassy carbon powder (grinded from glassy carbon rod, Alfa Aesar) was used as reference material with confirmed turbostratic structure. Further details of XRD characterization experiments and apparent crystallite sizes calculation are provided in the SI.

The X-ray diffraction patterns of all the three annealed films, given in the Fig. 8, demonstrate evident similarity, with one diffuse peak centered at 27.05º and well-corresponding with characteristic (002) plane reflection of theoretically considered fully polymerized hexagonal carbon nitride, typically ascribed as arising from interlayer reflection. The absence of other relatively weak reflections, described for graphitic carbon nitride, e.g., from planes (100), (600) or (004) [22], has been related to flat shape of particles that resulted in anisotropicity of the sample.

Figure 8
figure 8

XRD spectra of HF-detached films, annealed at 550 °C

The glassy carbon powder diffraction pattern, provided in the Fig. 9, corresponds well with previously reported results. The main peak at 23.87º and lower intensity maximum at 44.14º are typically found in similar positions in glassy carbon difractograms and are usually ascribed as (002) and (100) indices of graphite lattice, respectively [23].

Figure 9
figure 9

XRD spectra of glassy carbon powder

The main (002) reflections have similar shapes in both polymer-derived carbon nitride and glassy carbon samples and are cardinally widened when compared to corresponding reflexes of graphitic carbon nitride [24] and graphite powder, respectively. In the glassy carbon case, this widening is explained by most authors in terms of semi-cristallic or so called turbostratic structure of the latter: the material arrangement can be represented as ribbons or globules of ordered graphene-based phase immersed in amorphous carbon matrix.

If the same model is applicable to our novel polymer-derived carbon nitrides, the average size of ordered units in their structure can be calculated by fitting Voigt function and finally using Scherrer equation to obtain the sizes of crystallites (calculation details in the SI). From this approach, the following values of apparent crystallite sizes were obtained: 1.89 nm for poly(CYA-Cl-NH)-derived film, 1.44 nm for poly(CYA- Cl-AMTAZ)-derived film, 1.47 nm for poly(CYA-Cl-AMCARTRIA)-derived films, 0.89 nm for reference glassy carbon powder. Hence, although more precise experiments are required in order to elucidate the explicit structure of newly synthesized polymer-derived carbon nitride films, their X-ray diffraction patterns allow identifying them as semi-amorphous materials with crystallite sites of the same order of magnitude as in glassy carbons.

Contact angle measurements

Water wettability of coatings is of immense importance for all applications where films are brought in contact with water-based liquid. Contact angles have been measured by the static sessile drop method for films on Ti foil support, annealed in standard regime with 550 °C final temperature in Ar and air atmosphere.

Table 3 shows that air-annealed samples demonstrated much lower contact angles, presumably due to oxidative elimination of surface pollution by trace hydrophobic contaminants. In all measurement where contact angles below 20 degrees were recorded, drops have been slowly spreading on the film during the procedure, so the exact value has not been determined.

Table 3 Measured contact angles

Characterization of electrochemical properties of annealed films

UV–VIS DRS measurements concede to characterize all films, annealed at 550 °C, as low bandgap semiconductors (1.71–1.99 eV). The massive difference between these observed values with the bandgap value reported for graphitic carbon nitride, allows considering the newly synthesized coatings to be extrinsic semiconductors with bandgap reduced presumably by carbon doping.

In order to investigate electrochemical parameters of films in a way reflecting their potential practical application, all three solutions of precursor polymers were applied on carbon cloth (CC) electrodes, produced from Alfa Aesar 3.18 mm thick carbon cloth sheets. 3.18 × 3.18 × 50 mm electrodes were cut out of the cloth and half-dipped in a vial with as-synthesized solution of precursor polymers. The vial with electrode vas sonicated for 1–2 min to ensure complete wetting of the dipped part, then electrode fixed with coated end downwards in a vacuum chamber and dried in 0.3 Pa vacuum for 12 h, then in air at 110 °C for 24 h. The treated electrodes were annealed at 550 °C in Ar flow according to the standard heating regime. A control uncoated CC electrode of the same dimensions was annealed in the same conditions.

Electric impedance measurements were carried out by means of EIS spectroscopy. 0.01 N Fe(CN)63−/0.01 N Fe(CN)64−/0.1 N KCl solution was chosen as redox-buffered electrolyte. Annealed bare CC and film-coated CC electrodes were immersed into solution by 5 mm, forming solid–liquid geometric interface surface of approximately 0.7 cm2 and immersed electrode volume of about 0.05cm3, 6 cm2 Pt mesh has been used as a counter-electrode in all electrochemical experiments. The following EIS experiment parameters were chosen: frequency range from 0.1 Hz to 100,000 Hz, 10 points/decade, sinus amplitude 10 mV, direct current (DC) potential 0 mV versus Ag/AgCl/saturated KCl.

As can be seen from Fig. 10, almost perfect fitting of the experimental data with the corresponding simple equivalent circuit was achieved. The best-fitting circuit is represented by a capacitor and a resistor connected in parallel together with a serially connected Warburg element.

Figure 10
figure 10

Fitted Niquist plot for poly(CYA-Cl-AMTAZ)-derived coating

A control EIS experiment carried out with an uncoated electrode afforded a spectra that was ideally fitted by the same equivalent circuit, with capacitance and resistance of 0.008 F and 13 kΩ, respectively, and Warburg impedance of 270 Ω s−1/2.

The aerial capacitance of untreated carbon cloth is reported by Yi-Jie Gu et al. [25] and Dong Ye et al. [26] to be 0.96 and 0.8–0.9 mF cm−2, respectively. Both works report treated CC (calcined in air and electrochemically oxidized/reduced, respectively) to have largely higher aerial capacitances with respective maximum values 1136.7 and 505.5 mF cm−2.

The measured aerial capacitance of annealed carbon cloth (0.008 F per 0.7 cm2 of projected area), or 11.4 mF cm−2 can hence be classified as rather low, being only one order of magnitude larger than untreated CC aerial capacitance reported. At the same time, the aerial capacitance of coated electrodes (236 mF cm−2) is comparable with the reported CC-based modified electrodes proposed for super capacitor applications.

The resistance measured for both coated and uncoated CC electrodes, corresponding to the semicircle diameter on the Niquist plots, coincides with the interfacial resistance, while the internal resistance of both cells, given by the high-frequency Z´ value, was in the range of several Ohms. The impedance-frequency behavior of both cells allows assuming their impedance as classically faradaic, with double layer capacitance and redox process-mediated resistance standing for C1 and R1 values, respectively, and Warburg impedance probably originating from diffusion kinetics. The effective resistivity on the solid-electrolyte junction of the coated electrodes can be calculated in the assumption of uniform 50 µm coating to be 56 kOhm cm according to EIS, allowing to classify the coatings as conductive rather than semi conductive. Moreover, the intrinsic resistivity of films is most likely fairly lower, as the faradaic resistivity is affected by reaction transfer kinetics.

In order to further elucidate the efficiency of electron transfer through electrode–electrolyte interphase, cyclic voltammetry (CV) curves of annealed bare CC/annealed poly(CYA-Cl-AMTAZ)-coated CC electrodes were recorded in the same Fe3+/Fe2+ electrolyte and in the same conditions. To reduce capacitive currents, all scans were operated at low scanning speed of 10 mV/s. The results are provided in the Fig. 11.

Figure 11
figure 11

CV scans of bare and coated CC in 0.01 N Fe(CN)63−/0.01 N Fe(CN)64−/0.1 N KCl solution

Surprisingly, although in agreement with high faradaic resistances measured by EIS, annealed bare CC electrodes provided very low specific currents in both oxidation and reduction half-waves. In contrast, all coated CC electrodes developed pronounced half-waves with maximum currents, exceeding 6–7 times the corresponding currents for both oxidation and reduction peaks on untreated CC electrodes.

In order to investigate the electrochemical activity and stability of coatings at high overpotentials in acidic aqueous media, 100 CV scans in 1 N sulphuric acid in the potential range from -1 V to + 1.5 V versus Ag/AgCl at 10 mV/s were undertaken. Prior to scanning, the electrodes were conditioned for 10 min at + 1. 5 V versus Ag/AgCl to eliminate possible surface contamination.

As can be seen from the Fig. 12, coated electrodes, after first several scans, demonstrate extremely stable electrochemical behavior. In the negative branch of the CV, currents increase progressively from 1st to 12th scans and stabilize during all the following CV passes with only negligible differences between 12 and 100th scans. Positive currents expose noticeable reproducibility with no apparent changes after first 3 scans. Surprisingly, voltamperograms in sulphuric acid demonstrate low capacitive currents, corresponding to only dozens of µF-level capacitances.

Figure 12
figure 12

Voltammetric scans for CYA-Cl-AMTAZ-coated electrodes in 1 N H2SO4

The most intriguing, however, is the presence of noticeable and reproducible anodic current, appearing above -0.25 V vs Ag/AgCl and almost linearly increasing with potential.

Chronoamperometric characterization (Fig. 13) of electrodes provides furthermore support for the hypothesis of reversible oxidation and reduction of the surface, demonstrating quick current deterioration with time at applied static potential in both oxidation and reduction modes.

Figure 13
figure 13

Chronoamerometric curves for poly(CYA-Cl-AMTAZ)/CC annealed at 550 °C at cathodic and anodic polarizations (current modules shown)

Results and discussion

In this paper, we demonstrate a way to fabricate carbon nitride analogues of glassy carbons by means of pyrolysis of ultra nitrogen-rich polymeric precursors. The logics behind the selection of possible precursors has been based on an observation that nearly all the compounds, used as precursors for carbon nitride, do not contain C–C bonds, being instead based on C–N or N–N sequences. It seemed reasonable to assume that this could be a critical factor affecting pyrolysis pathway and determining the kinetic selection mechanism for azagraphene/azine-based structure instead of graphene-derived structural motifs, represented in «classical» pyrolytic carbons.

Likewise, we wanted the precursor to be a polymer in order to render amorphous or semi-amorphous structure of the annealed material. In the seek for «C–C free» polymers, we synthesized by means of classical polycondensation a linear imide of chlorotriazine (poly(CYA-Cl-NH) and two block-polymers based on triazine/tetrazole poly(CYA-Cl-AMTAZ) or carboxytriazole (poly(CYA-Cl-AMCARTRIA), respectively. The latter, although containing a C–C bond, can be viewed a C-N polymer due to decarboxylation, presumable taking place before main pyrolysis steps.

All these polymers exhibit excellent solubility in aprotic solvents in the form of DIPEA salts, directly obtainable from syntheses.

According to the 1H NMR spectra, poly(CYA-Cl-AMTAZ) exhibits strongly acidic imide protons and appears to exist in DMAc solution in the form of corresponding DIPEA salt with imide proton fully dissociated and showing up in the 1H spectrum as DIPEA·H+ signal, while two other polymers are presumably characterized by low imide acidity.

From the SEC chromatography data it can be concluded that poly(CYA-Cl-NH) and poly(CYA-Cl-AMTAZ) are high molecular weight polymers with two maximums in the molecular mass distribution. The poly(CYA-Cl-AMCARTRIA), according to SEC results, should be considered as oligomer containing on average 2 triazine-NH-carboxytriazole units. This presumption, however, goes in contradiction with the previously mentioned absence of any noticeable signals in the 1H NMR spectra that could be related to the presence of amino or imino hydrogens of free triazine monomer or oligomers.

IR spectra of all the synthesized polymers reveal their structural similarity with “classical” carbon nitride structures as well as annealed films obtained therefrom, albeit with several specific absorption maximums. The spectrum of poly(CYA-Cl-AMTAZ) demonstrates a noticeable adsorption at 783 cm−1, which gradually fades upon annealing of the polymer and does not show up in the spectra of poly(CYA-Cl-NH) and poly(CYA-Cl-AMCARTRIA) or annealed films obtained from these polymers. According to the IR spectra of substituted 1,2,3,4-tetrazoles, published in the literature, this signal can be viewed as characteristic for tetrazole systems. For instance, it appears at 790.47 cm−1 for 5-phenyl-1H-tetrazole, at 791.77 cm−1 for 5-(4-hydroxyphenyl)-1H-tetrazole, at 778.32 cm−1 for 1-(3-bromophenyl -1H-tetrazole [27].

Accordingly, almost complete disappearance of this peak at 550 °C for poly(CYA-Cl-AMTAZ) can be attributed to full decomposition of tetrazole precursor at this temperature – a surprisingly high thermal stability for tetrazoles, especially in comparison with the monomeric 5-aminoterazole [16].

The intensive asymmetric shoulder placed between 1270 and 1400 cm−1 for poly(CYA-Cl-NH) and 1200–1500 cm−1 for other two polymers is essential for understanding the spectra.

In the family of films derived from poly(CYA-Cl-NH), two maximums of this peak are originally observed at 1295 and 1320 cm−1 and, upon heating, decrease and move towards steadily to produce one bell-shaped maximum at 1330 cm−1 for the film, annealed at 550 °C. In the case of poly(CYA-Cl-AMTAZ), this band shows up at 1402 cm−1 for the source polymer and, upon annealing, quickly decreases in intensity and moves to higher wavenumbers to finally disappear at 550 °C.

Spectra of poly(CYA-Cl-AMCARTRIA) films exhibit widened peaks with few characteristic features. Expectably, non-annealed film demonstrates C=O vibration at 1707 cm−1, disappearing already when pyrolized at 350 °C. A small peak at 2985 cm−1, corresponding presumably to -OH vibrations of -COOH groups, fades at pyrolysis above 350 °C. Thus, FTIR data for poly(CYA-Cl-AMCARTRIA) support the presumption that this polymer easily decarboxylates in relatively mild heating conditions.

With the goal to assign the spectral features appearing in the spectra of carbon nitride (CNx) films, we compared the spectra of films, measured in this work, with published FTIR data on monomeric triamino s-triazine (melamine) and triamino tri-s-heptazine (melem) along with spectra of other materials of carbon nitride family, believed to consist of triazine, heptazine or mixed structural motifs.

The work on vibrational-mode assignment for IR spectra of crystalline and gas phase melamine performed by Yuan et al. [28] reasserts the assignments reported by other authors, for instance referring the vibrations at 1424 and 1577 cm−1 with the HCN and NH2 bending coupled with ring deformation and CN stretching or CN stretching and NH2 bending, respectively.

This finding supports the hypothesis that the shoulder showing up between 1270 and 1400 cm−1 and gradually disappearing when annealing temperature increases, can be related to free -NH2 and other H-containing functionalities, depleting with heating.

Comparison of melamine spectrum with IR spectra of monomeric alkylamides of heptazine, published by Zambon et al. [29], along with IR characterization of melem, performed by Jürgens et al. [19], allows to outline the same pattern in all studied spectra of monomeric compounds: appearance of two intensive absorption maximums in the proximity of 1430 cm−1 and 1530–1600 cm−1, respectively, with a pronounced low absorption region between them.

Notably, four polymeric CNx materials synthesized by means of solution-based reactions of cyanuric chloride with nitrogen sources, reported in the literature ([5, 14, 17, 22]), demonstrate the same tendency to possess an absorption gap between two intensive peaks in the area. On the other hand, the spectrum of G-C3N4 presented by Li et al. [18], along with spectra of melon [4] and other CNx polymers reported to be based at least partially on heptazinic structural units ([17, 30]), exhibit multiple peaks or continuously filled absorption band in the range from 1430 cm−1 to 1530–1600 cm−1.

It should be noted that previous studies on interpretation of IR spectra of amorphous CNx films, performed by Ferrari et al. [31], led them to conclude that the entire region between 1000 and 2000 cm−1 should only be assigned to skeletal vibrations due to insensitivity of local maximums in this region to deuteration of film.

However, considering intensive absorption in this range demonstrated for monomeric triazines and heptazines, it remains contentious if these conclusions are applicable to azine-based polymers. Nevertheless, taking into account the fact that monomeric heptazines do not show any characteristic absorption nearby 1430 cm−1 but all heptazine- containing polymers exhibit characteristic absorption in this area, we suppose that this maximum is related to vibrations of π-delocalized polymeric system based on heptazinic framework—purely skeletal or combined with bending of substituting groups.

Another curious observation relates to the notable sharp peak always appearing in FTIR spectra of both triazine and heptazine-based materials at around 800 cm−1, assigned by Yuan et al. [28] to ring out-of-plane deformation (808 cm−1). According to our examination, in all spectra of triazine-based materials, hitherto reviewed as presenting an absorption gap in between 1430 and 1530 cm−1 and described in their research as triazine-based, this sharp peak appears in the range from 808 to 820 cm−1. In the materials believed to be based on heptzinic framework, this peak shows up in the 780–802 cm−1 region.

Hence, although the difference in the position of this vibration is small, it might be helpful in distinguishing between triazine- and heptazine-based structures. Interestingly, all reported amorphous carbon nitride films, obtained by means of reactive sputtering, do not demonstrate this signal in their IR spectra. This may be an additional indication in favor of the viewpoint that these materials do not contain imide bringing nitrogen and rather represent graphite-like structures with partial substitution of carbon by nitrogen.

DMAc solutions of all three polymers can easily be applied on different solid supports by most of conventional coating methods and make well-adhered films upon evaporation of the solvent. Presumably, DIPEA plays a critical role, rendering solubility of all the synthesized precursors by forming their salts, as it was demonstrated by NMR spectroscopy. Simultaneously, difficulties with DIPEA removal during films drying prior to their pyrolysis, confirmed by FTIR, results in inevitable doping of the resulting coatings with carbon, arising greatly reduced optical bandgaps and relatively high conductivity.

The hypothesis of significant doping by carbon of the resulting coatings was further supported by the elemental analysis data. Although the content of nitrogen in the annealed films is extremely high for the scale of nitrogen-rich carbons, it is significantly lower than the content of nitrogen in “classical” nitrides of carbon. Low bandgaps, obtained by Tauc plots fitting, also go in line with the hypothesis of highly doped semiconducting material.

XRD and microscopic characterization data both allow to consider the annealed films as semi-amorphous materials, smooth down to the level of dozens of nanometers. Although some signs of existence of nanometer-sized structural units have been observed, the evidences collected during the present study does not allow to characterize this structure.

Measured electrochemical characteristics of the annealed films undoubtedly make them engaging coatings for applications, involving the requirements of high capacitance, low resistance and high electrochemical stability. Although the elucidation of supercapacitive properties of the coated carbons was not in the focus of the current study, the obtained capacitance value of 236 mF cm−2 allows to propose the newly synthesized coatings for further capacitors-related studies.

The most remarkable finding, however, is the combination of outstanding long-term electrochemical stability with high and reproducible anodic currents.

For graphitic carbon, the phenomenon of relatively high currents at positive polarizations well below the OER onset potentials is well described in the literature. For instance, Yi et al. [32] relates this observation to electrochemically active surface groups, assuming formation of surface oxides in the course of surface oxidation with oxidation/reduction peak maximums at 0.6 V and 0.5 V versus RHE, respectively. This and other previous works even describe peeling off the formed oxidized carbon layer in the form of nanoflakes or soluble polycyclic compounds, resulting in yellow–brown color change of electrolyte easily observable with polarization time. In contrast, no changes of electrolyte color during long-term polarization of carbon nitride-coated electrodes was observed even after tens of hours of polarization at potentials exceeding 1.5 V versus Ag/AgCl.

Our explanation of these observations includes reversible formation of carbon nitride oxide on the surface of the electrodes. Although further research is required to elucidate the precise surface chemistry of new electrode materials, it seems reasonable to assume that oxidized surface layers, in contrast with surface oxides formed on glassy carbon, are not detached from electrodes surface into electrolyte and undergo further reduction at negative scanning potentials. Thus, the negative current appearing below -0.3 V may at least partially correspond to surface groups reduction and not HER. Visual absence of any signs of hydrogen evolution even at negative currents as large as 8 mA/cm2 further supports this hypothesis. The observed voltamperograms shapes without any conspicuous peaks can be explained in terms of high diversity of surface groups energy states and/or their kinetic availability, corresponding to a continuum of apparent redox potentials.

Conclusions

Three novel linear 1,3,5-triazineimides have been synthesized by self-condensation of 2-amino-4,6-dichloro-1,3,5-triazine and condensation of cyanuric chloride with 5-aminoterazole or 3-amino-5-carboxytriazole, respectively.

All polymers exhibit excellent solubility in bipolar solvents in the form of the corresponding salts with N, N-diisopropylethylamine. Polymer solutions allow formation of well-adhered thin films on metallic, ceramic and carbonaceous surfaces by spin-coating, dip-coating, spraying or other conventional coating techniques, followed by evaporation of the solvent.

Annealing of polymer films on different substrates at 350–550 °C leads to their transformation to smooth partially ordered hydrophilic carbon nitride coatings with approximately 31 to 45 at% of nitrogen and noticeable oxygen and chlorine content.

Combined FTIR, XRD, elemental analysis and EDX data have allowed us to conclude that annealed films represent the new member of the family of carbon nitrides, based on heptazine structural motifs, although with noticeable carbon and oxygen doping and semi-amorphous structure. The surface of annealed films is smooth down to the level of tens of nanometers, as demonstrated by STM. UV–VIS diffuse reflectance spectroscopy has allowed classifying the materials as low-bandgap semiconductors with bandgap presumably lowered due to carbon doping and negatively correlating with carbon content. The properties of annealed films have exhibited only tiny dependence on the type of precursor polymer used, being to a greater extent associated with annealing conditions.

Electrochemical impedance spectroscopy of coatings reveals their effective resistivity in the range of tens kOhm cm, although the intrinsic resistivity value can be much lower. It allows classifying coatings as conductive rather than semiconductive and supports the hypothesis of carbon doping.

Our preliminary assessment of electrochemical stability of coatings, in strongly acidic environment, has demonstrated outstanding endurance even at high anodic and cathodic polarizations, combined with clear evidence of redox non-innocence of materials. We hypothesize formation of surface carbon nitride oxides at high positive potentials and their reversible reduction below − 0.3 V Ag/AgCl.

In general, the newly synthesized coating materials exhibit the overall properties and electrochemical behavior allowing to characterize them as heptazine-based analogues of turbostratic carbons, although more research is required to elucidate their specific structural patterns. In contrast with glassy carbon, its novel heptazine-based analogs can easily be obtained as coatings and require notably modest annealing temperatures. This opens up the opportunity to create electrochemically active composites with catalytic complexes and nanoparticles with moderate thermal sensitivity. In addition, low contact angles of coatings result in hydrophilic surfaces, potentially giving way for wettable coatings with properties, attractive for fuel cell, sensors, supercapacitors, MEMS devices and membrane applications.