1 Introduction

The transmittance upon illumination of sunlight can be modulated by the photoelectrochromic devices (PECD) or smart windows is a promising tool to reduce the heating, ventilation, air conditioning (HVAC) and lighting costs of a building (Sarwar et al. 2021). Smart windows have the ability to control excessive light illumination that enters a building interior via the windows and have received increasing attention owing to their eco-friendly and energy-saving properties (Chun et al. 2021). A photoelectrochromic device (PECD) combines a photovoltaic (PV) with electrochromic functions, this device is self-powered, changing color when exposed to light (Costa et al. 2016; Sarwar et al. 2020). Titanium dioxide is a transition metal oxide n-type semiconductor materials that has superior properties such as non-toxic, high stability and strong oxidizing agent has very high photocatalytic activity (Park et al. 2016). The single disadvantage is that it does not absorb visible light, there are several methods to overcome this problem. One of them is the doping with non-metalic elements such as Nitrogen (Carp et al. 2004; Aziz and Kadhim 2022). Titanium dioxide based materials are extensively studied in photocatalyst (Osterloh 2008). Recently, it was found that the electrochromic materials acquired a dark color by coupling photosensitive TiO2 upon irradiation as a result of electron transfer from TiO2 to electrochromic film. In these photoelectrochromic systems, metal oxides essentially have a potential more positive than the conduction band potential of the semiconductor, so that it can accept photogenerated electrons from the TiO2 semiconductor (Bechinger et al. 1996). Co3O4 Cobalt oxide is transition metal p-type antiferromagnetic semiconductor with direct band gap between 1.48–2.19 eV (Patil et al. 2012). This oxide have a wide range of applications due optical, magnetic, chemical electronic, mechanical and electrochemical properties (Kaloyeros et al. 2019). This oxide has been extensively studied due to attractive applications in solar cells, catalysis, corrosion protective coatings, batteries, magnetic nanostructures and magnetic storage systems, electrochromic EC devices (Kaloyeros et al. 2019; Kadama et al. 2001). There are several deposition techniques to prepare Oxides thin films such as sputtering, chemical vapor deposition, spray pyrolysis, electrophoretic deposition, pulsed laser deposition, sol–gel process, etc. (Drasovean et al. 2010; Hippler et al. 2021). DC reactive magnetron sputtering technique was employed for the preparation of the PECD because of its advantage of good control of the nanostructure and phase of the deposited film, high purity and homogeneity (Alami 2005).

In the present work, dc reactive magnetron sputtering was employed to synthesize the layers of the Photoelectrochromic device. The optical and structural characteristics of each layers were studied and optimized to prepare this device.

2 Experimental part

A high purity titanium sheet (60 mm diameter, 0.5 mm thickness and 99.999% purity) was used as a cathode to deposited N-doped TiO2 thin films as a function of nitrogen concentrations according to the gas mixing ratio (Ar:O2:N2) of (40:40:20, 43:42:15 60:30:10 and 76:19:5). The inter-electrode distance between the target as cathode and the substrate as anode was fixed at 4 cm, and the electric power for glow discharge which in turn to generating plasma was provided by a dc power supply, connected to the electrodes. The electrical power was 112.5 W, with a discharge voltage of 2.5 kV with a discharge current of 45 mA and the deposition time is 3 h. Cobalt oxide was prepared by using (60:40) gas mixing ratio of (Ar:O2), more information about the preparing conditions of cobalt oxide can be obtained from this reference (Hashim and Kadhim 2022).

N-doped TiO2 thin film was deposited on (ITO) conducting glass substrate as photocatalyst, then a thin layer of Co3O4 as EC layer was deposited on N-doped TiO2 to synthesize the PECD. The double-layer was put as the colored electrode, and platinum (pt) sheet as the counter electrode and these two electrodes were connected together via an external circuit. The solution NaOH (pH 10) was employed as the electrolyte and the light source was used a 6W xenon lamp (6 Watt-9″ T5-Germicidal UV-C Tubular Lamp-Mini Bi-Pi (G5) Base-G6T5). Figure 1 shows the schematic diagram of the system.

Fig. 1
figure 1

Schematic diagram of the experimental system

The crystalline structure of produced thin films was investigated using X-ray Shimadzu diffractometer with Cu Kα radiation (λ = 1.54060°A) at 40.0 kV. Fourier-transform Infrared (FTIR) spectrometry was employed by a Shimadzu 8400S FTIR spectrophotometer to determine the structure of the prepared samples. These measurements were performed in the spectral range from 400 to 4000 cm−1. Field emission scanning electron microscopy (FE-SEM) provides topographical and elemental information at magnifications of 10× to 300,000×, with virtually unlimited depth of field. The transmittance and the absorbance of the prepared samples and PECD were measured using a computer-controlled UV–Visible spectrophotometer (K- MAC Spectra Academy SV-2100) at room temperature.

3 Results and discussion

The crystal structure of the synthesized thin film titanium dioxide by using (40:40:20) gas mixing ratio of (Ar:O2:N2) after 3 h of deposition time and 4 cm of the inter-electrode distance, was investigated by an X-ray Shimadzu Diffractometer using Cu-Kα source (1.54 Å). Figure 2 shows the XRD patterns of N-doped TiO2 and Co3O4 thin films. Where the diffraction peaks assigned at 27.4° and 41.2° corresponding to crystal planes to R(110) and R(111) were confirmed the rutile phase according to the JCPDS card no. 88–1175 (Li et al. 2016) and the diffraction peaks at 22.4°, 37.8°, 48°, 54.1°, 55.2°, 62.8°, 68.9°, 70.7° and 75.1° are assigned to A(101), A(004), A(200), A(105), A(211), A(204), A(116), A(220) and A(125) planes of anatase phase, respectively. Another peaks at 36.1°, 44° and 61.9° are corresponding to TiN(111), TiN(200) and TiN(220) JCPDS card no. 38–1420 (Thamaphat 2008). The XRD patterns of cobalt oxide prepared by using (60:40) gas mixing ratio of (Ar:O2) and 1 h of time deposition. A major peak at about 37° corresponding to crystal plane of (311). The peak at 37° has the highest intensity, indicating the oriented growth of the sample in the (311) direction. Have observed peaks at 31.5°, 37.1°, 38.7°, 45.0°, 55.9°, 59.6°, 65.4° and 77.7° corresponding to (220), (311), (222), (400), (422), (511), (440) and (533) planes, which indicate the formation of pure Co3O4 (Swnason, et al. 1971). This structure of cobalt oxide is promising anodically coloring chromic material, thus, it can be used as an electrochromic film in the PECD. There are no other peaks are observed from any impurity of each oxide due to the use of the sputtering technique in this work and the formation of nanostructures with required composition can be controlled by controlling the gas mixing ratio. Also, many metal oxides can be prepared by sputtering technique with good control of their compositions. According to Scherrer’s formula, the average crystallite size (D) of the prepared samples is estimated from the XRD pattern as (Suryanarayana 2004):

$$D = K\lambda /\beta \cos \theta$$
(1)

where λ is the x-ray source wavelength (1.54 Å), β is the FWHM, K is a dimensionless shape factor with value of 0.9, and θ is the diffraction angle of incident radiation. The calculated crystallite size is found to be 14.001 nm for TiO2, 13.007 nm for TiN of sample prepared by using 20% concentration of nitrogen and for Co3O4 is found to be 16.000 nm of (2Θ = 37°) for sample prepared by using mixing ratio (60:40).

Fig. 2
figure 2

XRD patterns of N-doped TiO2 using gas mixing ratio 40:40:20 and Co3O4 using gas mixing ratio 60:40

The FTIR spectra of N-doped TiO2 and Co3O4 samples as shown in Fig. 3. The band at around 408.91 cm−1 is assigned to Ti–O-Ti bonds in the TiO2 lattice. While the bands ascribed to Ti–O symmetric and asymmetric stretching vibration modes were observed around 447 and 667 cm−1, respectively. The band at 870 cm−1 can be ascribed to the vibration of surface absorbed N–O, and the Ti-N vibration bands observer at around 1250 cm−1 in the range of 1080–1474 cm−1 (Huo, et al. 2009). The peak at 3450 cm−1 is attributed to the stretching and bending vibration of the OH group in water molecules in the atmosphere (Al-Maliki and Al-Lamey 2017). The appearance of the Ti–N bond in the samples with varying N:TiO2 ratios suggests that the N species have been incorporated into the TiO2 lattice. Furthermore, the FTIR spectrum shows the absence of any impurities in the prepared samples and this is attributed to the optimization of operation conditions of sputtering system, which is one of the most important advantages exhibited by this technique. It is clear that the results of FTIR agree with those of XRD. For Co3O4 sample, two strong peaks were observed: the first at 572.82 cm−1 was assigned to Co–O stretching vibration mode, in which Co+3 is octahedrally coordinated, and the second peak at 663.47 cm−1 was ascribed to bridging vibration, in which Co2+ is tetrahedrally coordinated (Maaz 2017). This further confirms the formation of Co3O4. The peaks at 1571.88 and 3436.91 cm−1 are ascribed to the OH stretching and banding modes of water adsorbed by the Co3O4 sample. The peaks at 2408.93 and 1423.37 cm−1 are characteristic of asymmetric vibrations of CO2 and CO−2 which were also adsorbed from the air (Naveen and Selladurai 2014).

Fig. 3
figure 3

FTIR spectrum of N-doped TiO2 prepared using gas mixing ratio 40:40:20 and Co3O4 prepared using gas mixing ratio 60:40

The nanoparticle size of these nanostructures layers were investigated via (FE-SEM) field-emission scanning electron microscopy. The image with scale of 500 nm in Fig. 4a shows the spherical shape of N-doped TiO2 nanoparticles, with average particle size of 28.09 nm, and the image with scale of 500 nm in Fig. 4b shows the Co3O4 nanoparticles, and the average particle size was found to be 37.32 nm, the aggregated particles indicating a good connectivity between these nanoparticles. The FE-SEM images indicates that the prepared nanoparticles are uniformly distributed. This type of morphology is beneficial to use these nanostructures for EC and PEC devices and supercapacitor application (Lakra et al. 2020; Hodaei et al. 2018).

Fig. 4
figure 4

a FE-SEM image of N-doped TiO2 using (40:40:20) gas mixing ratio, and b FE-SEM image of Co3O4 using (60:40) gas mixing ratio

The absorption spectra of the prepared N-doped TiO2 with different ratios of nitrogen and Co3O4 thin films as shown in Fig. 5 within the spectral range of 300–700 nm. It is clear that the optical absorption edges are shifted towards longer wavelength (red shift) by increasing the concentration of N, as they interstitially occupy some positions of O in the TiO2 lattice (Hammadi et al. 2019). The absorption spectrum of the prepared Co3O4 thin films with (60:40) gas mixing ratio recorded by a UV–visible spectrophotometer within the spectral range of 400–700 nm.

Fig. 5
figure 5

The absorption spectra of N-doped TiO2 prepared by using different concentrations of nitrogen and Co3O4 prepared by using 60:40 gas mixing ratio

The Tauc’s equation can be used to determine the energy band gap from the relationship between the photon energy and absorption coefficient as (Saravanan 2016):

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

where A is a constant, Eg is the energy band gap and n is a constant, the values of n are 0.5 or 2 for indirect and direct transitions, respectively

In accordance to the results of absorption, Fig. 6a shows the energy band gap of N-doped TiO2 thin films prepared using different concentrations of nitrogen (5, 10, 15 and 20%). The energy band gap was shifted to lower energies and decreased to 2.94 eV due to the contribution of nitrogen dopants in TiO2 nanostructures. The lowest value of Eg was obtained for the sample doped with the highest concentration of nitrogen (20%) as its values were 3.03, 3.12 and 3.17 eV for concentrations of 15, 10 and 5%, respectively. While Fig. 6b shows the energy band gap of Co3O4 thin film prepared by using 60:40 gas mixing ratio and 1 h of deposition time is 2.15 eV. This results of energy band gap of N-doped TiO2 and Co3O4 are approximately agreement with the results of other authors (Patil et al. 2012; Hammadi et al. 2019).

Fig. 6
figure 6

Determination of energy band gap for a N-doped TiO2 samples using different concentrations of nitrogen in the gas mixture, and b Co3O4 sample prepared using gas mixing ratio of 60:40

Figure 7 shows the transmittance spectra of the double-layer N-doped TiO2 /Co3O4 electrode with 20% nitrogen of N-doped TiO2 layer (same behavior of another concentrations 15%, 10% and 5% nitrogen). The N-doped TiO2/Co3O4 electrode was irradiated for 1, 1.5, 2 and 2.5 h. This double-layer electrode was showed the sensitivity to the light, and it was found that the electrode was colored by the light irradiation. After 2.5 h the transmittance decrease to 29.6%, the transmittance decrease as the increase of the irradiation time. The irradiated N-doped TiO2 leads to generation of electron–hole pairs in the valence and conduction bands (Fig. 8).

Fig. 7
figure 7

Transmission spectra of PECD based on N-doped TiO2 as photocatalytic layer with 20% nitrogen and Co3O4 as chromic layer

Fig. 8
figure 8

PECD with double-layer configuration based on N-doped TiO2 as photocatalytic layer with 20% nitrogen and Co3O4 as EC layer prepared by using 60:40 gas mixing ratio (left image: bleaching state, right image: coloring state)

$${\text{N-doped\, TiO}}_{2}+{h\nu }\to {h}^{+}+{e}^{-}$$
(3)

The photogenerated of electrons in the conduction band are allowed to flow through an external circuit from N-doped TiO2 film to counter electrode (pt) sheet (Huang et al. 2009). The holes migrate towards the surface of Co3O4 film, direct electron transfer from Co3O4 film to N-doped TiO2 film and that’s due to the presence of holes in the valence band of the photocatalyst N-doped TiO2 film.

$${\text{Co}}_{3}{\text{O}}_{4}+ {\text{OH}}^{-}+ {\text{H}}_{2}{\text{O}}\leftrightarrow 3{\text{CoOOH}}+ {e}^{-}$$
(4)

The oxidation of Co3O4 films exhibits color change to dark brown. The color change of Co3O4 film is associated with insertion and de-insertion of OH ions and electrons (Wang et al. 2012). This device switches reversibly from coloring to bleaching in the dark.

4 Conclusion

Photoelectrochromic device with double-layer was successfully synthesized with high purity and homogeneity via DC reactive magnetron sputtering, which combines a photocatalytic layer (N-doped TiO2) and an electrochromic layer (Co3O4). The photocatalytic layer N-doped TiO2 shows a high sensitivity to the light. The photogenerated holes in the valence band of the photocatalyst N-doped TiO2 migrate to the electrochromic layer upon irradiation and can oxidize this layer, which led to changing its color. This device does not need to an external power source, where the transmittance was decreased as increased of the irradiation time. The transmittance of the photoelectrochromic device decrease to 29.6%.