Introduction

Solar and wind can provide clean and sustainable electricity, while these renewable energy sources are highly vulnerable to weather fluctuations and seasonal changes. Secondary battery-based energy storage systems are attractive choices for stabilizing the output of renewable electricity, due to the flexible configuration, long lifespan, and high energy density of these batteries1. Although lithium-ion batteries (LIBs) are currently the most widely used secondary batteries, their drawbacks, such as high costs and the use of flammable organic electrolytes, pose safety and financial concerns when they are assembled into large-scale battery systems2,3. In contrast, aqueous zinc-ion batteries (AZIBs) use an aqueous solution of zinc salt as the electrolyte, which grants them high safety, low cost, and environmental friendliness, making them excellent candidates for constructing energy storage systems in smart grids4,5.

Although AZIBs have appealing prospects in renewable energy systems, they still face distressing issues such as hydrogen evolution reaction (HER), surface corrosion, and the growth of zinc hydroxide sulfate (ZHS) on the zinc (Zn) anode, as well as the oxygen evolution reaction (OER) on manganese (Mn)-based cathode, which would lead to decayed capacity and shortened lifespan of AZIBs4,6. Essentially, these problems are closely related to the complex internal electrochemical reactions and ion transport kinetics occurring in the charging and discharging processes of AZIBs, and the results are reflected in the changes to the electrodes and electrolyte of the battery. Therefore, monitoring the component variations in AZIBs will not only enhance our understanding of the electrochemical processes occurring within the battery but also provide a unique perspective for optimizing battery performance.

It should be stressed that capturing the subtle changes of the complex environment within the battery is highly challenging, not only for AZIBs but also for other secondary batteries. In previous work, studies on the energy storage mechanisms of secondary batteries often rely on complex equipment and technologies such as electron microscopy, nuclear magnetic resonance, gas chromatography, and synchrotrons7,8,9,10,11. For instance, Liu’s group used the inductively coupled plasma (ICP) technique to analyze the concentration variation of Mn2+ ion in the electrolyte of aqueous Zn-Mn batteries during the charging and discharging cycles12. Han et al. employed the inductively coupled plasma - optical emission spectroscopy (ICP-OES) to monitor the concentration of Mn2+ in the electrolyte at different cycling stages13. They concluded that the capacity fluctuation of Mn-based AZIBs originated from the evolution of the electrochemical deposition process of Mn species on the cathodes in conjunction with the first-principle calculation. They also used ICP-OES to investigate the differences between AZIBs with sulfate-based and sulfonate-based electrolytes. Additionally, they proposed a hybrid sulfate/sulfonate electrolyte to improve both capacity and cycling stability14,15. Janek et al. studied the deposition of Mg2+ on solid-state electrolytes using in-situ electrochemical scanning electron microscopy7. The high costs and requirements of the above techniques elevate the difficulty of studying battery operating mechanisms. In addition, these methods often require disassembly of the battery, making it challenging to perform real-time detection of variations in the battery during operation.

Recently, sensors for the real-time monitoring of battery states have been constructed by different groups. For example, Fang and coworkers planted a multi-point thin film sensor into the LIB electrodes to record the real-time temperature changes at different charging rates16. Lemmer et al. proposed a wet-spinning method for the composite microfibers combining micro-spherical core-shell conductive particles and an elastomer. They used these fibers as sensitive strain sensors to detect thickness changes in pouch AZIBs during charging and discharging cycles17. Wu’s group used thin-film pressure sensors in large-format LIBs to detect internal pressures inside jelly rolls during long-term cycling tests18. In addition, Tarascon et al. incorporated optical fiber Bragg grating sensors into commercial 18,650 cells for detecting temperature and pressure changes during operation19. Similarly, optical fiber grating temperature sensors were embedded in high-rate hardcase LIBs by Wu et al. to realize the long-period in-situ monitoring of the temperature field inside the battery20. It should be noted that parameters such as temperature and pressure are mainly used to assess battery safety, while the changes in electrolytes are more critical for understanding the reactions within secondary batteries. In 2022, Euser et al. utilized hollow-core optical fiber sensors to monitor the solvation dynamics of Li+ in electrolytes during cycling. However, this method suffered from a cumbersome operational process and severe interference21. In addition, it took 400 s to obtain a stable signal, and the sampling interval was so long (22 min) that much critical information might have been overlooked. Later, Guo’s group developed a promising surface plasmon resonance (SPR) sensing and imaging approach based on an optical fiber plasmonic sensor. This approach was designed to monitor the dynamics of the intercalation of H⁺ and Zn²⁺ at the electrolyte/electrode interface of AZIBs22. They also developed a compact polarization-maintaining Fiber Bragg grating and Fabry-Perot interferometer optical sensor to detect thermal runaway mechanisms and safety-related failures in LIBs, achieving continuous in-situ monitoring of internal temperatures and pressures in 18,650 cells23.

The insulating nature and high resolution of optical fibers make them attractive for the construction of sensors to capture changes in the composition of the electrolyte in the battery. However, the shortcomings of optical sensing techniques are also evident: First, optical fiber is susceptible to stress and strain within the cell; therefore, complex calibration and decoupling are required to ensure the accuracy of the optical signals19. Second, the intensities of the optical signals are limited by the short interaction length at the tip of the optical fiber and the background noise in the solid fiber core24. Third, the presence of a gold film inside the SPR fiber makes the detection processes potentially susceptible to interference by Faraday currents25,26. Additionally, the quantitative analysis of specific components of electrolytes with optical sensing techniques is still unsatisfactory27. Lastly, the complicated and expensive light sources, optical paths, and spectral readout systems, along with long measurement times, increase the cost and complexity of applying optical sensors for in-situ detection of electrochemical reactions in batteries.

Compared with optical approaches, electrochemical sensing technologies have the advantages of high sensitivity, simple structure, low cost, and short response time, and have been widely used in in-situ detection tasks in chemistry, environmental science, biology, and medical diagnosis28,29,30,31. However, electrochemical sensors for the real-time monitoring of reactions in secondary batteries are still lacking. In this work, extended gate field-effect transistor (EGFET)-pH & dissolved oxygen (DO) sensors were constructed by integrating fiber electrodes for pH and DO in an aqueous electrolyte with transistors. The EGFET-pH & DO sensor showed high sensitivity and stability and did not influence the operation of the battery when implanted into a pouch AZIB. With the assistance of the EGFET-pH & DO sensor, the changes in pH and DO concentrations in the electrolyte were recorded during the operation of the AZIBs for the first time. The side reactions at the Zn anode and the MnO2 cathode, including HER, OER and formation of ZHS, can be evaluated with variation in pH and DO concentration. Additionally, the effects of pH buffer solutions and deoxidizers on AZIB electrolytes were also examined using the EGFET-pH & DO sensor, verifying the reaction mechanisms of these electrolyte additives. Remarkably, the EGFET-pH & DO sensor fills the gap of electrochemical sensing technology in the field of in-situ battery detection, which not only advances the understanding of the reaction mechanisms inside the battery but also provides effective theoretical support for optimizing the performance of AZIBs.

Results and discussion

The electrolyte is a key component of a battery, and the changes in its composition reflect the side reactions in the battery32,33,34. During the charging and discharging processes of AZIBs, the reactions within the battery are not limited to the ideal deposition and stripping of Zn2+ ions between the cathode and anode. Since the redox potential of H+/H2 (0 V vs. SHE) is higher than that of Zn2+/Zn (−0.762 V vs. SHE), HER tends to happen at the interface between aqueous electrolyte and the Zn anode (reaction (1))35:

$$2{{{{\rm{H}}}}}_{2}{{{\rm{O}}}}+{2{{{\rm{e}}}}}^{-}\,\to {2{{{\rm{OH}}}}}^{-}+{{{{\rm{H}}}}}_{2}\uparrow$$
(1)

Accordingly, the decomposition of water produces hydroxide ions (OH), which further promotes the formation of alkaline passivation products (ZHS), on the surface of the Zn anode (reaction (2))36:

$${4{{{\rm{Zn}}}}}^{2+}+{6{{{\rm{OH}}}}}^{-}+{{{{{\rm{SO}}}}}_{4}}^{2-}+x{{{{\rm{H}}}}}_{2}{{{\rm{O}}}}\to {{{{\rm{Zn}}}}}_{4}({{{{\rm{SO}}}}}_{4}){({{{\rm{OH}}}})}_{6}\cdot {x{{{\rm{H}}}}}_{2}{{{\rm{O}}}}$$
(2)

The passivation of Zn anode by ZHS not only leads to increased internal resistance and decreased Coulombic efficiency37, but also impacts the uniform deposition of Zn2+ during the charging process38,39. The growth of ZHS plates is considered as one of the major reasons for the failure of AZIBs.

In addition to the changes in pH, the concentration of DO in the electrolyte of AZIBs is also closely related to side reactions occurring on the electrode. AZIBs are usually assembled in the absence of an inert atmosphere for protection. Consequently, the aqueous electrolyte exposed to air will inevitably dissolve oxygen40. As a result, DO aggravates the corrosion of the Zn anode and promotes the formation of ZHS (reaction (3))41,42. On the other hand, overcharging of AZIB leads to the occurrence of the OER (reaction (4)), which also results in the increase of DO concentration in the electrolyte43,44:

$$6{{{\rm{Zn}}}}+{3{{{\rm{O}}}}}_{2}+{2{{{\rm{ZnSO}}}}}_{4}+\left(6+2x\right){{{{\rm{H}}}}}_{2}{{{\rm{O}}}}\to {2{{{\rm{Zn}}}}}_{4}\left({{{{\rm{SO}}}}}_{4}\right){\left({{{\rm{OH}}}}\right)}_{6}\cdot {x{{{\rm{H}}}}}_{2}{{{\rm{O}}}}$$
(3)
$${2{{{\rm{H}}}}}_{2}{{{\rm{O}}}}\to {{{{\rm{O}}}}}_{2}\uparrow+{4{{{\rm{H}}}}}^{+}+{4{{{\rm{e}}}}}^{-}$$
(4)

According to the aforementioned reactions, it is obvious that monitoring the changes in pH and DO concentration in the aqueous electrolyte will aid in understanding the mechanisms of the side reactions within AZIBs (Fig. 1a), and the results will provide references for optimizing battery design, improving charging and discharging strategies, and enhancing the battery performance and lifespan. However, the variations of both pH and DO in the electrolyte are very subtle and difficult to be detected. Moreover, the above reactions suggest that the changes in pH and DO concentration in the electrolyte are correlated. These features thus place high demands on the parameters, such as the sensitivity and response time of the sensor. Furthermore, to achieve in-situ monitoring, the sensor must operate stably in aqueous electrolytes with high salt concentrations. At the same time, the sensor should not interfere with the normal operation of the batteries.

Fig. 1: The concept of in-situ monitoring of pH and dissolved oxygen (DO) in aqueous zinc-ion batteries (AZIBs).
figure 1

a Possible side reactions in AZIBs during charging and discharging cycles. b Schematic diagram of the in-situ battery monitoring system in this work.

To meet these requirements, electrochemical sensors emerge as a promising solution. Electrochemical sensors are commonly used in various invasive or real-time sensing tasks28,29, mainly due to their high sensitivity, simple structure, diverse forms, and short response time. More importantly, the performance of electrochemical sensors is not influenced by the size or format of the sensitive electrodes, making them attractive for wearable and miniaturized sensing devices30,31. Principally, the detection behavior of electrochemical sensors is based on the electrochemical reactions of the target analyte on the surface of the sensitive electrode, also known as the working electrode, which can be observed as changes in current, resistance, or potential. Compared with amperometric (current-based) and conductometric (resistance-based) sensors, the potentiometric (potential-based) sensor can directly convert the potential difference between the sensitive electrodes and reference electrode (RE) to the concentration of the analyte. This method does not require an external circuit driver and has a short response time. Considering these features, potentiometric sensors are more suitable for monitoring real-time changes in the electrolyte than other types of electrochemical sensors. With this in mind, potentiometric electrochemical sensors were developed herein by combining fiber-sensitive electrodes with field-effect transistors (Fig. 1b) to detect pH and DO concentration in aqueous ZnSO4 electrolyte during the charging and discharging processes of AZIBs. These sensors are structured as EGFETs, where the fiber electrodes serve as the extended gates of the transistors45. The fiber-sensitive electrodes placed in the aqueous electrolyte convert changes in pH and DO concentration to potential signals, which are reflected as variations in the channel currents of the transistors. This approach improves the signal-to-noise ratios and reduces the difficulty of signal processing, which is favorable for controlling and reading the back-end system46,47. Compared with traditional electrochemical sensing methods, the EGFET-pH & DO sensor has high compatibility and can meet the detection needs of multiple analytes45. More importantly, the fiber-sensitive electrodes and semiconductor elements in the EGFET-pH & DO sensor are separated, which avoids the direct contact between the electrolyte and the transistor and improves the flexibility and stability of the sensing system48.

Sensitive electrodes with high stability and sensitivity are essential for the real-time acquisition of electrochemical signals. Therefore, the first step to constructing the EGFET-pH & DO sensor is to obtain suitable sensitive electrodes. Fiber electrodes with good flexibility and mechanical stability can easily conform to various shapes or curved surfaces49,50. Additionally, fiber electrodes have adjustable lengths and can be conveniently positioned in the measurement area51, making them suitable for in-situ monitoring of target analytes in complex environments. This makes them ideal candidates for miniaturized electrodes in narrow spaces within the pouch cell51. Carbon fiber (CF) is an excellent substrate material for fiber electrodes due to its high flexibility, stability, electrical conductivity, and ease of modification45,52,53. As shown in Supplementary Fig. 2, carbon fiber-based RFE, pHFE, and DOFE were fabricated as the reference and sensitive electrodes for the EGFET-pH and DO sensor, respectively (Fig. 2a).

Fig. 2: Sensing performance of fiber-sensitive electrodes and reference electrodes.
figure 2

a Photographs and schematic diagram of the fiber electrodes: reference fiber electrode (RFE); pH-sensitive fiber electrode (pHFE); DO-sensitive fiber electrode (DOFE); and carbon fiber (CF). b Potentiometric response mechanism of pHFE and DOFE. c Open circuit potential (OCP) of RFE and commercially available Ag/AgCl reference electrode in aqueous ZnSO4 electrolyte (2 mol L−1) for 24 h. d OCP responses of pHFE to pH from 7.00 to 3.00 in commercially available buffer solutions with RFE as the reference electrode. e Corresponding linear calibration curve fitted by OCP of pHFE versus pH. f Real-time OCP responses of DOFE to DO with the concentrations ranging from 0.0022 to 9.8 mg L−1 in aqueous ZnSO4 electrolyte (2 mol L−1) using RFE as the reference electrode. The red segment of the response curve represents the stabilization phase of DO concentration, with specific DO levels indicated by the arrows. g Corresponding linear calibration curve fitted by OCP of DOFE versus the logarithmic value of the DO concentration (log(ρDO)). Error bar: the standard deviation calculated with five independent tests, and data are mean ± s.d.

In potentiometric sensors, the protonation process with H+ or spontaneous oxygen reduction reactions (ORR) of DO on the surface of the sensitive electrodes will generate an increase in the OCP between the sensitive electrode and reference electrode (Fig. 2b). In the EGFET sensor, RFE provides a potential standard for the sensitive fiber electrodes, which is the basis for obtaining reliable data in the electrochemical sensing process. As shown in Fig. 2c, the OCP drift of RFE compared to the commercially available reference electrode in aqueous ZnSO4 electrolyte was less than 0.08 mV h−1 for 24 h, which outperforms most of the previously reported reference electrodes (Supplementary Table 1), indicating that RFE is qualified as the reference electrode for the EGFET sensors.

Consequently, the sensing performance of pHFE and DOFE was examined using the OCP method in an electrochemical cell with RFE as the reference electrode. The aqueous ZnSO₄ electrolyte, as a weakly acidic solution, has a pH value of approximately 4.3054. Literature reports indicate that the pH of the electrolyte gradually increases during charging and discharging cycles55. Given the expected pH changes in the electrolyte during battery operation, the OCP responses of pHFE with the pH ranging from 3.00 to 7.00 were tested herein (Fig. 2d). As the pH changed from 7.00 to 3.00, the OCP increased from 0.070 to 0.314 V. Conversely, the OCP gradually decreased to the baseline value with pH increasing from 3.00 to 7.00, demonstrating good recoverability of pHFE. The fitted curves in Fig. 2e show that pHFE exhibited a super-Nernstian response of 74.51 mV pH−1. It should be noted that the pH sensing behavior of pHFE is based on the protonation process of the polyaniline over pHFE56 (Section 1.1 of Supplementary information). This process involves a reversible structural transition between the emeraldine base and emeraldine salt, along with electron transfer, leading to an increase in the OCP. Accordingly, a super-Nernstian response (>59.2 mV pH−1) could stem from the fact that the number of protons bound to polyaniline was greater than the number of transferred electrons56,57.

The response characteristics of DOFE were first investigated in deoxygenated and oxygenated electrolytes by cyclic voltammetry (CV, Supplementary Fig. 3). The CV curves of DOFE in the oxygenated electrolyte exhibited high reduction currents across the entire voltage window, which indicated the good catalytic activity of Pt nanoparticles (NPs) in the DOFE (Supplementary Fig. 4) towards DO40. Subsequently, the DO concentration was varied by introducing different ratios of nitrogen-oxygen mixtures into an aqueous ZnSO₄ electrolyte, and the corresponding potential changes of DOFE were recorded in real-time. As shown in Fig. 2f, the OCP increased from 0.229 to 0.417 V with the gradual rise of DO concentration from 0.0022 to 9.8 mg L−1. Thereafter, the OCP was gradually restored to the baseline value after deoxygenation by nitrogen bubbling, confirming the good reversibility of DOFE. Figure 2g displays that DOFE has a linear response of 63.51 mV decade−1 with a correlation coefficient of 0.995 over the DO concentration range of 0.020 to 9.8 mg L−1, which covers the range of DO concentration of aqueous ZnSO4 electrolyte in AZIBs40.

As shown in Fig. 3a, the EGFET sensor has the dual characteristics of an electrochemical sensor and a transistor, in which the sensitive electrode and the reference electrode form a circuit with an initial potential difference (Vcell0). The addition of the target analyte will cause a change in the OCP (ΔVin). Subsequently, the corresponding potential difference between the sensitive electrode and the reference electrode can be described as:

$${V}_{{{{\rm{cell}}}}}={{V}_{{{{\rm{cell}}}}}}^{0}+{\varDelta V}_{{{{\rm{in}}}}}$$
(5)
Fig. 3: Sensing performance of single-channel extended gate field-effect transistor (EGFET).
figure 3

a Schematic illustration of the operational process of the EGFET sensor. Abbreviations: metal-oxide-semiconductor field-effect transistor (MOSFET). b Transfer characteristic curves of the EGFET-pH sensor in buffer solutions with different pH values. c Transfer characteristic curves of the EGFET-DO sensor in aqueous ZnSO4 electrolyte with different DO concentrations. d Channel current (IDS) responses of the EGFET-pH sensor towards pH changes (Vref. = −2.00 V, VDS = −1.50 V). e Corresponding linear calibration curve of log(IDS) versus pH. f Channel current (IDS) responses to continuous DO concentration changes of the EGFET-DO sensor (Vref. = −2.00 V, VDS = −1.50 V). The red segment of the response curve represents the stabilization phase of DO concentration, with specific DO levels indicated by the arrows. g Corresponding linear calibration curve of log(IDS) versus log(ρDO). h IDS of the EGFET-pH & DO sensor (Vref. = −2.00 V, VDS = −1.50 V) in response to continuous changes of DO concentration. The initial and maximum concentrations of DO are marked with arrows. i IDS of the EGFET-pH & DO sensor (Vref. = −2.00 V, VDS = −1.50 V) before and after sequential addition of H2SO4 (0.05 mol L−1, 100 μL), and NaOH (0.1 mol L−1, 200 μL). The arrow shows when the interference signal was added, and the pH values corresponding to the red segments on the IDS–pH response curve are labeled. Error bar: the standard deviation calculated with five independent tests, and data are mean ± s.d.

The gate electrode of the transistor is directly connected to RFE (Vref.), and the actual gate voltage (VGSeff) of the transistor can be described as58:

$${{V}_{{{{\rm{GS}}}}}}^{{{{\rm{eff}}}}}=\,{V}_{{{{\rm{ref}}}}.}{{{\rm{\hbox{-}}}}}{V}_{{{{\rm{cell}}}}}=\left({V}_{{{{\rm{ref}}}}.}-{{V}_{{{{\rm{cell}}}}}}^{0}\right)-\varDelta {V}_{{{{\rm{in}}}}}$$
(6)

To validate the design of sensors in this work, the EGFET sensors for detecting pH and DO were constructed and tested separately. Figure 3b shows the transfer characteristic curves of the EGFET-pH sensor in buffer solutions with different pH values. As the pH gradually decreased from 7.00 to 3.00, the curve shifted negatively by 0.324 V. Similarly, the transfer characteristic curve of the EGFET-DO sensor drifted negatively by 0.231 V as the DO concentration increased from 0 to 9.8 mg L−1 (Fig. 3c). Both sensors exhibit potential drifts that are equal in magnitude but opposite in direction to the potential drifts obtained from the OCP tests. It can be concluded that the gate voltage bias (Vref.) does not affect the potential difference between the sensitive electrodes and RFE, and reflects the good electrical coupling characteristics between the sensitive electrode and the transistor (Supplementary Fig. 5).

To meet the demand for the real-time detection of both pH and DO, a constant gate voltage bias was applied to the EGFET sensor after varying the analyte concentration, and the dynamic response curves of the channel currents (IDS) were recorded (Section 1.2 of Supplementary information). The EGFET-pH & DO sensor adopts a single RFE to simplify its structure, which means that the sensitive electrodes for pH and DO must be able to operate at the same gate voltage bias. To ensure a high signal-to-noise (Supplementary Fig. 6), a driving voltage (Vref.) of −2.00 V was selected for all the channel current acquisitions in this work. As shown in Fig. 3d, IDS of the EGFET-pH sensor gradually decreased from 63.0 to 11.2 μA as pH decreased from 7.00 to 3.00, and then recovered to 66.9 μA when the pH value was restored to 7.00. Within the tested pH range, log(IDS) is linearly and positively correlated with pH, and the corresponding fitted curve is log(IDS) = 0.198 pH −5.54 with a correlation coefficient of 0.991 (Fig. 3e). Figure 3f demonstrates the continuous response curve of the EGFET-DO sensor, where the IDS decreased from 45.9 to 7.12 μA as the DO concentration in the electrolyte gradually increased from 0.0022 to 9.8 mg L−1 and recovered to the baseline value by removing DO from the electrolyte. The fitted curve in Fig. 3g shows that log(IDS) is linearly and negatively correlated with log(ρDO) in the range of 0.020 to 9.8 mg L−1, and the corresponding fitted curve is log(IDS) = −0.271 log(ρDO) − 4.86 with a correlation coefficient of 0.991. The stabilities of the EGFET-pH and EGFET-DO sensors against crossover interferences were then tested, respectively. As shown in Fig. 3h, the IDS of the EGFET-pH sensor remained relatively constant when the DO concentration in the aqueous ZnSO₄ electrolyte was changed. Similarly, the anti-interference test results of EGFET-DO were shown in Fig. 3i, after adding H2SO4 (0.05 mol L−1, 100 μL), the pH of the electrolyte decreased rapidly from 4.28 to 3.61, and then increased sharply to 5.26 with the addition of NaOH (0.1 mol L−1, 200 μL), while IDS response curve of EGFET-DO did not drift significantly. To further verify the interference of ion concentration changes in the electrolyte, MnSO4 (0.1 mol L−1, 200 μL) and deionized water (1 mL) were added to the electrolyte, respectively. It can be found in Supplementary Fig. 7 that the IDS of the EGFET-pH decreased slightly after the addition of MnSO4. The pH value decreased from 4.22 to 4.17, which was mainly due to the hydrolysis of Mn2+. Subsequently, deionized water was added to dilute the Zn2+ and SO42− in the electrolyte, and pH merely increased from 4.17 to 4.19. The results indicate that EGFET sensors have robust anti-interference characteristics and reliability.

The excellent performance of the single-channel EGFETs enables the further assembly of the EGFET-pH & DO sensor for the in-situ detection of pH and DO in the aqueous electrolyte of AZIBs. As shown in Fig. 4a, the entire device consists of three parts: fiber electrodes, a flexible printed circuit board (FPCB), and test equipment controlled by a smartphone. The three fiber electrodes are interconnected via tabs and positioned between two layers of glass-fiber separators inside a pouch cell (Fig. 4b). The sensing unit employs a common reference circuit setup (Fig. 4c), where RFE and the sensitive electrodes (pHFE and DOFE) implanted in the battery constitute two sets of potentiometric sensing units for pH and DO of the electrolyte. The test equipment applies a gate voltage (Vref.) through RE to drive the two sets of transistors with short-circuited drains (D), and collects the channel currents related to pH and DO concentration (IDS-pH and IDS-DO). The data obtained from the test equipment can be transmitted to a smartphone in real-time via Bluetooth. Figure 4d presents a photograph of the EGFET-pH & DO sensor along with a system block diagram reflecting the signal transduction, tuning, processing, and wireless transmission paths that link the three components.

Fig. 4: Layout of the extended gate field-effect transistor (EGFET) sensor for simultaneous detection of pH and dissolved oxygen (DO) in aqueous zinc-ion batteries (AZIBs).
figure 4

a The system consists of a sensing unit, a flexible printed circuit board and test equipment. b Exploded view of the pouch AZIB implanted with fibrous electrodes. c Circuit schematic of the EGFET-pH & DO sensor. Abbreviations: metal-oxide-semiconductor field-effect transistor (MOSFET). d System-level block diagram of the EGFET-pH & DO sensor displaying electrical signal transduction.

Utilizing the EGFET-pH & DO sensor, the relationship between the side reactions in AZIBs and the pH and DO concentration of the aqueous electrolyte was explored in this work. In order to calibrate the experimental results, the initial values of pH and DO in the aqueous ZnSO4 electrolyte were obtained using commercial pH and DO meters before the assembly of the pouch AZIBs59,60. The changes of pH and DO concentration of the electrolyte in pouch AZIBs were then monitored in situ by the EGFET-pH & DO sensor during three consecutive charging and discharging cycles at different voltage ranges (Fig. 5). Figure 5a displays the GCD curves of the pouch AZIB at 2 C (616 mA g−1) with a voltage window from 0.80 to 1.80 V and the real-time IDS-DO & IDS-pH of the EGFET-pH & DO sensor (VDS = −1.50 V, Vref. = −2.00 V). Subsequently, the real-time variations of pH and DO concentration of the aqueous electrolyte during the GCD measurements at the normal voltage window (0.80–1.80 V) could be obtained according to the corresponding fitted curves and their initial values (Fig. 5a). During the three consecutive GCD cycles, the pH of the electrolyte gradually increases from 4.19 to 4.56, and the DO concentration gradually decreases from 0.49 to 0.091 mg L−1. In a weakly acidic environment, the surface of Zn anode is prone to HER (Fig. 5b). Based on reaction (1), the occurrence of HER depletes the protons, which mainly causes an increase in pH. The elevation of pH thus promotes the formation of the byproducts (reaction (2), e.g., ZHS)34. Reaction (3) indicates that DO is involved as a reactant in the formation of by-products at the surface of Zn anode42, which explains the gradually decreased DO content in the electrolyte along with the deposition of ZHS.

Fig. 5: In-situ monitoring results for the pouch aqueous zinc-ion batteries (AZIBs) with different cut-off voltages.
figure 5

a Time-resolved voltage of the pouch AZIB, IDS-pH and IDS-DO of the EGFET-pH & DO sensor, and the real-time pH and dissolved oxygen (DO) concentration derived from the galvanostatic charge-discharge (GCD) measurements of a pouch AZIB at 2 C (616 mA g−1) with a normal charging voltage window from 0.80 to 1.80 V. Corresponding pH and DO concentrations at specific time points are indicated by red dots. b Schematic illustration of side reactions in the pouch AZIB at a normal charging voltage window from 0.80 to 1.80 V. Abbreviations: hydrogen evolution reaction (HER), zinc hydroxide sulfate (ZHS). c Time-resolved voltage of the pouch AZIB, IDS-pH and IDS-DO of the EGFET-pH & DO sensor, and the real-time pH and DO concentration derived from the GCD measurements of a pouch AZIB at 2 °C with an overcharging voltage window from 0.80 to 2.20 V. Corresponding pH and DO concentrations at specific time points are indicated by red dots. d Schematic illustration of side reactions in the pouch AZIB at an overcharging voltage window from 0.80 to 2.20 V. Abbreviations: oxygen evolution reaction (OER). e Scanning electron microscopy (SEM) image of the Zn anode from the normally charged pouch AZIB. f SEM image of the Zn anode from the overcharged pouch AZIB. g X-ray Diffraction (XRD) patterns of the as-made, normally charged and overcharged Zn anodes. The characteristic peak of ZHS is marked with an arrow.

Figure 5c displays the GCD curves of the overcharged AZIBs cycled with a voltage window from 0.80 to 2.20 V, IDS-pH & IDS-DO of the EGFET-pH & DO sensor and the real-time variations of pH and DO concentration in three charge-discharge cycles. From 0 to 970 s, the voltage first decreases from 1.47 to 0.80 V in the discharging process, and then rises to 1.79 V in the charging process, while the DO concentration gradually decreases from 0.66 to 0.37 mg L−1. During the further charging process, the voltage rises from 1.79 to 2.11 V, the DO concentration decreases from 0.37 (t = 970 s) to 0.30 mg L−1 (t = 1233 s) and the downward trend of DO concentration significantly slows down as the process continues. Next, the DO concentration sharply increases from 0.31 mg L−1 to the maximum value of 4.6 mg L−1 between 1392 and 1907 s. After the overcharging process, the DO concentration rapidly decreases from 4.6 (t = 1907 s) to 1.1 mg L−1 (t = 2302 s). For the overcharged AZIB, the DO concentration in the electrolyte begins to increase as long as the charging voltage exceeds 1.80 V, which is caused by the OER on the interface between the electrolyte and MnO2 cathode (Fig. 5d)54. After the overcharging process, the DO concentration decreases. It is worth noting that protons are generated as a byproduct accompanying the OER. Accordingly, pH rapidly decreases from 4.18 (t = 1080 s) to 3.23 (t = 1940 s). After the overcharging process, pH gradually increases to 3.62 (t = 2920 s) until the onset of the second overcharging process. In the last two cycles, although similar pH and DO concentration changes were also observed, they were not as pronounced overall as in the first one, which was caused by the inhibition of OER resulting from the increase of proton concentration in the electrolyte after overcharging.

To verify the above tests in the pouch AZIB, the EGFET-pH & DO sensor was placed in a Swagelok cell to monitor the pH and DO concentration of aqueous ZnSO4 electrolyte under the same charging and discharging conditions. As shown in Supplementary Figs. 8 and 9, the characteristics of pH and DO concentration in the Swagelok battery were consistent with the results from the pouch AZIB, confirming the reliability of the EGFET-pH & DO sensor (Supplementary information). Additionally, in-situ monitoring aims to gain a clearer understanding of the changes in electrolyte during the operation of AZIBs. Therefore, the implanted sensors should not interfere with the normal functioning of the battery. In order to systematically assess the influence of the implanted fiber electrodes on the electrochemical performance of the battery, electrochemical impedance spectroscopy (EIS) and CV measurements were conducted on pouch AZIBs with and without fiber electrode implantation. Nyquist plots demonstrated in Supplementary Fig. 10a are fitted with the equivalent circuit shown in the inset: both curves exhibit a compressed semicircle in the high-frequency range with an inclined line in the low-frequency range, where the charge-transfer resistance (Rct) of the pouch AZIB with fiber electrodes is 10.68 Ω, while that of the pouch AZIB without fiber electrode implantation is 6.77 Ω. In addition, as depicted in Supplementary Fig. 10b, the ohmic impedance (Rs) of the pouch AZIB with fiber electrode implantation is 0.74 Ω, greater than the one without fiber electrode implantation (0.51 Ω), which might be due to the presence of two layers of separators in the pouch AZIB with fiber electrode implantation. (Supplementary Fig. 11). Furthermore, Supplementary Fig. 12 demonstrates that the CV curve of pouch AZIB with fiber electrode implantation exhibits a similar shape to that without fiber electrode implantation, and the positions of the oxidation peak and reduction peak as well as the difference between the oxidation peak and reduction peak (1.68, 1.40, and 0.28 V) of the pouch AZIB with fiber electrode implantation are also basically consistent with those without fiber electrode implantation (1.68, 1.41, and 0.27 V). Furthermore, as illustrated in Supplementary Fig. 13, two pouch AZIBs with fiber electrode implantation and connected in series are capable of illuminating a LED bulb, which indicates that the implantation of fiber electrodes does not impinge upon the normal functionality of the battery. Supplementary Fig. 14 illustrates the specific capacities of a pouch AZIB with fiber electrodes implantation compared to a normal pouch AZIB. The battery with the implanted fiber electrodes exhibited a specific capacity comparable to the normal one after 100 charging and discharging cycles, which indicates that the fiber electrodes of the EGFET-pH & DO sensor do not affect the normal operation of the battery.

After the above cycling tests, the morphology and structure of the MnO2 cathodes and Zn anodes of the tested AZIBs were further characterized using scanning electron microscopy (SEM). Supplementary Fig. 15a-c show the SEM images of the as-made cathodes and those from the normally charged and overcharged pouch AZIBs, respectively. Rod-like α-MnO2 (a) irreversibly transformed into nanoflower-like structures (b, c) due to the lattice distortion of α-MnO2 caused by proton intercalation61:

$${{{\rm{Mn}}}}{{{{\rm{O}}}}}_{2}+{x{{{\rm{H}}}}}^{+}+{x{{{\rm{e}}}}}^{-}\rightleftharpoons {{{{\rm{H}}}}}_{x}{{{\rm{Mn}}}}{{{{\rm{O}}}}}_{2}$$
(7)

The morphology of the cathodes from the normally charged pouch AZIB and the overcharged pouch AZIB was basically the same, and their XRD patterns also did not show any structural differences (Supplementary Fig. 16), which is understandable since overcharging mainly caused the decomposition of water (OER) and would not influence α-MnO2. In addition, ICP - OES was utilized to detect the content of Mn element in the electrolyte before and after three charge-discharge cycles. The results in Supplementary Table 2 indicate that there was only a trace amount of increase (0.98 mg L⁻¹) in the content of Mn element, which suggests that there was no obvious dissolution of the α-MnO2 in the cathode within a short-term cycling period. In contrast, compared to the as-made Zn anode (Supplementary Fig. 15d), the Zn anodes had different degrees of corrosion after cycling. The anode from the normally charged cell had scaly ZHS plates deposited on the surface (Fig. 5e), while the corrosion of the anode from the overcharged cell was much weaker (Fig. 5f). Figure 5g demonstrates the XRD results of the Zn anodes. Compared with the as-made zinc foil, both anodes showed characteristic peaks of ZHS at 2θ of 8.19°41,62. The intensity of the diffraction peaks of the anode from the overcharged cell is significantly lower than that of the anode from the normally charged cell, confirming the observation from the SEM images. In addition, Supplementary Figs. 17 and 18 show the EDX elemental distributions of Zn, O, and S on the surfaces of the anodes, and it can be found that the distributions of O and S on the anode from normally charged cell are significantly higher than those of the overcharged group. This also confirms that the formation of ZHS plates on the surface of the Zn anode after normal charging and discharging cycles is more serious than that on the anode from the overcharged cell. Combined with the detection results from the EGFET-pH & DO sensor, the differences in the surface morphology of the Zn anodes from normally charged and overcharged AZIBs can be explained as follows: The pH of the aqueous electrolyte continually increases in the normally charged cell, thus leading to the formation of ZHS plates at the surface of Zn anode. In contrast, the overcharging of the cell leads to the decomposition of H2O in electrolyte and thus increases the concentration of DO as well as protons (reaction (4)). The reduced pH of the electrolyte depresses the formation of basic ZHS, resulting in the smoother Zn anode than that from the normally charged cell.

For AZIBs, issues such as HER at the surface of Zn anode, OER at the surface of MnO2 cathode, and the corrosion of Zn anode can all lead to the degradation of battery performance. Electrolyte additives have received significant attention as an effective solution for mitigating performance decay in AZIBs63. In this work, the influences of two electrolyte additives, ammonium dihydrogen phosphate (NHP)55 and sodium anthraquinone-2-sulfonate (AQS)41 on the reactions in AZIBs were examined using the EGFET-pH & DO sensor. Supplementary Fig. 19 presents the cycling performance of the AZIBs using the aqueous solutions of ZnSO4, NHP (25 mmol L⁻¹)/ZnSO4, and AQS (1 mmol L⁻¹)/ZnSO4 as electrolytes for 500 charging and discharging cycles. Supplementary Fig. 20 displays the discharge capacity retention rates of the three batteries after 100, 200, 300, 400, and 500 cycles, revealing that the cells with NHP and AQS in their electrolytes have a higher capacity retention rate than that without additives. The voltage variations of the AZIB with NHP/ZnSO4 as the electrolyte, the channel currents of the implanted EGFET-pH & DO sensor, and the real-time changes of pH and DO concentration in the electrolyte during three continuous charging and discharging cycles of the cell are illustrated in Fig. 6a. It could be found that the DO concentration of NHP/ZnSO4 decreased from 0.84 to 0.084 mg L⁻¹, following the trend observed in Fig. 5a, while the pH value remained stable between 3.49 and 3.62. The phenomenon can be attributed to the electrolyte stabilization mechanism of NHP. As shown in Fig. 6b, NH4⁺ from NHP tends to accumulate on the surface of Zn anode, forming an electrostatic shielding layer that reduces the contact of Zn anode with water, thereby depressing HER and alleviating ZHS formation. Additionally, NH4⁺ and H2PO4⁻ in NHP possess buffering capabilities, which can increase the stability of pH at the electrolyte/anode interface, resulting in an increase in proton concentration at the interface and a reduction in the generation of alkaline oxides on the surface of Zn (Fig. 6b). By virtue of NHP, the pH stability of the electrolyte can be maintained, resulting in an increase in the proton concentration and a reduction in the generation of ZHS on the surface of Zn anode.

Fig. 6: In-situ monitoring results for the pouch aqueous zinc-ion batteries (AZIBs) with electrolyte additives.
figure 6

a Time-resolved voltage of the pouch AZIB, IDS-pH and IDS-DO of the EGFET-pH & DO sensor and the real-time pH and dissolved oxygen (DO) concentration derived from galvanostatic charge-discharge (GCD) measurements of a pouch AZIB with an electrolyte of ammonium dihydrogen phosphate (NHP)/ZnSO4 at 2 C with a voltage window from 0.80 to 1.80 V. Corresponding pH and DO concentrations at specific time points are indicated by red dots. b Schematic illustrations of optimization mechanism of NHP in AZIB. Abbreviations: ammonium dihydrogen phosphate (NHP). c Time-resolved voltage of the pouch AZIB, IDS-pH and IDS-DO of the EGFET-pH & DO sensor and the real-time pH and DO concentration derived from GCD measurements of a pouch AZIB with an electrolyte of sodium anthraquinone-2-sulfonate (AQS)/ZnSO4 at 2 C with a voltage window from 0.80 to 1.80 V. Corresponding pH and dissolved oxygen concentrations at specific time points are indicated by red dots. d Schematic illustrations of optimization mechanism of AQS in AZIB. Abbreviations: zinc hydroxide sulfate (ZHS) and sodium anthraquinone-2-sulfonate (AQS).

The in-situ monitoring results of the pouch AZIB containing AQS/ZnSO4 electrolyte are shown in Fig. 6b. AQS is supposed to be a self-deoxygenating electrolyte additive. The presence of DO is thermodynamically favorable for the formation of ZHS42:

$$3{{{\rm{Zn}}}}+{{{{\rm{ZnSO}}}}}_{4}+\left(6\,+\,x\right){{{{\rm{H}}}}}_{2}{{{\rm{O}}}}\to {{{{\rm{Zn}}}}}_{4}\left({{{{\rm{SO}}}}}_{4}\right){\left({{{\rm{OH}}}}\right)}_{6}\cdot {x{{{\rm{H}}}}}_{2}{{{\rm{O}}}}+{3{{{\rm{H}}}}}_{2}$$
(8)
$$6{{{\rm{Zn}}}}+{3{{{\rm{O}}}}}_{2}+{2{{{\rm{ZnSO}}}}}_{4}+\left(6+2x\right){{{{\rm{H}}}}}_{2}{{{\rm{O}}}}\to 2{{{\rm{Z}}}}{{{{\rm{n}}}}}_{4}\left({{{{\rm{SO}}}}}_{4}\right){\left({{{\rm{OH}}}}\right)}_{6}\cdot {x{{{\rm{H}}}}}_{2}{{{\rm{O}}}}$$
(9)

The Gibbs free energy of reaction (7) is 210 kJ lower than that of reaction (6). Therefore, the presence of DO exacerbates the passivation of Zn anode41.

As illustrated in Fig. 6d, AQS is first reduced to AQS2− by Zn (Step i):

$${{{\rm{Zn}}}}+{{{\rm{AQS}}}}\to {{{{\rm{AQS}}}}}^{2-}+{{{{\rm{Zn}}}}}^{2+}$$
(10)

In Step ii, AQS2− can reduce the DO in the electrolyte to OH:

$${2{{{\rm{AQS}}}}}^{2-}+{{{{\rm{O}}}}}_{2}+{2{{{\rm{H}}}}}_{2}{{{\rm{O}}}}\to {{{\rm{AQS}}}}+{4{{{\rm{OH}}}}}^{-}$$
(11)

DO in the electrolyte is consumed by the above processes, thus mitigating the passivation of Zn anode41. According to the detection results of the EGFET-pH & DO sensor, compared to the AQS-free pouch cell depicted in Fig. 6a, the initial DO concentration decreased from 0.84 to 0.16 mg L⁻¹. During the 3 charge-discharge cycles, the DO concentration declined gradually from 0.16 to 0.0043 mg L⁻¹, attributable to the deoxidizing effect of AQS. In addition, the pH value of the electrolyte containing AQS gradually increased from 4.09 to 5.12 in the test (Fig. 6d). It should be noted that the pH of the electrolyte with AQS/ZnSO4 increased more significantly than that of the aqueous ZnSO4 electrolyte without additive (Fig. 5a), which should be due to the production of OH- from the reduction of DO by AQS2− (reaction (9)).

In summary, this study demonstrates the application of an electrochemical EGFET-pH & DO sensor in AZIBs for real-time monitoring of electrolyte composition changes, specifically pH and DO. The findings herein reveal that the EGFET-pH & DO sensor provides the electrolyte composition data of AZIBs with high sensitivity and stability, enabling insights into the electrochemical processes occurring within the batteries. By capturing the variations of pH and DO concentration in the aqueous electrolyte, the EGFET-pH & DO sensor elucidated the side reactions at the surface of Zn anode and MnO2 cathode in AZIBs, including HER, OER, and the formation of ZHS. Moreover, the investigation on the effects of electrolyte additives, including pH buffer reagents and deoxidizers, highlights the mechanisms by which the additives optimize the performance of AZIBs. This work fills a critical gap in electrochemical sensing technology for in-situ monitoring of batteries and significantly improves the understanding of reaction mechanisms in AZIBs, thereby providing a technique for the optimization of aqueous energy storage devices in renewable energy applications.

Methods

Materials

CFs were derived from commercial carbon cloth (Model: WOS1009, CeTech Co., Ltd). Analytical-grade oxygen (O2, >99.999), nitrogen (N2, >99.999%), and diluted O2 (5 and 0.2%; balanced with N2) were obtained from Shanghai Wetry Standard Gas Analysis Technology Co., Ltd. Conductive silver paint was bought from Structure Probe, Inc. Sodium borohydride (NaBH4, ≥99.0%), Nafion (5.0 wt.% in water and 1-propanol), polydimethylsiloxane (PDMS) elastomer (Sylgard 184, Dow Corning Corporation), zinc sulfate heptahydrate (ZnSO4·7H2O, >99.0%), sodium anthraquinone-2-sulfonate (AQS, C14H9NaO5S, ≥98%), manganese sulfate monohydrate (MnSO4 ·H2O, ≥98%) and 1-Methyl-2-pyrrolidinone (NMP, C5H9NO, >99.0%) were purchased from Sigma-Aldrich Corporation. Hydrochloric acid (HCl, 36.0 –38.0 wt.%), potassium chloride (KCl, ≥99.5%), polyvinyl butyral (PVB, 70−75%), chloroplatinic acid hexahydrate (H2PtCl6·6H2O, >99.9%), methanol (CH3OH, ≥99.5%), ethanol (C2H5OH, 95%), p-xylene (C8H10, ≥98.5%), aniline (C6H7N, ≥99.5%), potassium permanganate (KMnO4, ≥99.5%) and ammonium dihydrogen phosphate (NH4H2PO4, ≥99.0%) were all bought from Sinopharm Chemical Reagent Co., Ltd. Buffer solutions with pH = 3.00, 4.00, 5.00, 6.00 and 7.00 were purchased from Sangon Biotech Co., Ltd. Zinc foil (≥99.9%, 0.1 mm thickness), titanium foils (≥99.9%, 0.02 mm and 0.05 mm thickness), carbon black (Super P), polyvinylidene fluoride (PVDF) and Aluminum laminated plastic films were sourced from Shanghai Xiaoyuan Energy Technology Co., Ltd. All the reagents were of analytical grade and used as received without further treatment. Deionized water (~18 MΩ·cm) was used for the preparation of all the aqueous solutions in this work.

Preparation of the fiber electrodes

Reference fiber electrode (RFE): First, the carbon fibers (CFs, 2 cm) were ultrasonically cleaned with ethanol and deionized water for 15 minutes. Next, CFs were uniformly coated with the silver (Ag) paint using a pipette gun (60 μL cm−1) and annealed at 50 °C for 12 hours to obtain Ag-covered CF (CF/Ag). Following this, CF/Ag was immersed in an aqueous solution of KCl/HCl (0.01/0.1 mol L−1), and the surface of the silver coating over CF/Ag was electrochemically chlorinated by a CV process in a three-electrode electrochemical cell to produce CF with Ag/AgCl coating (CF/Ag/AgCl). Specifically, the voltage window ranged from −0.15 to 1.05 V, and the scanning rate and cycles were 50 mV s−1 and 20, respectively. Meanwhile, a solid electrolyte was prepared by stirring PVB (79.1 mg), KCl (74.5 mg), and methanol (1 mL) overnight. The mixture was then deposited on the surface of CF/Ag/AgCl (30 μL cm-1). After drying at room temperature for 12 hours, the electrodes were immersed in an aqueous KCl solution (3 mol L−1) for an additional 12 hours to produce the RFEs.

pH-sensitive fiber electrode (pHFE): pHFEs were obtained by the electrodeposition of polyaniline on CFs (2 cm) via a CV process with a scanning rate of 50 mV s−1 in the voltage window from 0.2 to 1.2 V for 10 cycles in the three-electrode electrochemical cell. Typically, an HCl solution (1 mol L−1, 10 mL) containing aniline (0.1 mL) was used as the electrolyte. CF was used as the working electrode, with a platinum (Pt) wire counter electrode and an Ag/AgCl (sat. KCl) reference electrode (CHI111, Shanghai Chenhua Instrument Co., Ltd., China).

DO-sensitive fiber electrode (DOFE)40: After being cleaned with ethanol and deionized water under sonication, CFs (2 cm) were immersed in the aqueous solution of H2PtCl6·6H2O (2.5 mmol L−1, 10 mL) for 30 minutes with stirring, and NaBH4 (25 mmol L−1, 1 mL) was added slowly into the suspension. The mixture was stirred for 60 minutes and stored at 0 −5 °C for 12 hours to allow the deposition of Pt NPs. The Pt NPs loaded CFs were then obtained by washing with deionized water and vacuum drying overnight. Nafion (3.0 wt.% in water, 20 μL cm−1) and polydimethylsiloxane (PDMS, 20 wt.% in p-xylene, 50 μL cm−1) were coated on the Pt NPs loaded CF electrodes in sequence using a pipette gun to generate DOFEs.

Synthesis of α-MnO2 12

Typically, MnSO4H2O (0.003 mol) and sulfuric acid (0.5 mol L−1, 2 mL) were mixed in deionized water (90 mL). Next, an aqueous solution of KMnO4 (0.1 mol L−1, 20 mL) was added dropwise to the above solution. The mixture was then stirred at room temperature for 2 hours. The solution was subsequently transferred to a Teflon-lined autoclave and reacted at 120 °C for 12 hours. Finally, the sample was centrifuged and washed three times with deionized water and vacuum dried at 60 °C for 24 hours to produce α-MnO2 as a black powder (375.7 mg, yield = 86.4%).

Assembly of AZIBs

Pouch cells: Titanium foils (50 mm × 40 mm, 0.02 mm thickness, A 30 mm × 5 mm tab region was extended on the wide edge to serve as the current-collecting terminal for the battery electrode.) were used as the current collectors of the cathodes. α-MnO2, super-P, and polyvinylidene fluoride (PVDF) were mixed in 1-Methyl-2-pyrrolidinone (NMP) at a weight ratio of 7:2:1 and stirred for 3 hours to prepare a uniform slurry. The slurry was then cast onto the titanium foil and vacuum-dried at 60 °C for 12 hours to obtain the cathodes. The mass loading of α-MnO2 on the cathodes was 1.0 mg cm−2. Zinc foils (50 mm × 40 mm, 0.1 mm thickness, A 30 mm × 5 mm tab region was extended on the wide edge to serve as the current-collecting terminal for the battery electrode.) were used as the anodes. Glass fiber paper (60 mm × 50 mm, Whatman GF/A; Cytiva, Marlborough, MA, USA) was used as the separator. Aluminum laminated plastic films (80 mm × 70 mm) were used as the pouch bags of the batteries. The pouch AZIBs were sealed with an aqueous solution of ZnSO4 (2 mol L−1, 3 mL) as the electrolyte in an ambient environment.

Coin cells: The cathodes were prepared in the same way as those in the pouch AZIBs. The cells were assembled in CR2032-type coin cells (Shanghai Xiaoyuan Energy Technology Co., Ltd.) with a piece of Zn foil (8 mm radius, 0.1 mm thickness) as the anode, a piece of α-MnO2 cathode (6 mm radius), a piece of glass fiber separator (Whatman GF/A; Cytiva, Marlborough, MA, USA), and an aqueous solution of ZnSO4 (2 mol L−1, 100 μL), NHP (25 mmol L−1)/ZnSO4 (2 mol L−1) or AQS (1 mmol L−1)/ZnSO4 (2 mol L−1) as the electrolyte.

Swagelok cells: Swagelok cells were assembled with an α-MnO₂ cathode (6 mm radius), a Zn foil anode (6 mm radius, 0.1 mm thick), and two glass fiber separators (8 mm radius), using an aqueous ZnSO₄ solution (2 mol L−1, 100 μL) as the electrolyte.

Materials characterizations

The surface morphologies of the electrodes from pouch AZIBs and fiber electrodes were characterized by a field-emission scanning electron microscope (SEM, Ultra Plus, Zeiss, Germany). The relative percentage of Zn, O, and S on the surfaces of the anodes was observed using an energy-dispersive X-ray spectroscopy (EDX) analyzer (Aztec X-MaxN 20 Oxford instruments). The X-ray diffraction spectroscopy (XRD) patterns of the anodes were recorded using a Mini Flex 600 X-ray diffractometer (Rigaku Corporation, Tokyo, Japan) with a scanning rate of 5° min−1 from 5° to 90° at a voltage of 40 kV and a current of 15 mA, and the XRD profiles of the cathodes were recorded with the 2θ angle ranging from 5° to 50°. The XRD pattern of CF/Pt was recorded with the 2θ angle ranging from 10° to 90°. The elemental analysis of Mn contents of the aqueous ZnSO4 electrolyte (2 mol L−1) in the pouch AZIB before and after three charge-discharge cycles at 2 C with a voltage window from 0.80 to 1.80 V was performed using inductively coupled plasma-optical emission spectrometry (ICP-OES, Avio 500, PerkinElmer, Singapore).

Electrochemical characterizations

All electrochemical tests of batteries and sensors were conducted in a climate-controlled laboratory environment maintained at 25 ± 1 °C.

Electrochemical measurements of the fiber electrodes: The performance of the fiber electrodes was evaluated with an electrochemical workstation (CHI 660E, Shanghai Chenhua Instrument Co., Ltd.).

Stability test of RFE: OCP method was utilized to measure the potential difference between RFE and a commercial Ag/AgCl (sat. KCl) reference electrode in an aqueous ZnSO4 electrolyte (2 mol L−1) for 24 h to verify the stability of RFE.

OCP responses of pHFE: The OCP responses of pHFE were recorded by using pHFE as the working electrode and RFE as the reference electrode in buffer solutions with the following order: 7.00, 6.00, 5.00, 4.00, 3.00, 4.00, 5.00, 6.00, and 7.00.

CV and OCP responses of DOFE: The CV measurements in the oxygen-free and oxygenated electrolyte were conducted in a three-electrode electrochemical cell with DOFE as the working electrode, a Pt wire counter electrode and an Ag/AgCl (sat. KCl) reference electrode at a voltage window of −0.5 to 0.5 V and a scan rate of 50 mV s−1. The real-time OCP responses of DOFE towards DO were tested with RFE as a reference electrode by varying the DO concentration from 0.0022 to 9.8 mg L−1 in ZnSO4 electrolyte. The DO concentration in the electrolyte is controlled by the bubbling method40: The electrolytes with different concentrations of DO were obtained by bubbling the mixtures of O2 and N2 using a multi-channel gas flow distribution meter (LY-400B, Chengdu Leiyu Measurement and Control Technology Co., Ltd., China) for approximately 250 s. After bubbling, the DO in the electrolyte reaches a gas–liquid equilibrium state and a stable OCP can be obtained. The concentrations of DO in the solution were calibrated by a DO meter (HI 2040, Hanna Instruments, Italy).

Tests of EGFET sensor

Test equipment of EGFET sensors: The tests of the EGFET sensors were carried out with test equipment (TruEbox, 02CM, LinkZill Co., Ltd), which consists of an analog front end (AFE), a microcontroller unit (MCU), and a power management chip (PMC). MCU controls the voltage output channels (VGS and VDS) and the source-drain current channels processed by a 16-bit digital-to-analog converter (DAC). A voltage follower can tune the bias of the voltage applied to the sensor from the DAC. As the sensitive gate interacts with the sample, the electrical signal is converted to a change in voltage by a trans-impedance amplifier and read by a 24-bit analog-to-digital converter64.

Assembly of single-channel EGFET sensor: Commercially available integrated circuit electronic components (IC, CD4007UB, Texas Instruments, USA) were soldered with solder paste onto pre-designed FPCB pads (Supplementary Fig. 21). The IC contains two separate positive channel metal oxide semiconductor (PMOS) transistors. Metal pads were reserved on the FPCB for connection to fiber electrodes and gold fingers were used for connection to the test equipment. pHFE and RFE were connected to the corresponding metal pads on the FPCB to obtain a single-channel EGFET-pH sensor. Similarly, a single EGFET-DO sensor was obtained by connecting DOFE and RFE to the metal pads on FPCB.

Response tests of single-channel EGFET: To determine the response characteristics of gate voltage, the transfer characteristic curves of the PMOS transistor in CD4007UB and EGFET were tested by setting the drain-source voltage (VDS) to −1.50 V and scanning the gate voltage from −3.00 to 0 V at a scan rate of 50 mV s−1. In the continuous response test, the VDS of EGFET was set to −1.50 V and the Vref. was biased at −2.00 V to obtain high signal-to-noise response curves.

EGFET-pH sensor: The transfer characteristic curves of the EGFET-pH sensor were tested after immersing pHFE and RFE in buffer solutions with different pH values from 7.00 to 3.00. The real-time sensing performance of EGFET-pH sensor was evaluated by measuring IDS-pH with different pH buffer solutions, and the buffer solutions were tested in the following order: 7.00, 6.00, 5.00, 4.00, 3.00, 4.00, 5.00, 6.00, and 7.00.

EGFET-DO sensor: Similarly, the transfer characteristic curves of the EGFET-DO sensor were collected after immersing DOFE and RFE in ZnSO4 electrolyte and varying the DO concentration from 0.0022 to 9.8 mg L−1. The real-time sensing performance of the EGFET-DO sensor was tested by recording IDS-DO and changing the DO concentration from 0.0022 to 9.8 mg L−1.

Anti-interference tests: To evaluate the anti-interference performance of the EGFET-pH sensor, the EGFET-pH & DO sensor were immersed in an aqueous ZnSO4 electrolyte (2 mol L−1, 10 mL) and the channel current responses of the sensor were simultaneously recorded while varying the DO concentration in the electrolyte.

To verify the anti-interference characteristics of EGFET-DO, the EGFET-pH & DO sensor was placed in a deoxygenated aqueous ZnSO4 electrolyte (2 mol L−1, 10 mL). Then, deoxygenated H2SO4 (0.05 mol L−1, 100 μL) and NaOH (0.1 mol L−1, 200 μL) solutions were sequentially added to the electrolyte to adjust pH of the electrolyte, and the channel currents of the EGFET were recorded throughout the testing process (Vref. = −2.00 V, VDS = −1.50 V). Similarly, deoxygenated MnSO4 solution (0.1 mol L−1, 200 μL) and deionized water (1 mL) were sequentially added to a deoxygenated aqueous ZnSO4 electrolyte (2 mol L−1, 10 mL) to verify the anti-interference performance of the EGFET sensors against the variation of ion concentrations.

Electrochemical tests of the pouch AZIBs with and without fiber electrode implantation

EIS was performed on pouch AZIBs using a potentiostatic mode (applied alternating current (AC) voltage perturbation). Measurements were conducted at open-circuit voltage (OCV) after 10 min of stabilization, with a 5 mV sinusoidal amplitude across a frequency range of 100 kHz to 0.1 Hz. Data were acquired at 10 points per frequency decade under ambient conditions (25 °C). GCD measurements of pouch AZIBs with and without fiber electrode implantation were performed with a battery test system (Land CT2001A, Wuhan Shenglan Electronic Technology Co., Ltd., Wuhan, China) at a current density of 1 C and with a voltage window from 0.80 to 1.80 V for 100 cycles. In the demonstration experiment, two pouch AZIBs with fiber electrode implantation were connected in series and used to light up an LED bulb with a rated voltage of 3 V.

GCD measurements of coin cells

GCD measurements of coin cells containing electrolyte additives were performed using a battery test system (Land CT2001A, Wuhan Shenglan Electronic Technology Co., Ltd., Wuhan, China) at a current density of 1 C within a voltage window from 0.80 to 1.80 V for 500 charge–discharge cycles.

In-situ monitoring of pH and DO concentration in the electrolyte of AZIBs

Workflow overview: Two MOSFETs were used to build a dual-channel EGFET (Supplementary Figs. 21 and 22). The pin-to-pin connections of transistors were completed during the design of the FPCB layout (Supplementary Fig. 23). Three pads were reserved for connecting to the sensing units and gold fingers for interfacing with the test unit, which reduces the complexity of inter-component wiring and improves the reliability of the electrical connections. Next, the fiber electrodes were placed between the separators and led with taps during the assembly of the pouch AZIBs (Supplementary Fig. 24). The FPCB was connected to the taps on the pouch AZIBs and the test equipment. After pairing the smartphone with the test equipment via Bluetooth, parameter setting and data transmission could be accomplished via the smartphone (Supplementary Fig. 25). The driving voltage (Vref.) was applied to the transistor through the RFE to generate two channel currents (VDS = −1.50 V, VGS = −2.00 V).

Pouch AZIBs: Titanium foil (22 mm × 3 mm, 0.05 mm thickness) was used as the tabs and connected with the fibrous electrode using polyimide (PI) tape. Three tabs were placed equidistantly (d = 8 mm) so that the tab tapes of the three fibrous electrodes were secured at the same level with PI tape. The fiber electrodes were separated from the cathode and anode by two separators. To ensure that all the tab tapes were level, the fibrous electrodes were adjusted, secured with PI tape, and placed in an aluminum-laminated plastic bag (Shanghai Xiaoyuan Energy Technology Co., Ltd.). Finally, an aqueous ZnSO4 electrolyte (2 mol L−1, 3 mL), NHP (25 mmol L−1)/ZnSO4 (2 mol L−1) or AQS (1 mmol L−1)/ZnSO4 (2 mol L−1) was added to the aluminum laminated plastic bag before the encapsulation of the pouch AZIBs.

Supplementary Fig. 26 illustrates the flowchart of the EGFET-pH & DO sensor converting in-situ channel currents to pH and ρDO. The initial calibration of pH and DO concentration in the electrolyte was necessary to ensure the accuracy of the in-situ monitoring result59,65: Before adding the electrolyte to the pouch AZIBs, the initial value was read with the commercial pH meter and DO meter, and the initial concentration was converted to the corresponding initial channel current value (IDSin) according to the fitted curve of the EGFET sensor. After the GCD measurements, the pristine channel currents collected were recorded as IDS0. Next, the calibrated channel current was obtained by multiplying all the measured channel currents by IDSin/IDS0. Finally, the calibrated channel currents were converted again using the fitted curve of the EGFET sensors to yield the real-time variation curves of pH and DO concentration of the electrolyte in the pouch AZIBs.

Swagelok cell: In-situ monitoring of Swagelok cells was carried out using the EGFET-pH & DO sensor to validate in-situ monitoring results of pouch AZIBs. The three fiber electrodes (RFE, DOFE and pHFE) were placed between two separators and connected to the corresponding pads on the FPCB (Supplementary Fig. 8). The parameter settings and initial calibration method for the EGFET-pH & DO sensor in Swagelok cells were consistent with those in pouch AZIBs.

Reproducibility

All experimental procedures, including material synthesis, sensor fabrication and electrochemical characterization, were independently repeated at least three times. The results of in-situ monitoring demonstrated high reproducibility, with consistent trends and key electrochemical phenomena observed in all replicate trials.