Main

The vertical structure device has a layered structure of indium tin oxide (ITO)/poly(3,4-ethylenedioxythiophene):poly(4-styrenesulphonate) (PEDOT:PSS)/perovskite/Au, as shown in Fig. 1a, where the methylammonium lead iodide (MAPbI3) perovskite layer was formed by the interdiffusion of lead iodide (PbI2) and methylammonium halide (MAI) stacking layers12. The as-prepared devices with 300 nm thick perovskite films have a JSC of 8.5 mA cm−2 and VOC of 0.18 V (Supplementary Fig. 1), despite the work functions of PEDOT:PSS and Au electrodes being almost the same. This might be due to the different interfacial electronic structures at the perovskite/PEDOT:PSS and perovskite/Au contacts. A large memristive effect from these devices was identified, both in the dark and under illumination, which showed a scanning-history-dependent current output (Supplementary Fig. 2). The diode direction can be switched during the scanning process in the dark, as shown in Fig. 1b. The on/off ratios of the dark current are >103 and >102 at biases of −1.0 V and 0.7 V, respectively. The devices can also be poled by a constant bias pulse with a duration of 5–30 s (Supplementary Fig. 3a,b). The device with a perovskite layer thickness of 1,015 nm was switched by a small bias of 1.0 V (Supplementary Fig. 3c), which corresponds to a minimal poling electric field of <1 V μm−1.

Figure 1: Vertical structure photovoltaic devices and their switching behaviour.
figure 1

a, Schematic of the vertical structure device. b,c, Dark current (b) and photocurrent hysterisis curves (c) of the devices under continuous current sweeping at a rate of 0.14 V s−1 between −2.5 V and 2.5 V. The arrows in the figures show the scanning direction. d, Open circuit voltage of the device recorded after repeated poling by ±2.5 V bias for more than 750 cycles. Only the first ten and last ten cycles are shown. The red dots refer to VOC of the device after positive and negative poling.

The switchable diode in the dark resulted in a giant switchable photovoltaic effect under illumination. In contrast to switchable photovoltaics using bismuth ferrite materials, with JSC typically of the order of ~μA cm−2 (refs 10, 11), JSC for the OTP devices switched between 18.6 and −20.1 mA cm−2 (Fig. 1c) under one sun illumination, which is comparable to that of optimized perovskite solar cells1,2,3,4,5,13. This indicates that most of the photogenerated excitons dissociated to free charges in the perovskite layer, even without an electron- or hole-accepting layer, and the free charges were efficiently collected by the electrodes regardless of the diode directions. The photocurrents showed a variety of hysteresis loops with changed scanning rates, whereas JSC remained almost unchanged and VOC was around 0.15 V lower at a lower scanning rate of 0.25 V s−1, as shown in Supplementary Fig. 2b–d. The photocurrent direction after poling remained unchanged after storing the device for two months under ambient illumination in the glovebox (Supplementary Fig. 4). The value of VOC was switched between 0.42 V and −0.73 V. There is a variation in JSC and VOC from different devices; some of them showed a larger VOC, close to 0.9 V, but with a relatively smaller JSC of 8 mA cm−2 (Supplementary Fig. 5). The average VOC and JSC of the vertical structure devices were ±0.65 V and ±18.5 mA cm−2, respectively (Supplementary Fig. 5). Positive poling (electric field pointing from PEDOT:PSS to Au) resulted in a positive VOC. A typical device was switched more than 750 times with the VOC in the first ten and last ten poling cycles shown in Fig. 1d. The photocurrent direction of the device can survive after 750 poling cycles. After positive poling, VOC remained almost constant at 0.42 V, whereas after negative poling, VOC showed switching fatigue from 0.73 V to 0.21 V. The switchable photovoltaic phenomenon was universally demonstrated using other OTP materials, such as CH3NH3PbI3−xClx, HC(NH2)2PbI3 and CH3NH3PbBr3 (Supplementary Fig. 6), and with many other top electrodes, including nickel, gallium and platinum (Supplementary Fig. 7), but not aluminium or silver, owing to the severe chemical reaction of perovskite with aluminium and silver.

We moved on to demonstrate the switchable photovoltaic effect in lateral structure devices because of the very low electric field of 1 V μm−1 needed for poling and the absence of electrode selectivity shown in the vertical structure devices. Fig. 2a shows a schematic of a photovoltaic device with a lateral symmetric structure of Au/OTP/Au/OTP/…, where tens to hundreds of cells are connected in series. Fig. 2b shows the optical image of a Au electrode pattern fabricated by photolithography, where the electrode spacing is 8 μm. As shown in Fig. 2c, the non-poled device showed no photovoltaic effect with zero VOC because of the symmetrical electrodes, whereas the poled single cell showed a VOC of 0.48 V under 0.25 sun illumination after poling at 10 V for ~100 s. The photovoltaic direction after poling was consistent with that of the vertical structure devices. The photovoltaic direction was flipped by a reversed poling bias. In contrast to ferroelectric photovoltaics14, the VOC of a single device after poling remains almost constant at around 0.50 V for a range of electrode spacings from 8 to 100 μm (Supplementary Fig. 9). The JSC value of the device with an 8 μm electrode spacing is 0.1 mA cm−2. The smaller JSC in the lateral structure devices is due to the electrode spacing being much larger than the charge diffusion length in perovskite materials15,16. The statistics of the performance of the lateral structure devices is shown in Supplementary Fig. 8. The largest absolute VOC and JSC values reached 0.88 V and 0.11 mA cm−2, and the average VOC and JSC values of the lateral structure devices were ±0.50 V and ±0.075 mA cm−2, respectively. As shown in Fig. 2d, the VOC value of lateral photovoltaic devices connected in series is the sum of each unit cell, whereas the JSC remains almost constant, indicating a uniform performance of each unit cell. A large VOC of 47 V was observed for devices with 125 unit cells connected in series under illumination of 25 mW cm−2.

Figure 2: Lateral structure photovoltaic devices and their switching behaviour.
figure 2

a, Schematic of the lateral structure devices. b, A Au stripe array under a microscope (reflective mode), where the electrode spacing, d, shown in the enlarged image below, is 8 μm. Lateral photovoltaic devices connected in series were fabricated by depositing uniform perovskite films (300 nm) on pre-formed Au stripe electrodes with spacings between 8 and 100 μm. c, Photocurrents of the device before and after negative and positive poling for a single cell measured at a sweeping rate of 0.05 V s−1 under 0.25 sun illumination; the arrows in the figure indicate the scanning direction. d, Photocurrents of lateral photovoltaic devices connected in series measured at a sweeping rate of ~0.05 V s−1 for each cell. The poling of the lateral photovoltaic devices was conducted either by poling each cell individually or by simply poling the whole area between the first and last electrodes.

To determine the origin of the switchable photovoltaic effect in OTP devices, we examined three possible mechanisms which have been reported for switchable photovoltaic or memristor behaviour, which was also speculated to result in photocurrent hysteresis with a changed photocurrent scanning direction and scanning rate in some perovskite photovoltaic devices17: ferroelectricity of the photoactive layer18; charge traps in the active layer’s surface17,19; and motion and accumulation of ions inducing a doping effect10,20. Some theoretical calculations have predicted strong ferroelectricity for MAPbI3, with a polarization charge density of the order of 38 C m−2 (refs 21, 22). However, no ferroelectric polarization was detected from these devices with comparable voltage scanning rates to those in the photovoltaic study when they were measured at both room temperature and 77 K (Supplementary Fig. 10). Piezoresponse force microscopy (PFM) imaging and hysteresis loop measurements showed nothing resembling ferroelectric activity in the MAPbI3 perovskite films—that is, there were weak PFM amplitude and phase signals and no hysteresis switching activity, despite the application of a much higher bias than in the switchable photovoltaic studies. Furthermore, the ferroelectric photovoltaic effect can be excluded by the unchanged photovoltage with respect to the electrode spacing in the lateral structure devices, (Supplementary Fig. 9) and diminished switching behaviour at reduced temperature (Supplementary Fig. 14). Our finding does not, in principle, rule out ferroelectricity in MAPbI3, as more measurements (such as temperature-dependent dielectric and structural testing) are required to clarify this issue. The charge-trapping mechanism can also be excluded because it cannot explain flipping in the direction of the photovoltage and photocurrent, or the persistence of the photocurrent output long after poling, as shown in Supplementary Fig. 11. It was previously reported that similar halide-containing perovskites, such as CsPbCl3 and CsPbBr3, are good halide-ion vacancy conductors at elevated temperatures23. We ascribe switchable photovoltaics to ion drift under the electric field in the perovskite layer. Theoretical calculations predicted that negatively charged Pb and MA vacancy ( and ) could result in p-type doping, whereas positively charged I vacancy () results in n-type doping in MAPbI3 (refs 24, 25), which we verified experimentally in a study of composition-dependent self-doping behaviour in MAPbI3 (ref. 26). In this scenario, the electric field causes the drift of charged , and/or , which have low formation energies in MAPbI3 (refs 24, 25), to the area near the electrode and forms a p–i–n structure. Our scenario for the switchable photovoltaics is illustrated in Fig. 3a,b, using vertical structure devices as an example. The positively charged ions or vacancies moved to the Au side during positive poling and accumulated there, leading to n-doping in perovskite on the Au side. Similarly, the remaining negative space charge layer can p-dope the perovskite layer close to PEDOT:PSS, forming a p–i–n homojunction structure. A reverse bias can flip the p–i–n structure to n–i–p by forcing ions or ion vacancies to drift in the opposite direction. The memristive dark- and photocurrent hysteresis can also be explained well by the time-dependent drift of ions under the field27.

Figure 3: Switchable photovoltaic model and mechanism study.
figure 3

a,b, Schematics of ion drift in perovskite during positive and negative poling, respectively, showing that accumulated ions in the perovskite near the electrodes induced p- and n-doping. c, Energy diagram of the p–i–n structure after poling. WF, workfunction. d, Schematic image of a device with part of the Au electrode peeled off. The scanned area is marked as a dashed rectangle. e,f, KPFM potential image of the perovskite/Au areas after positive and negative poling, respectively, of the perovskite layers (300 nm). g,h, Photoluminescence from the thin perovskite layers close to either a PEDOT:PSS electrode or a Au electrode. A thin gold electrode (25 nm) was used as the top electrode so the photoluminescence emission from the perovskites close to both electrodes can be measured. Blue light (405 nm) was used to excite only the 25 nm thick perovskite layer close to the electrodes (estimated by the extinction coefficient) of the 1,015 nm thick device. The photoluminescence measurement was conducted in situ during the poling process to exclude other factors affecting photoluminescence. The small extra peak at 710 nm in g is due to the ITO.

To test this scenario, we first measured the doping-induced band-bending in perovskite close to the top Au electrode after poling in the vertical structure devices by means of Kelvin probe force microscopy (KPFM). The p- or n-doping should induce an increase or reduction of the work function for the perovskite top surface, respectively, as illustrated by the energy diagram in Fig. 3c. The long retention of the diode direction indicates that the poling-induced changes in composition and work function are stable after poling. Au electrodes could be easily peeled off by Scotch tape to expose the poled perovskite films. Fig. 3d illustrates the films used for the KPFM study, where some unpeeled Au areas were intentionally left as a work function reference. As shown in Fig. 3e,f, the work function of the perovskite films was ~0.22 V lower than that of Au after positive poling, and comparable to that of Au after negative poling—which agrees well with the energy diagram in Fig. 3c and supports the proposed doping mechanism. The surface topography showed no obvious change in the poling areas (Supplementary Fig. 12), thus excluding the effect of topography on the surface potential measurement. The discrepancy of the change in perovskite work function with VOC can be explained by possible surface contamination by residues of Au after peeling and/or by moisture/oxygen, as the KPFM measurement was conducted in air. Finally, semiconductor doping generally causes photoluminescence quench, which was also observed for the p- and n-doped perovskite regions close to both the Au and PEDOT:PSS sides, as shown in Fig. 3g,h.

Another conclusive piece of evidence for the drift of ions during the poling process comes from the observation of composition and morphology changes during poling of a lateral structure device. In this study, the device was intentionally poled for a much longer time (2 h) than was needed for the doping effect, such that the change in perovskite composition/morphology was discernible. The transparency of the perovskite film was monitored in situ under an optical microscope, as schematically shown in the measurement set-up in Fig. 4a. The dynamic process was recorded on video using a time-accelerated mode (Supplementary Movie 1), several snapshots of which are shown in Fig. 4b. The perovskite stripe area close to the anode became increasingly transparent, and the morphology in this area was completely different from other areas, with many pinholes appearing (Supplementary Fig. 13), indicating the drift of ions from the anode side. The loss of perovskite material on the anode side indicated that the drifting ions were and/or .

Figure 4: In situ monitoring of the material change during the poling process.
figure 4

a, Illustration of the set-up used for in situ monitoring of the poling process using a lateral structure device. b, Snapshots of the in situ recorded video, showing changed perovskite material close to the anode side during the poling process. The electrical field applied on the perovskite film was ~1.2 V μm−1.

The extensive study of the dynamic poling process for devices under varying electric field, temperature, and perovskite film morphology gave support to a mechanism of field-driven ion drift as being responsible for the photovoltaic switching, as shown in Supplementary Fig. 14. Here, a train of voltage pulses with a duration of 0.95 s was applied to the devices and JSC was recorded after each pulse. An elevated temperature and/or applied electric field (by changing either the applied bias or perovskite film thickness) accelerated the poling process (Supplementary Fig. 14a,b), whereas poling was almost frozen at temperatures below 0 °C (Supplementary Fig. 14c). The extent of the photovoltaic switching effect was influenced by the morphology, stoichiometry and film quality of the perovskite films owing to their influence on the defect concentration. For example, poling became more difficult (Supplementary Fig. 14d–f) in a device with a much larger perovskite grain size which was formed by a solvent-annealing process. This can be explained by the reduced vacancy concentration in solvent-annealed perovskite films due to fewer grain boundaries resulting from the solvent-annealing process increasing the grain size from 300 nm to range 600–1,000 nm (ref. 28). The statistics of device performance during the dynamic poling process under different measurement conditions and with different film morphologies are shown in Supplementary Fig. 14g. These results confirmed that the switchable photovoltaic behaviour of the devices is due to ion drift.

The best device parameters in the single-layer vertical structure devices after poling approached those of optimized multi-layer devices with both electron- and hole-transporting layers. This work indicates a new direction for perovskite solar cell design using the controlled doping of perovskite for homojunction solar cells, thus reducing device fabrication complexity. The lateral structure device is particularly interesting because it eliminates the need for transparent electrodes, but its efficiency is still limited by the charge carrier diffusion length in present perovskite materials. Further improvements in crystal quality and surface passivation techniques will help to resolve this issue. The perovskite memristors reported here can be read out not only by electrical pulses but also by optical pulses18. This work paves the way towards a new approach to doping perovskite using electric pulses, such that a doping pattern can be programmed and directly written using scanning probe microscopy for memristor array fabrication. This might open up new applications for perovskite materials in optoelectronic computational devices, as memristors are being increasingly pursued for computing29,30.

Methods

CH3NH3I precursor synthesis.

Methylammonium iodide (CH3NH3I) was synthesized using a previously described method1. A concentrated aqueous solution of hydroiodic acid (HI) (15.0 ml, 57 wt% in water, Alfa Aesar) was reacted with methylamine (CH3NH2) (13.5 ml, 40 wt% in aqueous solution, Alfa Aesar) at 0 °C for 2 h with constant stirring under a nitrogen atmosphere. Methylammonium iodide was crystallized by removing the solvent using a rotary evaporator. The white powder produced was washed with diethyl ether (Alfa Aesar) three times and dried in vacuum overnight.

Film formation and device fabrication.

Poly(3,4-ethylenedioxythiophene): poly(4-styrenesulphonate) (PEDOT:PSS) (Baytron-P 4083) was spin-coated on clean indium tin oxide (ITO) substrates at a speed of 3,000 revolutions per minute (r.p.m.). The films were then annealed at 105 °C for 30 min. PbI2 and MAI were first dissolved in dimethylformamide (DMF) and 2-propanol, respectively. The MAPbI3 films were formed by spin coating PbI2 (400 mg ml−1 in DMF) and (45 mg ml−1 in 2-propanol) sequentially at 6,000 r.p.m. for 35 s, respectively, followed by thermal annealing at 100 °C for 2 h. The MAPbI3−xClx films were formed by spin coating PbI2 (400 mg ml−1 in DMF) and MAI0.8Cl0.2 (45 mg ml−1 in 2-propanol) sequentially at 6,000 r.p.m. for 35 s, respectively, followed by thermal annealing at 110 °C for 1 h. The FAPbI3 films were formed by spin coating PbI2 (400 mg ml−1 in DMF) and FAI (45 mg ml−1 in 2-propanol) sequentially at 6,000 r.p.m. for 35 s, respectively, followed by thermal annealing at 120 °C for 1 h. The MAPbBr3 films were formed by spin coating PbBr2 (600 mg ml−1 in DMF) and MABr (65 mg ml−1 in 2-propanol) sequentially at 6,000 r.p.m. for 35 s, respectively, followed by thermal annealing at 100 °C for 1 h. After spin coating the above inorganic materials, the films were dried at 70 °C for 30 min before spin coating the organic component. For the solvent annealing of perovskite films, approximately 10 μl DMF was introduced into the Petri dishes during the thermal-annealing process. The devices were completed by the thermal evaporation of 50 nm gold (Au) as an electrode.

For lateral photovoltaic devices, the Au stripe arrays were first fabricated on glass substrates by photolithography—that is, the 50 nm thick Au layer was thermally deposited on a pre-patterned photoresist layer, then the photoresist was removed by acetone. The positive photoresistor, Shipley S-1813, was used. The resulting Au stripe patterns have lengths of 3 mm, and spacings of 8 μm (Fig. 2b). The total width of lateral photovoltaic devices connected in series comprising 125 cells is ~1.4 mm. Perovskite films were then fabricated on these substrates using the same method as for vertical device fabrication. The resulting structure of the lateral devices is shown schematically in Fig. 2a. The thickness of the perovskite films for both vertical and lateral device structures is 300 nm, except where specifically labelled.

Film and device characterization.

The steady-state photocurrent curves were measured under simulated AM 1.5G irradiation (100 mW cm−2) using a Xenon-lamp-based solar simulator (Oriel 67005, 150 W Solar Simulator). A Schott visible-colour glass-filtered (KG5 colour-filtered) Si diode (Hamamatsu S1133) was used to calibrate the light intensity before photocurrent measurements. A Keithley 4200 semiconductor analyser was used to apply a scanning bias and test the output current simultaneously. All the electrical tests for vertical devices were conducted in a glovebox. Lateral solar cell measurements were conducted in a probe station chamber under a vacuum of 10−3 Torr, wherein light (25 mW cm−2) was incident through a quartz window. A Keithley 240a High Voltage Supply with a maximum voltage output of 1,200 V was used for the poling process. The electrical field applied on the perovskite film is ~1.2 V μm−1 for 100 s. The poling of the cells was conducted either by poling each cell individually or by simply poling the whole area between the first and last electrodes. For lateral devices, the poling bias lasted for ~100 s, a period longer than in the vertical devices, owing to the much greater ion drift distance. After poling, the IV curves were measured using a Keithley 2400.

Observation of the in situ poling process under a microscope.

In situ observation of the ion drift under an electric field was carried out by locating the samples under an optical microscope (Olympus BX61) coupled to a high-resolution charge-coupled device (CCD) camera (Photometrics, CoolSNAP-cf). The optical microscope worked in the transmission mode with the sample illuminated from bottom. The samples were kept in a steady N2 flow during the poling process to prevent the absorption of oxygen and moisture.

KPFM, PFM and atomic force microscopy (AFM).

KPFM and AFM measurements were carried out with a Dimension Icon (Bruker) in air and in the dark. Platinum–iridium-coated conductive probes (SCM-PIT, Bruker) were used in the KPFM and AFM measurements. The PeakForce KPFM mode, combining the tapping mode AFM with frequency modulation KPFM can measure the topographic and surface potential signals of the same area. The scanning area and tip velocity were 20 μm × 20 μm and 81.4 μm s−1, respectively. The lift height for KPFM measurements was 80 nm for all samples. PFM was performed by applying a high-frequency modulation voltage (200–600 kHz, 1.0–1.5 V) to the Pt–Ti-coated silicon (Mikromasch) or Au-coated SiN tips (Olympus). Local piezoelectric hysteresis loops were measured in fixed locations on the film as a function of a d.c. bias superimposed on the a.c. modulation voltage.

For sample preparation, the vertical structure devices were first poled in a glovebox. Subsequently, most areas of the top gold electrodes were peeled off by Scotch tape, but some small areas of the Au electrode were purposely left as the reference for the KPFM surface work function.

Ferroelectricity characterization.

The ferroelectric polarization measurements were carried out using a Precision Premier II from Radiant Technologies, both at room temperature and 77 K, (by soaking the samples in liquid nitrogen for 10 min before the measurements). The voltage scanning rate applied was 0.08 V s−1, which is comparable to or slower than the rate of photocurrent scanning for the switchable photovoltaic effect study. The data was collected using the software package ‘Vision’ which is integrated in the Precision Premier II.