Tackling Humidity with Designer Ionic Liquid-Based Gas Sensing Soft Materials

Relative humidity is simultaneously a sensing target and a contaminant in gas and volatile organic compound (VOC) sensing systems, where strategies to control humidity interference are required. An unmet challenge is the creation of gas-sensitive materials where the response to humidity is controlled by the material itself. Here, humidity effects are controlled through the design of gelatin formulations in ionic liquids without and with liquid crystals as electrical and optical sensors, respectively. In this design, the anions [DCA]− and [Cl]− of room temperature ionic liquids from the 1-butyl-3-methylimidazolium family tailor the response to humidity and, subsequently, sensing of VOCs in dry and humid conditions. Due to the combined effect of the materials formulations and sensing mechanisms, changing the anion from [DCA]− to the much more hygroscopic [Cl]−, leads to stronger electrical responses and much weaker optical responses to humidity. Thus, either humidity sensors or humidity-tolerant VOC sensors that do not require sample preconditioning or signal processing to correct humidity impact are obtained. With the wide spread of 3D- and 4D-printing and intelligent devices, the monitoring and tuning of humidity in sustainable biobased materials offers excellent opportunities in e-nose sensing arrays and wearable devices compatible with operation at room conditions.

The glass substrates were cleaned immediately before spreading the ionomaterial/hybrid material solution using the film applicator. The cleaning procedure consisted in immersion of the substrates in distilled water and then into isopropanol (10 minutes each solvent), followed by drying with compressed air.
Replicates (n=3) of each film formulation were used in the humidity and volatile organic compound (VOC) exposure experiments.

Attenuated Total Reflectance -Fourier-Transform Infrared Spectroscopy (ATR-FTIR)
A PerkinElmer Spectrum Two FTIR spectrometer with a LiTaO3 / DTGS detector and an ATR accessory equipped with a ZnSe cell were used. Samples of ionomaterial, gelatin hydro material and hybrid films were prepared as described in the section above and transferred for the ATR cell for analysis. All measurements were made in the region between 400 -4000 cm -1 with a resolution of 0.5 cm -1 and 40 scans at room temperature and an atmosphere of ambient air. The background spectrum of ambient air was subtracted from the samples spectra and the results were presented in transmittance (%) units.

Ionic conductivity measurements
For the characterization of the materials' conductivity properties, 100µl of [BMIM][Cl]-based gelatin ionomaterial were pipetted into a 0.5 ml eppendorf tube previously filled with polydimethylsiloxane (PDMS). Gold coated connection pines, used as electrodes, were inserted in an in-house 3D printed adapter and position in the Eppendorf tube being partially submersed in the material. Likewise, [BMIM][DCA]-based gelatin ionomaterials were prepared using in-house 3D printed o-rings with 6 mm inner diameter and 0.6 mm height.
Before the measurement, the ionomaterial was sandwich between two gold electrodes.
Ionic conductivity of the ionomaterials was determined at room conditions by Electrochemical Impedance Spectroscopy using a potentiostat Gamry Instruments-Reference 3000 (measurement conditions: frequency range from 100kHz -0.1 Hz and V 100mV/ms (AC)).
The conductivity was calculated using the following equation where is the conductivity, R is the resistance; and l and A are the thickness and area of the samples, respectively. Experimental data was acquired in duplicates.

Atomic Force Microscopy (AFM)
Atomic force microscopy measurements were conducted in an Asylum Research MFP-3D Standalone AFM system operated in alternate contact mode using commercially available silicon probes (Olympus AC240TS) with a resonance frequency of 70 kHz and a spring constant of 2 Nm -1 . Images were processed with Gwyddion software after being planefitted/leveled.

Microscopy (POM)
Thin films of each hybrid material formulation were observed in transmission mode between crossed (90º) and semi crossed polarizers (45º) and in bright field (BF) using a polarized optical microscope (Zeiss Axio Observer.Z1), equipped with an Axiocam 503 color camera.
To visualize the optical response of a hybrid film to varying relative humidity (RH), the film was placed inside a custom-made hermetic and transparent chamber, to which a nitrogen stream with known flow rate carrying 80% or 0% RH was alternately injected, and observed in realtime under POM with crossed and semi-crossed polarizers. The changes in molecular ordering of the liquid crystal and alterations in the matrix during exposure to humid and dry nitrogen gas were video recorded using the microscope camera and software (Zeiss ZENPro 2.6).
ImageJ software (National Institutes of Health, USA) was then employed to split the videos in frames and calculate the mean grey value for each frame. The relative light intensity transmitted through the film (the film brightness) during the experiment was calculated by normalizing the mean grey value of each frame to the maximum observed grey value and plotted against time.

Optical and electrical signal acquisition devices with measurement of relative humidity (RH) in the detection chamber
The setup employed to record electrical and optical signals generated by ionomaterial and hybrid thin films upon exposure to varying humidity and VOCs is depicted in Figures S3 and   S4, respectively.
An optical signal acquisition device assembled in-house, and described in previous publications [1,3,4], was used for measuring the optical response of hybrid films to gas samples.
Briefly, the optical signal acquisition system converts the intensity of light transmitted through the films to voltage. The hybrid material films, spread over transparent glass slides, are placed between crossed polarizers in the detection chamber, which is closed hermetically. As polarized light pass through the films, the radial liquid crystal droplets alter its polarization state thus allowing it to pass through the second polarizer and to reach a photodiode ( Figure   S18a), which yields a voltage signal. When exposed to a VOC sample, the liquid crystal ordering is disturbed until the liquid crystal becomes isotropic. In this situation, the medium is no longer birefringent and, as such, no light reaches the photodiode ( Figure S18b), which results in the photodiode returning the maximum voltage signal. The alternation of liquid crystal ordering between radial configuration and isotropic ( Figure S18c) generates a typical waveform response (Figure. S18d) that allows to identify the VOC sample [1,3,4]. The optical responses of hybrid films to nitrogen gas with variable RH were acquired using this device.
The electrical signal acquisition device was also assembled in-house and is described in a previous publication [4]. Briefly, the device measures the electrical conductance of the films, which is presented as voltage with variable gain to better match the analog reading window of the Arduino due microcontroller device that records the signals. Conductance can be measured by relating this output voltage with the variable gain resistor value in the current-to-voltage module [5]. The ionomaterial films, spread over interdigitated gold electrodes imprinted on glass substrates, are placed in the sensor slots of the detection chamber, which is closed hermetically. A 100 mV peak-to-peak 2 kHz triangle wave AC voltage is applied to the interdigitated electrodes. The conductivity meter [5] than measures the variations of conductance of the ionomaterials during exposure to gas samples. Prior to each experiment, the variable resistor in the current-to-voltage module is manually adjusted so that each sensor's baseline (i.e. voltage output signal) is levelled near the minimum of the Arduino microcontroller analog reading window.
Humidity reference sensors (HTU21D-F, Adafruit, New York, USA, with accuracy of ± 2% RH and response time between 5 -10 s at 63% of the signal) were installed in the supersaturated salt solution vial to record the generated RH ( Figure S3) and at the outlet of the detection chamber of the signal acquisition devices to record the variations of relative humidity in the chamber ( Figure S4). The measurements of the RH sensor in the supersaturated salt solution vial were synchronized with the measurement of the optical or electrical signal using an Arduino UNO that is synchronized with the signal acquisition device. The measurements of the outlet RH sensor were acquired using an independent Arduino DUE, that also controls the signal acquisition device.

Optical and electrical signal acquisition of ionomaterials and hybrid materials upon exposure toto controlled RH variations
To generate controlled levels of relative humidity, the sample delivery system depicted in Figure S3 was assembled and adapted to the optical or to the electrical signal acquisition device.  (Table S1) before entering the detection chamber. Table S1. Supersaturated inorganic salt solutions and corresponding maximum relative humidity (RH) levels measured the at ~20º C at the outlet of the detection chamber. Distilled water generates the maximum relative humidity.

Supersaturated salt solution
Maximum RH at outlet of the electrical detection chamber (%) ) were placed in the detection chamber of the signal acquisition device and exposed to five humidification-drying cycles, for each RH level (Table S1). To establish the humidification-drying cycles, MFC1 flow rate was constant at 1.5 slpm and MFC2 was programmed to alternately switch the flow rate between 0 and 1.5 slpm: • 140 seconds at 1.5 slpm: Humidification period • 140 seconds at 0 slpm: Drying period During the humidification period, the films were exposed to humidified nitrogen. During the drying period, dry nitrogen purged the detection chamber to ensure 0% RH (humidification and drying courses in Figure S4).
For the experiments with ionomaterials, the sensors were previously equilibrated at 0% RH for 15 minutes, thus the first cycle started from 0% RH. For the experiments with hybrid materials, there was not an equilibration period, therefore the first cycle started in variable RH (room RH).
The sensors were stored under controlled humidity (around 50 -60% RH) during a maximum period of 1 week before being used in the experiments. We used three independent sensors to test each RH level.

Electrical and optical signal processing and features extraction
The raw signals yielded by the ionomaterials (electrical signal) and hybrid materials (optical signal) were firstly smoothed with a hanning window of 50 points and filtered with a median filter of variable size to remove unwanted noise. Then, using a custom-made Python 3.7 script, the resulting signals were divided in cycles (in general, 5 cycles of exposure/recovery to VOC or RH were performed) and each individual cycle was centered in zero and normalized to its baseline, to yield the Relative Signal, according to equation 4: Where signal is the smoothed and filtered individual cycle signal, and baseline is the average of the signal immediately before (10 sample points) the exposure period starts.
This methodology was applied to calculate both the relative electrical signal and the relative optical signal.
It is important to analyse the results in the form of relative signals because there is a certain degree of variability of the baseline of the electrical and optical signal between different sensors. By analysing the relative signals, the effect of this variability is removed and thus, it is possible to compare the relative response of different sensors.
Then, the following features were extracted: response time, defined as the time needed for the relative signal to reach 90% of its maximum variation; recovery time, defined as the time needed for the relative signal to recover until 10% of its maximum variation after the exposure period stops; and the relative sensor response (electrical -Reror optical -Ror), defined as the maximum variation of the relative signal (it can be either a maximum or a minimum, depending on the signal shape).
When applicable, the sensors' VOC responsivity rates were determined as the slope of the linear function that better fits the profile of sensor relative response variation in function of the VOC concentration.

Determination of mass variation of hybrid [BMIM][DCA] and [BMIM][Cl] hybrid material films upon exposure to controlled variations of RH
Triplicates of hybrid films were stored in a controlled humidity chamber (RH = 50 ± 5%) previously to the assay. Then, using the setup depicted in Figure S3, the films were exposed to RH variations in the sequence: 50% → 0% → 85% → 0%. The mass of the films was measured immediately before the assay and after each RH variation period. The relative mass variation was determined according to equation 1 where RHinitial and RHfinal are the mass of the thin films at the beginning and end of each period of exposure to nitrogen gas, respectively.

Generation and sampling of different volatile organic compound (VOC) concentrations under controlled RH
To sample known concentrations of VOC (ethanol, acetone, toluene and hexane) under controlled levels of RH to the detection chamber of the signal acquisition device, the setup depicted in Figure S4 was assembled. The dilution MFC (MC-5SLPM-D/5M, Alicat Scientific Inc.) was fed with nitrogen gas, which was bubbled through NaBr to generate a RH of 50% in the detection chamber, or sent directly to the detection chamber to ensure a RH of 0%. The carrier MFC (MC-2SLPM-D/5M, Alicat Scientific Inc.) was also fed with nitrogen gas, which was bubbled through a known volume of pure solvent to generate a known flow rate of VOC vapor in the nitrogen carrier stream. where P*n is the saturated vapor pressure of the solvent or of water at a given temperature, To generate the exposure-recovery cycles, a two-way solenoid valve was used. The valve was programmed to alternately direct the nitrogen carrier stream ( Figure S4) to the exposure or the recovery path using an automated temporized switching: • 5 seconds ON -Exposure

• 15 seconds OFF -Recovery
During the exposure period, the nitrogen carrier stream bubbles through the solvent, is mixed with the dilution nitrogen stream (dry or humid) and, finally, introduced in the detection chamber. During the recovery period, the carrier stream is directed to an exhaust line and the detection chamber is purged with dry or humid nitrogen gas.
A custom made python script (Python 3.7, using alicat library 0.2.2) was used to program the carrier MFC and solenoid valve operation, as well as to synchronize them with the signal acquisition device and the readings of the reference RH sensor at the outlet of the detection chamber.

Table S2. Carrier (Fc) and dilution (Fd) flow rates and corresponding VOC concentrations to which the [BMIM][DCA] and [BMIM][Cl] ionomaterial and hybrid
material films were exposed. The limit of detection (LOD) was considered as the minimum VOC concentration that triggered an increase in the amplitude of the ionomaterial or hybrid sensor signal relative to the baseline.
The saturation state for each VOC was determined as the concentration above which there was no increase in the amplitude of the sensors optical or electrical signals to the VOC.

Figure S3. Analysis of the electrical response to humidity of [BMIM][DCA] and [BMIM][Cl] ionomaterial thin films.
Response and recovery times to humidity changes from 0% to 25%, 35%, 50%, 60% and 70% (n = 15). Figure S4. Experimental setup for humidity exposure assays. Controlled relative humidity levels are generated with the gas delivery system composed by two mass flow controllers (MFC) and a bubbling system fed with nitrogen. The generated nitrogen currents are input to the signal acquisition device containing the optical or electrical sensors in such a way that the sensors are alternately exposed to dry and humid nitrogen.            [Cl] hybrid material films, corresponding to swelling and contraction of the gelatin matrix due to desorption and sorption of water when the films are sequentially exposed to dry, humid and again dry nitrogen current. Figure S15. Optical response to humidity of a control material films without ionic liquid. a) Crossed polarizers POM images of a representative area of a control film during sequential exposure to humid nitrogen with relative humidity (RH) varying between (i) 60% (room conditions), (ii) 80%, (iii) 20% and (iv) 80%. b) Semi-crossed polarizers POM images of a representative area of a control film in the same conditions as in (a). c) Variation of brightness of the film in (a) and relative humidity profile to which it was exposed; points (i -iv) in the brightness profile correspond to the POM images (iiv) in (a). d) Optical signal of a film (acquired with an in-house assembled signal acquisition device) and RH profile to which it was exposed: points (i -iv) in the optical signal correspond to the POM images (iiv) in (a). e) average optical signal and signal variation (n=3) acquired from a control material with the signal transducer assembled in-house during 4 cycles of exposure to humid (80% RH) and dry (20% RH) nitrogen.     Figure S19. Optical sensing of volatile organic compounds (VOC) using radial liquid crystal (LC) droplets as probes in hybrid materials. a) and b) Representation of the optical sensing mechanism, where a hybrid film containing radial LC droplets is placed between two perpendicularly crossed polarizers and exposed alternately to air (a) and VOC (b). c) Polarizing optical microscopy (POM) images with crossed polarizers showing the orientational and phase transitions of the LC droplets of a hybrid film composed of gelatin, 5CB, [BMIM][DCA] and water when exposed alternately to air saturated with acetone ("VOC" arrow) and clean air ("air" arrow). Scale bar: 50 µm. d) Optical signal acquired from the hybrid material film in (c) with an optical signal acquisition device assembled in-house.