Nonstoichiometric acid–base reaction as reliable synthetic route to highly stable CH3NH3PbI3 perovskite film

Perovskite solar cells have received worldwide interests due to swiftly improved efficiency but the poor stability of the perovskite component hampers the device fabrication under normal condition. Herein, we develop a reliable nonstoichiometric acid–base reaction route to stable perovskite films by intermediate chemistry and technology. Perovskite thin-film prepared by nonstoichiometric acid–base reaction route is stable for two months with negligible PbI2-impurity under ∼65% humidity, whereas other perovskites prepared by traditional methods degrade distinctly after 2 weeks. Route optimization involves the reaction of PbI2 with excess HI to generate HPbI3, which subsequently undergoes reaction with excess CH3NH2 to deliver CH3NH3PbI3 thin films. High quality of intermediate HPbI3 and CH3NH2 abundance are two important factors to stable CH3NH3PbI3 perovskite. Excess volatile acid/base not only affords full conversion in nonstoichiometric acid–base reaction route but also permits its facile removal for stoichiometric purification, resulting in average efficiency of 16.1% in forward/reverse scans.

However, as organic-inorganic ionic crystals with intrinsic humidity and thermal instabilities, perovskites encounter difficulties in large-scale application and commercialization. Recently, a layered and/or two-dimensional perovskite as well as pseudo-halide perovskite light absorbers were demonstrated to possess enhanced moisture stability, but unfortunately the efficiency was low (2-8%), probably due to poor electronic properties attributable to their long-chain cation and large-size anion components [17][18][19] . Besides, a crystal crosslinking strategy was performed with improved stability at B55% humidity in the dark, retaining 9-10% PCE after 1,000 h under 10% one-sun illumination 20 . Moreover, Chen et al. 21 developed a stable PSC adopting highly doped inorganic charge extraction layer with shielding capacity from moisture and delivered 15% PCE with 1 cm 2 large area. However, the stability of perovskite itself without shielding was still o1 week in a humid environment 20,21 . Without device encapsulation, MAPbI 3 /FAPbI 3 perovskites were regarded to be unstable under high humidity. The degradation kinetics had been studied to some extent using thermal gravity analysis (TGA) 22 and ultrafast spectroscopy 23 , which revealed some possible routes, but the degradation process related to transition states and intermediate products is not well-resolved. For example, the sequence of HI and CH 3 NH 2 release was ambiguous and some believed that HI was released before CH 3 NH 2 (ref. 24). Besides, CH 3 NH 3 I was very thermally stable even when the temperature increased to 150°C (refs 22,25), but the perovskites quickly decayed to PbI 2 in association with CH 3 NH 2 /HI release at 80-150°C after 24 h, which meant the decomposition kinetic pathways were different from each other 26 . Thus, this degradation kinetics of perovskite requires a closer examination to address these stability issues, and an alternative strategy is expected for enhancement of perovskite stability while keeping its high performance.
In this work, we report our investigation of the degradation and recovery of CH 3 NH 3 PbI 3 perovskite, which revealed the role of the intermediate product as well as methylamine amount in achieving stability. Hybrid perovskite decomposes sequentially in terms of thermodynamics based on MA-recoverable degradation, such that it first loses CH 3 NH 2 and then HI, leaving behind PbI 2 solid. On the basis of this, we have developed an alternative two-step nonstoichiometric acid-base reaction route (NABR) for the synthesis of moisture-resistive perovskite, that is the production of starting HPbI 3 using excess HI to react with PbI 2 , followed by perovskite conversion from HPbI 3 using excess CH 3 NH 2 . We have established that CH 3 NH 2 abundance in synthesis and the formation of high-quality HPbI 3 built of columnar face-sharing PbI 6 octahedra are two key parameters for stabilized perovskite. In NABR, excess and volatile reagents lead to complete reaction as well as stoichiometry, respectively. Therefore, a perovskite thin-film prepared via this route possesses reduced lattice vacancy, thus eliminating the penetration of undesirable H 2 O molecules into vacant sites and avoiding formation of monohydrate degradation product in association with H-bonding between H 2 O and MA þ . We have demonstrated that the CH 3 NH 3 PbI 3 perovskite thin-film remained highly stable in B65% humidity for up to 2 months with negligible PbI 2 -impurity, whereas other perovskites prepared by traditional one-step or two-step methods degrade distinctly after 2 weeks. The PSC using thin-film after humidity exposure delivered even better efficiency than that from freshly prepared film probably due to slight doping. This work provides an important insight into perovskite intrinsic stability and the utilization of simple chemical reaction for material control in PSC.

Results
Recoverable degradation. To find a way to improve the stability of CH 3 NH 3 PbI 3 , we have first investigated the degradation of traditional perovskites and used the recent defect-healing process for the recovery of degraded perovskite to check the transition products 27 . Figure 1a-c show the X-ray diffraction, optical images and photoluminescence mapping for degraded and recovered perovskite thin-film (prepared by traditional two-step method). We found that after degradation for some time, perovskite became yellow (Fig. 1b left) and had the distinct X-ray diffraction pattern of PbI 2 at 2y ¼ 12.6° (Fig. 1a). Although we thought it was fully degraded, it was immediately recovered to great extent by exposure to CH 3 NH 2 vapour (Fig. 1b right). The CH 3 NH 2 -recovered perovskite film was confirmed by the X-ray diffraction peaks (Fig. 1a) at 2y ¼ 14.1°, 28.4°that were indicative of CH 3 NH 3 PbI 3 (110), (220) facets. The recovered perovskite films existed in the form of nanoscale crystals judging from the broad X-ray diffraction peaks. The photoluminescence mapping contrasts (Fig. 1c) for the degraded (left) and recovered (right) films indicated their uniform reversion to perovskite. In comparison, the degraded film prepared by traditional one-step method was used for recovery test. These films had fast degradation rates and yielded some transition product under observation during the degradation. Figure 1d-f show the basic results. After 3-day degradation in 65% humidity, we observed a small-angle X-ray diffraction peak at 2y ¼ 8.1°, which was identical to that in the monohydrate (CH 3 NH 3 PbI 3 ?H 2 O, with X-ray diffraction peaks at 2y ¼ 8.10°, 8.66°and 10.66°) (refs 23,25,28). After 3 weeks, the degraded film had only one PbI 2 peak at 2y ¼ 12.6°. However, these films were partially recovered as perovskite nanoscale crystals (Fig. 1d), with photoluminescence mapping so as to confirm the uniform recovery judged from the strong photoluminescence at 760 nm (ref. 29; Fig. 1f). The similar process of degradation and recovery was also observed in the mixed CH 3 NH 3 PbI 3 À x Cl x perovskite using 3:1 mole combination of CH 3 NH 3 I and PbCl 2 , which was high-performing in PSC but presumably the most unstable perovskite compared with the iodide perovskite. We saw that the degradation process clearly exhibited the transition monohydrate product of CH 3 NH 3 PbI 3 À x Cl x Á H 2 O in the degradation, as shown in small angles of X-ray diffraction at 2y ¼ 8.10°, 8.66°and 10.66°, corresponding to the (001), (100) and 10 1 ð Þ reflections of a monoclinic P21/m crystal structure, and could be recovered to some extent ( Supplementary Fig. 1a). The monohydrate is similar to CH 3 NH 3 PbI 3 ?DMF (dimethylformamide), in which the MA þ is connected with solvent molecules (H 2 O/DMF) through H-bonding ( Supplementary  Fig. 1b,c) and thus degradation reaction occurs.
To evaluate the reaction process of perovskite more clearly, large crystals were prepared by immersing PbI 2 into 2-5 mg ml À 1 MAI IPA solution for in situ observation of the recovery process via optical microscope. We found that after degradation, the yellow phase crystals did not differ much in morphology from that of the parent black perovskite ( Supplementary Fig. 2). After recovery using CH 3 NH 2 , the degraded crystals re-crystallized as much smaller and more compact grains ( Supplementary Fig. 3). This general recovery suggested that the degraded film with PbI 2 and monohydrate could be re-converted to perovskite using methylamine and thus inferred that degradation of perovskite was also related to the loss of methylamine.
We have analysed the chemical reactions for perovskite formation in DMF solution and degradation with the following scheme: On the basis of previous work 25, 28 , we observed the colloidal characteristics and redshift of perovskite precursor compared with PbI 2 , which verified that either (1) or (2) was right, which could yield CH 3 NH 3 PbI 3 ?DMF(3). The intermediate CH 3 NH 3 PbI 3 ?DMF ( Supplementary Fig. 1c,d) has been detected by X-ray diffraction in another report 28 and will be confirmed in the following. Noted that these routes could yield possible byproducts shown below due to coordination of DMF to Pb(II) in the solution accompanied by its subsequent removal in the film: CH 3 NH 2 vacancy CH 3 NH 2 ð Þ x HPbI 3 Iodide vacancy or both CH 3 NH 2 ð Þ x H y PbI 2 þ y 0ox; yo1 In the degradation, we could simply consider the following step reactions: Actually, reaction (5) has been verified through in situ time-resolved X-ray diffraction techniques and heating-recovery in a previous study 30 and reaction (7) can be easily concluded from the final products. Degradation reaction (6) was apparently judged from CH 3 NH 2 -recovery in the glovebox ( Fig. 1 and Supplementary Fig. 3) and directly proved in the following investigation. Therefore, we conclude that in the humidity degradation, the perovskite is sequentially decomposed in terms of thermodynamics, first forming an intermediate monohydrate (5), then liberating CH 3 NH 2 molecules (6), and finally yielding a PbI 2 solid and releasing HI/H 2 O vapour (7), although the kinetic pathways could produce different final products (for example, CH 3 NH 3 PbI 3 ?H 2 O, PbI 2 and HPbI 3 , and so on) 23,30 . Hence, we can make two conclusions. First, from the formation and degradation analysis, we can see that the formation of a fully coordinated perovskite [PbI 3 ] À framework is the first important parameter, which can reduce the I-vacancy. Second, as CH 3 NH 2 can recover the degraded perovskite through the reverse reactions of (5-7), CH 3 NH 2 abundance is able to improve the stability of perovskite through retarding the degradation reaction. Therefore, the key to stable perovskite is to build a fully coordinated and robust [PbI 3 ] À scaffold that accommodates CH 3 NH 2 at A sites of perovskite AMX 3 lattice, thus eliminating the inclusion of undesirable water molecules and suppressing the degradation reaction.
Acid-base reaction. To synthesize stable perovskite, we propose a two-step route through NABR based on the above analysis where D r G 1 and D r G 2 are the changes of Gibbs free-energy for reaction (8) and (9), respectively.
In reaction (8), excess hydriodic acid promotes the reaction completely and yields HPbI 3 that is stoichiometrically identical to the [PbI 3 ] À framework of perovskite, permitting it to form perovskite without I-vacancy. In reaction (9), excess CH 3 NH 2 allows complete conversion of HPbI 3 to perovskite and thus eliminates the CH 3 NH 2 vacancy. Different from the use of excess CH 3 NH 3 I to react with PbI 2 , both CH 3 NH 2 and HI are facile for removal to yield vacancy-free perovskite due to their volatility at room temperature.
Faint yellow HPbI 3 crystal shows a hexagonal array of [PbI 3 ] À anionic columns each composing of [PbI 6 ] coordination octahedra that are stacked along their opposite triangular facets, with exact molecular formula HPbI 3 . Presumably, the protons in HPbI 3 can move freely in the intervening space between hexagonal arrays of anionic coordination columns. Powdery HPbI 3 as starting material for device fabrication was prepared following the literature procedure 31 , with careful modification using ethanol instead of diethyl ether to remove excess HI and intercalated solvents (H 2 O, DMF) and precipitate our products. (see the Methods section and Supplementary Fig. 4).
All the lead polyiodide precursors in DMF exhibited colloidal behaviour judging from their Tyndall effects using 532 nm laser beam (Fig. 2a). PbI 2 was coordinated by DMF ligands for dissolution and formed colloids in high concentration 25 . Precursors of both HPbI 3 and 1:1 combination of CH 3 NH 3 I:PbI 2 had smaller colloidal size judging from weaker light scattering than that of PbI 2 due to increased coordination number of Pb(II) (Fig. 2a). Therefore, HPbI 3 had the advantage of solubility in much higher concentration (42.5 M) than PbI 2 . We compared the absorption spectra of HPbI 3 , PbI 2 and 1:1 CH 3 NH 3 I:PbI 2 (one-step precursor) and found that those of HPbI 3 and 1:1 CH 3 NH 3 I:PbI 2 had 20-30 nm red-shifted absorption edge compared with that of PbI 2 , suggesting that coordination occurred between iodide and PbI 2 in both HPbI 3 and the 1:1 complex CH 3 NH 3 I:PbI 2 (Fig. 2b). Moreover, the absorption of HPbI 3 solution was slightly red-shifted with respect to that of 1:1 CH 3 NH 3 I:PbI 2 solution, indicating complete coordination due to the use of excess HI. In the NABR precursors, the addition of too much CH 3 NH 2 ethanol solution decreased the solubility in the mixed solution and precipitated into some solid phase (Fig. 2c).The increased beam size and distinct light scattering effects were monitored, which were used for optimizing organic-inorganic ratios of CH 3 NH 2 :HPbI 3 (ref. 25). Due to acid-base neutralization (reaction (9)), CH 3 NH 2 could be spontaneously arranged in the HPbI 3 framework. With increasing addition of CH 3 NH 2 solution, the absorption began to exhibit a blue-shift (Fig. 2d). This blueshift was actually the bleaching state of perovskite compound with excess CH 3 NH 2 intercalation inside, which thus did confirm that the formation towards perovskite configuration started in the solution and could be readily converted to perovskite after DMF removal 24,32 . As control experiment, we also added CH 3 NH 2 solution into a 1:1 molar solution of CH 3 NH 3 I:PbI 2 . We observed not only the blue-shift suggesting CH 3 NH 2 intercalation but also the strong absorption peak at 335 nm indicative of PbI 2 monomer, which meant it lacked iodine coordination in this recipe 33 (Fig. 2e). This iodine deficiency was consistent with a slightly bluer absorption edge than aforementioned HPbI 3 solution, which would lead to iodine vacancy by the control method.
Crystalline phase conversion. We first checked the morphology of thin films (Fig. 3). PbI 2 film prepared from DMF solution did not show the anisotropic rod-shape of its powders that should be essentially in accordance with the trigonal phase, but afforded uniform coverage and flatness on the substrates due to DMF coordination (Fig. 3a). HPbI 3 deposited as large-sized bundle-like crystals from solution by spin-coating, with poor coverage in film formation due to Ostwald ripening (Fig. 3b). In the control method, 1:1 combination of CH 3 NH 3 I:PbI 2 produced dendritic bundles of perovskite (Fig. 3c), which is related to CH 3 NH 3 PbI 3 ?DMF solvate and will be discussed later. In NABR, perovskites precipitated in the similar morphology to that from the control method due to similar iodide coordination ( Fig. 3d-f). However, CH 3 NH 2 was able to form a liquid interface (HPbI 3 ?x(CH 3 NH 2 )) with perovskite 27 through intercalation/ coordination and thus served as surfactants to refine and passivate the grain. Therefore, the increased CH 3 NH 2 in NABR could reduce the crystal size (Fig. 3e,f) and improve film coverage.
We have correlated the morphology with crystallographic information in detail through X-ray diffraction monitoring the conversion (Fig. 4). Dip-coated wet film, spin-coated films before baking and after baking are deposited to represent the three basic conversion stages. The wet PbI 2 film had small-angle peak at 2y ¼ 9.5°, which is due to ligand behaviour of DMF (PbI 2 ?DMF; Fig. 4a black curve) that is similar to that of dimethyl sulfoxide (DMSO) in PbI 2 ?DMSO 9 . This soft coordination complex facilitated film formation of PbI 2 as aforementioned through gradual release of coordinated DMF during spin-coating without baking ( Fig. 4a blue dashed curve). Baking increased the crystallinity from the strong (001) peak at 2y ¼ 12.6° (Fig. 4a blue solid curve). HPbI 3 film displayed thin-film X-ray diffraction peaks at 2y ¼ 11.5°, 15.8°, 20.1°, 25.8°, corresponding to (100), (101), (110) and (201) facets of hexagonal HPbI 3 , respectively. Even when the film was a little wet, it displayed the same indexed X-ray diffraction pattern as the dry films without/with baking after DMF loss, which is consistent with the single-crystal X-ray diffraction analysis on their solvate and dry crystal ( Fig. 4b and Supplementary Fig. 4). The transition products of perovskites were recognized by their small-angle X-ray diffraction peaks in wet films at 2y ¼ 6.5°, 7.9°and 9.4°, corresponding to monoclinic CH 3 NH 3 PbI 3 ?DMF (also see Supplementary Fig. 1c,d). However, in the spin-coated films before baking, these small-angle peaks of NABR film disappeared, suggesting its complete conversion to perovskite (Fig. 4c), but the control one-step sample still showed such peaks, which meant that DMF was still incorporated in the lattice (Fig. 4d). This information suggests that there exist iodine/ CH 3 NH 2 vacant sites with larger binding energy in the control sample and thus DMF is not easily removed at room temperature. NABR method reduces the vacancies owing to full coordination of HI and CH 3 NH 2 abundance. Namely, DMF molecules just play the role in solvation and/or intercalation through H-bonding to MA but are not directly coordinated to lead ions in NABR ( Supplementary Fig. 1c). Hence, NABR facilitates quick transformation towards perovskite and affords crystalline perovskite even without baking ( Fig. 4c and Supplementary  Fig. 5a). Strong Bragg peaks of perovskite were observed at a b c d e f  (Fig. 4c). Figure 4e schematically illustrates the whole reaction process in conformity with crystallographic information. The Pb(II) centre in PbI 2 is coordinated by DMF, forming PbI 2 ?DMF after spincoating 28 . In the first-step of acid-base reaction, HI replaces DMF for direct coordination to Pb(II) in forming linear columns each composed of stacked face-sharing PbI 6 octahedra, which are further arranged to give a hexagonal array in HPbI 3 with the aid of DMF intercalation between them. In the second step, CH 3 NH 2 /DMF is inserted into the inter-columnar region of HPbI 3 , forming CH 3 NH 3 PbI 3 ?DMF at first. The film morphology of perovskite is determined by the preformed monoclinic CH 3 NH 3 PbI 3 ?DMF containing [PbI 3 ] À double chains that is thus needle-like (see Supplementary Fig. 1c). The CH 3 NH 3 PbI 3 ?DMF opens its [PbI 3 ] À double chain after DMF removal and undergoes transformation to the tetragonal perovskite structure. In traditional route, stoichiometric MAI/PbI 2 cannot ensure full iodine coordination for stoichiometric perovskite due to coordination competition by DMF at X sites.
Perovskite prepared by NABR has strong absorption in the green and weak absorption in the red, which is a feature of high-quality perovskite. The one-step method produces a weak flat light absorption spectrum probably due to the defect absorption 34 (Supplementary Fig. 5b). Hexagonal HPbI 3 has an absorption edge at 420 nm, different from the theoretical 0.3 eV band gap in its cubic perovskite phase 24 , like FAPbI 3 with yellow and black phases 35 .
Intrinsic stability of as-prepared films. In principle, PbI 2 component is difficult to dissolve in water and thus the unstable component is the organic CH 3 NH 3 I counterpart. In general, a 2D  perovskite bearing a long alkyl chain for shielding from moisture has much higher stability. For CH 3 NH 2 , the À CH 3 group is hydrophobic and thus good humidity stability could be expected if -NH 3 is well bonded to inorganic [PbI 3 ] framework. We have monitored the degradation of these perovskites (Fig. 5) in B65% humidity and found that the control perovskite prepared by the one-step method was severely jeopardized by moisture after 1 week (Fig. 5a). The final products contained large amounts of PbI 2 as evidenced by PbI 2 (001) peak at 12.6° (Fig. 5a), together with amorphous solvate judging from the morphology (Fig. 5b). The perovskite prepared by traditional two-step method change to yellow for about 2 weeks under the same condition ( Supplementary Fig. 3e), and mixed CH 3 NH 3 PbI 3 À x Cl x perovskite degraded quickly within 1 h in such humidity to CH 3 NH 3 PbI 3 À x Cl x ?H 2 O (Supplementary Fig. 1).
We have also checked the stability of starting HPbI 3 . HPbI 3 displayed much better stability than traditional perovskites after 3 weeks, judging from the latter appearance of PbI 2 (001) peak (Fig. 5c). Except for some erosion traces on the surface, we did not observe too much change in SEM (Fig. 5d). It has to be mentioned that the HPbI 3 directly precipitated by adding antisolvents (such as diethyl ether) does not endure high humidity, probably due to HI/H 2 O residues.
The perovskite prepared by NABR had robust stability after optimizing the amount of CH 3 NH 2 in this work. The best film remained stable for about 2 months in B65% humidity, without distinct PbI 2 -impurity from X-ray diffraction pattern and significant morphology change from freshly prepared samples (Fig. 5e,f). However, we found that stability was CH 3 NH 2 -amount-dependent ( Supplementary Figs 6-12). The CH 3 NH 2 used should be largely in excess in NABR, and CH 3 NH 2 deficiency leads to incomplete conversion of HPbI 3 with poor stability (Supplementary Fig. 6). Therefore, we confirm that HPbI 3 permits the formation of a stable well-defined perovskite framework, and excess CH 3 NH 2 ensures sufficient filling in the lattice and surface passivation to resist H 2 O erosion in combination.
We have further performed TGA to check the thermal stability of perovskite films and starting materials. TGA curve for CH 3 NH 3 I shows nearly 100% weight loss between 260 and 320°C ( Supplementary Fig. 13). HPbI 3 has a large weight loss at a temperature range between 300 and 360°C, which is indicative of the release of HI. Consistent with its low humidity stability, the perovskite prepared by one-step method was also not thermally stable. Weight loss onset occurred at 60°C, which was consistent with a previous report 22 and meant that the organic-inorganic components were not tightly bounded. Through careful observation, the sequential thermal decomposition mechanism could be identified for control perovskite (see reaction 10) judging from two different weight loss regions at 60-150°C and 250-350°C, with the similar weight loss at 250-350°C to HPbI 3 . For NABR, the weight loss of the organic component was much larger than the others, being indicative of a fully coordinated [PbI 3 ] À scaffold with sufficient CH 3 NH 2 filling in the perovskite lattice.
Probably, perovskite prepared by the two-step method and NABR also decomposed sequentially under heating stress in terms of thermodynamics. Due to the similar release rates of MA and HI in kinetic pathways, we were unable to detect sequential events. In principle, the sequential decomposition thermodynamics is acceptable because when iodide is well coordinated to the metal centre of PbI 2 , and then the bind energy of MAI is reduced, leading to releasing MA easily.
TGA was performed in the low-temperature region for release of the organic component, with 30   ARTICLE loss, respectively. We can see the better stability in NABR after optimization ( Supplementary Fig. 13b). Besides, NABR affords to endure high-temperature calcination below 150°C for highquality films with negligible impurity (Supplementary Fig. 14). Therefore, NABR represents a controllable way towards the preparation of highly stable perovskite in humid environment and under heat stress.
Film optimization and stability check. We have introduced dripping of nucleation agent during spin-coating, which enhanced the film coverage for photovoltaics. The nucleation agent made of anti-solvent increased the heterogeneous nucleation sites and reduced the height of the free-energy barrier (DG) for nucleation. Therefore, it accelerated nucleation exponentially according to classical nucleation theory (R ¼ Ke À DG=k B T , R, nucleation rate; K, constant; k B T thermal energy) and suppressed the Ostwald ripening in sequential nucleation, resulting in 100% film coverage by this key step (Fig. 6a,b, and Supplementary  Figs 15-17). Through nucleation control, we could obtain pinhole-free thin-film with optimization (Fig. 6b).
We have found that optimized perovskite thin-film with nucleation agent remained stable through colour and X-ray diffraction monitoring (Fig. 6c). Under B65% humidity, there was no signature of PbI 2 -impurity after 1 month of exposure and negligible PbI 2 (B7%) from X-ray diffraction monitoring. However, degradation beyond 2 months of the pin-hole-free film was quite different from that of the mesoporous as-prepared film without nucleation agent. We found a plausible trace of HPbI 3 after 7 weeks at 2y ¼ 11.6°, and then peaks at 2y ¼ 8.1°and 8.7°i ndicating (001), (100) facets of CH 3 NH 3 PbI 3 ?H 2 O after 9 weeks, respectively. This can be explained by the sequential degradation thermodynamics in combination with degradation kinetics if we consider the surface effect. On the surface of pin-hole-free film, due to the ready release of both HI and CH 3 NH 2 , the sequential degradation reaction (5-7) occurred nearly simultaneously and thus only yielded PbI 2 that we could observe. When degradation went to the interior that was single crystal-like 36 , CH 3 NH 2 and HI were difficult to be released from the interior of high-quality of the film, thus as formed internal HPbI 3 and CH 3 NH 3 PbI 3 ?H 2 O were detected by X-ray diffraction patterns after long-time degradation. This explanation has been further tested by the following experiments. First, we tried to convert the CH 3 NH 3 PbI 3 ?H 2 O back to CH 3 NH 3 PbI 3 through heating (Fig. 6d). To our surprise, after 12 h heating at 75°C and 2 h heating at 100°C, we found there was no observable change of the monohydrated phase. We then increased the calcination temperature gradually and found a change happened at above 110°C, which was actually the decomposition threshold of defective perovskite. Second, we also checked the morphology after 70 days degradation and found that the rod-like degradation products were really embedded in the film (compare Supplementary Fig. 18 with Fig. 5b), which thus confirmed our assumption. Finally, we once again draw attention to degradation of the perovskite film without nucleation agent above. Due to the mesoporous structure that was fully exposed to moisture, we did not observe the transition products as the bulklike pin-hole-free film.
Performance evaluation. The PV performance for freshly prepared and humidity-exposed films on planar compact TiO 2 and mesoscopic TiO 2 was carefully conducted in this work (see the Methods section, Fig. 7a, Supplementary Figs 19  Supplementary Tables 1-4). Without nucleation agent, the solar cell displayed low performance due to the poor coverage. The humidity-exposed films had much better power conversion efficiency (14.0%) than freshly prepared film (11.1%) in this system, which meant the robust stability of NABR produced perovskite. In detail, the freshly prepared film produced V oc ¼ 0.90 V, J sc ¼ 19.6 mA cm À 2 , FF ¼ 0.520 and overall PCE ¼ 9.1% in forward scan, and V oc ¼ 0.96 V, J sc ¼ 19.6 mA cm À 2 , FF ¼ 0.590, overall PCE ¼ 11.1% in reverse scan. After humidity exposure, it produced V oc ¼ 0.94 V, J sc ¼ 20.3 mA cm À 2 , FF ¼ 0.541, and overall PCE ¼ 10.3% in forward scan, and V oc ¼ 1.01 V, J sc ¼ 20.4 mA cm À 2 , FF ¼ 0.681, overall PCE ¼ 14.0% in reverse scan (Fig. 7a). After adding nucleation agent, the solar cell displayed much higher performance due to the improved film coverage after series of device optimization (Fig. 7a). The freshly prepared film produced V oc ¼ 1.05 V, J sc ¼ 21.1 mA cm À 2 , FF ¼ 0.684 and overall PCE ¼ 15.1% in reverse scan. After 1 month humidity exposure, it produced V oc ¼ 1.08 and 1.07 V, J sc ¼ 21.7 and 21.7 mA cm À 2 , FF ¼ 0.725 and 0.651, and overall PCE ¼ 17.0 and 15.2% in reverse/forward scans. The average 16.1% PCE is among the highest efficiency PSC using stable material. This improved performance after humidity exposure demonstrated the improved stability as well.
The improved performance suggests that a thimbleful amount of H 2 O is beneficial to solar cell efficiency. We have tried to track the doping effect and/or surface passivation on solar performance and quantitatively characterize the concentration of pure perovskite film using external standard method with X-ray diffraction patterns (Fig. 7b). The weight concentration was characterized for the control film and NABR produced film. We can see that over 90% perovskite remained after about 2 months, while only about 60% perovskite residue was found after 7 days degradation from the control method. The best performance of perovskite against humidity has doping concentration of about 7%, which is generally consistent with the concentration range in previous work using PbI 2 -rich inorganic/organic composition 37 .
Besides, it is notable that stable PSCs through layer shielding reported in previous works are generally lower than 16.2% efficiency in reverse scan 20,38 . According to the detailed reports, MAPbI 3 perovskite itself could not endure high humidity (55%) for 1-6 days without encapsulation of its high-efficiency photovoltaics, which indicates that its high stability primarily comes from device encapsulation. However, here we demonstrate that NABR using excess CH 3 NH 2 to react with well-defined HPbI 3 provides a reliable route to producing material-stable perovskites superior than those reported in previous work 20, 38 .
This alternative NABR method is probably beneficial for long-term development and large-scale production under ambient conditions, thus reducing the cost in device fabrication and encapsulation. First, in NABR, both CH 3 NH 2 and HPbI 3 are chemically stable and thus readily facilitate fabrication. Moreover, the synthesis of HPbI 3 is much easier than CH 3 NH 3 I and can be collected using ethanol. Second, fundamentally speaking, the use of well-defined HPbI 3 that is stoichiometrically identical to the intermediate complex as starting material is more chemically reasonable. Besides, we have fabricated a large area PSC up to 1.0 Â 0.5 cm 2 in area, which successfully delivered 15.0% PCE at the present stage. Thus, the present study demonstrates up-scaling potential for the assembly of modules in solar cells that function efficiently under ambient condition ( Supplementary  Fig. 23, Supplementary Table 5).

Discussion
In conclusion, we have investigated the degradation and recovery of CH 3 NH 3 PbI 3 perovskite and established an improved stability process. The degraded perovskite can be recovered as fresh perovskite using methylamine CH 3 NH 2 , which means that methylamine can substantially retard the degradation. On the basis of this understanding, we have developed an alternative route using NABR to facilitate the synthesis of perovskite. This NABR procedure, involving the production of HPbI 3 using excess HI acid and PbI 2 as well as subsequent reaction between excess CH 3 NH 2 base and HPbI 3 acid, provides CH 3 NH 3 PbI 3 perovskite thin-film that is highly stable under B65% humidity for 2 months without appreciable PbI 2 -impurity, whereas other perovskites prepared by the traditional one-step and two-step methods withstand degradation o1 week and 2 weeks, respectively. We have identified a high-quality form of HPbI 3 with identical Pb(II) coordination number to perovskite and CH 3 NH 2 abundance as two important factors towards stable perovskite with as less site vacancies as possible. Excess and volatile acid/base leads to full coordination and stoichiometry, respectively, thus eliminating the penetration of water vapour and improving the stability in highly humid environments. The device has been optimized to 17.0/15.2% PCEs in forward/reverse scans after 1 month exposure in B65% humidity. This work provides an important insight into intrinsic stability and efficiency of perovskite as well as the utilization of simple reaction procedure with up-scaling potential via bottom-up synthetic chemistry for high-performance photo- voltaics. Through the reaction demonstration, the vacancy-free insight into improving stability is probably a general paradigm for other perovskites. For example, FA x Cs 1 À x PbI y Br 3 À y , in which the FA þ /Cs þ is also difficult to be removed, delivers as less vacancy as possible at the A sites of AMX 3 perovskite for high stability. It is challenging to make MAPbI 3 stable in traditional routes so far. Our NABR route provides a way to enhance the stability through smart reaction control to reduce vacancy without any other material composition. The intermediate structure of HPbI 3 is especially interesting, in which the proton seems to move freely around the [PbI 3 ] column. The perovskite after humidity test has even higher performance in this work, which may arise from protons in HPbI 3 .

Methods
Materials. Methylammonium iodide (MAI, Dyesol), PbI 2 (Sigma-Aldrich, 99%), N,N-dimethylformamide (DMF, Sigma-Aldrich, anhydrous, 99.8%), spiro-OMe-TAD (Merck), 4-tert-butylpyridine (Sigma-Aldrich, 96%), Titania paste (TiO 2 , 30 nm, Dyesol), Titanium(IV) isopropoxide (Sigma-Aldrich, 99.999%), methylamine (Sigma-Aldrich, 33% in ethanol), hydroiodic acid (HI, 57% in water), lithium bistrifluoromethanesulfonimidate (LiTFSI, Sigma-Aldrich, 99.95%), chlorobenzene (Sigma-Aldrich, anhydrous, 99.8%), and all other chemicals were used as received without further purification. HPbI 3 preparation: HPbI 3 powder was prepared by mixing PbI 2 and excess HI (1.5:1 molar HI:PbI 2 ) in DMF to ensure complete conversion, and stirring at 40°C overnight. The light yellow precipitates were obtained by washing the precursor in abundant ethanol to remove excess HI until the supernatant turned to white. The excess HI and ethanol were then removed through filtration. The resulting powders were further dried and stored in an oven at 60°C. It was then re-dissolved in DMF solution and different amounts of CH 3 NH 2 ethanol solution were freshly added to obtain the NABR perovskite precursors. The resulting HPbI 3 sample washed by diethyl ether did not exhibit high stability according to our control experiment. Needle-shaped semi-transparent HPbI 3 solvate single crystals were grown by dissolving 1.5:1 molar HI:PbI 2 in DMF followed by vapour diffusion of chlorobenzene into the mother liquor at 80°C for 6 hours, yielding HPbI 3 solvate crystal. After heating at 80°C for 30 min, it turned faint yellow quickly and converted to HPbI 3 crystal according to single crystal X-ray diffraction. The weight (HI þ solvent):PbI 2 ratio was 37.8% judged from TGA at 385°C for single-crystal HPbI 3 solvate, which was freshly collected from the mother liquor and placed on filter paper for 5 min, probably suggesting chemical formula HPbI 3 ?xDMF (xr1) with disordered DMF inside the lattice ( Supplementary Figs 4 and 24). The quick weight loss before 60°C suggests the easy release of DMF in HPbI 3 ?xDMF even at room temperature, yielding pure HPbI 3 indicated by 28% weight ratio at 385°C (HI/PbI 2 ) in weight loss after 60°C. The HPbI 3 powder recorded a 27.8% HI/PbI 2 weight ratio at 350°C by TGA ( Supplementary Fig. 13), which confirms the molecular formula HPbI 3 .
Crystal structure analysis. X-ray intensities of HPbI 3 solvate and HPbI 3 were collected at 296 K on a Bruker AXS Kappa Apex II Duo diffractometer with MoK a radiation (l ¼ 0.71073 Å) from a sealed-tube generator. Crystal data: hexagonal, a ¼ b ¼ 8.7517 Å, 8.7339 Å, c ¼ 8.1802 Å, 8.1770 Å for HPbI 3 solvate and HPbI 3 with 1:3 atomic Pb/I ratio, respectively. The systematic absences are consistent with both noncentric space group P63mc (No. 186) and centric space group P63mcm (No. 193). As the proton has negligible X-ray scattering and the DMF molecule exhibits severe orientational disorder, structure determination was based on space group P63mc with only the Pb and I atoms subjected to anisotropic least-squares refinement using the SHELXL-97 program; 7,944 reflections measured, of which 509 are unique, R int ¼ 0.099, R1 ¼ 0.044, wR2 ¼ 0.134 and GOF ¼ 1.05. The crystallographic data for this paper have been deposited with the Cambridge Crystallographic Data Centre (CCDC) as No.1479488. These data can be obtained free of charge from CCDC via www.ccdc.cam.ac.uk/data_request/cif and supporting crystal information files (Supplementary Table 6).
Device preparation. F-doped SnO 2 (FTO) (TEC08) substrates were cleaned in an ultrasonic bath sequentially with acetone, 2-propanol and ethanol for 15 min, separately. The TiO 2 precursor was prepared by 0.6 ml titanium isopropoxide and 0.15 ml 37%w/w HCl solution dissolved in 15 ml ethanol. The dense blocking layer TiO 2 was coated onto FTO substrate by spin-coating of titanium precursor at 5,000 r.p.m. for 40 s, followed by annealing in air at 500°C for 30 min. A 14 wt% solution of TiO 2 nanoparticles in ethanol was spin-coated onto the dense TiO 2 layer at 5,000 r.p.m. for 40 s to form a mesoporous scaffold and sintered in air at 550°C for 30 min. After cooling to room temperature, the mesoporous TiO 2 was immersed in aqueous 30 mM TiCl 4 at 70°C for 30 min, rinsed with DI water and annealed at 500°C for 20 min. The perovskite precursor was prepared by mixing equimolar ratio of MAI and PbI 2 in DMF by stirring at 60°C. This solution was then spin-cast onto the TiO 2 films at 3,000 r.p.m. for 30 s and annealed at 100°C for 15 min to form the control CH 3 NH 3 PbI 3 samples. For the perovskite precursors formed by HPbI 3 , 33 wt% MA solution in ethanol was mixed with 1.5 M HPbI 3 DMF solution with increased volume of MA, and the fresh precursor was spin-coated on TiO 2 at 2,500 r.p.m. and annealed at 100°C for 30 min. With device optimization, we also used other concentration HPbI 3 in association with excess MA and introduced nucleation agent (toluene, 1 ml) during the spin-coating at 10 s for full coverage. The spiro-OMeTAD was prepared by dissolving 75 mg spiro-OMeTAD with 25 ml LiTFSI solution (520 mg in 1 ml acetonitrile) and 35 ml 4-tert-butylpyridine in 1 ml chlorobenzene. Hole transport layer was deposited on the annealed perovskite film by spin-coating at 5,000 r.p.m. for 40 s to get the optimized efficiency. The devices were placed in a moisture-controlled cabinet overnight for oxidization of spiro-OMeTAD. Finally, 80 nm Au electrode was deposited by thermal evaporation with shadow mask area of 0.1 cm 2 . All device fabrication procedures were carried out in N 2 -purged glovebox.
Stability experiments. For all the humidity stability studies, the perovskite films were spin-coated on FTO glasses, and the films were stored at room temperature (measured as 25 ± 1°C) in a controlled-humidity cabinet with a transparent glass door, with a low-power fluorescent light in the room. The relative humidity in the chambers was controlled to the desired humidity 65±5% by a beaker of water. And the air humidity in the room is floating from 60 to 75%. The relative humidity in the cabinet was precisely measured periodically throughout the stability experiments using a calibrated hygrometer. The cabinet was only opened just when taking sample out. As the humidity difference is very small, and the humidity cannot be greatly affected when opening the cabinet door and return to the desired humidity by the beaker of water through measurement. To emphasize the stability of perovskite itself and check the performance after humidity exposure, we deposited perovskite films without and with nucleation agent during spin-coating and then expose them in B65% humidity for 1-2 months. Humidity-exposed films were assembled into solar cells in the configuration of FTO/TiO 2 /perovskite/spiro-OMeTAD/Au and compared with freshly prepared films.
Basic characterization. The extinction and absorption spectra of solution samples were measured on a Hitachi U-3501 ultraviolet/visible/NIR spectrophotometer. The general images of the film morphology were obtained using an FEI Quanta 400 field emission scanning electron microscope (FESEM, FEI, Quanta 400 FEG) operated at 10 keV. X-ray diffraction measurements were performed with a Bruker D8 Advance Davinci powder X-ray diffractometer using a CuK a source. TEM imaging was performed on an FEI Tecnai Spirit microscope operating at 120 kV.
Solar cell test. The current density-voltage curves of solar cells were measured (Keithley Instruments, 2612 Series Source Meter) under simulated AM 1.5 sunlight generated by a 94011A-ES Sol series Solar Simulator. The solar cell devices were tested in N 2 -filled glovebox under room temperature. Solar cell performance was scanned at scan speed 0.5 V s À 1 , dwell time 0.1 s, voltage step 0.05 V in forward and reverse scan loop. The scanning parameters related to the performance were attached (Supplementary Fig. 25). We used the 'Nicht abdecken' sensor for the light source checking and then measured the devices. The effective solar cell area was defined by the shadow mask as 0.1 cm 2 .
Data availability. The authors declare that the data that support the findings of this study are available from the corresponding author on reasonable request.