Introduction

Nowadays, the demand of clean energy from renewable energy sources is increasing rapidly to reduce the dependency on conventional fossil fuels. In this regard, photoelectrochemical (PEC) solar water splitting where solar energy is converted into chemical energy as hydrogen and oxygen has attracted significant attention [1, 2]. There are several sequential steps involved in an efficient PEC cell. These are light absorption, formation of photogenerated electron–hole pairs, photogenerated charge separation and transportation to the electrode surface where water oxidation or reduction reaction with holes or electrons takes place [2]. Transition metal oxides are promising materials for solar light harvesting to efficiently split water during the PEC process [2]. It is worthy to note that the transition metal oxides play an important role in PEC cell [2]. Several transition metal oxides such as TiO2, α-Fe2O3, SnO2, WO3, ZnO and BiVO4 are widely used as photoanode materials [1, 3]. Among the various metal oxides, TiO2 as photoanode had been extensively studied due to its high stability in acid/basic medium along with its availability and nontoxicity [4]. However, the inadequate response in visible light and poor photogenerated charge carrier separation of TiO2 limits the PEC performance compared to its predicted (theoretical) values [5]. The PEC performance of TiO2 could be improved by mixing a suitable metal–oxide–semiconductor to make heterojunction that efficiently improves the light absorption as well as photogenerated charge separation and transportation [6]. In the present work, ZnO has been selected to fabricate TiO2–ZnO nanostructured heterojunction because of their well-suited band alignment, excellent optical and electrical property [4, 7].

On the other hand, periodic macroporous structure of metal oxides has diverse applications including adsorption, catalysis, energy conversion and storage [8]. It is possible to optimize the activity of the materials by fine-tuning the morphology in the macroporous network and chemical functionality [9]. In this regard, the hierarchical porous structure in the materials would be highly desirable in energy conversion application [9]. The hierarchical porous structure could be defined as the porous structure consisting of different sizes of pores where large pores combine with small pores [9]. It is to be noted that the hierarchically porous TiO2–ZnO inverse opal heterojunction film has not been well investigated still date, but this type of heterojunction has great impact on the field of energy conversion and storage. In these hierarchical porous structures, the macropores help to improve the carrier conductivity, whereas the small pores (mesopores) provide large surface areas at the interface which is beneficial for the PEC water splitting reaction [9, 10]. Moreover, the light harvesting efficiency could also be improved due to multi-internal reflection or backscattering effect arising from layer-by-layer periodic macroporous structures [11]. It is known that crystalline mesoporous TiO2 film exhibits remarkably high light absorption even in the form of thin layer, but it limits the electron transportation [9, 11]. Therefore, the fabrication of a hierarchical macro with nested mesoporous structure (hierarchically porous) is highly needed to design an efficient photoanode for PEC water splitting application [9].

In the present work, we report for the first time, the fabrication of hierarchically porous TiO2–ZnO heterojunction film onto fluorine-doped tin oxide (FTO)-coated glass substrate by colloidal crystal templating technique using poly (methyl methacrylate) (PMMA) spheres as template. Precursor solutions for titanium and zinc were used to impregnate the templates. Layer-by-layer macroporous TiO2–ZnO film was deposited by template infiltration with titanium precursor solution and removing templates by curing at 450 °C to produce TiO2 inverse opal film. Thermally cured film was further used to deposit templates and subsequently infiltrated with zinc precursor solution to obtain macroporous TiO2–ZnO heterojunction film after curing at 450 °C. Morphology of the synthesized templates and fabricated porous films was characterized by field emission scanning electron and atomic force microscopes. Microstructural analyses of the fabricated films were performed by transmission electron microscopy study. X-ray photoelectron spectroscopic characterization was performed to observe the oxidation states of the constituent elements and also the interaction existing between TiO2 with ZnO at the interface of the sample. Moreover, the optical properties of the fabricated films were analysed systematically. Finally, the fabricated samples were used as photoanodes in a PEC cell to check their PEC performances. It was observed that layer-by-layer hierarchical porous TiO2–ZnO heterojunction film showed a significant improvement in photocurrent density under visible light exposure. Thus, the hierarchical porous TiO2–ZnO heterojunction film could be used as an efficient photoanode in PEC cell.

Experimental

Precursor materials

For the present work, titanium isopropoxide (TIOP, Sigma Aldrich, assay ≥ 97%), zinc acetate dihydrate, (ZA, Sigma-Aldrich, purity ≥ 98%), ethanol (Emsure®, ACS, ISO, Reagent, Ph Eur, Germany), hydrochloric acid (HCl, ACS, Merck, 37%), Pluronic P123 (Merck, average Mn ~ 5800), methyl methacrylate (MMA, Sigma-Aldrich, 99%, Germany) and 2,2′-azobis(2-methylpropionamidine) dihydrochloride (Simson, assay ≥ 98%, India) were used as received without their further purifications.

Preparation of poly(methyl methacrylate) (PMMA) spheres as colloidal crystal template (CCT)

The synthesis of PMMA spheres as CCT was synthesized [12] by chain-growth polymerization via a free radical reaction. In this process, 100 ml H2O and 18.75 ml methyl methacrylate were thoroughly mixed in a round-bottom flask having 4 necks (500 ml) that fitted with a condenser system. Then, N2 gas was bubbled into the mixture, followed by starting of water flow at ambient temperature into the condenser. With the help of a magnetic cum heating stirrer, the solution was stirred at 350 rpm for 2 h. Temperature of the mixture was set at 85 °C. After that the N2 gas flow was turned off, 0.1 g 2,2′-azobis (2-methylpropionamidine) dihydrochloride initiator was added into the solution. At the reaction time of ~ 1 to 1.5 h, a white milky suspension was appeared in the solution. Then, the heating was stopped, and the colloidal suspension was allowed to cool down to room temperature. Finally, to get the PMMA spheres, the colloidal suspension was centrifuged at 6000 rpm for 15 min. The PMMA spheres were again suspended into water. The aqueous suspension was used to deposit layers of PMMA spheres onto FTO glass substrate by dip coating technique with a withdrawal speed of 3 cm/min.

Preparation of precursor solutions for TiO2–ZnO films

Preparation of TiO2 precursor solution

Initially, 2 g titanium (IV) isopropoxide (TIOT) and 1.08 ml concentrated HCl were taken into a glass beaker kept under ice-cooled condition. Then, 6 g ethanol was added slowly into it with stirring the aliquot for ~ 4-h duration. In another beaker, 0.5 g Pluronic P123 and 6 g ethanol were taken with stirring for 30 min. Finally, the Pluronic P123 solution was added into the TIOT solution with a continuous stirring (~ 4 h) until a clear solution was resulted.

Preparation of ZnO precursor solution

ZnO precursor solution was prepared by dissolving zinc acetate dihydrate (ZA, 0.01 mol) in a mixed solvent of water (15 ml) and ethanol (10 ml). The solution was stirred for 2 h to obtain a clear homogeneous solution. For the preparation of mesoporous ZnO solution, Pluronic P123 (0.5 g) and ZA (0.01 mol) were dissolved in a mixed solvent containing ethanol (10 ml) and water (15 ml). The resultant solution was also stirred for 2 h to obtain homogeneous solution.

Deposition of colloidal crystal template (CCT)

For deposition of CCT using PMMA spheres on fluorine-doped tin oxide (FTO)-coated glass, the substrate was first cleaned with a mixed solvent of ethanol and acetone (1:1, v/v) by ultrasonication for 30 min and then washed with water, and finally, the cleaned substrate were dried in air. An aqueous solution of PMMA spheres (solid content, 5 wt%) was used for CCT deposition by dip coating technique with a withdrawal speed ~ 3 cm/min. Multilayers coating up to four layers of CCT deposition was performed with the identical condition. The as-coated samples were cured at 40 °C for 6 h in an air oven. Then, the CCT-coated FTO glass was dipped into the precursor solution of TiO2 with the help of a dip coater, and the withdrawal speed was fixed at ~ 3 cm/min. The as-deposited sample was cured at 450 °C with a slow heating rate of 1 °C/min for 2 h in an electrical tube furnace under air atmosphere to generate TiO2 inverse opal film. For the preparation of TiO2–ZnO heterojunction inverse opal film, cured TiO2 inverse opal film was further dip-coated with the aqueous solution of PMMA spheres (solid content, 5 wt%) by the same process as done for cleaned FTO glass substrate, followed by the deposition of ZnO precursor solution by dip coating technique (withdrawal speed, ~ 3 cm/min). Finally, the sample was heat-treated at 450 °C with a slow heating rate of 1 °C/min to generate TiO2–ZnO inverse opal film. In the case of mesoporous TiO2–ZnO (MTZ) inverse opal film preparation, the precursor solutions for the generation of mesoporous TiO2 and ZnO were used. However, the process parameters were kept identical as performed for TiO2–ZnO inverse opal film.

Characterizations

Materials properties

To know the crystallinity of the fabricated samples, a grazing incidence X-ray diffraction (GIXRD) study was performed by using Rigaku SmartLab, Japan make diffraction unit employing CuKα radiation (1.5406 Å) operating at 9 kW with a slit width of 5 nm in the diffraction angle range (2θ) of 15°–80°. Field emission scanning electron microscope (FESEM and FESEM-EDS, ZEISS, SUPRA™ 35VP) and atomic force microscope (AFM, Nanosurf Easy scan 2, Switzerland) were used to analyse the surface morphology of the samples, whereas transmission electron microscopic (TEM) measurement of the samples was done by FEI Company made (Tecnai G2 30STwin, Netherlands) machine at an accelerating voltage of 300 kV. In this study, carbon-coated 300 mesh Cu grids were used for placement of samples. On the other hand, the X-ray photoelectron spectra (XPS) of the representative mesoporous TiO2 inverse opal (MT) and MTZ inverse opal thin films were measured with the help of PHI Versaprobe II Scanning XPS microprobe surface analysis system using Al–Kα X-rays (hν, 1486.6 eV; ΔE, 0.7 eV at room temperature). The energy scale of the spectrometer was calibrated using pure Ag sample. The position of C1s peak was taken as standard with the binding energy of 284.5 eV. In this work, UV–visible absorption and light harvesting efficiency of the samples were measured with the help of UV–Vis–NIR spectrophotometer (Shimadzu, UV-3600) with an attachment of an integrating sphere (ISR-3100, UV-PC-3100).

Photoelectrochemical property

Photoelectrochemical (PEC) measurement of the samples was taken with the help of Metrohm, Autolab AUt 85930 instrument, using standard three-electrode cell under dark and visible light exposure. For this purpose, a 300 W Xenon lamp with a water filter of 1 M NaNO2 solution was used as the visible light (≥ 400 nm) source [13]. For the construction of PEC cell, a Pt wire and an Ag/AgCl/3 M KCl electrode were taken as the counter electrode and reference electrode, respectively. The fabricated inverse opal films were used as the working electrode. An aqueous solution of 0.1 M KOH was used as an electrolyte. Electrochemical impedance spectra (EIS) were measured under visible light illumination. The chronoamperometric study (photocurrent density vs. time, I–t curve) of the samples was also carried out at 0.26 V versus Ag/AgCl/3 M KCl [1.23 V vs. RHE, reversible hydrogen electrode].

Results and discussion

Phase structure

To reveal the crystallinity/crystal phase of the samples, grazing incidence X-ray diffraction (GIXRD) study (Fig. 1) of the fabricated inverse opal films was performed systematically. In this regard, the study of bare FTO glass substrate was also carried out. It was seen that both the titanium and zinc oxide present in MTZ inverse opal film crystallized at the curing temperature of 450 °C. The prominent XRD peaks centred at (2θ degree) ~ 25.2°, ~ 38.0°, ~ 48.0°, ~ 54°, ~ 62.8° and ~ 75.1° corresponded to the diffraction planes (101), (004), (200), (105), (204) and (215), respectively of tetragonal anatase phase of TiO2 (JCPDS Card No. 21-1272) [14]. On the other hand, X-ray diffraction peaks for hexagonal ZnO in MTZ sample (JCPDS Card No. 36-1451) appeared at (2θ degree) ~ 31.7°, ~ 34.1°, ~ 36.3°, ~ 56.7° and ~ 68.1° corresponded to the crystal diffraction planes (100), (002), (101), (110) and (112), respectively [15]. Moreover, both pristine ZnO and pristine TiO2 crystallized at the curing temperature of 450 °C as hexagonal ZnO and anatase TiO2, respectively. The average crystallite size of the samples was calculated by using Debye–Scherrer's equation (Eq. 1) [15]:

$$ D = \frac{k\lambda }{{\beta \cos \theta }} $$
(1)
Figure 1
figure 1

XRD patterns of fabricated inverse opal films deposited onto the FTO glass substrate

where k = proportionality constant (0.9), λ = wavelength of X-ray (1.5406 Å), β = FWHM (full width at half maximum) of the peak of maximum intensity in radians, θ = diffraction angle, D = crystallite size.

The calculated average crystallite size (D) of pristine ZnO and pristine TiO2 was ~ 18 nm and ~ 9 nm, whereas the same in MTZ sample was ~ 17 nm and ~ 14 nm of ZnO and TiO2, respectively.

Morphology and microstructure

AFM study

Surface morphology of colloidal crystals deposited on FTO-coated glass substrate was performed by atomic force microscopy. A clean FTO substrate was dip-coated using 5 wt% aqueous solution of PMMA spheres, and the as-coated film was cured at 450 °C. The AFM images (Fig. 2a–c) show that the deposition of templates occurred at random manner onto the FTO substrate up to three layers of coating, but the deposited PMMA spheres form a hexagonal closed-packed arrangement onto the FTO substrate after four layers of coating. This was confirmed from the AFM study (Fig. 2d). It was observed from the AFM height profile curve (inset, Fig. 2d,ii) that the size of PMMA spheres was ~ 300 nm. It was interesting to note that the AFM image (Fig. 2d) of four-layer coated sample exhibited a hexagonal closed-packed arrangement that was further confirm by FFT image (inset, Fig. 2d,iii) obtained from the respective AFM image. It is to be noted that the four-layer template coated FTO substrate was used to prepare TiO2–ZnO inverse opal film.

Figure 2
figure 2

AFM images of different layers of PMMA spheres on FTO glass substrate: a Single layer, b two layers, c three layers and d four layers. Insets of d represent (i) higher-magnification AFM image of spheres of four layers, (ii) AFM line scan profile showing about 300 nm size of a sphere and (iii) FFT image obtained from (i) displays hexagonal nature

FESEM study

Surface morphology of the fabricated TiO2–ZnO inverse opal films was analysed with the help of FESEM study. The FTO substrate coated with hexagonally closed-packed PMMA spheres as templates was used to infiltrate titanium solution by dip-coating technique to form the negative replica of the templates. The precursor solution infiltrated sample was cured at 450 °C to remove the organic templates. After curing at 450 °C for 2 h, hexagonal macroporous structure of highly crystalline TiO2 scaffold was obtained (Fig. 3a) and the sample is assigned as TIO. Titanium macroporous scaffold having diameter, 250–300 nm, and intervoid connections, 40–60 nm, were obtained from the FESEM image of the TIO sample (Fig. 3a). Moreover, the hierarchical macroporous TiO2 scaffold was obtained by infiltrating the templates with the precursor solution of titanium-containing Pluronic P123 (details already given in the experimental section). Hierarchical macroporous TiO2 inverse opal film was designated as MT. The presence of mesopores into the macroporous scaffold was clearly seen from the FESEM top view image of MT sample (inset, Fig. 3b). This hierarchical macro with nested mesoporous scaffold of MT sample could improve the light absorption as well as electrolyte diffusion and mass transportation during a PEC process [9]. To further improve the PEC properties, the hierarchical macro with nested mesoporous TiO2–ZnO inverse film (denoted as MTZ) was prepared. It was to be noted that MT sample is used to further deposit macroporous ZnO layer. Figure 3c shows the FESEM image of MTZ sample. The physical thickness of the fabricated films was obtained from the cross-sectional FESEM images (Fig. 3a1–c1). It was observed that the thickness of TIO and MT sample was ~ 1.4 µm, whereas the thickness of MTZ film was ~ 2.5 µm. Highly crystalline hierarchical macro with nested mesoporous MTZ sample could be beneficial for enhancing the PEC activity of the films [9].

Figure 3
figure 3

FESEM top view images of the samples coated on FTO substrate: a TIO, b MT and c MTZ. Insets, ac display FESEM images at higher magnification. (a1–c1) the cross-sectional FESEM images of the corresponding samples

TEM study

TEM study was performed to analyse the microstructure of representative samples. Figure 4a shows the bright-field TEM images of MTZ sample. The presence of macroporous scaffold of TiO2–ZnO in the sample was confirmed from the TEM analysis (Fig. 4). The HRTEM image (Fig. 4b) confirmed that the sample was completely crystallized with anatase TiO2 (a-TiO2) and hexagonal ZnO (h-ZnO) at the film curing temperature of 450 °C [6, 15]. The crystalline nature of the sample was further confirmed from the SAED pattern (Fig. 4c). The average particle size of the sample was calculated from the bright-field TEM image (Fig. 4a). In this regard, the average particle size of ~ 15 nm was obtained from the particle size distribution curve of the sample (inset, Fig. 4c). The calculated average particle size obtained from TEM image well supported the crystallite size of ZnO and TiO2 in MTZ sample that was calculated from XRD patterns (Fig. 1) of the sample using Debye–Scherrer's equation (Eq. 1). Further, the TEM EDX plot (Fig. 4d) showed the existence of both titanium and zinc elements in the sample. On the other hand, the higher-magnification TEM images of the samples (Fig. 5) showed the presence of macroporous scaffold (size, 250–300 nm) in MT (TiO2) and MTZ (TiO2–ZnO) inverse opal films that was generated by using poly (methyl methacrylate, PMMA) spheres as sacrificial template. To further make the scaffold highly mesoporous in nature, Pluronic P123 was used in the precursor solutions. In this respect, the presence of highly mesoporous (size, ~ 8 nm) scaffolds was confirmed from the dark-field TEM images (Fig. 5) of the samples. As result, the hierarchically (macro with nested meso) porous scaffolds matrix formed into the MT and MTZ samples. It is clearly seen from the dark-field TEM images (Fig. 5) that the mesopores are interpenetrated within the whole macroporous scaffolds. This hierarchically porous MTZ sample could be highly beneficial for enhancing the PEC activity of the sample (discussed later) [13].

Figure 4
figure 4

TEM microstructural properties of MTZ sample cured at 450 °C: a Bright-field TEM image, b HRTEM image, c SAED pattern and d TEM EDX plot. Inset of c shows the particle size distribution curve of the sample obtained from (a)

Figure 5
figure 5

Dark-field TEM images of hierarchically (macro with nested meso) porous a pristine TiO2 and b TiO2–ZnO inverse opal films. The macropores and mesopores are marked by the circles highlighted in yellow colour

XPS analysis

The XPS analysis was performed to investigate the interaction between TiO2 and ZnO (that formed heterojunctions) as well as the oxidation states of the constitute elements present in MTZ and MT samples. The presence of Zn2+ ions in MTZ was confirmed from the observation of strong binding energy peaks (Fig. 6a) located at ~ 1044.5 eV and ~ 1021.4 eV, corresponded to the core levels of Zn2p1/2 and Zn2p3/2, respectively [16]. Figure 6b displays the binding energy curve of Ti2p with two strong peaks observed at ~ 458.3 eV and 464.0 eV, corresponding to core levels of Ti2p3/2 and Ti2p1/2, respectively. The energy difference between the peaks was found to be ~ 5.6 eV, which confirmed the existence of Ti4+ in the MTZ sample [17]. Moreover, it was noted that a broad binding energy curve for O1s with an intense peak centred at ~ 530 eV (Fig. 6c) was also observed. The presence of lattice oxygen (Olattice), oxygen defect Odefect (surface oxygen vacancies) and hydroxyl oxygen (Ohydroxyl) of the sample could be the reason for peak broadening of O1s [18]. It was important to note that the relative intensity as observed from the XPS survey spectra (Fig. 6d) of the characteristics binding energy peaks of Ti2p3/2 and Ti2p1/2 core levels for Ti4+ ions decreased significantly in MTZ compared to MT sample. In addition, the binding energy peaks of Ti 2p3/2 (458.3 eV) and Ti 2p1/2 (464.0 eV) (Fig. 6e) shifted (0.3 eV) to lower binding energy region in MTZ sample with respect to pristine MT (TiO2) sample. These observations clearly revealed that a strong interaction existed between TiO2 and ZnO that formed TiO2–ZnO heterojunction in MTZ sample [19]. The presence of oxygen defects in the sample could facilitate to absorb more light towards improving the PEC activity of the sample [16]. Moreover, the formation of heterojunction through the interactions between TiO2 and ZnO in the MTZ sample could be helpful for more light absorption and efficient charge separation towards enhancement in PEC activity (discussed later) [4].

Figure 6
figure 6

XPS curves of pristine TiO2 (MT) and TiO2–ZnO (MTZ) inverse opal films: binding energy curves of Zn2p a and Ti2P b core levels for MTZ. c Binding energy curve of O1s for MTZ sample, d survey spectra of MT and MTZ samples and e binding energy curves of Ti2P core levels of MT and MTZ samples obtained from the marked (encircled in blue colour) portion of survey spectra

UV–Visible absorption spectra

UV–visible absorption spectra (Fig. 7) of the sample cured at 450 °C were systematically measured. The absorption spectra of MT sample showed higher absorption than TIO sample. This observation could be attributed to the presence of large number of mesopores in MT sample compared to TIO sample [16]. The macroporous ZnO overlay onto the MT sample (MTZ) showed the highest absorption in the entire wavelength region. Thus, the macroporous TiO2–ZnO structure could facilitate the light absorption/trapping by increasing the path length of incident light in the sample [9, 11]. Thus, the enhanced light absorption of TiO2 inverse opal film could be possible by macroporous ZnO overlay coating. Consequently, the PEC activity could expect to be improved in the sample (discussed later).

Figure 7
figure 7

UV–Vis absorption spectra of the samples cured at 450 °C

Light harvesting efficiency (LHE)

Improved light absorption via photon trapping is termed as light harvesting which leads to enhance the fraction of accessible/absorb/trap light into a material [20]. Nanostructured materials could able to exhibit excellent light absorption property via light harvesting when the dimensions of nanostructures are comparable with the wavelength of incident light [20, 21]. It is also possible to efficiently sensitize a thin-film sample by enhancing the light absorption via light harvesting [20]. Upon irradiation of incident light, a nanostructured thin film emits scattered light that travels in random directions. Therefore, it is very much required to collect the scattered photons/light to quantify the maximum light absorption by the thin-film matrix. In this work, it was possible to measure all the scattered photons by incorporating an integrating sphere in a Shimadzu make UV–Vis–NIR spectrophotometer (ISR-3100, UV-PC-3100), and accordingly, the wavelength-dependent light harvesting efficiency (LHE) of the sample was calculated from the measured reflection (R) and transmission (T) with the help of Eq. 2 [22], and then, the LHE values of the fabricated samples were analysed (Fig. 8). It was observed that MTZ sample showed highest LHE value in the wavelength region of 315 nm to 390 nm compared to other samples. This result could be ascribed to the overlay coating of macroporous ZnO onto the MT sample where large number of photon trapping occurred inside the sample that could increase the light absorption [23]. This facile strategy could be used to fabricate a stable and efficient photoanode with an improved PEC activity.

$$ {\text{LHE }}(\lambda ) \, \left( \% \right) \, = \, 100\% \, {-} \, R \, (\lambda ) \, \left( \% \right) \, {-} \, T \, (\lambda ) \, \left( \% \right) $$
(2)
Figure 8
figure 8

Light harvesting efficiency curves of the samples cured at 450 °C

Photoelectrochemical (PEC) activity

The PEC activity of the samples was measured with a standard three-electrode PEC cell in 0.1 M KOH solution under visible light irradiation. The linear sweep voltammograms (LSV, Fig. 9a, b) of the samples were measured under continuous and chopped illumination of visible light (wavelengths, ≥ 400 nm) from the range of − 0.4 to 1 V versus Ag/AgCl/3 M KCl reference electrode. It was observed that the MTZ sample showed an enhancement in anodic photocurrent density compared to the other samples. Moreover, the MT sample showed higher photocurrent density (PD) compared to TIO sample (Fig. 9c) due to large number of mesopores present in MT sample. This could provide more active sites for electrolyte diffusion and mass transportation during the PEC process [16]. Moreover, the LSV curve of MTZ sample showed ~ 5 times higher PD than TIO sample. A significant enhancement in PD of MTZ sample could be explained as the formation of TiO2–ZnO heterojunction which helps to reduce the electron–hole recombination by enhancing efficient charge separation [4,5,6]. Moreover, the presence of layer-by-layer periodical macroporous structure improves the light absorption/trapping ability as well as surface area inside the sample. These effects could also enhance the PEC activity of the sample [10, 11, 18]. The chronoamperometric study (Fig. 9c) showed an improvement in PD with photostability of MTZ sample under visible light exposure. It was also observed from the electrochemical impedance spectra (EIS) that the arc radius of EIS Nyquist plots (Fig. 9d) for the MTZ sample was smallest. This observation could attribute to lower interface layer resistance which facilitated an efficient photogenerated charge separation and transportation during the PEC process in MTZ sample compared to the others [19]. Thus, the inverse opal structure interpenetrated with mesopores (hierarchical porous structure consisted of macro with nested mesopores) could also increase the light absorption vis-à-vis improving the PEC activity [9, 18].

Figure 9
figure 9

PEC activity of TiO2–ZnO heterojunction films: (a, b) Linear sweep voltammetry (LSV) curves of the samples measured under continuous and chopped illumination of visible light, c chronoamperometric study (I–t curves) of the samples recorded under visible light exposure, d EIS Nyquist plots of the samples measured under visible light exposure

Conclusion

For the first time, we report the fabrication of hierarchically (macro with nested meso) porous nanocrystalline TiO2–ZnO heterojunction film onto fluorine-doped tin oxide-coated glass substrate adopting colloidal crystal templating technique using poly(methyl methacrylate) (PMMA) spheres as template from the precursor solutions of titanium isopropoxide and zinc acetate dihydrate in the presence of Pluronic P123. Initially, the nanocrystalline TiO2 inverse opal mesoporous film was deposited using the titanium precursor, followed by deposition of nanocrystalline ZnO inverse opal mesoporous film onto the TiO2 to obtain hierarchically porous TiO2–ZnO heterojunction nanocrystalline film. The morphology of the fabricated films showed a periodic arrangement of macropores, and microstructural analysis confirmed the existence of nested mesopores in the macroporous film matrix. X-ray photoelectron spectroscopy evidenced the existence of chemical interaction between TiO2 with ZnO forming the heterojunction film. Light harvesting efficiency of the samples was studied. The photoelectrochemical performance of the heterojunction mesoporous films as photoanode showed about 5 times enhancement in photocurrent density compared to pristine metal–oxide–semiconductor films under visible light exposure. The hierarchically porous heterojunction nanocrystalline film could be used as an efficient photoanode in PEC cell.