**4. Discussion**

To investigate the sensing mechanism, complex impedance diagrams of MAPbI3-based sensor were measured with different RH levels. Figure 9 displays the complex impedance plots (Nyquist plots) obtained in different RH environments. At the low RH levels of 11 and 33%, the Nyquist plots are arc-like curves with large radius. The large radius indicates the high resistance at low humidity levels. The arc shrinks with the increasing of RH from 33% to 54%. A whole semicircle followed by a liner line in the low-frequency range is visible within the measuring frequency range when the RH beyond 75%RH. Further increasing the RH level, the semicircle becomes smaller, but the linear line becomes longer. This phenomenon indicates that both the resistance and reactance underwent a large decrease as the RH increases.

**Figure 9.** Complex impedance diagrams of the MAPbI3-based sensor with different RH levels.

Previous work has manifested that the absorbed water molecules can deform the crystal lattice. As the content of water molecules increases to one molecule in one unit cell, this deformation becomes prominent, but the crystal structure is still not broken down [11]. This implies that perovskite materials have good capability accommodating water molecules. Figure 10a presents the UPS spectrum of the material, where the VBM is 1.35 eV below Ef, and its secondary electron truncation is located at 19.5 eV. In addition to the band gap value calculated from the absorption spectrum, the band structure is acquired and depicted in Figure 10b (the Eg of MAPbI3 is 1.55 eV), where a standard *n* type feature could be concluded. With more water molecules absorbed by the structure, more electrons would be injected. This would lift the Ef of the material and enhance the conductivity of the material [11]. However, perovskite MAPbI3 would form the hydrate-CH3NH3PbI3·H2O under high humidity [27]. It is clearly shown in Figure 5a that the impedance of MAPbI3 based sensor decreases rapidly at low and moderate humidity levels, while the impedance value decreases slowly at high humidity level. Besides, the color of MAPbI3-based sensor changes from black to yellow and then back to black when the sensor was successively exposed to 11, 94%RH and then back to 11%RH for 5 min at each RH level, which indicates the degradation is reversible. Therefore, under high humidity, most of the water molecules entering the crystal lattice were used to form hydrate, which leads to slow increase of electrons in the conduction band and slow increase of electrical conductivity. Moreover, due to the limitation of perovskite crystal structure, the hydrate formed is limited, so the electrical conductivity of this material increases slowly.

**Figure 10.** (**a**) The direct UPS spectrum of the as-grown bare MAPbI3; and (**b**) the energy level diagrams of as-grown MAPbI3 in the cases before and after absorbing water molecules.
