# Switchable photovoltaic windows enabled by reversible photothermal complex dissociation from methylammonium lead iodide

## Abstract

Materials with switchable absorption properties have been widely used for smart window applications to reduce energy consumption and enhance occupant comfort in buildings. In this work, we combine the benefits of smart windows with energy conversion by producing a photovoltaic device with a switchable absorber layer that dynamically responds to sunlight. Upon illumination, photothermal heating switches the absorber layer—composed of a metal halide perovskite-methylamine complex—from a transparent state (68% visible transmittance) to an absorbing, photovoltaic colored state (less than 3% visible transmittance) due to dissociation of methylamine. After cooling, the methylamine complex is re-formed, returning the absorber layer to the transparent state in which the device acts as a window to visible light. The thermodynamics of switching and performance of the device are described. This work validates a photovoltaic window technology that circumvents the fundamental tradeoff between efficient solar conversion and high visible light transmittance that limits conventional semitransparent PV window designs.

## Introduction

Myriad materials that adopt the oxide and halide forms of the perovskite crystal structure are known to readily accommodate intercalating species to form a rich array of unique compounds1,2. The intercalated compounds are stabilized by the formation of ionic3,4, charge-transfer complex5,6, van der Waals7,8 and π-stacked fluorylaryl-aryl bonds9. The weaker of these bonds are reversibly formed and dissociated with small energy input. Lead halide perovskites (APbX3, where A is an organic or alkali metal cation and X is a halide) have demonstrated unprecedented potential as a photovoltaic (PV) absorber10 and have also shown to reversibly form hydrates11,12,13,14 and other compounds stabilized by charge-transfer complex bonds with nitrogen-15,16,17 and oxygen-donor molecules18,19,20.

In this work, we leverage the low formation/dissociation energy of the methylammonium lead iodide-methylamine complex (CH3NH3PbI3xCH3NH2)18 to demonstrate a cohesive switchable PV window that adapts its absorption properties to solar conditions without pairing separate electrochromic and PV devices21. The PV window device utilizes solar photothermal heating to dissociate CH3NH2 from the CH3NH3PbI3 layer, thereby switching from its complexed, bleached (visibly transparent) state to its dissociated, colored (visibly opaque) state. The device is sealed in a closed atmosphere of dilute (2%) CH3NH2 gas in argon and thus returns to its complexed, bleached state upon removing the solar irradiation and cooling to re-form CH3NH3PbI3xCH3NH2. This phenomenon circumvents the fundamental tradeoff observed in conventional semitransparent PV window designs22,23,24, which sacrifice solar-to-electricity power conversion efficiency (PCE) for the high visible light transmittance critical for window performance25. Coupled with the cost-effective, scalable solution-phase processing of lead halide perovskites, this technology widely expands the opportunity for energy-efficient PV deployment beyond solar farms and rooftops to glass building facades and vehicles.

## Results

### Switchable PV window design and performance

The switchable PV window device design and reversible switching mechanism is shown in Fig. 1a, and fabrication details are outlined in the Methods section. Briefly, CH3NH3PbI3 was deposited using established methods26 on titanium dioxide (TiO2) as the electron transport layer and fluorine-doped tin oxide (FTO) as the transparent bottom contact. In order to demonstate switching in a PV device, a number of hole transport and top contact layers were explored. Four complementary layers were required in order to provide the necessary combination of high electrical conductivity, favorable energetic alignment with the CH3NH3PbI3 layer, significant transparency in the visible portion of the solar spectrum, and permeability to CH3NH2 gas (Supplementary Table 1 and Supplementary Fig. 1). We first coated the CH3NH3PbI3 with a bilayer of single-walled carbon nanotubes (SWCNTs). SWCNTs wrapped in poly(3-hexylthiophene) (SWCNT/P3HT) provide favorable energetic alignment to the CH3NH3PbI3 for hole extraction27,28, and a second layer of electronically sorted SWCNTs doped with 2,3,5,6-tetrafluoro-7,7,8,8-tetracyanoquinodimethane (SWCNTF4TCNQ) was spray-coated to improve lateral electrical transport to the top contact29. This layer was then chemically treated with trifluoroacetic acid after deposition to de-polymerize and remove the wrapping polymer to enhance electrical conductivity between the SWCNTs30. The device was completed by laminating Ni micromesh31 coated with poly(3,4-ethylenedioxythiophene):poly(styrenesulfonate) (PEDOT:PSS), an electrically conductive polymer and effective hole transport layer (Supplementary Fig. 2)32, doped with d-sorbitol that serves as an “electric glue”33. Optical and scanning electron microscopy characterization of the device stack is shown in Supplementary Fig. 3.

Figure 1b shows the transmittance of the full device stack spanning the UV to IR portions of the electromagnetic spectrum. The visible portion is highlighted to illustrate reversible switching in this region of the spectrum. The device is highly absorbing in the visible portion in its colored state with an average visible light transmittance of 3%. The visible light transmittance increases to 68% when in the bleached state. The observed decrease in transmittance for both colored and bleached states of the device in the infrared region is due to thin film interference and FTO absorption. Reduced transmittance in this range is desirable for the thermal performance of windows and is the primary function of low-emissivity films used in current high-performance window technology.

Figure 1c shows the current density–voltage curve scanned from high to low positive voltage of the switchable PV device in the dark (dashed) and under 1-sun illumination (solid). The champion device exhibits a PCE of 11.3% with an average of 10.3 ± 0.9% in five devices. A table with the performance metrics of the champion device are inset to Fig. 1c. For comparison, control devices were fabricated with Li-doped 2,2′,7,7′-tetrakis(N,N-di-p-methoxyphenylamine)-9,9′-spirobifluorene (spiro-OMeTAD) as the hole transport layer and gold as the top contact to mimic conventional CH3NH3PbI3-based PV devices26. The control devices, which do not exhibit dynamic switching behavior since gold is not permeable to CH3NH2 gas, exhibit an average PCE of 16.3 ± 0.1%. The short-circuit current density (J SC) of 21.2 mA cm−2 for the champion switchable device is identical to the control device, whereas the open-circuit voltage (V OC) and fill factor (FF) are moderately reduced in the switchable PV window device. Additional characterization of the switchable device (forward and reverse voltage sweeps, stabilized power output, and external quantum efficiency) is included in Supplementary Figs. 46.

We next demonstrate dynamic photothermal modulation of the PV window device while generating photocurrent under illumination. Figure 1d is a plot of short-circuit current output as a function of time for a device enclosed in an atmosphere of 2% CH3NH2 gas balanced with argon to atmospheric pressure. The initial complexed, bleached device was held at ambient temperature from time zero until the device was exposed to solar-simulated illumination at 30 s, indicated by gray boxes in Fig. 1d. Current was immediately observed from the device after illumination, which increased and began to plateau after 1 min. The current dropped to zero when the lamp was turned off after 3 min. The lamp was turned back on after 5 min, and this cycle was repeated 20 times in the closed atmosphere (no additional CH3NH2 gas was introduced) to demonstrate repeated cycling.

Optical images extracted from Supplementary Movie 1 in Fig. 1e show reversible color changes correlate with current during the cycling process. The exception to this correlation occurred during the initial stages of each illumination cycle, when the device produced current but did not exhibit visible color. After illumination, the current increased at a near-linear rate until 40 s of illumination when the current increased at a higher rate. This sharp rise in current was sustained for another 40 s and was accompanied by a visible color change. After 3 min, the color gradually changed from yellow-orange to dark red, corresponding to complete switching after 3 min. When the lamp was turned off, the device cooled in the chamber, which caused CH3NH2 gas to intercalate back into the CH3NH3PbI3 layer to re-form the CH3NH3PbI3xCH3NH2 complex and return the device to the bleached state after 3 min. The maximum current decreased monotonically from nearly 1 to 0.18 mA after 20 cycles. Supplementary Fig. 7 provides the same analysis as Fig. 1e for the 15th cycle, which exhibits a similar kinetic profile but at a lower current output. Whereas decreased current output may be due to delamination or degradation of transport layers, optical images show inconsistent coloration across the device compared to that following the first cycle, which suggests degradation or morphological changes to the CH3NH3PbI3 layer. The source of decreased current after cycling is discussed at length in a following section.

### Thermodynamics of complex formation and dissociation

We explain the observed reversible complex formation and dissociation process that drives photothermal switching of the PV window device using a simple thermodynamic model. The complexed state is stabilized by weak hydrogen bonds between CH3NH2 and the organic sublattice of CH3NH3PbI3 17, and its conversion to the dissociated state is dependant on the partial pressure (P) of CH3NH2 gas (g) and temperature (T) of the solid (s) phase described by

$${\mathrm{CH}}_3{\mathrm{NH}}_3{\mathrm{PbI}}_3 \bullet x{\mathrm{CH}}_3{\mathrm{NH}}_2{\mathrm{(}}s{\mathrm{)}}\mathop{\longleftrightarrow}\limits^{{P,T}}{\mathrm{CH}}_3{\mathrm{NH}}_3{\mathrm{PbI}}_3{\mathrm{(}}s{\mathrm{)}} + x{\mathrm{CH}}_3{\mathrm{NH}}_2{\mathrm{(}}g{\mathrm{)}}$$
(1)

The methylamine complex CH3NH3PbI3xCH3NH2 has been shown to form a solid at lower x values (x ≈ 1, 2 based on prior work on hydrates11) and a second glassy solvate (liquid) phase at higher values of x 17,34,35. Here we will focus on the solid complex observed at low CH3NH2 pressures that keeps x low and the complex in the solid regime17. As demonstrated in previous work on thermochemical energy storage36,37, the thermodynamics of Eq. (1) are described by the Clausius–Clapeyron relation where the volume is constant and assumed to be equal to the volume of gas37,38:

$${\mathrm{ln}}\,P(T) = \frac{{{\mathrm{\Delta }}G_{\mathrm{i}}}}{{xRT}} = - \left( {\frac{{{\mathrm{\Delta }}H_{\mathrm{i}}}}{{xR}}} \right)\left( {\frac{1}{T}} \right) + \frac{{{\mathrm{\Delta }}S_{\mathrm{i}}}}{{xR}}$$
(2)

where R is the ideal gas constant (8.31 mol–1 K–1), ΔG i, ΔH i, and ΔS i are the Gibb’s energy change, enthalpy change, and entropy change, respectively. The subscript $$i$$ corresponds to the formation of the complexed bleached state or dissociated colored state. Contributions to ΔG i thus include complex formation and dissociation, ionic bond formation or destruction in the CH3NH3PbI3 lattice, sublimation or condensation, and mixing.

Lines of constant ΔG Colored and ΔG Bleached are shown in the Clausius–Clapeyron diagram, which plots CH3NH2 gas pressure vs. reciprocal temperature (Fig. 2). The lines are separated by a regime of pseudo-equilibrium, which depends on the rates of the forward and reverse reactions37. If one of the free parameters (e.g., P) is fixed, the variance is zero and phase transition occurs at a certain temperature T. The line from point A to point B shows the isothermal transition from the colored state (CH3NH3PbI3(s)+xCH3NH2(g)) to the bleached state (CH3NH3PbI3xCH3NH2(s)) at room temperature (T 0). P Min is the minimum pressure of CH3NH2 gas needed for full transition to the bleached state. The line from B to C shows an isobaric transition back to the phase-segregated state, which requires a minimum temperature T Min. For window applications, the transition temperature must be below what can be practically attained by solar photothermal heating. This is typically less than 75 °C for most climates5, so this temperature defines T Solar (shaded region in Fig. 2). The switching temperature of conventional vanadium dioxide thermochromic window technology is thus engineered closer to 45 °C for practical application7.

We investigate the thermodynamics of reversible complex formation illustrated in Fig. 3 using in situ differential Fourier transform infrared spectroscopy (FTIR). A film of CH3NH3PbI3 having thickness W 1 was deposited onto an attenuated total reflectance (ATR) crystal, and the differential FTIR spectra were monitored by varying CH3NH2 gas pressure at ambient temperature as well as modulating temperature at a constant partial pressure (Fig. 3a). Before CH3NH2 gas was introduced, the film was placed under static vacuum (approximately 40 × 10−3 Torr), and the FTIR intensity from this film was zeroed at room temperature to give the red baseline spectrum in Fig. 3b (point A in Fig. 2). CH3NH3PbI3xCH3NH2 formation was not observed by eye or in the FTIR spectrum after the addition of 2 Torr (orange spectrum) and 7 Torr (green spectrum) of CH3NH2 gas. At 11 Torr, the film bleached and produced positive and negative peaks in the differential FTIR spectrum (point B in Fig. 2, data not shown). The intensity of these peaks remained constant between 11 and 41 Torr CH3NH2 (blue spectrum, point D in Fig. 2), indicating a P Min of approximately 11 Torr of CH3NH2 for the room-temperature transition from the colored state to the bleached state. The positive peaks in the 41 Torr spectrum are due to vibrational modes of complexed CH3NH2. Negative peaks are attributed to loss of intensity from CH3NH3 + due to film thickness increase (W 2 > W 1) as a result of CH3NH2 intercalation into the film39.

Figure 3c shows the isobaric (41 Torr CH3NH2) evolution of the CH3NH3PbI3xCH3NH2 film as temperature is increased from T 0 to 65 °C. We focus on the N–H stretching vibrations of the perovskite A-site cation CH3NH3 + and complexed CH3NH2. Positive intensity from CH3NH2 is centered at 3250 cm−1, and negative intensity due to CH3NH3 + is centered at 3130 cm−1. The FTIR spectrum is constant from T 0 (point D in Fig. 2) up to 35 °C, showing the expected large negative intensity CH3NH3 + and positive intensity CH3NH2 peaks for the CH3NH3PbI3xCH3NH2 film relative to the dissociated CH3NH3PbI3 film (baseline). At 40 °C, a threefold reduction in negative CH3NH3 + intensity was observed in conjunction with a nearly twofold reduction in positive CH3NH2 intensity, which both indicate significant dissociation of CH3NH3PbI3xCH3NH2 into CH3NH2(g) and CH3NH3PbI3(s) phases. Intensity from all species was further reduced as the temperature was increased to 65 °C (point E in Fig. 2), though the intensity never returned to the baseline level, suggesting that complete dissociation does not occur under these conditions. However, the presence of a clear isosbestic point at 3225 cm−1 during this isobaric experiment suggests the lack of intermediates between these two phases. This evidence supports nearly complete and rapid CH3NH2 dissociation at the threshold temperature, consistent with the Clausius–Clapeyron diagram in Fig. 2 in which the pseudo-equilibrium region is narrow.

Finally, in Fig. 3d we show the isobaric temperature-driven complex formation and dissociation during repeated cycling as demonstrated in the PV window device described in Fig. 1. Two bleached-to-colored cycles were completed by heating the ATR crystal to 60 °C (red spectra) and allowing it to cool to 25 °C (blue spectra) under 11 Torr CH3NH2. It is clear from the inset optical images that the film visible transmittance switching behavior is correlated to the intensity changes of the N–H stretching vibrations. Importantly, the cumulative observations from these isobaric experiments indicate that for reasonable CH3NH2 pressures (11–41 Torr), solar thermal temperatures only need to exceed a T Min of ca. 35 °C for switching the PV window into the colored state to generate photocurrent. Such temperatures are readily achievable in most climate zones5 and can be tuned by the pressure of CH3NH2 gas to accommodate a desired switching threshold.

### Mechanism of switchable device degradation

Building-integrated PV must be durable. For instance, existing dynamic smart window technologies are tested out to 50,000 switching cycles using standard durability evaluation methods. Figure 1d shows the performance of our demonstration PV device was reduced over the course of 20 switching cycles. We fabricated photoresistors in order to elucidate the degradation mechanism (Fig. 4a). The symmetric FTO lateral contact architecture allows monitoring changes in electrical performance, morphology, and chemistry of the CH3NH3PbI3 film without complications arising from the additional gas-porous top contact layers required for a switchable PV device.

Figure 4b shows current as a function of time for a photoresistor composed of CH3NH3PbI3 in the absence of CH3NH2 (0 Torr CH3NH2) to investigate the effects of photothermal cycling without CH3NH3PbI3xCH3NH2 formation and dissociation. The photoresistor was biased at the maximum power point voltage of the PV devices shown in Fig. 1 (0.65 V) and cycled using 3-min photothermal heating followed by 5-min cooling. Current output of the device decreases monotonically by 39% over the course of 20 cycles. X-ray photoelectron spectroscopy (XPS) analysis suggests that this is due to chemical degradation since the film becomes more Pb-rich after cycling (Supplementary Table 2). CH3NH3PbI3 is known to evolve CH3NH2 and hydrogen iodide at elevated temperatures to yield PbI2 within the CH3NH3PbI3 film40, and this degradation pathway is consistent with our observations.

In contrast to CH3NH3PbI3, the switchable photoresistor composed of CH3NH3PbI3xCH3NH2 (11 Torr CH3NH2, Fig. 4c) did not show decreased current output after 20 cycles. The presence of CH3NH2 is likely beneficial to the stability of the device current output, as CH3NH2 gas is thought to “heal” defects in CH3NH3PbI3 films18. XPS analysis shows the switchable photodector maintains stoichiometry closer to the control sample that was not cycled, suggesting that CH3NH2 suppresses decomposition to PbI2 via Le Chatelier’s principle. The longer switching onset (by ~30 s) and non-saturated current for the CH3NH3PbI3xCH3NH2 (Fig. 4c) relative to the switchable PV device shown in Fig. 1d appears to be due to lower light absorption (~10%, compared to 20–40% for the PV stack), which produces slower photothermal heating for the photoresistor. Longer illumination times led to current saturation and reduced current output that more closely resemble the trend observed in the PV device (Supplementary Fig. 9).

Optical microscopy of the devices after 20 cycles provides the most illustrative insight into the decreased PV device performance. Figure 4d shows an optical microscope image of the 0 Torr CH3NH2 photoresistor, which is morphologically unchanged from when it was deposited at the scale that can be observed with the microscope. In contrast, the switchable photoresistor (11 Torr CH3NH2, Fig. 4e) shows roughness on the order of microns to tens of microns. This is an interesting result in comparison to established practice17,18,35 where CH3NH3PbI3 films are briefly exposed to CH3NH2 gas and annealed in a  CH3NH2-free environment to yield higher quality films. In contrast, CH3NH3PbI3 quality is decreased when annealed in presence of a significant partial pressure of CH3NH2. Morphology is further disrupted with longer illumination times (Supplementary Fig. 9). The loss of current with cycle number provides the most compelling evidence of decreased PV performance, whereas the microscope images provide the best window into the mechanism underlying the decrease in performance. Morphology changes likely lead to delamination of adjacent SWCNT and Ni grid hole transport layers, dewetting from the TiO2 layer, and formation of paths for electrical shorting through the device. It is clear that morphological control using device architecture, patterning, or compositional additives, for example, will be necessary in the future development of switchable PV devices based on CH3NH3PbI3xCH3NH2 films.

## Discussion

In this work, we demonstrated a PV window device with optical properties that are photothermally modulated using solar illumination. The devices feature solar energy conversion efficiencies as high as 11.3% in the colored state, high visible light transmittance (68%) in the bleached state, reversible switching over 20 cycles, low switching temperature accessible by solar irradiation in most climates, and fast switching time (less than 3 min). Switching is enabled by reversible dissociation of a methylamine complex with CH3NH3PbI3 using solar photothermal energy. The thermodynamics of complex formation and dissociation were described by the Clausius–Clapeyron relation and empirically supported by in situ differential FTIR spectroscopy of the pressure–temperature dependance of the associated phase transitions. Photoresistor studies show the switchable CH3NH3PbI3•xCH3NH2 layer has potential for long-term chemical stability, but physical changes to the film during switching leads to decreased PV device performance over time due to CH3NH2 loss and disruption of the film morphology. Switchable PV technology circumvents the fundamental tradeoff between power conversion and visible transmittance of conventional semitransparent PV windows and facilitates deployment strategies beyond the current paradigm of rooftops and solar farms.

## Methods

### Absorber layer solution

The solution used to solubilize CH3NH3PbI3 precursors was obtained by charging acetonitrile with CH3NH2 gas. Acetonitrile was de-gassed using three freeze–pump–thaw cycles and placed in an airtight flask. CH3NH2 gas was flown into the vessel through a Schlenk-line assembly. The acetonitrile was charged until a 10% by mass CH3NH2 solution was achieved. The flask was sealed and stored in a −20 °C freezer. Solution was removed with a needle through the septum to keep the solution isolated from air exposure. Adding 1 ml CH3NH2-charged acetonitrile to 261 mg PbI2 and 87 mg methylammonium iodide formed a typical 0.55 M precursor solution used for devices.

### FTIR measurements

A Bruker Alpha FTIR spectrometer outfitted with a diamond ATR crystal attachment was used in the study. A CH3NH3PbI3 film was deposited onto an ATR crystal by drop-casting a 55 mM solution. Diluting a 0.55 M solution with acetonitrile charged with 10% CH3NH2 by mass formed the solution. The film was annealed at 100 °C for 30 min in Ar. Securing a custom glass chamber over the ATR crystal stage with a Viton O-ring enclosed the film. The film was pumped down with a roughing pump overnight to obtain a base pressure of 90 mTorr (12 Pa). CH3NH2 was introduced into the glass jar at varying pressure measured with a Varian type 0531 vacuum gauge. The vacuum gauge was calibrated to measure CH3NH2 using a 100 Torr range MKS Barotron pressure transducer. In Fig. 3d, the atmosphere was balanced with argon to slightly above atmospheric pressure (627 Torr (83,593 Pa) measured on a 1000 Torr range MKS Barotron pressure transducer). The temperatures reported are those measured and delivered to the ATR stage with OPUS 7.2 software. Spectra shown at 60 °C were taken after the 3 min it took to ramp to that temperature. Spectra shown at 25 °C were taken after 21 min, which is the time needed to cool and stabilize at that temperature. The backgrounds of the resulting spectra were nonlinear due to thin film diffraction from change in the CH3NH3PbI3 film thickness. The background was subtracted using a third-order polynomial fit using IGOR Pro version 6.37. One fit was used to subtract the baseline at each temperature. The raw data and polynomial fits are shown in Supplementary Fig. 2.

### Photothermal switching of CH3NH3PbI3•xCH3NH2(s) films

Glass was cut into a 1-mm-thick 2.5 cm × 2.5 cm square, sonicated in acetone for 15 min, and blown dry with dry air. The substrates were treated in a UV-ozone cleaner for 15 min before spin-coating a 0.55 M solution composed of methylammonium iodide and PbI2 (5% excess) and the 10% CH3NH2 in acetonitrile solution onto the substrate at 2000 rpm for 20 s. The film was annealed at 100 °C for 30 min on a hot plate. Photothermal switching of CH3NH3PbI3 films was measured in a custom-built glass chamber outfitted with optical ports and feedthroughs for gas input/output and a pressure gauge. The glass substrate with CH3NH3PbI3 was cut into 1 cm × 1 cm square. Note: The thermal mass, and thus size, of the substrates plays an important role in switching kinetics. The sample was secured in the chamber with a clip facing the optical port, sealed with a Viton O-ring and clamp, and pumped down overnight to reach a base pressure of 70–90 mTorr (12 Pa), which was measured with a Varian type 0531 vacuum gauge. CH3NH2 was introduced into the chamber and backfilled with argon to reach slight overpressure above atmospheric pressure (~720 Torr = 95,992 Pa). A Cole-Palmer Illuminator 41,720-series was used for solar-simulated illumination. The lamp was used to approximate solar conditions by adjusting the intensity to between 500 and 1500 W m−2 using a Newport power meter (model 841-PE) with a model 818P-015-19 sensor head.

### SWCNT/P3HT ink preparation

This procedure follows directly from ref.7. Powdered SWCNTs produced by the CoMoCAT process, SWeNT CG200, were purchased from Sigma-Aldrich. The producers of this material report a diameter range of 0.7–1.4 nm and a relative purity of 90% as the percentage of carbon that is present as SWNTs. rr-P3HT (3.0 mg; Rieke Metals Inc.; average molecular weight of 50,000 g mol−1 and regioregularity of 95%) was dissolved in 5.00 ml of chlorobenzene and sonicated in a bath sonicator for 60 min. SWCNTs (2.5 mg) were added, as purchased, to the dissolved polymer solution and treated with a Cole Parmer 750 W ultrasonic probe, operating at 100% power, for 10 min. After sonication, 5 ml of chlorobenzene was added to improve the solubility of the polymer–nanotube hybrids. The mixture was subsequently centrifuged for 8 min at 10,000 g (Beckman Coulter ultracentrifuge, SW32Ti rotor) to remove unfunctionalized SWCNTs and other carbonaceous particles. The precipitate was discarded, and the supernatant was recovered. Ten milliliters toluene was added in order to remove the excess polymer. The mixture was then mildly heated for 60 min to induce aggregation of the functionalized SWNTs. The aggregates were then removed by centrifugation (4 min at 16,000 g). The supernatant containing excess polymer was discarded, and the precipitate was recovered. The pellet consisted of 1.5–1.6 mg of polymer-wrapped nanotubes, which were dispersed in 6 ml of chloroform. Immediately prior to spin-coating, the chloroform dispersion was sonicated with an ultrasonic probe for 1 min at low intensity (10% of amplitude) to break up clusters and bundles.

### SWCNTF4TCNQ ink preparation

SWCNTs were synthesized in-house at NREL via laser vaporization of a graphite target at a furnace temperature of 1125 °C. The imine-based polyfluorene dispersing polymer, poly[(9,9-di-n-dodecyl-2,7-fluorendiyl-dimethine)-(1,4-phenylene-dinitrilomethine)] (PFPD), was synthesized in-house as described in ref.41. To disperse the SWCNTs, 1.4 mg ml−1 SWCNTs and 2 mg ml−1 PFPD were added to toluene and processed using an ultrasonic probe for 15 min while the vial was submerged in a bath of dry ice and methanol. Following ultrasonication, the undispersed material is pelleted out via 5 min ultracentrifugation (13,200 rpm, 20°C) using a Beckman Coulter SW32Ti rotor. The supernatant was retained and underwent further ultracentrifugation (20 h, 24,100 rpm, 0 °C) to remove excess PFPD. The resulting pellet, containing highly enriched semiconducting SWCNTs wrapped with PFPD (SWCNT/PFPD), was re-dispersed in neat toluene. The SWCNT/PFPD ink was doped in solution phase by adding 250 μg ml−1 using 2,3,5,6-tetrafluoro-7,7,8,8-tetracyanoquinodimethane (F4TCNQ). The bleach of the S11 transition in the optical absorption spectrum of the ink after adding F4TCNQ indicates successful doping (Supplementary Fig. 3).

### Switchable PV device fabrication

Substrates with pre-patterned FTO deposited on glass were purchased from Thin Film Devices, Inc. The glass was 1 mm thick. Thicker glass leads to longer switching kinetics. The substrates were sonicated in acetone for 15 min and blown dry with dry air. The substrates were treated in a UV-ozone cleaner for 15 min before spin-coating 100 μl of a presursor solution prepared by diluting 0.5 ml 75 wt. %  titanium diisopropoxide bis(acetylacetonate) in 2-propanol with 6.65 ml 1-butanol   at 700 rpm for 10 s, followed by 1000 rpm for 10 s, and finally 2000 rpm for 30 s. The resulting film is placed on a hot plate at 125 °C for at least 2 min to evaporate solvent and then placed in a 500 °C furnace to sinter into TiO2. 100 μL of the absorber layer solution was spin-coated onto the substrate at 2000 rpm for 20 s in an inert atmosphere glovebox. The film was annealed at 100 °C for 30 min in the glovebox to yield a CH3NH3PbI3 layer. The SWCNT/P3HT were deposited onto the CH3NH3PbI3 layer by spinning the substrate at 3000 rpm and dropping 300 μl of the SWCNT/P3HT dispersion at a rate of approximately 1 drop every 3 s. SWCNTF4TCNQ thin films were deposited onto the device according to a procedure developed by Tenent et al.42 using ultrasonic spray deposition. Briefly, CH3NH3PbI3 films on TiO2/glass substrates were heated to 130 °C on the stage in the spray chamber. Then, the SWCNTF4TCNQ ink was sprayed using dispersion flow rate of 0.25 ml min−1, gas flow rate of 7.0 std l min−1, and nozzle power at 0.8 W for 30 coats. After deposition, the films were soaked at 80 °C in a solution of 10 μl ml−1 of trifluoroacetic acid (Sigma-Aldrich) in toluene for 30 s, followed by a rinse in neat toluene to fully remove the wrapping polymer, PFPD. Ni micromesh composed of a square network of 14 μm × 14 μm Ni bars with 268 μm × 268 μm holes was purchased from Precision Eforming, Inc. A 2-inch × 4-inch piece of mesh was attached to an aluminum plate using polyimide tape. The aluminum plate is attached to a hot plate with polyimide tape and set to 120 °C. PEDOT:PSS (CLEVIOS PH1000, 1.3% weight aqueous suspension) was purchased from Heraeus. Three milliliters of undiluted PEDOT:PSS was combined with 450 mg d-sorbitol and 136 μl dimethylsulfoxide and stirred with a magnetic stir bar for 15 min. The solution was sprayed onto the micromesh on the hot plate using an airbrush (Master Airbrush Model S68). The PEDOT layer is sprayed with 10 passes at a rate of approximately 1 in. s−1 at a distance of 6 in. from the mesh with the airbrush throttle fully open. The PEDOT:PSSD-Sorbitol was annealed for 10 min after spraying and then cooled to room temperature before being cut into ~3 mm × 11 mm strips. Transferring the strips with a tweezers to cover the active area and pressing with gentle finger pressure through a flexible polyethylene terephthalate substrate completes the switchable PV device.

### Photoresistor fabrication

Substrates with FTO deposited on glass were purchased from Thin Film Devices, Inc. A 100 μm channel was scribed into the FTO using a Q-switched, 532 nm Nd:YAG laser scribing system. The substrates were sonicated in acetone for 15 min and blown dry with dry air. The substrates were treated in a UV-ozone cleaner for 15 min before spin-coating CH3NH3PbI3 using the same procedure as the PV devices.

### UV–vis–NIR transmittance measurements

Measurements were carried out on a Cary-6000i spectrometer with an integrating sphere attachment. Devices were scored and cleaved to roughly 1 cm wide to fit into cuvettes. Silicone oil was placed on the back side of the device to adhere it to the cuvette and avoid additional thin film interference. The cuvette was sealed with a septum, and the atmosphere was removed with a roughing pump through a needle. For the bleached state measurement, 5% CH3NH2 partial pressure was added to the cuvette and backfilled with argon. The cuvette was filled with argon for the colored state measurement.

### XPS measurements

XPS data were obtained on a Physical Electronics 5600 photoemission system using monochromatic Al K α (1486.7 eV) radiation.

### PV device measurements

Devices were tested in a nitrogen-filled glovebox using a Newport Oriel Sol3A solar simulator with a xenon lamp. A calibrated reference solar cell (either GaAs or KG5 filtered Si to minimize the spectral mismatch) was used to set the intensity of the lamp to 1000 W m−2 AM1.5 conditions. Current density–voltage scans were taken in both directions with a scan rate of 225 mV s−1, step size of 10 mV, delay time of 10 ms, and number of power line cycles of 1. Device area was 0.10 cm2. Devices were measured with and without a metal aperture (0.056 cm2) and produced equivalent current densities. Stabilized power output was measured by holding the device at a constant voltage corresponding to the voltage at the maximum power point of the JV scan. External quantum efficiency (EQE) measurements were taken using a Newport Oriel IQE200.

### Photocurrent measurement in switching devices

Dynamic photoresponse of PV or photoresistor devices was measured in a custom-built glass chamber outfitted with optical ports, feedthroughs for gas input/output, electrical connection, and a pressure gauge. A PV or photoresistor device was cut into 1 cm × 1 cm squares and secured in the chamber with a clip. The electrical connection to the device was made with alligator clips and fed through the chamber to a Kiethley 2400 sourcemeter interfaced to a computer. The chamber is sealed with a Viton O-ring and clamp and pumped down overnight to reach a base pressure of 70–90 mTorr measured with a Varian type 0531 vacuum gauge. Five percent CH3NH2 partial pressure is introduced into the chamber and backfilled with argon to reach slight overpressure above atmospheric pressure of ~720 Torr. A Cole-Palmer Illuminator 41,720-series is used for solar-simulated illumination. The lamp was used to approximate solar conditions by adjusting the intensity to between 500 and 1500 W m−2 using a Newport power meter (model 841-PE) with a model 818P-015-19 sensor head.

### Crystal structures

Crystal structures in Fig. 1a were for illustrative purposes only, as the actual structure of CH3NH3PbI3xCH3NH2 was not determined. The images were generated from a .cif file of CH3NH3PbI3•H2O from ref. 11 using Jmol open-source software. Hydrogen is not shown.

### Data availability

All data used in this study are available from the corresponding authors upon reasonable request.

## References

1. 1.

Nicolosi, V., Chhowalla, M., Kanatzidis, M. G., Strano, M. S. & Coleman, J. N. Liquid exfoliation of layered materials. Science 340, 1226419 (2013).

2. 2.

Smith, I. C., Smith, M. D., Jaffe, A., Lin, Y. & Karunadasa, H. I. Between the sheets: postsynthetic transformations in hybrid perovskites. Chem. Mater. 29, 1868–1884 (2017).

3. 3.

Xia, H.-R., Sun, W.-T. & Peng, L.-M. Hydrothermal synthesis of organometal halide perovskites for Li-ion batteries. Chem. Commun. 51, 13787–13790 (2015).

4. 4.

Bohnke, O., Bohnke, C. & Fourquet, J. L. Mechanism of ionic conduction and electrochemical intercalation of lithium into the perovskite lanthanum lithium titanate. Solid State Ionics 91, 21–31 (1996).

5. 5.

Lee, E. S., Pang, X., Hoffmann, S., Goudey, H. & Thanachareonkit, A. An empirical study of a full-scale polymer thermochromic window and its implications on material science development objectives. Sol. Energy Mater Sol. Cells 116, 14–26 (2013).

6. 6.

Schaak, R. E. & Mallouk, T. E. Perovskites by design: a toolbox of solid-state reactions. Chem. Mater. 14, 1455–1471 (2002).

7. 7.

Takahashi, I., Hibino, M. & Kudo, T. Thermochromic properties of double-doped VO2 thin films prepared by a wet coating method using polyvanadate-based sols containing W and Mo or W and Ti. Jpn. J. Appl. Phys. 40, 1391–1395 (2001).

8. 8.

Quan, L. N. et al. Ligand-stabilized reduced-dimensionality perovskites. J. Am. Chem. Soc. 138, 2649–2655 (2016).

9. 9.

Mitzi, D. B., Medeiros, D. R. & Malenfant, P. R. L. Intercalated organic−inorganic perovskites stabilized by fluoroaryl−aryl interactions. Inorg. Chem. 41, 2134–2145 (2002).

10. 10.

Zhang, W., Eperon, G. E. & Snaith, H. J. Metal halide perovskites for energy applications. Nat. Energy 1, 16048 (2016).

11. 11.

Vincent, B. R., Robertson, K. N., Cameron, T. S. & Knop, O. Alkylammonium lead halides. Part 1. Isolated PbI6 4− ions in (CH3NH3)4PbI6•2H2O. Can. J. Chem. 65, 1042–1046 (1987).

12. 12.

Halder, A., Choudhury, D., Ghosh, S., Subbiah, A. S. & Sarkar, S. K. Exploring thermochromic behavior of hydrated hybrid perovskites in solar cells. J. Phys. Chem. Lett. 6, 3180–3184 (2015).

13. 13.

Leguy, A. M. A. et al. Reversible hydration of CH3NH3PbI3 in films, single crystals, and solar cells. Chem. Mater. 27, 3397–3407 (2015).

14. 14.

Christians, J. A., Miranda Herrera, P. A. & Kamat, P. V. Transformation of the excited state and photovoltaic efficiency of CH3NH3PbI3 perovskite upon controlled exposure to humidified air. J. Am. Chem. Soc. 137, 1530–1538 (2015).

15. 15.

Jeon, N. J. et al. Solvent engineering for high-performance inorganic–organic hybrid perovskite solar cells. Nat. Mater. 13, 897–903 (2014).

16. 16.

Hao, F., Stoumpos, C. C., Liu, Z., Chang, R. P. H. & Kanatzidis, M. G. Controllable perovskite crystallization at a gas–solid interface for hole conductor-free solar cells with steady power conversion efficiency over 10%. J. Am. Chem. Soc. 136, 16411–16419 (2014).

17. 17.

Zhao, T. et al. Design rules for the broad application of fast (<1 s) methylamine vapor based, hybrid perovskite post deposition treatments. RSC Adv. 6, 27475–27484 (2016).

18. 18.

Zhou, Z. et al. Methylamine-gas-induced defect-healing behavior of CH3NH3PbI3 thin films for perovskite solar cells. Angew. Chem. Int. Ed. 54, 9705–9709 (2015).

19. 19.

Huang, W., Manser, J. S., Sadhu, S., Kamat, P. V. & Ptasinska, S. Direct observation of reversible transformation of CH3NH3PbI3 and NH4PbI3 induced by polar gaseous molecules. J. Phys. Chem. Lett. 7, 5068–5073 (2016).

20. 20.

Zhao, Y. & Zhu, K. Optical bleaching of perovskite (CH3NH3)PbI3 through room-temperature phase transformation induced by ammonia. Chem. Commun. 50, 1605 (2014).

21. 21.

Davy, N. C. et al. Pairing of near-ultraviolet solar cells with electrochromic windows for smart management of the solar spectrum. Nat. Energy 2, 17104–17110 (2017).

22. 22.

Jung, J. W., Chueh, C.-C. & Jen, A. K. Y. High-performance semitransparent perovskite solar cells with 10% power conversion efficiency and 25% average visible transmittance based on transparent CuSCN as the hole-transporting material. Adv. Energy Mater. 5, 1500486 (2015).

23. 23.

Forberich, K., Guo, F., Bronnbauer, C. & Brabec, C. J. Efficiency limits and color of semitransparent organic solar cells for application in building-integrated photovoltaics. Energy Technol. 3, 1051–1058 (2015).

24. 24.

Chen, K.-S. et al. Semi-transparent polymer solar cells with 6% PCE, 25% average visible transmittance and a color rendering index close to 100 for power generating window applications. Energy Environ. Sci. 5, 9551 (2012).

25. 25.

Treml, B. E. & Hanrath, T. Quantitative framework for evaluating semitransparent photovoltaic windows. ACS Energy Lett. 1, 391–394 (2016).

26. 26.

Noel, N. K. et al. A low viscosity, low boiling point, clean solvent system for the rapid crystallisation of highly specular perovskite films. Energy Environ. Sci. 10, 145–152 (2017).

27. 27.

Habisreutinger, S. N. et al. Carbon nanotube/polymer composites as a highly stable hole collection layer in perovskite solar cells. Nano Lett. 14, 5561–5568 (2014).

28. 28.

Habisreutinger, S. N., Wenger, B., Snaith, H. J. & Nicholas, R. J. Dopant-free planar n–i–p perovskite solar cells with steady-state efficiencies exceeding 18%. ACS Energy Lett. 2, 622–628 (2017).

29. 29.

Pfeiffer, M., Beyer, A., Fritz, T. & Leo, K. Controlled doping of phthalocyanine layers by cosublimation with acceptor molecules: a systematic Seebeck and conductivity study. Appl. Phys. Lett. 73, 3202–3204 (1998).

30. 30.

Norton-Baker, B. et al. Polymer-free carbon nanotube thermoelectrics with improved charge carrier transport and power factor. ACS Energy Lett. 1, 1212–1220 (2016).

31. 31.

Bryant, D. et al. A transparent conductive adhesive laminate electrode for high-efficiency organic-inorganic lead halide perovskite solar cells. Adv. Mater. 26, 7499–7504 (2014).

32. 32.

You, J. et al. Low-temperature solution-processed perovskite solar cells with high efficiency and flexibility. ACS Nano 8, 1674–1680 (2014).

33. 33.

Ouyang, J. & Yang, Y. Conducting polymer as transparent electric glue. Adv. Mater. 18, 2141–2144 (2006).

34. 34.

Pang, S. et al. Transformative evolution of organolead triiodide perovskite thin films from strong room-temperature solid–gas interaction between HPbI3-CH3NH2 precursor pair. J. Am. Chem. Soc. 138, 750–753 (2016).

35. 35.

Zong, Y. et al. Thin-film transformation of NH4PbI3 to CH3NH3PbIPerovskite: a methylamine-induced conversion-healing process. Angew. Chem. 128, 14943–14947 (2016).

36. 36.

Cot-Gores, J., Castell, A. & Cabeza, L. F. Thermochemical energy storage and conversion: a-state-of-the-art review of the experimental research under practical conditions. Renew. Sustain. Energy Rev. 16, 5207–5224 (2012).

37. 37.

Bevers, E. R. T., van Ekeren, P. J., Haije, W. G. & Oonk, H. A. J. Thermodynamic properties of lithium chloride ammonia complexes for application in a high-lift high temperature chemical heat pump. J. Therm. Anal. Calorim. 86, 825–832 (2006).

38. 38.

Goetz, V. & Marty, A. A model for reversible solid-gas reactions submitted to temperature and pressure constraints: simulation of the rate of reaction in solid-gas reactor used as chemical heat pump. Chem. Eng. Sci. 47, 4445–4454 (1992).

39. 39.

Idígoras, J. et al. The interaction between hybrid organic-inorganic halide perovskite and selective contacts in perovskite solar cells: an infrared spectroscopy study. Phys. Chem. Chem. Phys. 18, 13583–13590 (2016).

40. 40.

Nenon, D. P. et al. Structural and chemical evolution of methylammonium lead halide perovskites during thermal processing from solution. Energy Environ. Sci. 9, 2072–2082 (2016).

41. 41.

Lei, T., Chen, X., Pitner, G., Wong, H. S. P. & Bao, Z. Removable and recyclable conjugated polymers for highly selective and high-yield dispersion and release of low-cost carbon nanotubes. J. Am. Chem. Soc. 138, 802–805 (2016).

42. 42.

Tenent, R. C. et al. Ultrasmooth, large-area, high-uniformity, conductive transparent single-walled-carbon-nanotube films for photovoltaics produced by ultrasonic spraying. Adv. Mater. 21, 3210–3216 (2009).

## Acknowledgements

The authors would like to thank Bobby To for SEM data, Severin Habisreutinger for SWNT/P3HT preparation, and Talysa Klein for photoresistor substrates. We also thank Jao Van De Lagemaat, Jeff Christians, and Joey Luther for helpful guidance and discussion. D.T.M. acknowledges support from NREL’s LDRD Director’s Fellowship program. The National Renewable Energy Laboratory’s Laboratory Directed Research and Development Program funded R.C.T., D.T.M., and L.M.W. for degradation studies. The U.S. Department of Energy, Office of Science, Office of Basic Energy Sciences, Division of Chemical Sciences, Geosciences, and Biosciences supported all other work under contract number DE-AC36-08GO28308 to NREL.

## Author information

Authors

### Contributions

L.M.W. designed experiments and thermodynamic model, developed hole transport layers, fabricated and tested PV window devices, performed in situ FTIR experiments, interpreted data, and wrote the manuscript. D.T.M. prepared absorber layer solution, fabricated and tested control PV devices, performed optical microscopy, and contributed to design of photoresistor studies. R.I. developed solution-doped SWCNT ink, spray-coated SWCNT films, and performed subsequent film treatment. N.J.S. prepared the SWCNT ink. J.L.B. contributed to experimental design and top contact development. E.M.M. performed and interpreted XPS experiments. R.C.T. contributed to experimental design and data interpretation. N.R.N. designed experiments, interpreted data, and wrote the manuscript. All authors contributed to editing the manuscript.

### Corresponding authors

Correspondence to Lance M. Wheeler or Nathan R. Neale.

## Ethics declarations

### Competing interests

The authors declare no competing financial interests.

Publisher's note: Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.

## Rights and permissions

Reprints and Permissions

Wheeler, L.M., Moore, D.T., Ihly, R. et al. Switchable photovoltaic windows enabled by reversible photothermal complex dissociation from methylammonium lead iodide. Nat Commun 8, 1722 (2017). https://doi.org/10.1038/s41467-017-01842-4

• Accepted:

• Published:

• ### A temperature gradient-induced directional growth of a perovskite film

• Lianzheng Hao
• , Zhipeng Li
• , Li Wang
• , Ranran Liu
• , Zhipeng Shao
• , Zhongmin Zhou
• , Xin Guo
• , Guanglei Cui
• , Shengzhong Frank Liu
•  & Shuping Pang

Journal of Materials Chemistry A (2020)

• ### The effect of urban morphology on the solar capacity of three-dimensional cities

• Rui Zhu
• , Man Sing Wong
• , Linlin You
• , Paolo Santi
• , Janet Nichol
• , Hung Chak Ho
• , Lin Lu
•  & Carlo Ratti

Renewable Energy (2020)

• ### First-Principles Investigations to Evaluate the Spin-Polarized Metal-to-Insulator Transition of Halide Cuprite Perovskites for Smart Windows

• June Ho Lee
• , Seong Hun Kim
• , Kyung-Yeon Doh
• , Eun Ho Kim
•  & Donghwa Lee

Journal of the American Chemical Society (2020)

• ### Ultrathin Nano-Absorbers in Photovoltaics: Prospects and Innovative Applications

• Maximilian Götz
• , Norbert Osterthun
• , Kai Gehrke
• , Martin Vehse
•  & Carsten Agert

Coatings (2020)

• ### Temperature-modulating rectifier behavior and photovoltaic response of VOx /Nb:SrTiO3 heterojunctions

• Ya Bin Zhu
• , Yi Xuan Liu
• , Ji Wang
• , Li Zhao
• , Kuo Zhan
•  & Yun Lin Chen

Journal of Physics D: Applied Physics (2020)