1 Introduction

Limited freshwater resources are now seriously threatened by environmental degradation, climate change, and over-exploitation. According to the Food and Agriculture Organization of the United Nations, freshwater per capita has decreased by 20% over the previous two decades, with approximately 60% of irrigated farmland experiencing water scarcity. Furthermore, more than 70% of global freshwater flow is allocated for agricultural purposes [1]. To address this issue, various technologies are being explored to enhance agricultural water efficiency, aiming to reduce the demand for freshwater resources worldwide. The technologies being researched at the moment to increase the effectiveness of agricultural water use primarily include the following: (i) Soil amendment: Hydrogel is a soil additive that can be used to irrigate plants even in arid or desert environments by holding irrigation water or rainwater when placed into the soil [2,3,4]. (ii) Wastewater irrigation: The heavy metal ions in the wastewater are filtered, which makes it possible to use the effluent for irrigation [5,6,7,8,9,10,11,12,13,14,15]. (iii) Collection of atmospheric water: To actively capture water vapor from the environment and gather fresh water, hygroscopic materials can be used [16,17,18,19]. (iv) Intelligent irrigation: Automatic control technology is adopted to implement water-saving irrigation [20,21,22]. The advantages of science, technology, intelligence, and efficiency make the intelligent irrigation system superior to the traditional one. It can prevent overwatering and lower operational costs by limiting water use at the source and increasing the rate at which water resources are utilized [23,24,25].

Although agricultural activities rely on many factors of the soil–water-plant-atmosphere system, adequate irrigation management can be established based on monitoring soil moisture [26]. On this basis, soil moisture sensors have been widely studied [27]. As a crosslinked three-dimensional hydrophilic polymer [28,29,30,31], hydrogels are a special moisture-sensitive material that can be incorporated into mechanical systems to control irrigation according to gel swelling [32,33,34]. However, as a kind of intelligent material, conductive hydrogels offer additional advantages in their ability to function as sensors, detecting external stimuli and converting them into electrical signals [35,36,37,38,39,40,41]. Polyacrylic acid is a water-soluble polymer with good biocompatibility and hydrophilicity, which is the best choice for a conductive hydrogel substrate. However, in the existing studies, the synthesis conditions of polyacrylic gel–based products are more stringent—high synthesis temperature, long reaction time, inert gas environment, etc. [42,43,44,45], which is not conducive to industrial conversion. Therefore, it is necessary to improve the synthesis process of polyacrylic-based gels.

Here, soluble polymer polyacrylic acid was selected as the substrate, doped with the conductive polymer poly(3,4-ethylenedioxythiophene)–polystyrene sulfonate (PEDOT:PSS) with good conductivity and the Na2SO3 (sodium sulfite)–APS (ammonium persulfate) oxidation–reduction initiation system was used for the reaction to synthesize the polyacrylic-based conductive hydrogel P(AA-co–N-MA)/PEDOT:PSS under mild conditions. Firstly, N-methylolacrylamide (N-MA) was used to form a crosslinked network with polyacrylic acid (PAA). Then, PEDOT:PSS was doped into the crosslinked network to form a dual network structure to improve mechanical properties. Due to the dual network design, the mechanical properties of the polyacrylic-based hydrogel are significantly improved—a tensile strain of up to 2400% was achieved. Meanwhile, the doping of PEDOT:PSS improves its conductivity—from 0.18 to 0.26 s/m. Moreover, as a conductive hydrogel, P(AA-co–N-MA)/PEDOT:PSS hydrogel enables to sense mechanical reactions with good sensitivity, and its GF reaches 8.14. In addition, the variation of water content and conductivity of P(AA-co–N-MA)/PEDOT:PSS hydrogel at different temperatures (0 ℃, 25 ℃, 45 ℃, 70 ℃) makes it a potential soil moisture sensor. The toughness and conductivity of the hydrogel remain in such a wide temperature range, indicating its high environmental applicability and suitability for use in various climates. Here, we consider it as a controller for an intelligent irrigation system to utilize water resources by irrigating on demand.

2 Synthesis

2.1 Materials

All chemicals and reagents used were of analytical grade. N-methylolacrylamide (N-MA) and poly(3,4-ethylenedioxythiophene)–polystyrene sulfonate (PEDOT:PSS) were purchased from Aladdin. Acrylic acid (AA), anhydrous sodium sulfite (Na2SO3), and ammonium persulfate (APS) were purchased from Sinopharm Chemical Reagent Co., Ltd.

Synthesis of PAA hydrogel

PAA hydrogel was prepared as the following experiment. Six milliliters of AA, 25 mg (0.11 mmol) APS, and 9.2 mg (0.073 mmol) Na2SO3 were transferred to a 100-mL flask containing 20 mL of water. The mixture was stirred at room temperature (RT) for 5 min at a rotation speed of 300 r/min, then reacted for 30 min at 60 ℃ without stirring.

Synthesis of PAA/PEDOT: PSS hydrogel

PAA/PEDOT:PSS hydrogel was prepared as the following experiment. Six milliliters of AA, 0.4 mL of PEDOT:PSS, 25 mg (0.11 mmol) APS, and 9.2 mg (0.073 mmol) Na2SO3 were transferred to a 100-mL flask containing 20 mL of water. The mixture was stirred at RT for 5 min at a rotation speed of 300 r/min, then reacted for 10 min at 45 ℃ without stirring.

Synthesis of P(AA-co–N-MA)/PEDOT: PSS hydrogel

P(AA-co–N-MA)/PEDOT:PSS hydrogel was prepared as the following experiment. Six milliliters of AA, 0.4 mL of PEDOT:PSS, 600 mg (5.93 mmol) N-MA, 25 mg (0.11 mmol) APS, and 9.2 mg (0.073 mmol) Na2SO3 were transferred to a 100-mL flask containing 20 mL of water. The mixture was stirred at RT for 5 min at a rotation speed of 300 r/min, then reacted for 10 min at 45 ℃ without stirring.

2.2 Characterization

Scanning electron microscopy (SEM) was carried out by Zeiss Sigma 500 field emission SEM. ATR-FTIR analysis was recorded by Thermo Fisher (Nicolet iS50) with the ATR diamond crystal. In situ temperature-variable FTIR measurement was recorded on the Bruker (Tensor 27) FTIR spectrometer, heating from 20 to 80 ℃, at every 5 ℃ by transmission mode. The hydrophilicity of the hydrogel is characterized by a contact angle (CA) measuring instrument (Power each JC2000D1). Thermogravimetric analysis (TGA) measurement is performed on the 1 Stare by scanning the temperature range from 30 to 800 ℃ (10 ℃ min−1) under airflow. Differential scanning calorimetry (DSC) measurement is performed on the TA Q2000 scanning from 40 to 140 ℃ at a scanning rate of 5 ℃ min−1 under N2 flow.

Water stability measurements

Hydrogel blocks of similar size were placed in an oven at 45 ℃ for 48 h, and the weight was recorded as W0. The dried hydrogel block was then submerged in deionized water at room temperature for 48 h, removed, and placed back in a 45 ℃ oven for 48 h. It was then weighed as W1, and the weight loss rate was calculated as Eq. 1. Three sets of parallel experiments were set up and the mean values were taken.

$$\mathrm{Weight\,loss\,}(\mathrm{\%})=(1-{W}_{1}/{W}_{0})*100\mathrm{\%}$$
(1)

Rheological measurements

The hydrogels were conducted on TA Discovery HR-1 Hybrid Rheometer with parallel plate geometry (25-mm diameter) over a temperature range of 30 to 140 ℃ at ω = 10 rad s−1 and γ = 0.1%. Frequency sweep measurements were measured at γ = 0.1% mode over a frequency range of 0.1–100 Hz (0.628–628 rad s−1) at 30 ℃. Amplitude sweep measurements were performed at ω = 10 rad s−1 mode over a strain range of 0.1–100% at 30 ℃.

Tensile measurements

Tensile measurement was carried out on a universal tensile high and low temperature (Instron 68TM-10) with a 1 kN transducer at a 50 mm/min tensile rate. The hydrogels were cut into a long strip (test size 50 × 10 × 3 mm3) for testing. Through the same specimen at a speed of 20 mm/min, the cyclic tensile and compressive loading and unloading test was carried out to study the self-healing performance.

Electrochemical measurement

The conductivity tests were carried out using an electrochemical workstation (CHI 660e) at frequencies ranging from 1 to 105 Hz with an amplitude of 10 mV. The conductivity σ is obtained from the Nyquist diagram using Eq. 2,

$$\mathbf\sigma=\mathbf d/\left(\mathbf R\boldsymbol\ast\mathbf S\right)$$
(2)

where d is the thickness of the sample (the distance between adjacent electrodes), R is the bulk resistance, and S is the contact area between the sample and the electrode.

3 Results and discussion

The one-pot preparation process of the conductive hydrogel was composed of a P(AA-co–N-MA) network doped with PEDOT:PSS (Fig. 1a). The P(AA-co–N-MA) network mainly comprises two linear polymerization networks, PAA self-polymerization and PAA and N-MA crosslinking networks, which are formed by heating and then polymerization in an aqueous solution. PEDOT:PSS is uniformly distributed into the P(AA-co–N-MA) network during polymerization. Generally, the polymerization conditions of PAA-based gel are harsh, and not conducive to industrial conversion. Therefore, to promote the industrialization process of PAA-based gel, Na2SO3-APS redox initiator system is used to make the reaction conditions mild and enable rapid polymerization at lower temperatures (45 ℃ for 10 min). The redox initiator system mainly uses the free radical generated by the electron transfer between the oxidant and reducing agent to initiate the polymerization reaction, leading to improving reaction rates and reducing energy consumption [46]. The comparison of the synthesis process of PAA-based hydrogel between this work and the previous one is shown in Table S1, indicating that this work has more advantages. The interaction forces of P(AA-co–N-MA)/PEDOT:PSS hydrogel contain hydrogen bonds and electrostatic interactions, as shown in Fig. 1a. As a result, a network hydrogel with high elasticity is produced (Movie S1). The transmittance of P(AA-co–N-MA)/PEDOT:PSS hydrogel in the visible light range reaches about 80% (Fig. S1).

Fig. 1
figure 1

a Schematic illustration of preparation P(AA-co–N-MA)/PEDOT: PSS hydrogel. Cross-section and surface morphology SEM images of b PAA, c PAA/PEDOT: PSS, and d P(AA-co–N-MA)/PEDOT: PSS hydrogels. e FTIR spectra of the PAA, PAA/PEDOT: PSS, and P(AA-co–N-MA)/PEDOT: PSS hydrogels. f Contact angles of PAA, PAA/PEDOT: PSS, and P(AA-co–N-MA)/PEDOT: PSS hydrogels

To prove the internal structure and interaction of the hydrogel, SEM and FTIR were carried out. As shown in Fig. 1b–d, the difference in the microscopic morphology of the hydrogels is clearly found. PAA hydrogel is in the shape of polymer chain segments, PAA/PEDOT:PSS is a lamellar network, and P(AA-co–N-MA)/PEDOT:PSS is a prominent network structure. To verify the internal interaction of hydrogel, ATR-FTIR of PAA, PAA/PEDOT:PSS, and P(AA-co–N-MA)/PEDOT:PSS hydrogels is present in Fig. 1e. The FTIR spectrum of PAA exhibits ν(COO) bands at 1548 cm−1 and 1412 cm−1, ν(CH2) bands at 2854 cm−1 and 2926 cm−1, and the peak at 1710 cm−1 and 3215 cm−1 corresponds to ν(C = O) and OH of a dimer, respectively [44]. With the addition of PEDOT:PSS and N-MA, the peak of OH of dimer becomes weaker. After the addition of N-MA, the FTIR spectrum of P(AA-co–N-MA)/PEDOT:PSS appears to peak at 1105 cm−1 and 1173 cm−1 for ν(C–O–C), and the peak at 1656 cm−1 corresponds to ν(N–H). Combining these results indicates that AA and N-MA are chemically crosslinked. Furthermore, with PEDOT:PSS and N-MA, the hydrogel changes from hydrophilic to hydrophobic, as presented in Fig. 1f. During the synthesis of P(AA-co–N-MA)/PEDOT:PSS hydrogel, esterification of N-MA and PAA occurred, leading to a reduction in the number of hydrophilic groups -COOH, thereby weakening the hydrophilicity of the hydrogel. And the phenomenon is also corresponding to IR results. By employing peak-splitting treatment on the characteristic C = O peaks, distinct peaks for carboxylic acid and dimeric carboxylic acid were obtained, as shown in Fig. S2. According to the curve-fitting parameters (Table S2), the C = O peak area of carboxylic acid/C = O peak area of dimeric carboxylic acid decreased with the modification. This decrease in peak area suggests a reduction in the number of -COOH groups of the hydrogel, indicating an increase in hydrophobicity. Overall, the PAA self-polymerization linear network and the linear network formed by chemical crosslinking of AA and N-MA form the polymer network of P(AA-co–N-MA). The intermolecular interaction between P(AA-co–N-MA) and PEDOT:PSS includes the dual network design structure, and the design enhances the mechanical properties of the hydrogel [47].

Excellent mechanical properties are indispensable for ensuring the durability and stability of flexible sensing material. The excellent mechanical properties are because the chemical bonds of crosslinked network are more substantial than the hydrogen bonds before modification, as seen from the schematic diagram (Fig. 2a). Figure 2b illustrates that P(AA-co–N-MA)/PEDOT:PSS hydrogel has high ductility and is easily stretched to 2400% without breaking. And the result is echoed with thermal analysis, as shown in Fig S3. The changes in DSC data during the modification of hydrogel also explain why the reaction conditions become mild during the modification process. With the addition of PEDOT:PSS, the Tm of hydrogel decreased from 103 to 80 ℃, and the introduction of N-MA increased the Tm of P(AA-co–N-MA)/PEDOT:PSS hydrogel to 87 ℃ and appeared crosslinked peak. At the same time, all the peaks of P(AA-co–N-MA)/PEDOT:PSS hydrogel disappeared after the second test, and the change of the final decomposition temperature of TGA demonstrates the chemically crosslinked effect of the hydrogel. With the addition of N-MA, the final decomposition temperature of hydrogel increased, and the higher the amount, the higher the temperature. The water stability test further illustrates the chemical crosslinking of the hydrogel, and the weight loss of hydrogels is calculated according to Eq. 1. After being soaked in water for 48 h, only P(AA-co–N-MA)/PEDOT:PSS hydrogel shows tiny changes (Fig. S4). Overall, chemically crosslinked provides the possibility of dual network design and improves the mechanical properties of the hydrogel. The difference in mechanical properties between hydrogels also illustrates the importance of dual network structure.

Fig. 2
figure 2

Mechanical properties of hydrogels. a Schematic illustration of the enhancement of the mechanical properties of P(AA-co–N-MA)/PEDOT: PSS hydrogel. b Photographs that record the stretching process of the hydrogel. c Tensile curves of P(AA-co–N-MA)/PEDOT: PSS hydrogel at different temperatures

Typical stress–strain curves and mechanical properties of hydrogels at different temperatures are shown in Fig. S5. It is worth mentioning that hydrogel, after N-MA treatment, dramatically improves mechanical strength and elongation. P(AA-co–N-MA)/PEDOT:PSS hydrogel exhibited superior tensile strain relative to PAA and PAA/PEDOT:PSS hydrogels. At 25 ℃, the P(AA-co–N-MA)/PEDOT:PSS hydrogel has a tensile fracture strength of 137 kPa when the strain is 2400%. Under the same conditions, the strain of P(AA-co–N-MA)/PEDOT:PSS hydrogel is 3–4 times that of PAA and PAA/PEDOT:PSS hydrogels and the tensile fracture strength is two times than that. As the temperature increases, although the tensile strain of P(AA-co–N-MA)/PEDOT:PSS hydrogel is reduced, the tensile fracture strength of the hydrogel has been enhanced (Fig. 2c). Compared with PAA and PAA/PEDOT:PSS hydrogels, its tensile strain is still advantageous—it maintains almost 60% of the tensile strain at room temperature. Based on the structural analysis and thermodynamic analysis of the hydrogel, the introduction of N-MA forms the P (AA-co–N-MA) crosslinking network and forms a dual network with PEDOT:PSS, which improves the mechanical properties of the hydrogel. These indicated that the introduction of N-MA plays a vital role in the excellent mechanical properties of P(AA-co–N-MA)/PEDOT:PSS hydrogel. It also further proves that dual network structure has obvious advantages in improving the mechanical properties of materials.

The anti-fatigue performance of hydrogel determines its service life as a sensor. The hydrogel was subjected to continuous loading–unloading cycles to study the anti-fatigue behavior. As shown in Fig. 3a, cyclic tensile tests of P(AA-co–N-MA)/PEDOT:PSS hydrogel under different strains showed that the hysteresis loops increased correspondingly with increasing strains. According to the calculation results of dissipated energy, the hysteresis energy increases linearly from 1.6 to 17.2 MJ/m3 as the strain increases from 100 to 600% (Fig. 3b). The anti-fatigue behavior of P(AA-co–N-MA)/PEDOT:PSS hydrogel was carried out by cyclic loading–unloading experiments, as presented in Fig. 3c, d. After the first cycle, the hysteresis loop becomes narrower until a steady state is reached. The hysteresis energy achieves a relatively stable value of 2.8 MJ/m3 after the 10th loading–unloading cycle. These results indicated that the anti-fatigue performance of the hydrogel is good. Research on the energy dissipation mechanism of P(AA-co–N-MA)/PEDOT:PSS hydrogel was studied through the cyclic tensile test. Due to the electrostatic and hydrogen bond interactions in the P(AA-co–N-MA)/PEDOT:PSS hydrogel, the hydrogel effectively dissipates energy during stretching and compression [48]. In addition, P(AA-co–N-MA)/PEDOT:PSS hydrogel was subjected to cyclic compression testing at 82% maximum strain, as shown in Fig. 3e, f. It was observed that after the 10th cycle, the cyclic loading–unloading curves almost overlap, and the hysteresis energy stabilizes at 4 MJ/m3. This further proves that the P(AA-co–N-MA)/PEDOT:PSS hydrogel possesses excellent anti-fatigue performance.

Fig. 3
figure 3

Anti-fatigue properties of the hydrogel. a Continuous cyclic stress–strain curve of P(AA-co–N-MA)/PEDOT: PSS hydrogel with gradually increasing strain and b the corresponding hysteresis energy. c Cyclic tensile curves of 50 consecutive cycles of P(AA-co–N-MA)/PEDOT: PSS hydrogel at a fixed maximum strain of 200% and d the corresponding hysteresis energy. e Cyclic compression curves of 50 consecutive cycles of P(AA-co–N-MA)/PEDOT: PSS hydrogel at a fixed maximum strain of 82% and f the corresponding hysteresis energy

The rheological property is an essential indicator to assess the viscoelasticity of the hydrogel. As depicted in Fig. S6a–c, the modulus of the hydrogels started to decrease at certain temperatures. The corresponding temperatures at which the modulus began to decline of PAA, PAA/PEDOT:PSS, and P(AA-co–N-MA)/PEDOT:PSS hydrogels were 102 ℃, 83 ℃, and 98 ℃, respectively. This trend is consistent with the variation of Tm obtained from DSC. In particular, the storage modulus (G′) of P(AA-co–N-MA)/PEDOT:PSS hydrogel exhibited a distinctive behavior, initially increasing and decreasing after 98 ℃. The increase of G′ before 98 ℃ was attributed to the enhancement of molecular chain entanglement, resulting from reduced water content and weakened hydrogen bonding forces as the temperature rises. However, the subsequent decrease of G′ was due to the destruction of the interaction within the hydrogel network at higher temperatures. As shown in Fig. S6e–f, with the increase of frequency and strain, the G′ of P(AA-co–N-MA)/PEDOT:PSS hydrogel consistently remained higher than the G″ (loss modulus), showing its predominantly elastic properties.

Due to the dual network design, the hydrogel retains part of its self-healing ability. In situ temperature-variable FTIR spectra of P(AA-co–N-MA)/PEDOT:PSS hydrogel at 20–80 ℃ were recorded to certify the thermal stability of the interaction. As the temperature rises, the loss of H2O weakens the hydrogen bond (Fig. S7). The shift of ν(C = O) and OH of the dimer corresponds to the weakening of the hydrogen bond, as presented in Fig. 4a, b, respectively [49]. At the same time, the peak intensity of ν(N–H) is weakened, indicating that the dipole moment is reduced and the polarity is weakened. The results show that the water content affects the strength of the hydrogen bond of the hydrogel, and thus affects the self-healing ability of the hydrogel. The diagram illustrates the internal interaction of P(AA-co–N-MA)/PEDOT:PSS hydrogel and explains the mechanism of the self-healing of the hydrogel (Fig. 4c). The schematic diagram shows that the reversible self-healing behavior mainly depends on physical interactions, such as hydrogen bonding and electrostatic interaction. As shown in Fig. 4d, bring the two pieces of P(AA-co–N-MA)/PEDOT:PSS hydrogel together at the humidity of RH 100%. After 12 h, the boundary of the sample connection became lighter. It could not break when stretched, indicating that P(AA-co–N-MA)/PEDOT:PSS hydrogel has self-healing properties. Subsequently, the hydrogel was 650% fixed and stretched continuously for several self-healing cycles. The possible reason for the tensile stress becoming more robust after the first day is the loss of moisture in the sample over time (Fig. 4e). In addition, P(AA-co–N-MA)/PEDOT:PSS hydrogel acts as a conductor in the circuit (Fig. 4f). Its fracture and connection affect the path of the circuit, showing rapid electrical self-healing ability. According to Fig. 4g, after the hydrogel is in contact, the direct current of the self-healing P(AA-co–N-MA)/PEDOT:PSS hydrogel recovers to a horizontal transient fluctuation within 0.9 s.

Fig. 4
figure 4

Self-healing properties of P(AA-co–N-MA)/PEDOT: PSS hydrogel. Temperature-variable FTIR spectra of P(AA-co–N-MA)/PEDOT: PSS hydrogel is heating from 20 to 80 ℃ in the regions of a OH of the dimer and b ν(C = O), ν(N–H) (interval: 5 ℃). c Illustration of internal interaction and self-healing mechanism of P(AA-co–N-MA)/PEDOT: PSS hydrogel. d Pictures of the self-healing process of P(AA-co–N-MA)/PEDOT: PSS hydrogel. e Stretching curves of P(AA-co–N-MA)/PEDOT: PSS hydrogel after being stretched continuously for several self-healing cycles at 650% fixed. f The P(AA-co–N-MA)/PEDOT: PSS hydrogel acts as a conductor to connect the circuit and the LED bulb, which embodies the self-healing conductivity of the P(AA-co–N-MA)/PEDOT: PSS hydrogel. g The change of current in the P(AA-co–N-MA)/PEDOT: PSS hydrogel over time when it is complete, cut, and connected

As a mechanically responsive flexible material, the hydrogel enables to act as a sensor to sense external stimuli and convert them into electrical signals. Based on this application, the conductivity of the material is essential. The conductivity is calculated according to Eq. 2, and the excellent conductivity of P(AA-co–N-MA)/PEDOT:PSS hydrogel is shown in Figs. 5a and S8. As shown in Fig. 5b, c and Movie S2, the illuminance varies nonlinearly with the tensile strain of the hydrogel, indicating that the hydrogel has the potential as a sensor. The specific process and the illuminance change of the rebound process are shown in Figs. S9 and S10. The result is echoed by the relative resistance of P(AA-co–N-MA)/PEDOT:PSS hydrogel, as depicted in Fig. S11a. Evaluate strain sensitivity through gauge factor, GF = (ΔR/R0)/ε, and sensing range. To monitor various subtle or significant deformations, a sensor with high GF and a wide sensing range is required [50]. As a mechanically responsive flexible sensing material, the relative resistance of the hydrogel as a strain sensor increases exponentially, with the maximum tensile strain reaching 650%. The P(AA-co–N-MA)/PEDOT:PSS hydrogel strain sensor shows two linear regions according to different slopes. The GF of the sensor is 2.42 within 200% strain, and it grows to 8.14 when it exceeds 200%. These results show that P(AA-co–N-MA)/PEDOT:PSS hydrogel strain sensor showed high sensitivity to realize multi-directional monitoring and identification no matter what strain is. In addition, the resistance changes of different degrees of deformation are detected. Stretching P(AA-co–N-MA)/PEDOT:PSS hydrogel to fixed strains at 50%, 100%, 150%, and 200% produces repeatable strain-dependent resistance changes (Fig. S11b).

Fig. 5
figure 5

Electrochemical and sensing properties of hydrogels. a Conductivity of PAA, PAA/PEDOT: PSS, and P(AA-co–N-MA)/PEDOT: PSS hydrogel. b The relationship between LED bulb illumination and the tensile strain of P(AA-co–N-MA)/PEDOT: PSS hydrogel. c The relationship between LED bulb illumination and the rebound process of P(AA-co–N-MA)/PEDOT: PSS hydrogel. d Relative resistance changes and the enlarged view of the marked area under more than 200 cycles of continuous bending at a fixed angle (0–90°)

Furthermore, the ability of the hydrogel to act as a strain sensor is demonstrated by directly adhering to the material and bending to produce a reliable electrical response (Fig. S11c). In addition, when continuously bent at a fixed angle (0–90°), the resistance changes of the hydrogel showed excellent stability and repeatability (Fig. 5d), indicating its outstanding durability. The P(AA-co–N-MA)/PEDOT:PSS hydrogel–based flexible sensor has tremendous potential in detecting strain in time, which is essential in flexible electronics.

A soil moisture sensor is required to quickly measure the moisture content of the soil since soil moisture is often assessed by volumetric soil–water content [51]. Consequently, it was determined how the conductivity and water content of P(AA-co–N-MA)/PEDOT:PSS hydrogel changed over time and at various temperatures (Fig. 6 and Table S2). The water content of hydrogel gradually reduced as the temperature rose. The conductivity of hydrogel did not significantly diminish at 25 ℃ when the water content dropped. The conductivity of hydrogel did, however, visibly fall as the temperature increased along with the water content.

Fig. 6
figure 6

Variations of conductivity and water content of the P(AA-co–N-MA)/PEDOT: PSS hydrogel over time at different temperatures and a schematic diagram for use as a solenoid valve controller (blue spots: water content; histogram: σ)

The strong correlation between environmental parameters and the conductivity of the P(AA-co–N-MA)/PEDOT:PSS hydrogel makes it a promising candidate for intelligent irrigation systems monitoring soil moisture levels. Agriculture, the predominant consumer of water, accounts for a substantial 62% of total water usage in economic and social sectors, with some regions witnessing an even higher share of 90%. The considerable potential for water conservation arises from the prevailing inefficiencies in water utilization within the agricultural sector. Agricultural irrigation increasingly shifts to more efficient and intelligent models confined to programmable or manual remote irrigation. Furthermore, the hydrogel demonstrates environmental friendliness, as substantiated by the Material Safety Data Sheet (MSDS), which indicates that the raw materials employed in hydrogel preparation, apart from N-MA, possess low toxicity and achieve near-toxicity-free status after polymerization [52].

Therefore, we have conceptualized an intelligent irrigation system utilizing P(AA-co–N-MA)/PEDOT:PSS hydrogel to enhance irrigation efficiency and conserve water resources essential for agricultural needs. The hydrogel is applied as a solenoid valve controller enables the creation of a flexible hydrogel sensor capable of autonomously regulating the irrigation valve switch by detecting changes in conductivity. On-demand control strategies for irrigation, rather than bypass control, optimize water utilization.

As depicted in Fig. 6, the irrigation process is triggered when the conductivity of hydrogel drops below a specific threshold (0.06 S/m), indicating insufficient water content within the hydrogel. Consequently, the valve opens automatically for irrigation. Conversely, if the conductivity remains above the threshold, it signifies sufficient soil moisture, leading to the exclusion of unnecessary irrigation. The flexibility of this sensor empowers on-demand irrigation based on soil moisture levels, effectively contributing to water conservation, which holds paramount importance given the global water supply situation. Moreover, the versatility of hydrogel in accommodating a wide range of temperatures makes it particularly suitable for various geographical contexts, particularly in deserts. As evident from Fig. 6, the conductivity of hydrogel diminishes over time as the water content exceeds 35 ℃. However, at 25 ℃, the conductivity demonstrates no significant trend, indicating the ability of the hydrogel to maintain stable conductivity at room temperature for a certain duration. In such an environment, soil moisture remains stable, obviating the need for irrigation. Furthermore, the conductivity and water content changes of hydrogel were monitored at room temperature under 10% relative humidity (Fig. S12). The water content of hydrogel exhibited a gradual decrease over 4 h, while the conductivity experienced a significant reduction after the same duration (Fig. S11a). By calculating the sensitivity of the hydrogel to water content, GF = (ΔR/R0)/water content, through the detection of resistance changes under varying water content conditions, the sensitivity value was determined to be 0.48 at room temperature. These results demonstrate that the hydrogel maintains stable conductivity even in dry environments for a certain period, rendering it suitable for intelligent irrigation applications.

4 Conclusion

This study presents a green and gentle synthetic method for an intelligent material called P(AA-co–N-MA)/PEDOT:PSS hydrogel, enabling it to be used for mechanical sensing and soil moisture monitoring. Because of the complicated process and the development of industrialization, the synthesis of PAA-based hydrogels was improved. The reaction condition was lowered by using Na2SO3-APS as the initiator, allowing the reaction to be synthesized under relaxed circumstances for 10 min at 45 ℃. The crosslinked network P(AA-co–N-MA) was given the PEDOT:PSS network, and the dual network structure resulted in a mechanically sensitive flexible sensing material. Even at high temperatures, P(AA-co–N-MA)/PEDOT:PSS hydrogel demonstrates good mechanical characteristics. It possesses remarkable elasticity and fatigue resistance, and the elongation at break reached 2400% at RT. Compared to several flexible sensing materials, P(AA-co–N-MA)/PEDOT:PSS hydrogel has a higher GF of up to 8.14 at the same strain (such as hydrogels, organic gels, ionic gels, conductive elastomers). P(AA-co–N-MA)/PEDOT:PSS hydrogel has susceptible mechanical sensing properties, which was explained by the strain-dependent resistance change of the hydrogel. Furthermore, P(AA-co–N-MA)/PEDOT:PSS hydrogel has the capacity for self-healing, particularly in humid settings. Additionally, the variations in the water content and conductivity of hydrogel throughout a broad range of valuable temperatures offer fresh concepts for on-demand irrigation of intelligent irrigation systems, which would be crucial for water conservation.