1 Highlights

  • Well-ordered TiO2 nanotube arrays (TNTAs) decorated with g-C3N4 were fabricated by anodic oxidization of titanium foil and calcination process.

  • The g-C3N4/TNTA heterojunction efficiently enhanced the photoelectrochemical activity for solar light-driven water splitting. Its photocurrent density and applied bias photon-to-current efficiency were, respectively, ~ 0.86 mA cm−2 and ~ 0.25%, about twofold higher compared with those of pristine TiO2 nanotube arrays.

  • The heterojunction expanded the optical absorption range of the TNTAs, accelerated the migration of carriers, and suppressed the recombination of photogenerated electron–hole pairs via an efficient band alignment between TiO2 and g-C3N4.

2 Introduction

Photoelectrochemical (PEC) water splitting is a promising process in which solar energy is transformed into chemical energy and stored in the form of hydrogen [1,2,3]. In the past decades, semiconductor-based photoelectrodes, such as Fe2O3 [4, 5], CdS [6, 7], ZnO [8, 9], CuInS2 [10], WO3 [11], and TiO2 [12,13,14], for PEC cells have been extensively utilized to convert solar energy into fuel. TiO2 nanotube arrays (TNTAs) are commonly employed as photocatalysts owing to their excellent photochemical and chemical stability, non-toxicity, low cost, and well-aligned nanostructures. Furthermore, TNTAs have a higher specific surface area and pore volume compared to TiO2 nanoparticles for other active catalysts adsorbed onto the surface of both sides of nanotubes [15,16,17]. Despite the considerable advantages in the morphology of the one-dimensional nanostructure, the photocatalytic activity of pristine TiO2 is greatly limited by its wide band gap of ~ 3.2 eV, which leads to the extremely low absorption in the visible region of solar spectrum. In addition, the fast recombination rate of the photogenerated electron–hole pairs also restricts their photochemical applications. Therefore, great efforts have been made to expand its absorption range to the visible region, including decoration with precious metals [12, 18], element doping [19, 20], dye-sensitization [21], or coupling with other semiconductors to form a heterojunction [22,23,24].

Recently, graphite-like carbon nitride (g-C3N4), as a significant metal-free polymeric semiconductor with inherent chemical and thermal stability, and a moderate band gap of 2.7 eV, has generated a lot of interest [25,26,27]. Compared to transition metal oxides and sulfide semiconductor photocatalysts, g-C3N4 is composed of strong covalent bonds between carbon and nitride atoms and demonstrates high stability in acidic and alkaline electrolytes, which is favorable for PEC applications [25, 28]. However, owing to the low quantum efficiency and high electron–hole recombination rate [29], the applications of pure g-C3N4 are limited by its relatively low photoelectric conversion efficiency. Therefore, there is a significant scope to explore and design novel hybrid materials and improve the applicability of pure g-C3N4.

Herein, we fabricated a g-C3N4/TNTA heterojunction by combining anodized TNTAs on titanium foil and g-C3N4 prepared via the calcination process of the hydrogen-bonded cyanuric acid melamine (CM) supramolecular complex [30]. Owing to the existence of free hydroxyl and amine groups, the CM complex could be attached to TNTAs and amorphous TiO2. We have presented a facile and simple method to grow carbon nitride on the inner and outer surface of the TNTAs. More importantly, the new heterostructures of g-C3N4/TNTAs exhibit enhanced PEC water splitting activity, which is twice that of pristine TNTAs and more than four times that of amorphous TiO2. In addition, the results of this work proved that the heterojunctions were highly efficient as photoanodes and demonstrated stable performances for PEC water splitting.

3 Experimental Section

3.1 Chemicals

All reagents were of analytical grade and used without further purification. Ammonium fluoride (NH4F), cyanuric acid, melamine, and glycerol were purchased from Sinopharm Chemical Reagent Co., Ltd.

3.2 Preparation of Photoelectrodes

The preparation of the g-C3N4/TNTAs is schematically shown in Fig. 1. In a typical synthetic procedure, Ti foil (99.9%) and a platinum sheet with a size of 1 × 1 cm2 were used as the working and counter electrodes, respectively. The electrolyte solution was prepared by dissolving 0.5 wt% of NH4F in 20 mL H2O and 80 mL glycerol. The Ti foils (1 × 4 cm2 with a thickness of 0.3 mm) were cleaned by ultrasonication in acetone, ethanol, and DI water sequentially. The well-ordered TNTAs on Ti foils were synthesized via a modified one-step anodization procedure at 30 V for 2 h at room temperature. Subsequently, the obtained TNTA precursor was thoroughly rinsed with DI water, annealed at 550 °C in air at a heating rate of 3 °C min−1 for 2 h, and naturally cooled to room temperature.

Fig. 1
figure 1

Schematic diagram of the preparation of TNTAs and g-C3N4/TNTA photoelectrodes

The g-C3N4 precursor (CM complexes) was prepared by dissolving cyanuric acid and melamine (1:1) in DI water and stirring for 4 h, after which the white CM complexes were precipitated. The white powders were washed several times with DI water, and the resulting powders were dried at 60 °C in a vacuum oven. The g-C3N4/TNTA heterojunctions were prepared by calcining in a tube furnace. A specified amount of CM complexes was placed between two slices of TNTAs (or Ti). These layers were then placed in a ceramic crucible and calcined at 550 °C for 4 h under nitrogen at a heating rate of 3 °C per minute. After heating, the residual powders were blown away by a strong airstream to obtain the g-C3N4/TNTAs. In order to investigate the role of the semiconductor, two clean Ti foils without anodic oxidation treatment were used to replace the TNTAs as the substrates. After subjecting to the same calcined process, the g-C3N4 thin film was obtained on amorphous TiO2 and the assembly was used as a photoelectrode for comparison with g-C3N4/TNTAs.

3.3 Structural and Optical Characterizations

The crystal structures were determined by X-ray diffraction (XRD) on a PANalytical X’Pert powder diffractometer with Cu Kα radiation (λ = 1.54 Å). Diffraction angle (2θ) ranged from 10° to 80° and the scanning step was 0.02°. The Raman spectra were obtained on a LabRAM HR Evolution spectrometer (HORIBA Jobin–Yvon) with an excitation wavelength of 532 nm. The morphology of the samples was studied by using a field emission scanning electron microscope (FE-SEM, FEI-quanta 200, 15 kV) and an atomic force microscope (AFM, Digital Instruments Nanoscope III, operating in tapping mode). The microstructure was observed by transmission electron microscopy (TEM) equipped with an energy-dispersive X-ray spectrometer (EDS). The surface compositions and elemental chemical states of the samples were examined by using an X-ray photoelectron spectrometer (XPS) with K-Alpha 1063 (Thermo Fisher Scientific, UK) instrument equipped with an Al Kα monochromator X-ray source. The light absorption of the samples was recorded with a UV–Vis spectrophotometer (UV-2500, Shimadzu, Japan).

3.4 Photoelectrochemical Measurements

The PEC properties of the fabricated samples were measured on an electrochemical workstation (CHI660E) comprised of a three-electrode cell system of an Ag/AgCl reference electrode and a platinum counter electrode in an aqueous solution of 0.1 M Na2SO4 as the electrolyte. Light was provided by a 300-W Xe arc lamp and its power density was adjusted to 100 mW cm−2. In our study, all potential readings have been reported with respect to the reversible hydrogen electrode (RHE) using the equation: ERHE = EAg/AgCl + (0.059 × 5.6) + 0.197 = EAg/AgCl + 0.53 (V). Linear sweep voltammetry (LSV) curves were collected at a scan rate of 10 mV s−1 with or without illumination. The periodically illuminated LSV measurement with on–off light was also recorded. In addition, the electrochemical impedance spectra (EIS) of the different photoelectrodes were obtained in the frequency range of 100 kHz–0.1 Hz without applied bias. The Mott–Schottky plots were obtained at 10 kHz frequency. The transient open-circuit potentials (OCPs) were also measured in the dark and under light illumination.

4 Results and Discussion

XRD studies were performed to investigate the phase purity and crystallographic structure of the as-prepared g-C3N4/TNTAs photoanode. As demonstrated in Fig. 2a, the TNTAs belong to the pure anatase phase (JCPDS card No. 21-1272) [31], and their crystal structure was almost unchanged after the loading of g-C3N4. The diffraction peaks at ~ 25° and ~ 37.8° of the TNTAs and the g-C3N4/TNTAs heterojunction were assigned to the TiO2 (101) and (004) peaks, respectively. Meanwhile, the peak at ~ 27.3° was attributed to the interlayer stacking of aromatic systems (002) of g-C3N4 (JCPDS card No. 87-1526) [32]. It is worth noting that the intensity of the (004) peak of g-C3N4/TNTAs was significantly reduced as compared with that of pure TNTAs, confirming the loading of g-C3N4 layers on the TNTA surface. The crystalline formation in the TNTAs and the loading of g-C3N4 was also confirmed by Raman scattering (Fig. 2b). Compared to pristine TNTAs, the specific peaks of the g-C3N4/TNTAs at 1337 and 1617 cm−1 were attributed to the symmetric E2g vibration mode in the graphite-like structure and disordered sp2 micro-domains introduced by linking with N atoms [33,34,35], which indicated the successful loading of the graphitic C3N4 layer on the TNTAs. In addition, the annealed TNTAs and g-C3N4/TNTAs exhibited a series peaks at 146, 197, 395, 514, and 639 cm−1, which were characteristic of anatase TiO2 [36]. The Raman bands at 146, 197, and 639 cm−1 corresponded to the Eg mode, and two other peaks at 395 and 514 cm−1 were assigned to the B1g mode. The Raman band observed at 144 cm−1 in the rutile phase of TiO2 is sharp but of weak intensity, which is significantly different from the intense and sharp band observed in the case of anatase [37].

Fig. 2
figure 2

a XRD and b Raman spectra of g-C3N4, TNTAs, and g-C3N4/TNTAs

Figure 3a, b is the SEM images of the TNTAs and g-C3N4/TNTA layers grown on the Ti substrate, respectively. Under the optimized electrochemical anodization conditions (as described in the Experimental section), the average diameter of the TNTAs was ~ 150 nm, as shown in Fig. 3a. Subsequently, the tube layers were decorated with g-C3N4 via calcination of the CM powder under a nitrogen atmosphere. In order to compare the different roles of the tubes, titanium foil was also used as a substrate to decorate g-C3N4 under the same conditions (labeled as g-C3N4/TiO2). The SEM image in Fig. 3b clearly shows that after the g-C3N4 decoration process, the tube diameter decreased to only ~ 100 nm, indicating that the g-C3N4 was successfully decorated on the inner and outer walls of the tubes, leading to a decrease in the inner diameter of tubes. As described in Fig. S1, a continuous and compact g-C3N4 film was formed on the amorphous TiO2 surface. The TEM image of the g-C3N4/TNTAs given in Fig. 3c illustrates their distinct tubular structure; the tubes possessed a uniform diameter of ~ 100 nm. The EDS spectrum of g-C3N4/TNTAs (Fig. 3d) showed the peaks characteristic of the Ti, O, and C elements, further confirming the decoration of g-C3N4 on TiO2. Curiously, the nitrogen peak was not observed in the EDX spectrum. This was attributed to the low loading of g-C3N4 on the surface of the TNTAs and the low content of nitrogen in the sample. The existence of nitrogen was instead confirmed by XPS. Figure 3e shows the high-angle annular dark field (HAADF) scanning transmission electron microscopy (STEM) images of the g-C3N4/TNTAs heterojunctions. The EDS mapping analysis shows the uniform distribution of each element at the inner or outer surface of the TNTAs (Fig. 3f–i), indicating the successful coating of g-C3N4 during the high-temperature annealing process from the CM precursor.

Fig. 3
figure 3

SEM images of the as-synthesized a TNTAs and b g-C3N4/TNTAs. c TEM image and d EDX spectrum of g-C3N4/TNTAs. e, f Elemental mapping results of g-C3N4/TNTAs

In order to characterize the changes in the tube diameter more intuitively, we prepared a statistical histogram of the number of nanotubes with different rin/rout values for TNTAs and g-C3N4/TNTAs, where rin and rout refer to the inner and outer diameters of the nanotubes, respectively (Fig. 4). The value of rin/rout was used to evaluate the thickness of the g-C3N4 layers, i.e., a smaller value represented a larger thickness of the g-C3N4 layers on the surface of the TNTAs and vice versa. As shown in Fig. 4, the average value of rin/rout for g-C3N4/TNTAs was ~ 40%, which was much smaller than that of pristine TNTAs and implied that g-C3N4 was effectively decorated on the inner and outer walls of the tubes via calcination of the CM complex.

Fig. 4
figure 4

Number of nanotubes with different rin/rout values for TNTAs (black) and g-C3N4/TNTAs (red). (Color figure online)

The surface morphology of the nanotube arrays was further investigated by AFM, as shown in Fig. 5. The characteristic two-dimensional (2D) images of the TNTAs and g-C3N4/TNTAs are shown in Fig. 5a, c, respectively. The as-prepared TNTAs with well-defined tubes can be observed, and it is also evident that the inner diameters of these tubes were greatly decreased upon coating with g-C3N4. A close inspection of the 2D AFM images revealed that the tube wall thicknesses of TNTAs and g-C3N4/TNTAs were ~ 59 and 91 nm, respectively.

Fig. 5
figure 5

Top view and 3D AFM images (2 × 2 μm2) of a, b TNTAs and c, d g-C3N4/TNTAs

XPS was employed to probe the surface chemical compositions and valence states of g-C3N4/TNTAs. Figure 6a presents the overall XP spectrum of the heterojunction, which indicated the presence of Ti, O, C, and a small amount of N from the g-C3N4. Figure 6b shows the high-resolution XP spectrum of the Ti 2p state in the g-C3N4/TNTAs, with the two different peaks of Ti 2p1/2 and Ti 2p3/2 and their binding energies (BE) of 458.9 and 464.6 eV, respectively, which were derived from Ti4+ in TiO2, according to the results of XRD and Raman spectroscopy. It is worth noting that the BE of Ti 2p in g-C3N4/TNTAs was slightly positively shifted as compared with that of pristine TNTAs, indicating the presence of interactions between the g-C3N4 and TNTAs in the form of charge transfer from the electron-rich g-C3N4 surface to the unoccupied orbital of Ti4+ in TiO2. The high-resolution C 1s XP spectrum, as shown in Fig. 6c, can be deconvoluted into three peaks at 284.9, 286.6, and 288.6 eV, indicating that carbon possesses three diverse chemical states. The peak at 284.9 eV corresponded to the signal of graphite-like sp2-hybridized C–C, ascribed to the carbon species adsorbed on the surface of g-C3N4. The peaks at 286.6 and 288.6 eV corresponded to C–OH and C–N=C bonds of the heterocycle rings, respectively [38, 39]. Figure 6d shows the XP spectrum of N 1s, which was deconvoluted into three peaks at 399.4, 400.6, and 402.3 eV. The peak at 399.4 eV was typical of the sp2-hybridized nitrogen (C–N=C), and the peaks at 400.6 and 402.3 eV corresponded to tertiary nitrogen N–(C)3 groups linking the structural motif and amino groups with a hydrogen atom ((C)2–N–H) in connection with structural defects and incomplete condensation [40,41,42].

Fig. 6
figure 6

XPS spectra of g-C3N4/TNTAs: a survey scan, b Ti 2p, c C 1s, and d N 1s scans

To further understand the electronic band structures and photocatalytic properties, the UV–Vis diffuse reflectance spectra (DRS) were obtained to characterize the TNTAs and g-C3N4/TNTAs. Figure S2a shows the UV–Vis absorption spectra converted from the reflection absorbance spectra by the standard Kubelka–Munk method. The pristine TNTAs and g-C3N4/TNTAs exhibited an absorption edge at ~ 400 nm, and the light absorption of g-C3N4/TNTAs was greatly enhanced [43]. In order to calculate the band gaps, the corresponding (αhυ)1/2 were plotted versus the photon energy () [44], as shown in Fig. S2b. The band gaps of the TNTAs and g-C3N4/TNTAs were calculated to be 3.23 and 3.10 eV, respectively, by extrapolating their plots to (αhυ)1/2 = 0, according to the linear-fit lines. To determine the existence of g-C3N4 in the photoanode heterostructure, the FTIR spectrum was obtained. As shown in Fig. S3, the FTIR spectrum of pristine g-C3N4 was very similar to that of g-C3N4, consistent with previous reports [45]. The absorption peaks located at 1230, 1316, 1398, 1553, and 1631 cm−1 were related to the typical stretching modes of aromatic C–N [46]. The wide peak observed at wavelengths higher than 3000 cm−1 is usually attributed to the H2O molecules adsorbed on the surface of the materials. The absorption peak at 808 cm−1 was typical of the out-of-plane bending mode of the thiazine unit. Compared to the IR spectrum of pristine g-C3N4, a series of similar peaks were observed in the case of g-C3N4/TNTAs, which indicated a full coverage of g-C3N4 over the TNTAs.

Compared to the pristine TNTAs, the combination of TNTAs and g-C3N4 exhibits attractive features for enhanced PEC performance. A series of LSV measurements were carried out on the electrochemical workstation CHI660E. Typical plots of photocurrent density vs. bias potential in the potential window of – 0.4 to + 1.3 V versus Ag/AgCl with 0.1 M Na2SO4 (pH 6.8) as electrolyte are shown in Fig. 7a. The photocurrent density of the g-C3N4/TNTA photoanode at a potential of 0.7 V versus Ag/AgCl (i.e., 1.23 V vs. RHE) was ~ 0.86 mA cm−2, which was almost twice that of pristine TNTAs. Furthermore, the photocurrent densities of g-C3N4/TiO2 and amorphous TiO2 were determined to be 0.19 and 0.07 mA cm−2, respectively, which were obviously lower than that of the corresponding g-C3N4/TNTA and TNTA photoanodes. This suggested that the crystalline TiO2 nanotubes had a more distinct photoresponse in comparison with the amorphous TiO2 film. Figure 7b displays the transient photocurrent density (I–t) of the g-C3N4/TNTA and TNTA photoanodes under interrupted illumination at a potential of 0.7 V versus Ag/AgCl. With the on/off switching of light, there was a sharp increase and decrease in the photocurrent density, illustrating a quick photoresponse of the photoanodes. The photocurrents of the different photoanodes were almost of the same order of magnitude. The linear sweep voltammetry results are shown in Fig. 7a. The photocurrent density of pure g-C3N4 decorated on the surface of fluorine-doped tin oxide (FTO) glass was also tested (Fig. S4) and found to be a low value of 0.35 μA cm−2. This low value indicated the poor photoresponse of pure g-C3N4. Therefore, the enhanced photocurrent density of g-C3N4/TNTAs could be attributed to the synergistic effect of the heterojunction between TNTAs and g-C3N4.

Fig. 7
figure 7

a Current–potential curves of the g-C3N4/TNTA photoanode and reference samples (TNTAs, amorphous TiO2, and g-C3N4/TiO2) under light irradiation (100 mW cm−2). The dark line indicates the dark current density. b Time-dependent photocurrent density of different photoanodes under intermittent light irradiation. c Photoconversion efficiency as a function of applied potential for different photoanodes. d Chronoamperometry plot (I–t) of the g-C3N4/TNTAs measured in 0.1 M Na2SO4 with a three-electrode system at 1.23 VRHE for 10 h

The applied bias photon-to-current efficiencies (ABPE) of the photoanodes for PEC water splitting were estimated according to the following equation [47]:

$${\text{ABPE }}(\% ) = \, \left( {\frac{{I \times \, (1.23 - V_{\text{app}} )}}{{P_{\text{incident}} }}} \right) \times 100\%$$
(1)

where Vapp is the applied external potential vs. RHE, I is the measured current density, and Pincident is the power density of the incident light. The calculated ABPE of the different photoanodes are illustrated in Fig. 7c. The maximum efficiency of the g-C3N4/TNTA electrode was ~ 0.25% (at 0.70 V vs. RHE), i.e., ~ 2.08 times higher than that of pristine TNTAs (0.12% at 0.76 V vs. RHE). However, the ABPE of g-C3N4/TiO2 and amorphous TiO2 were 0.07% (at 0.59 V vs. RHE) and 0.02% (at 0.72 V vs. RHE), respectively. The improved ABPE of g-C3N4/TNTAs were attributed to the creation of the heterojunction of the TiO2 nanotubes and g-C3N4, which could accelerate the charge migration and promote carrier separation. Furthermore, the g-C3N4/TNTAs demonstrated excellent stability (Fig. 7d), as the photocurrent remained relatively stable and retained ~ 94% of its initial value after more than 14,000 s of continuous testing under light irradiation at 1.23 V versus RHE. The outstanding PEC performance was attributed to the optimal g-C3N4/TNTAs heterojunction structure, in which the graphene-like structure of g-C3N4 enhanced photoabsorption and simultaneously accelerated the charge separation between TiO2 nanotubes and g-C3N4 [48].

The EIS data are an important tool obtained from the Nyquist plots to further evaluate the kinetics of charge transfer at the electrode/electrolyte interface under both dark and light irradiation conditions. The EIS Nyquist plots (Fig. 8) can be developed by the ZsimpWin software using the R((RQ)(RQ)) circuit model, including solution resistance (R), charge transfer resistance (R3) as the main research object, electrode resistance (R2), and electrochemical double-layer capacitance (Q). The fitting curve (full line) was well-matched with the experimental curve (dotted line), demonstrating a valid circuit model. It was evident that the radii for these three electrodes were significantly larger in the dark than those under light illumination, indicating a larger resistance in the former case that allowed only a few charge transmissions. Upon light irradiation, the electrode radii were noticeably reduced, among which g-C3N4/TNTAs demonstrated the largest decrease (Fig. 8c). This change indicated that the electron–hole pair separation rates and carrier migration rates were greatly enhanced in the heterojunction [49]. The specific fit values of circuit components are listed in Table 1. Under light, the R3 values for all samples were significantly reduced as compared to the resistances under darkness, among which g-C3N4/TNTAs demonstrated the largest decrease from 2.929 × 104 to 2.482 × 103 Ω. The significantly improved charge separation and migration potential may be responsible for the enhanced PEC performance, which is in complete agreement with the results of LSV and EIS.

Fig. 8
figure 8

Nyquist plots of a g-C3N4/TiO2, b TNTAs, and c g-C3N4/TNTAs electrodes in dark and with light irradiation

Table 1 Z-fit equivalent circuit data of g-C3N4/TiO2, TNTAs, and g-C3N4/TNTA electrodes

In order to explore the injection direction of photogenerated electrons, OCP transient tests of the prepared electrodes were carried out. The results of these experiments are shown in Fig. 9. All of the electrodes showed a negative increase in voltage under light irradiation, suggesting that the photogenerated electrons are injected from the semiconductor film into the Ti foil substrate [50, 51], generating the anodic photocurrent in IV and It measurements. It can be inferred that the prepared films act as n-type semiconductor materials, according to the formation mechanism of anodic and cathodic photocurrent in the PEC tests. The difference between the voltages in the dark and under light illumination is the generated voltage. It is worth noting that the g-C3N4/TNTA electrode showed the largest generated photovoltage (0.260 V) among the three electrodes, which also implied its remarkable photoelectric conversion ability.

Fig. 9
figure 9

Transient OCPs of g-C3N4/TNTAs, TNTAs, and g-C3N4/TiO2 photoanodes

To investigate the charge transport behavior, Mott–Schottky (MS) measurements were performed, as shown in Fig. 10a, b, with linear segments representing the depleted states of the majority carriers in the space charge region. Both samples showed positive slopes, which implied that TNTAs and g-C3N4/TNTAs are n-type semiconductors [52]. According to the MS equation [53], the g-C3N4/TNTAs in Fig. 10b showed a much smaller slope than that of pristine TNTAs in Fig. 9a, indicating significantly higher charge carrier densities. The calculated charge carrier densities (Nd) for pristine TNTAs and g-C3N4/TNTAs were 1.06 × 1019 and 4.36 × 1022 cm−3, respectively. Based on these values, it was inferred that the junction supplied more charge carrier density upon addition of g-C3N4. As current density is directly related to charge carrier density in a semiconductor photoanode, the calculated carrier density values strongly indicate that the enhanced PEC properties of the g-C3N4/TNTAs were a result of the increased availability of free charge carriers within the donor states of the system, which is in agreement with the PEC efficiencies (Fig. 7a, c). Overall, these conclusions can be attributed to the presence of g-C3N4 layers that promote the charge carrier separation. Moreover, the flat band potentials (Efb) of the samples were estimated by extrapolating their linear fits to 1/C2 = 0. According to the MS results, the conduction bands (CB) of pristine TNTAs and g-C3N4/TNTAs were estimated at − 0.42 and − 1.13 V versus NHE, respectively. As is well-known, the CB potential of n-type semiconductors lies close to the Efb. Therefore, the CB edges of pristine TNTAs and g-C3N4/TNTAs were at − 0.42 and − 1.13 V versus RHE, respectively.

Fig. 10
figure 10

Mott–Schottky images of a pristine TNTAs and b g-C3N4/TNTAs

On the basis of the aforementioned results, a possible mechanism for the improvement in PEC activity over g-C3N4/TNTAs was proposed (Fig. 11). In this mechanism, a well-matched heterojunction is formed by the combination of g-C3N4 and TNTAs because the valence and conduction bands of g-C3N4 are higher than those of TiO2. Upon light irradiation, the electrons are excited from the valence band (VB) of g-C3N4 to its CB, which are then transferred to the CB of TiO2 nanotubes and leave holes in the VB of g-C3N4 [38, 54]. Finally, electrons are transported to the counter electrode through the external circuit to be consumed by H+ for the generation of H2. The direction of charge migration is in accordance with the results of Mott–Schottky and OCP measurements. In addition, the holes generated in the VB of TiO2 nanotubes are transferred to the VB of g-C3N4, and participate in the oxidation of water molecules. Thus, it has been established that the significant enhancement in photocurrent can be attributed to the construction of the g-C3N4/TNTAs heterojunction, which accelerates the migration of carriers and significantly suppresses the recombination of photogenerated electron–hole carriers.

Fig. 11
figure 11

Schematic diagram of the charge transfer mechanism of the g-C3N4/TNTA heterojunction electrode

5 Conclusions

In summary, an efficient, easy, and universal method was used to prepare the g-C3N4/TNTAs heterojunction with a g-C3N4 shell and TiO2 nanotube array core, by powder coating with the cyanuric acid melamine supramolecular complex. The prepared g-C3N4/TNTAs exhibited an expanded optical absorption range and enhanced PEC activity. Moreover, the creation of a heterojunction of g-C3N4 and TNTAs significantly accelerated the migration of the charge carriers and greatly suppressed the recombination of the photogenerated electron–hole pairs. These results provide a deeper understanding of the role of semiconductor photoanodes during the PEC process of converting water to environmentally friendly hydrogen fuel.