Effects of replacing carbamate with alkyl side chains on the properties and temperature sensing performance of hemi-isoindigo-based polymers

Previously, we developed several carbamate side chain-substituted hemi-isoindigo (HID)-based π-conjugated polymers, which demonstrated excellent sensitivity and stability as the sensing layers in chemiresistive temperature sensors. This work investigated the effects of the side chains on the HID units by changing the carbamate to alkyl side chains. Specifically, a series of 2-ethylhexyl-substituted HID polymers, poly(3-((3'',4'-bis(dodecyloxy)-[2,2':5',2''-terthiophen]-5-yl) methylene)-1-(2-ethylhexyl)indolin-2-one-6,5”-diyl) (PTAB), poly(3-((3'',4'-bis(dodecyloxy)-3,4-dimethoxy-[2,2':5',2''-terthiophen]-5-yl) methylene)-1-(2-ethylhexyl)indolin-2-one-6,5”-diyl) (PMAB), and poly(3-((7-(3,3'-bis(dodecyloxy)-[2,2'-bithiophen]-5-yl)-2,3-dihydrothieno[3,4-b] [1,4]dioxin-5-yl)methylene)-1-(2-ethylhexyl)indolin-2-one-6,5”-diyl) (PEAB) were synthesized, and their properties and temperature sensing performance were compared with their counterpart carbamate-substituted HID polymers, poly(2-ethylhexyl-3-((3'',4'-bis(dodecyloxy)-[2,2':5',2''-terthiophen]-5-yl)methylene)-2-oxoindoline-1-carboxylate-6,5”-diyl) (PTEB), poly(2-ethylhexyl-3-((3'',4'-bis(dodecyloxy)-3,4-dimethoxy-[2,2':5',2''-terthiophen]-5-yl)methylene)-2-oxoindoline-1-carboxylate-6,5”-diyl) (PMEB), and poly(2-ethylhexyl-3-((7-(3,3'-bis(dodecyloxy)-[2,2'-bithiophen]-5-yl)-2,3-dihydrothieno[3,4-b][1,4]dioxin-5-yl)methylene)-2-oxoindoline-1-carboxylate-6,5”-diyl) (PEEB), and their thermally annealed products, poly(3-((3'',4'-bis(dodecyloxy)-[2,2':5',2''-terthiophen]-5-yl)methylene)indolin-2-one-6,5”-diyl) (PTNB), poly(3-((3'',4'-bis(dodecyloxy)-3,4-dimethoxy-[2,2':5',2''-terthiophen]-5-yl)methylene)indolin-2-one-6,5”-diyl) (PMNB), and poly(3-((7-(3,3'-bis(dodecyloxy)-[2,2'-bithiophen]-5-yl)-2,3-dihydrothieno[3,4-b][1,4]dioxin-5-yl)methylene)indolin-2-one-6,5”-diyl) (PENB). The highest occupied molecular orbital energy (E HOMO) level and crystallinity of PEAB are very similar compared to PEEB. Chemiresistor devices with 2,3,5,6-tetrafluoro-7,7,8,8-tetracyanoquinodimethane (F4TCNQ) (PEAB:F4TCNQ) fabricated on flexible plastic substrates exhibited a high temperature coefficient of resistance (TCR) of −1.09% °C−1, although the value is lower than that (−1.92% °C−1) of the device based on PENB:F4TCNQ. The device based on PEAB:F4TCNQ also showed excellent stability with no performance degradation over 1 month, which is similar to the device based on PENB:F4TCNQ. On the other hand, PTAB and PMAB showed significantly higher E HOMO levels and crystallinity compared to their counterpart polymers. Sensors based on PTAB:F4TCNQ and PMAB:F4TCNQ showed TCR values of −1.02% °C−1 and −1.15% °C−1, respectively, which are lower than their corresponding annealed carbamate-substituted HID polymers. PTAB has a much lower E HOMO level (−4.95 eV) than that of PTNB (−4.69 eV) and is more crystalline than the latter, which should lead to poorer stability of the doped complex PTAB:F4TCNQ. Surprisingly, PTAB:F4TCNQ showed much better long-term stability than PTNB:F4TCNQ. It was considered that the hydrophobic alkyl side chains in PTAB can help prevent the interaction of water in the air with the PTAB:F4TCNQ complex, thereby stabilizing the complex. This study provided new insights into the design principles of conjugated polymers for printed and flexible temperature sensors.


Introduction
Due to their excellent solution-processability and mechanical robustness, π-conjugated polymers are considered to be key enablers for printed and flexible electronics such as organic light-emitting diodes [1,2], organic field effect transistors (OFETs) [3,4], organic photovoltaics or solar cells [5][6][7][8], and various sensors [9][10][11][12][13]. In particular, π-conjugated polymers may be well suited for the development of low-cost and flexible temperature sensors that operate at or near room or body temperature for some emerging applications including smart packaging of food and pharmaceuticals, personal medical devices, wearable devices, and implantable electronic devices such as electronic skins [14][15][16].
There are two main types of temperature sensors, in which π-conjugated polymers serve as the temperature sensing layer: OFET-based [13] and chemiresistor-based [17][18][19]. The OFET-based temperature sensors can provide changes in multiple device parameters such as current in different gate bias regions, threshold voltage, mobility, current on-to-off ratio, etc, and thus may differentiate the temperature change from changes caused by other stimuli such as chemical substances. They are ideal for sensors operating in an environment where multiple interfering analytes coexist, but the fabrication and operation of OFET-type temperature sensors are more complex and costly. On the other hand, the chemiresistor-type temperature sensors have a very simple configuration comprising of only two electrodes and a thermal sensing layer in between. The two electrodes can be printed using a conductive ink such as a silver ink on a plastic substrate (e.g. polyethylene terephthalate (PET)), while the π-conjugated polymer thermal sensing layer can also be deposited by printing a polymer solution. Since the sensing layer of the temperature sensors does not require to be in direct contact with the sensing object, the sensing layer can be encapsulated to prevent it from interfering with chemicals present in the environment. Therefore, π-conjugated polymerbased chemiresistive temperature sensors are promising candidates for the aforementioned applications requiring low cost and mechanical flexibility.
Nonetheless, several challenges remain in the π-conjugated polymer-based chemiresistive temperature sensors. The π-conjugated polymers in active layers of chemiresistive temperature sensors need to be doped to have moderate conductivity [17][18][19]. First, sensors that use doped π-conjugated polymers as their active layer are known to have issues with long-term stability because the polymer:dopant charge transfer complex readily undergoes phase segregation and side reactions between polymer and dopant [20]. Second, to form a stable polymer:dopant complex, a trap energy (E T ) of 0.25 eV or greater is required [21,22]. Since most π-conjugated polymers are p-type with highest occupied molecular orbital (HOMO) energy (E HOMO ) levels at ca. −5.0 eV or lower, common dopants can hardly form stable polymer:dopant complexes with deep traps (E T ⩾ 0.25 eV). In addition, some hygroscopic dopants such as poly(styrene sulfonic acid) are susceptible to moisture in the air [23,24], which results in poor signal reliability even when the devices are encapsulated [25]. Lastly, the fabrication of these devices using π-conjugated polymers often requires the use of halogenated solvents such as chloroform or 1,2-dichlorobenzene. These solvents are hazardous to human health and the environment, and their use in printing is restricted or prohibited. Therefore, the development of sensor materials that are solution processable in environmentally friendly solvents is crucial for mass production of printed sensors and has received increasing attention [26,27]. However, most 'green' solvents such as water and alcohols are polar, so polymers need to be highly polar to dissolve in these solvents, making these polymers sensitive to ambient moisture and compromising device stability.
To address these issues, recently, we developed a series of hemi-isoindigo (HID)-based polymers by considering several design factors (scheme 1) [25]. Specifically, the electron-accepting HID was combined with an electron-donating didodecyloxybithiophene (DDOBT) and a thiophene spacer to form an electron donor-acceptor (D-A) repeat unit, which effectively elevated the E HOMO of the resulting polymers. Furthermore, a 2-ethylhexyloxy carbonyl group was introduced at the nitrogen atom of the HID unit to form a carbamate side chain. The main advantages of the carbamate side chain include: (a) high polarity, which makes the pristine polymers soluble in an environmentally friendly solvent, anisole, and (b) thermal removability, which allows for solvent resistance, reduced polarity (removal of the polar carbamate group), and a further increase in the E HOMO of the resulting polymers. The thermally annealed polymers could be readily doped with a nonhygroscopic p-dopant, F4TCNQ, which has a lowest unoccupied molecular orbital energy (E LUMO ) of −5.01 eV. Three doped polymers (PMNB, PENB, and PPNB) showed excellent long-term stability due to their large E T (> 0.25 eV) and low crystallinity. Flexible temperature sensors fabricated using solutions of these polymers in anisole, followed by thermal removal of carbamate side chains and subsequent F4TCNQ doping, achieved a temperature coefficient of resistance (TCR) as high as −1.92% • C −1 and showed no performance degradation within a month.
It is well known that variations in solubilizing side chains including chain length [28,29], branch point location [30][31][32], and polarity [33][34][35] may dramatically affect the optoelectronic properties and chain packing of π-conjugated polymers and ultimately the performance of the optoelectronic devices. To probe the effects of side chains on the HID units, in this study, we replaced the 2-ethylhexyloxy carbonyl (carbamate) side chain with an alkyl side chain, 2-ethylhexyl, in the HID unit. The 2-ethylhexyl is nonpolar and shorter compared with 2-ethylhexyloxy carbonyl, which may affect solubility, chain packing, interaction with ambient moisture, and optoelectronic properties of the polymers, as well as the sensitivity and long-term stability of the chemiresistive temperature sensors using these polymers. Specifically, three polymers PTAB, PMAB, and PEAB (scheme 2) were synthesized, which are counterparts to PTEB/PTNB, PMEB/PMNB, and PEEB/PENB (scheme 1), respectively. It was found that alkylation of HID resulted in wider bandgaps and lower E HOMO of the resulting polymers PTAB and PMAB compared to the corresponding polymers with the carbamate side chains. It also appears that these two polymers are more prone to crystallization. On the other hand, PEAB is similar to PEEB in terms of E HOMO and crystallinity (both are amorphous). After doping with F4TCNQ, these polymers showed moderate conductivities of ∼10 −4 -10 −2 S cm −1 , which are lower than those achieved by their counterpart carbamatesubstituted HID polymers. When these doped alkylsubstituted HID polymers were used as the active materials in temperature sensors, they showed strong responses to temperature changes in the temperature range from 25 • C to 60 • C, with TCR values of −1.02% • C −1 , −1.15% • C −1 , and −1.09% • C −1 for PTAB:F4TCNQ, PMAB:F4TCNQ, and PEAB:F4TCNQ, respectively. The PEAB:F4TCNQbased device showed excellent long-term stability with almost no performance degradation after 1 month, while the devices based on the other two polymers are less stable, which are considered due to their excessively low E HOMO levels (PTAB and PMAB) and high crystallinity (PTAB). Interestingly, the device based on PTAB:F4TCNQ showed much improved long-term stability than the device based on the annealed PTEB polymer, PTNB:F4TCNQ, even though PTAB has a much lower E HOMO and is more crystalline than PTNB. It is believed that the hydrophobic alkyl chains on the HID units in PTAB can effectively prevent water molecules in the air from entering the PTAB:F4TCNQ complex, which is in sharp contrast to PTNB:F4TCNQ, where unprotected polar -C(=O)NH-amide groups readily absorb water, leading to dissociation of the charge transfer complex. This work showed that the type of side chains, alkyl vs carbamate, has significant influences on the polymer structure, chain packing, and optoelectronic properties of the HID polymers, as well the sensitivity and stability of the temperature sensors.

Materials and characterization
All chemicals used were purchased from commercial sources without further purification. Details for the synthesis of monomers and polymers are provided in the supplementary material. The 125 µm thick PET substrates with interdigitated silver (Ag) electrode pairs, which fabrication procedure can be found in the literature [36], were provided by the Natural Sciences and Engineering Research Council (NSERC) of Canada's Strategic Partnership Grants for Networks Program, NSERC-Green Electronics Network.
A high temperature gel permeation chromatography (HT-GPC) Agilent PL-GPC 220 was used to measure the molecular weight of the polymers at 110 • C using 1,2,4-trichlorobenzene (TCB) as eluent. Nuclear magnetic resonance spectra were recorded on Bruker DPX 300-MHz in CDCl 3 and/or dimethyl sulfoxide-d 6 (DMSO-d 6 ). Ultraviolet-visible (UVvis) absorption spectra were obtained on a Cary 7000 Universal Measurement Spectrophotometer. Solution samples were prepared by dissolving the polymers in chloroform, while the thin film samples were prepared by spin coating the polymer solutions in chloroform on glass substrates. The doped polymer samples were prepared by spin coating 40 µl of a 1 mg ml −1 solution of F4TCNQ in acetonitrile on the polymer film. The doped polymer film was annealed at 100 • C for 30 min to remove residual solvent. Cyclic voltammetry (CV) diagrams were obtained on a CHI600E potentiostat in acetonitrile with 0.1 M n-Bu 4 NPF 6 as the electrolyte at a sweeping rate of 100 mV s −1 under N 2 . Platinum (Pt) electrodes are used as the working and counter electrodes and Ag/AgCl is used as the reference electrode. Ferrocene, which has an E HOMO of −4.8 eV, was used as a reference to determine the frontier energy levels of the polymers. The thickness of polymer films is measured using an Alpha-Step D-500 Profiler at a scan rate of 0.03 mm s −1 . Scheme 1. HID-based polymers with thermally decomposable carbamate side chains reported previously [25].
X-ray diffraction (XRD) measurements were conducted using a Bruker D8 Discover diffractometer with Cu Kα radiation (λ = 0.15418 nm) on the polymer films spin coated onto dodecyltrichlorosilane modified SiO 2 /p ++ Si substrates annealed in a nitrogen-filled glove box for 20 min at different temperatures. Atomic force microscopy (AFM) images were measured with a Dimension 3100 scanning probe microscope.

Fabrication of temperature sensor devices
The temperature sensors were fabricated on the 125 µm thick PET substrates with interdigitated silver (Ag) electrode pairs. The channel length between the electrode pairs is 200 µm. The channel width (W) to channel length (L) ratio is 10 000. The fabrication of the devices was carried out in ambient conditions with a relative humidity (RH) of 55% and temperature of 22 • C. The substrate was first cleaned using ultrasonication in deionized water, isopropanol, and then acetone each for 15 min. Then, 40 µl of a 5 mg ml −1 polymer solution in chloroform was casted onto the substrate and then a glass slide was used to blade coat the film. Once the solvent evaporated (∼30 s after coating) the device was thermally annealed at 100 • C for 30 min. Then the sample was briefly washed with ethanol before dropping 40 µl of a 1 mg ml −1 solution of F4TCNQ in acetonitrile. After solvent evaporation, the device was annealed at 100 • C for 30 min to remove any residual solvent.
The thermal sensing of the device was characterized under ambient conditions. The device was placed on a heating stage and a thermal probe is placed on the device surface connected to a UNI-T UT33C Multimeter to produce temperature readings. The electrodes of the sensor device were connected to an Agilent B2912A Precision Source/Measure Unit. A current versus time measurement (I-t) was conducted to first establish a stable baseline at room temperature (RT) (22 • C) before the heating stage temperature was set to elevated temperatures starting from 25 • C. The device was left at the set temperature for ∼250 s until the current stabilized before the temperature was raised by 5 • C-10 • C to the next set temperature.

Synthesis of alkyl-substituted HID polymers
Three 2-ethylhexyl-substituted HID polymers PTAB, PMAB, and PEAB, which correspond to the carbamate-substituted and nonsubstituted HID polymers, PTEB/PTNB, PMEB/PMNB, and PEE-B/PENB (shown scheme 1), respectively, were synthesized using the Stille coupling polymerization method (scheme 2). Dibromo HID comonomers, TABr, MABr, and EABr were synthesized following the similar chemistries reported earlier [25], except for the step for alkylation of the HID unit (see the supplementary material). Similar to the carbamate-substituted counterpart, TABr was formed predominantly in the (Z)-form isomer. Interestingly, MABr was also formed predominantly in the (Z)-form, while its carbamate counterpart was a mixture of (Z) and (E) isomers with a (Z):(E) ratio of ∼1:1. On the other hand, EABr is also a mixture of (Z) and (E) isomers with a ratio of ∼3:1, differing from the carbamate monomer, which contains only the (Z) isomer. The results indicate that alkylation influences the geometric isomerism of these two HID monomers. Polymerization was conducted between these dibromo HID monomers and the ditin comonomer ( 3 as the catalyst in chlorobenzene at 80 • C for 24 h. The crude polymers were purified by fractional Soxhlet extraction using methanol, acetone, hexane, and chloroform sequentially as eluents. The final polymer products were obtained from the chloroform fractions. Besides chloroform, these polymers are readily soluble in dichloromethane, chlorobenzene and 1,2-dichlorobenzene, but not very soluble in anisole, indicating the reduced solubility in polar solvent due to the absence of polar carbamate side chains in these polymers. The molecular weights of the polymers were determined by HT-GPC at 110 • C using 1,3,4-TCB as the eluent and polystyrene as the standard. The weight average molecular weight (M w ) and dispersity (Ð) were 7.1 kDa/1.38, 2.3 kDa/1.32, and 4.8 kDa/1.52 for PTAB, PMAB, and PEAB, respectively (table 1). Rather low molecular weights were also observed for the carbamate-substituted HID polymers, which may be due to the nature of the polymerization of the HID monomers.

Optoelectronic properties
The UV-vis-near-infrared (NIR) absorption spectra of the alkyl-substituted HID polymers in chloroform solution are shown in figure 1. The wavelengths of maximum absorbance (λ max ) are 634, 627, and 665 nm for PTAB, PMAB, and PEAB (table 1), respectively, which are notably blue-shifted compared to the carbamate-substituted HID polymers of PTEB (674 nm), PMEB (688 nm), and PEEB (695 nm) [25]. The absorption profiles of PTAB, PMAB, and PEAB are also much narrower than their carbamate-substituted counterparts. The as-cast polymer films showed red shifts of ∼30 nm in λ max , which are more pronounced than the carbamatesubstituted HID polymers that showed redshifts of only ∼10 nm from solution to the film state. These results suggest that the alkyl-substituted HID polymers are more twisted in solution and more dramatic planarization of the polymer backbone occurred in the solid state likely due to the electronic and steric effects of the alkyl side chains. While the PTAB film showed weak absorption in the long wavelength region beyond ∼1000 nm, the PMAB film showed noticeable absorption in this region. For the PEAB film, a strong broad hump appeared between 1500 nm and 2500 nm. The long wavelength absorption observed for PMAB and PEAB might be related to doping by oxygen in the ambient air due to their high E HOMO (to be discussed later). The bandgap (E g ) of PTAB was determined from the absorption onset wavelength to be 1.45 eV, which is slightly larger than that (1.41 eV) of the carbamate-substituted PTEB. Coupled with its shorter λ max of 665 nm in the film than that of PTEB (686 nm), it appears that the backbone of PTAB is more twisted than that of PTEB. For PMAB and PEAB, which showed long-wavelength peaks due to air-doping, their bandgaps were calculated from the onset wavelength of the major peaks to be 1.29 and 1.28 eV, respectively. The smaller bandgaps of PMAB and PEAB compared to PTAB can be explained by the stronger electron-donating ability of their 3,4-dimethoxythiophene and 3,4ethylenedioxythiophene (EDOT) spacers, respectively, than the thiophene spacer in PTAB. These electron-rich spacers can facilitate the intramolecular D-A charge transfer and thus reduce the bandgap. However, the λ max 's of their thin films follow the trend of PMAB < PTAB < PEAB, which disagrees with their bandgap order. This may be due to the presence of a large fraction of very low molecular weight oligomers in PMAB, which contributes to the observed λ max , while the higher molecular weight fraction may reflect the onset wavelength (the bandgap).
After doping with F4TCNQ, broad peaks emerged in the NIR region (1000-2500 nm) centred at ∼1510 nm, 1240 nm, and 1620 nm for the doped PTAB:F4TCNQ, PMAB:F4TCNQ, and PEAB:F4TCNQ films, respectively, due to the formation of polarons and bipolarons [37]. The much shorter wavelength of the polaron/bipolaron absorption peak observed for PMAB:F4TCNQ may be due to the very low molecular weight of PMAB. Since a bipolaron is generated by the combination of two polarons, the probability of forming two polarons in the very short polymer main chains of PMAB would be significantly reduced. Therefore, for PMAB:F4TCNQ, the polaron absorption in the higher energy region (∼1000-1250 nm) is more pronounced than the bipolaron absorption in the lower energy region (∼1250-2500 nm). This is further substantiated by the appearance of polaron/bipolaron peak in the long wavelength region (∼1500-2000 nm) of the counterpart PMNB:F4TCNQ, where the parent polymer PMEB used for preparing PMNB has a high molecular weight (M w ) of 12.4 kDa [25]. A small hump around 750 nm is seen in all doped films, which is due to the presence of the F4TCNQ − anion species (∼590-870 nm) [38], while F4TCNQ absorbs at a λ max of ∼380 nm [39].
The trap energy (E T ) is defined as the difference between the polymer's E HOMO and the dopant's E LUMO and is imperative for polymer:dopant complex stability [21,22]. A sufficiently high E HOMO of the polymer to form deep traps with an E T greater than 0.25 eV is critical for achieving long-term stability of the p-type polymer:dopant complex. The E HOMO of each polymer is determined by measuring the CV of the polymer film in a tetrabutylammonium hexafluorophosphate solution (0.1 M) in anhydrous acetonitrile using an Ag/AgCl electrode as the reference electrode ( figure 2). Specifically, the E HOMO of the polymer is calculated by determining the onset oxidation potential and using ferrocene as a reference, which has an E HOMO of −4.8 eV. It was found that the E HOMO 's of PTAB, PMAB, and PEAB are −4.95, −5.04, and −4.72 eV, respectively (table 1). While the E HOMO of PEAB is similar to that of its corresponding carbamate-substituted polymer PEEB (−4.74 eV), those of PTAB and PMAB are significantly lower than their carbamate-substituted counterparts of PTEB (−4.83 eV) and PMEB (−4.74 eV), respectively [25]. The much lower than expected E HOMO of PMAB may also be explained by the presence of a significant amount of low molecular weight oligomers in PMAB, which widens the bandgap and thus lowers the E HOMO of this polymer. On the other hand, the lower E HOMO of PTAB compared to that of PTEB could be caused by the more twisted backbone of PTAB discussed earlier. If F4TNCQ is used as the p-dopant, E T values are 0.06 eV for PTAB:F4TCNQ, −0.03 eV for PMAB:F4TCNQ, and 0.29 eV for PEAB:F4TCNQ. Obviously, only the PEAB:F4TCNQ complex has a sufficient trap energy to achieve high stability among these three doped polymers.

Molecular organization in polymer thin films
The chain packing characteristics of PTAB, PMAB, and PEAB films were characterized by using the onedimensional (1D) and two-dimensional (2D) XRD and the results are shown in figure 3. The as-cast PTAB film (RT) showed a distinct diffraction peak at 2θ = 4.74 • , which corresponds to a d-spacing of 1.86 nm. This peak represents the interlayer distance of the (100) planes of a typical lamellar chain packing crystal structure. This d-spacing is shorter than that (2.07 nm) of its counterpart polymer PTEB [25] due to the shorter 2-ethylhexyl side chains in PTAB. Upon annealing the film at 100 • C, this peak became sharper and more intense, indicating the increased crystallinity of the polymer film. The peak position shifted to 2θ = 4.66 • , suggesting a slightly enlarged interlamellar distance (1.89 nm), probably due to the arrangement of more stretched and ordered side chains. When the annealing temperature was 150 • C, this peak became weaker and broader, indicating a decrease in crystallinity of the film. At an annealing temperature of 200 • C, the film almost lost its crystallinity, showing only a weak (100) peak at 4.77 • .
The as-cast PMAB film showed no diffraction peak, indicating its very disordered chain packing. A faint (100) peak at 2θ = 4.70 • (d = 1.88 nm) appeared when the film was annealed at 100 • C. As the annealing temperature increased to 150 • C and then 200 • C, this peak became progressively intensified, indicating the much improved crystallinity of this polymer at high annealing temperatures. The  alkyl-substituted PMAB is more crystalline than the carbamate-substituted PMEB, which is completely amorphous [25]. The PEAB film stayed amorphous at all annealing temperatures, which is similar to its carbamate-substituted counterpart PEEB.
Overall, it appears that substitution of the thiophene spacer (PMAB and PEAB vs PTAB) disrupts crystallization of polymer chains, which agrees with the series of carbamate-substituted HID polymers.

Evaluation of temperature sensors based on doped alkyl-substituted HID polymers
The chemiresistive temperature sensors were fabricated on PET substrates with pre-printed interdigitated silver (Ag) electrodes as depicted in figure 4. A polymer solution in chloroform (40 µl, 5 mg ml −1 ) was drop cast onto the substrate and then a glass slide was used to blade coat a wet film. Once the solvent evaporated (∼30 s after the blade coating), the polymer film was thermally annealed at 100 • C for 30 min. The thickness of all polymer films was kept at ∼40-50 nm for PTAB and PEAB and ∼80 nm for PMAB (thinner films resulted in very poor film quality due to the low molecular weight of this polymer). The sample was then washed with ethanol before drop casting a solution of F4TCNQ in acetonitrile (40 µl, 1 mg ml −1 ) onto the polymer film and blade coating with a glass slide. After the solvent evaporated, the device was annealed at 100 • C for 30 min. The conductivity values of the doped polymer films were measured at RT to be 1.9 × 10 −2 S cm −1 for PTAB:F4TCNQ, 3.9 × 10 −4 S cm −1 for PMAB:F4TCNQ, and 2.6 × 10 −3 S cm −1 for PEAB:F4TCNQ (table 1). The rather low conductivity of PMAB:F4TCNQ is likely caused by its poor film quality due to the low molecular weight of PMAB (see its AFM image in figure S9 in the supplementary material). Nonetheless, these conductivity levels are sufficient to provide currents greater than 10 µA for reliable signal reading from the devices.
The temperature sensing capabilities of devices were evaluated by measuring the current under a constant voltage of 1 V over time on a heating stage within a temperature range from 25 • C to 60 • C. The temperature of the heating stage was changed by 5 • C-10 • C per interval and the current was allowed to stabilize within ∼250 s per interval. Figures 5(a)-(c) show the real-time current curves at different temperatures for sensors based on PTAB:F4TCNQ, PMAB:F4TCNQ, and PEAB:F4TCNQ. All three devices exhibited a stepwise response where a sharp rise in current was observed as the temperature increased. The sensitivity of temperature sensors is commonly evaluated using the TCR [40], which is defined as the relative change in resistance per degree Celsius (or Kelvin) shown in equation (1): where R represents the resistance at a given temperature T, and R 0 is a known resistance at a reference temperature T 0 . The normalized resistance (R/R 0 ) was plotted against temperature as shown in figures 5(d)-(f). After linear fitting, the TCR values of these devices can be obtained from the slopes of these fitted lines to be −1.02% • C −1 , −1.15% • C −1 , and −1.09% • C −1 for the devices based on PTAB:F4TCNQ, PMAB:F4TCNQ, and PEAB:F4TCNQ, respectively (table 1). These values are quite high compared to other polymer-based resistive temperature sensors (with |TCR| < 1% • C −1 ) [19,[41][42][43][44][45][46], but slightly lower than the values of the sensors based on the carbamate-substituted HID polymers (−1.41% • C −1 for PMNB:F4TCNQ and −1.34% • C −1 for PENB:F4TCNQ annealed at 100 • C) [25]. A summary of representative conductive polymer-based chemiresistive temperature sensors reported in the literature is provided in table S1.
For most chemiresistive temperature sensors, the current (or conductivity) response to temperature follows the variable range hopping (VRH) mechanism of charge transport as proposed by Mott [47]. The conductivity has a characteristic temperature dependence shown in equation (2):  [25] to make the plots). The devices had no encapsulation layer and were stored and measured under ambient conditions with a RH of 55% and a temperature of 22 • C. σ = σ 0 e −(T0/T) 0.25 (2) where σ is conductivity, T is absolute temperature, and σ 0 and T 0 are constants. Figures 5(g)-(i) show the σ − T −0.25 plots for the devices, which show quite linear relations, indicating that these doped polymers obey the VRH charge transport mechanism in the measured temperature range.
It should be mentioned that the sensor device based on PEAB:F4TCNQ was operational at higher temperatures, following a linear σ − T −0.25 relationship, up to 120 • C as shown in figure S11 in the supplementary material. The resistance-temperature plot of this device exhibited two distinct linear regions, 25 • C-60 • C (TCR = −1.09% • C −1 ) and 60 • C-120 • C (TCR = −0.38% • C −1 ) because the charge transport in this polymer obeys the VRH mechanism, which is similar to the devices based on carbamate-substituted HID polymers [25]. On the other hand, the devices based on PTAB:F4TCNQ and PMAB:F4TCNQ failed to operate (loss of current) when the testing temperature was higher than 60 • C. This is likely caused by the degradation of the polymer:dopant charge transfer complex at high temperatures under an electrical bias due to their very weak trap energies. This again manifests the importance to have a sufficiently high E HOMO of the polymer in order to achieve good stability of chemiresistive temperature sensors.
The sensitivity of temperature sensors may also be represented by the temperature coefficient of conductance (TCC) [48,49], which is defined in equation (3): where G and G 0 are the conductance (I/V) at temperature T and T 0 , respectively. As shown in  1). For the most stable PEAB:F4TCNQ-based device, an excellent linear fit for G/G 0 with an R 2 of 0.9979 was also obtained in the broader temperature range from 25 • C to 120 • C. These results indicate that the TCC is a more appropriate sensitivity indicator for these temperature sensor devices. Device stability was evaluated by measuring channel conductivity of the devices over a period of 32 days (∼1 month). The devices had no encapsulation layer and were stored and measured under ambient conditions with a RH of 55% and a temperature of 22 • C. The results of the stability study are shown in figure 6. The device based on PTAB:F4TCNQ remained stable for 4 days, and then underwent a steady degradation in conductivity to 14% of its original value after 32 days. The device based on PMAB:F4TCNQ showed better stability as the device remained stable for 12 days (95% of the original conductivity) before significant degradation occurred. After 32 days, 63% of the original conductivity retained. The conductivity of the device based on PEAB:F4TCNQ is very stable, showing no degradation in stability after 32 days (∼100% of the original conductivity), which is similar to the annealed carbamate-substituted HID polymer complex PENB:F4TCNQ. The excellent stability of this device could be attributed to the very high E HOMO of −4.72 eV of PEAB, allowing the formation of deep electron traps (E T = 0.29 eV) when doped with F4TNCQ. However, while the E HOMO (−4.95 eV) of PTAB was higher than that of PMAB (−5.04 eV), the stability of the device based on PTAB:F4TCNQ was much poorer than that of the device based on PMAB:F4TCNQ. This inconsistency may also be related to the very low molecular weight of PMAB. While the low molecular weight part of PMAB results in a wider bandgap and thus significantly lower E HOMO , the higher molecular weight part has a narrower bandgap and higher E HOMO , which can form a more stable charge transfer complex with F4TCNQ. Another important reason may be due to their different crystallinity, because PTAB is much more crystalline, which is detrimental for the device stability due to the exclusion of dopant molecules from the crystalized polymer phase [25].
PMAB:F4TCNQ showed similar stability to PMNB:F4TCNQ despite the E HOMO (−5.04 eV) of PMAB is much lower than that (−4.55 eV) of PMNB. As discussed earlier, the E HOMO measured by the CV method may reflect the low molecular weight fraction of PMAB, while the higher molecular weight fraction may have higher E HOMO , which allows the formation of more stable doped complexes. Interestingly, the stability of PTAB:F4TCNQ is superior than PTNB:F4TCNQ even though PTAB has a much lower E HOMO (−4.95 eV) and thus a smaller E T (0.06 eV) compared to PTNB (E HOMO = −4.69 eV; E T = 0.32 eV). As discovered previously, the high crystallinity of PTNB contributed to its poor stability [25]. However, PTAB is even more crystalline than PTNB by comparing their XRD patterns and should lead to poorer stability. The reason for this anomaly is believed due to the presence of the hydrophobic 2-ethylhexyl side chains in PTAB, which helps prevent the interaction of water molecules in ambient air with the PTAB:F4TCNQ complex ( figure 7(a)). On the other hand, water molecules can easily enter the PTNB:F4TCNQ complex and strongly interact with the unprotected -C(=O)NH-amide groups on the HID units in PTNB to form hydrogen bonds, thereby pushing away the dopant F4TCNQ molecules to accelerate conductivity degradation ( figure 7(b)). This mechanism may also partly contribute to the similarly good stability of PMAB:F4TCNQ compared to PMNB:F4TCNQ even though PMAB has a much higher E HOMO (−5.04 eV) than that of PMNB (−4.55 eV). In contrast, PENB:F4TCNQ has a very high trapping energy (E T = 0.33 eV) as well as poor crystallinity to form a very stable charge transfer complex. In this case, the interaction of water molecules in the air with the -C(=O)NH-amide groups on the HID units is not sufficient to separate F4TCNQ from PENB. Therefore, the device based on PENB:F4TCNQ remains as stable as the device based on PEAB:F4TCNQ, which has a similar trapping energy (E T = 0.29 eV) and is also amorphous.

Conclusions
This work systematically studied the effects of replacing carbamate with alkyl side chains on the HID units of a series of HID polymers on the optoelectronic properties, crystallinity, and temperature sensing performance in chemiresistive sensors. Specifically, 2-ethylhexyl-substituted HID polymers PTAB, PMAB, and PEAB comprising an electron-accepting HID unit, an electron-donating DDOBT unit, and a thiophene spacer in their repeat units were synthesized. They only differ in their thiophene spacers, where thiophene, 3,4-dimethoxythiophene, and 3,4-EDOT were incorporated in PTAB, PMAB, and PEAB, respectively. Their properties and temperature sensing performance were investigated and compared with their counterpart carbamate-substituted HID polymers PTEB, PMEB, and PEEB, and their thermally annealed products PTNB, PMNB, and PENB.
It was found that the E HOMO level and crystallinity of PEAB are very similar compared to PEEB. Flexible chemiresistive devices with PEAB doped with F4TCNQ (PEAB:F4TCNQ) exhibited a TCR of up to −1.09% • C −1 , which is much better than other reported conductive polymer-based temperature sensors. However, this value is inferior to those of the devices based on the carbamate-substituted HID polymer PEEB:F4TCNQ (−1.34% • C −1 ) and the annealed product PENB:F4TCNQ (−1.92% • C −1 ). The device based on PEAB:F4TCNQ also showed excellent stability with no performance degradation over one month, which is similar to the device based on PENB:F4TCNQ. On the other hand, PTAB and PMAB showed significantly lower E HOMO levels and higher crystallinity than their counterparts PTEB/PTNB and PMEB/PMNB. Sensors based on PTAB:F4TCNQ and PMAB:F4TCNQ showed TCR values of −1.02% • C −1 and −1.15% • C −1 , respectively, which are lower than their corresponding annealed carbamate-substituted HID polymers. Surprisingly, PTAB:F4TCNQ and PMAB:F4TCNQ showed even better and similar long-term stability compared to PTNB:F4TCNQ and PMNB:F4TCNQ, respectively, although the rather low E HOMO levels of PTAB and PMAB cannot create sufficient trapping energies for stable polymer:dopant complexes with F4TCNQ. In addition to the E HOMO and crystallinity, the polarity of the side chains in the polymer was found to also play an important role in determining the long-term stability of the chemiresistive temperature sensors with polymer:dopant complexes having insufficient charge-trapping energy. Specifically, the hydrophobic alkyl side chains on the HID units in PTAB can help prevent permeation of water molecules in air, thereby stabilizing the polymer:dopant complex and the device. The findings obtained through this study provide a deeper understanding of the structure-property relationship of HID polymers and will facilitate the development of other high-performance conjugated polymers for temperature sensors in emerging applications such as smart packaging, personal medical devices, wearable devices and implantable electronic devices.

Data availability statement
All data that support the findings of this study are included within the article (and any supplementary files).