Introduction

The metal halide perovskite crystal structure with a chemical formula of ABX3 is constructed by the metal halide BX6 octahedron framework through X-site ion corner sharing, with the A-site cations filling the octahedron cavities1,2. As the supporting skeleton of perovskite, the BX6 octahedron mainly contributes to the electronic configuration and serves as the channel for photogenerated carriers transport, ensuring the superior semiconductor properties3,4. The unique crystal structure enabled perovskite solar cells (PSCs) to achieve a power conversion efficiency (PCE) of over 26%5,6,7,8, approaching that of mainstream silicon cells. However, the fragile octahedron is also primarily responsible for the instability issues of perovskite materials, which should be overcome before their commercialization9,10. It is known that the migration of an iodide ion along the edge of PbI6 octahedron has the lowest activation energy (Ea) among all types of ion migrations11,12,13, which is considered as the major factor limiting the stability of PSCs under realistic operation consideration2,11. In addition, mobile iodides in the octahedron are easily susceptible to oxidization into bimolecular iodine by photogenerated holes, which accelerate the perovskite degradation14. It eventually causes the generation of metal lead defects15, irreversible collapse of perovskites16,17 and rapid degradation of conductivity of charge transport layer18.

As with most crystalline materials, the degradation of perovskite is initialized from the fragile surfaces and grain boundaries, where the highest density of defects and serious ion diffusion exists19,20,21,22. Therefore, inhibiting the defects and mobile ion migration at the surface is the most effective way to improve the PSCs performance and long-term stability. Various molecular species have been adopted to suppress defect formation and ion migration either on the perovskite surface or at grain boundaries, such as ammonium-based salts, small organic molecules, polymers and other passivation agents2,21,23,24. In addition, numerous low-dimensional (LD) perovskites constructed by bulky organic cations have also been widely used to stabilize the perovskite surface through fixation of the PbI6 framework and inhibition of ion migration by steric hindrance24,25,26,27,28. In general, present strategies mainly focus on stabilizing the PbI6 octahedron structure through optimizing the bonding characteristics between octahedron and A-site cations, surface bond strength and dimension management3,17,29. These means still maintained the soft PbI6 octahedron surface, which may limit their stabilization effect on the perovskite film.

Here, we reported a type of lead iodide chelates PbI2(DMEDA) (DMEDA is bidentate ligands molecules N, N’-Dimethyl-1,2-ethanediamine) with an excellently robust chelated Pb octahedron framework and prepared them as the surface passivation agent on formamidinium lead iodide (FAPbI3) PSCs through in-situ reaction. The strong chelation between Pb and DMEDA effectively inhibit the iodide ion migration, reduction of Pb2+ ions and collapse of octahedron skeleton, leading to stabilize the perovskite surface. It also reduced the nonradiative recombination and adjusted the energy-level at the perovskite surface. As a result, the chelated Pb octahedron surface enabled our PSCs with a champion PCE of 25.7% and improved operational stability.

Results

Construction of chelated Pb octahedron surface

The concept of construction of chelated Pb octahedron surface (CPOS) on FAPbI3 perovskite is illustrated in Fig. 1a. As previous reports, the defective and soft perovskite surface is generally composed of nanocrystalline and/or amorphous perovskite and PbI28,30, which initializes the degradation of PSCs performance and stability19,20,21,22. After treating by DMEDA isopropanol (IPA) solution, the perovskite surface with soft PbI6 octahedron can be converted to a stable PbI2(DMEDA) layer with robust chelated Pb octahedron structure due to the strong chelation of DMEDA with Pb2+. To synthesize the PbI2(DMEDA), we added the DMEDA into FAPbI3 or PbI2 precursor solution, and found that the white precipitates generated (Fig. 1b and Supplementary Fig. 1). Then, the PbI2(DMEDA) single crystal can be prepared by redissolving the white precipitates powder (Fig. 1c, d) using antisolvent vapor-assisted crystallization method (Supplementary Fig. 2). The measured and simulated X-ray diffraction (XRD) patterns of PbI2(DMEDA) single crystal are shown in Fig. 1e and the crystal data are summarized in Supplementary Table 1. The crystal structure of PbI2(DMEDA) was determined by single-crystal XRD analysis, as shown in Fig. 1a and cif file. In comparation with PbI6 octahedron, the bidentate ligand DMEDA coordinates to Pb2+ to displace two iodide ions, forming a chelated Pb octahedron, which indicates the interaction of DMEDA with Pb2+ is stronger than that of I with Pb (Fig. 1a). We found that the chelated Pb octahedron framework endows the PbI2(DMEDA) exceptional intrinsic stability against thermal, atmospheric, and light stressors. The XRD results showed that there was no obvious impurity phase after continuous illumination of the PbI2(DMEDA) powder under 1-sun (AM1.5) intensity for 1000 h or heating for 500 h at 85 °C in ambient air (Supplementary Fig. 3).

Fig. 1: Fabrication diagram of chelated Pb octahedron surface and structural characterization.
figure 1

a A schematic illustration of construction of Pb octahedron surface (control, light green shading) and chelated Pb octahedron surface on FAPbI3 perovskite (CPOS, light orange shading). b Photo of the FAPbI3 solution (in DMF:DMSO, 1.6 M), the DMEDA solution, and a mixture of the DMEDA and the FAPbI3 solution. c, d Photos of (c) the PbI2(DMEDA) powder and (d) PbI2(DMEDA) single crystal. e Measured and simulated XRD of the PbI2(DMEDA) single crystal. f XRD of the control and CPOS films. g XPS spectra of C 1 s in control film and CPOS film. h HAADF cross-sectional images of the control and CPOS films. Scale bars, 50 nm. Source data are provided as a Source Data file.

Then, we experimentally demonstrated that the PbI2(DMEDA) layer can form through spin-coating the DMEDA IPA solution (100 mg mL−1) on the FAPbI3 perovskite film and PbI2 film without further annealing, according to the following chemical Eqs. (1) and (2):

$${{\rm{FAPbI}}}_{3}+{\rm{DMEDA}}\to {\rm{PbI}}_{2}({\rm{DMEDA}})+{\rm{FAI}}({\rm{dissolve}}\; {\rm{in}}\; {\rm{IPA}})$$
(1)
$${{\rm{PbI}}}_{2}+{\rm{DMEDA}}\to {{\rm{PbI}}}_{2}({\rm{DMEDA}})$$
(2)

This reaction yielded transparent white-colored PbI2(DMEDA) films, as shown in the photographs in Supplementary Fig. 4a and b and verified by XRD patterns (Supplementary Fig. 4c). Using the same method, a thin PbI2(DMEDA) layer can be generated on the surface of FAPbI3 perovskite films by reducing the concentration of DMEDA IPA solution (1.5 mg mL−1). We measured the scanning electron microscopy (SEM) and atomic force microscope (AFM) images of the control and CPOS films, as shown in Supplementary Fig. 5 and 6. Obviously, the DMEDA treatment induced the perovskite surface reconstruction and the formation of a thin layer with numerous small grains which should be the PbI2(DMEDA). The XRD spectra were measured, as shown in Fig. 1f. In the control film, we observed a main diffraction peak located at 13.9° assigned from the black phase of FAPbI3 and a small peak at 12.7° corresponding to PbI2. After treating by the DMEDA IPA solution, a small peak at 11.58° appeared, which was consistent with the characteristic peak of PbI2(DMEDA) while the PbI2 signal almost disappeared.

We performed X-ray photoemission spectroscopy (XPS) measurements to further characterize the perovskite surface composition (Fig. 1g). The C 1 s spectra in control film comprised two main peaks that are consistent with C-C or C-H (284.8 eV) and HC(NH2)2 (287.6 eV)31. The treatment decreased the signal intensity of HC(NH2)2 bonds from FA and increased the amount of C-C or C-H bonds from DMEDA. In addition, an obvious peak of C-N bond at around 286.1 eV from DMEDA appeared, further confirming the generation of PbI2(DMEDA) layer. In order to distinguish the two different layers, the cross-section of perovskite film was observed by high-resolution transmission electron microscopy (HRTEM) (Fig. 1h). In comparison with control film, a thin and compact PbI2(DMEDA) layer with a thickness of around 5 nm can be clearly distinguished on the CPOS film. The images obtained from high-angle annular dark-field (HAADF) scanning TEM and energy dispersive X-ray spectroscopy (EDS) showed that the PbI2(DMEDA) layer contained a slightly lower content of I atoms and higher content of N atoms as compared with the underlying perovskite layer (Supplementary Fig. 7).

Optoelectronic properties and performance of devices

We found that the PbI2(DMEDA) is a type of direct bandgap semiconductor with a wide bandgap energy of around 3 eV determined by the ultraviolet-visible (UV-vis) spectrum and density functional theory (DFT) calculation (Supplementary Fig. 8, 9). Thus, the PbI2(DMEDA) layer is expected to reduce nonradiative recombination and adjust the energy-level at the perovskite surface, which is analogous to the carrier-selective effect of silicon-based heterojunction (SHJ) solar cells32. The photoluminescence (PL) mapping measurements were performed in the 50 × 50 µm2 region to compare the fluorescence intensity (Fig. 2a, b). The PL intensity of CPOS film was uniform and significantly higher than that of control film. In the steady-state PL test, we confirmed that the CPOS film showed enhanced PL intensity. The PL emission peak at 812 nm of the control film was blue shifted to 810 nm in the CPOS film, indicating suppression of nonradiative recombination33 (Supplementary Fig. 10). The time-resolved PL (TRPL) measurements show that the lifetime of the perovskite increased from 1.6 µs for the control to 2.6 µs for the CPOS sample (Fig. 2c).

Fig. 2: Photoelectric properties of control and CPOS films.
figure 2

a, b PL mappings of (a) control and (b) CPOS films. c TRPL decay times of control and CPOS films. d, e KPFM images of perovskite (d) control and (e) CPOS films. Insets, corresponding AFM topography images. f Potential distribution of control and CPOS films. g Schematic diagrams of energy band alignments at the perovskite surface constructed from the UPS results. The PbI2(DMEDA) caused an upward band bending that favored hole extraction while blocked electrons. h J-V curves of HTLs-free devices with a structure of FTO/SnO2/perovskite (FAPbI3)/Au. Source data are provided as a Source Data file.

Kelvin probe force microscopy (KPFM) tests were carried out to investigate the surface potential of perovskite films. As shown in Fig. 2d, the work function (WF) of control film was 4.4 eV. In the CPOS film, it is observed that the WF was improved to 4.7 eV (Fig. 2e), and the potential distribution is slightly more uniform (Fig. 2f). It is believed that the improved surface potential in CPOS film is caused by the relatively high WF (5.0 eV) of PbI2(DMEDA) (Supplementary Fig. 11). Ultraviolet photoelectron spectroscopy (UPS) analysis was also performed to verify the trend of WF change (Supplementary Fig. 1214). As shown in Fig. 2g, the diagrams of energy band alignments at the perovskite surface constructed from the UPS results, implying that the PbI2(DMEDA) caused an upward band bending at the perovskite surface that favored hole extraction while blocked electrons. To test our hypothesis that the modulated energy band structure by PbI2(DMEDA) layer could achieve hole-selective contact and reduce the nonradiative recombination at the perovskite surface, we measured the performance of hole transporting layer (HTL) free device with a structure of FTO/SnO2/perovskite (FAPbI3)/Au. The CPOS device showed a much better efficiency of 14.3% compared with the control device with only 2.2% (Fig. 2h).

Next, we studied the passivation effect of PbI2(DMEDA) layer on the performance of completed devices with a conventional n-i-p structure of FTO/SnO2/perovskite/spiro-OMeTAD/Au (Fig. 3a). To achieve high performance, we used pure FAPbI3 perovskite as the light absorption layer with a narrow bandgap of 1.52 eV (Supplementary Fig. 15). The statistical box charts of the photovoltaic parameters of PSCs treated by various concentration are shown in Supplementary Fig. 16. The typical current density-voltage (J-V) curves of the optimized control and CPOS devices with forward (0–1.2 V) and reverse (1.2–0 V) scan modes are shown in Fig. 3b, and the detailed PV parameters are given in Supplementary Table 2. The champion PCE increased from 23.18% to 25.7% under reverse scan with the improvement of open-circuit voltage (VOC) from 1.136 V to 1.177 V, short circuit current density (JSC) from 25.71 mA cm−2 to 26.14 mA cm−2 and fill factor (FF) from 79.3% to 83.7%. The stabilized power output measured near the maximum power point (MPP) showed a stabilized PCE of 23% and 25.5% for the control and CPOS devices, respectively (Supplementary Fig. 17). The champion CPOS device achieved a certified efficiency of 25.04% at a third-party photovoltaic laboratory (Supplementary Fig. 18). Figure 3c shows the statistical distribution of the measured efficiency of the control and CPOS PSCs. The JSC of devices were verified with external quantum efficiency (EQE) measurements and the integrated JSC by the EQE over the AM 1.5 G standard spectrum were 25.23 mA cm−2 and 25.51 mA cm−2 for the control and CPOS PSCs, respectively (Fig. 3d). The light intensity dependent VOC of control and CPOS devices were measured, as shown in Fig. 3e. It is observed that the ideality factor decreased from 1.63 to 1.08, illustrating that the surface trap-assisted recombination is suppressed by the PbI2(DMEDA). We measured the trap state density within the control and CPOS films by the dark I–V curves of the hole-only devices (ITO/PEDOT:PSS/perovskite/spiro-OMeTAD/Au) using the space charge limited current (SCLC) technique (Fig. 3f). Based on the calculation results, the trap-state densities (Nt) decreased from 2.27 × 1015 cm−3 for the control to 1.16 × 1015 cm−3 for the CPOS device. We also fabricated the CPOS PSCs with a area of 1 cm2 and the champion device exhibited a PCE of 23.8% in reverse scan and 23.2% in forward scan (Supplementary Fig. 19). We further extended the passivation approach to the p-i-n device (FTO/NiO/SAMs/perovskite/C60/BCP/Ag) to verify its compatibility. As shown in Supplementary Fig. 20 and Supplementary Table 3, the CPOS device also demonstrated an improved VOC, FF and PCE due to the role of chemical passivation of PbI2(DMEDA).

Fig. 3: Device photovoltaic performance.
figure 3

a Schematic illustration of the studied CPOS devices. The PbI2(DMEDA) layer was in-situ formed on the perovskite surface. b J-V curves of control and CPOS devices under forward and reverse scan. c Efficiency distribution of control and CPOS devices. d EQE and integral JSC curves of control and CPOS devices. e Light intensity dependence of VOC for the control and CPOS devices. The ideality factor was calculated from the slope of the linear fit of the semilogarithmic plot. f Dark current-voltage measurements of the hole-only devices (ITO/PEDOT:PSS/perovskite/spiro-OMeTAD/Au). VTFL is the trap filled limit voltage. Source data are provided as a Source Data file.

Stabilization effect of chelated Pb octahedron surface

To explore the effect of PbI2(DMEDA) layer on the operational stability, we first tested the unencapsulated devices stability under AM1.5 G Sun illumination at MPP tracking in ambient air with around 20% humidity (Supplementary Fig. 21). The CPOS device maintained over 88% of its initial efficiency after 150 h, whereas the control device was seriously degraded with only maintaining initial 30%. The improvement can be attributed to the excellent stability of PbI2(DMEDA) against moisture, thus, the PbI2(DMEDA) as a compact surface can largely improve the resistance of underlying perovskite to water (Supplementary Fig. 22). Furthermore, we assessed the photostability of unsealed devices under continuous illumination at approximately 50 °C in N2 atmosphere. After MPP testing, the CPOS device sustained >90% of its initial performance after almost 1000 h while the control device rapidly degraded to 80% of its performance after 560 h (Fig. 4a). It is known that the main factor in the n-i-p device degradation is the I ion migration to doped HTLs under operation, which leads to rapid degradation in both hole conductivity and interfacial band alignment18,34,35. To probe the differences between control and CPOS device, we investigated the compositional distribution throughout the aged devices. According to the ToF-SIMS results (Fig. 4b and Supplementary Fig. 23), large accumulations of I- signal can be seen in the Au and spiro-OMeTAD layer for the control device due to the serious diffusion of I ions under operation. In comparison, the I ions concentration in the Au and spiro-OMeTAD of the CPOS device is approximately an order of magnitude lower than that of control device indicative of the suppressed I ion migration by PbI2(DMEDA) layer. In the thermal-stability test, we replace the spiro-OMeTAD with thermally stable PTAA. After aging at 85 °C in a nitrogen glovebox, the CPOS device retained 85% of the initial PCE after 530 h, while the control device decreased to 56% of its initial value, indicating that the PbI2(DMEDA) maintained its passivation effect for the device under elevated temperatures (Supplementary Fig. 24).

Fig. 4: Device stability tests and I ion migration analysis.
figure 4

a MPP tests of unsealed control and CPOS devices under N2 atmosphere at 50 ± 5 °C. b ToF-SIMS depth profiles of the I- signal of the control and CPOS PSCs after MPP tests. The yellow, green and orange shadings are corresponding to Au, HTL and perovskite layer, respectively. c Temperature-dependent conductivity measurements of the control and CPOS films. d Calculated formation energy of VI and energy barrier of I ion migration for the FAPbI3 (orange), PbI2 (green) and PbI2(DMEDA) (purple), respectively (Inserts are schematic diagram of ion migration pathways). Source data are provided as a Source Data file.

We measured the temperature dependent conductivity to calculate the I ion migration activation energy for the control and CPOS film by the Nernst-Einstein relation36:

$${\rm{\sigma }}{\rm{T}}={{\rm{\sigma }}}_{0}\exp \left(\frac{{-E}_{{\rm{a}}}}{{{\rm{k}}}_{{\rm{B}}}{\rm{T}}}\right)$$

where \({{\rm{\sigma }}}_{0}\) is a constant, kB is Boltzmann’s constant, \({\rm{\sigma }}\) is ionic conductivity, T is temperature, and \({E}_{\text{a}}\) is the ion-migration activation energy. We derived \({E}_{\text{a}}\) values of I ion migration from the slope of the ln(σT) versus 1/\({\rm{T}}\) of 0.35 eV for the control and 0.67 eV for the CPOS sample (Fig. 4c). We believe that the reduced I ion migration is closely related to the chelated Pb octahedron surface. Thus, the formation energies of iodine vacancies (VI) in different octahedron framework were first calculated by DFT. The results show the VI formation energy of PbI2(DMEDA) (1.48 eV) is higher compared to FAPbI3 (0.84 eV) and PbI2 (1.18 eV) (Fig. 4d). Then, we calculated the activation energies and simulated the pathways for I ion migration in the FAPbI3 (orange shading), PbI2 (green shading) and PbI2(DMEDA) (purple shading), which are shown in the inset of Fig. 4d. In the PbI6 octahedron type, the calculated activation energies are 0.25 eV for FAPbI3 and 0.39 eV for PbI2, respectively, which are close to previously reported values36,37. For the chelated Pb octahedron, the I ion migration activation energy of PbI2(DMEDA) is 1.23 eV, which is much larger than those of FAPbI3 and PbI2.

To further confirm the effect of chelation on the octahedron framework stability, we put the PbI2 and PbI2(DMEDA) films at 100 °C under 1 sun illumination in nitrogen environment. After 2 h aging, it can be seen visually that the PbI2 film was obviously blackened due to the formation of metal lead, while the PbI2(DMEDA) showed no obvious change (Supplementary Fig. 25). The peak position of metal Pb was detected in the XRD of aged PbI2, which is consistent with the previous literature20, but no Pb signal was found in aged PbI2(DMEDA) (Supplementary Fig. 26). In the SEM images, we observed the obvious pinholes in the aged PbI2 films due to the volatilization of I element while the PbI2(DMEDA) films almost remained the same after aging (Supplementary Fig. 27). Our results show that the strong chelation of DMEDA with Pb can largely hinder the I release and avoid the generation of metallic Pb.

Discussion

In conclusion, we reported a type of stable PbI2(DMEDA) and prepared them on the perovskite surface through a simple in-situ reaction to stabilize and passivate the underlying perovskite. We elucidated that its mechanism of stabilization is related to the strong interaction between Pb and DMEDA, resulting in the formation of robust chelated Pb octahedron. In comparison with the soft PbI6 octahedron surface, the chelated Pb octahedron surface inhibits the iodide ion migration, reduction of Pb2+ ions and collapse of underlying perovskite. And thanks to the reduced surface defects and modulated energy-level alignment by PbI2(DMEDA), the fabricated PSCs achieved a PCE as high as 25.7% and improved operational stability. Our works opened an effective surface skeleton engineering strategy for achieving stable and efficient FAPbI3 PSCs through reconstructing the flimsy PbI6 octahedron surface.

Methods

Materials

SnO2 colloid precursor (tin (IV) oxide, 15% in H2O colloidal dispersion) was purchased from Alfa Aesar. Dimethylformamide (DMF), acetonitrile (ACN), dimethyl sulfoxide (DMSO), acetonitrile, and chlorobenzene (CB) were purchased from Sigma-Aldrich. Bis(trifluoromethane) sulfonimide lithium salt (Li-TFSI), 4-tert-butylpyridine (tBP), formamidinium chloride (FACl), formamidinium iodide (FAI), 2,2’,7,7’-Tetrakis [N, N-di(4-methoxyphenyl) amino]−9,9′-spirobifluorene (spiro-OMeTAD) were purchased from Xi’an Polymer Light Technology in China. Lead iodide (PbI2) were purchased from TCI. N, N’-Dimethyl-1,2-ethanediamine (DMEDA) was purchased from Aladdin in China.

PbI2(DMEDA) powder synthesis and film preparation

For the PbI2(DMEDA) powder, 1.0 M FAPbI3 and 1.2 M PbI2 were dissolved in DMF by stirring at 60 °C for 2 h, respectively. The DMEDA was slowly added in either FAPbI3 or PbI2 solutions. Then, the white precipitates were generated and the solvent was removed by the vacuum suction filtration. Finally, the obtained white precipitates were washed by ethyl alcohol and dried in a vacuum oven for several hours under 100 °C. For the PbI2(DMEDA) film, PbI2(DMEDA) powder was dissolved in DMSO (0.2 M) and then spin-coated on the substrate at 1500 rpm for 30 s, and then annealed at 100 °C for 5 min.

PbI2(DMEDA) single crystal synthesis

The schematic diagram of PbI2(DMEDA) single crystal growth is shown in Supplementary Fig. S2. First, the PbI2(DMEDA) powder was dissolved in DMF solution (0.2 M) in a transparent bottle by stirring at 90 °C for 1 h. The bottle was put into a beaker with ethyl alcohol. The whole device was stored at 4 °C for 1 day until the small PbI2(DMEDA) single crystal showed up. A small crystal was selected and put into the bottle with fresh precursor to grow a larger PbI2(DMEDA) single crystal through repeating above process for several days.

Device fabrication

Fabrication of n-i-p PSCs: FTO glass was cleaned by detergent, deionized water, acetone and ethanol. Before use, the FTO was treated under ultraviolet ozone for 20 min. The SnO2 colloidal dispersion was diluted with deionized water and ammonia in a 1:4 volume ratio (2.67%) and added with 2 mg mL−1 RbCl38. Then the substrate was spin-coated with a thin layer of SnO2 nanoparticle film at 4000 rpm for 30 s, and then annealed at 180 °C for 30 min. Before spin coating perovskite, the substrate was treated by an ultraviolet ozone cleaner for 15 min. After that, 40 μL perovskite precursor solution (1.6 M FAPbI3 with 20 mol% FACl in DMF: DMSO (9:1) solvent, the precursor solutions were stirred at 60 °C for 2 h and filtered using a 0.22 polytetrafluoroethylene membrane before use) was spin coated on the SnO2 substrate at 1000 rpm for 10 s and 5000 rpm for 15 s. At 5 s from the last, 50 μL MACl IPA solution (4 mg mL−1) as an antisolvent was dropped onto the substrate. The film was annealed at 150 °C for 20 min, and followed by annealing at 100 °C for 10 min39. Then, 1.5 mg mL−1 DMEDA IPA solution was dynamically spin-coated on the perovskite at 4000 rpm to in-situ form a thin PbI2(DMEDA) layer. The above operations were carried out in the open ambient air environment with 20–30% relative humidity. After that, the spiro-OMeTAD (72.3 mg mL−1) with 17.5 μL Li-TFSI acetonitrile solution (520 mg mL−1) and 28 μL tBP was spin-coated on the perovskite film at 3000 rpm in N2 glovebox. For the thermal stability test, the PTAA solution (15 mg mL−1 in toluene) with 15 μL Li-TFSI acetonitrile solution (170 mg mL−1) and 5 μL tBP replaced the spiro-OMeTAD solution. Finally, 100 nm Au electrode was deposited by thermal evaporation. In case of the 1 cm2 size PSC, it was prepared under the same way as for the 0.07 cm2 cells.

Fabrication of p-i-n PSCs: A thin layer of NiOx (10 mg mL−1) and SAM (self-assembled monolayer) of Me-4PACz ([4-(3,6-dimethyl-9H-carbazol-9-yl) butyl]phosphonic acid, 1 mmol in methanol) were orderly spin-coated on FTO. 1.67 M perovskite (Cs0.05MA0.1FA0.85PbI3) precursor solution was spin-coated on the substrates at 1000 rpm for 10 s and 4000 rpm for 30 s, respectively. At the last 5 s of the second step, 150 μL anisole was dropped as antisolvent. The films were then annealed at 100 °C for 20 min40. Then, 0.8 mg mL−1 DMEDA IPA solution was dynamically spin-coated on the perovskite to in-situ form a thin PbI2(DMEDA) layer. 25 nm C60 and 7 nm BCP (bathocuproine) layers were prepared through thermal evaporation. Finally, 100 nm Ag electrode was evaporated by thermal evaporation.

Device characterization

For all devices, photovoltaic performance was measured by masking on the active area with a metal mask (0.07 cm2 for small size and 1 cm2 for a larger size). J-V curves were extracted with a source meter (Keithley 2400) and a solar simulator (Enlitech SS-X) with 100 mA cm−2 illumination (AM 1.5 G) and a calibrated silicon reference cell (Enlitech, KG2). The J-V measurements were carried out in N2 atmosphere with forward (0–1.3 V) and reverse (1.3–0 V) scan modes (voltage steps of 20 mV and a delay time of 10 ms) at room temperature (~25 °C). The EQE measurements were performed in ambient air at ~25 °C and ~35% relative humidity in the dark chamber using a PVE300-IVT210 system (Industrial Vision Technology (s) Pte Ltd) with monochromatic light focused on a device. The stability test at the continuous maximum power point tracking under 1 Sun illumination (LED lamp) for the unencapsulated PSCs was performed under air ambient (20% relative humidity) or inert atmosphere (N2). The KPFM were measured by Bruker Dimension Icon system in air. Electrical & Magnetic Lift Mode and Surface potential (AM-KPFM) mode were adopted. The drive frequency was 276 kHz. The voltage was applied to the tip, and the work function of the sample was given by φsample = φtip − eVCPD. VCPD was the contact potential difference between the tip and sample. The HOPG was used as a reference to calibrate the tip WF. The samples were coated on the highly conductive and clean ITO substrates. UPS and XPS measurements were performed by ThermoFisher Scientific. The XRD patterns of perovskite film, PbI2(DMEDA) powder were obtained by Empyrean. SEM images were obtained by using high-resolution cold field emission scanning electron microscopy (Regulus 8230). TEM images were measured by FEI Titan Themis. Variable temperature IV measurement was carried out by Lake Shore TTPX from 77K-300K. Steady-state PL and time-resolved PL spectra were measured by FLS1000 Series of Fluorescence Spectrometers with 470 nm pulse laser (100 J cm−2). All the films were deposited on glass. For PL mapping images, galvo-based scanner was extra equip. The integrated current densities of PSCs were measured by external quantum efficiency system (PVE300-IVT210) with the monitor range from 300–1180 nm. The depth distribution of iodine ions in perovskite devices was measured by ToF-SIMS spectra (IONTOF TOF-SIMS5). The samples were analyzed using a ToF-SIMS V instrument (IONTOF) with a Bi+ primary beam (30 keV and 1 pA) and Cs+ sputter beam (2 keV and 1 nA). The sputter size was 350 μm × 350 μm and the analysis areas were 100 μm × 100 μm (for depth profiling).

DFT calculations

First-principles calculations based on density functional theory (DFT) were carried out using the Vienna Ab initio Simulation Package (VASP). The generalized gradient approximation (GGA) of Perdew-Burke-Ernzerhof (PBE) functional was employed as the exchange-correlation functional. The plane-wave cutoff energy of 450 eV was used. We constructed a 2 × 2 × 2 FAPbI3 supercell, a 5-layer PbI2 supercell and an PbI2(DMEDA) single cell. An iodide vacancy (VI) was initially set in two neighboring positions of a PbI6 octahedron, corresponding to the defect in the initial and final structure, respectively. Initial and final structures were first optimized, then a linear interpolation consisting of 6 grid points between them were employed to define the migration process. The energy profiles were examined using climbing image nudged elastic band method (cl-NEB) and Limited-memory Broyden-Fletcher-Goldfarb-Shanno (LBFGS) energy minimization methods. For the calculation of bands and density of states, a 3 × 3 × 2 Г-centered k-point mesh was used for Brillouin-zone sampling and the energy convergence criteria were set to 10−8 eV·Å−1. For the simulation of defects formation energy (Ef), the Ef of iodide vacancies (VI) were calculated using the following formula:

$${{\rm{E}}}_{{\rm{f}}}={{\rm{E}}}_{{\rm{d}}}^{{\rm{q}}}-{{\rm{E}}}_{0}+\sum _{{\rm{i}}}{{\rm{n}}}_{{\rm{i}}}{{\rm{\mu }}}_{{\rm{i}}}+{\rm{q}}\left({{\rm{E}}}_{{\rm{F}}}+{{\rm{E}}}_{{\rm{VBM}}}\right)+{{\rm{E}}}_{{\rm{corr}}}$$

Here, \({{\rm{E}}}_{{\rm{d}}}^{{\rm{q}}}\) and \({{\rm{E}}}_{0}\) represent the energy of defected lattice with q charge state and energy of pristine lattice respectively. \({{\rm{n}}}_{{\rm{i}}}\) and \({{\rm{\mu }}}_{{\rm{i}}}\) are the number and chemical potential of the varied ions during the defect formation. \({\text{E}}_{\text{F}}\), \({\text{E}}_{\text{VBM}}\), \({\text{E}}_{\text{corr}}\) is the Fermi energy, energy of the valance-band maximum, and the energy correction due to finite supercell sizes.

Reporting summary

Further information on research design is available in the Nature Portfolio Reporting Summary linked to this article.