Transparent All-Oxide Hybrid NiO:N/TiO 2 Heterostructure for Optoelectronic Applications

: Nickel oxide (NiO) is a p-type oxide and nitrogen is one of the dopants used for modifying its properties. Until now, nitrogen-doped NiO has shown inferior optical and electrical properties than those of pure NiO. In this work, we present nitrogen-doped NiO (NiO:N) thin ﬁlms with enhanced properties compared to those of the undoped NiO thin ﬁlm. The NiO:N ﬁlms were grown at room temperature by sputtering using a plasma containing 50% Ar and 50% (O 2 + N 2 ) gases. The undoped NiO ﬁlm was oxygen-rich, single-phase cubic NiO, having a transmittance of less than 20%. Upon doping with nitrogen, the ﬁlms became more transparent (around 65%), had a wide direct band gap (up to 3.67 eV) and showed clear evidence of indirect band gap, 2.50–2.72 eV, depending on %(O 2 -N 2 ) in plasma. The changes in the properties of the ﬁlms such as structural disorder, energy band gap, Urbach states and resistivity were correlated with the incorporation of nitrogen in their structure. The optimum NiO:N ﬁlm was used to form a diode with spin-coated, mesoporous on top of a compact, TiO 2 ﬁlm. The hybrid NiO:N/TiO 2 heterojunction was transparent showing good output characteristics, as deduced using both I-V and Cheung’s methods, which were further improved upon thermal treatment. Transparent NiO:N ﬁlms can be realized for all-oxide ﬂexible optoelectronic devices.


Introduction
Nickel oxide (NiO) is considered the prototype p-type oxide semiconductor [1,2] and combined with the reported values of its energy band gap in the range of 3.6-4.0 eV it is the most widely used p-type transparent conductive oxide. Due to its chemical stability and non-toxicity, NiO has found numerous applications in photo-bio-catalysis [3][4][5], sensing [6,7], microbatteries [8] and transparent optoelectronics such as smart windows [9], ultra-violet (UV) photodetectors [10] and photovoltaics (PVs). In the case of PVs, NiO has been used in conventional PVs and ultra-violet UV-PVs, in addition to perovskite PVs, in which it is used as a hole transport layer [11][12][13][14]. If NiO is to be used for applications in which it can be applied as a coating or single layer, relatively low-cost chemical methods

. NiO Films Preparation
Nitrogen-doped NiO films, and an undoped NiO film as a reference, were fabricated by RF sputtering (Nordiko NS2500) using a 6 in. diameter nickel (Ni) target (purity 99.99%) in plasma containing Ar-O 2 -N 2 and Ar-O 2 gases, respectively (purities: Ar 99.999%, O 2 99.95% and N 2 99.999%). All films were deposited on unintentionally heated Si (100) wafer pieces and fused silica glass substrates which were mounted 10 cm above the sputtering target. The glass substrates were ultrasonically cleaned in acetone and isopropanol, rinsed with deionized water and dried in the flow of nitrogen gas, whereas the Si substrates were dipped in 10% HF solution for 30 s to remove the native oxide from the surface before placing them into the sputtering chamber. Before depositions, the target was pre-sputtered for at least 20 min (Ar plasma, 5 mTorr, 300 W RF power) to remove any contaminants from the target surface and to enable equilibrium conditions to be reached. During deposition the RF power was set at 300 W and the total pressure was kept at 5 mTorr while the percentage of gases in plasma were adjusted by the ratio of their flow rates through a set of mass flow controllers. The plasma gases for the reference undoped NiO film (P0) were Ar:O 2 = 50:50. The nitrogen-containing films (P1, P2, P3) were made in plasma containing 50% Ar, as the reference NiO film P0, but O 2 was gradually substituted by N 2 keeping the sum of their flow rates percentage equal to 50 (%O 2 + %N 2 = 50%) as follows: film P1: 50% Ar + (40% O 2 + 10% N 2 ), film P2: 50% Ar + (25% O 2 + 25% N 2 ) and film P3: 50% Ar + (10% O 2 + 40% N 2 ). Furthermore, to verify the effect of Ar gas on the films' properties, an additional film was grown in plasma containing lesser Ar concentration than that of films P1-P3 and consequently more %(O 2 + N 2 ) gases, namely film P4: 6% Ar + 47% O 2 + 47% N 2 . The deposition parameters of the films, and their thicknesses, as measured by a Veeco Dektak 150 profilometer, are listed in Table 2. Table 2. Details of sputtering conditions and properties of undoped and N-doped NiO films. D = thickness, D.R. = Deposition Rate, 2θ = 2 Theta (degree) position of (200) diffraction peak, D = crystallite size, ε L = lattice strain, T = transmittance, Egap = energy gap, E U = Urbach energy. Compact and mesoporous TiO 2 films were fabricated by spin coating following the standard procedure used when these layers are to be used as electron transfer layers for perovskite PVs. According to the perovskite solar cell technology, a thin compact TiO 2 layer is used so to eliminate the contact of the perovskite layer with the Sn 2 O 3 :F (FTO) layer of the FTO-covered glass, which is used as the substrate. Above this, the mesoporous TiO 2 is used to increase the effective area of the perovskite-TiO 2 interface. More precisely, commercially available FTO-coated glass was used as substrate (FTO and glass were 600 nm and 2 mm thick, respectively) which was cleaned employing a standard procedure: sonicated for 10 min in deionized water solution followed by an extra sonication step in acetone and then in isopropanol for 10 min, rinsed with acetone and dried in N 2 -gas flow. After the cleaning process and properly masking part of the FTO layer by vacuum tape mask, the TiO 2containing solution was spin-coated (2000 rpm, 30 s) on the FTO substrates. The solution was 50 µL of HCl (37%), 2.3 mL of ethanol and 150 µL of titanium isopropoxide, which was stirred for several hours. In this way, a compact TiO 2 (c-TiO 2 ) film, having a thickness of around 60 nm, was formed, which was followed by thermal treatment at 500 • C for 15 min in ambient air. After the annealing of the c-TiO 2 layer, the substrates were plasma treated in oxygen and then a commercially available TiO 2 mesoporous paste diluted in ethanol was spin-coated (6000 rpm, 30 s) on top of the c-TiO 2 /FTO/glass substrate. The mesoporous TiO 2 (m-TiO 2 ) layer formed was around 200 nm thick, and was afterward annealed at 500 • C for 15 min in air. The formed m-TiO 2 /c-TiO 2 /FTO/glass substrates were used for depositing the NiO layers.

Fabrication of NiO:N/TiO 2 Heterojunction
After preparing the m-TiO 2 /c-TiO 2 layers as described above, the m-TiO 2 /c-TiO 2 /FTO/ glass substrates were placed in the sputtering chamber. When the base-pressure was better than 10 −6 Torr, the deposition conditions of NiO:N film P2 were applied (plasma containing flow rates percentage of Ar:O 2 :N 2 = 50/25/25). The reason for choosing these plasma conditions is explained in the following sections. The device was completed by sputtering deposition of 150 nm thickness and 1 mm diameter Au as the ohmic contact on the NiO:N and FTO layers, using the appropriate shadow mask, which defined the junction area of the diode. A schematic representation of the fabricated NiO:N/TiO 2 heterodiodes can be seen in Figure 1. The diodes were characterized just after fabrication and after thermal treatment (TT)in a glass tube furnace (Elite Thermal Systems Ltd) at 300 • C for 15 min in flowing N 2 .

Thin Films and Device Characterization
Because the sputtering deposition of NiO films were performed on su were not intentionally heated, a specially designed photolithography mas having the required patterns for the characterization of the films on an area Thus, all structural, optical and electrical properties of the sputtered films de

Thin Films and Device Characterization
Because the sputtering deposition of NiO films were performed on substrates that were not intentionally heated, a specially designed photolithography mask was used having the required patterns for the characterization of the films on an area of 1× 1inch. Thus, all structural, optical and electrical properties of the sputtered films deposited on a single patterned square (1× 1inch) glass substrate could be obtained. In this way, any possible non-uniformities and properties discrepancies between films from different deposition runs but the same deposition conditions were eliminated. The crystallographic phases and crystallinity of the films were studied by the X-ray diffraction (XRD) method. The measurements were performed using a Bruker D8 ADVANCE XRD system employing a Cu KR source with Cu K α 1 radiation (λ = 1.5406 Å) and a power source of 40 kV and 40 mA. The films were scanned at grazing incidence (1.6 • ) and the collection angle extended from 20-90 • with a rate of 0.02 • /s. The broadening and angle position of the most prominent peak in terms of diffraction intensity was used to determine the crystallite size and lattice strain in the films. The crystallite size was estimated from the Scherrer formula: D = kλ/β hkl cosθ, where k is the shape factor 0.94, λ is the wavelength of incident radiation 1.5406 Å, hkl represents the Muller indices of the diffracted plane, β hkl is the full width at half maximum (FWHM) and θ is the Bragg angle of the peak. The lattice strain, which is also responsible for shifting the position of the diffraction peak, was determined using the formula: ε L = β hkl cotθ/4 [41]. Field-emission scanning electron microscope (FE-SEM) images were obtained using a Jeol JSM-7000 F electron microscope equipped with an energy-dispersive X-ray (EDX) spectroscopy system (Oxford Instrument-INCA) for element analysis on the films. The optical properties of the films were examined by recording the normal incidence transmittance (T) and near-normal incidence reflectance (R) in the UV-Vis-NIR spectrum by employing a Perkin Elmer Lambda 950 system. The optical band gap of the films was estimated through the relation [42,43]: where d is the thickness of the films and α is the absorption coefficient. Equation (1) takes into account multiple reflections in the film but assumes the same reflectance at the air/film and film/substrate interfaces and zero-absorbance for the substrate. By solving Equation (1) for the absorption coefficient α as a function of the measured quantities T, R and d, Equation (2) can be obtained: By applying the Tauc plot in ((αhv) n -vs-hv), where h is the Planck constant, v is the frequency and n = 2 for direct allowed transitions, n = 1/2 for indirect allowed transitions, n = 2/3 for direct not allowed transitions and n = 1/3 for indirect not allowed transitions [42], the corresponding energy band gap could be extracted. The resistivity of the films was determined by employing the conventional four-probe Van der Pauw technique on films deposited on a glass substrate which had cross patterns and Au ohmic contacts (150 nm thick) deposited by electron gun evaporation. For selected films, ac-modulated Hall effect measurements were performed in an attempt to determine the type and concentration of carriers. The current-voltage (I-V) characteristics of the heterodiodes were recorded using the Agilent 4200-SCS unit. Undoped NiO was deposited as reference film at 300 W RF-power in 5 mTorr total pressure consisting of 50% Ar and 50% O 2 gases (50% Ar + 50% O 2 ). Under these oxygenrich deposition conditions, NiO was oxygen-rich, atomic percentage (at.%) O/Ni~1.72 as revealed by EDX measurements, and previous experiments showed that it exhibits p-type behavior [7]. The XRD pattern of the NiO film deposited on Si substrate is shown in Figure 2. The XRD pattern yielded one main diffraction peak at around 42.6 • and a second one with much smaller intensity at around 62 • , which were identified as diffraction peaks arising from (200) and (220) crystallographic planes of the cubic NiO phase, respectively (Joint Committee of Powder Diffraction Standards (JCPDS)card No: 78-0429). The polycrystalline undoped O-rich NiO films had a (200) crystallite size of 5.2 nm, as deduced from the Scherrer equation. The disorder in the structure, caused by the low-temperature growthinduced defects such as excess O and Ni vacancies, created tensile stress shifting the diffraction peaks to lower angles compared to the crystal NiO of the JCPDS card. The lattice strain was calculated to be ε L = 1.78 × 10 −2 . The predominant growth of sputtered NiO films in the (200) direction is generally observed for films deposited both on heated [15,16] and unheated substrates [16]. The surface morphology of undoped NiO film P0 is seen in the SEM image of Figure 2b. The grains of the as-prepared NiO film were up to 40 nm wide. Furthermore, the disorder in the as-prepared NiO structure created scattering centers for the incident photons giving films with very low visible transparency (<10%) and a direct optical energy gap of around 3.15 eV. The transmittance and reflectance of the NiO film are shown in Figure 2c. It is seen that the structural defects of the as-prepared NiO film created states in the band gap resulting in a decrease in transmittance and a very slow rate of increase in absorption coefficient (also shown in Figure 2c) as photons with increasing energy are impinging on the film surface. It has been reported that Ni +2 vacancies create Ni +3 and in association with the stress and the defects of the structure (interstitial oxygen, boundaries of small grains-crystallites) can be responsible for the low visible transmittance [17,18,40,44] and the relatively low energy band gap (3.15 eV) of undoped NiO [17]. The optical properties of undoped NiO are discussed in more detail in conjunction with the properties of the nitrogen-containing NiO films in the next section.

NiO:N Thin Films
Nitrogen was introduced into the structure of NiO film P0 by performing depositions in plasma containing 50% Ar and 50% (O 2 + N 2 ) gases as described in the Materials and Methods section. All nitrogen-doped and undoped NiO grown films, with their deposition conditions and properties, are tabulated in Table 2. Because the nitrogen atoms are lighter than the oxygen atoms, by gradually substituting O 2 by N 2 gas while keeping the %Ar in plasma constant, the deposition rate was reduced from 1.06 nm/min for films grown in N 2 -free plasma (undoped NiO film P0) to 0.96 nm/min for 40% N 2 in plasma (NiO:N films P1 to P3 in Table 2). The deposition rate was further reduced to 0.64 nm/min when the deposition was performed in plasma containing only 6% Ar and 94% (O 2 + N 2 )-NiO:N film P4, as a result of the reduced sputtering yield caused by the heavier but fewer, in this case, inert argon atoms in plasma when compared to the O 2 and N 2 ones. An attempt was made to quantify the amount of nitrogen in NiO by EDX measurements. Although it was found that the atomic percentage (at.%) of nitrogen in the films increased as N 2 gas increased in plasma during deposition, the at.% of N was less than 1.5, regardless of the acceleration voltage for electrons in the EDX set-up (5 kV or 15 kV). Taking into account that EDX cannot accurately give the at.% of light atoms such as nitrogen and that values of at.% around or less than 1% are the limit of detection above the noise signal, the existence of nitrogen in the NiO structure determined by EDX was used only as a qualitative indicator. As noted below, the presence of nitrogen in the Ni-O structure was evidenced by the different properties of undoped NiO and nitrogen-containing NiO films. It is worth noting, however, that the at.% ratio of O/Ni of nitrogen-containing NiO films was about 5.2% smaller than that of undoped NiO (1.63 and 1.72, respectively). The introduction of nitrogen in the structure of NiO films during growth did not affect its crystallographic cubic phase, as seen in Figure 3a in which the XRD patterns of NiO:N films P1-P4 are presented. The films remained single-phase NiO films with no evidence of any other nickel oxide or nitride phases (Ni 2 O 3 , Ni x N y , etc.). As tabulated in Table 2, upon nitrogen doping the (200) diffraction peak shifted to higher angles (approaching that of crystal NiO at 43.28 • , JCPDS card No: 78-0429), the crystallite size increased by almost a factor of 2 and the lattice strain was reduced by 35% when compared to the respective properties of the undoped NiO. These changes were more profound for film P2 which was grown in plasma containing 50% Ar and 50% of O 2 + N 2 with equal flow rates (O 2 :N 2 = 25:25). However, although the introduction of nitrogen in undoped NiO (film P0) improved its structural properties, these properties did not remain unaffected for film P4 of Table 2, which was made in Ar-deficient plasma containing only 6% Ar and 94% (O 2 + N 2 ). It is apparent that under these reactive sputtering conditions the quality and quantity of plasma species lowered the optimum structural quality of P2 film because more strain was introduced in the structure.

NiO:N Thin Films
Nitrogen was introduced into the structure of NiO film P0 by performing depositions in plasma containing 50% Ar and 50% (O2 + N2) gases as described in the Materials and Methods section. All nitrogen-doped and undoped NiO grown films, with their deposition conditions and properties, are tabulated in Table 2. Because the nitrogen atoms are lighter than the oxygen atoms, by gradually substituting O2 by N2 gas while with equal flow rates (O2:N2 = 25:25). However, although the introduction of nitrogen in undoped NiO (film P0) improved its structural properties, these properties did not remain unaffected for film P4 of Table 2, which was made in Ar-deficient plasma containing only 6% Ar and 94% (O2 + N2). It is apparent that under these reactive sputtering conditions the quality and quantity of plasma species lowered the optimum structural quality of P2 film because more strain was introduced in the structure.   As seen in Table 2, the introduction of nitrogen in the structure of NiO shifted the diffraction peaks to higher angles, increased the crystallite size and reduced the lattice strain of undoped NiO. This indicated that the disordered undoped NiO structure became less disordered by the introduction of nitrogen in the lattice by reducing-filling of Ni vacancies (Ni +3 ) and/or substitution of excess oxygen by nitrogen. The typical surface morphology of nitrogen-containing NiO films is presented in Figure 3b where the SEM images of NiO:N P2 and P4 films are seen. No apparent differences could be observed between the surface morphology of nitrogen-containing P1-P3 films. The differences in the surface appearance of film P4 with that of film P2 of Figure 3b are attributed to the Ar-deficient conditions used for depositing P4 film. However, when compared to the surface morphology of undoped NiO (film P0) in Figure 2b, the nitrogen-containing films have a rougher surface with a bigger grain size.
The optical properties of NiO:N followed the structural improvements concerning defects and strain when compared to undoped NiO as mentioned above and the films were more transparent. The transmittance and absorption coefficient, and the deduced direct energy gap, of nitrogen-doped NiO P1-P4 films are plotted in Figure 4a,b, respectively. The highest transmittance was observed for films deposited having equal O 2 and N 2 flow rates regardless of the amount of Ar in plasma (films P2 and P4 having 50% and 6% Ar gas in plasma, respectively). These films (P2 and P4) had visible transmittance of 45-65%, whereas for all other films the optical transmittance was 30-40%. The reflectance of NiO:N films, not shown here, was smaller than the reflectance of the undoped NiO films (less than 20%) throughout the UV-Vis-NIR spectrum range (250-2500 nm). These results were reproducible and independent of thickness, at least for the range of thicknesses examined in this work. The increase in transmittance of N-doped NiO films when compared to the undoped NiO films could be related to the decrease in Ni vacancies (Ni +2 ) and subsequently fewer Ni +3 ions. Although the majority of NiO dopants until now have been cations, such as Li + , Zn 2+ and Al 3+ , it is generally agreed that a disordered structure, Ni vacancies and the presence of Ni +3 ions have been associated with the low transmittance of NiO. It is anticipated that doping with nitrogen, being an anion, replaces oxygen and/or fills Ni vacancies partially improving NiO stoichiometry, which is in agreement with the observed reduction of at.% of the O/Ni ratio upon introducing nitrogen in the Ni-O structure. The lessdisordered structure and the decrease in the tensile strain of NiO upon nitrogen doping resulted in more transparent films with a larger energy gap. These observations are not in accordance with theoretical predictions [19] and published experimental work [32,[37][38][39][40] for nitrogen-doped NiO, which are presented in Table 1. This is attributed to the quality and stoichiometry of the undoped NiO fabricated by sputtering in this work, such as the preferential growth of crystallites in the (200) direction instead of the (111) generally observed and the high ratio of at.% O/N~1.72. Loss of transparency and reduction of the energy band gap of NiO upon doping with nitrogen has been reported for films grown preferentially in the (111) direction [38,40], having poor crystallinity [39] or being amorphous [37], or having a ratio of at.% O/N = 1.14 [32].
NiO:N films. It can be seen that the increase in visible transmittance upon N-doping associated with an increase in the direct band gap of NiO from 3.48 eV to 3.64 eV. Th observation, as in the case of the increase in the visible transmittance with doping, whic was mentioned above, is anticipated to be related to the observation that the undope NiO of this work was highly disordered. Such a disordered structure is expected to di tort the edges of the parabolic bands and the states in the band gap [46,47]. Nitroge seems to fill nickel vacancies and, because the films become less O-rich upon doping, a mentioned previously, the defects are reduced, giving rise to an increase in the energ band gap. By applying the Tauc plot for indirect band gap determination, Figure 4c, was revealed that there was a clear indication of an indirect band gap for the N-dope NiO films ranging from 2.65eV to 2.87 eV depending on the amount of nitrogen in pla ma during deposition or equivalently on the amount of nitrogen in the films' structur On the other hand, no clear indications of the existence of an indirect band gap for th undoped NiO film P0 were seen in Figure 4c. Furthermore, the values of absorption co efficient seen in Figure 4a are α > 10 5 cm −1 for very short wavelengths (λ < 400 nm), sug gesting absorption of photons and transitions between the extended states of both va lence and conduction bands (direct allowed transitions) [47]. For longer wavelengths (λ 400 nm), however, the absorption coefficient has values α < 10 5 cm −1 , which implies tran sitions obeying exponential behavior with photon energy. It is generally agreed tha structural distortions in correlated materials like NiO especially due to doping can sig nificantly affect the electronic structure and defect levels [36]. The non-stoichiometric an disordered NiO, and the NiO:N films of this work, were investigated for the states an their width near the edge of the band gap, namely the Urbach tail states width, the U bach energy.  NiO is considered a direct band gap semiconductor associated with transitions from the top of the valence band to the bottom of the conduction band. The direct band gap is generally determined from spectrophotometric measurements such as UV-Vis-NIR transmittance and reflectance by applying Equation (2) and the Tauc plot of ((αhv) n -vs-hv) for n = 2. In this way, the direct band gap of NiO has been reported ranging from 3.6 eV to 4 eV. However, there have been reports in which the optical band gap of NiO has been determined to be 3.45 eV [45] or 2.75-2.83 eV [27] by applying the above Tauc plot for n = 1/2, which is used for determining the indirect band gap of a semiconductor or having both direct (3.6 eV) and indirect (3.2 eV) band gaps [30]. For the N-doped NiO films of this work, the Tauc plots for both direct and indirect determination of energy band gaps were applied and the results are seen in Figure 4b,c, respectively. The extracted optical band gaps are tabulated in Table 2. For comparison reasons the Tauc plot for the indirect band gap determination of the reference undoped NiO film is also included, although it cannot be defined in a straightforward manner as for the NiO:N films. It can be seen that the increase in visible transmittance upon N-doping is associated with an increase in the direct band gap of NiO from 3.48 eV to 3.64 eV. This observation, as in the case of the increase in the visible transmittance with doping, which was mentioned above, is anticipated to be related to the observation that the undoped NiO of this work was highly disordered. Such a disordered structure is expected to distort the edges of the parabolic bands and the states in the band gap [46,47]. Nitrogen seems to fill nickel vacancies and, because the films become less O-rich upon doping, as mentioned previously, the defects are reduced, giving rise to an increase in the energy band gap. By applying the Tauc plot for indirect band gap determination, Figure 4c, it was revealed that there was a clear indication of an indirect band gap for the N-doped NiO films ranging from 2.65 eV to 2.87 eV depending on the amount of nitrogen in plasma during deposition or equivalently on the amount of nitrogen in the films' structure. On the other hand, no clear indications of the existence of an indirect band gap for the undoped NiO film P0 were seen in Figure 4c. Furthermore, the values of absorption coefficient seen in Figure 4a are α > 10 5 cm −1 for very short wavelengths (λ < 400 nm), suggesting absorption of photons and transitions between the extended states of both valence and conduction bands (direct allowed transitions) [47]. For longer wavelengths (λ > 400 nm), however, the absorption coefficient has values α < 10 5 cm −1 , which implies transitions obeying exponential behavior with photon energy. It is generally agreed that structural distortions in correlated materials like NiO especially due to doping can significantly affect the electronic structure and defect levels [36]. The non-stoichiometric and disordered NiO, and the NiO:N films of this work, were investigated for the states and their width near the edge of the band gap, namely the Urbach tail states width, the Urbach energy.
These shallow states near the edge of valence and/or conduction bands are localized, and have been reported for amorphous, polycrystalline oxide and non-oxide materials, such as TiO 2 [48,49], ZnO [50,51], Co 3 O 4 [51], Zn-P-V-Mo-O [52], AlN [53], CdSSe [54], metal-organic frameworks (MOFs) [55], perovskites [56,57] and NiO [25,44,51,58]. These states can extend hundreds of meV above the maximum valence band edge, and are proportional to structural distortion and vary inversely to the band gap energy. The Urbach tails width can be calculated through the absorption coefficient of the material, α, and the relation [46]: α = Cexp(E/E U ), where E is the photon energy, C is a constant and E U is the Urbach energy. By plotting ln(α)-vs-E a straight line is obtained, whose inverse slope can give an estimation of the Urbach tail. Figure 4d shows the lnα-vs-E plots of NiO and NiO:N films (P0-P4), through which the Urbach tail width was determined, as listed in Table 2. It can be seen that for the undoped NiO, being defective and disordered, the gap states extended almost 2.7 eV deep in the band gap. It is anticipated that by introducing nitrogen in NiO, most of these defects in the band gap were compensated, leaving states extending up to around 600 meV above the valence band edge. The band gap energies are seen to be inversely proportional to Urbach's tail widths. The NiO:N films P2 and P4 deposited in plasma, having equal flow rates for O 2 and N 2 (25:25 and 47:47, respectively), have the narrowest width of Urbach tail states (592 and 598 meV). Urbach tail states have been observed for doped and undoped NiO. Sr-doped NiO has been reported [44] to exhibit increasing width of Urbach states with Sr doping, from 558 meV for the undoped NiO to 892 meV for NiO:Sr. Dependence of Urbach tail width on NiO thickness has been reported, ranging from 600 meV to 1.7 eV for 420 nm and 700 nm thick NiO, respectively, which was reduced to 500 meV upon annealing [25]. It is not known whether the indirect band gap observed for the NiO:N films in this investigation are related to the Urbach tails but it is noticeable that for these films the difference between the values of direct E gap and Urbach energy E U for each film is almost equal to that of indirect E gap . More experiments are needed to verify the relation between Urbach tails, band gap states and photon-and/or phonon-assisted transitions for nitrogen-containing NiO films [59]. The resistance of these films was high enough to allow any reliable Hall measurements to be performed. The defective and disordered undoped NiO had resistance, measured between the opposite contact pads of Hall pattern, of a few tens of kΩ. Upon doping with nitrogen, as shown above, the film became less defective and more stoichiometric, leading to an increase in resistance to a few hundreds of kΩ. This observation supports the conclusion that the increase in the energy band gap of NiO:N in this investigation is not associated with an increase in holes' concentration due to the Moss-Burstein effect, according to which an increase in carrier concentration results in an increase in the energy band gap [60]. Deterioration of the electrical properties and improvement of optical properties have been reported for NiO:Cu films when co-doped with nitrogen [35]. It is the first time to our knowledge in which the introduction of nitrogen in NiO films is reported to improve its optical transmittance, paving the way for applying NiO:N films in transparent and flexible optoelectronic applications such as perovskite solar cells and UV detectors.

Properties of TiO 2 Thin Film
The n-type TiO 2 thin films used for forming the heterojunction with the transparent NiO:N film was a two-layer TiO 2 thin film, namely a mesoporous TiO 2 layer (m-TiO 2 ) on top of a compact TiO 2 layer (c-TiO 2 ), both by spin-coating on FTO/glass substrate, as described in the Materials and Methods section. The XRD pattern, the transmittance and reflectance, and the surface morphology of the m-TiO 2 /c-TiO 2 /FTO/glass configuration are seen in Figure 5a-c, respectively. As seen in Figure 5a, the XRD pattern of TiO 2 layers was dominated by the peaks arising from the underneath FTO layer, whose crystallite size, as deduced for the peak at 37.8 • using the Scherrer formula, was 21.7 nm. The diffraction peaks originating from TiO 2 had a very small intensity and were ascribed to the anatase phase (JCPDS card No: 01-071-1167) and the rutile phase (JCPDS card No: 01-076-0319). The transmittance and reflectance of m-TiO 2 /c-TiO 2 /FTO/glass, and those of FTO/glass, are seen in Figure 5b. TiO 2 did not affect the optical properties of the FTO/glass. The visible transmittance and reflectance of the m-TiO 2 /c-TiO 2 /FTO/glass were 75-85% and 15-25%, respectively. The surface of the m-TiO 2 was rough, Figure 5c, with root mean square (RMS) roughness of 20 nm, as deduced from atomic force microscopy measurements (see Supporting Information file Figure S1). 01-076-0319). The transmittance and reflectance of m-TiO2/c-TiO2/FTO/glass, and those of FTO/glass, are seen in Figure 5b. TiO2 did not affect the optical properties of the FTO/glass. The visible transmittance and reflectance of the m-TiO2/c-TiO2/FTO/glass were 75-85% and 15-25%, respectively. The surface of the m-TiO2 was rough, Figure 5c, with root mean square (RMS) roughness of 20 nm, as deduced from atomic force microscopy measurements (see Supporting Information file Figure S1).

Characterization of the p-NiO:N/n-TiO2Diode
The m-TiO2/c-TiO2/FTO/glass was used as a substrate on which the N-doped NiO film P2 was sputtered in plasma containing flow rates ratio (%) Ar:O2:N2 = 50:25:25. As shown previously (Table 2), film P2 was chosen to form the heterojunction because it had the optimum structural and optical properties, such as less lattice strain, higher visible transmittance, wider band gap and the narrowest Urbach width, compared to all other films examined. The width of Urbach states was the second most-important criterion following transmittance because these states can appear as states at the NiO:N-TiO2 interface, affecting the rectifying output characteristics of the diode [61]. The transmittance and reflectance of the fabricated NiO:N/TiO2 diode is seen in Figure 6, with those of TiO2 for comparison reasons. The visible transmittance of the diode is seen to be 40-50%. Similar transmittance values have been reported for sputtered NiO/TiO2 [62] or NiO/ZnO [63] diodes. The visible reflectance was around 20%, whereas the near-IR reflectance was around 75% and the respective transmittance was less than 10%. The high value of

Characterization of the p-NiO:N/n-TiO 2 Diode
The m-TiO 2 /c-TiO 2 /FTO/glass was used as a substrate on which the N-doped NiO film P2 was sputtered in plasma containing flow rates ratio (%) Ar:O 2 :N 2 = 50:25:25. As shown previously (Table 2), film P2 was chosen to form the heterojunction because it had the optimum structural and optical properties, such as less lattice strain, higher visible transmittance, wider band gap and the narrowest Urbach width, compared to all other films examined. The width of Urbach states was the second most-important criterion following transmittance because these states can appear as states at the NiO:N-TiO 2 interface, affecting the rectifying output characteristics of the diode [61]. The transmittance and reflectance of the fabricated NiO:N/TiO 2 diode is seen in Figure 6, with those of TiO 2 for comparison reasons. The visible transmittance of the diode is seen to be 40-50%. Similar transmittance values have been reported for sputtered NiO/TiO 2 [62] or NiO/ZnO [63] diodes. The visible reflectance was around 20%, whereas the near-IR reflectance was around 75% and the respective transmittance was less than 10%. The high value of near-IR reflectance of the configuration of the layers indicates potential use for chromogenic applications [64,65]. In addition, the strong cut-off of ultraviolet (UV) wavelength photons indicates strong absorption of UV light for the all-oxide layers, thus making the diode a strong candidate for transparent optoelectronic applications. It is worth mentioning that XRD measurements were performed on the diode but the diffraction peaks were very noisy and could not be identified as arising from any of the layers of the diode due to the very rough surface of the spin-coated TiO 2 layers seen in Figure 5b. The dark currentvoltage (I-V) characteristics of the Au/NiO:N/m-TiO 2 /c-TiO 2 /FTO/glass diode are seen in Figure 6b, just after fabrication and after thermal treatment (300 • C, 15 min, N 2 ). The heat treatment temperature of 300 • C was chosen to be high enough to be able to change the properties of the device but low enough not to cause any metal contact degradation of the diode. Rectification behavior can be seen for the as-prepared diode, whereas heat treatment improved its characteristics. The rectification ratio (forward current to reverse current) at ±1.5 V was 29 and 25 before and after heat treatment, respectively. The characteristics of the diode, such as saturation current (I S ), barrier height (Φ b ), ideality factor (n) and series resistance (R S ), were obtained following thermionic emission theory from the I-V curve [66] and by applying Cheung's method [67]. Assuming thermionic emission over the barrier of a diode and for V > 3 kT/q, the standard diode equation is [66]: where T is the temperature in Kelvin (K), q is the electron charge and k is the Boltzmann constant. The above equation can be written as ln(I) = ln(I S ) + (q/nkT)V, from which by plotting ln(I)-vs-V, n and I S can be deduced from the slope and the intercept of line with the ln(I) axis, respectively. The barrier height, Φ b was determined from: where A is the diode area and A* is the Richardson constant (120 (A/cm 2 K 2 ) [27,68]). The series resistance R S of the diode was extracted from the I-V curve for V > 2 V [69], independently from Equation (3) and thermionic emission theory.
tioning that XRD measurements were performed on the diode but the diffraction peaks were very noisy and could not be identified as arising from any of the layers of the diode due to the very rough surface of the spin-coated TiO2 layers seen in Figure 5b. The dark current-voltage (I-V) characteristics of the Au/NiO:N/m-TiO2/c-TiO2/FTO/glass diode are seen in Figure 6b, just after fabrication and after thermal treatment (300 °C, 15 min, N2). The heat treatment temperature of 300 °C was chosen to be high enough to be able to change the properties of the device but low enough not to cause any metal contact degradation of the diode. Rectification behavior can be seen for the as-prepared diode, whereas heat treatment improved its characteristics. The rectification ratio (forward current to reverse current) at ±1.5 V was 29 and 25 before and after heat treatment, respectively. The characteristics of the diode, such as saturation current (IS), barrier height (Φb), ideality factor (n) and series resistance (RS), were obtained following thermionic emission theory from the I-V curve [66] and by applying Cheung's method [67]. Assuming thermionic emission over the barrier of a diode and for V > 3 kT/q, the standard diode equation is [66]: where T is the temperature in Kelvin (K), q is the electron charge and k is the Boltzmann constant. The above equation can be written as ln(I) = ln(IS) + (q/nkT)V, from which by plotting ln(I)-vs-V, n and IS can be deduced from the slope and the intercept of line with the ln(I) axis, respectively. The barrier height, Φb was determined from: where A is the diode area and A* is the Richardson constant (120 (A/cm 2 K 2 ) [27,68]). The series resistance RS of the diode was extracted from the I-V curve for V > 2 V [69], independently from Equation (3) and thermionic emission theory. For extracting the diode characteristics using Cheung's approach [67], which takes into account the effect of RS, Equation (3)  For extracting the diode characteristics using Cheung's approach [67], which takes into account the effect of R S , Equation (3) is written as: From Equation (4), the quantity dV d(ln I) = nkT q + I·R s can be derived, from which by plotting dV d(ln I) -vs-I, the slope gives R S and the intercept gives n. By defining H = V − nkT q ln I AA * T 2 , the equation H = nΦ b + R S I can be derived, from which the graph of H-vs-I can give R S and Φ b from the slope and the intercept, respectively. The results for the characteristics of the NiO:N/m-TiO 2 /c-TiO 2 /FTO diode just after fabrication and after thermal treatment, obtained from the I-V curves of Figure 6b by applying Equations (3) and (4) for thermionic emission theory and Cheung's method, respectively, are tabulated in Table 3. Table 3. NiO:N/m-TiO 2 /c-TiO 2 /FTO diode characteristics before and after thermal treatment (TT): saturation current density (J S ), barrier height (Φ b ), ideality factor (n) and series resistance (R S ), after applying I-V and Cheung's methods. The diode formed between NiO:N and m-TiO 2 /c-TiO 2 showed reasonable, good parameters, and both methods used for analyzing the characteristics of the diode revealed that annealing improved the diode's output characteristics. The saturation current density, J S , and the barrier height which is inversely proportional to J S , have similar values to those reported in the literature for NiO-containing diodes [25,27,63]. The ideality factor, n, is a parameter indicating whether the diode obeys the thermionic emission model where n should be 1 < n < 2. Because the diode has n > 2 implies that the transport mechanism is not dominated by thermionic emission but through recombination at defects/states at the interface, tunneling through the interfacial layer or space charge current transport [27]. Because n generally decreases with thermal treatment, the fact that the diode's n seen in Table 3 does not change drastically with thermal treatment implies that higher temperatures are required [70]. All of the above diode parameters that are improved with annealing could be related to improved crystallinity of NiO:N and reduction of structural defects and consequently reduced NiO:N/TiO 2 interface states. It should be recalled that the NiO:N/TiO 2 diode was a hybrid diode because NiO:N was sputter-deposited on unheated substrates whereas the spin-coated formed TiO 2 layers had undergone annealing at 500 • C. Experiments are in progress to clarify the relation between thermal treatment and reduction of defects and states/traps at the NiO-TiO 2 interface. The diode's series resistance, R S , is less than 1kΩ just after fabrication but it is increased after annealing, probably due to the increased resistance of NiO:N after annealing. More experiments are needed to identify the origin of the diode's behavior with thermal treatment. Finally, it is the first time that Cheung's method has been applied for analyzing a NiO/TiO 2 diode and the different results observed between the two methods, used for extracting the diode's parameters as seen in Table 3, have been also observed for NiO/ITO [27] and for epitaxially grown AlGaAs diodes [71]. The differences might be attributed to the fact that Cheung's model takes into account the series resistance of the diode (Equation (4)) and is applied to the whole range of forward voltages, whereas the I-V method is applied for voltages where the linear part of the I-V curve starts, i.e., V > 3 kT/q = 0.78 V [27]. Improvement of diode characteristics can be accomplished by further optimizing the fabrication procedure, such as TiO2 surface treatment before the NiO deposition. More experiments are needed for evaluating the diode's behavior, if this type of diode is to be used for flexible and/or transparent optoelectronic applications, such as tandem perovskite solar cells and UV photovoltaics.

Conclusions
A transparent hybrid heterodiode was fabricated by employing sputtered NiO:N and spin-coated TiO 2 as p-type and n-type layers, respectively. The reference undoped NiO was fabricated by sputtering a Ni target on room temperature substrates in plasma containing 50% Ar and 50% O 2 . The nitrogen-containing films (less than 1.5 at.% of nitrogen) were fabricated in 50% Ar and 50% (O 2 + N 2 ) gases by gradually substituting O 2 with nitrogen in plasma (0-40% N 2 ). Upon nitrogen doping, the O-rich undoped NiO film became less disordered and more transparent. The direct and possible indirect band gaps of NiO:N, in addition to the subgap states, the Urbach tail states, were correlated with the amount of nitrogen in plasma during deposition. The optimum NiO:N film, fabricated in plasma containing equal amounts of O 2 and N 2 gases (50%Ar/25%O 2 /25%N 2 ) had the highest transmittance (49.1%), widest band gap (3.67 eV direct and 2.72 eV indirect gaps) and the narrowest Urbach width (592 meV) compared to the other films of this investigation. The optimum NiO:N film was used to form a heterojunction on spin-coated mesoporous TiO 2 on top of compact-TiO 2 /FTO/glass. The NiO:N/m-TiO 2 /c-TiO 2 /FTO/glass heterostructure showed rectification properties, which were analyzed by employing the I-V and Cheung methods. Most of the output characteristics of the diode were improved upon thermal treatment and the changes were associated with changes in material properties and the NiO:N/m-TiO 2 interface with annealing. The nitrogen-doped NiO fabricated in this work on room temperature substrates can be used for realizing transparent and flexible devices for wearable and optoelectronic applications.