Introduction

The rapid development of wearable electronic devices (e.g. smart clothing, watches, and wristbands) from the initial scratch to the present vibrant researches has been witnessed by the times, which stimulates the study of flexible sensors, energy storage devices, soft robots, and enables the revolution of internet of things, healthcare, and even daily life (Lee et al. 2021; Ge et al. 2021; Yang et al. 2020). Their successful realization is largely affected and constrained by the materials. Elastomers like polydimethylsiloxane (PDMS) (Zhao et al. 2021a, b) and thermoplastic polyurethane (TPU) (Zhang et al. 2021) are still mainstream matrix materials for the flexible electronics. New matrix materials such as polystyrene-block-polyisoprene-block-polystyrene elastomer (Horev et al. 2021) have also been developed recently. However, the poor biocompatibility (possibly inducing skin allergy), unsatisfied homogeneity (between conductive materials and matrix), and inevitable asynchronization (causing peeling off and inexact signals) restrict their wearable applications (Ge et al. 2021). Hydrogel-based electronics with suitable Young’s modulus, high biocompatibility, and stimuli-responsiveness can address the above problems (Ge et al. 2021), but their integration of adhesiveness, stretchability, breathability, and comfortability require further improvement (Wang et al. 2021a, b).

Textile materials featured with favorable flexibility and deformability are capable of releasing the mechanical stress of shearing, bending and compressing that are usually induced in actual wearing conditions (Chen et al. 2021; Li et al. 2021). In addition, diverse network structures (e.g. knitted, weaved, helical, or embroidered) can endow textiles with specific features such as stretchability, compressibility, and directional patterns. These features enable the textiles to exhibit strain sensing performance. For example, Chen et al. (2021) designed a copper coated nylon textile with hierarchical structures that consists of core-sheath fibers and twisted double-helix yarns for piezoresistive pressure sensor with response time of 2 ms and durability of 6000 cycles. The light weight, porous structures, mature production technologies, intrinsic breathability, and good tactile feel also make textiles flourishing in supercapacitors (Li et al. 2021; Zhang et al. 2019), triboelectric nanogenerators (Mao et al. 2021), heaters (Tian et al. 2021), etc. Endowing textiles with great conductivity is a prerequisite for them to be applied in those above devices. Textiles can be composited with conductive materials to realize corresponding functions. Metals (Ag nanoparticles (AgNPs) (Horev et al. 2021), Ag nanowires (AgNWs) (Zhao et al. 2021a, b), Cu nanoparticles (CuNPs) (Chen et al. 2021)), carbon materials (reduced graphene oxide (RGO) (Li et al. 2021), carbon nanotube (CNT) (Ma et al. 2021), carbon fibers (Tian et al. 2021)), MXene (Zhang et al. 2021), and conducting polymers (polyaniline (PANI) (Li et al. 2021), polypyrrole (PPy) (Yang et al. 2020), poly(3,4-ethylenedioxythiophene) (PEDOT) (Alhashmi Alamer et al. 2019)) are quintessential conductive materials. Among them, conducting polymers due to tunable synthesis, versatile multiscale processability, good flexibility, and low cost can composite with textiles easily (Horev et al. 2021; Bonacchini and Omenetto 2021; Liu et al. 2021). With great conjugated system and satisfied pseudocapacitive capacitance, PPy is capable of conducting and energy-storing simultaneously, thus becoming an attractive functional material (Naskar et al. 2021).

Cotton fabric (CF), rich in natural cellulose that comprises abundant O-contained groups, is considered as an ideal substrate for conductive polymers (Alhashmi Alamer et al. 2019; Islam et al. 2020). In this study, a versatile conductive PPy/CF (PCF) with great functions of sensing, electrothermal heating, anti-wettability, and energy-storing was fabricated via in-situ polymerization of pyrrole on the knitted network substrate (cotton fabric). The amount-dependent growing mechanism of PPy is studied according to the PPy mass loading and morphologies. The prepared PCF exhibits a varied resistance during stretching, and performs a fast response time (110 ms) and great durability (over 10,000 cycles), thus presenting excellent monitoring capability for the movements of back, finger, wrist, and knee. We hypothesize that the resistance variation of PCF is due to the separation of knitted loops and tightness change of the loops induced by stretching. Response current and morphology images of PCF during stretching are combined to investigate the resistance variation mechanism. Besides, an increased PPy mass loading contributes to a better conductivity of PCF but restricts the ion diffusion, resulting in a lower capacitance. Reaction kinetics analyzation has been conducted according to the cyclic voltammetry tests, which indicates that diffusion-controlled process is dominant for the capacitance of PCF. The PCF electrode exhibits a gravimetric capacitance of 277.8 F g−1 at 0.46 A g−1 and maintains 183.9 F g−1 at 2.30 A g−1. The excellent performance demonstrates a great potential of PCF in portable and wearable devices.

Results and discussion

Morphology and amount-dependent growing mechanism of PPy

The FE-SEM images (Fig. S1) show that smooth CF fibers are covered by the dense accumulated granules. The chemical structures of the CF and the granules-covered CF are characterized by FTIR (Fig. S2), which indicates that PPy deposits on CF fibers successfully. As the deposited PPy layer affects the performance such as conductance of prepared PCF significantly, the relationship between pyrrole concentration, surface morphologies of resultant PCF, PPy mass loading, and resistance of PCF is investigated. The shape of PPy granules has an increasing trend as the monomer concentration rises (Fig. S3). To make this trend readily understandable, Fig. 1 shows the two situations of PPy growing at low and high monomer concentrations. When the pyrrole concentration is relatively low, in-situ polymerization of the monomers occurs in a spacious environment, and small PPy granules are formed. While in the high concentration of pyrrole, surrounding for PPy granules becomes crowded (because more PPy granules are formed), which results in the accumulation of these PPy granules, shaping a bigger granule, and forming a membrane ultimately. Besides, thanks to the hydrogen bond between H atom of pyrrole N and O atom in cellulose O–H, and π-π stacking between pyrrole rings, the mass of PPy can be enhanced at higher monomer concentrations.

Fig. 1
figure 1

Illustration scheme of amount-dependent growing mechanism of PPy on cotton fibers at low and high concentrations of pyrrole, and FE-SEM images of PCF based on different pyrrole concentrations

Resistance of PCF measured by different methods

The mass of PPy on PCF indeed rises from 1.07 to 4.47 mg cm−2 as pyrrole concentration is expanded from 5.0 to 15.0 g L−1 (Fig. 2). The sheet resistance of PCF decreases from 5175.1 to 60.5 Ω sq−1 accordingly, because enhanced PPy loading allows much more electrons to transport simultaneously. PCF based on 15.0 g L−1 pyrrole was used for subsequent tests. Constant voltages and linear sweep voltages are applied on the PCF to test its responsive current and calculate its resistance (Fig. S4). The stable currents in Fig. S4a, S4c, and S4d indicate good conducting stability of PCF. The calculated resistances of PCF (4 cm × 1 cm) at various voltages are nearly same (Fig. S4b), and the average value of them is 48.26 Ω (12.07 Ω cm−1). According to the relationship between abscissa and ordinate in Fig. S4c, the slope of the fitting curve represents the reciprocal of resistance; therefore, the resistance of PCF tested by linear sweep voltammetry is 48.34 Ω (12.09 Ω cm−1). The fitting curves for the resistances of PCF with different lengths measured by electrochemical workstation (Fig. S4e) and digital precision multimeter (Fig. S4f) present slopes of 11.74 and 12.31 Ω cm−1, respectively. These similar values originated from different measurements determine that the resistance of PCF per unit length is around 12.05 Ω cm−1.

Fig. 2
figure 2

PPy mass loading and sheet resistance of PCF prepared with different concentrations of pyrrole

Sensing performance and resistance variation mechanism

The polyurethane composition and serpentine yarn structure confer the whole textile stretchability. After the deposition of PPy, PCF (prepared with 15.0 g L−1 pyrrole) shows a lower breaking strain but exhibits an elastic modulus of 2.645 MPa that is 2.5 times higher than CF substrate (0.748 MPa) during 0–120% strain (Fig. 3a). Possibly because the durability of cotton (CF substrate) to acid solution (FeCl3) is not good enough, which causes a lower breaking strain for PCF. Meanwhile, as successive and dense PPy membrane coats on the CF fibers, PCF possesses a higher stress than the CF substrate. Response time is an important index for sensors that reflects the speed of signal generation. PCF exhibits a response time of 110 ms for 5% strain (Fig. 3b), which is faster than some reported materials: Pt/PDMS (120.4 ms) (Kim et al. 2020), gum/NaCl (297 ms) (Cheng and Wu 2021), and PAAm/CMC ionic semi-interpenetrating network hydrogels (360 ms) (Zhu et al. 2020). A great sensing stability in repeated stretching-recovering process is also required by the stretching sensor, which determines their service duration. A sequent stretching-recovering process is carried out to test the sensing stability of PCF (Fig. 3c). The resistance of PCF has a rising phase and decreasing phase during stretching process, and a corresponding symmetry change occurs for the recovering process. After 10,000 times of cycles, the resistance of PCF still maintains this variated trend, indicating its long-time service capability. PCF is gradually elongated owing to its internal irreversible deformation, which causes an increasing resistance and a narrower variation interval of ΔR/R0 (cycle 8991–9000 compared with cycle 1001–1010). The average GF value also rises from 2.96 (cycle 1001–1010) to 4.57 (cycle 8991–9000) in the strain range of 0–30%. After straightened, PCF exhibits a broader variation interval with average GF value of 2.05 (Fig. 3d). As cycles continue, the GF value increases to 3.83. During the repeated stretching, some PPy granules fall off and fiber crack occurs (Fig. 3e), which have negative effects on the electron transport and lead to the increased resistance of PCF. With changeable resistance, PCF can be used as strain sensor to detect body movements. Figure 3f displays evident signals for three times of back bending. As back bending induces less strain of PCF, the ΔR/R0 presents a major upward trend followed by only a slight decrease during bending process. While for the fingers, wrist, and knee that bend prominently, a significant drop of ΔR/R0 appears (Fig. 3g–i). As shown in Fig. 3g, the PCF sensor that monitors index finger and middle finger has different signals when the gesture expresses number “1” and “3”, but shows similar signals when the gesture expresses number “6” and “7”, which depends on the bending degree of the two fingers. The signal for once jumping has two downward peaks because taking off and landing cause twice knee bending. These results demonstrate that PCF has excellent detective capability for the body movements.

Fig. 3
figure 3

a Stress–strain curves (100 mm min−1). b Response time of PCF (5% strain, 800 mm min−1). c Cycling tensile tests of PCF (30% strain, 200 mm min−1), the optical images are PCF before and after 10,000 tensile cycles. d Tensile tests of straightened PCF for another 2000 cycles after the 10,000 cycles in (c). e Resistance of PCF after thousands of stretching to 30%, and FE-SEM images of PCF before and after 10,000 times of stretching (30% strain). Applications of PCF in detecting joints bending: f back, g finger, h wrist, and i knee

To investigate the mechanism of resistance variation, we study the morphologies of PCF at strains of 0%, 5%, 20%, and 40% (Fig. 4). In the whole stretching process, both loops and sinker loops separate from each other in course direction (stretching direction) gradually, but the yarns of these loops become tightened (Fig. 4a and b). During the above structure changes, the electron transport path alters in the loops, which gives rise to the resistance variation. Generally, electron has two paths to transport: (1) moving along the fibers and outlining many loop shapes, (2) skipping between fibers to reduce the transport journey, especially from sinker loop 1 to sinker loop 2 (Fig. 4c). However, the skipping opportunity between the loops and between the sinker loops reduces as strain increases, which decreases the number of fast electron transfer paths. Therefore, much more electrons have to transport along fibers, resulting in a lengthened journey and a raised resistance. As strain becomes higher, the stretching causes the intertwined fibers in yarns to approach each other, contributing to more the skipping between fibers, and leading to a drop of resistance.

Fig. 4
figure 4

SEM images of PCF stretched to 0%, 5%, 20%, and 40% strains at a low and b high magnifications. c Illustration scheme of electron transfer path during stretching

Electrothermal performance

As a conductive textile, PCF can also be used as wearable heaters. The low resistance endows PCF (prepared with 15.0 g L−1 pyrrole) with great electrothermal effects, which possesses an electrothermal temperature of 191.5 °C at voltage of 16 V (Fig. 5a). However, such a high temperature gives rise to the degradation of PPy (Jan et al. 2021) and burning out of PCF that emits black smoke (the inset photo in Fig. 5a). The TG curves in Fig. S5a shows that the mass of PPy powder decreases all the time even after the complete loss of water, indicating the degradation of PPy. Thus PCF (containing PPy) has a more obvious mass decrease than CF substrate between 100 and 200 °C. According to the monitored current, the resistance of PCF during the electrothermal process can be tracked (Fig. 5b), where the resistance of PCF decreases from 82 to 62 Ω in the temperature increasing process, then the resistance rises to 96 Ω in the temperature drop process, and finally, the resistance rapidly grows because PCF burns out. This is because higher temperature excites more electrons to transport, while the degradation of PPy at higher temperature reduces the transport path. The voltage of 4 V and 8 V (Fig. 5c) guarantees a temperature about 35.5 °C and 80.0 °C, respectively. The temperatures are comparable with some reported materials: reduced graphene oxide/electrochemically exfoliated graphene hybrid films (83.2 °C, 30 V) (Sun et al. 2018), MXene heater (46.7 °C, 25 V) (Park et al. 2019), PPy/β-FeOOH/nylon (59 °C, 8 V) (Wang et al. 2022). The heating power densities of PCF are 0.042, 0.169, 0.380, and 0.752 W cm−2 at 4, 8, 12, and 16 V, respectively (Fig. 5d). As shown in Fig. 4, stretching separates loops and simultaneously leaves many holes that assist heat dissipation; hence, the electrothermal temperature of PCF decreases to 68.7 °C and 62.8 °C at 20% and 40% strain, respectively (Fig. 5e). After thousands of stretching, PCF still exhibits an electrothermal temperature above 43.1 °C (Fig. 5f), meeting the heat source requirement of normal wearable applications. PCF is also able to hold a continuous electrothermal heating for eight days with a temperature retention of 43.8% (Fig. S5b). When serving as a wearable heater, PCF can be given a varied voltage to adjust the temperature to a comfortable range for human body.

Fig. 5
figure 5

Electrothermal performance of PCF (15.0 g L−1 pyrrole): a Time-dependent temperature curves of PCF at 16 V. b Resistance of PCF before burning out. c Time-dependent temperature curves of PCF at different voltages for 10 cycles. d Heating power density. Time-dependent temperature curves of PCF e at different strains (8 V), f after thousands of stretching to 30% (8 V). (The presented temperatures are terminally measured, and the relative humidity (RH) is around 61%.)

Electrochemical performance

Loading energy-storing PPy, PCF can also serve as electrode for supercapacitors. As is known that electrochemical process is originated from the reaction between electrode and electrolyte-ions, sufficient contact of them contributes to a better reaction process. All the PCF (prepared with different pyrrole concentrations) exhibit a contact angle above 140° (Fig. S6a). The hydrophobicity can be maintained even when PCF is stretched to 50% strain (Fig. S6b). PCF also shows great anti-wettability to the droplets of HCl solution, NaCl solution, cola, and milk, only penetrated by NaOH solution and coffee (Fig. S6c). The anti-wettability may be beneficial to the self-clean of PCF when it serves as sensor and heater, but this property is adverse to the electrochemical performance of PCF extremely. The problem can be solved via ethanol penetrating, because PCF after wetted by ethanol possesses lower surface energy for the permeation of electrolyte. While for the PCF without treatment of ethanol, a bubble wall layer forms on the PCF surface, which hinders the permeation of electrolyte (Fig. S7a). Compared with PCF that is treated by ethanol, PCF without the treatment shows poor GCD curves and electrochemical performance (Fig. S7b–e).

In addition to good wettability, sufficient ion diffusion is another key factor for electro-active material exhibiting superior electrochemical performance. To study the diffusion-controlled behavior, CV and EIS are carried out. PCF based on 12.5 g L−1 pyrrole shows larger CV loops at each scan rate, possesses higher capacitances (823.5–142.0 mF at 5–100 mV s−1) than other samples, and presents moderate gravimetric capacitances (189.3–32.6 F g−1 at 5–100 mV s−1) (Fig. 6a–c and Fig. S8). PCF based on 5.0 g L−1 pyrrole shows a relatively high gravimetric capacitance; however, its real capacitance (Fig. 6b) is very low. Although PCF based on 15.0 g L−1 pyrrole has a higher conductivity, its heavier PPy loading and bigger granular shape slow down the ion diffusion (Naskar et al. 2021). According to the analyzation of reaction kinetics, the adjustable parameter b (Fig. S9a) is around 0.55 at potential from 0.4 to 0.7 V, which indicates that dominant contribution in PCF is diffusion-controlled process. The capacitive current at each scan rate has been plotted (Fig. S9b–f), and the capacitance contributions are presented in Fig. 6d. The capacitances of diffusion-controlled and capacitive part have also been calculated based on their percentage and total capacitance, where the capacitances originated from capacitive process are nearly same at different scan rates (Fig. 6e). However, the capacitance of diffusion-controlled part decreases at higher scan rates because less ions can keep pace with the electrochemical process. Nyquist plot of the PCF electrode is shown in Fig. 6f, with an equivalent circuit comprising equivalent series resistance (Rs, 4.23 Ω), charge transfer resistance for capacitive process (Rct1, 0.86 Ω), charge transfer resistance for diffusion-controlled process (Rct2, 1.55 Ω), and three constant phase elements (CPE1 (n = 0.572), CPE2 (n = 0.739), CPE3 (n = 0.749)). PCF electrode (prepared with 12.5 g L−1 pyrrole) also presents less IR drop and longer discharging time among prepared samples (Fig. 6g and Fig. S10), implying lower inner resistance, more de-embedding ions and higher capacitances in its energy release process. The PCF (1 cm × 0.5 cm) possesses the highest capacitance of 1208.3 mF at 2 mA (277.8 F g−1 at 0.46 A g−1), and maintains 800.0 mF at 10 mA (183.9 F g−1 at 2.30 A g−1) (Fig. 6h and i), which outperforms some reported composite electrodes: Fe2O3@PPy/carbon cloth (237 mF cm−2 at 1 mA cm−2) (Wang et al. 2021a, b), PPy/hydrohausmannite/carbon cloth (183 F g−1 at 0.5 A g−1) (Zhuang et al. 2021), PPy/carbon cloth (34.7 F g−1 at 0.4 A g−1) (Vannathan et al. 2020), Ti3C2@PPy (121.03 F g−1 at 1 A g−1) (Vaghasiya et al. 2021), PPy/Ni-CAT MOF (1050 mF cm−2 at 0.5 mA cm−2) (Yue et al. 2021), PPy/electrochemical graphene oxide (595.8 mF cm−2 at 0.5 mA cm−2) and PPy (84.3 mF cm−2 at 0.5 mA cm−2, 56.9 mF cm−2 at 10 mA cm−2) (Yang et al. 2021). The CV loops in Fig. 7a are used to calculate the gravimetric capacitances of the symmetric PCF supercapacitor, which shows a decreasing trend from 46.7 to 7.6 F g−1 (Fig. 7b). The nearly symmetric triangle shapes of GCD curves (Fig. 7c) manifest that the electrochemical process has good reversibility. The PCF supercapacitor possesses gravimetric capacitances of 55.0–39.5 F g−1 at 1–5 mA (0.23–1.15 A g−1) (Fig. 7d), with energy density of 2.40–4.54 Wh kg−1 and power density of 157.32–42.70 W kg−1 (Fig. 7e). Besides, PCF supercapacitor maintains a capacitance retention of 100%, 94.4%, 88.9%, 77.8%, and 55.6% (Fig. 7f) after 1000, 2000, 5000, 10,000, and 20,000 GCD cycles, which is higher than activated carbon/Ni foam//Ni3S2@PPy/Ni foam (87.7% after 2000 cycles) (Ren et al. 2021), Zn//PPy/electrochemical graphene oxide (81% after 5000 cycles) (Yang et al. 2021), and PPy@NiTi//PPy@NiTi (71.6% after 10,000 cycles) (Zhao et al. 2021a, b).

Fig. 6
figure 6

Electrochemical performance of PCF electrodes: a CV curves, b capacitances, and c gravimetric capacitances at different scan rates; d percentage and e capacitance of diffusion-controlled and capacitive contribution for PCF (12.5 g L−1 pyrrole); (f) Nyquist plot of PCF (12.5 g L−1 pyrrole), the insets are enlarged view of high-frequency region and equivalent circuit; (g) GCD curves at 5 mA, (h) capacitances, and (i) gravimetric capacitances at different currents

Fig. 7
figure 7

Electrochemical performance of symmetric PCF (12.5 g L−1 pyrrole) supercapacitor: a CV curves and b gravimetric capacitance; c GCD curves and d gravimetric capacitance; e Ragone plots; f Cyclic stability

Conclusions

In summary, a stretchable and conductive cotton (PCF) with great strain-sensing capability, electrothermal function, and electrochemical performance is fabricated successfully. As pyrrole concentration increases, the granular PPy with small sizes accumulate into bigger ones, and further form a membrane layer. PCF prepared with 15.0 g L−1 pyrrole possesses a high PPy loading (4.47 mg cm−2) and low sheet resistance (60.5 Ω sq−1). The low resistance confers PCF satisfied electrothermal performance, but high voltages will cause obvious decrease of temperature (at 12 V) and even burn out the PCF (at 16 V). Eight volt is a moderate voltage for PCF and induces a temperature of 80.0 °C (0% strain), 68.7 °C (20% strain), and 62.8 °C (40% strain). Besides, PCF can hold a continuous electrothermal heating for eight days with a temperature retention of 43.8%. The yarn structure of PCF has separation and tightening processes during stretching, which results in an increasing–decreasing variation of resistance. PCF exhibits short response time (110 ms), long-term sensing capability (over 10,000 cycles), and successful monitoring for bending-recovering movements of back, finger, wrist, and knee. The good anti-wettability to droplets (HCl solution, NaCl solution, cola, and milk) may be beneficial to the self-clean of PCF heater and sensor, but adverse to the permeation of electrolyte in electrochemical process. Ethanol wetting is a good way to solve this problem, and thus PCF possesses capacitances of 823.5 mF (189.3 F g−1) at 5 mV s−1 and 1208.3 mF at 2 mA (277.8 F g−1 at 0.46 A g−1). Analyzation of reaction kinetics indicates that dominant capacitance contribution in PCF derives from diffusion-controlled process. And a capacitance retention of 55.6% is maintained by the symmetric PCF supercapacitor after 20,000 GCD cycles. The excellent performance implies that the fabricated PCF has great potential in wearable electronics for soft robots, health monitoring systems, heaters, and energy storage devices.

Experimental section

The fabrication of PCF has been reported in our previous works (Wang et al. 2020). The detailed fabricating processes, characterization methods (for morphologies, chemical structures, resistance measurements, electromechanical and sensing tests, electrothermal heating tests, electrochemical tests) and calculations (for resistance, sensitivity, gravimetric capacitance, energy/power density and reaction kinetics) have been presented in Supplementary Information.