Introduction

Continuous progress in wearable electronics boosts the development in light, thin and flexible energy storage devices [1,2,3,4]. In numerous energy storage devices, flexible supercapacitors acquire extensive attention for its unique characteristics of long cycle life and high power density [5,6,7]. Generally, flexible supercapacitors are fabricated by coating solid active materials (metal oxides or graphene nanosheets) onto gel electrolyte [8,9,10,11]. However, these flexible supercapacitors are susceptible to complex mechanical deformations such as bending or twisting. Besides, the solid electrode surface cannot keep entirely efficient contact with gel polymer electrolytes, which may lead to poor electrolyte ion transport and low electrochemical performance. In order to fabricate supercapacitors with good flexibility and high specific capacitance, searching suitable electrode material has become a key challenge to the manufacture of wearable devices.

Conducting polymer hydrogel (CPH) is potential candidate as electrode of flexible supercapacitors for its light weight, deformable properties and scalable processability [12, 13]. For its unique three-dimensional porous structure, the conducting polymer hydrogel electrode provides excellent electrochemical interaction platform between the electrode/electrolyte interface, which allows electrolyte ions to diffuse into the inner electrode materials easily. Generally, two typical routes are applied in synthesizing CPHs. The first method is adding small molecules (acting as gelators, dopants, as well as crosslinkers) to monomers of conducting polymers. When initiator is added into the blends of monomers and small molecules, chain growth and crosslinking of polymer chains occur simultaneously to build three-dimensional nanostructure conducting polymer gels. Since the team of MacDiarmid first synthesized polyaniline based gels in 1992, several researches on this kind of conducting polymer hydrogels have been reported. Bao and co-workers produced a polyaniline hydrogel using phytic acid as the gelling agent as well as the dopant [14]. Due to the six acid groups structure of phytic acid which was capable of interacting with more than one polyaniline chain, the polyaniline/phytic acid hydrogel showed three-dimensional inter-connected pores and high conductivity of 0.11 S cm−1. By using a dopant copper phthalocyanine-3,4’,4’’,4’’’-tetrasulfonic acid tetrasodium salt as both dopant and gelling agent, Yu and co-workers introduced a supramolecular strategy to synthesize polypyrrole conducting hydrogels, which exhibited a high specific capacitance of 400 F g−1 at 0.2 A g−1 [15]. Although these conduncting polymer hydrogels show superior performance as electrode materials, their brittle network structures are easily broken during bending or twisting.

The second method to synthesize CPHs is polymerizing aromatic monomers in existing soft polymers matrix which basically serve as physical frameworks. In this kind of CPHs, soft polymers matrix likes polyvinyl alcohol, polyacrylic acid and polyacrylamide acts as supporting framework and polyaniline, polypyrrole or their composites are exploited as the electroactive material [16,17,18,19]. Combining soft polymers matrix and rigid conducting polymer is a good method to improve the mechanical properties of CPHs as well as avoid the damage of network structures during large deformation. Thus far, plenty of CPHs have been synthesized by in situ polymerization of pyrrole or aniline in insulating polymers matrix aqueous solution. For example, Ma and co-workers reported a crosslinked a rigid conducting polymer (polyaniline) and a soft hydrophilic polymer (polyvinyl alcohol) through boronic acid to form a strong and robust CPH, which mimicked the dynamic structure of animal dermis [20]. The conducting hydrogel was mechanically robust with a tensile strength of 5.3 MPa. Besides, it can be made into a knot and stretched up to 250%. Shi et al. prepared a nanostructured conducting polypyrrole hydrogel with specific capacitance of 380 F g−1 at mass loading of 20 mg cm−2 via an interfacial polymerization method [21]. Huang et al. reported a reinforced PANI conducting hydrogel electrode by in situ polymerization of aniline, which showed excellent mechanical property but the specific capacitance was unsatisfactory (240 F g−1 at 1 A g−1) [22]. Ding et al. reported a hybrid conducting hydrogel based on viscoelastic PVA-borax as frameworks and nanostructured cellulose nanofibers-polypyrrole complexes as active material [23]. Due to the reversible borate bond, the conducting hydrogel demonstrated fast self-healing ability without additional external stimuli. Yin et al. designed a novel soft supercapacitor based on polyvinyl alcohol/polypyrrole composite hydrogel. For its layered wrinkle structure with a large amount of water, the composite hydrogel exhibited excellent elasticity, compressibility and softness [24]. It should be noticed that although CPHs are endowed with various function, the electrochemical parameters of current flexible supercapacitors are far from the requirements of commercialization [25,26,27,28,29]. Superior energy/power densities are still the most desired for energy storage device of flexible electronics. [30,31,32].

Among conducting polymer hydrogels, polyaniline and polypyrrole hydrogels have received great attention as the feasible electrode materials for the flexible supercapacitors due to their high theoretical specific capacitance and low cost. However, the copolymer hydrogels of aniline and pyrrole have rarely been reported as the free-standing conducting electrode for supercapacitor application. What’s more, the copolymer does have a higher specific capacitance than the homopolymer PPy and PANI. Ai-Qin Zhang et al. found that copolymers poly(pyrrole-co-aniline) exhibited remarkable electrochemical property [33]. The specific capacitance of the copolymer electrode was 827 F g−1 at a current of 8 A g−1, which was much higher than that of conductive polymer electrodes. In previous work of our team, a series of phytic acid-doped copolymer powder poly (aniline-co-pyrrole) at different molar ratio of aniline to pyrrole have been synthesized by chemical polymerization [34]. The copolymer powder electrode shows remarkable specific capacitance (639 F g−1) at molar ratio of aniline to pyrrole = 3:1.

Herein, conducting poly(aniline-co-pyrrole)/polyvinyl alcohol hydrogels have been synthesized by in situ copolymerization of aniline and pyrrole in aqueous solution of phytic acid and polyvinyl alcohol. Based on this self-standing hydrogel electrode and a typical PVA/H2SO4 hydrogel electrolyte, an all-hydrogel-state supercapacitor has been assembled. The effects of aniline-pyrrole monomer molarity on morphologies, structures and electrochemical performance of the PACP hydrogels were studied. It is worth mentioning that copolymer hydrogel electrode maintains 81.7% of initial capacitance after repeated bending 500 cycles, showing excellent mechanical flexibility. The assembled all-hydrogel-state symmetric supercapacitor, which consists of PACP/PVA hydrogel electrodes and PVA/H2SO4 gel-electrolytes, shows favorable energy density of 44 µWh cm−2 (22 Wh kg−1) at a power density of 250 µW cm−2 (125 W kg−1).

Experimental section

Materials

Pyrrole (Py), Phytic acid (PA), polyvinyl alcohol (PVA, 99% hydrolyzed, degree of polymerization 1750) and ammonium persulfate (APS) were purchased from Sinopharm Chemical Reagent Co., Ltd. Aniline (AN) was purchased from Aladdin Chemistry Co. Ltd, China. All reagents in this research were used as received.

Synthesis of PACP/PVA hydrogels

The schematic diagram of synthesis of PACP/PVA hydrogel was displayed in Fig. 1. 1.5 g of PVA was added into 17 mL of deionized water and stirred to get the solution at 95 °C. After the solution was cooled down, phytic acid and a certain amount of aniline and pyrrole (molar ratio of aniline to pyrrole = 3:1) were added and then stirred in ice-water bath (solution A). APS was dissolved in 10 mL deionized water to get solution B. Solution B was added dropwise into solution A with stirring for 10–15 min. The solution was poured into a petri dish, followed by attaching carbon paper on the surface as current collector. Subsequently, the solution was stored at − 20 °C for 12 h and thawed at room temperature for 12 h as a freezing–thawing (F-T) cycle. To obtain hydrogel, the solution was treated by three F-T cycles. Finally, the samples were immersed in deionized water repeatedly to remove organic impurities and nonreactive monomers. The molarity of aniline/pyrrole monomer mixture was 0.4 M, 0.6 M, 0.8 M, 1.0 M, 1.2 M and the corresponding specimens were labeled as PACP/PVA-0.4, PACP/PVA-0.6, PACP/PVA-0.8, PACP/PVA-1.0 and PACP/PVA-1.2, respectively. As comparison, pure polyaniline, polypyrrole and PVA hydrogels were fabricated in the same procedure with PACP/PVA.

Figure 1
figure 1

Schematic illustration for the preparation process of PACP/PVA hydrogel. a Synthesis of PACP/PVA hydrogel by in situ polymerization through freezing–thawing method. b Copolymerization of aniline and pyrrole. c Crosslinking reaction of poly(aniline-co-pyrrole), phytic acid and PVA

Fabrication of flexible all-hydrogel-state supercapacitor device

Firstly, PVA/H2SO4 hydrogel electrolyte was synthesized by dissolving 1.5 g PVA to 15 ml of 1 M sulfuric acid solution. Then, two hydrogel electrodes were prepared by pouring PVA/H2SO4 hydrogel electrolyte on PACP/PVA conducting hydrogel (remaining a dimension of 20 × 10 × 1 mm2). The hydrogel electrodes were stacked face-to-face to fabricate an all-hydrogel-state supercapacitor, in which the hydrogel electrolyte was used as separator and glue. Finally, the supercapacitor was treated by the F-T cycle to give the fixed shape.

Characterization of PACP/PVA hydrogel electrode

Fourier transform infrared (FTIR) was recorded on a FTIR spectrophotometer (Thermo Nicolet iS5 Thermo Fisher, America). X-ray diffraction (XRD) was conducted using a Bruker D8 ADVANCE diffractometer equipped with Cu Kα radiation (λ = 1.5418 Å). The morphology of CPHs was examined by a scanning electron microscope (SEM, SU8220, Hitachi, Japan) at an acceleration voltage of 10 kV. The mechanical property test was carried out by an electronic universal testing machine (MC009-WDW-20). Surface area of samples was examined by Brunauer–Emment–Teller(BET) measurements with an ASAP-2100 surface area analyzer and the pore size distribution was obtained from the Barrett-Joyner-Halenda method.

Electrochemical test

The electrochemical performances of PACP/PVA electrodes were characterized by a cyclic voltammetry (CV), galvanostatic charge–discharge (GCD) tests, and electrochemical impedance spectroscopy (EIS) measurements in a three-electrode system by using electrochemical workstation (CHI660E, Shanghai, China). PACP/PVA hydrogel was used as working electrode and the area of the hydrogel on the surface of carbon paper is 1 cm × 1 cm. The mass loading of the active material was 1.1, 1.6, 2.0, 2.5, 2.8 mg cm−2 for PACP/PVA-0.4, PACP/PVA-0.6, PACP/PVA-0.8, PACP/PVA-1.0 and PACP/PVA-1.2, respectively. A platinum plate was used as a counter electrode and a calomel electrode was used as a reference electrode. CV curves were collected in the voltage window of − 0.2 to 0.8 V at the scan rates of 5, 10, 20, 30, 50 and 100 mV s−1. GCD tests were taken with varying voltages ranging from − 0.2 to 0.8 V at the current densities of 0.5, 1, 1.5, 2.5 and 5 A g−1. EIS was tested in the frequency range from 0.01 Hz to 100 kHz with an amplitude of 5 mv.

Based on the data of GCD, specific capacitance (Cm, F g−1) of single electrode materials can be calculated by the following Eq. (1)

$$C_{m} = \frac{{I\Delta t}}{{m\Delta V}}$$
(1)

where I (A) is the discharge current, ∆t (s) is the discharge time, and ∆V (V) is the voltage window during the GCD process, m (g) is the mass of electroactive material.

The electrochemical behaviors of PACP/PVA-based supercapacitor devices were examined in a two-electrode system with the potential window of 0 to 1 V. The areal specific capacitance (Csa) of all supercapacitors devices was calculated from their GCD curves according to Eq. (2). Energy density (Esa, µWh cm−2) and Power density (Psa, µW cm−2) were calculated according to the Eq. (3) and (4), respectively.

$$C_{{{\text{sa}}}} = \frac{{I\Delta t}}{{S\Delta V}}$$
(2)
$$E_{{{\text{sa}}}} = \frac{{C_{{{\text{sa}}}} \Delta V^{2} }}{2}$$
(3)
$$P_{{{\text{sa}}}} = \frac{{E_{{{\text{sa}}}} }}{{\Delta t}}$$
(4)

where S (cm2) is the area of hydrogel electrode, I (A) is the discharge current, ∆t (s) is the discharge time, and ∆V (V) is the voltage window.

Results and discussion

Structural and morphology analysis

Poly(aniline-co-pyrrole)/polyvinylalcohol hydrogels were synthesized by copolymerization and F-T method as shown in Fig. 1. Poly(aniline-co-pyrrole) was formed by in situ rapid polymerization of aniline and pyrrole in the presence of phytic acid and APS, where phytic acid acted as dopant and crosslinker of copolymers by hydrogen-bonding and ionic interaction. Then, conducting poly(aniline-co-pyrrole)/PVA hydrogel was produced by F-T method, in which microcrystalline domains and hydrogen bond between PVA chains were formed. It can be expected that the rapid copolymerization, hydrogen bond and conducting hydrogel provide poly(aniline-co-pyrrole)/PVA electrode with structural stability as well as high specific capacitance and remarkable cycling performance.

Figure 2a shows FTIR spectra of PVA hydrogel and PACP/PVA hydrogels with various molarity of aniline/pyrrole monomer mixture. All PACP/PVA hydrogels exhibited similar absorbance peaks of PANI, PPy and PVA. The absorbance peaks appeared at about 3310, 2920 and 1092 cm−1 were attributed to the vibrations of O–H, C–H, and C–O bonds of PVA, respectively [35]. The bands at 1590, 1493, 1304 cm−1 were assigned to the quinoid ring, benzenoid ring and C–N stretching mode of aniline structure in the copolymer [32]. The bands at 1458 and 1319 cm−1 were attributed to the pyrrole ring vibration in the copolymer and the peak at 1176 and 810 cm−1 were assigned to the C–C stretching and out-of-plane bending vibration of pyrrole ring, respectively. The absorption peaks at 1612 cm−1 observed from all PACP/PVA hydrogels can be ascribed to stretching vibration of P=O. The appearance of such P-related FTIR absorbance peaks suggested that phytic acid was doped to PACP/PVA hydrogels [36]. Besides, the absorption peaks at 1147 cm−1 can be ascribed to vibration of C-O-P, indicating the formation of crosslinks between poly (aniline-co-pyrrole) copolymer and phytic acid [34]. It was found that there was little difference in FTIR of samples, which illustrated that different concentration caused little change to chemical structure of PACP/PVA hydrogels. The spectra and relative intensities of the characteristic peaks in PACP/PVA differed from PANI/PVA and PPy/PVA (Fig. S1), which suggested a different molecular structure among PACP/PVA, PANI/PVA and PPy/PVA. This phenomenon also revealed that besides pyrrole-pyrrole or aniline-aniline linkages, aniline-pyrrole heterodiads were most likely to be present in copolymer chains [37].

Figure 2
figure 2

a FTIR spectra and b XRD pattern of PVA and PACP/PVA hydrogels with various molar concentrations of monomer

To further explore the structure of hydrogels, PVA and PACP/PVA hydrogels were investigated by XRD as plotted in Fig. 2b. For PVA hydrogel, the diffraction peak at 2θ = 19.8ºand 41ºwas observed, suggesting its semi-crystalline structure. For PACP/PVA hydrogel, typical peaks of PVA also appeared which confirmed the existence of crystallites formed in freezing–thawing process [38]. It is known that freezing–thawing cycles can cause gelation of PVA solution. During the freezing–thawing process, crystallization of PVA occurred in PACP/PVA hydrogel. The microcrystalline of PVA was referred as the primary crosslinking site responsible for the gelation of PACP/PVA hydrogel network [22]. As the decrease in copolymer concentration, the XRD pattern of PACP/PVA hydrogel was similar to that of the pure PVA. In addition, only broad characteristic peak of poly(aniline-co-pyrrole) was observed in patterns of PACP/PVA hydrogel (Fig. S2), indicating an amorphous copolymer structure in PACP/PVA hydrogel network. For PACP/PVA hydrogel, the intensity of the diffraction peak at 2θ = 19.8º assigned to PVA gradually decreased with the increase in PACP content. Because when monomer concentration was low, the intensity of the diffraction peak at 2θ = 19.8º was relatively obvious. When the monomer concentration increased, the relative content of PVA gradually decreased. More poly(aniline-co-pyrrole) chains were formed and the diffraction peak of PVA may be covered by the peak of poly(aniline-co-pyrrole). Besides, as the concentration of copolymer increased to 1.2 M, a peak at about 2θ = 25º appeared for PACP/PVA-1.2, which was assigned to poly (aniline-co-pyrrole) [34]. When the monomer concentration was lower than 1.2 M, the peak at 2θ = 25º was invisible in XRD pattern of PACP/PVA hydrogels, because PVA content was relatively high. When the monomer concentration increased to 1.2 M, more poly(aniline-co-pyrrole) chains were formed and transformed from amorphous structure to semi-crystalline state.

SEM images of PVA and PACP/PVA hydrogel were shown in Fig. 2. With the help of freezing–thawing cycles, three-dimensional porous PVA hydrogel was successfully prepared and the pore size of PVA hydrogel distributed from several micrometers to nanometers (Fig. 3a and b). Compared with porous PVA hydrogel, the PACP/PVA hydrogel exhibited a relatively coarse surface (Fig. 3c and d). In addition, the PACP/PVA hydrogel not only maintained typical sponge-like three-dimensional network structure but also showed a relatively hierarchical porous morphology with pore size at 0.5–3 µm, which differed from PANI/PVA and PPy/PVA hydrogel with pore size at 2–10 µm (Fig. S3). This hierarchical porous morphology also can be confirmed by the N2 adsorption/desorption isotherm of PACP/PVA-0.8 hydrogel (Fig. S4). From the results of BET, the specific surface area of PACP/PVA-0.8 was 55.32 m2 g−1. As exhibited in Fig. S4b, the PACP/PVA-0.8 hydrogel exhibited a wide pore size distribution, suggesting its hierarchical mesoporous/macroporous structure. The mesopores in PACP/PVA-0.8 hydrogel were centered at 30–50 nm, which contributed to the pseudo-capacitance by providing plenty of active site for faradaic reaction [22]. In addition, the macropores at 50–100 nm enhanced the rate behavior by reducing the ionic diffusion length. The porous structure may be induced by entanglement of PVA and phytic acid doped copolymer chains, in which phytic acid acts as crosslinker (Fig. 3e). Phytic acid may bind with more than one nitrogen sites of the PANI chain or form an inter-chain linkage among several adjacent PANI chains by reaction between functional groups [14]. Besides, this continuous porous network may be beneficial to the construction of conducting pathways due to the well-distributed copolymer chains in PVA matrix. The three-dimensional hierarchical porous microstructure endowed PACP/PVA hydrogel with both nanoscale porosities and large open channels, which facilitated transport of water medium and electrolyte ions to the hydrogel inside [24]. More importantly, sponge-like network provided more extensive reaction platform for ionic adsorption at the interface between electrode and electrolyte [39].

Figure 3
figure 3

SEM images of a, b PVA hydrogel, c, d PACP/PVA-0.8 hydrogel; e Schematic illustration of interactions within PACP/PVA hydrogel

Mechanical properties of hydrogels

The mechanical properties of PACP/PVA hydrogels were studied in detail. Figure 4a shows tensile stress–strain curves of PACP/PVA hydrogels. For PACP/PVA hydrogels, the elongation at fracture and tensile strength primarily depended on poly(aniline-co-pyrrole) content. As poly(aniline-co-pyrrole) molarity increased from 0.4 to 0.8 M, the tensile strength and strain showed an increasing trend. Particularly, the PACP/PVA-0.8 hydrogel displayed an excellent elongation at fracture of 98.5%. However, as molarity of aniline and pyrrole in the hydrogel increased from 0.8 M to 1.2 M, the elongation at fracture and tensile strength reduced obviously. Because excess copolymer chains may hinder the formation of crystallites in freezing–thawing process [40]. Therefore, the corresponding cross-linking density decreased, which contributed to low tensile strength and elongation rate. Digital photos of PACP/PVA hydrogels were shown in Fig. 4b, the samples could be sheared into multifarious shapes like star, heart or Chinese characters, suggesting a good machinability. Besides, the PACP/PVA-0.8 hydrogel was capable of bending, twisting, knotting or stretching by 200% without apparent damage (Fig. 4c) and recovering their initial shape immediately when force was released (Movie1 and 2), which showed good flexibility and potential of application for wearable supercapacitors.

Figure 4
figure 4

a Tensile stress–strain curves of PACP/PVA hydrogels with various molar concentrations of monomer; b, c photographs of PACP/PVA-0.8 hydrogel with various shapes

Electrochemical properties of PACP/PVA hydrogel electrodes

The electrochemical properties of PACP/PVA hydrogel electrodes were investigated by cyclic voltammetry (CV), galvanostatic charge/discharge (GCD) and electrochemical impedance spectroscopy (EIS) in 1 M H2SO4 electrolyte. Figure 5a illustrates the CV curves for PACP/PVA hydrogel electrodes under a scan rate of 10 mV s−1 from − 0.2 to 0.8 V. Two pairs of redox peaks can be observed in the CV curves of all samples, which represented pseudocapacitive behavior. It was noted that the redox peaks for PACP/PVA-0.8 (− 0.09 V/− 0.04 V, 0.36 V/0.56 V) exhibited an apparent shift from PANI/PVA (0.13 V/0.2 V, 0.43 V/0.48 V) and PPy/PVA (0.17 V/0.28 V) (Fig. S5). For PACP/PVA hydrogel electrodes, the oxidation and reduction peaks in CV curves shifted with various molar concentrations of monomer, which resulted from kinetic effects and the change of hydrogel electrode resistance. The enhanced resistance of the PACP/PVA hydrogel restricted the H+ ion diffusion which led to suppressed Faradaic reaction and charge transfer at the PANI-electrolyte interface [39]. So the oxidation and reduction peak location in CV curves shifted accordingly. According to formula \(C_{m} = \left( {\smallint I{\text{dV}}} \right)/\left( {m*V*{\text{Sr}}} \right)\), the specific capacitance (Cm) is consistent with area in CV curves, where I is the corresponding current density, V is the voltage range, m is the mass of active materials and \(~{\text{Sr}}~\) is the scan rate. It can be summarized that PACP/PVA-0.8 hydrogel electrode owned the highest specific capacitance in these specimens for its largest area of CV [41]. The GCD curves of the PACP/PVA conducting hydrogel electrodes at a current density of 0.5 A g−1 were presented in Fig. 5b. All hydrogel electrodes showed an irregular triangle curve containing both linear plots and obvious charging/discharging plateau region. This phenomenon represented the following two voltage states: Firstly, the voltage stage in potential window from 0.8 to 0.5 V was ascribed to the electrical double-layer (EDL) capacitance. Secondly, the hydrogel electrodes possessed both EDL and faradaic behaviors simultaneously in voltage window from 0.5 to − 0.2 V with a longer discharge period [42]. Specific capacitance was calculated from Eq. (1). The corresponding specific capacitance of hydrogels with monomer concentration of 0.4 M, 0.6 M, 0.8 M, 1.0 M and 1.2 M was 785.4, 862.2, 1267, 1117.2 and 1019.4 mF cm−2, respectively. In addition, profiting from copolymerization, the specific capacitance of PACP/PVA (1267 mF cm−2) was higher than that of PANI/PVA (842 mF cm−2) and PPy/PVA (646 mF cm−2) conducting hydrogel electrode in the same molarity (Fig. S6). To our best knowledge, the specific capacitance of PACP/PVA-0.8 hydrogel electrode was superior to that of most PANI-based or PPy-based hydrogel electrodes, which can be seen in Table 1 for detailed comparison. This result can be explained from two aspects as shown in Fig. 5e. Firstly, the poly(aniline-co-pyrrole) doped by PA exhibited better electrochemical capacitive performance than single component. Secondly, the ordered and porous structure of PACP/PVA hydrogel showed plenty of large open channels, which was beneficial to fast ion exchange and electron transmission between active materials and electrolyte [43].

Figure 5
figure 5

Electrochemical performance of PACP/PVA hydrogel electrodes with various molar concentrations of monomer: a CV curves under a scan rate of 10 mV s−1, b GCD curves at a current density of 0.5 A g−1, c EIS plots in frequency range from 0.01 Hz to 100 kHz and photographs showing electrical conducting of PACP/PVA hydrogel (inset), d Specific capacitance at different current densities; e Schematic illustration of the microstructure of PACP/PVA hydrogel; Electrochemical performance of PACP/PVA-0.8 hydrogel: f CV curves under different scan rates, g GCD curves at different current densities. and h Capacitance cycling stability at a current density of 1.5 A g−1

Table 1 Comparison of the specific capacitance and cycling stability of reported conducting hydrogel electrodes

Figure 5c shows the Nyquist plots of PACP/PVA hydrogel electrodes with various molar concentrations of monomer. The internal resistances (Rs) of PACP/PVA electrodes were similar (0.56Ω) in the high-frequency region, suggesting high conductivity of PACP/PVA hydrogels. The straight line in the low frequency region mainly represented the capacitance characteristics of the electrode material. PACP/PVA-0.8 electrode showed the largest slope in the low frequency region, indicating a better capacitance characteristic than PANI/PVA and PPy/PVA hydrogel electrode (Fig. S7). The corresponding specific capacitance values with respect to different current density for changing monomer concentrations were summarized in Fig. 5d. With the increasing monomer molarity from 0.4 to 0.8 M, the corresponding specific capacitance enhanced drastically from 785.4 to 1267 mF cm−2. However, when monomer molarity increased from 0.8 to 1.2 M, the corresponding specific capacitance showed a decline trend. This phenomenon might be attributed to the variation in charge transfer resistance (Rct). Through fitting with an equivalent circuit, the Rct of the PACP/PVA hydrogel electrodes from PACP/PVA-0.4 to PACP/PVA-1.2 were 1.46, 0.76, 0.68, 0.77 and 1.27 Ω, respectively. Rct was an important factor affecting the capacitance of PACP/PVA hydrogel electrodes. The capacitance of electrode material showed depressed performance because of the suppressed diffusion of ion caused by increased resistance. When monomer molarity increased from 0.4 to 0.8 M, the Rct showed a decline trend. It may be caused by more active component in the conducting hydrogels. However, the Rct of PACP/PVA hydrogel enhanced slightly when monomer molarity changed from 0.8 to 1.2 M, which might be attributed to the irregular molecular chain structure caused by rapid polymerization. Low Rct accelerates the transfer of electrons in electrode–electrolyte interface, which may contribute to high specific area capacitance. Compared with other PACP/PVA hydrogels, the straight line of PACP/PVA-0.8 hydrogel displayed the larger slope in low frequency area, which indicated a better capacitive property. Therefore, PACP/PVA-0.8 hydrogel had the best capacitance characteristic. To further illustrate conductivity of PACP/PVA hydrogel, digital photograph was also shown in Fig. 5c inset. The photograph showed that the PACP/PVA hydrogel could play a role of wire in a closed loop.

To further explore the electrochemical performance of PACP/PVA-0.8 conducting hydrogel electrode, the CV curves at various scan rates of 5, 10, 20, 30, 50 and 100 mV s−1 were shown in Fig. 5f. Generally, rectangular form in the CV curve was considered as the indication of an ideal capacitive nature. The representative redox peaks still appeared with increasing scan rates, which were assigned to the transformation between redox states of PACP/PVA-0.8 hydrogel electrode. In addition, the increase of peak current with rising scan rates indicated the good responsiveness and rate capability. Figure 5g illustrates the GCD curves of PACP/PVA-0.8 hydrogel electrode at current densities of 0.5, 1, 1.5, 2.5 and 5 A g−1. According to the Eq. (1), the corresponding specific capacitance for electrodes was 633.5, 535, 480.5, 446.3 and 400.5 F g−1 (1267, 1070, 961, 892.6 and 801 mF cm−2 at current densities of 1, 2, 3, 5 and 10 mA cm−2), respectively. The specific capacitance showed a declining trend with promoting current density. This phenomenon may because the electrolyte ions at high current density diffuse more slowly than that at low current density, which led to partial active material reaction during charging and discharging [46]. The cycling stability also played an important role in practical application for electrode materials. Figure 6h demonstrates the cycling stability of PACP/PVA-0.8 at the current density of 1.5 A g−1. After 10,000 cycles, the retained specific capacitance of PACP/PVA hydrogels was 86.4%. The exceptional performance can be ascribed to its three-dimensional hierarchical porous microstructure, allowing more space for volume change during the process of doping/dedoping of anions. Besides, the crosslinks between poly(aniline-co-pyrrole) backbones (Fig. 2e) were formed due to phytic acid doping, which contributed to improvement in the structural stability of PACP/PVA hydrogel electrode.

Figure 6
figure 6

Electrochemical characterizations of PACP/PVA-0.8 hydrogel before and after bending: a CV curves under scan rate of 10 mV s−1, b GCD curves at current density of 0.5 A g−1, c Nyquist plot in frequency range from 0.01 Hz to 100 kHz, d Capacitance cycling stability at current density of 1.5 A g−1

To verify the flexibility of electrode, the repetitive bending at 180° for 500 cycles was applied to the PACP/PVA-0.8 hydrogel. Electrochemical performances before and after bending were tested as shown in Fig. 6. The redox peaks at − 0.1 and − 0.04 V were nearly disappeared after repetitive bending. But the CV curves of PACP/PVA-0.8 hydrogel electrode still exhibited obvious redox peaks at 0.37 and 0.55 V after deformation, indicative of obvious pseudo-capacitance behavior in charge storage. GCD testing showed similar curves of hydrogel electrode before and after bending. The specific capacitance was 633.5 and 520 F g−1 at the current density of 0.5 A g−1, respectively. Although specific capacitance declines for repetitive bending, 81.7% of initial capacitance was retained, indicating that PACP/PVA hydrogel electrode exhibited remarkable flexibility. Figure 6c showed the Nyquist plot of PACP/PVA-0.8 hydrogel electrode before and after bending. It was found that the Rs was almost invariable after bending 500 cycles, suggesting high electrical conductivity. Such a high tolerance to mechanical bending of the PACP/PVA-0.8 hydrogel electrode was mainly owing to the two factors: (1) soft and tough PVA matrix, (2) efficient strain relaxation benefited from porous microstructure [20]. The cycling stability of PACP/PVA-0.8 hydrogel electrode before and after bending 500 cycles at 1.5 A g−1 current density was shown in Fig. 6d. After bending, the capacitance retention ratio of 78% after 10,000 cycles indicated excellent cycling stability of PACP/PVA-0.8 hydrogel electrode. The high capacitance retention can be attributed to the alleviated stress of cyclic swelling and shrinking of poly(aniline-co-pyrrole) chains by the interconnected three-dimensional network of hydrogels. But strong deformation may damage network, especially on relatively rigid poly(aniline-co-pyrrole) chains, which led to a declining cycling stability [47].

To further evaluate the advantages of PACP/PVA hydrogel electrode for practical application, all-hydrogel-state flexible supercapacitors were fabricated as shown in Fig. 7a and electrochemical performance was also tested (Fig. S8). A typical PVA-H2SO4 hydrogel was used as polymer electrolyte and PACP/PVA hydrogels instead of traditional solid electrode material were used as symmetrical electrodes to fabricate the sandwich-structure flexible supercapacitors (Fig. S9). Compared to the traditional method of pressing solid electrodes on soft electrolyte, this kind of all-hydrogel-state design demonstrated a stronger binding force at the electrode/electrolyte interface. The device exhibited a rectangular CV curve with redox peaks at a scanning rate of 5–100 mV s−1 with the voltage window of 0–1 V in Fig. 7b, indicative of both electric double layer capacitance and pseudo-capacitance in charge storage. The GCD performance of device was evaluated at the current density ranging from 1 to 10 mA cm−2 (Fig. 7c). All curves exhibited a symmetrical triangle shape, which suggested an excellent reversibility of the flexible supercapacitor. When current densities were 1, 2, 3, 5 and 10 mA cm−2, the corresponding specific capacitances of flexible supercapacitor were 350, 285, 244, 222, and 145 mF cm−1, respectively. It was obvious that the specific capacitance for the device declined with the enhanced current density from 1 to 10 mA cm−2, which was ascribed to incomplete redox reaction of active PACP in PACP/PVA hydrogel electrodes at high current density. Figure 7d shows cycling stability of device through repeating charge–discharge test at the current density of 3 mA cm−2. It can be seen that the device showed specific capacity retention of 79.9% after 1000 cycles. To demonstrate extraordinary energy storage capability, a red light-emitting diode (rated voltage 1.5 V, power 60 mW) was powered by supercapacitor device based on PACP/PVA-0.8 hydrogel electrode as shown in Fig. 7d inset. It can power a red light-emitting diode (LED) 40 s after charging about 80 s by electrochemical workstation. The relationship between energy density and power density of all-solid-state supercapacitor based on various PACP/PVA hydrogels was demonstrated in Fig. 7e. It was found that energy density of supercapacitor device exhibited a declining trend with increasing power density. This trend also appeared in mass energy density relationship corresponding to mass power density of flexible supercapacitors based on PACP/PVA hydrogels (Fig. S10). The device based on PACP/PVA hydrogel-0.8 showed the highest energy density of 44 µWh cm−2 (22 Wh kg−1) at a power density of 250 µW cm−2 (125 W kg−1) among these supercapacitor devices and still maintained an energy density of 27.6 µWh cm−2 (13.8 W kg−1) at high power density of 2500 µW cm−2 (1250 W kg−1), indicating that the supercapacitor based on this porous soft hydrogel electrode was promising to be a candidate for energy storage applications.

Figure 7
figure 7

a Fabrication of all-hydrogel-state flexible supercapacitor based on PACP/PVA-0.8 hydrogel electrode; Electrochemical performance of flexible supercapacitor based on PACP/PVA-0.8 hydrogel electrode: b CV curves under different scan rates, c GCD curves at different current densities, d Cycle stability at 3 A g−1 and a red light-emitting diode powered by supercapacitor device (inset); e Area energy density relationship corresponding to area power density

Conclusions

In summary, a series of flexible and self-standing conducting PACP/PVA hydrogel electrodes doped by phytic acid were synthesized by in situ copolymerization method. Particularly, the PACP/PVA-0.8 hydrogel electrode exhibited good flexibility (elongation at fracture of 98.5%), high specific capacitance (633.5 F g−1) and excellent cycling stability (86.4% capacitance retention after 10,000 cycles), which were far better than that of PPy or PANI-based hydrogel electrodes. After repeated bending 500 cycles, the PACP/PVA-0.8 hydrogel electrode still maintained 81.7% of initial capacitance, indicating excellent mechanical and electrochemical stability. The superior electrochemical performance of PACP/PVA hydrogel electrodes was ascribed to combined effects of the intrinsically high-capacitance characteristic of poly(aniline-co-pyrrole) and interconnected three-dimensional network of hydrogels. The unique three-dimensional porous microstructure was beneficial to ion/electron transmission and provided more active sites for electrochemical reactions of PACP/PVA hydrogels. To further evaluate the advantages of PACP/PVA hydrogel electrode for practical application, the symmetric all-hydrogel-state supercapacitor was assembled by PACP/PVA-0.8 hydrogel electrode and PVA/H2SO4 gel electrolyte, which displayed high energy density of 44 µWh cm−2 (22 Wh kg−1) at power density of 250 µW cm−2 (125 W kg−1). Moreover, PACP/PVA-0.8 hydrogel based device could power a red light-emitting diode for a long time after charging, suggesting that the PACP/PVA hydrogel offered new opportunities for future portable and wearable energy-storage devices.