Kelvin probe force microscopy of nanocrystalline TiO2 photoelectrodes

Summary Dye-sensitized solar cells (DSCs) provide a promising third-generation photovoltaic concept based on the spectral sensitization of a wide-bandgap metal oxide. Although the nanocrystalline TiO2 photoelectrode of a DSC consists of sintered nanoparticles, there are few studies on the nanoscale properties. We focus on the microscopic work function and surface photovoltage (SPV) determination of TiO2 photoelectrodes using Kelvin probe force microscopy in combination with a tunable illumination system. A comparison of the surface potentials for TiO2 photoelectrodes sensitized with two different dyes, i.e., the standard dye N719 and a copper(I) bis(imine) complex, reveals an inverse orientation of the surface dipole. A higher surface potential was determined for an N719 photoelectrode. The surface potential increase due to the surface dipole correlates with a higher DSC performance. Concluding from this, microscopic surface potential variations, attributed to the complex nanostructure of the photoelectrode, influence the DSC performance. For both bare and sensitized TiO2 photoelectrodes, the measurements reveal microscopic inhomogeneities of more than 100 mV in the work function and show recombination time differences at different locations. The bandgap of 3.2 eV, determined by SPV spectroscopy, remained constant throughout the TiO2 layer. The effect of the built-in potential on the DSC performance at the TiO2/SnO2:F interface, investigated on a nanometer scale by KPFM measurements under visible light illumination, has not been resolved so far.


Introduction
Dye-sensitized solar cells (DSCs) provide a promising low-cost, high-efficiency third-generation photovoltaic concept based on the spectral sensitization of a nanoporous wide bandgap semiconductor [1,2]. In the past two decades DSCs have received substantial attention from both academic and industrial communities focusing on new materials and advanced device concepts [3][4][5][6][7][8]. A typical DSC consists of a dye-coated TiO 2 photoelectrode, deposited on a fluorine-doped tin oxide (FTO) conductive-glass substrate, an redox-couple-based electrolyte and a platinum counter electrode as depicted in Figure 1. Upon visible-light excitation, dye molecules inject electrons into the conduction band, E cb , of the semiconductor; the oxidized dye is subsequently reduced by the redox couple of the surrounding electrolyte. The generated electrons diffuse toward the SnO 2 :F substrate and establish the photovoltage. The most frequently used dye complexes contain less-abundant transition metal elements such as ruthenium. Complexes of earth-abundant metals such as zinc and copper are candidates to replace the more expensive ruthenium dyes [9][10][11][12][13]. Recently, Yella et al. reported an efficiency of over 12% with a porphyrin-sensitized DSC and a cobalt(II/III) based redox electrolyte [14]. However, many details of the hybrid organic/inorganic interface and the influence of subsequent preparation steps on the device properties, e.g., surface topography and potential, are still unclear and have the potential to increase the efficiency and long-term stability of the devices. Investigations of nanoscaled photovoltaic devices require nanometer-scale measuring methods, including time-resolved measurements of the carrier dynamics [15,16]. Although a DSC photoelectrode consists of a nanostructured TiO 2 , there are few microscopic studies [17].
Surface photovoltage (SPV) spectroscopy is a non-destructive and sensitive method for determining surface potential changes upon illumination, identifying surface states, and extracting material parameters, in particular the bandgap, E g , the minority carrier diffusion length, L n , and the flatband potential, V fb [18]. SPV spectroscopy is usually performed with a macroscopic vibrating capacitor and is hence limited by its poor lateral resolution [19,20]. Bare and dye-sensitized nanocrystalline (nc) TiO 2 have been investigated with such a macroscopic Kelvin probe (KP) revealing details about the electronic structure [21][22][23], trap states [24], the surface dipole [25], charge-carrier dynamics [26], and indicating changes upon chemical treatments [24,[27][28][29]. KP studies have helped to select surface treatments that are beneficial for the DSC performance. In order to achieve a nanometer scale resolution, SPV spectroscopy can be combined with Kelvin probe force microscopy (KPFM) [30][31][32], an atomic force microscopy (AFM) technique that was introduced in 1991 [33]. KPFM is a surface-potential detection method that determines the contact potential difference (CPD) during scanning by compensating the electrostatic forces between a microscopic tip and the sample [34]. Figure 2a illustrates a schematic band diagram for a KPFM tip in close proximity to a semiconductor sample surface with surface states, E trap . An applied dc voltage, V dc = CPD, nullifies the workfunction difference, ΔΦ, between both materials. The occupied surface states of the n-type semiconductor, depicted in Figure 2a, are depopulated upon illumination with an appropriate light energy. Consequently, the surface band bending of an n-type semiconductor is shifted downwards and the measured CPD decrease is equal to the SPV.
The considerably high performance in DSCs is achieved also due to the high surface-to-volume ratio of nanocrystalline TiO 2 . In any case, there is a trade-off between a high surface-tovolume ratio and the carrier transport. Smaller TiO 2 particles Figure 2: Schematic band diagram for a KPFM tip in close proximity to an n-type semiconductor surface (a) in the dark and (b) under illumination while the CPD is nullified by an applied dc voltage. Upon illumination the local vacuum energy level, E vac , is shifted downwards and detected as a work function or CPD decrease, which results in a "negative" SPV. E f,t and E f,s are the Fermi levels of tip and sample, respectively. E vb and E cb are the valence and conduction band edges of the semiconductor. E vac is the local vacuum and E trap a surface-state energy level, respectively. The workfunction shift, ΔΦ s , upon illumination is equal to e SPV.
lead to an increase of grain boundaries and reduce the solar cell current. Hence, we have considered it as relevant to characterize the surface potential of nanostructured TiO 2 with a highresolution method. Surface dipole changes upon dye adsorption induce a shift of the surface potential in the order of hundreds of millivolts, which is detectable by KPFM on the nanometer scale [35][36][37]. A direct influence of the surface dipole on the opencircuit voltage, V oc , of a DSC was predicted by Angelis et al. [38] and experimentally addressed by KPFM investigations [39,40]. KPFM studies in UHV conditions of rutile TiO 2 decorated with either nanometer-sized Pt clusters [41] or single dye molecules [42] revealed a significant impact of single particles on the surface dipole. We have investigated the surface parameters of DSC photoelectrodes on the nanoscale using KPFM, which is not possible to achieve with a macroscopic KP. SPV spectra were taken on desired locations with a lateral resolution of 25 nm. Thus, the bandgap and time constants were obtained on the nanoscale. In this work, microscopic variations of the work function were observed for both sensitized and bare nc-TiO 2 . To correlate the microscopic changes on a dry photoelectrode with the macroscopic DSC parameters, local surface dipole variations for a ruthenium(II)-and a copper(I)-based dye were determined. The ruthenium(II) dye chosen was the standard dye N719. The copper(I)-based dye ( Figure 3) was selected from a range of complexes that we have recently prepared and screened for their potential use as sensitizers [43].

Results and Discussion
Work function inhomogeneities Figure 4 shows the topography and the work function of a bare TiO 2 and an N719-sensitized TiO 2 layer measured by KPFM in a dry nitrogen glove box at room temperature. The topography images reveal, in both cases, a homogeneous surface with nanoparticles, nominal diameter of 20 nm, in the range of 20-100 nm. Work-function (Φ) variations reflecting the position of the conduction band edge E cb of 80 mV on average, appear for both samples and are visible as dark regions in the measurements. They are highlighted in the cross sections in the lower part of the image. Such a local work function shift can be attributed to local variations of chemisorbed contaminants resulting in a decrease of the local vacuum energy, E vac , and the electron affinity, χ. A thin water layer consisting of chemisorbed and physisorbed H 2 O molecules on the nc-TiO 2 is known to be present even inside a dry nitrogen glove box [44]. Solvent residues are further possible contaminants that can be locally attached to the TiO 2 surface, or the variations may be due to varying material properties in general. In any case, such variations, which are clearly detectable by KPFM, may obstruct the optimal attachment of dye molecules and thus reduce the solar cell performance [25].

Microscopic surface photovoltage
By combining a tunable illumination system with KPFM, the surface photovoltage (SPV) can be measured on the nanometer scale and is referred to as microscopic SPV. A microscopic SPV is caused by an electron generation upon light absorption at either the surface space-charge region or at the electric field of a buried interface that is reached by the incident light [19]. In the present work, the sample was illuminated with focused light from an optical fiber or directly with a laser. The measured SPV can have two contributions, one from the TiO 2 /SnO 2 :F interface and the other from the TiO 2 layer depending on the energy of the incident light, i.e., super-or sub-bandgap(TiO 2 ) illumination. Both SPV effects are described separately in the following two sections. Time-resolved SPV measurements provide insights into charge carrier dynamics [45] and are described below.
Surface photovoltage under super-bandgap illumination SPV spectroscopy (SPS) is a common method for measuring the bandgap, E g , of a semiconductor by determining its dependency on the absorption coefficient, α. The obtained bandgap for nc-TiO 2 ( Figure 5a) is in accordance with the literature value for bulk TiO 2 , E g = 3.2 eV [46] and validates the SPS setup. The extraction of E g by means of SPS is superior to the usual transmission spectra since it is also applicable to thin layers, nanowires, or single nanoparticles and also for opaque samples [18]. Under illumination with a sufficiently low light intensity, the SPV can be assumed to be proportional to the absorption coefficient, implying a maximum SPV for superbandgap illumination. Depending on the bandgap type, either direct or indirect, the SPV curve is fitted with the corresponding relation [18,47]: where h is the Planck constant and ν is the frequency of the light. For anatase TiO 2 , an indirect bandgap material [48], α is therefore expected to show a quadratic dependence on the illumination wavelength for energies just above the bandgap. Figure 5a presents an SPS measurement taken on a cluster of sintered anatase particles showing a quadratic dependence on the wavelength. By linear fitting, a bandgap energy of E g = 3.2 eV was extracted using Equation 1, assuming a phonon energy E p ≈ 0. Figure 5b depicts the SPV of bare TiO 2 as a function of the light intensity for super-bandgap illumination with a wavelength of 380 nm. The negative SPV indicates an n-type behavior of the material. The SPV exhibits a linear dependency on the light intensity up to a value of −250 mV. A logarithmic dependence on the light intensity would be typical for a charge separation at a built-in potential, for instance at the surface spacecharge region. However, the linear dependence indicates a charge separation, which is governed mainly by diffusion and not by drift current (electric field). Preferential trapping of electrons (holes) in defect states of the TiO 2 network leads to different diffusion coefficients for electrons and holes.  Surface photovoltage under sub-bandgap illumination Figure 6a shows a semilogarithmic plot of the SPV versus the light intensity for three different wavelengths for the bare nc-TiO 2 . An SPV of −230 mV was reached under sub-bandgap (λ = 408 nm) illumination. A negligible sub-bandgap SPV of less than 20 mV was measured for λ = 408 nm on TiO 2 layers directly deposited on glass. We assume that the SPV under subbandgap illumination results from a reduction of the built-in potential, V bi , at the TiO 2 /SnO 2 -interface. This built-in electric field is screened by the photogenerated charge carriers resulting in a downward band bending of the TiO 2 conduction band edge E cb .
The measured SPV of −250 mV under super-bandgap illumination ( Figure 5b) provides an estimation for this downward band bending of E cb . Figure 5b shows the CPD decrease with onset illumination, which decreases further with higher illumination intensities. A CPD decrease is equivalent to a work function decrease of the TiO 2 . The observed logarithmic dependence demonstrates a photodiode behavior according to Equation 5 and is an indication for a built-in (Schottky barrier) potential at the interface. It should be noted that the photocurrent, J ph , in Equation 5 is approximately proportional to the light intensity, I. When the incident light wavelength approaches the bandgap energy of TiO 2 higher SPVs result leading to steeper slopes of the SPV-versus-intensity curves. The SPV is proportional to the number of photogenerated charge carriers. It is evident from Figure 6a that more electrons are generated with higher illumination energies within the TiO 2 network. We assume that empty surface states just below the conduction band edge are occupied by valence band electrons. According to Howe et al. there are localized Ti 3+ (3d) trap states just below the conduction band edge of nc-TiO 2 [49]. According to our measurements, the SPV decreases exponentially with decreasing illumination energies and we conclude, therefore, that the number of trap states also decreases exponentially with decreasing trap state energy relative to the conduction band edge of the TiO 2 nanoparticles.
The buried TiO 2 /SnO 2 -interface is reached by the incident light since the nanoporous TiO 2 , deposited on top of the FTO-layer, is only about 10 μm thin and transparent to visible light (E g = 3.2 eV). Due to the high n-dopant density of SnO 2 :F (N D ~ 10 20 ), it can be approximated to being nearly metallic. Generally, the SnO 2 :F contact is regarded as Ohmic since electrons may tunnel through the ca. 2 nm thin barrier at the interface space charge region [50]. However, the TiO 2 /SnO 2 :F contact forms a heterojunction between two wide-bandgap semiconductors, degenerately doped SnO 2 and (intrinsic) nc-TiO 2 . Kron et al. and Levy et al. [51,52] investigated alternative materials to SnO 2 :F and found that the built-in voltage at the interface has no significant influence on V oc of the DSC but does influence the fill factor, FF. With the determined work functions of 4.3 ± 0.1 eV for nc-TiO 2 and 4.7 ± 0.1 eV for SnO 2 :F in our KPFM measurements, the band offset at the heterojunction allows an estimation of the energy barrier. Depending on the front electrode material, this energy barrier varies and consequently the interface contact resistance differs. As a result, the FF of the DSC can be increased with a lower interface energy barrier and a narrower space-charge region decreasing the sheet resistance at the interface.
For the sensitized TiO 2 , the SPV also shows a logarithmic dependence on the light intensity (Figure 6b). We conclude that the measured SPV of the sensitized TiO 2 is created by two different effects: a change of the surface dipole (after electron donation) and a charge carrier concentration gradient between the illuminated surface and the bulk due to different diffusion coefficients for electrons and holes (photo-Dember effect). The latter effect causes a potential drop forming an electric field in the z-direction across the TiO 2 layer [29,53,54]. The Dember photovoltage is caused by a non-uniform generation or recombination of charge carriers within the sample [18]. The adsorbed dye molecules are considered as n-type "photodoping" since electrons are generated under sub-bandgap illumination. After electron injection into the conduction band of TiO 2 , the dye is oxidized and charged more positive relative to its ground state. Hence, the surface dipole is reduced and detected as a change in the CPD.

Time evolution of the SPV
Time-dependent SPV measurements were performed at specific positions above single TiO 2 particles. Since KPFM is sensitive to potential drops in the entire sample, the measurements give insights into charge-carrier transport processes of the particle network. Figure 7 shows the time evolution of the measured CPD values after the turning on and off of the laser light illumination with a wavelength of 408 nm. For both sensitized and bare TiO 2 the SPV with onset illumination, t on , is below the resolution limit (50 ms) of the measurement system. The photoresponse time corresponds to the required time for the charge carriers to reach a steady-state condition upon illumination. In turn the recombination time, t off , is the time required to reach the initial value in the dark. Recombination times of 65 ± 6 s for bare TiO 2 and 43 ± 4 s for N719 were determined with KPFM. The recombination curve was divided into a fast and a slow component and approximated as the sum of two exponential functions. The slow component of the total recombination time is attributed to an electron diffusion process across the TiO 2 network towards the contact, whereas the fast recombination process occurs within single particles [55]. The slow electron diffusion throughout the network is due to trapping and detrapping [46] in surface and bulk defect states. TiO 2 is regarded as an insulator with a relative permittivity of ε r = 36 and consequently acts as a charge storage capacitor between a metallic tip and a highly conductive SnO 2 :F contact. Upon photoelectric charge injection, the redistribution of charge carriers (by diffusion through the network) is slow (seconds to minutes). A slow response time has also been reported for nanoporous TiO 2 [56,57] and for porous Si, which exhibited recombination times of up to 1 h [58].

Microscopic surface-dipole variations
By averaging the work function values over several images on different sample spots an increase of ΔΦ = 150 ± 40 mV for N719 and an average decrease of ΔΦ = −180 ± 40 mV for the copper-containing dye was determined on sensitized TiO 2 films by KPFM. The values as well as a model describing the dipole moment strength and orientation are presented in Figure 8.
The surface dipole is the result of a combined effect of both anchoring domain and dye molecule. The effective electron affinity, χ*, is affected by the surface dipole formed by adsorbed dye molecules [59]. The detailed anchoring mechanism for the N719 dye on TiO 2 is still under debate. It is widely accepted that the N719 is chemisorbed either through two or three carboxylic acid groups. Results by Lee et al. support that an additional hydrogen bonding (physisorption) is present [60]. Molecular dynamics simulations by DeAngelis et al. show that the binding occurs through three carboxylic acid groups and that the protons initially carried by the N719 dye are transferred to the semiconductor surface [61]. After covalent attachment to the TiO 2 surface, the formed dipole might turn compared to the dipole of the free molecule in vacuum. After N719 has been chemisorbed onto TiO 2 , the surface is protonated and possesses a dipole pointing from the TiO 2 surface to the negative net charge (isothiocyanato-group,-NCS) as shown in Figure 8 [38]. As a consequence the local vacuum level is bent upwards and the work function is increased compared with the bare TiO 2 surface. For the nanoporous TiO 2 surface sensitized with the Cu(I)-containing dye, a negative surface dipole pointing away from the surface leads to a decrease in work function. The copper(I) dye is a monocation in its fully protonated state, assuming that the phosphonic acid functionalities are fully protonated.
To quantify the surface dipole, Natan et al. proposed a plate capacitor model, in which the adsorbed molecules are regarded as point dipoles [62]: where P is the surface dipole moment, P 0 is the dipole moment of the free molecule in vacuum, k is a geometric correction factor and a is the distance between two dipoles. The change in work function, ΔΦ S , is related to the surface dipole through the Helmholtz equation: (4) where (N/A) is the number of dipoles/molecules per surface area, ε = (P 0 /P) is the effective dielectric constant of a molecular monolayer and ε 0 is the permittivity in vacuum. The dipole layer is oriented at an angle, θ, relative to the surface plane normal. Due to the curved surface geometry of nc-TiO 2 , the mean dipole in the z-direction is reduced (Figure 8).
A surface coverage of N/A = 1/4 molecules/nm 2 is a reasonable value found by Ikeda et al. by AFM measurements of N3 (N719 is the salt of N3) adsorbed on rutile TiO 2 in ultrahigh vacuum [42]. Using Equation 4 with θ = 0° and measured work-function shifts of ΔΦ = −180 ± 40 mV for the Cu(I) dye and ΔΦ = 150 ± 40 mV for N719 results in 6.3 ± 1.5 D and 5.3 ± 2 D with opposite directions, respectively. The latter value is in the same range as predicted by DFT calculations for N719 [38] and N3 [42,63] adsorbed on anatase plane-surface. However, for a complete DSC device the surface dipole may change due to screening by the surrounding electrolyte [64]. Figure 9a depicts the I-V characteristics for three different DSCs, a bare TiO 2 solar cell with electrolyte and DSCs sensitized with a Cu(I)-dye or N719, respectively. The parameters of the solar cell were extracted from the I-V data and are summarized in Table 1. A DSC sensitized with N719 is 3 times more efficient than the Cu-sensitized solar cell. We focus on the difference in the open-circuit voltages of −220 ± 20 mV between these DSCs. The deviation of the open-circuit voltages is in the range of the measured difference for the surface dipoles (350 ± 40 mV) formed by N719 and the copper(I) dye. The two sensitizers possess oppositely directed dipole moments.  Pandey et al. have investigated the surface dipoles of organic dye molecules adsorbed on TiO 2 using KPFM [40]. They observed a decrease of V oc for DSCs sensitized with dye molecules, which lead to a more positive surface potential. De Angelis et al. found that the adsorption geometry of the sensitizer on the TiO 2 surface has a significant influence on V oc . The desired forward reaction, i.e., electron injection from E LUMO into E cb of TiO 2 is accompanied by a backward electron injection from E LUMO into E redox (Figure 9b). This backward reaction is affected by the surface dipole of the adsorbed sensitizer [64]. Regarding the general expression for the open-circuit voltage (Equation 5), it is the reverse saturation current density, J 0 , and the conduction band minimum, E cb , that are influenced by the surface dipole and finally affect V oc : wherein A is the correction factor and J ph the photocurrent density. A performance comparison of DSCs sensitized with N719 and the copper(I) dye is shown in Table 1.

Conclusion
Microscopic surface photovoltage and work-function measurements were performed on bare and dye-sensitized TiO 2 photoelectrodes using Kelvin probe force microscopy. Compared to a bare TiO 2 layer, the surface potential is about 150 mV higher for an N719 sensitized TiO 2 photoelectrode and about 180 mV lower for Cu-dye sensitized TiO 2 resulting in a 200 mV higher open-circuit voltage (V oc ) for a complete N719 DSC. We conclude that the surface dipole orientation is inverted for the two dyes and the V oc of a complete DSC increases with a higher surface potential. Consequently, we assume that the detected microscopic surface potential drops/inhomogeneities on both bare and sensitized TiO 2 photoelectrodes lead to a lower V oc and efficiency of the solar cell. The bandgap of 3.2 eV for anatase nanocrystalline TiO 2 particles was determined by SPV spectroscopy on different locations. It is constant throughout the TiO 2 layer and in agreement with literature values for bulk anatase. The measured SPV under sub-bandgap illumination is formed at the SnO 2 :F/TiO 2 interface due to the presence of a built-in electric field. According to our results, the interface barrier is around 250 mV. Its influence on the DSC performance is not resolved. In the case of dye-sensitized photoelectrodes, three different mechanisms contribute to the measured SPV. First, there is a contribution from the SnO 2 :F/TiO 2 interface, which forms a heterojunction. The band diagram at this heterojunction is still unclear; however, the influence on our measurements is expected to be negligible, and thus, we decided not to include it in this paper. Secondly, there is an SPV contribution from the nc-TiO 2 layer itself, and third, there is a reversible photochemical reaction of the dye molecule, which donates electrons under illumination and hence changes the surface potential. To our best knowledge, the measured SPV is not understood well enough to represent it generally in a band diagram without making major assumptions. Further studies are needed to clarify this point.

Experimental
Preparation of the photoanode A glass substrate coated with SnO 2 :F (TCO 22-7, Solaronix) was cleaned in an ultrasonic bath successively with acetone, ethanol, and distilled water and subsequently treated with UV/ ozone for 18 min (Model 42-220, Jelight Company). To study the SPV without a contribution from the SnO 2 :F/TiO 2 interface, TiO 2 layers were also prepared on uncoated glass substrates. A colloidal TiO 2 solution (Ti-Nanoxide T, Solaronix) consisting of anatase nanoparticles (≈20 nm) was deposited by doctor blading. A mask with an area of 25 mm 2 was defined with scotch tape. The TiO 2 layer was sintered with a heating plate for 30 min at 500 °C resulting in a layer thickness of about 10 μm.
For the preparation of sensitized TiO 2 , the photoanode was immersed in a sensitizer solution for 24 h after cooling it to 80 °C. The ruthenium dye solution consisted of a 1 mM ethanol solution of standard dye N719. The nc-TiO 2 was sensitized with the heteroleptic copper(I) dye shown in Figure 3 by using the procedure previously described, which involves an in situ assembly of the dye starting with the adsorbed anchoring ligand and the hexafluoridophosphate salt of the homoleptic complex [Cu(6-(2-thienyl)-2,2′-bipyridine) 2 ] + [43]. In order to remove weakly adsorbed contaminants, the sensitized TiO 2 was rinsed with ethanol and dried under nitrogen.
Kelvin probe force microscopy AFM measurements were carried out inside a glove box (labmaster 130, mBraun) maintaining a dry nitrogen atmosphere (<1 ppm H 2 O and <10 ppm O 2 ) on a commercial microscope (Solver PH-47, NT-MDT). Amplitude modulation (AM) KPFM was conducted with a two-scan method (lift mode) meaning that the topography and CPD were measured separately ( Figure 10). During the first line scan the topography was determined in tapping mode AFM using a bias voltage of V dc = 0 V applied to the tip. The cantilever oscillation amplitude was kept constant by a feedback controller at a setpoint, A sp , of 20 nm rms that was pre adjusted to 75% of the free vibrational amplitude, A 0 = 27 nm rms. The second scan was performed 20 nm above the previously obtained surface profile on the same scan line. While the sample was grounded, the dc and ac voltage were applied to the cantilever, V ac = 2 V at a frequency equal to its first resonance, f 1st . The X-component, X = A · cos(θ), of the electrically induced oscillation signal, which is proportional to the electrostatic force, F es , was phaseadjusted and retrieved with a lock-in amplifier and subsequently nullified by the applied dc voltage in the Kelvin feedback. Cantilever bending and vibration were optically detected with an infrared laser (λ = 1300 nm, 1 mW, spot size 50 × 50 μm 2 ) and a four-quadrant photodetector. To deduce the sample work function and monitor the integrity of the tip, a highly ordered pyrolytic graphite (HOPG) reference sample was measured before and after each measured specimen. The HOPG reference with a known work function of = 4.6 eV [65] was stored inside the glove box.

Microscopic photovoltage determination
A UV-lamp (360 nm, L18W/73, Osram) was used for superbandgap illumination. Trap and interface states were investigated under sub-bandgap illumination (λ > 385 nm) with LEDs (405 nm, 470 nm, 530 nm, 590 nm, Mightex Systems) or solid state lasers each mounted on a x-y-z positioning stage. A red laser (660 nm, 60 mW, LPM660-60C, Newport), a green laser (532 nm, 4 mW, Alpec), a violet laser (408 nm, 2.5 mW, Power Technology) and LEDs were applied for illumination from above at an angle of 10° with respect to the sample plane. The laser illumination was switched with a shutter (T132, Uniblitz). Laser light intensity was gradually reduced with different neutral density (ND) filters. Incident light intensity was measured at the sample location with a calibrated silicon photodetector (PD300-UV-SH, Ophir) and a power meter head (AN/2, Ophir). SPV spectroscopy was conducted on a commercial AFM (Dimension 3100, Bruker). The cantilever vibration was optically detected with a red laser (670 nm, 1 mW, spot size ≈ 40 × 40 μm 2 ), which partially hit the sample surface with an intensity of ≈100 μW. In order to avoid background illumination by the red laser, the spot was positioned on the cantilever center. The light of a xenon-arc lamp (300 W, model 6258, Newport) was focused onto the entrance slit of a grating monochromator (MS257, Newport) with a resolution of 5 nm in the range between 350-700 nm. The monochromatic light was coupled into an optical light guide (3 mm, 1.83 m, N A = 0.55, Edmund optics) which was connected to an optical microscope built-in within (inside) the AFM. Finally, the outcoming light of the optical microscope was focused onto the sample surface with a spot diameter of about 500 μm and a depth of focus of about 10 μm.

Photovoltaic characterisation of DSCs
I-V-curves were measured under an AM1.5G solar simulator (ABET) with an intensity of 100 mW/cm 2 and a controlled temperature of 25 °C. The voltage sweep was performed in 6 mV steps with a sampling rate of 1 Hz.