# An embedded interfacial network stabilizes inorganic CsPbI3 perovskite thin films

Julian Steele, Tom Braeckvelt, Vittal Prakasam, Giedrius Degutis, Haifeng Yuan, Handong Jin, Eduardo Solano, Pascal Puech, Shreya Basak, Maria Isabel Pintor-Monroy, et al.

<figure><img src="image_1.png" /></figure>

► To cite this version:

Julian Steele, Tom Braeckvelt, Vittal Prakasam, Giedrius Degutis, Haifeng Yuan, et al.. An embedded interfacial network stabilizes inorganic CsPbI3 perovskite thin films. Nature Communications, 2022, 13 (1), pp.7513. 10.1038/s41467-022-35255-9. hal-04806238

HAL Id: hal-04806238

https://hal.science/hal-04806238v1

Submitted on 21 May 2025

HAL is a multi-disciplinary open access
archive for the deposit and dissemination of sci-
entific research documents, whether they are pub-
lished or not. The documents may come from
teaching and research institutions in France or
abroad, or from public or private research centers.

L'archive ouverte pluridisciplinaire HAL, est
destinée au dépôt et à la diffusion de documents
scientifiques de niveau recherche, publiés ou non,
émanant des établissements d'enseignement et de
recherche français ou étrangers, des laboratoires
publics ou privés.

<figure><img src="image_2.png" /></figure>
<figure><img src="image_3.png" /></figure>

# An embedded interfacial network stabilizes inorganic CsPbI₃ perovskite thin films

Received: 20 August 2021

Accepted: 23 November 2022

Published online: 06 December 2022

<figure><img src="image_4.png" /></figure>

Check for updates

Julian A. Steele Ⓓ1,2,3荣, Tom Braeckewelt Ⓓ4,5, Vittal Prakasam¹, Giedrius Degutis¹, Haifeng Yuan Ⓓ5,6, Handong Jin Ⓓ5, Eduardo Solano Ⓓ7, Pascal Puech⁸, Shreya Basak Ⓓ9,10, Maria Isabel Pintor-Monrov⁹,10, Hans Van Gorp⁵, Guillaume Fleury¹, Ruo Xi Yang Ⓓ11, Zhenni Lin¹²,¹³, Haowei Huang¹, Elke Debroye Ⓓ5, Dmitry Chernyshov Ⓓ14, Bin Chen Ⓓ6, Mingyang Wei Ⓓ6, Yi Hou Ⓓ6, Robert Gehlhaar Ⓓ9, Jan Genoe Ⓓ9,10, Steven De Feyter Ⓓ5, Sven M. J. Rogge Ⓓ4, Aron Walsh Ⓓ15,16, Edward H. Sargent Ⓓ6, Peidong Yang Ⓓ2,12,13,17, Johan Hofkens⁵,¹⁸, Veronique Van Speybroeck Ⓓ4荣 & Maarten B. J. Roeffaers Ⓓ1荣

The black perovskite phase of CsPbI₃ is promising for optoelectronic applications; however, it is unstable under ambient conditions, transforming within minutes into an optically inactive yellow phase, a fact that has so far prevented its widespread adoption. Here we use coarse photolithography to embed a PbI₂-based interfacial microstructure into otherwise-unstable CsPbI₃ perovskite thin films and devices. Films fitted with a tessellating microgrid are rendered resistant to moisture-triggered decay and exhibit enhanced long-term stability of the black phase (beyond 2.5 years in a dry environment), due to increasing the phase transition energy barrier and limiting the spread of potential yellow phase formation to structurally isolated domains of the grid. This stabilizing effect is readily achieved at the device level, where unencapsulated CsPbI₃ perovskite photodetectors display ambient-stable operation. These findings provide insights into the nature of phase destabilization in emerging CsPbI₃ perovskite devices and demonstrate an effective stabilization procedure which is entirely orthogonal to existing approaches.

The technological progress and widespread adoption of high-efficiency organic-inorganic lead halide perovskite solar cells¹ are limited by their instability under ambient conditions²,³. The chemical volatility associated with the use of organic cations in methylammonium and formamidinium lead iodide perovskites is mitigated using Cs⁴, resulting in a chemically more stable all-inorganic CsPbI₃ perovskite, which is capable of making efficient solar cell devices⁵,⁶. At room temperature (RT), bulk CsPbI₃ forms a stable yellow non-perovskite crystal structure (δ) and requires temperatures above 320 °C to form a perovskite phase⁷ (α, β, and γ: Fig. 1a). When a bulk CsPbI₃ material is cooled from the high-

temperature α-phase, Pb-I-Pb bond angles distort to preserve a corner-sharing structure (-180°) before bond breaking occurs, restructuring into the δ-phase (-90°).

Under ambient conditions, exposure to atmospheric moisture is a central issue leading to phase destabilization of CsPbI₃ perovskite at room temperature. Unlike the chemical decomposition of organic-inorganic hybrid perovskites, H₂O molecules adsorb onto the CsPbI₃ surface and partially dissolve the halide anions⁸, creating vacancy defect sites that lower the phase transition energy barrier between the black γ-phase and the yellow δ-phase. Subsequently, changes in the relative humidity lead directly to an exponential increase in
<figure><img src="image_5.png" /></figure>

<figure><img src="image_6.png" /></figure>

<figure><img src="image_7.png" /></figure>

<figure><img src="image_8.png" /></figure>

**Fig. 1 | Phase transitions and lattice anchoring in CsPbI<sub>3</sub>**, a CsPbI<sub>3</sub> crystal phases represented as a general function of temperature and octahedral tilting (indicated using curved arrows). Pb atoms are in black, I in red, and Cs in blue. b Illustration of anchoring imposed by a microgrid introduced into a thin film. c Initial position of a molecular dynamics (MD) simulation of a 4 x 4 x 4 supercell with Γ anions at the bottom (circled in red) restrained by a harmonic bias potential, V(d) = Kd<sup>2</sup>, with

d being the distance from their initial position and the K the strength of the restraint. **d** Probability distributions (grey) and averages (white) of all θ<sub>z</sub> bond angles during the MD simulations as a function of K. The red line connecting the averages values is a guide for the eye. The effect of increasing K converges near 1000 kJ mol<sup>-1</sup> Å<sup>-2</sup>, which is the typical order of magnitude of covalently bonded atoms.

the vacancy concentration – rapidly increasing the yellow phase nucleation rate⁹. There are several ways to shift the phase energetics of CsPbI₃¹⁰ in favor of the perovskite phase at ambient conditions – without adjusting its composition – with lattice anchoring proving successful in several implementations: surface functionalization¹¹ and (nano)confinement¹²,¹³, as well as planar interface engineering¹⁴. Compared to the facile solution-processing methods which have made halide perovskites so appealing¹⁵, these approaches can complicate device designs, e.g., by either interrupting the bulk optoelectronic properties of the perovskite or by imposing limits on the high-temperature processing. After annealing a typical solution-processed CsPbI₃ thin film, strain is introduced into the perovskite crystal at the substrate interface due to a thermal expansion mismatch¹⁶, which improves the stability of the perovskite¹⁷ (Supplementary Note 1). The 2D interface itself will provide lattice anchoring sites which helps stabilize the perovskite phase, however, this effect remains limited to the planar region where the materials join. Unlike crystal strain which primarily shifts the relative formation energies of the competing phases¹⁶, lattice anchoring is expected to specifically raise the phase transition energy barrier¹⁰ and the two can be combined to secure a more ambient-stable perovskite structure.

Here we embed a 3D network of anchoring sites into CsPbI₃ thin films to bolster the interfacial effect throughout the film and reinforce the desired, functional, perovskite phase. We construct a

tessellating microgrid (Fig. 1b) to form isolated micrometer domains of perovskite and we form films made up of these regions. We employ photolithography¹⁸ to the pattern, using top-down (photo)thermal conversion of CsPbI₃ into local endogenous deposits of PbI₂. Beyond merely introducing a periodic lattice anchoring structure, the black-to-yellow phase transformation is shown to be a nucleation limited reaction and the overall stability of processed films is greatly enhanced by preventing the nucleation events from spreading beyond a single region of the grid. Compared to as-grown solution processed CsPbI₃ perovskite thin films (Supplementary Fig. 1), which complete their black-to-yellow phase transitions in under 10 hours within a dry environment (i.e. a strained black thin film acting as a control:¹⁶ see Supplementary Figs. 2 and 3), perovskite thin films embedded with a microgrid persist beyond 2.5 years when shielded from moisture. Using perovskite photodetectors as a conceptual demonstrator, we show how this approach offers a simple and effective strategy toward ambient processed and stable CsPbI₃ optical devices.

## Results

### Simulating the crystal structure under induced lattice anchoring

We begin with an examination of how lattice anchoring stabilizes the CsPbI₃ black phase by performing molecular dynamics (MD) simulations (expanded discussion on the computational and analytical approaches used can be found in the Supplementary Note 2).
Considering a 4 × 4 × 4 supercell of a slab with 4 layers of CsPbI3 (Supplementary Fig. 4), the Pb-I-Pb bond angles are separated in 3 groups; θx, θy, and θz. These are defined relative to the in-plane (x and y) restrictions applied to the anions during the MD simulation, and out-of-plane relaxation direction (z). Applying different degrees of planar restraint (Fig. 1c), the running average of the Pb-I-Pb bond angles (Supplementary Fig. 5) quickly decreases from 180° (an initial α-phase) to approximately 160° (γ-phase), forming varied distributions depending on the restraint. The simulated interface is found to predominantly impact out-of-plane bond angles (θz; Supplementary Fig. 6) and skew their distributions upward (Supplementary Fig. 7) with increasing restraint strength, K (Fig. 1d). To mimic lattice anchoring while strained due to a thermal expansion mismatch with the substrate, lattice vectors were further constrained to their value at annealing temperatures (600 K), relative to a simulated return to RT (300 K), showing that the angles increase for both the strained in-plane directions (θx and θy) and for the perpendicular, out-of-plane direction (θz; Supplementary Fig. 8). These findings indicate that, while anchored, additional bending energy is required to transform from the perovskite phase to the yellow δ-phase (Supplementary Fig. 9). For large K values, the effect resembles the epitaxial growth of metastable materials using substrates with different crystal symmetry and lattice constants, i.e., even though the restricted geometry of the first unit cell relaxes away from interface (Supplementary Fig. 10), the restraint is able to dictate the crystalline phase of the whole system.

## Photolithographic microprocessing for restructured phase-stable CsPbI3 perovskite films

We embed our PbI2-based interface into our thin films through controlled photo-thermal restructuring of the CsPbI3 and elucidate this process using a combination of in situ high-temperature grazing incidence wide-angle x-ray scattering (GIWAXS; Supplementary Fig. 11) and laser heating techniques (full details of the characterization approach are provided in the Supplementary Note 3). For the purely thermal process (Supplementary Figs. 12 and 13), the production of endogenous PbI2 begins near the yellow-to-black phase transition (320 °C) and continues for higher temperatures. Using focused 532 nm laser light which has an energy below the absorption edge of δ-CsPbI3 (Supplementary Fig. 14), prolonged exposure similarly heats the material and locally introduces chemical changes that can be resolved using Raman spectroscopy (Supplementary Fig. 15). In order of increasing radiation exposure, the laser-induced structural evolution is readily indexed via its unique Raman scattering signatures (Supplementary Fig. 16), where first endogenous deposits of PbI2 are formed and, at relatively high exposures, the material is ablated (Supplementary Fig. 17) to form PbO2. Notably, the intentional introduction of excess PbI2 has become routine for passivating deep traps in lead triiodide thin film devices¹⁹, rather than creating them. In relatively small, localized quantities (i.e. not permeating throughout the grain boundaries or pin holes of the polycrystalline film) the introduction of a well-defined PbI2 interface is expected to be relatively benign and not impact the optoelectronic properties of the perovskite film¹⁹,²⁰.

Next, we laser process micrometer-scale patterns into as-grown δ-CsPbI3 thin films (Supplementary Fig. 18) as a strategy for interface-driven stabilization within the enclosed area of the perovskite film; the full details of the approach can be found in the Supplementary Note 4. For our roughly 200 nm thick CsPbI3 films, the degree of structural ablation on the thin film surface is evaluated by height line scans taken across micro-processed tracks and, by regulating the laser power, photolithographic patterns are formed using a 458 nm laser power of 300 W/cm² (with a writing at 10 mm/s) without significantly oxidizing/abla ting the film surface (Supplementary Fig. 19). To elucidate the stabilizing effect of a micro-pattern at a local level, we fabricated an array of isolated 50 µm-squares across a film and recorded the

retention of black film within the pattern borders (Supplementary Fig. 20). Figure 2a displays a single fabricated 50 µm-square shortly after thermal quenching; within minutes, yellow phase nuclei appear and spread toward the patterned border and are stopped from propagating further by the barrier. Beyond 10 minutes, the interior is rendered an ambient-stable black phase while the non-patterned film turns yellow.

Beyond simple shapes, arbitrary photolithographic patterns also prove effective at stabilizing a black interior film following annealing (see the inset of Fig. 2b). Comparing to reference Raman scattering data (see Supplementary Figs. 21, 22, 23, and 24), the micro-Raman spectroscopy contained in Fig. 2b confirms the formation of an inner ambient-stable perovskite phase, enclosed by a PbI2-based barrier that borders an outer δ-phase film. The introduction of PbI2-like signals are further verified using GIWAXS (Supplementary Fig. 25), with the micro-Raman signal recorded from the micropatterned border resembling more an amorphous-PbI2 system²¹, rather than a crystalline one (see the Raman data catalog shown in Supplementary Fig. 16).

## Phase energetic mechanism of microgrid

Developing a technologically relevant solution, the impact of the laser processing footprint (-4 µm) on the final film must be considered. Using a 0.4NA objective to write, the upper limit of the footprint is -4 µm, i.e. the width of the embedded tracks directly measured via line-scans (Supplementary Fig. 19). Thus, the ratio of the remaining photo-active surface area to the microprocessed footprint (Supplementary Fig. 26) remains relatively high until the length of the grid squares approaches the same order of magnitude as the footprint. We subsequently chose to limit the smallest size of the microgrid to 40 µm, retaining about 75% of the optically active perovskite film area. We implement small-scale, tessellating grid patterns of varying sizes and examine the phase transform kinetics under an ambient atmosphere (example raw data and analytical approach are contained in Supplementary Note 5). Tracking the decay of black squares over time (Supplementary Fig. 27), we find that employing smaller grids renders the perovskite films more stable. For a constant temperature (T) and RH, the phase transformation kinetics (Fig. 2c) are modelled using the Johnson-Mehl-Avrami-Kolmogorov (JMAK) equation which describes the fraction of transformed perovskite, f, over time (t) via:

$$f(t) = 1 - \exp(-k.t^n) \quad (1)$$

Here n is a constant and k(T) is the thermally activated rate constant which is given by the product of the number of transformation attempts at a molecular level (k0) and the activation factor that depends on the activation energy (Eb) and the thermal energy (kBT; where kB is Boltzmann's constant), through k(T) = k0exp(-Eb/kBT). In this form, k absorbs both the phase nucleation and growth terms, with nucleation being sensitive to humidity in our case⁸. Constants n and k are determined by transforming Eq. (1) to yield a straight line with slope n and intercept ln(K) via:

$$\ln(-\ln[1 - f(t)]) = \ln(k) + n\ln(t) \quad (2)$$

Evaluating the phase transformation kinetics as a function of grid size, their corresponding Avrami plots (Supplementary Fig. 28) reveal two linear regimes during their transformations. These arise via two different mechanisms and at two different length scales across the stabilizing microgrid. Specifically, the 3D structure of the microgrid reinforces interfacial contact throughout the film, extending the nanometer scale in which the perovskite phase can interact and be anchored. This factor directly inhibits nucleation formation at the local level, i.e. within a single microgrid area. Conversely, at longer length (and time) scales, the microgrid partitions the film into structurally isolated domains, limiting the potential damage of each nucleation to a
<figure><img src="image_9.png" /></figure>

**Fig. 2** | Photolithographic patterning and long-term stability of micro-processed films. **a** Optical imaging of a microprocessed 50 µm square before and after thermally quenching, stored under an ambient atmosphere (42%RH). The darker regions indicate the black phase, while the growing lighter parts are areas of the film that have transitioned to the yellow non-perovskite phase. **b** Micro-Raman characterization of a phase-stable microprocessed area; micro-Raman spectra are recorded inside (black), outside (blue) and on the border (red) of the micro-processed area, with an optical image of this area and corresponding measurement points (circles) inset. The image scale bar represents 50 µm. The labeled vertical lines link the detected modes to their assigned chemical species. **c** Temporal stability of black thin films stored under ambient conditions (42–48%RH) and processed with the different grid sizes indicated. The trends (solid lines) are modeled

using the Johnson-Mehl-Avrami-Kolmogorov (JMAK) model, through Eq. (1). **d** The average transformation rate constant, *k*, over five samples as a function of micro-grid size, as derived from Avrami plots (see Supplementary Fig. 28). The error bars correspond to the upper and lower bounds of determined values. **e** Comparison of the long-term phase stability of an as-grown film (red) stored in a glovebox with films installed with a 40 µm grid and stored under dry (black) and ambient, unregulated (blue) environments. Circle markers indicate the average fraction of surviving black-phase squares of five samples each with their upper and lower limits depicted by the solid fill region. The blue broken vertical line indicates where the ambient study was stopped due to moisture damage (Supplementary Fig. 31).

single grid area. These two factors govern the different regimes identified in the Avrami plots (Supplementary Fig. 28), and work together to enable long-term stability. For instance, in regime I, yellow phase nuclei seed and spread, and follow the evolution of the as-grown thin film. In regime II, further expansion of the yellow phase is prevented and the reaction becomes nucleation limited.

We subsequently determine the reaction rate constants over regime II as a function of the grid size and present the findings in Fig. 2d. Given that the Avrami exponent (*n*) also declines with smaller grid sizes (Supplementary Fig. 28), the interdependence of *k* and *n* complicates a direct comparison of the transformation rate values calculated²². Although, a reduction in *n* does agree with our ab initio calculations and suggests that the transformation mechanism itself is interrupted and, importantly, suppressed.

The stabilizing effect of smaller microgrids infers that *E*<sub>b</sub> increases (Fig. 2d), however, the exact functional relating the transformation barrier height to the grid size is unclear (it will depend on factors like intra-granular transmission and film thickness). Additional non-local phase behavior is captured using in situ optical microscopy of different size grids after cooling from the high-temperature perovskites

phase and storing the microgrid film in an ambient environment (see Supplementary Fig. 29). In particular, portions of the polycrystalline film outside of the enclosed microgridded area are also observed to have their phase decay rate slowed. Shortly after returning the CsPbI<sub>3</sub> film to room temperature, micropatterning is seen to interrupt normal phase decay and delays the yellow phase transition for regions of the film connected through a continuous spread of black phase, up to millimeters away from the microgrid outer walls. This distance encompasses hundreds of individual grains in the film; structural coherence at this scale is impossible, making their coordination intriguing (Supplementary Fig. 29).

Black-to-yellow-phase formation imposes a ~7% drop in the crystal volume²³ (per formula unit) and a reorganization of the atomic structure at the perovskite/substrate interface¹⁶. Like dominos, the abrupt change in nanograin volume and structure explains the lateral knock-on effect observed between grains at the thin film-level²⁴,²⁵. Conversely, neighboring black grains will pack to form an ensemble experiencing long-range interfacial forces²⁶ which help by elevating the stability of all connected perovskite grains. Embedding a 3D microgrid is suggested to strengthen this collective phase phenomenon by
<figure><img src="image_10.png" /><figcaption>**Fig. 3** | Scaling photolithography and probing of microgrid interface. a Image of graphic encoded into a microgrid thin film using selective laser destabilization. b Photograph of an ambient-stable microgrid (40 µm) thin film after annealing. c Confocal fluorescence micrograph of a processed CsPbI₃ perovskite thin film (488 nm excitation/695–705 nm detection). A representative full PL spectrum is shown in the inset and acts as the color scale of the fluorescence image. d GIWAXS</figcaption></figure>

intensity of (200) γ-CsPbI₃ scattering planes measured with and without a microgrid, as a function of azimuthal angle (χ) in the *q*<sub>z</sub> vs *q*<sub>x,y</sub> image of reciprocal space. For simplicity, the missing wedge is overlooked (Supplementary Fig. 39) to better resolve the unique contributions arising from Texture 2, i.e. the inset illustrates the angle χ relative to the 2D x-ray detector. e Illustrations of the anisotropic origins of Textures 1 and 2.

introducing a periodic anchoring structure on a functional length scale, i.e., tens of microns in this case.

**Long-term stability and embedded interfacial microstructure**

Keeping with small-scale 40 µm grid patterns, the long-term phase stability of microprocessed perovskite thin films is evaluated over the course of several months to years. While the half-life ambient stability of as-grown films is roughly 10 minutes (Supplementary Fig. 3), the introduction of a microgrid (Supplementary Fig. 30) extends this to over 100 days (Fig. 2e). The enhanced stability exhibited here within the microprocessed area is substantial compared to substrate strain-induced stabilization alone¹⁶ (Supplementary Fig. 2) and is directly attributable to the microgrid. Notably, after the saturation of yellow-phase nucleation sites (which is accelerated by ambient water⁸) and an initial decrease in black phase (regime I), the majority of perovskite grains near the center of the squares survive a moisture-rich environment during this time (regime II). This highlights the non-local nature of the embedded interface, which boosts moisture resistance many tens of microns across the thin film. Notably, the stability test was eventually stopped due to observation of widespread water damage across the film (Supplementary Fig. 31).

Long-term phase stability experiments were also conducted (Supplementary Fig. 32) on equivalent microprocessed thin films shielded from ambient moisture (Fig. 2e); after an initial drop of ~4% in the first 5 days, processed films retain up to ~95% of the black phase at 120 days and up to ~75% beyond 2.5 years. This enhancement in stability is directly attributable to the shifted phase energetics within the enclosed microgrid and the lattice anchoring mechanism prescribed above. Additional experiments revealed that important parameters

like the choice of substrate (Supplementary Fig. 33) and the thin film thickness (Supplementary Fig. 34) did not significantly diminish the stabilizing effect of the microgrid. Furthermore, thermal- and photo-stability tests (Supplementary Fig. 35) of the processed films showed good resistance to these important stresses over the course of a few days.

In contrast to as-grown films, which are vulnerable to the spread of a single yellow-phase nucleation event, the restricted connectivity across the gridded polycrystalline network limits the impact of each nucleus and is a key contributor toward realizing long-term stable devices. To explicate this feature, laser-triggered nucleation is used to induce yellow phase formation in selected squares of a stable perovskite microgrid (Supplementary Fig. 36). Spreading out from an initial nucleation site, the growing yellow phase reaches its first border wall near 1 minute and is prevented from propagating further. This confirms the absence of physical continuity between neighboring domains, which effectively blocks structural crosstalk. Fig 3a shows how selective laser-nucleation is used to control the phase of targeted perovskites squares, to generate a pixelated image.

Increasing the size of the patterned area easily scales the process to stabilize whole films (Fig. 3b). The optical properties of the stable perovskite surface are found to remain intact across the processed thin film (Fig. 3c and Supplementary Fig. 37) and a common γ-CsPbI₃ polycrystalline structure is preserved and no additional strain¹⁶ is introduced (Supplementary Fig. 38). However, 2D x-ray scattering images reveal the subtle restructuring of the perovskite crystal when it interfaces with the embedded grid (Supplementary Fig. 39). The normal polycrystalline thin film texture²⁶ (i.e. the direction and distribution of oriented grains in the film; Supplementary Fig. 40 and 41) is altered by the microgrid, confirming additional anisotropy in the
<figure><img src="image_11.png" /><figcaption>**Fig. 4 | An embedded microgrid stabilizes CsPbI₃ perovskite photodetectors.**</figcaption></figure>

a Schematic illustration of device architecture with a scanning electron microscopy (SEM) image of the active perovskite layer with an embedded 40 µm microgrid. This inverted p-i-n type device architecture was chosen with indium tin oxide(ITO)/NiOₓ acting as the anode and the phenyl-C 61-butyric acid methyl ester/bathocaproine (PCBM/BCP) layers acting as the cathode. b photograph (after first 24 h of ambient

storage; scale bar represents 3 mm) of unencapsulated CsPbI₃ photodetector devices stabilized by integrating a microgrid into a selected portion of the photo-active perovskite layer. c Tracking of effective quantum efficiency (EQE) spectra over 7 days for devices fabricated with and without the microgrid. d Figures of merit (operating at 690 nm and -0.5 V): EQE, responsivity (R) and specific detectivity (D*) of devices operating in an ambient environment (45-50% RH) for one week.

system. Taking the (200) peak as an example to make the point, Fig. 3d shows how the smooth distribution of the as-grown film (Texture 1) departs when the microgrid is introduced (Texture 2), appearing more irregular, although always superimposing and amplifying regions of Texture 1. These hot spots confirm the presence of a 3D interface throughout the grid (Fig. 3e). Considering the relative intensity of the two texture components, a quantitative analysis (Supplementary Fig. 42) decouples the relative scattering volume from which they originate. We find that at least one third of the film grains are influenced by the anisotropy imposed by the microgrid and, assuming grains bordering the microgrid are most influenced, this suggests grains located far away from the boundary are also driven to express Texture 2. The embedded interface realized via the photolithography is the origin of the added anisotropy, leading directly to the strong stabilizing effect outlined above.

## Thin film devices stabilized using a microgrid

Thermal processing of the CsPbI₃ perovskite layer (>320 °C) imposes limits on the choice of hole transport layers which can be used in optoelectronic devices based on this material, motivating the use of thermally robust inorganic oxide compounds, like NiOₓ. As a conceptual demonstrator, our microgrid technique is compatible with planar heterojunction devices and we find stabilizing otherwise-unstable CsPbI₃ thin film devices is realized by simply laser patterning after spin coating the CsPbI₃ layer and before annealing, keeping all other processing steps the same (details of the device fabrication are provided in the Supplementary Note 8). Figure 4a and b depict how this approach is translated into working, ambient stable CsPbI₃-based perovskite photodetectors, with a comparison of device metrics across multiple batches of films shown in Supplementary Table 1. Once

integrated, the endogenous, all-inorganic nature of the microgrid imposes no added restrictions on device fabrication. The performance of unencapsulated photodetector devices fabricated with and without a microgrid was tracked for one week (Supplementary Fig. 43). Devices based on as-grown films exhibit rapid phase decay within the first day of ambient operation; in this time, the external quantum efficiency (EQE) spectrum shifts from the broad, characteristic response of the black CsPbI₃ perovskite phase to a narrow response, indicative of the large bandgap yellow-phase (Fig. 4c). In comparison, the EQE spectrum recorded from devices fitted with a microgrid remains relatively stable, translating into stable figures of merit (Fig. 4d) and the device yields relatively fast response time under pulsed excitation (rise/fall times of -2 µs; Supplementary Fig. 44). Additional device characterization was carried out under different light intensities and varied external bias (Supplementary Fig. 45, 46 and 47). We further demonstrate that this stabilization approach is compatible with mixed halide perovskite devices (Supplementary Fig. 48) and that shielding CsPbI₃ photodetectors from ambient moisture (Supplementary Fig. 49) further enhances their operational stability. The latter is considered analogous to shielding the device from moisture via encapsulation.

## Discussion

Next we contextualize our stabilization approach and device performance results (Fig. 4) with respect to the current state of the art. First, the use of a stabilizing microgrid allows us to retain the bulk properties of CsPbI₃ which are desirable for efficient optoelectronic devices, i.e., an unchanged bandgap energy and intrinsic, bulk carrier transport. This is a key distinction when comparing our approach to those reported previously. For example, common scalable stabilization methods²⁷ like reducing the crystal dimensionality (nanocrystals/
quantum dots), altering the composition, or capping the crystal surface¹¹ (i.e. ligands, PMMA, etc.), inherently disrupt the bulk optoelectronic properties of CsPbI₃ perovskite in the film. Subsequently, considering the vast processing options available²⁸, the figures of merit of different APbI₃-based photodetector architectures vary significantly²⁹. This is because certain design choices will influence aspects of performance differently, i.e. the use of thicker active perovskite layers will increase the responsivity at the expense of limiting the temporal response (rise/fall time). As such, tradeoffs must be made when designing the intended function.

While the responsivity of our photodetector devices (R) are only modest compared to current perovskite-based designs and performance, once the capability of detecting low-level light signals is considered, the specific directivity (D*) becomes comparable to modern perovskite-based devices²⁹. Importantly, our devices exhibit a fast temporal response (rise and fall times of ~2 µs), which nears the state-of-the-art response times for APbI₃-based devices³⁰. We ascribe this to the preservation of bulk carrier transport³¹ and relatively thin film thickness (~200 nm) within our devices. On the other hand, the operational stability of our unencapsulated and pure CsPbI₃-based devices in Fig. 4d is relatively stable (T₈₀ ~150 h). There are a limited number of reports outlining unencapsulated CsPbI₃ devices which do not possess some form of crystal surface modification (e.g. functional ligands or PMMA crystal capping), to shield them from the effects of ambient moisture. Within this context, the stability of our unencapsulated CsPbI₃ perovskite devices fashioned using a generic solution processing approach is particularly novel²⁸. Notably, once moisture is shielded and/or the phase is reinforced through mild halide mixing (CsPbI₂.₇₅Br₀.₂₅; see Supplementary Fig. 48), we find no detectable drop in device performance over 7 days of testing. With respect to the other stabilization approaches used to arrive at functional forms of black CsPbI₃ thin films²⁷, our strategy is expected to be entirely orthogonal to current options. Further, we anticipate that they can be effectively combined for superior long-term material stability and device operation.

In conclusion, we have presented an effective strategy for embedding an interfacial microstructure (a PbI₂ microgrid) into stable CsPbI₃ perovskite thin films and devices, using a coarse photolithographic approach. The microgrid is shown to dramatically increase the long-term stability of black CsPbI₃ thin films (beyond 2.5 years in a dry environment) by increasing the phase transition energy barrier (E<sub>b</sub>) and limiting the spread of potential yellow phase formation to a single, isolated domain of the grid. Using stabilized photodetectors, integration of a microgrid into normally unstable planar CsPbI₃ perovskite devices is shown to be a simple and effective strategy toward stable ambient operation.

## Methods

### Materials preparation

Perovskite thin films: Cesium iodide (CsI, 99.9%) was purchased from Fisher Scientific. Lead iodide (PbI₂, 99.9%), lead bromide (PbBr₂, 99.9%), anhydrous dimethyl sulfoxide (DMSO) and gamma-Butyrolactone (GBL) were purchased from Sigma-Aldrich. The perovskite precursor powders were weighed and treated at 80 °C under vacuum in a vacuum oven for 2 h to remove any trapped moisture before use. Phenyl-C61-butyric acid methyl ester (PCBM, 99%) and Bathocaproine (BCP, 99%) were purchased from TCI chemicals and used as received. The perovskite precursor solutions were prepared by dissolving equimolar ratios of CsI and PbI₂ in a DMSO:GBL (4:1, v-v) solvent mixture to result in precursor solutions with molar concentration ranging from 0.8 M to 1.5 M. In case of the Br doped perovskite, the ratio of PbI₂/PbBr₂ was varied accordingly. The precursor solutions were then stirred at 60 °C for 12 hrs. PCBM was dissolved in 1,2-dichlorobenzene (99%) at 25 mg/ml concentration and BCP was dissolved in methanol (99.9%) at 2 mg/ml concentration and stirred at

60 °C for 4 hrs. All the solutions were filtered using a 0.2 µm PTFE (polytetrafluoroethylene) filter before use. Thin films were spin-coated in a nitrogen glove box on targeted substrates at 1500 rpm for 30 s and 3000 rpm for 60 s. The film was then transferred onto a hotplate for annealing at 160 °C for 60 s. The resultant film thickness varied between approximately 150 to 350 nm, depending on the concentration of the precursor.

Bulk CsPbI₃ materials were similarly synthesized, whereby crystallization took place in a static environment on glass substrates (i.e. drop cast).

Thermally quenched samples were placed on a hotplate under nitrogen gas flow for 1 minute to fully transition the CsPbI₃ material black, then removed and placed immediately onto a RT piece of metal, to rapidly cool it. The materials were exposed to an ambient atmosphere during the cooling and subsequent study, unless specified otherwise.

CsPbI₃ thin-film thickness series: For the thickness series, 0.8 M, 1 M, 1.2 M & 1.5 M CsPbI₃ precursor solutions were spin-coated on ITO coated glass substrates to result in 150 nm, 220 nm, 280 nm & 330 nm thick CsPbI₃ films, respectively, under same spin conditions described above. The substrates were then transferred to the home-built laser patterning system and 40 µm microgrids were patterned (over 2 × 2 cm² area) on the perovskite layer as described elsewhere in the manuscript (RH ~ 40%). The substrates were then annealed at 320 °C for 2 mins to transform from the yellow to black phase. The substrates were then stored under ambient conditions (RH ~ 40%) for weeks and photographed every day.

Amorphous PbI₂: Amorphous lead iodide (a-PbI₂) films were spin-coated under nitrogen atmosphere (glovebox) from a 1 M solution of PbI₂ in N,N-dimethylformamide (DMF) and dried at 70 °C for 1 min.

Photodetector Fabrication: Glass substrates with patterned indium tin oxide (ITO) layer purchased from Naranjo B.V. were sequentially washed with soap (2% Hellmanex III), deionized water, acetone and isopropanol in an ultrasonic bath for 30 mins each step and dried in an oven. The substrates were treated with UV-ozone for 60 minutes prior to film deposition. The ITO substrates were then sputtered with a metallic Ni layer using a Balzers BAE 370 sputter coater and annealed at 300 °C for 1 h to result in a ~25 nm NiOₓ layer. The NiOₓ layer was then treated with UV-ozone for 30 minutes prior to perovskite deposition. Afterwards, the perovskite precursors were spin-coated at 4000 rpm for 60 s and left undisturbed (RH 25%) for 1 h to promote uniform crystal growth as described elsewhere³². The films were then annealed at 160 °C for 2 minutes to complete the film formation. For the devices, a 1 M concentration CsPbI₃ or CsPbI₂.₇₅Br₀.₂₅ precursor solution was used to result in ~220 nm CsPbI₃ or CsPbI₂.₇₅Br₀.₂₅ film, respectively. The substrates were then transferred to the home-built laser patterning system and 40 µm² microgrids were patterned on the perovskite layer as described elsewhere in the manuscript (RH ~ 40%). The substrates were then annealed at 320 °C for 2 mins to transform from the yellow to black (α) phase. The PCBM layer was then spin-coated at 1000 rpm and annealed at 100 °C for 30 mins to result in a ~25 nm film. The BCP layer was then spin-coated at 4000 rpm and annealed at 100 °C for 2 mins to result in <5 nm film. Finally, the substrates were transferred into a Balzers thermal evaporator where the gold (100 nm) cathode was deposited through a shadow mask at a vacuum pressure of <3 × 10⁻⁵ mbar. The active area of the devices was 6 mm × 2.5 mm. The substrates were then stored under ambient conditions for the rest of the measurements unless indicated otherwise.

### Characterizations

Photodetector Characterization: Dark-current and photo-current under white light were measured using a Keithley 2602A Source-Measure unit and a Abet solar simulator under 100 mW/cm² (1 sun)
simulated AM 1.5 G illumination. The scan was between -0.5 V to 0.5 V at a step rate of 1 V/s and a step size of 0.01 V.

EQE measurements were performed using a Bentham PVE300 spectral response system, with a Xenon/Quartz halogen lamp and a Bentham TMc300 single monochromator with a step size of 10 nm. Measurements were calibrated using a Si photodiode. Responsivity is calculated from the EQE values, as in equation:

$$R = \frac{e}{hc/\lambda} \times \text{EQE} \qquad (3)$$

where e is the electron charge, h is Planck's constant, c is the speed of light, and λ is the incoming wavelength.

Specific detectivity, the ability of a device to detect weak signals in the presence of noise and is determined by the device responsivity and the noise current, or noise equivalent power (NEP), as $D^* = \sqrt{(A\Delta f)/NEP}$. Assuming that shot noise is the main contributor to the NEP in dark conditions, and that the contributions of Johnson and flick noise are insignificant, $D^*$ is defined as:

$$D^* = R/(2eJ_{\text{dark}})^{1/2} (\text{cmHz}^{1/2}\text{W}^{-1}) \qquad (4)$$

where $J_{\text{dark}}$ is the dark current density of the device. EQE values are obtained for a wavelength range from 350 to 750 nm, and EQE, R and $D^*$ tracking are plotted for a wavelength of 680 nm. In both cases, the devices were biased at -0.5 V. The measurements were performed under ambient conditions at a RH level between 45-50%, unless indicated otherwise.

A PAIOS Fluxim system with LED was used to measure the rise and decay time and the capacitance of the devices. The pulsed J-V characteristics were measured from 2 V to -1 V with 50 ms, 1 ms, and 25 ms as the pulse length, rise time, and measurement time, respectively.

The measurements were averaged over 3 runs with a sweep offset voltage ranging from 0 V to -1 V in steps of -0.1 V.

Scanning Electron Microscopy (SEM): SEM characterizations on the samples were carried out with a FEI Quanta FEG-250 SEM. An acceleration voltage of 2 or 5 kV was applied during the measurements to reduce charging on the sample surface.

Synchrotron-based Grazing Incidence Wide Angle X-ray Scattering (GIWAXS): The GIWAXS data were collected at two different synchrotron light sources, using comparable wavelengths.

European Synchrotron Radiation Facility (SERF): The in situ GIWAXS data were collected at BM01 (SNBL/ESRF in Grenoble, France) using the PILATUS@SNBL diffractometer³³. The monochromatic beam (λ = 0.95774 Å) and the parameters of the detector were calibrated on LaB₆ powder using PyFAI³⁴. The obtained calibrations were implemented to Bubble for further azimuthal integration of 2D images. The resulting unit cell models were refined using the Le Bail method in Fullprof³⁵. The sample was positioned parallel to the synchrotron beam, and optimal angle with a pronounced diffraction pattern was fixed for further variable temperature measurements. The temperature on the sample was changed using the nitrogen hot blower, calibrated using the dependence of silver unit cell parameters, and preliminarily measured at the sample position.

ALBA Synchrotron: Room temperature GIWAXS of CsPbI₃ thin films were recorded at NCD-SWEET beamline (ALBA synchrotron in Cerdanyola del Vallès, Spain) with a monochromatic (λ = 0.95764 Å) X-ray beam of 80 × 30 µm² [H × V], using a Si (111) channel cut monochromator. The scattered signal was recorded using a Rayonix LX255-HS area detector placed at 241.1 mm from the sample position. The reciprocal q-space and sample-to-detector distance were calculated using Cr₂O₃ as calibrant. An incident angle (αᵢ) of 1° was chosen to ensure full penetration of the X-ray beam through the layer. Continuous

$N_2$ flow over the sample was employed during the measurements. Collected 2D images were azimuthally integrated using PyFAI³⁴.

Raman scattering experiments: Raman spectra recorded using 532 nm excitation (laser power 15 mW) were acquired on a Labram-HR Evolution intrument from Jobin-Yvon-Horiba company. A neutral density (ND) filter wheel was used to control the indicant power and the laser light was focused using a ×40 long working distance (LWD) objective. At 785 nm, XPlora (from the Jobin-Yvon-Horiba company) spectrometer with a the laser power of 0.4 mW is used with an LWD objective of ×50. For high-temperature measurements, the CsPbI₃ material inside a heating stage (HFS600, Linkam) is connected to a temperature controller. The sample was heated between 25 °C and 330 °C with spectra recorded at different stages of the ramp. For each measurement, an exposure time of 1 minute was used.

DFT calculations of Raman spectra: The second-order atomic force constants and associated phonon eigenvectors and eigenvalues were obtained from first-principles lattice dynamics using the crystal structures and technical setup reported elsewhere³⁶. The total energy and forces were computed for both the yellow non-perovskite δ-CsPbI₃ and the black γ-CsPbI₃ perovskite phases, using density functional theory (DFT) via the PBEsol functional in VASP³⁷ and with the phonons processed using Phonopy³⁸. The k-points are converged at 8 × 8 × 8 and 8 × 10 × 8 with Monkhorst-Pack grid for the γ-phase and δ-phase, respectively. The converged cut-off energy is 600 eV and the total energy convergence threshold is 1 × 10⁻⁶ eV. The Raman intensities were calculated using the SpectroscopPy toolkit available from https://github.com/JMSkelton/Phonopy-Spectroscopy. Note that for a perovskite cubic perovskite, no first-order Raman is expected. Due to dynamic structural fluctuations, it is often observed in practice as the local structure in fact is closer to the orthorhombic phase with strong local octahedral tilting and atomic displacements from the cubic parent structure.

Photoluminescence (PL) microscopy: PL spectral mapping over the sample was carried out on a home-built inverted optical microscope (Ti-U, Nikon) in a confocal mode. An air objective of 0.92 NA and 60× magnification was used. A 532 nm diode laser was used as the excitation light source. The excitation power density was regulated with a set of neutral density filters. A pair of half- and quarter-wave plates was used for converting the linear-polarized laser light into circular-polarized for excitation. A 545 nm long-pass filter was used in front of the entrance of the spectrograph. A piezostage was used for sample scanning.

Confocal Fluorescence Microscopy: Confocal fluorescence micrographs were acquired on an inverted epi-fluorescence confocal microscope (Olympus IX81), λexc = 488 nm, equipped with an air immersion objective lens (Olympus, 40×, 0.9 NA). Detection of fluorescence emission (λ = 780-800 nm) was done with a PMT and pixel dwell time of 20 µs. The images collected have fields of view of 158.72 × 158.72 µm² with a pixel size of 248 × 248 nm², which was zoomed in with a ×2 magnification. Multiple images were taken at several focus planes and processed using ImageJ to obtain the average projection of the fluorescence signal. Background intensity was corrected by thresholding using ImageJ to remove signal contributed by the background.

Optical Absorption: Diffuse reflectance spectra (DRS) were recorded in the wavelength range between 300 nm to 950 nm with a Perkin Elmer Lambda 950 UV-Vis spectrophotometer. As reference, BaSO₄ powder was used. The diffused reflectance (R) was converted to function F(R), which is proportional to the rate between absorption and scattering, using the Kubelka-Munk function:

$$F(R) = \frac{(1 - R)^2}{2R} \qquad (5)$$

Emission lifetime imaging: Fluorescence lifetime microscopy was performed at room temperature using an inverted-type scanning
confocal microscope (Leica TCS SP8 SMD) with a 10x air objective (Olympus), supported by PicoQuant Symphotime software. A 470 nm pulsed diode laser (PicoQuant PDL 800-B) was used for excitation with a repetition frequency of 20 MHz. The emission detection window was set at 650–750 nm.

The recorded emission lifetimes appear as a superposition of multiple radiative transitions. The decay of all emission signals presented in the main text are analysed within a framework of summing the exponential decays of multiple decaying components relative to the time of excitation ($t_0$), with differing decay constants ($\tau_i$) and amplitudes ($A_j$). For the PL lifetimes recorded in Figure S33 bi-exponential models yielded the best fit, using:

$$I(t) = A_1 \exp[(t - t_0)/\tau_1] + A_2 \exp[(t - t_0)/\tau_2] \quad (6)$$

Optical microscopy imaging: Optical images of the microprocessed thin film surfaces were recorded using a desktop Leica DMS300 optical microscope.

Atomic Force Microscopy (AFM): AFM maps of $15 \times 15 \mu m^2$ were recorded at a scan speed of 0.35 Hz with a pixel size of ~33 × 33 nm. The thin film surface was characterized in tapping mode using OMCL-AC160TS-R3 probes (spring constant of ~26 N/m) at a resonance frequency of 300 kHz (±100) using a Cypher ES system (Asylum Research) at 32 °C. The acquired AFM data were processed and analyzed using the open-source software package Gwyddion³⁹.

Density functional theory (DFT) modeling of interface: The dynamic calculations performed for this report are all molecular dynamic (MD) simulations at 300 K or 600 K with a timestep of 2 fs and a total simulation time exceeding 160 ps. CP2K⁴⁰,⁴¹ was used to calculate the forces and update the positions. The forces were calculated using density functional theory (DFT) with the PBE-D3(BJ)⁴²,⁴³ exchange-correlation (XC) functional. The combined Gaussian and Plane Wave (GPW) basis sets approach is used. The TZVP-MOLOPT-SR-GTH basis set and GTH pseudopotentials⁴⁴⁻⁴⁶ are used for all atoms. The cutoff energy is 400 Ry and the relative cutoff is 40 Ry. The calculations in which the lattice vectors were performed in the NVT ensemble at 300 K or 600 K, using a Nosé-Hoover thermostat⁴⁷⁻⁴⁹ with three thermostat beads and a time constant of 100 fs to control the temperature. For the calculations in which also the unit cells could move freely, the NPT ensemble was used by also applying an MTK barostat⁵⁰ with a time constant of 500 fs to control the pressure at 1 atm. PLUMED⁵¹ was used to calculate the Pb-I-Pb bond angles during the MD simulation and to add the bias restraint to the I⁻ anions at the bottom of the slab.

## Data availability

The authors declare that the data needed to evaluate the conclusions in this manuscript are present in the main text or the Supplementary Information. Experimental procedures, characterization of materials, computational details, Supplementary Tables and Supplementary Figures are available in the Supplementary Information. Additional raw data formats are available upon request to the corresponding authors.

## Code availability

The input, output, and processing scripts used to complete the materials simulations are available at https://zenodo.org/record/7341824#.Y3t3f1NKi0p. The commercial VASP code can be licensed from the University of Vienna (see the FAQ section on https://www.vasp.at/). The applied codes (Phonopy, CP2K and PLUMED) are freely accessible.

## References

1. Green, M. A., Ho-Baillie, A. & Snaith, H. J. The emergence of perovskite solar cells. *Nat. Photon* 8, 506–514 (2014).

2. Yang, Y. & You, J. Make perovskite solar cells stable. *Nature* 544, 155–156 (2017).

3. Meng, L., You, J. & Yang, Y. Addressing the stability issue of perovskite solar cells for commercial applications. *Nat. Commun.* 9, 5265 (2018).

4. Lee, J.-W. et al. Formamidinium and cesium hybridization for photo- and moisture-stable perovskite solar cell. *Adv. Energy Mater.* 5, 1501310 (2015).

5. Wang, Y. et al. Thermodynamically stabilized β-CsPbI₃-based perovskite solar cells with efficiencies >18%. *Science* 365, 591–595 (2019).

6. Yoon, S. M. et al. Surface engineering of ambient-air-processed cesium lead triiodide layers for efficient solar cells. *Joule* 5, 183–196 (2021).

7. Trots, D. M. & Myagkota, S. V. High-temperature structural evolution of caesium and rubidium triiodoplumbates. *J. Phys. Chem. Solids* 69, 2520–2526 (2008).

8. Lin, J. et al. Thermochromic halide perovskite solar cells. *Nat. Mater.* 17, 261–267 (2018).

9. Lin, Z. et al. Kinetics of moisture-induced phase transformation in inorganic halide perovskite. *Matter* 4, 2392–2402 (2021).

10. Steele, J. A. et al. Phase transitions and anion exchange in all-inorganic halide perovskites. *Acc. Mater. Res.* 1, 3–15 (2020).

11. Fu, Y. et al. Stabilization of the metastable lead iodide perovskite phase via surface functionalization. *Nano Lett.* 17, 4405–4414 (2017).

12. Swarnkar, A. et al. Quantum dot-induced phase stabilization of α-CsPbI₃ perovskite for high-efficiency photovoltaics. *Science* 354, 92–95 (2016).

13. Ma, S. et al. Strain-mediated phase stabilization: a new strategy for ultrastable α-CsPbI₃ perovskite by nanoconfined growth. *Small* 15, 1900219 (2019).

14. Lira-Cantú, M. Perovskite solar cells: stability lies at interfaces. *Nat. Energy* 2, 17115 (2017).

15. Liu, D. & Kelly, T. L. Perovskite solar cells with a planar heterojunction structure prepared using room-temperature solution processing techniques. *Nat. Photon* 8, 133–138 (2014).

16. Steele, J. A. et al. Thermal unequilibrium of strained black CsPbI₃ thin films. *Science* 365, 679–684 (2019).

17. Chen, Y. et al. Strain engineering and epitaxial stabilization of halide perovskites. *Nature* 577, 209–215 (2020).

18. Bäuerle, D. Laser Processing and Chemistry. (Springer Berlin Heidelberg, 2011).

19. Park, B. et al. Understanding how excess lead iodide precursor improves halide perovskite solar cell performance. *Nat. Commun.* 9, 3301 (2018).

20. Kasel, T. W. & Hendon, C. H. A type I heterointerface between amorphous PbI₂ layers on crystalline CsPbI₃. *ACS Appl. Energy Mater.* 3, 10328–10332 (2020).

21. Hooper, K. E. A. et al. Probing the degradation and homogeneity of embedded perovskite semiconducting layers in photovoltaic devices by Raman spectroscopy. *Phys. Chem. Chem. Phys.* 19, 5246–5253 (2017).

22. Khanna, Y. P. & Taylor, T. J. Comments and recommendations on the use of the Avrami equation for physico-chemical kinetics. *Polym. Eng. Sci.* 28, 1042–1045 (1988).

23. Marronnier, A. et al. Anharmonicity and disorder in the black phases of cesium lead iodide used for stable inorganic perovskite solar cells. *ACS Nano* 12, 3477–3486 (2018).

24. Dastidar, S. et al. Quantitative phase-change thermodynamics and metastability of perovskite-phase cesium lead iodide. *J. Phys. Chem. Lett.* 8, 1278–1282 (2017).

25. Chen, B. et al. Detecting grain rotation at the nanoscale. *Proc. Natl Acad. Sci. USA* 111, 3350–3353 (2014).

26. Steele, J. A. et al. Texture Formation in Polycrystalline Thin Films of All-Inorganic Lead Halide Perovskite. *Adv. Mater.* 33, 2007224 (2021).
27. Li, Z., Zhou, F., Wang, Q., Ding, L. & Jin, Z. Approaches for thermodynamically stabilized CsPbI₃ solar cells. *Nano Energy* **71**, 104634 (2020).

28. Fan, L., Pei, Z., Wang, P. & Zheng, Z. Research progress on the stability of organic-inorganic halide perovskite photodetectors in a humid environment through the modification of perovskite layers. *J. Electron. Mater.* **51**, 2801–2818 (2022).

29. Li, C. et al. High-performance photodetectors based on nanos-structured perovskites. *Nanomaterials* **11**, 1038 (2021).

30. Mukhokosi, E. P. & Maaza, M. Influence of device architectures and mobility on response/recovery time of metal halide perovskites: A review. *J. Mater. Sci.* **57**, 1555–1580 (2022).

31. Zhang, H. et al. Highly mobile large polarons in black phase CsPbI₃. *ACS Energy Lett.* **6**, 568–573 (2021).

32. Wang, P. et al. Solvent-controlled growth of inorganic perovskite films in dry environment for efficient and stable solar cells. *Nat. Commun.* **9**, 2225 (2018).

33. Dyadkin, V., Pattison, P., Dmitriev, V. & Chernyshov, D. A new multi-purpose diffractometer PILATUS@SNBL. *J. Synchrotron Radiat.* **23**, 825–829 (2016).

34. Ashiotis, G. et al. The fast azimuthal integration Python library: pyFAI. *J. Appl. Crystallogr.* **48**, 510–519 (2015).

35. Rodríguez-Carvajal, J. Recent advances in magnetic structure determination by neutron powder diffraction. *Phys. B: Condens. Matter* **192**, 55–69 (1993).

36. Yang, R. X., Skelton, J. M., da Silva, E. L., Frost, J. M. & Walsh, A. Assessment of dynamic structural instabilities across 24 cubic inorganic halide perovskites. *J. Chem. Phys.* **152**, 024703 (2020).

37. Kresse, G. & Furthmüller, J. Efficiency of ab-initio total energy calculations for metals and semiconductors using a plane-wave basis set. *Computational Mater. Sci.* **6**, 15–50 (1996).

38. Togo, A. & Tanaka, I. First principles phonon calculations in materials science. *Scr. Materialia* **108**, 1–5 (2015).

39. Nečas, D. & Klapetek, P. Gwyddion: an open-source software for SPM data analysis. *Open Physics* **10** (2012).

40. Hutter, J., Iannuzzi, M., Schiffmann, F. & VandeVondele, J. CP2K: atomistic simulations of condensed matter systems: CP2K Simulation Software. *WIREs Comput Mol. Sci.* **4**, 15–25 (2014).

41. VandeVondele, J. et al. Quickstep: fast and accurate density functional calculations using a mixed Gaussian and plane waves approach. *Computer Phys. Commun.* **167**, 103–128 (2005).

42. Perdew, J. P., Burke, K. & Ernzerhof, M. Generalized gradient approximation made simple. *Phys. Rev. Lett.* **77**, 3865–3868 (1996).

43. Grimme, S., Antony, J., Ehrlich, S. & Krieg, H. A consistent and accurate ab initio parametrization of density functional dispersion correction (DFT-D) for the 94 elements H-Pu. *J. Chem. Phys.* **132**, 154104 (2010).

44. Lippert, G., Hutter, J. & Parrinello, M. A hybrid Gaussian and plane wave density functional scheme. *Mol. Phys.* **92**, 477–487 (1997).

45. Goedecker, S., Teter, M. & Hutter, J. Separable dual-space Gaussian pseudopotentials. *Phys. Rev. B* **54**, 1703–1710 (1996).

46. VandeVondele, J. & Hutter, J. Gaussian basis sets for accurate calculations on molecular systems in gas and condensed phases. *J. Chem. Phys.* **127**, 114105 (2007).

47. Nosé, S. A unified formulation of the constant temperature molecular dynamics methods. *J. Chem. Phys.* **81**, 511–519 (1984).

48. Nosé, S. A molecular dynamics method for simulations in the canonical ensemble. *Mol. Phys.* **52**, 255–268 (1984).

49. Hoover, W. G. Canonical dynamics: Equilibrium phase-space distributions. *Phys. Rev. A.* **31**, 1695–1697 (1985).

50. Martyna, G. J., Tobias, D. J. & Klein, M. L. Constant pressure molecular dynamics algorithms. *J. Chem. Phys.* **101**, 4177–4189 (1994).

51. Tribello, G. A., Bonomi, M., Branduardi, D., Camilloni, C. & Bussi, G. PLUMED 2: new feathers for an old bird. *Computer Phys. Commun.* **185**, 604–613 (2014).

## Acknowledgements

J.A.S., T.B., and S.M.J.R. acknowledge financial support from the Research Foundation - Flanders [FWO: grant No.'s 12Y7218N, V439819N, V400622N and 12Y7221N (J.A.S.), 1SC1319 (T.B), and 12T3519N (S.M.J.R.)]. J.H. and M.B.J.R. acknowledge financial support from the Research Foundation - Flanders (FWO) through research projects (FWO Grant No's G098319N, S002019N "PROCEED", S004322N "GIGAPIXEL") and ZW15_09-GOH6316), from the KU Leuven Research fund (iBOF-21-085 "PERSIST") and from the Flemish government through long term structural Methusalem funding (CASAS2, Meth/15/04). V.V.S. acknowledges funding from the European Union's Horizon 2020 research and innovation program (consolidator ERC grant agreement no. 647755 - DYNPOR, 2015-2020) as well as from the Research Board of Ghent University (BOF). S.D.F. acknowledges continuous support from the FWO and KU Leuven. J.A.S. and M.B.J.R. acknowledge financial support from the KU Leuven Research Fund (C14/19/079) and KU Leuven Industrial Research Fund (C3/19/046). The computational resources and services used were provided by Ghent University (Stevin Supercomputer Infrastructure) and the VSC (Flemish Supercomputer Center), funded by FWO. E.H.S. acknowledges financial support from the U.S. Department of the Navy, Office of Naval Research (N00014-20-1-2572). M.I.P.M., R.G., and J.G. acknowledge funding from the European Research Council (ERC) under the European Union's Horizon 2020 research and innovation programme (grant agreement No 835133 "ULTRA-LUX"). P.Y. and Z.L. acknowledge the support from U.S. Department of Energy, Office of Science, Office of Basic Energy Sciences, Materials Sciences and Engineering Division, under Contract No. DE-AC02-05-CH11231 within Physical Chemistry of Inorganic Nanostructures Program (KC3103).

## Author contributions

J.A.S. conceived the science, coordinated the research, completed the majority of the experiments and wrote the manuscript. H.Y., H.J., V.P., and E.H.S. synthesized the materials under investigation and E.S. and D.C. assisted with the x-ray scattering experiments and analysis. R.X.Y. and A.W. completed the DFT calculations of the Raman spectra. P.P. and G.F. measured the experimental Raman spectra and H.H. and H.J. assisted with the phase stability testing. H.V.G. and S.D.F. recorded the AFM data. T.B. performed the DFT-based MD calculations under the supervision of S.M.J.R. and V.V.S. E.D. recorded the optical spectroscopy data. V.P. and G.D. developed the fabrication and stabilization of perovskite photodetectors, while S.B., M.I.P.M., R.G., and J.G. tested the stability of device performance. E.H.S., B.C., M.W., Y.H., P.Y., H.Y., J.H., M.B.J.R., and Z.L. assisted in designing experiments and developing the science. All authors have approved the manuscript.

## Competing interests

The authors declare no competing interests.

## Additional information

**Supplementary information** The online version contains supplementary material available at https://doi.org/10.1038/s41467-022-35255-9.

**Correspondence** and requests for materials should be addressed to Julian A. Steele, Veronique Van Speybroeck or Maarten B. J. Roeffaers.

**Peer review information** *Nature Communications* thanks the anonymous reviewer(s) for their contribution to the peer review of this work.

**Reprints and permissions information** is available at http://www.nature.com/reprints

**Publisher's note** Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.
**Open Access** This article is licensed under a Creative Commons Attribution 4.0 International License, which permits use, sharing, adaptation, distribution and reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons license, and indicate if changes were made. The images or other third party material in this article are included in the article's Creative Commons license, unless indicated otherwise in a credit line to the material. If material is not included in the article's Creative Commons license and your intended use is not permitted by statutory regulation or exceeds the permitted use, you will need to obtain permission directly from the copyright holder. To view a copy of this license, visit http://creativecommons.org/licenses/by/4.0/.

© The Author(s) 2022

<footnote n="1">¹CMACS, Department of Microbial and Molecular Systems, KU Leuven, 3001 Leuven, Belgium. ²Department of Chemistry, University of California, Berkeley, CA 94720, USA. ³School of Mathematics and Physics, The University of Queensland, Brisbane, QLD 4072, Australia. ⁴Center for Molecular Modeling (CMM), Ghent University, Technologiepark 46, 9052 Zwijnaarde, Belgium. ⁵Department of Chemistry, KU Leuven, Celestijnenlaan 200F, Leuven 3001, Belgium.</footnote>

<footnote n="6">⁶Department of Electrical and Computer Engineering, University of Toronto, 35 St George Street, Toronto, Ontario M5S 1A4, Canada. ⁷NCD-SWEET beamline, ALBA synchrotron light source, 08290 Cerdanyola del Vallès, Barcelona, Spain. ⁸CEMES/CNRS, Université de Toulouse, 29, rue Jeanne Marvig, 31055 Toulouse, France. ⁹IMEC, Kapeldreef 75, 3001 Leuven, Belgium. ¹⁰Department of Electrical Engineering (ESAT), KU Leuven, Kasteelpark Arenberg 10, 3001 Leuven, Belgium. ¹¹The Molecular Foundry, Lawrence Berkeley National Laboratory, Berkeley, California 94720, USA. ¹²Materials Sciences Division, Lawrence Berkeley National Laboratory, Berkeley, CA 94720, USA. ¹³Department of Materials Science and Engineering, University of California, Berkeley, CA 94720, USA. ¹⁴Swiss-Norwegian Beamlines at the European Synchrotron Radiation Facility, 71 Avenue des Martyrs, F-38000 Grenoble, France. ¹⁵Department of Materials, Imperial College London, Exhibition Road, London SW7 2AZ, United Kingdom. ¹⁶Department of Materials Science and Engineering, Yonsei University, Seoul 120-749, Korea. ¹⁷Kavli Energy Nano Science Institute, Berkeley, CA 94720, USA. ¹⁸Max Plank Institute for Polymer Research, Mainz D-55128, Germany.</footnote>

<footnote>✉e-mail: julian.steele@kuleuven.be; veronique.vanspeybroeck@ugent.be; maarten.roeffaers@kuleuven.be</footnote>