Open Access Article
This Open Access Article is licensed under a
Creative Commons Attribution 3.0 Unported Licence

Adaptive states of carbon nitride semiconductor materials treated with hydrofluoric acid

Oliver Stölting , Yaşar Krysiak and Sebastian Polarz *
Leibniz-University Hannover, Institute of Inorganic Chemistry, Callinstraße 9, 30167 Hannover, Germany. E-mail: sebastian.polarz@aca.uni-hannover.de

Received 16th July 2025 , Accepted 30th September 2025

First published on 1st October 2025


Abstract

The value of the band gap of a semiconductor is a primary factor in determining its suitability for applications, such as in photovoltaics or photocatalysis. Carbon nitride (C3N4; Egap = 2.7 eV) is an attractive representative, as it is a non-toxic material containing abundant elements. Future technologies, e.g., in optical computing, demand semiconductors in which one can reversibly change key characteristics such as Egap by preferably simple methods (temperature, pressure, presence of ions) and reversibly. The current paper demonstrates that carbon nitride protonated by hydrofluoric acid (HF) fulfills these requirements. The protonation process is studied in detail, and unlike the reaction with hydrochloric acid, the reaction with HF is topotactic. The attachment of the protons to the nitrogen atoms only induces a decrease in the interlayer spacing. However, the intralayer spacing increases due to the incorporation of π-bonded fluoride ions in the voids of the carbon nitride planes. These effects together lead to a pronounced structure–property correlation and a notable blue shift of Egap to almost 3 eV. Pristine carbon nitride can be restored by simple thermal treatment. Even more interestingly, a third and new state can be reached by applying pressure. Thus, one can switch reversibly between these three states by using HF, temperature, and pressure.


Introduction

The absence of metals, toxic or rare elements, makes carbon nitride (CN) a semiconductor material of enormous interest. What also makes CN special is that its properties can be adjusted because of its broad structural and compositional variety. C3N4 (“melon”) has been known since 1834.1 Bulk graphitic carbon nitride (BCN), as a polymeric semiconductor, exhibits a band gap (Egap) of approximately 2.7 eV, enabling it to absorb not only ultraviolet but also portions of the visible spectrum.2 Combined with its highly negative conduction band potential, BCN has proven to be a valuable material for photocatalytic applications, including hydrogen generation, dye degradation, and the reduction of carbon dioxide, as described in numerous original papers and reviews.3–7

As with every catalyst, it is also desirable for CN to achieve materials with highest possible surface area and porosity.8 One of the most powerful methods for preparing porous materials in general is the use of templates,9 which are removed after the formation of the network material. The so-called hard-templating variant10 is extremely valuable for creating customized pore structures for materials that require a single process step at high temperatures (≫300 °C) during their synthesis, such as carbons and also CNs.11 Because the template must withstand such conditions, silica is the first choice; ideally, the shape and size of the pores resemble those of the template. A typical procedure involves the use of monodisperse silica spheres of the Stöber type,12 which are assembled into colloidal crystals. The packing voids are filled with a network precursor. After condensation/polymerization, the silica spheres can be removed. The resulting materials are described in the literature as inverted opals, and the pore structure resembles the packing of the silica colloids.13–15 The described method works excellently for the preparation of porous carbon materials, and examples of making inverse CN opals also exist.16,17–19 The removal of the template is a crucial step, and the stability of fully condensed silica requires quite harsh methods. Almost all silica templates in the literature are removed using hydrofluoric acid20–26 (HF) or ammonium bifluoride (NH4HF2), which is easier to handle. The formation of gaseous SiF4 enables quantitative removal of the template.27

Due to the stability of aromatic sp2-bonded centers against electrophilic attack, HF etching works well for preparing porous carbon materials. However, the sp2-N centers in CN possess additional lone pairs. Therefore, it is highly important to examine the consequences of HF treatment in depth and determine whether protonation alone is relevant or if the presence of fluorine leads to specific effects. Graphitic carbon nitride has several sites where protonation could occur, including pyridinic nitrogen in the heptazine unit, tertiary and secondary linking nitrogens, and primary amines resulting from defects. Additionally, the extended conjugation stabilizes the proton uptake, whereby the pKa of protonated mpg-CN could be measured to approximately 6.6.28 Thus, strong acids with a pKa < −6 can protonate carbon nitride, thereby influencing its optoelectronic properties.29 This effect is often attributed to the exfoliation of the materials. Although HF is a relatively weak acid (pKa = 3.1), it is expected to protonate CN to some extent. Tan et al. indicate that the properties of porous CN change after adjustment of the pH, subsequent to silica template removal using NH4HF2.30

Reactions with fluorine atoms could be observed during treatment at higher temperatures. For instance, if fluorine-containing compounds such as sodium- or ammonium fluoride are integrated directly into the synthesis prior to condensation, fluorine doping occurs. C–F bonds are created along with rehybridization of the carbon atoms to sp3.31 Alternatively, fluorine can be introduced through hydrothermal treatment or a high-temperature reflux reaction of already polymerized carbon nitride with sodium fluoride or hydrofluoric acid.32–34 The incorporation of F-centers leads to a decrease in Egap.

Here, we investigate in detail the consequences of acid treatment (HF, HCl) at room temperature on the structure and electronic properties of graphitic carbon nitride. We observe pronounced changes that are unique to HF, due to the creation of stacking defects and curvature of the layers in CN. The effects are fully reversible, indicating that CN should be regarded as a material with pH-adaptive properties.

Experimental

Materials

Dicyandiamide (99%), hydrofluoric acid (48 wt%), hydrochloric acid (37 wt%), sodium hydroxide, sodium fluoride, Rhodamine B, 5,5-dimethyl-1-pyrroline N-oxide (DMPO) and calcium chloride were purchased from Sigma Aldrich. All reagents were used without further purification.

Synthesis of bulk carbon nitride (BCN)

BCN was prepared as described in the literature.35 Dicyandiamide was placed in a ceramic crucible with a lid and heated in a muffle furnace under nitrogen gas flow for 4 h at 550 °C using a heating rate of 2 °C per minute. The product was fully ground after natural cooling.

Post treatment of bulk carbon nitride

The acid treatment of BCN was performed by post treatment with hydrofluoric- (HF) and hydrochloric acid (HCl). Therefore, BCN (0.5 g) was mixed with 5 mL of various aqueous concentrations of HF (10 wt%, 20 wt%, 30 wt%, 40 wt%, 48 wt%), HCl (9.25 wt%, 18.5 wt%, 37 wt%) and stirred for 1d. The solids were washed with water until the supernatant was neutral and dried at 90 °C under ambient pressure. Special safety equipment was used for the treatment with hydrofluoric acid and the solution was quenched afterwards with calcium chloride. Also, sodium fluoride treatments of BCN (0.96 wt%, 1.93 wt% and 3.85 wt% NaF) were performed under the same conditions.

The use of hydrofluoric acid needs special equipment like full protection clothing and fume hood and must be treated with caution.

Post treatment of chemically treated samples

Heat treatment of HF-treated samples was performed in a sealed tube furnace under nitrogen with a subsequent safety solution of calcium chloride and sodium hydroxide. The samples were treated for 4 h at 550 °C using a heating rate of 2 °C per minute. Pressure treatment were performed using a hydraulic press. The samples were pressed for 5 minutes with a pressure of 5 tons with a stamp of 12 mm diameter. Afterwards the powder was fully grounded.

Characterization methods

Powder X-Ray Diffraction (pXRD) was performed in transmission on a Stadi-P (STOE) in Debye-Scherrer geometry equipped with a Ge(111) monochromator (Cu-Kα λ = 1.54056 Å) and a MYTHEN 1K Stripdetector (DECTRIS). Measurements from 2° to 50° in 2theta with a step width of 0.3. The software WinXPOW (STOE and Cie GmbH) was used for data acquisition. UV-visible diffuse reflectance spectroscopy (UV-vis) was performed on a Cary4000 (AGILENT) equipped with a Praying Mantis diffuse reflectance accessory. Barium sulphate powder was used as reference. Nitrogen physisorption measurements were performed on a 3Star (Micromeritics Instrument Corporation) after outgassing the sample for 24 h at 80 °C under vacuum. Surface areas were calculated with the associated software MicroActive. Scanning electron microscopy (SEM) were performed using a Regulus 8230 (Hitachi). Zeta potential were measured by dynamic light scattering (DLS) with the Zetasizer Nano-ZS (Malvern Panalytical), wherefore 2 mg of each sample was dispersed in 5 mL water and ultrasonicated before measurement. X-Ray photoelectron spectroscopy and Ultraviolet photoelectron spectroscopy (XPS and UPS) were performed on a Versaprobe III (PHYSICAL ELECTRONICS) and deconvoluted with the software MultiPak. For UPS measurements the stage was tilted to 90 degrees and irradiated with an unfiltered He I (21.22 eV) gas discharge lamp. The valence band maximum was determined relative to the vacuum level using the calculated work function and then converted via the relation 0 V versus NHE (Normal hydrogen electrode) equals −4.44 eV versus Evac (vacuum level). The conduction band potential was estimated about the relationship of the band gap resulting from UV-vis. Fourier transform infrared spectroscopy (FT-IR) was measured using a Platinum ATR set-up on a TENSOR 27 from (BRUKER). Optical images of the samples were performed with a Canon EOS 500D camera in a light box. The photo was white-balanced with the software Adobe Lightroom. Photoluminescence spectra and lifetime decay measurements (PL & TRFLD) were performed on a FLS 1000 UV (Edinburgh) and fitted with the instrument response function. Atomic Force Microscopy (AFM) was used in non-contact mode to evaluate the thickness of the materials on a Park System NX10. The data was evaluated using XEI. Electron spin resonance (ESR) were recorded on a Magnet Tech MS 50000 (BRUKER) to analyse the production of reactive oxygen species (ROS). Hereby, 100 mM DMPO was used in methanol or water with a catalyst loading of 0.5 g L−1. The dispersions were irradiated with 365 nm for 10 min.

Photocatalytic experiments

The degradation of the toxic pollutant Rhodamine B was chosen as a standard reaction to analyse the photocatalytic properties. In a typical experiment, 100 mg of catalyst was added to 70 mL Rhodamine B solution (0.0313 mM) in a quartz round flask. Before starting the irradiation, the dispersion was stirred in the dark to achieve an adsorption–desorption equilibrium. Afterwards, the dispersion was irradiated with a 100 W UV lamp (365 nm) at a constant distance of 2 cm. To analyse the degradation behaviour at fixed intervals (−30, 0, 5, 10, 15, 30, 60, 120 min), 2 mL aliquots were taken and analysed with a UV-vis spectrophotometer. The catalyst was separated before measurement through a 0.45 μm syringe filter.

Results and discussion

Structural- and optoelectronic effects of HF treatment

Bulk carbon nitride (BCN) was synthesised via a thermal condensation method of dicyandiamide (see the experimental part). BCN was then treated with aqueous hydrofluoric acid with concentrations ranging from 10 wt% to 48 wt%. The resulting samples are denoted FxCN (with x = concentration in % of the used aqueous HF). Fig. 1a presents the powder X-ray diffraction (pXRD) patterns of the FxCN samples in comparison to pristine BCN. Two characteristic reflections are observed. Assuming an orthorhombic structure, the (210) reflection at 12.91° corresponds to the intralayer ordering with a distance of 6.85 Å, and the 002 reflection at 27.2° is associated with interlayer stacking and a spacing of 3.28 Å.36 Both reflections are retained in the HF-treated samples, indicating general structural preservation with only minor variations. As the HF concentration increases, the intensity of the (210) reflection gradually decreases, accompanied by a slight shift towards a distance of 6.9 Å. This suggests a minor expansion within the planes and an increased structural disorder. Furthermore, a nearly linear shift of the (002) reflection towards 27.5° is observed (see the enlarged section in Fig. 1a). The latter indicates a closer stacking of layers with a reduced interlayer distance of 3.24 Å as a result of HF-treatment.
image file: d5nr03007b-f1.tif
Fig. 1 (a) PXRD patterns of BCN as a starting material and the HF-treated compounds. (b) Tauc-plot of BCN (black) and with various concentration of HF treated samples (red). (c) Photographic images of BCN and the HF-treated samples.

The intensity and full width at half maximum (FWHM) of all reflections increase slightly while the reflection area remains nearly constant, suggesting that no exfoliation of the layers has occurred. Exfoliation would cause a strong reduction in the overall intensity (peak area) due to the reduction in periodic stacking with simultaneous broadening of the FWHM. Therefore, the widening of the FWHM with a relatively constant peak area rather speaks for an inhomogeneous change in the stacking behaviour. Additionally, the intensity of the weak (310) reflection increases at low HF concentrations and then decreases as the concentration increases. This reflection is typically associated with non-ideal type stacking, which may indicate a partial transition in the stacking order of the layers induced by HF treatment.37

If only the surfaces of BCN were protonated, one could not observe a shift in the lattice planes. Therefore, protons are also attached in the volume phase. Considering that charge neutrality requires that F ions have to be incorporated as well, the contraction in the (002) direction is remarkable. We assume that F occupies vacant positions in the layers, which is consistent with the expansion in this direction and will be discussed in further detail below.

The visual inspection of the samples (Fig. 1c) indicates that the structural changes correlate with changes in the electronic properties. BCN appears coloured due to weak absorption of light in the VIS. The higher x, the more decolorization is observed. This effect is due to a gradual shift of the absorption edge towards higher energy as deduced from UV/Vis diffuse reflection measurements (Fig. S1). The UV-vis spectra shown were converted into Tauc-plots presented in Fig. 1b, from which Egap was determined. BCN exhibits a band gap of 2.75 eV, which is in good agreement with values reported in the literature.2 The different degrees of protonation lead to a shift of Egap to 2.91 eV for F48CN. Actually, the UV-vis spectra (Fig. S1) display two distinct absorption bands at approximately λ1,2 = 280 nm and 390 nm. According to Jacob et al.,38 the peak at λ1 arises from a transition involving degenerated π electrons, while the absorption at λ2 is associated with interlayer electronic interactions. Interestingly, the UV/Vis spectra show that the relative intensity of the band λ2 weakens, indicating a reduced interaction between the layers, which seems to contradict the contraction of the lattice in the (002) direction. A possible explanation is that protonation reduces the interlayer electronic interaction, but leads to planarization and eventually different stacking, which in turn results in denser packing.

Photoluminescence (PL) data were recorded next (Fig. 2 with Jacobian correction;39 uncorrected data in Fig. S2). In line with the absorption data, a blue shift in the emission peak maxima is observed with increasing HF concentration. Subtle changes in the charge carrier dynamics can be observed by time-resolved photoluminescence measurements (Fig. 2b). The decay curves, fitted using a triexponential model (Table S1), show a decrease in the average lifetime because of HF treatment. According to Merschjann et al.,40,41 charge transfer in carbon nitride occurs predominantly between the layers. A potential explanation for the higher lifetime of excitons is that electron–hole recombination is aggravated in FxCN materials.


image file: d5nr03007b-f2.tif
Fig. 2 (a) Normalised and Jacobian corrected photoluminescence emission spectra with an excitation at 375 nm and (b) time resolved fluorescence decay spectra of HF treated (red) samples compared to BCN (black). (c) Concentration dependent average lifetime. (d) Comparison of Egap from Tauc-plot and PL.

Because of the weak acidity of HF, it is unclear if protonation, fluoride intercalation, or both are responsible for the observed structural changes. Therefore, we performed reference experiments using sodium fluoride (NaF) or hydrochloric acid (HCl). The samples were analysed in analogy to the HF-treated BCN, and the data are given in the Fig. S3 and S4. As expected, NaF has no effect on BCN. The interlayer distance and Egap remain unaltered as shown in Fig. 3. For ClxCN, however, a similar trend is observed compared to FxCN. There is a linear correlation between decreasing interlayer distance and increasing band gap. Notably, the sample treated with concentrated HCl (Cl37CN) exhibits the most pronounced changes, with a reduced interlayer distance of 3.20 Å and a corresponding band gap of 2.98 eV. These findings suggest that a partial or full protonation is the main factor determining the band gap shift observed in acid-treated carbon nitride. Protonation is most likely to occur at the nitrogen centers, which will increase their electronegativity. However, another factor can contribute. The larger intraplane distances reduce the overlap integral. Both factors change the energy of the crystal orbitals and, thus, impact Egap.


image file: d5nr03007b-f3.tif
Fig. 3 Plot of the interlayer distance versus band gap for NaF (purple triangles), HF (red squares) and HCl (blue circles) treated samples.

To investigate the extent of protonation, zeta potential measurements were conducted. Bulk carbon nitride exhibits a negative zeta potential of −32.3 mV, which shifts to +37.1 mV upon treatment with HCl (Cl37CN), consistent with complete protonation as reported in the literature.29 Similarly, the sample treated with F48CN shows a positive zeta potential of +18.4 mV, indicating partial protonation. This corresponds to approximately 73% of the surface charge change observed in the HCl-treated sample, which aligns well with the 70% increase in band gap relative to the HCl-treated reference, further supporting the role of protonation in modulating the optoelectronic properties.

Are there no further differences between FxCN and ClxCN except for the degree of protonation? Fig. 4 shows the ultraviolet photo-electron spectroscopy (UPS) spectra of BCN, F48CN, and Cl37CN. Despite the lower degree of protonation in F48CN, one sees that, in particular, the valence band (VB) is shifted to lower energies than is the case for Cl37CN. The conduction band (CB) is now shifted to a much more negative potential compared to BCN. This means that the halogenide counterion must also be important for the electronic properties.


image file: d5nr03007b-f4.tif
Fig. 4 (a) UPS spectra with magnification of the valence band maxima for BCN (black), Cl37CN (light blue) and F48CN (light red). (b) Converted position of the valence band maxima and conduction band maxima against standard hydrogen electrode.

An interesting difference between the HF and the HCl treatment can also be deduced from nitrogen physisorption measurements shown in Fig. 5. The isotherms indicate that the prepared BCN is an almost non-porous solid with a low specific surface area SBET = 7.1 m2 g−1. HF treatment has no effect, but the application of HCl almost doubles the surface area, which can be explained by partial exfoliation of the layers. The latter findings are consistent with measurements performed using scanning electron microscopy (SEM), as shown in Fig. S5. A strong change in the material's appearance and partial fragmentation is seen for Cl37CN, which does not occur in F48CN. The described trends are confirmed by atomic force microscopy (AFM Fig. S6). In contrast to F48CN, a significant reduction in particle height size can be observed for Cl37CN, which supports partial exfoliation and larger structural changes. Chlorine ions (ionic radius 181 pm) are too large to fit the void in BCN (≈170 pm radius).42 Balancing the charge of the protons, leads to inclusion between the layers, exfoliation and all together more enhances fragmentation.


image file: d5nr03007b-f5.tif
Fig. 5 N2-physisorption isotherms of BCN (black), F48CN (light red) and Cl37CN (light blue).

Acid-induced chemical changes

To investigate the described effects in further detail and evaluate the differences between HF and HCl treatments, we recorded Fourier transform infrared spectroscopy (FTIR) spectra. Fig. 6a shows the spectra before and after HF treatment. For BCN, the peak at 801 cm−1 can be assigned to the breathing mode of triazine or heptazine units and serves as a reliable indicator of the carbon nitride framework. Vibrational features associated with the aromatic units and N–H bonds are observed between 1200–1700 cm−1. These can be further assigned to C[double bond, length as m-dash]N (1627 cm−1), C[double bond, length as m-dash]N (1548 cm−1), C–N (1394 cm−1) stretching vibrations, as well as N–H bending vibrations from the bridging units such as C–N(C)–C or partial condensed C–N(H)–C at 1308 cm−1 and 1224 cm−1, respectively.43,44 Additionally, a broad absorption band between 3400 and 2900 cm−1 is observed, which can be ascribed to N–H stretching vibrations from terminal amines, secondary linkages, hydrogen bonding, and potentially adsorbed water. All characteristic peaks are retained in the FxCN samples, indicating that the treatment is non-destructive. Furthermore, no additional signals, such as C–F vibrations around 1220–1000 cm−1 are detected (see also the Fig. S7), suggesting that fluorine doping into carbon nitride can be excluded.31 However, a closer examination of the aromatic region between 1700 and 1200 cm−1 in Fig. 6b and c reveals notable shifts in the peak positions.
image file: d5nr03007b-f6.tif
Fig. 6 FTIR spectra, overview (a) and enlargement of the aromatic region (b) and the heptazine breathing vibration (c), of various HF-treated BCN (from F10CN (red) to F48CN (light red)) in comparison to BCN (black).

In particular, the vibrational modes associated with bridging units exhibit a clear shift towards higher wavenumbers starting from F10CN. For F20CN, the C[double bond, length as m-dash]N stretching vibration at 1627 cm−1 exhibits a red shift, while the other aromatic vibrations display a blue shift. This indicates that the HF treatment alters the local chemical environment, specifically weakening certain C[double bond, length as m-dash]N bonds, while strengthening other C–N and C[double bond, length as m-dash]N bonds. Such behaviour may be attributed to changes in dipole moments, local electronegativity, or modifications in hydrogen bonding. A similar trend is observed for the breathing mode of the heptazine units in Fig. 6c, which also shifts to higher wavenumbers from F20CN onwards. This blue shift implies a reduction of hydrogen bonds or an increase in structural rigidity, possibly due to steric effects. We propose that the opposing peak shift results from a redistribution of charge within the heptazine framework, likely caused by protonation of the ring nitrogen atoms (C[double bond, length as m-dash]N–C). Protonation reduces the electron density on the nitrogen atom, thereby diminishing the double bond character of the C[double bond, length as m-dash]N.45,46 Concurrently, polarisation effects may enhance the strength of adjacent C–N and C–N(C/H)–C. The opposing vibration shift can also be tracked in the secondary plot of the band gap versus vibration band shift in Fig. S8. Again, the HCl-treated samples show a very similar behaviour (Fig. S9 and S10). The red shift of the C[double bond, length as m-dash]N vibration is more pronounced in the HCl-treated sample, which correlates well with the higher degree of protonation indicated by the zeta potential measurements.

To further support our conclusion, X-ray photoelectron spectroscopy (XPS) measurements were conducted. Fig. S11a presents the survey XPS spectra of BCN in comparison to F48CN and Cl37CN. In all samples, the characteristic C1s and N1s peaks of carbon nitride are observed. Additionally, signals from oxygen are present across all spectra, attributable to structural defects and residual adsorbed water molecules introduced during thermal pyrolysis. The acid-treated samples also exhibit the expected signals corresponding to the respective counter-ions. High-resolution XPS spectra of the N1s (Fig. 7a) and C1s (Fig. 7b) regions were acquired and deconvoluted. According to Lau et al.,47 the N1s spectrum of bulk carbon nitride can be deconvoluted into four components: the heptazine C[double bond, length as m-dash]N–C at 398.45 eV, a peak at 399.44 eV corresponding to C–NH–C and NH2, which arises from partially condensed linkages and residual primary amines, a third component at 400.71 eV assigned to C–N(C)–C and a high binding energy feature at 404.47 eV attributed to a shake-up satellite of the π system.47 The C1s spectrum can similarly be deconvoluted into several components: C[double bond, length as m-dash]C at 284.60 eV due to impurities such as dust or measured carbon tape, residual C–NH2 at 286.20 eV, heptazine N[double bond, length as m-dash]C–N at 287.99 eV, N–C–O at 288.97 eV, and also a satellite peak of the π system at 293.64 eV.48


image file: d5nr03007b-f7.tif
Fig. 7 (a) and (b) high resolution XPS N1s and C1s spectra of BCN, F48CN as well as Cl37CN.

All components are also present in the acid-treated samples. Notable shifts are observed. Upon protonation, the C[double bond, length as m-dash]N–C peak in the N1s region as well as in the C1s region exhibits a blue shift relative to that of untreated BCN, supporting the FTIR-based conclusion that protonation occurs directly on the heptazine ring. In addition, a simultaneous blue shift of the C–N(H)–C/–NH2 peak is observed, suggesting a coupling effect to the C[double bond, length as m-dash]N–C or an additional protonation site. Given that, even in melamine derivatives, the nitrogen atoms within the triazine ring are more prone to protonation than the terminal amines. Considering our FTIR data indicating a simultaneous shift in the C–N(H)–C vibration, protonation of the heptazine framework leads to a side effect on C–N(H)–C. Still, it should be mentioned that a second protonation site on partially condensed bridging nitrogen cannot be sufficiently ruled out at this point. In addition to the C1s region, no peaks associated with covalent C–F or C–Cl bonds are observed in the high-resolution spectra of the counter ions (Fig. S11), which, together with the FTIR results, rule out additional doping.

The corresponding elemental compositions are summarized in Table 1, based on the detailed data presented in Tables S2–S5. Notably, in contrast to the HCl treatment, the HF-treated sample exhibits a threefold higher atomic concentration of the counter-ions. The latter result is surprising, as the HCl sample has partially exfoliated, and the degree of protonation is higher. The C[thin space (1/6-em)]:[thin space (1/6-em)]N ratio remains unchanged, which indicates that there are no point defects created, as others have assumed.49

Table 1 Atom concentration measured by XPS without charge effects and impurities
Samples C% N% O% F% Cl% C[thin space (1/6-em)]:[thin space (1/6-em)]N
BCN 39.69 59.11 1.20 0.67
F48CN 38.84 57.92 2.79 1.07 0.67
Cl37CN 40.52 55.85 3.59 0.15 0.73


From the collected data, we can now propose a model for FxCN materials, which is schematically shown in Scheme 1. HF treatment leads to the protonation of aromatic nitrogen atoms throughout the volume of the carbon nitride. The degree of protonation can be fine-tuned by the HF concentration. The F ions are incorporated into the structure, resulting in a small but detectable intralayer expansion and a reduced interlayer interaction. Planarization of the layers induces a contraction in the (002) direction, accompanied by a change in the stacking order of the layers.


image file: d5nr03007b-s1.tif
Scheme 1 Scheme of HF and HCl treatment of BCN. With higher magnification of the FxCN structure (m = “melon type”, g = “ideal graphitic carbon nitride”). The colour of nitrogens represents the N1s fits in Fig. 7.

Determining whether a new stacking order is favoured in a semi-crystalline material remains challenging. However, in the structurally related crystalline material poly(triazine imide) (PTI), a change in stacking upon treatment with acid has already been reported.50 DFT calculation determines a band gap of 2.44 eV for a AA stacking, whereas AB stacking has a band gap of 2.73, whereby the AB stacking has a more negative CB edge potential.51 Whether carbon nitride adopts an AA or AB stacking configuration remains a subject of debate to its semi-crystalline character.36,38,51,52 Nonetheless, it is widely accepted that the most energetically favourable stacking maximises attractive π–π interactions while repulsive interactions are minimized, resulting in a staggered AA or AB stacking. Upon protonation, the carbon nitride layers tend to planarize, reducing the interlayer distance and potentially favouring a new stacking arrangement. This reduced spacing facilitates lateral displacement, driven by the minimisation of charge interactions between the layers, an effect promoted by protonation and also the presence of associated counter-ions. All factors together contribute to the unique change in the electronic properties of FxCN.

In comparison, HCl is even more capable of protonating BCN, which also leads to a blue shift of Egap. However, it seems that Cl is too large to be incorporated into the structure. Partial exfoliation is the consequence.

Pressure-induced effects on FxCN

Our findings indicate that the degree of topotacticity is higher for FxCN compared to ClxCN, even for high x values. A topotactic reaction is a type of solid-state reaction where the structural framework of the original material is largely preserved while its composition changes. During this process, ions or molecules are added, removed, or exchanged, typically along specific crystallographic directions, allowing the original crystal structure to remain mostly intact. This characteristic makes topotactic reactions highly reversible.

Therefore, and due to the high volatility of HF, we expect that a thermal post-treatment of protonated samples (T-F48CN) again leads to deprotonation and potential restoration.29Fig. 8a contains the UV/Vis spectra after thermal treatment of F48CN in a nitrogen atmosphere. The band gap shifts back to the original value of BCN (see Fig. S12). Thus, one could go back and forth as indicated in Scheme 1.


image file: d5nr03007b-f8.tif
Fig. 8 (a) UV-Vis spectra normalized to the λ1 peak and Egapvs. interlayer distance (b) of BCN (black), F48CN (light red), p-F48CN (dark red), and T-F48CN (grey) with corresponding wavenumber of the C[double bond, length as m-dash]N vibration (blue). (c) Comparison of the F1s XPS spectra of F48CN (top) with pressed p-F48CN fitted to free F (cyan) and π-bond F (orange).

Interestingly, the application of pressure leads to new and unexpected effects for F48CN exposed to pressure (p-F48CN). Egap = 2.84 eV has shifted to a lower energy, approaching the value of BCN; see (Fig. S12). However, the UV/Vis spectra (Fig. 8a) indicate a unique situation. One sees that the spectral feature at λ2 has gained in intensity. Additionally, an absorption feature beyond 400 nm appears, which can be assigned to the n to π* transition. This transition is only observed in non-planar structures like corrugated carbon nitride, as the nitrogen lone pair electrons must be out of plane.53 The analysis of the p-XRD data demonstrates that the interlayer distance is slightly further reduced under pressure, which is an opposite correlation of Egapversus d002 (Fig. 8b) compared to that found before (Fig. 3). The pressure treatment may induce a structural corrugation and restacking of the carbon nitride layers (Scheme 1). Our interpretation is underlined by FT-IR and XPS measurements of p-F48CN. The value for the wavenumber of the C[double bond, length as m-dash]N vibration indicated that the groups are still protonated (see Fig. S13). The origin of the observed corrugation can be elucidated by comparing the F1s XPS spectra of F48CN and p-F48CN (Fig. 8c). Two species are found. One resembling free F and one in which the fluoride is more tightly bound. We assign the latter signal to the fluoride centers located in the vacancies of the CN layers (see Scheme 1). Small and highly polarizable ions like fluoride can also generate strong anion–pi interactions in addition to hydrogen bonds. In this case, the pi system must be electron-deficient.54–56 Both interactions should be strengthened or even made possible by the number of hydrogen bond formers and electron-deficient pi systems in protonated carbon nitride. Therefore, we believe that fluoride ions lie within the intra layer vacancies and plausibly interact with the pi system of other layers, probably changing the corrugation or stacking of layers. Our model of π interactions is supported by structural investigations in which one sees that the radius of F (128 pm) has become markedly smaller compared to pure electrostatic interactions.57

The XPS measurements show that the π-bonded fluorides have vanished almost completely after application of pressure. One can imagine that pressure counterbalances the necessary intralayer expansion. The reduction of d002 is inconsistent with F populating the interlayer spaces, and exfoliation can also not be observed. Therefore, we assume that the counterions are expelled from the bulk towards the surface upon pressure treatment, as indicated in Scheme 1.

In contrast to pressure-induced irreversible effects like defect healing and partial bond breaking at high pressure with low condensed precursors,58 pristine BCN displays no change after pressure treatment (Fig. S14). Therefore, the protonation-induced effect represents a new reversible pressure sensor. To visualise this, a fivefold cyclic switching is shown in Fig. 9; UV/Vis data (Tauc-plots) shown in Fig. S15. It can be recognised that the pressure-induced effect can be fully reversed by renewed HF treatment. The structural stability is documented by pXRD measurements shown in Fig. S16. Herein, a cyclical change in the layer spacing can be interpreted. The topotactic behaviour ensures structural stability even after 5 cycles without any noticeable deterioration.


image file: d5nr03007b-f9.tif
Fig. 9 Cyclic switching of the band gap via alternating HF and pressure treatment.

Implications of FxCN in photocatalysis

As shown in Fig. 4b, there is a marked shift of the conduction band to higher energy for FxCN. The energetic position of the conduction band determined which substrates can undergo photoreduction reactions.59 An initial assessment was performed using dye degradations (Rhodamine B) experiment with UV light (365 nm) as shown in Fig. 10; original measurements are given in Fig. S17. Despite its smaller surface area, F48CN exhibits the fastest photocatalytic activity with k constant of 0.0315 min−1 in the decomposition of the dye. The degradation is associated with the formation of reactive oxygen species, such as the superoxide radicals from molecular oxygen (O2).59 The transfer of the excited electron to O2 requires more energy from a conduction band that is even higher in energy. We tested the ability to generate reactive oxygen species (ROS), especially superoxide and hydroxide radicals, with an Electron spin resonance (ESR) trapping experiment. As shown in Fig. S18a, F48CN shows the highest signal of superoxide radicals, while hydroxide radicals (Fig. S18b) play only a minor role. Interestingly, the application of pressure reduces the band gap, which also affects the position of the conduction band, resulting in less decomposition of the dye for p-F48CN. Thus, both HF treatment and post-synthetic treatment can be used to adaptively adjust the reductive properties for photocatalysis.
image file: d5nr03007b-f10.tif
Fig. 10 (a) Photocatalytic degradation of Rhodamine B and (b) corresponding plot of –ln(c/c0) versus irradiation time for comparison of reaction rate constants (k).

Conclusions

Treating carbon nitride with an acid may seem simple, but we have seen what a complicated cascade of events it can trigger. Not surprisingly, protons attach to basic centers in the structure (N-atoms), and this can lead to a shift of the band gap. The weaker the acid, the lower the degree of protonation. Also, because of the much lower difficulties in safe handling, one would thus always prefer to work with an acid such as hydrochloric acid.

However, the current paper demonstrates that HF treatment brings substantial benefits. The collected data indicate that the reaction of carbon nitride with hydrofluoric acid is topotactic in nature. Unlike HCl, there is no exfoliation, and F ions appear to be stored reversibly in intralayer voids of the carbon network. Additional π-interactions, enhanced planarization of the layers, and reduced interlayer spacings lead to a unique electronic situation. In addition to tuning Egap, the position of the conduction band is now at a much more negative potential, which could make FxCN even more interesting for photocatalytic applications, which was tested and proven. A particularly interesting case for future research can be to use nanostructured carbon nitride materials in their FxCN variant for testing benefits in carbon dioxide (CO2) photoreduction or in the water splitting reaction. However, it needs to be considered that a high surface area is a key property for any catalyst. While our study was on BCN, we think that the results shown herein show a new way to adjust the properties of nanostructured CN to a much higher degree. The presented results are actually good news for preparing nanostructured carbon nitride via hard templating methods. Dissolution of silica templates via HF treatment will not destroy the crystal structure, but one has to be aware that the obtained material is electronically different from pristine carbon nitride. If similar effects can also be reached using the milder and less toxic ammonium bifluoride reagent will be studied soon, which could then offer a greener, scalable alternative here.

The topotactic nature of the inclusion of HF cannot only be reversed by temperature treatment, but we also found that the application of pressure leads to unique effects. The pressure (433 MPa) is relatively low, compared to other reports on pressure-induced changes of solid-state compounds (GPa range). A third state is reached in which the carbon nitride is still protonated, but the Fcenters have changed their position. A proof-of-concept result was presented for using this novel property as a carbon nitride-based pressure sensor. The special property of FxCN, a topotactic adjustment of the band gap, could therefore in the future be used in non-human-related areas, whereby the colour of the material can be detected directly. One concrete example is the detection of pressure changes caused by the deterioration of buildings such as bridges.

Author contributions

Oliver Stölting: methodology, synthesis, data curation, formal analysis, investigation, writing – original draft, writing – review and editing, conceptualization. Yasar Krysiak: supervision, verification, project administration. Sebastian Polarz: supervision, funding acquisition, project administration, writing – original draft, writing – review and editing, conceptualization.

Conflicts of interest

There are no conflicts to declare.

Data availability

The data supporting this article have been included as part of the supplementary information (SI). Supplementary information is available. See DOI: https://doi.org/10.1039/d5nr03007b.

Acknowledgements

This research was funded by the German Research Foundation (DFG) Project: PO 780/40-1. The authors acknowledge the use of the equipment of the cfMATCH. We thank Dr. Andreas Schaate for the introduction and use of the XPS device. We thank also Dominik Rudolph and Oliver Treske for the device introduction and support in photoluminescence spectroscopy.

References

  1. J. Liebig, Ann. Pharm., 1834, 10, 1–47 CrossRef.
  2. X. Wang, K. Maeda, A. Thomas, K. Takanabe, G. Xin, J. M. Carlsson, K. Domen and M. Antonietti, Nat. Mater., 2009, 8, 76–80 CrossRef CAS PubMed.
  3. W.-J. Ong, L.-L. Tan, Y. H. Ng, S.-T. Yong and S.-P. Chai, Chem. Rev., 2016, 116, 7159–7329 CrossRef CAS PubMed.
  4. S. N. Talapaneni, G. Singh, I. Y. Kim, K. AlBahily, A. H. Al-Muhtaseb, A. S. Karakoti, E. Tavakkoli and A. Vinu, Adv. Mater., 2020, 32, 1904635 CrossRef CAS PubMed.
  5. Y. Fan, X. Chang, W. Wang and H. Fan, Nanomaterials, 2025, 15, 45 CrossRef CAS PubMed.
  6. Y. Fan, L. Lei, J. Cao, W. Wang and H. Fan, ChemSusChem, 2025, 18, e202500462 CrossRef CAS PubMed.
  7. L. Lei, Y. Fan, Y. Jia, H. Fan, W. Wang and H. Huang, J. Mater. Chem. A, 2025, 13, 2836–2848 RSC.
  8. Y. Li, X. Li, H. Zhang and Q. Xiang, Nanoscale Horiz., 2020, 5, 765–786 RSC.
  9. S. Polarz and B. Smarsly, J. Nanosci. Nanotechnol., 2002, 2, 581–612 CrossRef CAS PubMed.
  10. X. Wang, J. Feng, Y. Bai, Q. Zhang and Y. Yin, Chem. Rev., 2016, 116, 10983–11060 CrossRef CAS PubMed.
  11. M. Groenewolt and M. Antonietti, Adv. Mater., 2005, 17, 1789–1792 CrossRef CAS.
  12. W. Stöber, A. Fink and E. Bohn, J. Colloid Interface Sci., 1968, 26, 62–69 CrossRef.
  13. J. F. Galisteo-López, M. Ibisate, R. Sapienza, L. S. Froufe-Pérez, Á. Blanco and C. López, Adv. Mater., 2011, 23, 30–69 CrossRef PubMed.
  14. R. Anselmann and H. Winkler, Adv. Eng. Mater., 2003, 5, 560–562 CrossRef CAS.
  15. A. Thomas, F. Goettmann and M. Antonietti, Chem. Mater., 2008, 20, 738–755 CrossRef CAS.
  16. L. Sun, M. Yang, J. Huang, D. Yu, W. Hong and X. Chen, Adv. Funct. Mater., 2016, 26, 4943–4950 CrossRef CAS.
  17. J. Lei, B. Chen, W. Lv, L. Zhou, L. Wang, Y. Liu and J. Zhang, ACS Sustainable Chem. Eng., 2019, 7, 16467–16473 CrossRef CAS.
  18. Y. Fukasawa, K. Takanabe, A. Shimojima, M. Antonietti, K. Domen and T. Okubo, Chem. – Asian J., 2011, 6, 103–109 CrossRef CAS PubMed.
  19. Y. Tian, L. Zhou, Q. Zhu, J. Lei, L. Wang, J. Zhang and Y. Liu, Nanoscale, 2019, 11, 20638–20647 RSC.
  20. R. Cao, H. Yang, X. Deng, P. Sun, S. Zhang and X. Xu, ChemCatChem, 2018, 10, 5656–5664 CrossRef CAS.
  21. B. Lin, G. Yang, B. Yang and Y. Zhao, Appl. Catal., B, 2016, 198, 276–285 CrossRef CAS.
  22. S. Zhao, X. Zhao, H. Zhang, J. Li and Y. Zhu, Nano Energy, 2017, 35, 405–414 CrossRef CAS.
  23. Q. Li, J. Yang, D. Feng, Z. Wu, Q. Wu, S. S. Park, C.-S. Ha and D. Zhao, Nano Res., 2010, 3, 632–642 CrossRef CAS.
  24. Q. Li, Y. Zhang, Y. Zeng and M. Ding, J. Colloid Interface Sci., 2023, 642, 53–60 CrossRef CAS PubMed.
  25. M. Li, H. Wang, X. Li, S. Zhang, J. Han, A. F. Masters, T. Maschmeyer and X. Liu, ChemCatChem, 2018, 10, 581–589 CrossRef CAS.
  26. E. Doustkhah, A. Kotb, S. Tafazoli, T. Balkan, S. Kaya, D. A. H. Hanaor and M. H. N. Assadi, ACS Mater. Au, 2023, 3, 231–241 CrossRef CAS PubMed.
  27. X. Zhai, J. Liu, P. Li, M. Zhong, C. Ma, H. Wang, Q. Guo, Y. Song and L. Zhi, Int. J. Electrochem. Sci., 2012, 7, 7304–7312 CrossRef CAS.
  28. A. Galushchinskiy, Y. Zou, J. Odutola, P. Nikačević, J.-W. Shi, N. Tkachenko, N. López, P. Farràs and O. Savateev, Angew. Chem., Int. Ed., 2023, 62, e202301815 CrossRef CAS PubMed.
  29. Y. Zhang, A. Thomas, M. Antonietti and X. Wang, J. Am. Chem. Soc., 2009, 131, 50–51 CrossRef CAS PubMed.
  30. M. Xue, G. Tan, T. Liu, L. Lv, B. Li, D. Zhang, M. Dang, H. Ren and A. Xia, Appl. Catal., A, 2019, 578, 89–97 CrossRef CAS.
  31. Y. Wang, Y. Di, M. Antonietti, H. Li, X. Chen and X. Wang, Chem. Mater., 2010, 22, 5119–5121 CrossRef CAS.
  32. F. Ma, C. Sun, Y. Shao, Y. Wu, B. Huang and X. Hao, New J. Chem., 2017, 41, 3061–3067 RSC.
  33. L. Zeng, X. Ding, Z. Sun, W. Hua, W. Song, S. Liu and L. Huang, Appl. Catal., B, 2018, 227, 276–284 CrossRef CAS.
  34. Q. Shang, H. Wang, C. Kan, R. Ding, Y. Li, S. Pandeya, Z. Li and M. K. Joshi, Catal. Sci. Technol., 2024, 14, 6833–6844 RSC.
  35. I. Köwitsch and M. Mehring, J. Mater. Sci., 2021, 56, 18608–18624 CrossRef.
  36. F. Fina, S. K. Callear, G. M. Carins and J. T. S. Irvine, Chem. Mater., 2015, 27, 2612–2618 CrossRef CAS.
  37. T. Tyborski, C. Merschjann, S. Orthmann, F. Yang, M.-C. Lux-Steiner and T. Schedel-Niedrig, J. Phys.: Condens. Matter, 2013, 25, 395402 CrossRef CAS PubMed.
  38. C. Im, M. M. Elnagar, B. Kirchhoff, D. Mitoraj, I. Krivtsov, A. Farkas, R. Beranek and T. Jacob, J. Mater. Chem. C, 2025, 13, 8682–8693 RSC.
  39. J. Mooney and P. Kambhampati, J. Phys. Chem. Lett., 2013, 4, 3316–3318 CrossRef CAS.
  40. X. Cai, Y. Li, Y. Zhang and W. Lin, ACS Catal., 2023, 13, 15877–15885 CrossRef CAS.
  41. C. Merschjann, S. Tschierlei, T. Tyborski, K. Kailasam, S. Orthmann, D. Hollmann, T. Schedel-Niedrig, A. Thomas and S. Lochbrunner, Adv. Mater., 2015, 27, 7993–7999 CrossRef CAS PubMed.
  42. Y. Ji, H. Dong, H. Lin, L. Zhang, T. Hou and Y. Li, RSC Adv., 2016, 6, 52377–52383 RSC.
  43. B. V. Lotsch, M. Döblinger, J. Sehnert, L. Seyfarth, J. Senker, O. Oeckler and W. Schnick, Chem. – Eur. J., 2007, 13, 4969–4980 CrossRef CAS PubMed.
  44. M. Kim, S. Hwang and J.-S. Yu, J. Mater. Chem., 2007, 17, 1656–1659 RSC.
  45. X. Du, G. Zou, Z. Wang and X. Wang, Nanoscale, 2015, 7, 8701–8706 RSC.
  46. R. Kulkarni, Y. Noda, D. K. Barange, Y. S. Kochergin, P. Lyu, B. Balcarova, P. Nachtigall and M. J. Bojdys, Nat. Commun., 2019, 10, 3228 CrossRef PubMed.
  47. V. W. Lau, C.-F. Lu, N. P. Wijaya and M. Lutan, Chem. Mater., 2024, 36, 9762–9774 CrossRef CAS.
  48. D. J. Martin, K. Qiu, S. A. Shevlin, A. D. Handoko, X. Chen, Z. Guo and J. Tang, Angew. Chem., Int. Ed., 2014, 53, 9240–9245 CrossRef CAS PubMed.
  49. X. Su, Z. Xu, M. Li and J. Zhong, Chem. Phys. Lett., 2025, 861, 141818 CrossRef CAS.
  50. G. Li, C. Chen, H. Zhang, Z.-H. Li, C. Sun, Z. Shi and Y. Han, J. Am. Chem. Soc., 2025, 147, 3896–3903 CrossRef CAS PubMed.
  51. A. H. Reshak, Phys. Chem. Chem. Phys., 2018, 20, 22972–22979 RSC.
  52. L. Seyfarth, J. Seyfarth, B. V. Lotsch, W. Schnick and J. Senker, Phys. Chem. Chem. Phys., 2010, 12, 2227–2237 RSC.
  53. Y. Chen, B. Wang, S. Lin, Y. Zhang and X. Wang, J. Phys. Chem. C, 2014, 118, 29981–29989 CrossRef CAS.
  54. L. Zeng, X. Ding, Z. Sun, W. Hua, W. Song, S. Liu and L. Huang, Appl. Catal., B, 2018, 227, 276–284 CrossRef CAS.
  55. I. A. Rather, S. A. Wagay and R. Ali, Coord. Chem. Rev., 2020, 415, 213327 CrossRef CAS.
  56. M. Mascal, I. Yakovlev, E. B. Nikitin and J. C. Fettinger, Angew. Chem., Int. Ed., 2007, 46, 8782–8784 CrossRef CAS PubMed.
  57. S. Y. Chong, J. T. A. Jones, Y. Z. Khimyak, A. I. Cooper, A. Thomas, M. Antonietti and M. J. Bojdys, J. Mater. Chem. A, 2012, 1, 1102–1107 RSC.
  58. L. Kong, X. Guo, Z. Wei, J. Xu, X. Zhang, S. Shi, Q. Wang, B. Zhou and L. Li, J. Photochem. Photobiol., A, 2023, 439, 114626 CrossRef CAS.
  59. X. Zhu, C. Xu, J. Mao, Y. Zhang and Y. Bai, J. Environ. Sci., 2025, 149, 188–199 CrossRef CAS PubMed.

This journal is © The Royal Society of Chemistry 2025
Click here to see how this site uses Cookies. View our privacy policy here.