1 Introduction

Since a long time titanium dioxide or titania (TiO2) has attracted considerable attention [1] due to its strong photocatalytic activity, robust chemical stability under acidic and oxidative environments, high electrical and optical properties, non-toxicity and low production cost. It has been used in numerous industrial applications such as, photocatalysis [2], optoelectronics, dye-sensitized solar cells [3], biomedical devices [4], gas sensor [5] and water purification [6]. Among the three most abundant crystallographic forms of TiO2 (anatase, rutile and brookite), the anatase form is mainly used in photocatalysis and solar energy conversion owing to its higher charge-carrier mobility and an increased density of surface hydroxyls [7, 8]. To improve these properties, the morphologies and macroscopic structures of TiO2 have been intensively studied by many scientists [9, 10]. For example, a three-dimensional porous structure of TiO2 with a large surface area is known to exhibit an enhanced photocatalytic performance [11]. The sub-micron-scale hollow spheres of TiO2 are promising because of their potential to provide a large surface/volume ratio. Moreover, the synthesis of porous structures has attracted increasing interest of researchers [12] as their potential applications in the field of catalysis, ion exchange, and adsorption [13]. Various strategies are used to develop the synthesis of porous structure. The most notable strategy is templating methods using ordered arrays of colloidal crystals [14]. In fact, templating method seems efficient, economical, manageable and suitable for large-scale production. After to the first successful preparation of ordered mesoporous silica [15], a significant progress has been made in the synthesis of ordered microporous (pore size below 2 nm), mesoporous (2–50 nm) and macroporous (beyond 50 nm) materials [1618]. The ordered mesoporous materials are the result of using surfactants or amphiphilic block co-polymers as structure-directing agents [19]. In addition, latex spheres can be used as templates to form ordered macroporous materials [20]. To date, many researchers have developed different synthetic routes to prepare porous nanocrystalline anatase TiO2 using a wet chemical process like hydrothermal, reverse micelle, anodization technique and sol–gel method. Among them, sol–gel method [21] seems to be the most appealing as it offers the advantage of macroporous thin film preparation at a comparatively low-cost. The combination of template and sol–gel methods has the following two advantages: (1) the simple preparation, size-tailoring and (2) the homogeneity of sol–gel products with high isotropy of physical, morphological and chemical properties. This process allows the production of ordered porous TiO2 thin films in a single-step.

In the present work, ordered TiO2 porous thin films were prepared by sol–gel spin coating technique, using nanosized polystyrene (PS) latex spheres of 100 nm diameters as templates which were removed later by calcination. The electrochemical behavior taking place at the porous TiO2/PS electrode/Na2SO4 electrolyte solution interface was investigated by means of electrochemical impedance spectroscopy (EIS) technique. Also, the photoelectrochemical performance of porous TiO2/PS was compared to pure TiO2 electrode by measuring the current voltage (j–V) spectral response of the photoelectrochemical (PEC) cell. The results are also correlated with those obtained from structural, morphological and optical studies.

2 Experimental details

2.1 Chemical deposition of pure TiO2 thin films

In-doped tin oxide (ITO) was used as the transparent conducting substrates. Before deposition the substrates were ultrasonically cleaned in acetone, ethanol, rinsed with deionized water and dried in oven for 15 min at 60 °C. TiO2 thin films were prepared by adopting a sol–gel method. Titanium isopropoxide Ti(OCH(CH3)2)4 from Aldrich 97 %, was used as a TiO2 source. The sol was a mixture, in a molar ratio, of titanium isopropoxide, as a precursor, isopropanol CH3CH(OH)–CH3 and methanol CH3OH, as solvents and acetic acid CH3COOH as a catalyst. First, Ti(OCH(CH3)2)4 was dissolved in isopropanol, the solution was homogenized for 30 min under magnetic stirring while heating up to 60 °C. Then acetic acid was added, while letting agitation during 30 min under the same heating. Finally, heating was stopped and methanol was added. The mixture was kept under magnetic steering for 2 h. The obtained mixture was deposited onto ITO glass substrate by using spin coating technique. The speed was set at 3000 rpm and the deposition time to 30 s. The TiO2 solution was dropped one time onto the substrates and then dried in the oven at 100 °C for 10 min. The drop and dry process were repeated three times onto the same substrates. Furthermore, the films were annealed under oxygen at 550 °C for 2 h.

2.2 Preparation of porous TiO2 thin films

The latex solution of the polystyrene template with diameter of 100 nm was prepared at concentration of 0.3 % by diluting the polystyrene latex solution with deionized water, and then dispersing the polystyrene particles ultrasonically in the solution. Then the PS latex template was assembled onto clean ITO glass substrates by dip-drawing method [22]. The clean and dried substrates were settled vertically into the emulsion of PS for several days (3 days). After the suspension was completely dried, the PS colloidal crystal template was formed on the two sides of the substrate, and was then thermostat at 90 °C for 2 h to enhance the bonding among PS microspheres. The PS templates appeared opalescent, as expected, prismatic colors like rainbow, depending on the angle of observation, and clearly visible when the samples were illuminated from above with white light. In the next step sol-spinning template method was used to fill TiO2 sol onto the PS templates. The PS array templates onto ITO coated glass substrates were placed into spin coater technique. Then the TiO2 thin films were deposited using same conditions as mentioned in Sect. 2.1. Porous TiO2/PS films were annealed at 550 °C for 2 h in furnace four and used for characterizations.

2.3 Characterization of pure TiO2 and porous TiO2/PS thin films

Characterization of all samples was carried out with different techniques. The structure of the samples was analyzed using powder X-ray diffraction (XRD, Bruker D8 advance) with Cu Kα radiation (λ = 1.541 Å) in 2θ ranging from 20° to 50°. The morphologies and roughness of the prepared samples were examined by atomic force microscope AFM (a Nanoscope 3100 Digital instrument in the tapping mode). The size, film thickness and roughness were found with WSxM software ver.5.0 [23]. Optical measurements were deduced from (transmission/reflection) spectra taken from ultraviolet–visible–near-infrared (UV–VIS–NIR) Perkin Elmer Lambda 950 spectrophotometer in the wavelength range of 200–1200 nm at room temperature.

Electrochemical impedance spectroscopy (EIS) measurements, Mott–Schottky plots and photoelectrochemical cell (PEC) study were performed using a computer-controlled potentiostat (PGSTAT 30) in a conventional three electrode arrangement with the deposited pure TiO2 or porous TiO2/PS thin films as a working electrode, platinum as a counter electrode, and (Ag/AgCl) electrode as a reference electrode. A 0.5 M Na2SO4 aqueous solution was used as an electrolyte. EIS measurements were carried out at the open-circuit potential. A sinusoidal AC perturbation of 10 mV was applied to the electrodes over the frequency range of 0.01–105 Hz. Mott–Schottky plots were carried out in the range of −1.2 to 0.2 V versus Ag/AgCl under frequency of 10 kHz. Photocurrent–voltage (I–V) characteristics were carried out in a quartz electrolytic cell. The illuminated area of the cell was about 1 cm2. A 300 W Xe short arc lamp (Perkin Elmer Model PE300BF) with white light intensity of 200 mW/cm2 was employed to simulate solar light. The intensity of incident light from the Xe lamp was measured using a Photometer Model 70310 from Spectra-Physics.

Photocatalytic activity of both pure TiO2 and porous TiO2/PS thin films prepared by spin coating technique was evaluated by the photodegradation of methylene blue (MB, C16H18N3S) under ultraviolet light irradiation. A lamp (Northern Electronic Wigan Lancs) was applied as UV light source in the photocatalysis. Typically, 25 mL of methylene blue solution (3 mg/L) was placed in a vessel and a photocatalyst film with the area of 2 × 2 cm2 was immersed in the solution. Prior to irradiation, the solution was magnetically stirred in the dark for 30 min to achieve adsorption/desorption equilibrium of MB. Once light illumination began, samples were tested at 2 h, and the UV–Vis adsorption spectrum of MB solution was collected by a UV–Vis spectrophotometer (Shimadzu UV 1601-PC) in the wave-length range of 400–800 nm [24, 25].

3 Results and discussion

3.1 Structural studies

Figure 1 provides a comparison of typical XRD patterns of pure TiO2 and porous TiO2/PS thin films deposited onto ITO coated glass substrate. In the range of 20°–35°, a broad hump appears, this probably due to an amorphous glass contribution [25, 26]. All peaks were identified to ITO substrate (dot line in the curve) with card number (JCPDS # 01-089-4598) and TiO2 [indicated in the Fig. 1 by a star (*)]. The presence of anatase TiO2 structure in the two samples was confirmed by the apparition of two main peaks at about 25.40° and 48.7° corresponding to the reflection planes of (101) and (200), respectively, (JCPDS#01-084-1286). This result is in good agreement with those published earlier by our group [24, 25]. After modification of TiO2 by polystyrene latex beads, the XRD pattern of porous TiO2/PS is very similar to the pure TiO2 (Fig. 1b). The main two peaks characteristics of TiO2 structure are still present in the XRD pattern of porous TiO2/PS. This indicates two important elements: (1) the stability of the anatase structure and (2) the complete disappearance of the polystyrene latex beads during the synthesis process. So we can confirm that the presence of polystyrene latex beads did not change the phase or the structure of TiO2/PS thin films. This behavior is coherent with those previously observed by many researchers [27].

Fig. 1
figure 1

XRD patterns of a pure TiO2 and b porous TiO2/PS thin films

From Fig. 1, insert, we can note clearly, a small shift in the (101) preferential orientation to higher angles with the presence of the template structure, indicating the high crystalline quality of thin films. To elucidate this behavior, the crystallite size (D) of TiO2 thin film through (101) orientation was determined by Debye–Scherer′s formula in Eq. (1) [28]:

$${\text{D}} = \frac{K\lambda }{\beta Cos\theta }$$
(1)

where, D represents the mean size of the crystallite, K = 0.89, \(\beta\) is the observed angular width at half maximum intensity (FWHM) of the (101) peak, λ is the X-ray wavelength of CuKα radiation (1.54 Å) and θ is the Bragg angle. The calculated values of the crystallite size have been summarized in Table 1. As shown in this table, the average crystallite size of porous TiO2/PS increased from 18.03 ± 0.1 to 22.37 ± 0.08 nm. The increase of this parameter with the template could be caused by the change in the morphology of thin film and the increase of the surface roughness. In fact, Oja et al. [29] have demonstrated that the crystallite size and surface roughness depend on the annealing temperature. This has been confirmed by atomic force microscopy (AFM) images and will be discussed later in the next part.

Table 1 Some physical properties of TiO2 and porous TiO2/PS thin films deposited by spin-coating method on ITO-coated glass substrates

3.2 Morphological study

The effect of polystyrene latex beads on the morphology of TiO2 thin film was analyzed using AFM as shown in (Fig. 2). This figure presents 3D and 2D AFM images in an area of 2 μm × 2 μm of pure and porous TiO2/PS thin films deposited by spin-coating method. From this figure, we can observe clearly dense and homogeneous disturbed surfaces with spherical and smaller grains of the two samples. The spherical grains were also reported for pure TiO2 thin films obtained by sol–gel technique [30] and spin coating deposition method [31]. Besides, from the AFM measurements, we obtained the root mean square (RMS) roughness and film thickness value [32]. RMS is defined as the standard deviation of the surface height profile from the average height. Table 1 summarizes the value of roughness, grain size and film thickness of the two samples. Compared to pure TiO2 films, porous TiO2 with polystyrene latex beads have increased the surface roughness. In fact, the value of root mean square (RMS) increases from 0.91 to 1.39. In addition for the porous TiO2/PS, an important grain distribution was observed. The average grain size increases from 27.34 ± 1.3 to 38.01 ± 0.9 nm with the presence of template structure, and shows the same tendency as that observed by XRD analysis. Furthermore, the value of the average grain size of pure TiO2 is close to that found by Mechiakh et al. [33] who have studied the influence of the annealing temperature on grain size. The authors have demonstrated that, the average grain size value of TiO2 thin film is about 27.27 nm with an annealing temperature of 600 °C.

Fig. 2
figure 2

AFM images of a Pure TiO2 and b porous TiO2/PS thin films deposited by spin-coating method onto ITO glass substrates

On the other hand, an approximate value of film thickness was determined from AFM images were carried out by many researchers [3436]. It is well known that AFM is one of effective ways for the surface analysis due to its high resolution and powerful analysis software. In our study, the estimated thickness of pure TiO2 and porous TiO2/PS thin films were about 30.64 ± 2 and 40.7 ± 1.5 nm, respectively. This behavior can be explained by the enhancement of the specific surface due to the templating technique used in the preparation of TiO2/PS porous films. These observations were in agreement with the XRD result which demonstrates that the presence of template causing the increase of the grain size. In fact, Filho et al. [27] have studied the morphology and topography analysis of mesoporous TiO2 templated by micrometric latex sphere arrays. They have demonstrated that the TiO2 topography strongly depends on the adsorption of polymeric segments over latex spheres surface. They also observed that the TiO2 topography could be decreased by changing the dimensions of latex spheres generating a lamellar architecture.

3.3 Optical properties

The optical properties of pure TiO2 and porous TiO2/PS thin films were determined from transmittance measurements in the range of 200–1200 nm using an UV–Vis–NIR spectrophotometer in order to determine the band gap value of the material. The absorption coefficient (α) of the deposited films is calculated from the observed absorbance and transmittance values using the following Eq. (2) [37]:

$$\alpha = \frac{1}{d}\ln \left( {\frac{A}{T}} \right)$$
(2)

where α is the absorption coefficient in cm−1, d is the film thickness, T is transmittance and A is the absorbance. The nature of transition is determined using the following Eq. (3) [38]:

$$\alpha h\nu = A\left( {h\nu - E_{g} } \right)^{n}$$
(3)

where A is an energy dependent constant, Eg is the band gap of the material, and hν is photon energy. The band gap values were determined from the intercept of the straight-line portion of the (αhν)2 against the hν graph on the hν-axis at α = 0. Figure 3a, b shows the transmittance and absorption spectra respectively as a function of the wavelength for the pure TiO2 and porous TiO2/PS thins film deposited onto ITO glass substrate by sol–gel method. The black curve corresponds to the transparent conducting substrates (Glass/ITO). It can be seen from this figure that the transmittance spectrum of pure TiO2 thin films (Fig. 3a, red curve) shows a low transmittance (strong absorption) in ultraviolet region with spectral wavelength between 300 and 400 nm exhibiting typical transmission of pure TiO2 [39, 40]. Figure 3b shows that porous TiO2/PS thin films exhibit a small red-shift compared to the pure TiO2. It also achieves the best efficiency of ultraviolet light absorption which indicated that the template structure influences the optical property of ordered TiO2 porous material. This result is also in agreement with those obtained by Doong et al. [22] who have studied the effect of the polystyrene microspheres diameters in the optical properties of TiO2 thin films. From Fig. 3, we can also note that the two samples presented a high transparency in the visible region, which is a consequence of the wide band gap of the film (3.2 eV) [30].

Fig. 3
figure 3

UV–visible (a) transmittance spectra and (b) Absorbance of (a) pure TiO2 and (b) porous TiO2/PS thin films.The black curve corresponding to the transparent conducting substrates (glass/ITO)

From Fig. 3a, we note a small decrease of transparency of porous TiO2/PS (50 %) (Fig. 3b) which might be due to an increase in the interface scattering. This phenomenon was also observed by Liu et al. [41]. This is in agreement with the AFM results which demonstrate that the template structure has a great influence on the grain size, film thickness and surface roughness of thin films. On the other hand, we can clearly observe that only pure TiO2 (Fig. 3a) presents some interference fringes related to the multiple reflections of thin film. This indicates that the film surface of pure TiO2 is smooth and uniform. For the sample with the template structure (Fig. 3b), the surface becomes roughness and scattered, such effect, involve the disappearing of the interference phenomena. These findings are in good agreement with the morphological study in which we have demonstrated that the RMS increases for the porous TiO2/PS thin films.

Figure 4 shows the (αhν)2 vs hν plot of pure TiO2 and porous TiO2/PS structure thin films. The band gap value was varied from 3.4 to 3.3 eV, respectively (Table 1). A slight decrease of the band gap can be due to the presence of defect level derived from the surface state of porous structure [37]. This phenomenon is also described by Brus [42, 43] and Rino [44], they noted that the density of point/surface defects of semiconductor crystalline increases with the decrease in particle size. Due to mild delocalization of molecular orbitals on the surface, defects in the bulk semiconductor create deep and shallow traps near the band edge of its electronic state, which brings about reduction in band gap, causing a red-shift in absorption spectrum.

Fig. 4
figure 4

Plots of (αhν)1/2 versus energie of a pure TiO2and b porous TiO2/PS thin films

3.4 Electrical studies

Figure 5 illustrates the impedance spectrum (Nyquist plot) in neutral 0.5 M Na2SO4 solution for pure TiO2 and porous TiO2/PS thin films at an AC frequency varying from 100 kHz to 0.01 Hz. As it can be seen, the Nyquist diagram shows only one semicircle in the high and low frequencies. The single-frequency arc corresponds to charge transfer limiting process and can be attributed to double-layer capacitance in parallel with the charge transfer resistance at the contact interface between electrode and electrolyte solution [45, 46].We can note also from this figure that the diameter of the semicircle decreases with the presence of polystyrene latex beads. This behavior may be ascribed to a higher carrier mobility reducing resistance of the transfer of charge of the sample. This suggests a nearly capacitive behavior of these electrodes.

Fig. 5
figure 5

Electrochemical impedance spectroscopy (EIS) results: a nyquist plot and b equivalent circuit obtained at open circuit voltage of pure TiO2 and porous TiO2/PS thin films, in aqueous 0.5 M Na2SO4 solution (pH value of electrolyte = 7)

The impedance spectrum was fitted with computer simulated spectrum using an electric circuit (Randles equivalent circuit Fig. 5b). This equivalent circuit includes the ohmic resistance of the electrolyte solution, Rs, the capacitance of double layer, C, and the charge transfer resistance RcT. The fitting values for pure TiO2 and TiO2 modified by PS are reported in Table 1. As it can be noticed from these data, an approximately constant value of the electrolyte resistance Rs is on the order of 243 Ω. Moreover, both values of charge transfer resistance RCT and capacitance of double layer are altered by adding polystyrene latex beads. In fact, when the TiO2 thin film was modified with PS, RCT decreased from the value of 2.42–1.97 MΩ, and inversely, C increased from 6.04 to 23.7 μF. As mentioned earlier, these changes in both values of RCT and C can be explained through easy charge transfer in the sample modified with PS latex beads. This result is in complete compliance with the findings with those obtained by AFM analysis which confirms the increasing of specific surface of TiO2/PS thin film.

Mott–Schottky (M–S) was used to ascertain the doping type, both the apparent donor density ND and the flat band potential EFB obtained from the intercept on the potential axis (1/C 2SC  = 0). These values are important in determining the efficiency of a semiconductor as an electrode in photoelectrochemical cells. The capacitance is expressed by Eq. (4) [47, 48]:

$$\frac{1}{{C_{SC}^{2} }} = \frac{2}{{\varepsilon \varepsilon 0S^{2} N}}\left( { \pm (V - V_{fb} ) - \frac{kT}{e}} \right)$$
(4)

where, ε, ε0, e, k and T have their usual meaning dielectric constant of the TiO2TiO2 = 85) [49], permittivity of a vacuum, elementary electric charge, Boltzmann constant and absolute temperature, respectively, whereas S denotes the surface area of the electrode (S = 1 cm2), N stands for the density of donor (ND) or acceptor (NA) in the semiconductor, V is the externally applied potential with respect to the reference electrode and Vfb is the flat band potential, i.e. the potential corresponding to the situation in which there is no accumulation of charge in the semiconductor and the energy bands show no bending. The shape of the Mott–Schottky plot is an indicator of the conductivity type of the semiconductor, where, negative sign is for p-type and positive for n-type semiconductor [30]. Figure 6 shows the change of C−2 values versus applied potential of the TiO2 and TiO2/PS thin films in 0.5 M Na2SO4 at a frequency of 10 kHz. From this figure, it can be observed clearly that the two films show a positive slope in the (M-S) plots, confirming that these films are n-type. Also, we easily observe that the flat-band potential (Vfb) shifts significantly from −0.3 to −0.6 V versus Ag/AgCl for pure and PS modified TiO2 films, respectively. According to AFM result (Sect. 3.2), this perhaps can be linked to the change in morphology in presence of PS latex beads. It is also noticed that, using the slope of the curve (Slope = 2/εε0S2eND), the donor density (ND) has increased from 1.651011 to 1.361013 cm−3. This is due to the fact that, modified with PS, may result in increase of an effect of the board which are promotes charge capture, and consequently results in a higher donor density (ND). It is noticeable that the observed higher donor density (ND) for porous TiO2/PS film is correlated with the observed smaller resistance and higher capacitance (as evident in Table 1).

Fig. 6
figure 6

Mott–Schottky (M–S) plots (1/C2 vs. V) of a TiO2 and b TiO2/PS thin films into ITO substrate in 0.5 M Na2SO4

3.5 Photocatalytic test

The photocatalytic degradation of MB by pure TiO2 and porous TiO2/PS thin films was performed under UV irradiation. Figure 7 shows the UV–Vis absorption spectra degradation of (MB) in absence of photocatalytic material, with pure TiO2 and porous TiO2/PS film. For all samples, the most observed peak is obtained at 660 nm (λmax for MB) which is attributed to its monomer [24, 25]. It can be clearly seen from Fig. 7 the significant decrease in the absorbance for both photocatalysts. However, the obtained TiO2/PS film presents higher intrinsic activity for the photodegradation of methylene blue than pure TiO2 films. The superior photocatalytic activity of the TiO2/PS film can also be explained by the ordered porous structure, high crystallinity of anatase phase and enhancement of the specific surface [50]. In fact, the ordered porous structure with high specific surface area can offer more active adsorption sites and photocatalytic reaction centers, since the active sites are usually located in the pores and a high specific surface area which has a high adsorptive capacity [41].

Fig. 7
figure 7

Absorption spectrum of MB solution obtained after 2 h in the contact of a without any sample, b with pure TiO2 and c porous TiO2/PS template structure

3.6 Photoelectrochemical properties of TiO2/PS

To investigate influence of the PS template on photoelectrochemical performance, linear sweep voltammograms of pure TiO2 and porous TiO2/PS thin films were performed in the dark and under simulated solar light. Through the measurement of I–V curves (Fig. 8), TiO2 and porous TiO2/PS electrodes led to negligible current under dark conditions. Under illumination, the current densities of the TiO2 and porous TiO2/PS electrodes were evident which increase with the bias potential. The TiO2 electrode exhibited a photocurrent of 0.02 mA/cm2 at 0.5 V versus Ag/AgCl. In the presence of porous TiO2 by polystyrene latex beads (curve 8b), the current density shows an important increasing up to 0.10 mA/cm2 at 0.5 V versus Ag/AgCl. The increment in the current value can be explained through the high absorption and the perfect separation efficiency of photogenerated charge carriers of TiO2/PS. This suggests that PS porous TiO2 could effectively improve the UV-light response and the separation of electron–hole pairs compared with pure TiO2 under the same bias potential. The increasing of the photoelectrochemical properties could be attributed to the increasing of specific surface of porous TiO2/PS which is confirmed by AFM analysis.

Fig. 8
figure 8

Photocurrent density-applied voltage plots between ranges of −1 to 0.8 V versus Ag/AgCl for samples a pure TiO2 and b porous TiO2/PS under illumination in 0.5 M Na2SO4 aqueous solution. The curve insert is obtained for the both samples in the dark condition

Both photoanodes (TiO2 and porous TiO2/PS) were illuminated intermittently at a given potential (+0.5 V vs. Ag/AgCl) for several cycles, to appreciate the reproducibility of their photoresponses as well as the stability of the device toward oxidation. The corresponding current density response to on–off cycling with total test duration of 300 s is presented in Fig. 9. From this figure, one can observe that both photoanodes led to an instantaneous change in current upon illumination. The current retracted to the original values almost instantaneously once the illumination is switched off. These results indicated the stability of both thin films. Besides, we can note from Fig. 8b that the photocurrent density produced by porous TiO2/PS thin film electrode reached 0.08 mA/cm2. This is about four times higher than that measured for TiO2 thin film. These results prove that the porous TiO2/PS porous films have a better photo-electrochemical performance than the pure TiO2thin films under illumination. In this case, the modification of TiO2 by PS beads could transfer electrons from valence band for their proper conduction of band potentials. This result is also in consistent with the results obtained in the photocatalytic activity.

Fig. 9
figure 9

Current density of a pure TiO2 and b porous TiO2/PS as a function of time with the external bias kept at 0.5 V versus Ag/AgCl electrode in 0.5 M Na2SO4 aqueous solution

4 Conclusion

In this work, a porous TiO2/PS thin film was successfully synthesized by sol gel spin-coating technique using PS templates method. X-ray diffraction shows that the obtained thin films crystallize into tetragonal anatase phase. The analysis by AFM has indicated that the morphology of thin films is continuous and uniform. Indeed, the grain size, surface roughness and film thickness could be well controlled by the presence of polystyrene latex beads in the bath solution. Based on the optical measurement, it was found that the presence of PS beads in the bath solution have some influence on the band gap of the films. The band gap was decreased from 3.4 to 3.3 eV with the porous TiO2/PS thin films. This decrease may be due to the presence of defect level derived from the surface state of porous structure. The capacitive nature of porous TiO2/Na2SO4 interface was evaluated by electrochemical impedance spectroscopy. From Mott-Schottky plot, it was concluded that both samples show an n-type conduction with a flat potential and a density of majority carrier varied from −0.3 to −0.6 V and from 1.65 × 1011 to 1.36 × 1013 cm−3, respectively, as the template structure.

In comparison with pure TiO2, the porous TiO2/PS thin films (prepared with templating method) exhibited better photocatalytic activity in the photodegradation of (MB), and also photoelectrochemical performance. This enhancement can be correlated with the high specific surface area means a high adsorptive capacity.

Future work may focus on the construction of a heterojunction between porous TiO2/PS and other semiconductors with a suitable band gap. This will be an effective method to extend the light absorption spectrum and accelerate photogenerated electron–hole separation by enhancing the solar-to-hydrogen conversion efficiency.