1 Introduction

Energy crises and environmental pollution has become a key problem due to continuous increase in world population. World primary energy supply is fossil fuel, use of these leads to the emission of greenhouse gas including carbon dioxide. The over use of fossil fuel has intensified the energy crises and environmental pollution, due to which the need to find an alternative energy source arises [1, 2]. The development of sustainable and renewable energy source is an essential requirement. An ideal way to solve the energy crises is generation of hydrogen utilizing solar energy, since the solar energy is an inexhaustible and clean resource [3,4,5,6]. The conventional fossil fuel is expected to be replaced by solar energy in near future. Among different solar energy harvesting application, water splitting using solar energy is widely studied [7,8,9,10].

To overcome the issues caused by using non-renewable energy sources, production of hydrogen from renewable energy sources opened up a new path to get clean and storable energy. The energy from water and solar light can be harvested by using a photoelectrochemical (PEC) cell. The photoelectrode used in the PEC cells must have some prime requirement, an optimal band gap energy of 2 eV, more negative conduction band potential compare to hydrogen reaction potential, enough negative flat band potential and chemical stability against photo-corrosion in an aqueous environment [11, 12]. As a result, the development of photoelectrode has gained a considerable attention and many semiconductors like ZnO, WO3, V2O5, Fe2O3, etc. have been studied. But their industrial application is limited due to its high cost and poor stability towards photooxidation.

Titanium dioxide is a semiconductor metal oxide that has been studied widely because of its low cost, non-toxic and excellent photochemical and chemical stability. Also, it has good catalytic activity, abundant in nature, able to resist photocorrosion and hence finds application in photocatalytic and photoelectrocatalytic fields. [13, 14]. It has a band gap of 3.0–3.2 eV and can be excited only in UV region which accounts for about only 4% of solar spectrum, it does not respond to visible light [15, 16]. The overall performance is limited by the photo-excited charges trapped within the TiO2 network and the recombination of the electron hole pair. Various methods have been employed to address these issues like elemental doping [17], combining with suitable semiconductors [18] and loading with noble metal as co-catalysts [19]. TiO2 is also integrated with conductive carbonaceous material to improve its photocatalytic and photoelectrochemical activity [20].

Recently, researchers are focusing on the metal-free semiconducting material, graphitic carbon nitride (g-C3N4) due to its structure and physicochemical properties. It has good chemical and thermal stability with bandgap of 2.7 eV. It has a high stability in acidic and alkaline electrolyte due to its strong covalent bond between carbon and nitrogen atoms, which is favorable for PEC application [21,22,23]. However, its photocatalytic activity is reduced due its low quantum efficiency and high electron hole pair recombination. In order to increase the performance of g-C3N4 many strategies have been employed like nonmetal doping [24], preparation of mesoporous C3N4 [25] and formation of heterostructure between C3N4 and other metals [26].

Structures like nanobelts [27], nanosheets [28] and nanoplates [29] which has a 2D structure has been noted as an excellent material for photochemical water splitting due to improved charge separation and higher percentage of surface electron. Cheng et al. [30] reported a mild alkali treatment route for the synthesis of carbon nitride colloid. Yan et al. [31] reported the synthesis of ultrathin g-C3N4 nanosheets by exfoliation in hot water. Niu et al. [32] reported the synthesis of g-C3N4 by thermal etching process, but this is ended up with low efficiency. Yang et al. [33] reported the fabrication of g-C3N4 nanosheets by exfoliation of commercially available g-C3N4 powder in various solvents via sonication. Also, Zhang et al. [34] reported the exfoliation of g-C3N4 in water by using ultrasonication. However, the sonochemical delamination method in organic solvents or water suffers from the long ultrasonic period and low exfoliation efficiency. Qian et al. [35] reported the process of exfoliation of graphitic carbon nitride by using ultrasonication assisted with graphene quantum dots. F. Cheng et al. reported the large-scale synthesis of stable colloid of g-C3N4 nanosheets was via a H2SO4 exfoliation route. This facilitates the fabrication of heterostructure by an electrostatic re-assembly between g-C3N4 nanosheets and various charged guests in different pH systems [36]. These 2D structure have a vast numbers of active edge sites which acts as an efficient catalytic center with high catalytic activity [32]. 2D g-C3N4 sheet can be delaminated from bulk g-C3N4 through thermal oxidation etching under heating at 500 °C in air. The photocatalytic activity of these g-C3N4 nanosheet was notably higher than bulk g-C3N4 because of its feasibility in tuning the band structure and improved charge separation [37].

To gain the advantages of both g-C3N4 and TiO2 properties, in the present work, different weight percentages of g-C3N4 nanoplatelets incorporated with TiO2 have synthesized and was characterized by UV–vis diffuse reflectance spectroscopy (UV–vis DRS), X-ray diffraction (XRD), X-ray photoelectron spectroscopy (XPS) and high resolution transmission electron microscopy (HRTEM). The photoelectrocatalytic materials (TiO2, g-C3N4, and g-C3N4/TiO2) performances were investigated towards water splitting under AM 1.5G (100 mW cm−2) illumination in 1 M KOH. The g-C3N4/TiO2 photoanode with 10 wt.% of g-C3N4 shows higher photoelectrocatalytic water splitting performance, which is two folds higher than that of the bare TiO2.

2 Experimental methods

2.1 Chemicals and reagents

Chemicals such as melamine (C3H6N6) and ammonium sulphate (NH4)2SO4 were purchased from Alfa Aesar, titanium dioxide (P-25-TiO2) was procured from Acros Organics. All reagents were and used as received. Deionized water was used throughout the experiment which is collected from Millipore water system.

2.2 Preparation of graphitic carbon nitride

The g-C3N4 was prepared as follows (Fig. 1a). Initially, melamine and ammonium sulphate were taken in equal weight ratio and mixed thoroughly using an agate mortar and pestle for an hour. Here, ammonium sulphate was added as a chemical blowing agent, which could enhance the formation of g-C3N4 nanosheets [38, 39]. The resultant material was subjected to calcination at 550 °C with the ramp rate of 2 °C per min. After reaching 550 °C, it was kept at the same temperature for 2 h and naturally cooled down to room temperature.

Fig. 1
figure 1

Synthetic scheme for the preparation of a g-C3N4 and b g-C3N4/TiO2 nanocomposites

2.3 Preparation of g-C3N4/TiO2

The g-C3N4/TiO2 nanocomposites were prepared as follows (Fig. 1b). Initially, an appropriate amount of g-C3N4 is dispersed in 1M H2SO4 and sonicated for 30 min. To the above mixture, 1 g of TiO2 (P 25) was added under sonication for 10 min. The prepared solution was allowed to stir at 80 °C for 1 h. The pH of the solution was found to be 1. Then, ammonia was added to the above mixture till the pH reached 7 and it was allowed to stir for 30 min. The addition of H2SO4 into g-C3N4 NS helps in exfoliation of nanosheets, by bearing the positive charges and is further neutralized by adding ammonia [33, 40]. The final product was centrifuged, washed and dried. The 5, 10, 15, 20 and 25% weight percentages of g-C3N4/TiO2 nanocomposites were prepared by the above said procedure and were denoted as 5% g-C3N4/TiO2, 10% g-C3N4/TiO2, 15% g-C3N4/TiO2, 20% g-C3N4/TiO2 and 25% g-C3N4/TiO2 respectively.

2.4 Characterization techniques

The absorption features of all the synthesized samples were measured spectroscopically in diffuse reflectance mode with a UV–visible spectrophotometer (Varian, model: Cary 500 Scan). X-ray diffraction (XRD) patterns were characterized with Bruker AXS D8 Advance with Cu Kα radiation (λ = 1.54178 Å). Fourier transform infrared (FTIR) spectra were recorded by employing potassium bromide (KBr) disks using a Bruker Optik GmbH, Germany (Model: TENSOR 27) spectrometer. The photoluminescence (PL) spectra were characterized at room temperature by using F-7000 FL, Hitachi fluorescence spectrophotometer with an excitation wavelength of 370 nm. Thermogravimetric analysis (TGA) was characterized in TGA/DTA analyzer (SDT Q 600) in nitrogen atmosphere. Surface elemental analysis and oxidation state of sample was performed using X-ray photoelectron spectroscopy (XPS) with Mg Kα (1253.6 eV) as X-ray source (Thermo Scientific, MULTILAB 2000). The morphology was studied by using high resolution transmission electron microscopy (HRTEM) (200 kV, Tecnai G2 TF20).

2.5 Photoelectrochemical measurements

The PEC water splitting experiment were done in 1 M KOH (pH = 13.2) electrolyte. Photocurrent was measured in a standard three-electrode configuration by using Origalys electrochemical workstation, the counter electrode is platinum, reference electrode is mercury–mercury oxide (Hg/HgO) and working electrode is prepared sample coated thin film. The synthesized samples were coated on the conducting side of FTO by doctor blade method. For coating, 10 mg of the synthesized sample is mixed with few drops of acetyl acetone and one drop of triton X 100 in a mortar. The ORIEL LCS-100 (Newport, USA) solar simulator with AM 1.5G (100 mW cm−2) filter was employed as light source. The photocurrent response and electrochemical impedance spectroscopy (EIS) were measured at room temperature. All of the measured potentials were converted with respect to the reversible hydrogen electrode (RHE) using Eq. (1) with measured pH of electrolyte.

$$ {\text{E}}_{\text{RHE}} = {\text{E}}_{{({\text{Hg}}/{\text{HgO}})}} + 0.0591 \times {\text{pH}} + {\text{E}}^{\text{o}}_{{({\text{Hg}}/{\text{HgO}})}} $$
(1)

where ERHE is the converted potential versus RHE, EºHg/HgO = 0.098 V at 25 °C, pH and EHg/HgO is the experimentally measured potential against Hg/HgO Ref. [41].

3 Results and discussion

3.1 Absorption studies

The optical property of TiO2, g-C3N4 and g-C3N4/TiO2 nanocomposites was studied by diffuse reflectance spectra (DRS) (Fig. 2).

Fig. 2
figure 2

Diffuse reflectance spectra obtained for a g-C3N4, TiO2 and 10% g-C3N4/TiO2. b Diffuse reflectance spectra of g-C3N4/TiO2 with different wt.% of g-C3N4. Plots of (αhʋ)1/2 versus hʋ (eV) obtained for c g-C3N4, TiO2 and 10% g-C3N4/TiO2. d Plots of (αhʋ)1/2 versus hʋ (eV) obtained for g-C3N4/TiO2 with different wt.% of g-C3N4. e Plot of band gap versus wt.% g-C3N4 in the g-C3N4/TiO2 nanocomposite materials

In Fig. 2a, the absorption edge of TiO2 was found at 410 nm, which belongs to UV region and unlikely to absorb in visible light. The g-C3N4 had an absorption edge at 460 nm and it has an intensive absorption in visible light region. The presence of g-C3N4 in the nanocomposites influences the TiO2 absorption into visible light absorption. Figure 2b shows the DRS of g-C3N4/TiO2 with different wt.% of g-C3N4. After increasing the wt.% of g-C3N4 in g-C3N4/TiO2 nanocomposite, red shift was observed, the absorption of g-C3N4/TiO2 shifted to longer wavelength region. The additional visible light absorption of the nanocomposite is due to the presence of g-C3N4 and the intensity of absorption increases with raise in g-C3N4 content [42, 43]. The absorption edge of g-C3N4/TiO2 found in between g-C3N4 and TiO2, indicates the existence of electronic interaction between g-C3N4 and TiO2, it is favorable for photogenerated charge carrier transfer [44]. Figure 2c–e shows g-C3N4, TiO2 and 10% g-C3N4/TiO2, Plots of (αhʋ)1/2 versus hʋ (eV) obtained for g-C3N4/TiO2 with different wt.% of g-C3N4, Plot of band gap versus wt.% g-C3N4 in the g-C3N4/TiO2 nanocomposite materials respectively.

The band gap energy of the obtained materials was calculated by using the Tacu’s plot as shown below.

$$ \alpha h{\nu} = {\text{A}}\left( {h{\nu} - {\text{E}}_{\text{g}} } \right)^{2} $$
(2)

where α is the absorption coefficient, h is the Planck’s constant, ν is the light frequency, Eg is the band gap and A is a constant [44,45,46,47,48]. The band gap energies of TiO2 and g-C3N4 was found to be 3.1 eV and 2.75 eV were found from the intercept of the tangent from the plot hυ (eV) versus (αhυ)1/2. The band gap energy values were influenced by the g-C3N4 present in the nanocomposites. The band gap energies of the g-C3N4/TiO2 nanocomposites with 5, 10, 15, 20 and 25 wt.% of g-C3N4 were found to be 2.82, 2.87, 2.77, 2.77 and 2.73 eV respectively. It is clearly observed that, the band gap energies were decreased gradually, as the weight of g-C3N4 increased as the weight of g-C3N4 increased in nanocomposite. This is mainly attributed to the formation of heterostructure between g-C3N4 and TiO2 in the nanocomposite materials.

3.2 X-ray diffraction studies

X-ray diffraction was used to study the crystalline phase structure of the prepared nanocomposite materials. Figure 3a shows the XRD patterns obtained for g-C3N4, TiO2 and 10% g-C3N4/TiO2; Whereas Fig. 3b shows the XRD patterns obtained for g-C3N4/TiO2 with different wt.% of g-C3N4. The samples displayed a good crystallinity. There was no appreciable change was observed, in the XRD patterns of pure TiO2 and g-C3N4/TiO2 nanocomposites. TiO2 shows three major peaks at 25.51°, 48.1° and 37.97° due to the planes (101), (200) and (004). The strongest peak observed at 25.51° lies in the plane (101) due to the predominant presence of anatase phase in TiO2. The g-C3N4 showed two major peaks at 27.43° corresponds to (002) plane and 13.03° corresponds to (100) plane due to stacking of conjugated aromatic system and due to the in-plane structural packing motif of tri-s-triazine units respectively. The (002) plane of g-C3N4 is overlapped with (110) plane of TiO2 in the nanocomposite. Diffraction peaks matches well with the reported data (JCPDS 01-087-1526). Even after the addition of g-C3N4 up to 25 wt.%, the anatase and rutile peaks of TiO2 in g-C3N4/TiO2 nanocomposites is undisturbed (Fig. 3b).

Fig. 3
figure 3

XRD patterns obtained for a g-C3N4, TiO2 and 10% g-C3N4/TiO2, b g-C3N4/TiO2 with different wt.% of g-C3N4

3.3 FT-IR studies

The FT-IR spectra of the synthesized samples were investigated to study the interaction of TiO2 and g-C3N4 in the prepared g-C3N4/TiO2 nanocomposites. Figure 4 shows the FT-IR spectra obtained for (A) g-C3N4, TiO2 and 10% g-C3N4/TiO2 and (B) g-C3N4/TiO2 with different wt.% of g-C3N4. The FT-IR spectrum of TiO2 exhibits a band at 400–700 cm−1, is due to Ti–O–Ti stretching vibration and a weak band at 3400 cm−1 corresponds to –OH stretching vibration [49].

Fig. 4
figure 4

FT-IR spectra obtained for a g-C3N4, TiO2 and 10% g-C3N4/TiO2 and b g-C3N4/TiO2 with different wt.% of g-C3N4

The peaks observed in the region of 1200–1650 cm−1 in the FT-IR spectra of g-C3N4 corresponds to the stretching and rotational vibration of C–N and C–NH bonds. The broad band observed at 2900–3600 cm−1 corresponds to stretching modes of the NH group. A sharp peak at 820 cm−1 is due to the bending vibration of heptazine rings [43]. The FT-IR spectra of the g-C3N4/TiO2 composites with different wt.% of g-C3N4 exhibits all the main characteristic peaks of g-C3N4 and TiO2 indicating the presence of g-C3N4 and TiO2 in the composites.

3.4 Photoluminescence studies

The recombination process of photogenerated electron–hole pairs, was studied by photoluminescence spectra. Figure 5a shows the photoluminescence spectra of g-C3N4, TiO2 and g-C3N4/TiO2 nanocomposite with the excitation wavelength of 370 nm. A lower rate of recombination of photogenerated electron–hole pair gives a low PL intensity [50]. The pure TiO2 had a weak intense PL band at 450 nm, which is due to the recombination of photoinduced electron and hole via oxygen vacancies. A strong PL band at 457 nm for pure g-C3N4 is due to high photoinduced electron recombination. The g-C3N4/TiO2 nanocomposite exhibits a PL spectrum at 450 nm. It can be corresponded to the formation of heterostructures which leads to the photoinduced electron transfer from more negative conduction band of g-C3N4 to the conduction band of TiO2 [42].

Fig. 5
figure 5

a Photoluminescence spectra of g-C3N4, TiO2 and 10%-g-C3N4/TiO2 nanocomposite with the excitation wavelength of 370 nm, b TGA curves obtained for the g-C3N4, TiO2 and 20% g-C3N4/TiO2 under nitrogen atmosphere from room temperature to 800 °C at a heating rate of 10 °C min−1

3.5 XPS analysis

Figure 6a shows the XPS survey scan spectrum of g-C3N4/TiO2 nanocomposite and it confirms the Ti, O, C and N elements presence. Figure 6b of Ti 2p core-level spectrum has two peaks at 458 and 464 eV reveals that the TiO2 is present as Ti(IV) state in the g-C3N4/TiO2 nanocomposite. Figure 6c shows the O 1 s core level spectrum, in which, the peaks at 528 and 530 eV corresponds to binding energies of O atom in TiO2 and atmospheric oxygen [51]. Figure 6d shows core level spectrum of C 1 s, in which, binding energy values centered at around 283, 285 and 286 eV are observed. The peak at 283 eV is typically ascribed to the sp2 C=C bonds, the peak at 285 eV can be assigned to the sp2-hybridized carbon atom bonded to three nitrogen atoms in the g-C3N4 layer and the peak at 286 eV can be attributed to the sp2 carbon atoms in the aromatic ring attached to the –NH2 group [52, 53].

Fig. 6
figure 6

XPS spectra of g-C3N4/TiO2 nanocomposite and its corresponding a survey scan, b Ti 2p, c O 1s, d C 1s and e N 1s core-level spectra

Figure 6e shows core level spectrum of N 1 s, in which, three peaks were absorbed at 395, 397 and 399 eV. The peak at 395 eV is attributed to sp2-hybridized nitrogen (C–N–C), the peak at 397 eV is contributed to sp3-tertiary nitrogen (N–[C]3) and the peak at 399 eV is assigned to the sp3-tertiary nitrogen (N–[C]3) and NHx groups, which are typical to the heptazine units of g-C3N4 [54].

3.6 Thermogravimetric analysis

Thermogravimetric analysis of g-C3N4/TiO2 nanocomposite was performed from room temperature to 800 °C in nitrogen atmosphere to measure the weight loss because of the decomposition of g-C3N4. Figure 5b shows TGA of the g-C3N4, TiO2 and 20% g-C3N4/TiO2 under nitrogen atmosphere from room temperature to 800 °C at a heating rate of 10 °C min−1. TiO2 does not show any weight loss while pure g-C3N4 completely decomposes when the temperature exceeds 740 °C. For nanocomposite, g-C3N4 starts to decompose around 440 °C and could be totally removed when it reaches 630 °C. This is because of the weaker thermal stability of g-C3N4 in g-C3N4/TiO2 nanocomposite than that of pure g-C3N4 [51]. From the Fig. 5b, the calculated wt.% of the g-C3N4 content in the 20% g-C3N4/TiO2 nanocomposite is found to be 18.2.

3.7 Morphological studies

The morphological features were examined using HRTEM images of the samples. Figure 7a–c shows the HRTEM images of 10% g-C3N4/TiO2. From Fig. 7a–c, it is clearly seen the formation of g-C3N4 nanoplatelets incorporated TiO2 nanostructures. Also, the formation of heterostructure in-between g-C3N4 and TiO2 was clearly observed. Figure 7d, e shows the lattice fringes of 10% g-C3N4/TiO2 nanocomposites. The ‘d’ values calculated from the XRD pattern clearly matches with ‘d’ values obtained from the lattice fringes. Figure 7f shows the selected area electron diffraction (SAED) pattern of g-C3N4/TiO2 nanocomposites reveals the polycrystalline nature.

Fig. 7
figure 7

a, b, c and d HRTEM images of 10% g-C3N4/TiO2, d and e Lattice resolved HRTM image of 10% g-C3N4/TiO2 and f SAED pattern of 10% g-C3N4/TiO2

3.8 Photoelectrocatalytic water splitting studies

The role of g-C3N4 on TiO2 towards photoelectrocatalytic water splitting was investigated by recording linear sweep voltammogram (LSV) under simulated illumination of 100 mW cm−2 (AM 1.5 G) in 1 M KOH (pH = 13.2). Figure 8a displays LSV curves of g-C3N4, TiO2 and g-C3N4/TiO2 composite material under illumination, which clearly shows the bare g-C3N4 have negligible photocurrent response attributed to the high recombination of photogenerated charge carriers and the g-C3N4/TiO2 composite shows better PEC activity than bare TiO2. The photocurrent density of photoanode fabricated by g-C3N4/TiO2 composite is 142.7 μA cm−2 (at 1.23 V vs. RHE) which is ~ 1.8-fold higher than bare TiO2 (80.5 μA cm−2 at 1.23 V vs. RHE). The enhancement of PEC activity in g-C3N4/TiO2 composite due to the formation of heterostructure in-between g-C3N4 and TiO2, it reduces the rate of recombination of photo-generated electron–hole pairs [41, 55]. Moreover, the formation of heterostructure effectively increases the absorption of TiO2 to visible light range and boost up the interfacial charge transfer between electrode/electrolyte interfaces, which enhance the PEC perfomance of the g-C3N4/TiO2 composite.

Fig. 8
figure 8

a Linear sweep voltammograms obtained for g-C3N4, TiO2 and g-C3N4/TiO2- composite modified photoanode under light illumination of 100 mW cm−2 (AM 1.5G) at a scan rate of 10 mV/s in 1 M KOH. b Linear sweep voltammograms of g-C3N4/TiO2- under dark, light and chopped illumination condition. c Chronoamperometric J–T curve obtained for g-C3N4/TiO2- at 1.23 V versus RHE in 1 M KOH. d Plot of STH (η) (%) versus applied potential obtained for TiO2 and g-C3N4/TiO2. e EIS Nyquist plots obtained for TiO2 and 10%-g-C3N4/TiO2 under light illumination of 100 mW cm−2 (AM 1.5 G) at an amplitude of 10 mV and frequency range of 100 mHz–100 kHz in 1 M KOH

Figure 8b, c shows the sudden rise and fall in the photocurrent in both LSV and J-T curves, which indicates the quick photo-response of the TiO2 and g-C3N4/TiO2 photoanode under the light and dark condition. The J–T curve shows a constant increase and decrease in the photocurrent under light and dark condition, it clearly indicates the excellent photochemical stability of the electrode fabricated by g-C3N4/TiO2 composite.

The efficiency of the TiO2 and g-C3N4/TiO2 composite photoanodes was further evaluated through solar to hydrogen (STH) efficiency (η) can be calculated following the equation.

$$ \upeta(\% ) = \frac{{J_{p} \times \left( {1.23 - V} \right)}}{{P_{light} }} \times 100 $$
(3)

Here Jp is the photocurrent density (mA cm−2), Plight is the incident light power density (mW cm−2) and V is the voltage applied versus RHE [56, 57]. Figure 8d shows the plot of STH efficiency against applied potential (vs. RHE), which is good acceptance with LSV results. The g-C3N4/TiO2 photoanode achieves a maximum efficiency of ~ 0.072%, which is 2- fold higher than bare TiO2 (0.035%).

Further, the charge transfer property of TiO2 and g-C3N4/TiO2 photoanodes was studied by using electrochemical impedance spectroscopy (EIS) technique. Figure 8e displays the Nyquist plots of TiO2 and g-C3N4/TiO2, from that the g-C3N4/TiO2 photoanode show smallest semicircle radii compare to TiO2, which means the g-C3N4/TiO2 photoanode having smallest electron transfer resistance, highest electrical conductivity, and rapid charge transfer across the electrode/electrolyte interface, which reduces the rate of electron–hole pair recombination and enhance the PEC activity of the g-C3N4/TiO2 composite [41, 58].

The charge migration direction in the heterostructure was explain by band-edge potential level calculation of semiconductors. The determined band-gap values for TiO2 and g-C3N4 were 3.1 and 2.75 eV, respectively. The conduction and valence band positions of the prepared samples were calculated by the Eq. (4) and (5)

$$ E_{VB} = \chi - E^{e} + 0.5E_{g} $$
(4)
$$ E_{CB} = E_{VB} - E_{g} $$
(5)

where χ is Mulliken’s electronegativity, Ee is the energy of free electrons on the hydrogen scale (4.50 eV) and Eg is the band gap [59, 60]. The absolute electronegativity of pure TiO2 and g-C3N4 is 5.81 and 4.64 eV, respectively [61, 62]. The calculated valance band (VB) of g-C3N4 and TiO2 is + 1.515 and + 2.86 eV, respectively. Whereas, the conduction band (CB) of g-C3N4 and TiO2 is − 1.235 and − 0.24 eV, respectively.

The CB of g-C3N4 is more negative than CB of TiO2, its leads to easily transfer of the photogenerated electron from CB of g-C3N4 to CB of TiO2 via heterostructure in-between TiO2 and g-C3N4 interface. On the other hand, the photogenerated holes are transferred from the VB of TiO2 (+ 2.86 eV) to the VB of g-C3N4 (+ 1.515). That leads to formation of Type-II heterostructure between TiO2 and g-C3N4 interface [48, 63, 64]. Moreover, the VB of the g-C3N4 and TiO2 was calculated from XPS valence band analysis, Fig. 9 shows the XPS valence band spectra of g-C3N4 and TiO2, from that the VB of g-C3N4 and TiO2 are + 1.45 and + 2.72 eV, respectively. Therefore, the CB of TiO2 and g-C3N4 are -0.38 and − 1.30 eV, respectively. It is almost similar to values calculated from equation. Based on the calculation, XPS valence band analysis and previous reports, the CB edge potential of g-C3N4 (− 1.30 eV) is much more negative, while compared to the CB of TiO2 (− 0.38 eV), which leads to easy transfer of photogenerated electron from the CB of g-C3N4 to the CB of TiO2. Similarly, the photogenerated holes are transferred from the VB of TiO2 (+ 2.72 eV) to the VB of g-C3N4 (+ 1.45 eV) [21, 43, 50, 58]. From the result, the incorporation of g-C3N4 to TiO2 leads to formation Type-II heterostructure (Fig. 10), which reduced the rate of recombination of photo-generated electron–hole pairs, effectively extends the absorption of TiO2 to visible light range and enhance the interfacial charge transfer between electrode/electrolyte interfaces.

Fig. 9
figure 9

XPS Valence band spectra of a g-C3N4 and b TiO2

Fig. 10
figure 10

Schematic of overall photoelectrocatalytic water splitting mechanism in the g-C3N4@TiO2 photoanode based on Type-II heterostructure

4 Conclusion

In overview, the g-C3N4/TiO2 nanoplatelets materials with different weight percentage of g-C3N4 were prepared. The prepared nanocomposite showed an excellent optical absorption and improved PEC performance. The g-C3N4/TiO2 nanohybrid showed enhanced PEC performance than bare TiO2 and g-C3N4-, due to fast interfacial charge transfer and slow recombination rate of electron hole pairs. The g-C3N4/TiO2 photoanode yields a maximum efficiency of ~ 0.072%, which is twofold higher than bare TiO2 (0.035%), due to the formation of Type-II heterostructure in-between g-C3N4 nanoplatelets and TiO2, that leads to the reduction of the recombination rate of photo-generated electron–hole pairs and also increases the absorption of TiO2 to visible light range and boost up the interfacial charge transfer between electrode/electrolyte interface, which enhance the PEC performance of the g-C3N4/TiO2 composite. The results indicate that the g-C3N4/TiO2 nanocomposite material could be a potential candidate for photoelectrocatalytic hydrogen production via water splitting.