Introduction

Humidity plays a significant role in various environmental aspects, making it a crucial element in the development of instrumentation, automated systems, climatology, and many other applications [1]. In addition to its role in ensuring the quality of many products across a variety of industries including agriculture, food processing, medicine, and electronics, humidity is also crucial in the production and maintenance process. Researchers have focused on developing humidity sensor materials that address these challenges, offering benefits such as high levels of miniaturization, easy processability, and operability at room temperature. This advancement came as a response to issues like the high costs, elevated operational temperatures, and intricate production processes of existing humidity sensors. Nevertheless, there are many methods to enhance the efficiency, adaptability, and cost-effectiveness of these sensors. One such approach involves utilizing simpler and more effective techniques for establishing the composites and related films [2, 3]. Ceramic materials such as ZnO, MgO, NiO, Co2O3, Sb3O3, and SnO2 are commonly used for humidity sensing due to their superior temperature stability, adsorption capacity, and porous structures [4]. Other methods involve humidity sensing using polymers, where it is been observed that dielectric, capacitive, or resistance parameters change upon exposure to water.

Generally, conducting polymers like polyaniline (PANI) are π-conjugated systems that possess alternating single and double bonds. The π-conjugated electrons are predominantly delocalized, and this delocalization increases upon interaction with vapor molecules [5]. The observed increase in conductivity and decrease in resistance is attributable to the formation of hydrogen bonds between water molecules and the nitrogen center in the PANI matrix. This enhances proton exchanges, increasing the doping level of PANI and thus the number of charge carriers, which leads to a rise in conductivity [6].

PANI, despite its potential, is challenging to use in real-world applications as an effective sensing material due to its weak mechanical strength and reduced chemical stability at high temperatures. However, there are several strategies to overcome these issues, such as introducing metal oxides (inorganic) into PANI during synthesis. Since PANI-based composites have considerably larger surface areas, they are more sensitive and show faster responses. These nanostructures drastically alter their electrical and optical properties when interacting with the analyte. They hold potential for use in energy storage and optoelectronic devices such as photocatalysts, photodiodes, solar cells, transistors, lasers, and sensors [7, 8]. Numerous studies have shown how to synthesize nanofillers composites including “Au, Pd, CdS, Na+—montmorillonite, and TiO2,” using PANI [9].

Doping a material alters the crystallinity, shape, porosity, structural points and specific surface area of the material, and these factors enhance the sensor’s sensing capacity [16, 17]. Owing to distinctions in the ionic radii of Zn2+ (0.072 nm) and Bi3+ (0.103 nm), the doping of Bi3+ into ZnO causes matrixes which significantly mismatches and results in the generation of new defects [10]. In addition to their high surface-to-volume ratios, inorganic fillers at the nanoscale level are anticipated which modify the electrical, optical, and dielectric characteristics of polymers. The ultimate goal is usually the creation of a new composite material with features that either match or synergize with those of the polymer and inorganic material in the production of a polymer/inorganic hybrid material [11,12,13]. Chaudhary et al. [14] fabricated the nanocomposites of PAN-Ag core–shell and inserted MO as template and dopant in a one-pot synthesis procedure. The prepared samples were applied to sense low concentrations of NH3. A spin coating method was used to fabricate a chemiresistor for sensing purposes and discussed the role of Ag concentration on the NH3 sensing performance of materials. In another study, Chaudhary et al. [15] used the PANI for the detection of sulfur dioxide.

Herein, the synthesized composite of PANI, i.e., PANI-Bi-ZnO, has been employed as a humidity sensor. Efforts have been put forth to introduce a unique capacitive-type humidity sensor, prepared via the inverse emulsion polymerization method, and characterized by UV/Vis, FTIR, TGA, and SEM. This sensor offers several benefits, being lightweight, non-toxic, chemically, and thermally stable. Furthermore, it provides a swift, reversible humidity response, high sensitivity, and a small hysteresis curve.

Experimental

Materials and reagents

The aniline monomer and sodium hydroxide were procured from Acros organics and subsequently distilled. Bismuth nitrate and zinc nitrate were supplied by Saen Chemistry Technology Co., Ltd., based in Shanghai, China. For this study, chloroform solvents from Sigma and Benzyl peroxide (BPO) procured from Macklin Biochemical Co., Ltd, also in Shanghai, China, were used.

Synthesis of Bi-doped ZnO

For the synthesis of Bi-doped ZnO, the molar solution of bismuth nitrate 0.0125 M was used as a dopant, and zinc nitrate 0.125 M and sodium hydroxide 0.25 M were prepared in separate beakers. After the preparation of the molar solution separately, this solution was intermixed and kept on stirring for 2 h. After the completion of stirring time, the solution was removed from the stirring and kept undisturbed for 24 h. The solution was filtered to separate the precipitate from the solution and kept for drying in the oven. The powder obtained was kept for the calcination for a temperature range of 500–2 h. The synthesized product is bismuth-doped zinc oxide [16,17,18].

Synthesis of PANI, PANI-ZnO, PANI-Bi2O3, and PANI-Bi-ZnO

The pristine PANI was prepared by using the inverse emulsion polymerization method. In the current experiment, toluene (25 mL) was taken in the 100-mL flask and was used to dissolve the benzoyl peroxide (BPO), and the solution was placed on the stirrer. To this solution in the round bottom flask, the addition of 2-propanol (5 mL) and the dodecyl benzene sulfonic acid (DBSA) in a quantity of 0.2 mL were added, and also, the aniline monomer was added in the ratio of 0.2 mL. After a few seconds, 5 mL of de-ionized water was poured into the solution and was kept undisturbed for 24 h. After 24 h, the solution was transferred to the separating funnel followed by distilled water and secondly by the addition of acetone for the washing. The obtained product was placed in the petri dish and dried in the oven.

The dried product was used for further study. The %yield was calculated by using the following equation

$$\% {\text{Yield}} = \frac{{{\text{weight of polymer}} }}{{\text{weight of aniline }}} \times 100$$
(1)

The same procedure as discussed above is used for the PANI-ZnO, PANI-Bi2O3, and PANI-Bi-ZnO composites preparation by the addition of ZnO, Bi2O3, and Bi-ZnO just after the addition of aniline monomer (Fig. 1).

Fig. 1
figure 1

The interaction of PANI-Bi-ZnO

Sensor fabrication and measurements for humidity sensing

Sensor fabrication

In this work, an Ag–Pd ceramic alumina substrate, measuring 0.5 mm in thickness and 3 mm × 6 mm in dimensions, was employed to prepare interdigitated electrodes (IEs) as shown in Fig. 2. These IEs were subsequently utilized in the fabrication of the humidity sensor. Before coating the substrate with sensing materials, it was cleaned sequentially with acetone and de-ionized water using an ultrasonicator bath for 10 min. After these procedures, the substrate was dried using a nitrogen blow. The drop casting method, listed in the literature, was implemented for the humidity sensor’s fabrication. After the deposition of the sensing film, the electrodes were dried at room temperature [19, 20]. The humidity sensor was analyzed within a laboratory-based humidity control chamber. The chamber was adapted with an input and output valve to facilitate the flow of humid and dry nitrogen air. A Philips respironics humidifier was employed to increase the internal humidity level. Dry air was admitted through the inlet valve; simultaneously, humid air was released from an outlet valve, consequently reducing the relative humidity level. A broad range of relative humidity levels was gauged by measuring the sensor’s resistance and capacitance leveraging an MS5308 LCR meter. An RS-6109 humidity meter tracked the humidity level within the chamber. All evaluations were performed at ambient temperature.

Fig. 2
figure 2

a Structure of sensor and b top view of sensor

Humidity sensing measurements

Before the sample injection, the sensor was cleaned with dry air until it reached a consistent resistance level. Following the injection of the tested sample, any change in sensor capacitance was observed and the most significant altered value was recorded [4]. The sensitivity of the synthesized composite is calculated by the expression no 2. The Co is the measure of initial capacitance at the lowest % RH. CRH is the measure of capacitance at any % RH.

$$S = \frac{{C_{{{\text{RH}}}} - C^{{\text{o}}} }}{{C^{{\text{o}}} }} \times 100\%$$
(2)

However, the sensitivity can also be measured from the below equation [21]. Where C denotes the capacitance and RH is the relative humidity whereas the u and l denote the upper and the lower limits.

$$S = \frac{{C_{{\text{u}}} - C_{{\text{l}}} }}{{{\text{RH}}_{{\text{u}}} - {\text{RH}}_{{\text{l}}} }} \times 100\%$$
(3)

The capacitance and the dielectric constant are related by Eq. 4 below where C and ε denote the capacitance and the sensing material permittivity whereas, the A and d are the area of the electrode and dielectric constant that is a function of relative humidity. The capacitance undergoes variation with changes in the value of the dielectric constant (Fig. 3).

$$C = \varepsilon \frac{A}{d}$$
(4)
Fig. 3
figure 3

Diagrammatic representation of the humidity sensing setup

Results and discussion

UV/Vis spectroscopy

Figure 4 demonstrates the UV/Vis absorption spectrum, which ranges from 300 to 900 nm for the pristine PANI, PANI-ZnO, PANI-Bi2O3, and PANI-Bi-ZnO. The UV/Vis spectra of PANI typically show substantial absorption in the wavelength ranges of 350–390 nm and 700–800 nm. While the band at 700–800 nm is attributed to the excitation of the quinoid segment, the band at 350–390 nm is attributed to a π–π* transition of the benzenoid unit. The conductive states of PANI were indicated by the absorption peak at ∼700–800 nm. Therefore, the chemical structure of PANI in conductive states was significantly confirmed by FTIR and UV/Vis spectra [32]. The PANI-ZnO nanocomposite showed a little red shift for the π–π* transition at 720 nm. The interaction of PANI with ZnO nanoparticles caused this redshift [33, 34]. In the PANI-Bi2O3 nanocomposite, the n–π* and the π–π* transitions likewise move to a longer wavelength. For the PANI-Bi-ZnO, the difference in the peak position is observed which might be attributed because of bismuth and zinc ions in the polymer matrix [35]. The band gap is calculated for all the samples by using a tauc plot and is found to be 2.7 for PANI, 2.5 for PANI-ZnO, 2.4 for PANI-Bi2O3, and 2.1 for PANI-Bi-ZnO [36].

Fig. 4
figure 4

UV/Vis spectra of PANI, PANI-ZnO, PANI-Bi2O3, and PANI-Bi-ZnO

FTIR spectroscopy

Figure 5 shows the FTIR spectra of PANI, PANI-ZnO, PANI-Bi2O3, and PANI-Bi-ZnO. PANI’s distinctive bands in its spectrum can be seen at wavelengths 1585, 1486, 1297, 1143, 825, and 500 cm−1. Due to the existence of PANI’s quinoid and benzenoid rings, respectively, the frequency bands at 1585–1486 are caused, and stretching modes of vibration C=N and C=C are attributed to them [15]. The secondary aromatic amine C–N stretching mode is responsible for the peak at 1297 cm−1. The vibration of Q = +NH–B, which is assigned to the band at 1143 cm−1, identifies the product as PANI in the conductive emerald salt form [37, 38]. The identical characteristic peaks may be seen in the PANI-ZnO, composites. In composite samples, these modes were, however, pushed to lower wavenumbers. The change could be attributed to the formation of hydrogen (H) bonds in the PANI-ZnO composite. Reported literature also mentioned that PANI and ZnO particles interacted in this manner [20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39]. The band in the range of 790 cm−1 is attributed to the existence of the Bi–O–Bi bond in the polymer composite, and the observed frequency values indicate the formation of the PANI-Bi2O3 nanocomposite [40]. The FTIR spectrum of PANI-Bi-ZnO follows the same trend of decrease in wavenumber and the broadest and strongest band on doping was seen in the area of about 973 cm−1 and is associated with the metal oxide interaction [41]. The band that appears in the range of 500 cm−1 might be because of bismuth and zinc interaction. It is important to note that the conductivity of PANI is improved after the formation of PANI-Bi-ZnO composite, thereby suggesting the application of materials as gas sensors [14].

Fig. 5
figure 5

FTIR spectra of PANI, PANI-ZnO, PANI-Bi2O3, and PANI-Bi-ZnO: A 4000–500 cm−1 and B 2000–400 cm−1

Thermogravimetric analysis

Thermogravimetric analysis (TGA) was carried out for PANI, PANI-ZnO, PANI-Bi2O3, and PANI-Bi-ZnO composites as displayed in Fig. 6 to show the improvements in thermal stability. PANI and the prepared composites of PANI degrade thermally in three stages. The first weight loss in PANI and prepared composites that occur before 300 °C is mostly caused by the water molecule evaporation and the content of solvent. The second weight loss above 300 °C is due to the breakage of polymer chains, oxidation of organic groups, and evaporation of dopants in PANI and its composites. Pure PANI completely loses weight at temperatures above 400 °C; however, the composites keep around 30% of their weight. Weight loss is consistent for temperatures between 400 and 600 °C, according to the composite of PANI. PANI-Bi-ZnO is discovered to be more stable than prepared samples [42]. Above 350 °C, the total weight loss of PANI, PANI-ZnO, PANI-Bi2O3, and PANI-Bi-ZnO is 61.34%, 58.21%, 56.31%, and 36.41%, respectively. It is concluded that PANI-Bi-ZnO had better thermal stability than the other three prepared samples, mainly due to the introduction of Zn and Bi in the PANI matrix [43, 44]. The weight loss at higher temperatures suggests that the polymer is structurally decomposing. PANI-Bi-ZnO gradually breaks down, and between 500 and 580 °C, there is a significant weight loss. This demonstrates the stability of PANI-Bi-ZnO [44].

Fig. 6
figure 6

TGA spectra of PANI, PANI-ZnO, PANI-Bi2O3, and PANI-Bi-ZnO

Sem analysis

Figure 7 displays the SEM images of PANI, PANI-ZnO, PANI-Bi2O3, and PANI-Bi-ZnO. The SEM images have confirmed the irregular morphology of PANI. Other sources have also remarked on the PANI’s irregular morphology [37]. The incorporation of ZnO has changed the morphology of PANI, as shown by the SEM micrographs, which show granular spherical beads-like structures with highly agglomerated ZnO particles, that are uniformly distributed throughout the PANI matrix [45]. The porosity is improved by spherical beads as seen in the PANI-ZnO SEM images [46]. In the case of Bi2O3 addition, the flower-like flaky morphology confirmed the synthesis of PANI-Bi2O3 from the recorded SEM micrograph [40]. The PANI-Bi-ZnO shows highly mesoporous morphology that appears as hollow cage assemblies, with the cage being a collection of granular and smaller spherical grains shaped structures grouped as one form microsponge [47].

Fig. 7
figure 7

SEM images of: a PANI, b PANI-ZnO, c PANI-Bi2O3, and d PANI-Bi-ZnO

Humidity sensor study

Sensitivities and frequency-dependent capacitive humidity response

The role of frequency in humidity sensing is significant and impacts the performance of the sensor. This is particularly apparent in the context of humidity response, which is expressed as sensitivity. As illustrated in Fig. 8A, input frequencies such as 100 Hz, 500 Hz, 1 kHz, and 10 kHz influence the response of capacitance and sensitivity of the prepared sample as the relative humidity (RH) changes from 10 to 90%. The capacitance of the synthesized sample increases proportionally with a rise in %RH level at all frequencies studied. However, at a lower frequency of only 100 Hz, an exceptionally high capacitive response to humidity is exhibited, more so than at higher frequencies. The PANI-Bi-ZnO humidity sensing performance, resulting in a notable variation in capacitance, was assessed under differing RH levels. Figure 8B shows how the sensitivity of PANI-Bi-ZnO at a frequency of 100 Hz changes according to different levels of RH, ranging from 10 to 90%. When it comes to capacitive humidity sensing performance, the response is measured as sensitivity, which is equivalent to ∆C/Co(%). In this expression, Co represents the initial value, while ∆C signifies the shift in capacitance that arises from variations in humidity levels. The remarkable increase in capacitance, associated with a higher concentration of water molecules [48], may be explained by the presence of a significant number of defective sites in PANI-Bi-ZnO. These sites allow for an enhanced physical adsorption of water vapor.

Fig. 8
figure 8

The A capacitive and the B sensitivity response of PANI-Bi-ZnO with varying %RH

As per Fig. 8B, the PANI-Bi-ZnO displays maximum capacitance sensitivity in reaction to varying %RH, within the range of 10–90%. For instance, at a frequency of 100 Hz, a shift in RH from 10 to 90% triggers a significant increase in capacitance, as shown in Fig. 7B. The enhancement in capacitive sensitivity of the prepared composite to RH > 90% stems from the saturation of all active sites through the multi-layered water adsorption on the film’s surface. Subsequently, the capacitance increases, correlating with the moisture content augmentation on the PANI-Bi-ZnO. The water’s dielectric constant, known to exceed 80 at room temperature from the literature, can influence the sensor film’s dielectric constant, thereby exhibiting a considerably high capacitance. Capacitive curves, smoother and more regular, were developed due to a linear fit at a frequency limit of 100 Hz and their favorable R2 values (0.994), reflecting their high applicability for practical purposes. The considerable capacitance of the sensing material is linked with the physisorption process, exhibiting %RH of multi-layered water content on the surface of the prepared composite film [49,50,51].

Sensing performances of prepared humidity sensors

The relative humidity sensing capabilities of both pristine PANI and the composites, PANI-ZnO, PANI-Bi2O3, and PANI-Bi-ZnO, were examined. These tests were conducted at a fixed frequency of 100 Hz, and the humidity within the testing chamber was varied from 10 to 90% RH at a temperature of 300 K. Figure 9A–D demonstrates the variation in the electrical properties of the prepared samples, such as impedance, resistance, conductance, and capacitance, in response to changes in humidity inside the testing chamber.

Fig. 9
figure 9

Relative humidity (RH) response of PANI and its composites to: A capacitance, B conductance, C impedance, and D resistance

The capacitance of PANI, PANI-ZnO, PANI-Bi2O3, and the PANI-Bi-ZnO was recorded in the test chamber of humidity 10–90% RH at a constant temperature of 300 K at the frequency of 100 Hz adjusted in the LCR meter. At low relative humidity (%RH), sensing material goes through the chemisorption of water molecules which ultimately dissociates the water molecule into hydroxyl (OH) and hydrogen (H+) ions. Consequently, because of the physio adsorption process, at low relative humidity (%RH), the mechanism of proton hopping is not conceivable. Due to the effect of tunneling among the active water donor sites, the current rises. Henceforward, the tunneling of the electrons at the donor water sites is the main mechanism at the low %RH. With the rise in relative humidity, the water molecules getting more getting more absorbed on the surface of the active layer; in this way, the chemisorption process occurs [52, 53]. Generally, a humidity sensor functions as a parallel-plate capacitor, where the active sample forms the dielectric layer between the capacitor plates. The rapid increase in the capacitance values of the prepared composite could be a result of the increased vapor concentration in the surrounding environment. This increase in capacitance, when the relative humidity (RH) rises, is attributed to the sensor material’s ability to adsorb water molecules. This adsorption elevates the dielectric constants of the composite, thus enhancing the sample’s capacitance. Consequently, a rise in capacitance is observed with increasing relative humidity. As shown in Fig. 9A, the behavior of the capacitance for the prepared sample reveals an enhancement that could be due to the dopants’ addition to the pristine PANI. This addition also enhances the composite’s sensitivity toward humidity changes. Variations in capacitance noted at a relative humidity of 90% for PANI, PANI-ZnO, PANI-Bi2O3, and PANI-Bi-ZnO were 1.2*10−7 F, 2.5*10−7 F, 5.1*10−7 F, and 1.2*10−6 F, respectively. After water adsorption, leak conduction is observed in the sensing material. The relationship between the fabricated humidity sensor’s capacitance and leak conduction can be expressed by Eq. (5). Here, ω stands for angular frequency, γ for conductance, Ɛo for permittivity of free space, Ɛ* for complex dielectric constant, Co for capacitance, and Ɛr for the relative dielectric constant of an ideal capacitor.

$$C = \varepsilon *C^\circ = \varepsilon {\text{r}} - i\frac{\gamma }{\omega \varepsilon^\circ }C^\circ$$
(5)

The capacitance is directly proportional to γ and has an inverse relation to the frequency ω. The greater the frequency the smaller the capacitance. The relation is more recognizable when the relative humidity is increasing [54]. As per Eq. (2), the variation in the sensor’s capacitance due to humidity indicates that moisture is retained within the wall structures of the pores. When subject to a moist environment, the sensor adsorbs moisture on the walls of these pores, creating a balance at a certain humidity level. Within these pore walls, moisture disperses, dampening the internal cellular structure, a process referred to as lateral moisture diffusion, causing an apparent expansion of the pores. The amount of moisture that dissipates from the pores is contingent upon both the level of relative humidity and the duration that the sensor is exposed to the moist conditions [55]. Comparable performance is perceived from the plot of conductance against the relative humidity, where it has been shown that the conductivity of thin coatings increases as the relative humidity rises. The conductance (Fig. 9B) was recorded for the prepared composites PANI, PANI-ZnO, PANI-Bi2O3, and the PANI-Bi-ZnO at the highest humidity of 90% and was found to be 1.1*107, 3.4*107, 5.5*107, and 9.1*107 Ω−1. As shown in Fig. 9B, the behavior of PANI was found to be less than that of the composites (conductance). The adsorption of water molecules onto the prepared sample’s active sites may have contributed to an increase in the mobility of the hydrogen ions H+, which in turn increased conductance as the relative humidity increased. Figure 9A, B demonstrates that PANI-Bi-ZnO thin films respond more quickly to monitoring the presence of moisture in the testing chamber. The impedance of PANI, PANI-ZnO, PANI-Bi2O3, and PANI-Bi- ZnO was recorded in the test chamber of humidity 10–90% RH at a constant temperature of 300 K at the frequency of 100 Hz. It is also observed and displayed in Fig. 9C that the variation in the impedance of the active material is caused by changes in humidity. The plot of impedance makes it obvious that when the moisture content rises, the sensing material’s impedance lowers. At the maximum relative humidity of 90%, the value of impedance for PANI, PANI-ZnO, PANI-Bi2O3, and the PANI-Bi-ZnO are 5.4*10 −10, 5.91*10−10, 6.4*10−10, and 6.91*10−10 S individually. In comparison with pure PANI, the composites exhibit good humidity sensing response and are much more sensitive to changes in humidity. The variation of resistance at relative humidity 90% RH of PANI and the composites is recorded and found to be 2.6*106, 2.1*106, 2.04*106, and 1.72*106 Ω. In the range of 10–90% humidity, a decrease in the resistance is observed in the pristine PANI and the composite of PANI. The sensitivity of PANI, which is of order 1, is approximately 30%. In the case of the composite of PANI, the resistance has been linearly reduced to approximately 3.52*106 Ω for PANI-Bi-ZnO thin film. It is noted that the synthesized material showed excellent linear sensing response even at low RH. The regular linear reduction in the resistance displayed in Fig. 9D both at the lower and the higher %RH by the fabricated sensor is mainly due to the porous nature, and the presence of this porosity on the composite provides the sites of adsorption for the molecules of water [56]. This info is also related to the SEM morphology as displayed in Fig. 7. The decrease in the resistance/impedance and corresponding increase in the conductance/capacitance of the fabricated sensor is interrelated with the vapors of water in the camber and might be due to the charge transfer of Bi-ZnO ions which is loosely bound by the weak Vander waal force of attraction to the matrix of PANI which is also confirmed the FTIR spectra. The effectiveness of the fabricated sensor is correlated to the structure of the composite; the mesoporous morphology will increase the capillary condensation of the water content. The presence of pores on the surface raises concerns about the mobility of charges of the sensor which helps in the increase of conductivity [57]. The SEM morphology of the fabricated sensor shows the porous nature which helps in trapping the molecules of water that shakes the efficiency of the fabricated sensor in a very way.

Response and recovery

The fabricated samples (a) PANI, (b) PANI-ZnO, (c) PANI-Bi2O3, and (d) PANI-Bi-ZnO were studied for the response and the recovery time (see Fig. 10). The observed response and the recovery times of pristine PANI, PANI-ZnO, PANI-Bi2O3, and the PANI-Bi-ZnO were calculated for the average four cycles and found to be 40.3, 36.67, 35.69, and 8 s, respectively, whereas the recovery times tend to be stable at 65.3, 45.67, 37.69, and 20 s [53]. From the calculated values of the response and the recovery, it is concluded that the sensor can be used for daily life applications. Table 1 shows improved performance of the sensor than the previously reported literature [52]. The quick response and the recovery time of PANI-Bi-ZnO are due to the porous nature that provides more available sites for the adsorption and the desorption of water molecules in comparison with the other composites of the PANI [58]. The response and recovery curves of all the samples show almost similar behavior; nevertheless, there is a small change on the molecular level that could be not detected experimentally.

Fig. 10
figure 10

Response and recovery times of: a PANI, b PANI-ZnO, c PANI-Bi2O3, and d PANI-Bi-ZnO with varying %RH

Table 1 The comparison of PANI-Bi-ZnO capacitive-type humidity sensor with literature

The stability and repeatability

The stability is considered the most basic factor for the effective humidity sensors [19]. The stability of the PANI-Bi-ZnO humidity sensor displayed in Fig. 11 was tested in air at room temperature for 30 days, and the response of capacitance was taken under consideration at different RH values [59]. The graph demonstrates that with a frequency of 100 Hz, the sensor’s capacitance presents impressive accuracy every 5 days across various levels of relative humidity, with a minimal difference of less than 2%. This suggests that the sensor possesses excellent stability. To further assess the stability of the PANI-Bi-ZnO humidity sensor, the sensors exhibit superior repeatability performances. Repeatability refers to the sensor’s ability to repeatedly produce the same results, along with maintaining a high degree of accuracy [60]. The repeatability of the sensor was evaluated for four devices under identical conditions. The standard deviation in the values of capacitance was compared at a frequency of 100 Hz and relative humidity levels of 10, 20, 40, 60, and 90%. The resulting data, as illustrated in Fig. 12, reported a variance of no more than 5% in all instances. These findings show the impressive capacitive humidity sensing abilities of the material, highlighting its exceptional long-term repeatability and robust stability at low frequencies.

Fig. 11
figure 11

The 30-day capacitive stability of PANI-Bi-ZnO composite relative to various % RH levels at 100 Hz

Fig. 12
figure 12

The experimental repeatability prepared sensor of PANI-Bi-ZnO fabricated under the same experimental procedure at various % RH and 100 Hz

Adsorption desorption study

The morphology of the fabricated sample, which contains moisture within the pores of the sensing material, is significantly linked to the level of hysteresis in the humidity sensing film [46]. The capacitance adsorption curves are observed as the RH levels rise from 10 to 90% RH. This is done to derive the hysteresis curve of the prepared sample, PANI-Bi-ZnO. During desorption, the %RH level seen gradually decreases. The removal of the adsorbed moisture from the active site of the synthesized sample, which might require a specific time for evaporation from the sensor material layer, leads the sensors to typically manifest a somewhat elevated capacitance value during the desorption cycle [47]. Figure 13 presents the capacitive hysteresis loop of the synthesized sensing composite, adjusted at a specific frequency of 100 Hz within the instrument. The partially overlapped capacitive curves during the adsorption and desorption stages demonstrate a sensing mechanism that is fundamentally dependent on the phenomena of water absorption and desorption [9]. Equation 6 calculates the humidity sensor maximum hysteresis H, which is 0.5% RH at 60% RH.

$$H = \frac{{C_{{{\text{D}}60 - }} C_{{{\text{A}}60 }} }}{S}\left( {\%\, {\text{RH}}} \right)$$
(6)

where, CD60 and CA60 are the capacitance values for the desorption and adsorption processes, respectively, measured at 60% relative humidity. Figure 13 demonstrates that the hysteresis rises first, reaches its peak value at 60% RH, and then falls as the RH is raised further. As a result, a precise minute variance in the hysteresis loop is seen, helping the suggested sample to demonstrate an adequate sensing performance [61, 62].

Fig. 13
figure 13

Capacitive hysteresis curves of PANI-Bi-ZnO

Conclusion

PANI and its composites were prepared via the inverse emulsion polymerization method as potential candidates for humidity sensing. The morphology and thermal stability of the prepared sensors were examined using FTIR, SEM, and TGA analysis. The fabricated PANI-Bi-ZnO sensor demonstrated a humidity sensing response that ranged from 10 to 90% RH. The sensor design revealed good linearity in the shift of capacitance at 100 Hz, likely resulting from the polarization achieved by the multilayer water molecules deposited. The strong sensing performance of the fabricated sensor suggests potential applications in multifunctional devices due to its ability to adsorb moisture content. An average of four multiple cycles, the PANI-Bi-ZnO, showed quick capacitive response/recovery times of 8 and 20 s at 100 Hz frequency, within the 10–90% RH humidity range. This study establishes an understanding of the relationship between composite material’s structural properties, polarization, and humidity capacitance performance at specific frequencies. The composite sensor showed increased stability during long-term repeated operation over 30 days. The composite demonstrates humidity sensing features with less hysteresis, high sensitivity, rapid response and recovery times, long-term stability, and reproducibility.