1 Introduction

Synthesizing spinel ferrite nanostructures with the structural formula MFe2O4 has emerged as a significant component of contemporary ceramic research [1], where M denotes a divalent metal ion like Co, Cu, Mg, Zn, Mn, and Ni. In the spinel structure, metals are present in tetrahedral and octahedral sites of the face-centered cubic lattice that contains O2− anions [2]. For a substance to be referred to as ferrite, Fe3+ must be present in the chemical formula [3]. Their uses range from simple functional devices such as tiny permanent magnets to complex electro-electronic devices, including catalysis [4], sensors [5, 6], hyperthermia [7], microwave devices [8], and pigments [9].

Spinel ferrites crystallize into a close-packed cubic structure of 32 oxygen anions, with a space group of \(Fd\bar 3m\). Metallic cations (24 in total; 8 in the A-sites and 16 in the B-sites) are partially occupied at the (A) and [B] interstitial sites [10]. The affinity of metal cations for both (A) and [B] sites, which is influenced by the ionic radii of the specification, the stabilization energy, the size of the interstices, the synthesis procedure, and the synthesis conditions, determines the distribution of metal cations at (A) and [B] sites. The physical and chemical characteristics of ferrite nanoparticles are significantly influenced by the cation distributions at tetrahedral and octahedral sites. Normal spinel ferrite contains Fe3+ ions in [B] sites and M ions in (A) sites. Inverse spinel ferrites have M cations in [B] sites and Fe3+ ions in (A) and [B] sites. In addition, there are other intermediate examples known as mixed spinel ferrites. To evaluate the cation distribution between the (A) and [B] sites, one can use the following generic formula, which is notated formally as (M(1−δ)2+ Feδ3+)A [Mδ2+ Fe(2−δ)3+]BO4, where δ is the inversion degree, which is the fraction of trivalent metal (Fe3+) or divalent metal (M2+) cations that occupy (A) or [B] sites, respectively. For inverse spinel δ = 1, such as bulk nickel ferrite (NiFe2O4), while for normal δ = 0, such as bulk zinc ferrite (ZnFe2O4) [10]. ZnFe2O4 is a normal spinel in its bulk form, with trivalent (Fe3+) ions occupying the octahedral sites and divalent (Zn2+) ions occupying the tetrahedral sites. Nevertheless, the ZnFe2O4 nanostructure exhibits a mixed spinel structure, with Zn2+ and Fe3+ distributed over (A) and [B] sites [11].

A lot of interest has been given to measuring humidity because of how important the concentration of water vapor is in several areas, such as industry, medicine, agriculture, and meteorology. Humidity sensors should have short response time, high sensitivity, and stability [12]. The most often used parameter to define humidity is relative humidity (RH), which is the ratio of actual to saturated vapor pressure at a specific temperature. The material’s efficiency to detect humidity is influenced by its microstructural characteristics, which are connected to the fabrication process [13].

This research work introduces, for the first time, the humidity sensing, sensitivity, and stability properties of two of the most interesting ceramic materials, NiFe2O4 and ZnFe2O4 nanoparticles. It provides a comprehensive analysis of the variations in dielectric properties with frequency, temperature, and humidity. Moreover, it compares the two samples in a wide range of physical properties, such as crystal structure, cation distribution, morphology, optical, magnetic, humidito-dielectric, and thermo-dielectric properties.

2 Experimental procedures

2.1 Sample preparation and characterization techniques

Nickel nitrate hexahydrate [Ni(NO3)2.6H2O], zinc nitrate hexahydrate [Zn(NO3)2.6H2O], iron nitrate nonahydrate [Fe(NO3)3.9H2O], and citric acid monohydrate [C6H8O7.H2O] were purchased from BIOCHEM Chemopharma. The reactant solutions were Milli-Q water. All the materials are used to synthesize the nickel ferrite and zinc ferrite nanoparticles via sol-gel auto-combustion. With the use of Milli-Q water, the metal nitrates were dissolved in their stoichiometry. Citric acid was added to the solution (the molar ratio of citric acid to the total metal nitrates of 2.2). After 10 min of sonication, the mixture is transferred to a hotplate and stirred. At 50 °C, ammonium hydroxide is added to bring the pH level of the solution up to 7. A viscous gel was generated by gradually evaporating the solution at a temperature of nearly 90 °C while continually stirring. Auto-combustion occurred when the viscous gel was transferred to an oven at 200 °C and a fluffy powder was created. The obtained powder was sonicated with ethanol for 30 min. The samples were annealed in air at 750 °C for 4 h at a heating rate of 10 °C/min [14].

The prepared samples’ X-ray diffraction (XRD) was measured using a Panalytical X’Pert Pro X-ray diffractometer with CuKα radiation. Morphological properties were obtained by utilizing field emission Scanning electron microscope (FESEM) ZEISS MODEL SIGMA VP and transmission electron microscope (TEM) ZEISS MODEL EM10C-100 KV. Energy dispersive spectroscopy (EDS) coupled to FESEM is used to determine the chemical composition. Using a Shimadzu UV-2550 ultraviolet diffuse reflectance spectrometer (UV-DRS), the optical properties were examined. The infrared spectra of nanopowders were recorded using a Fourier transform infrared spectrophotometer (FTIR) by Perkin Elmer-USA. The field dependence of magnetization was carried out in the vibrating sample magnetometer LBKFB Model-Meghnatis Daghigh Kavir Company. The annealed powders with a certain amount of ethanol were ground sonicated for 10 min. A tiny amount of polyvinyl alcohol was added to the powders, and the pellets were formed with a thickness of 1.45 mm for NFO and 1.00 mm for ZFO and a diameter of 13 mm by applying 4 tons of pressure hydraulic press. To ensure that all of the metal ions in the pellets diffused into the desired crystal lattice, they were sintered at 500 °C for 2 h at a heating rate of 10 °C/min. These pellets were used for studying frequency, humidity, and temperature dependence of dielectric properties as well as the humidity sensing properties using a Keysight E4980A/AL LCR-meter in the range of frequency up to 2 MHz.

2.2 Creation of humidity sensor and humidity sensing measurements

The electrical humidity sensing device is shown in Fig. 1. It includes an LCR-meter, an oven, saturated solution (K2SO4) from BIOCHEM Chemopharma (which offers ~97% RH [15]), humidity and temperature controller (ZFX-M452), and a closed chamber with a 5.5 liter capacity. Both sides of the pellets were covered in aluminum tape. The pellet was then inserted between two probes and connected to the LCR-meter with copper wires. In a container with a lid, 20 ml of deionized water was added to 120 gm of potassium sulfate and put in the closed chamber that was in the furnace at 35 °C. Over a period of over 1.5 h, the humidity in the chamber gradually rises to ~97% RH. The electrical resistances of NFO and ZFO sample pellets were examined at different RH readings between 30 and 90% in 5% steps.

Fig. 1
figure 1

Research apparatus for humidity sensing studies; (1) oven, (2) closed chamber, (3) saturated salt, (4) sample pellet, (5) humidity and temperature controller, and (6) LCR-meter

3 Results and discussion

3.1 Elemental characterization

The elemental and atomic compositions of the samples are revealed by the EDS pattern, which is depicted in Fig. 2 and listed in Table 1. The EDS findings show that the crystalline ferrite samples are fabricated in their as-synthesized state with no traces of additional elements within the limits of detection, which indicates that the experimental composition (%) of Ni, Fe, Zn, and O is in good agreement with the nominal composition. Moreover, the small amount of residual carbon left behind during combustion explains why there is a peak corresponding to carbon. In general, the combustion method yields high-quality stoichiometric ferrite samples.

Fig. 2
figure 2

EDS spectra of a NFO and b ZFO nanopowders

Table 1 EDS results for NFO and ZFO nanopowders

3.2 Structural characterization

Figure 3 displays the XRD patterns for both NiFe2O4 (NFO) and ZnFe2O4 (ZFO) nanopowders. The samples show the presence of (111), (220), (311), (222), (400), (422), (511), and (440) diffraction peaks in the scanning 2θ range from 10° to 70°. When the patterns were compared with the reference data for NFO (reference code 00-010-0325) and ZFO (reference code 00-022-1012), it was determined that the samples formed had a cubic spinel structure with \(Fd\bar 3m\) space group [16]. The secondary phase of the Fe2O3 impurity was verified with NFO [17] and is denoted by the asterisk (*). The appearance of Fe2O3 is considered to have been caused by thermal decomposition and oxidation during annealing [18]. At the annealing temperature of 750 °C for NFO, the surrounding local oxygen environment dominates the pressure of the inner oxygen environment of the sample, leading to oxidation and decomposition of the ferrite phase and the formation of the hematite phase. However, at that annealing temperature, the pressure of the inner oxygen environment of ZFO may be enough to prevent the decomposition of the ferrite phase into the secondary phases [19].

Fig. 3
figure 3

XRD patterns of NFO and ZFO samples

The most intense peak (311) plane was used to compute the crystallite size using Scherrer’s equation (i.e., D = 0.9λ/(β cosθ), where θ is the diffraction angle, λ is the wavelength of the X-ray radiation, and β is the full width at half maximum) [20]. The crystallite sizes were found to be (32.3 nm) and (38.9 nm) for NFO and ZFO, respectively. This demonstrates the nanocrystalline structure of the prepared sample powders.

The lattice constants (a), X-ray density (ρx), porosity (%P), specific surface area (S), and lattice strain (ε) of spinel ferrite nanopowders can be determined by applying the following relationships [21,22,23], and the outcomes are listed in Table 2:

$$a = d_{hkl}\sqrt {h^2 + k^2 + l^2}$$
(1)
$$\rho _x = \frac{{8M}}{{Na^3}}$$
(2)
$${{{\mathrm{\% }}}}P = \left( {1 - \frac{{\rho _b}}{{\rho _x}}} \right) \times 100$$
(3)
$$S = \frac{6}{{D}\,.\,{\rho _x}}$$
(4)
$$\varepsilon = \frac{\beta }{{tan\theta }}$$
(5)

where dhkl is inter-planer distance, (hkl) are miller indices, N is Avogadro’s number, M is the molar mass of the sample, ρb is the bulk density, ρx is the calculated density, 8 is the number of molecules per unit cell, and β is the full width at half maximum.

Table 2 Lattice parameter (a), crystallite size (D), specific surface area (S), lattice strain (ε), and X-ray density (ρx), and porosity (%P) of NFO and ZFO nanopowders

The ZFO sample’s lattice parameter values were larger than those of the NFO sample, which is consistent with the decreasing 2θ values of the diffraction peak as shown in Fig. 3. The difference in ionic radii of the Ni2+ at octahedral or tetrahedral sites explains this behavior [2].

The Highscore program was used to perform Rietveld analysis on the XRD pattern. The pseudo-Voigt function diffraction profile was used in this analysis and the goodness of fit (χ2) value was used to confirm the quality of the fitting. The Rietveld fitted XRD patterns for NFO and ZFO samples are shown in Fig. 4. The figure depicts the experimental data as open circles, while the computed intensities are shown by a black solid line. The discrepancy between observed and estimated intensities is represented by the blue line at the bottom of the graph. The Bragg locations are seen by vertical lines.

Fig. 4
figure 4

The Rietveld refinements of NFO and ZFO samples

Initially, the parameters like 2θ–zero and background were refined. To determine the accuracy of the experimental data fitting, the following distribution formulae were used for determining the reliability factors Rwp, Rexp, and goodness of fit χ2 [24] and the results are tabulated in Table 3. Refinements were made until the goodness of fit corresponded to near unity.

$$R_{wp} = 100\left[ {\frac{{\mathop {\sum }\nolimits_{i = 1,n} w_i\left| {y_i - y_{c,i}} \right|^2}}{{\mathop {\sum }\nolimits_{i = 1,n} w_iy_i^2}}} \right]^{1/2}$$
(6)
$$R_{exp} = 100\left[ {\frac{{N - P}}{{\mathop {\sum }\nolimits_i w_iy_i^2}}} \right]^{1/2}$$
(7)
$$\chi = \frac{{R_{wp}}}{{R_{exp}}}$$
(8)

where yi is the observed intensity, yc,i is the calculated profile intensity, wi is a perfect weight, and N-P is the number of degrees of freedom.

Table 3 Rietveld refinement parameters [profile factor (Rp), weighted residual factor (Rwp), expected residual factor (Rexp), and goodness of fit] of NFO and ZFO

3.3 Morphological characterization

The morphology of the NFO and ZFO samples was investigated by FESEM as shown in Fig. 5a, b. The FESEM image of ZFO revealed more crystalline, greater average grain size, and high porosity when compared with NFO. The average grain size was 42.71 nm for NFO and 84.36 nm for ZFO. The detailed morphology and structure of the NFO and ZFO were further investigated by TEM as shown in Fig. 5c, d, respectively. It is clear that the samples have a mixed minor cubic and major spherical morphology.

Fig. 5
figure 5

FESEM images [of (a) NFO and (b) ZFO] and TEM micrographs [of (c) NFO and (d) ZFO]. The insets were normal Gaussian grain size distribution

3.4 Vibrational characterization

FTIR spectroscopy is used to characterize both organic and inorganic evidence. The samples are hit with infrared radiation, which causes the frequency of the infrared radiation to match the natural frequency of the bond. This causes the amplitude of the vibration to go up, and the infrared can be seen. Figure 6 shows the FTIR spectra of the as-synthesized NFO and ZFO samples. In the spectra, the peaks around (3441, 3437), (2855, 2926), and (1621, 1619) cm−1 are related to O–H, C–H, and C=C groups, respectively [25, 26]. The fingerprint band between 1000 and 400 cm−1 in the ferrite samples confirmed the presence of transition metals [27].

Fig. 6
figure 6

FTIR spectra of NFO and ZFO

The FTIR spectra of spinel ferrites illustrate two primary wide bands of metal oxygen. Tetrahedral and octahedral bands in the 400–600 cm–1 wavenumber range demonstrated in the figure indicate spinel phase development of ferrites. The metal oxygen ion stretching vibrations at tetrahedral voids caused the high frequency band (ν1) to develop at (546–583 cm−1). The low frequency band (ν2) caused by metal oxygen stretching vibrations in octahedral voids [28,29,30] does not appear because of the limitations of the instrument.

3.5 Optical properties

The optical properties of the produced NFO and ZFO samples were analyzed by using UV-Vis diffuse reflectance spectroscopy. Better knowledge of the characteristics of semiconductor materials is made possible by using this method to evaluate important factors, including band gaps. The band gap energy (Eg) of the samples can be determined from UV-Vis reflectance measurements using the Kubelka–Munk technique [31]:

$$F\left( R \right) = \frac{{\left( {1 - R} \right)^2}}{{2R}}$$
(9)

where F(R) is the absorbance, and R represents the reflectance.

The absorption coefficient, α, may be expressed as follows:

$$\alpha = \frac{{A\left( {hv - E_g} \right)^n}}{{hv}}$$
(10)

where Eg is the optical energy band gap, is the incident photon energy, and A is an absorption constant that depends on the material. The value of n depends on the kind of transition. For direct and indirect allowed transitions, n is 1/2 and 2, respectively. By combining Eqs. (9) and (10), one can obtain:

$$\left[ {F\left( R \right)hv} \right]^n \propto hv - E_g$$
(11)

Values of Eg are obtained by extrapolating the linear part of the [F(R)]n ×  plot to the photon energy axis. This is known as the Tauc method [32]. The UV-Vis absorption spectra of the as-synthesized samples, measured in the wavelength range of 200–800 nm, are illustrated in Fig. 7.

Fig. 7
figure 7

Diffuse reflectance spectra of NFO and ZFO

Direct and indirect band gap values calculated using Tauc plots are depicted in Fig. 8a, b, respectively. The direct energy gap values are 2.0 eV for NFO and 2.14 eV for ZFO. In addition, the indirect band gap values are (2.15 and 2.25 eV) for NFO and ZFO, respectively.

Fig. 8
figure 8

a Direct and b indirect band gaps determination for NFO and ZFO

3.6 Magnetic properties

Magnetic properties of nanoparticles like saturation magnetization (Ms), coercive field (Hc), and remanent magnetization (Mr) are influenced by cationic distribution, density, and surface area. Furthermore, the sample preparation procedure has a significant impact on the strength of interactions between nanoparticles [2]. The magnetic moments per formula unit were calculated by the relation [33]:

$$n_B = \frac{{M_wM_s}}{{5585}}$$
(12)

where Mw is the molecular weight of the samples.

The net magnetization of a unit cell is considered to be proportional to the difference in magnetic moments between the (A) and [B] sites. The magnetic moment per formula unit is calculated using Neel’s collinear model and is obtained by [33]:

$$n_B\left( x \right) = M_B\left( x \right) - M_A\left( x \right)$$
(13)

where MA(x) and MB(x) are the sublattice magnetic moments for the(A) and [B] sites, respectively.

The different magnetic behavior of ferrite in its nanoscale can be explained by the sublattice interactions. Ferrites have two distinct interstitial sites, and the ion migration and interaction in these lattice points play a significant role in determining the properties of these materials. Differences in magnetization between the colinear (A) site and the antiparallel [B] site produce magnetism in spinel ferrites [34].

Figure 9 displays hysteresis loops for NFO and ZFO samples that were obtained at room temperature, and Table 4 lists the relevant magnetic parameters. It can be noted that the samples exhibited typical ferromagnetic behavior. However, the ZFO sample is predominantly paramagnetic at room temperature. The Ms values were 42.4 emu/g and 2.3 emu/g at 14 kOe for NFO and ZFO, respectively.

Fig. 9
figure 9

Hysteresis loops for NFO and ZFO nanoparticles at room temperature

Table 4 The saturation magnetization (Ms), remanent magnetization (Mr), loop squareness (Mr/Ms), coercivity (Hc), and magneton number (nB) for NFO and ZFO nanoparticles

By adding the desired divalent metal ion (M2+), it is possible to change the saturation magnetization of MFe2O4 systems. Fe3+ ions have a magnetic moment of ~5.9 μB due to their five unpaired electrons, while Ni2+ ions have a magnetic moment of ~2.8 μB due to their two unpaired electrons. However, the magnetic moments of the Zn2+ ion are zero since it has no unpaired electrons. Due to the inverse spinel structure of NiFe2O4, the nickel ferrite’s total magnetic moments can be attributed to both the Fe3+ and Ni2+ ions, which are situated at antiferromagnetically coupled sublattices (A and B sites). Because Zn2+ ions prefer tetrahedral sites, the normal spinel structure of ZFO samples demands that all Fe3+ ions occupy octahedral sites. Therefore, the Fe3+ ions in the octahedral sublattice are surrounded by nonmagnetic ions in the tetrahedral sublattices, yielding a paramagnetic doublet. In ZFO samples the preference of Zn2+ ions to occupy tetrahedral sites requires all Fe3+ ions to occupy octahedral sites in a normal spinel structure. Thus, the Fe3+ ions in the octahedral sublattice is surrounded by nonmagnetic ions in the tetrahedral sublattices, forming a paramagnetic doublet [2]. Moreover, the crystallinity and particle size have a significant influence on the difference between the magnetic saturation of NFO and ZFO [34].

3.7 Dielectric properties

The frequency dependence of dielectric measurements was estimated at an ambient temperature of 1 kHz–2 MHz. Thermo-dielectric properties at a frequency of 1 MHz and temperatures of 75–500 °C in steps of 25 °C were examined. In addition, the humidito-dielectric properties were examined at 35 °C, a frequency of 1 MHz, and a RH range of 30–90%. The following formulas were used to get the dielectric constant (ε′) and dielectric loss tangent (tanδ) [35]:

$$\varepsilon ^\prime = \frac{{C_pd}}{{\varepsilon _oA}}$$
(14)
$$tan\delta = \frac{{\varepsilon ^{\prime\prime }}}{{\varepsilon ^\prime }}$$
(15)

where Cp is the parallel capacitance, A is the cross-section area, d is the sample’s thickness, εo is the free space permittivity, and ε′′ is the imaginary part of the permittivity.

The frequency, temperature, and humidity-dependence of ε′ and tanδ for NFO and ZFO are shown in Fig. 10. The ɛ′ values were observed to decrease with increasing frequency as a typical dielectric characteristic [36]. This reduction was fast at lower frequencies but more gradual at higher frequencies as shown in Fig. 10a and the values of ɛ′ for NFO are larger than that of ZFO. It was supposed that the dielectric structure would have two layers. The highly conductive grains are separated from one another by comparatively weak conductive materials known as grain boundaries. Interfacial polarization occurs as a result of the electric field induced by the localized accumulation of charges. At higher frequencies, the interfacial polarization’s contribution to the dielectric constant is reduced as a result of the electron exchange between (Fe2+) and (Fe3+) being incapable of keeping up with the alternating field [30]. Consequently, the ɛ′ is decreased.

Fig. 10
figure 10

The dielectric constant (ε′) and dielectric loss tangent (tanδ) for NFO and ZFO nanoferrites as a function of (a) the frequency of the applied field, (b) the temperature, and (c) the relative humidity

Figure 10b shows how the dielectric constant initially increases with temperature but then decreases above the Curie temperature (for NFO). Increasing temperature raises polarization due to an increase in thermal energy [37, 38]. The mobility of the charge carriers is increased by raising the temperature, which is sufficient for the dipoles to align themselves in the direction of the applied field [39]. This leads to an increase in ε′. Figure 10c shows that the ε′ is moisture dependent. Both NFO and ZFO nanoferrites had an increase in ε′ value with increasing RH, but the increases for NFO were more pronounced.

This characteristic is mostly attributable to the creation of a continuous layer of chemisorbed water molecules. Capillary condensation causes a layer of physisorbed water at the interface between the sample and the electrode. With higher RH, there are more protons (H+ ions). More H+ would be attracted to the sample surfaces and electrode interfaces, the orientation in polarization would appear to be much more straightforward, and the εʹ would rise [40].

Figure 10 reveals that the dielectric loss (tanδ) is entirely frequency, temperature, and humidity dependent. The dielectric loss tangent represents the energy lost in the dielectric; it has similar behavior with the dielectric constant; decreases with increasing frequency and increases with both temperature and RH. As shown in Fig. 10a, dielectric loss decreases with frequency. According to the Koops hypothesis, more energy is required to move electrons between Fe2+↔Fe3+ ions at low frequencies when less conductive grain boundaries are active. As a result, there are numerous dielectric losses. Since the grains are more active and require more energy to transfer, there is less dielectric loss at high frequencies [41]. Figure 10b demonstrates that the dielectric loss is lowest at lower temperatures and increases as the temperature rises. Increased lattice vibrations and the production of certain phonons, which interact with the charge carriers to cause electron phonon scattering, are thought to be the causes of the increase in dielectric loss with temperature [42]. This causes the resistivity of the samples to decrease with temperature, followed by an increase in the loss tangent. According to Fig. 10c, the tanδ values rise as the RH rises. As with the variation in dielectric constant with humidity, this is because of the action of water molecules on the samples’ grains and pores [40].

Figure 11 shows the frequency, temperature, and humidity-dependence of AC conductivity (σAC) for NFO and ZFO nanoferrites resulting from dielectric characteristics [43]:

$$\sigma _{AC} = \varepsilon ^\prime \varepsilon _o\omega tan\delta$$
(16)

where ω = 2πf and f is the frequency of the applied AC field. It is completely obvious that the dielectric polarization process and the ferrite conduction process are identical. Figure 11(a) shows an increase in the AC conductivity with frequency. Low frequency AC conductivity plots are linear, indicating that tiny polarons are what is responsible for the conduction. At higher frequencies, the contributions from hopping infinite clusters dominate transport, then the conductivity improves significantly [43].

Fig. 11
figure 11

AC conductivity (σAC) for NFO and ZFO nanoferrites as a function of (a) the frequency of the applied field, (b) the temperature, and (c) the relative humidity

Figure 11b illustrates the results of the study of the sample’s temperature-dependent AC conductivity at a frequency of 1 MHz. It is a general property of all ferrites that the conductivity rises with temperature, showing three different slopes in various temperature ranges depending on the change in the conduction mechanism. The conduction process in ferrites is caused by the exchange of electrons between the divalent Fe2+ and trivalent Fe3+ ions. The impurities found in the samples are responsible for the temperature-dependent AC conductivity at low temperatures (<250 °C). In the temperature range from 250 to 375 °C, the hopping between small polarons (single ionized oxygen vacancies) may be responsible for the AC conductivity, while in the third region (>375 °C), AC conductivity may be due to magnetic disordering [42]. Figure 11c displays the AC conductivity variation with RH at a fixed frequency (1 MHz). With increasing RH, AC conductivity increases. Water molecules that have been absorbed contribute to electrical conductivity. The electrical conductivity is enhanced by water molecules that have been absorbed. On the surface of ferrite, water adsorption and proton conduction significantly influence the conduction mechanism. Hydrogen ions are split off from water molecules during adsorption, and they combine with lattice Fe ions to create hydroxyl groups. This causes free electrons to be released, which helps the conduction process [44].

3.8 Humidity sensing properties

At a temperature of 35\(\mp\)1 °C, the resistance was measured as a function of RH. Figure 12 shows the change in the samples resistance with RH, sensitivity of the two samples, and stability of the sensitive samples after 3 months. The plots of resistance versus RH% at frequency of 1 MHz for NFO and ZFO nanoparticles are illustrated in Fig. 12a. The electrical resistances for the samples reduce with rising RH throughout all RH values. The fall in resistance is mainly due to the increased electronic conduction or charge carriers upon adsorption of water vapor by the surface layer [13]. The figure shows that the resistance of NFO varies very little as a function of RH, whereas the resistance of ZFO has dramatically increased in the range of 30–90% RH, rising from 0.053 MΩ to 1.14 MΩ. The total resistance decreases (or conductivity increases) by 4 and 22 times in the humidity range of 30–90% of RH for NFO and ZFO, respectively. Because zinc ferrite has a higher porosity and hence the easiest chemisorption and physisorption of water vapor, the resistance is found to be decreasing at the fastest rate. The porosity, as evidenced by XRD calculation and FESEM images, verified the existence of additional sites for water to adsorb. Consequently, additional charge carriers for electrical conduction may be generated.

Fig. 12
figure 12

Sensing characteristic curves for NFO and ZFO nanoparticles: a change of the samples as a function of resistance b the sensitivity of the samples; c the stability of the samples after three months

The adsorption and capillary condensation of water produce resistance variations in porous oxides as humidity levels rise. Chemisorption occurs at low humidity levels, resulting in the creation of two surface hydroxyls and charge transmission via the hopping process. Water is physisorbed on top of the chemisorbed layer when the RH is high. Water molecules that are present at low humidity chemisorb on the ceramic’s grain surfaces to create hydroxyl groups, which act as surface charge carriers. Following the initial round of adsorption, H3O will be the primary charge carrier on the surface since each water molecule will be hydrogen-bonded to two hydroxyl groups. Adsorption of more water causes the molecules of water to cluster together, creating a film of hydrogen-bonded water molecules attached to hydroxyl groups in a liquid-like multilayer structure. In environments with high RH, H is the predominant charge carrier because of the dissociation of H3O into H2O, and H is energetically favorable in liquid water.

The humidity sensitivity (SH) was calculated using the equation [45]:

$$S_H = \frac{{\left| {R_{LH} - R_H} \right|}}{{R_{LH}}} \times 100{{{\mathrm{\% }}}}$$
(17)

where RLH and RH are the resistance of the sample at lower humidity and higher humidity, respectively.

The humidity sensor’s sensitivity has been examined by decreasing the resistance from the lowest to the maximum RH at a frequency of 1 MHz. Figure 12b depicts the results acquired through calculations using Eq. (17). As seen in the Figure, ZFO has high humidity sensitivity than that of NFO. The sensitivity is higher for ZFO despite possessing the larger crystallite size, lower surface area and porosity as shown in the XRD results (Table 2). The inverse relation between the lattice strain and sensitivity has been proposed in the literature [46]. The higher sensitivity of ZFO can be attributed to its ordered structure, enhanced crystallinity, greater stability and reduced lattice strain [44].

Aging effect or the stability of the samples was monitored by measuring the change in resistance with RH after 3 months. The plot of resistance versus RH% for NFO and ZFO is seen in Fig. 12c. A small variation was found indicating good stability of the samples. The obtained results prove that the sensing material is stable over the time and reproducibility of the entire samples humidity sensor.

4 Conclusions

Nickel and zinc spinel ferrite nanoparticles were successfully produced by the sol-gel auto-combustion method. The cubic spinel structure was proven by XRD. The lattice parameter, crystallite size, and porosity of ZnFe2O4 were greater than those of NiFe2O4. The presence of metal oxygen bonds was clearly demonstrated by FTIR analysis, supporting the existence of the spinel structure. The M–H loops indicate ferromagnetic and paramagnetic behavior of NFO and ZFO, respectively, with the hysteresis loop having small saturation magnetization. The humidity sensors were successfully fabricated from the synthesized samples. At different frequencies, temperatures, and RH, NFO has higher dielectric permittivity, dielectric loss tangent, and AC conductivity than ZFO. The sensitivity of ZFO nanoparticles to humidity is greater than that of NFO nanoparticles, and both have good stability after 3 months.