1 Introduction

Gas sensing devices are needed in numerous fields like automobile, medical, agricultural, environmental protection, home safety, etc. Due to pollution, the health of many people is poor. Conserving the environment would undoubtedly reduce many diseases [1]. Formaldehyde is a common indoor environmental pollutant [2]. Many anthropogenic manufacturing activities and chemical productions can result in formaldehyde release.

Normally, thermal and chemical decomposition of construction materials or pesticide residue results in the release of HCHO [3]. It is a chemical that is colorless, combustible, and pungent. It is used in construction materials, as a disinfectant, fungicide, and germicide in industry, as well as a preservative in morgues and medical labs [4]. At room temperature, it readily turns into a gas, making it a member of the wider class of chemicals known as volatile organic compounds (VOCs) [5].

Even at low quantities, formaldehyde (HCHO) can irritate someone's eyes, nose, throat, and lungs as well as set off an asthma attack. Prolonged exposure to formaldehyde has the risk of cancer. Some people may experience negative symptoms like watery eyes, burning sensations in the eyes, nose, and throat, coughing, wheezing, nausea, and skin irritation when formaldehyde is present in the air at levels above 0.1 ppm. When exposed to the same dose of formaldehyde, some people react severely while others are not affected. Fewer people know about the long-term health implications of formaldehyde exposure, despite the fact that the short-term health impacts are well established [6, 7].

As a result, formaldehyde detection and monitoring have become increasingly popular [8]. Due to their superior sensing capabilities, numerous methods, including gas chromatography, polarography, fluorometry, and spectrophotometry, have been used to detect HCHO. These techniques are constrained by their expensive equipment and time-consuming operation [9]. As an alternative, semiconductor-based gas sensors have been proved as an efficient real-time method for HCHO detection. So far, various metal oxides, such as SnO2 [10,11,12], CuO [13,14,15], In2O3 [16, 17], TiO2 [18], WO3 [19], and ZnO [20,21,22] due to its intrinsic benefits that include low production cost, superior thermal stability, high responsiveness, and ease of creating nanostructures, have been employed to detect formaldehyde.

Ag-ZnO/In2O3 was used to generate response values of around 186 toward 100 ppm of formaldehyde at 260 °C [23]. The In2O31%Co nanorods responded to 10 ppm of HCHO with a response of 23.2, which was 4.5 times more than that of pure In2O3 nanorods at 130 °C, according to the results and also outstanding selectivity [16]. The findings show that the as-prepared In2O3/ZnO (IZO) nanocomposites samples of 3 wt% Ag-functionalized In2O3 demonstrate strong responsiveness of about 842.9 towards 2000 ppm HCHO at operating temperature of 300 °C [24]. Hollow In2O3@TiO2 double-layer nanospheres were prepared for chemiresistive-based sensor to formaldehyde gas under UV light activation at room temperature. The response value was about 3.8, and the response time and recovery time are 28 and 50 s, respectively [25]. Nanocomposite consists of SnO2 and LaFeO3 loaded atomic silver showed the response value of 498 at 140 °C to the 10 ppm of formaldehyde [26].

The experimental results demonstrate that the sensor built on the Ag–LaFeO3 sample exhibits outstanding formaldehyde gas-sensing characteristics. At 260 °C operational temperature, the response to 5 ppm formaldehyde is 4.8, and the sensors have good selectivity. [27]. The 3 wt% Ga-doped SnO2 sensor is 4.5 times more sensitive to formaldehyde at 230 °C than the pure sensor (21.2/50 ppm), and has a lower detection limit (3.0/0.1 ppm) than the pure SnO2 sensor [28].

However, to attain response qualities, these sensors either need to operate at elevated temperatures or take a long time to return to their initial states. As a result, a cost-effective portable device with good sensitive and selective capabilities, an optimal gas detecting device operating at room temperature is required [29]. However, creating formaldehyde sensors that operate well at ambient temperature is still difficult. From review of literature very little work has been done on the ternary nanocomposite for formaldehyde detection. In the current work, a novel sensor based on ZnO-doped SnO2–TiO2 nanocomposite was fabricated. Then, the film is exposed to various gases to investigate the selectivity.

2 Experimental procedure

2.1 Synthesis procedure of STZ1, STZ2, STZ3 nanostructures

Stannic chloride (SnCl4.5H2O), zinc nitrate (ZnNo3), titanium isopropoxide (C12H28O4Ti), ethanol and deionized water were purchased from the company sigma Aldrich and used as such. 4 mmol of stannic chloride and 1 mmol of titanium isopropoxide were placed in three conical flasks, and then one mmol, two mmol, and three mmol of zinc nitrate were added to each flask, correspondingly, and stirred for 120 min. The samples were successively placed in Teflon-lined autoclaves, sealed, and kept at 120 °C for 6 h. After that, final sample is placed in a tubular furnace kept at 700 °C for 3 h. The resulting STZ1, STZ2, and STZ3 samples were washed, filtered and dried in a hotter oven for 6 h at 80 °C.

2.2 Fabrication process

The following is the process for making a thick film gas sensor: In order to create a thick film,

(i) The nanocomposite sensor material was first combined with ethanol to create slurry.

(ii) This slurry was then coated on a glass substrate with a thickness of 1 mm by 1 mm by 1 mm using the doctor blade method.

(iii) To remove the ethanol, the glass substrates were dried in an oven at 100 °C for 2 h.

2.3 Materials characterization

The X' Pert-PRO X-ray diffractometer recorded the diffraction pattern using Cu Kα radiation operated at a scan rate of 2° (deg) over the range of 20°-80° at room temperature. The Perkin Elmer Fourier transform infrared spectrometer was used to identify the presence of a functional group of nanostructures with a wavelength between 400 and 4000 cm−1. UV-DRS spectroscopy was utilized to investigate optical characteristics (ShimadzuUV1700). A scanning electron microscope (SEM) (JEOL-JSM-5610 LV with INCA EDS) was used in conjunction with EDS to examine the morphology of the produced product. XPS was examined using a K-Alpha X-ray Photoemission Spectrometer from Thermo Scientific. Gas sensing setup instrument was used to examine the sensitivity, selectivity, responsiveness, and recovery times of Formaldehyde.

2.4 Gas measurement setup

The chemicals utilized for the gas-sensing investigations were bought from Merck in India and vaporized using a high temperature ash vaporizer. The prepared thick films were characterized using a solenoid-controlled gas/vapor input and outflow valve system in a 6 L airtight chamber. Silver paste was applied to the edges of the 10 mm × 10 mm film to guarantee ohmic contact between the samples and probes. The film was then placed on the sample stage.

A ceramic resistive heater linked to the sample stage maintained the sensor's operating temperature, which was tracked and managed by a PID temperature controller (Selec PID-500-2-0-04, India). The operating temperature of the sensor for the gas-sensing studies was maintained at room temperature.

A Keithley 2450 interactive digital source measure unit was used to source voltage and measure the current to measure the resistance of the sensor element in every 0.5 s. A computer running a Lab VIEW- developed GUI was used to control the entire sensing setup. Figure 1 depicts the schematic of the gas/vapor sensor setup created for the current study. The concentration of the testing gas injected was calculated using relation

$${C_{\rm ppm }} = \frac{ \delta \times V \times R \times T}{{ M \times Pb \times Vb}} \times {1}0^{{6}}$$
(1)

where δ is the density of testing gas (in g ml−1), V is the volume of the injected test gas (in µl), R is the universal gas constant (8.415 J mol−1 K−1), T is the sensor temperature (in K), M is the molecular weight of the testing gas (in g mol−1), Pb is the chamber pressure, and Vb is the volume of the chamber (in liters).

Fig. 1
figure 1

Schematic diagram of gas-sensing setup with air tight Chamber

3 Results and discussion

3.1 Structural analysis (XRD)

The XRD patterns of the SnO2–TiO2: ZnO nanostructure is depicted in Fig. 2. The diffraction peaks, which are located at 26.6, 37.9, 53.8, 57.7, and 61.9, can be indexed as 2θ values. The (110), (020), (220), (002), (002) and (130) planes of tetragonal SnO2 are responsible for these peaks (JCPDS card No: 10-7228). The (011), (020) and (022) planes of TiO2's anatase structure are responsible for the diffraction peaks at 25.3, 48.05, and 51.7 (JCPDS card No: 10–6856). The sample's diffraction peak at 33.9 corresponds to the plane of cubic crystalline ZnO at (111). (JCPDS Card No: 09-0934).

Fig. 2
figure 2

XRD patterns STZ1, STZ2, STZ3 Nanostructures

SnO2 becomes more intense as ZnO dopant concentration raises. The final result is definitely very crystalline in nature, as seen by the amplified sharp peaks. Crystallinity and material inherent resistance are inversely correlated, and when resistance values fall, electron transport improves, leading to good sensing properties [30]. Peak intensities are quite low since there is less TiO2 and ZnO in the sample. Furthermore, no additional impurity-related peaks are observed, indicating that pure SnO2–TiO2: ZnO has been produced. The crystallite size was estimated from the basic Scherrer equation [31],

$$D = \frac{K\lambda }{{\beta \cos \theta }}$$
(2)

where D is the average crystallite size, λ is the X-ray wavelength, β is the Bragg angle, and K is the so-called Scherer constant. K is influenced by the size distribution, diffraction line indices, and the definition of that is actually employed, whether it be FWHM or integral breadth [32]. K can have values anywhere from 0.62 and 2.08. In this paper, K = 0.9 was used. In this work, the calculated values of D represent estimates. The average crystallite size of the STZ1, STZ2 and STZ3 samples estimated are 20 nm, 24 nm and 45 nm, respectively.

3.2 Structural analysis (FTIR)

FTIR measurements in the 400–4000 cm−1 range were made for synthesized nanocomposite STZ1, STZ2, STZ3 to identified various functional group. FTIR spectra of prepared nanocomposite were presented in Fig. 3. The existence of several IR bending modes for particles suggests that hybrid nanocomposite have homogeneous particle formation. Broad band were seen at about 3400 cm−1 and 1630 cm−1, According to the O–H stretching frequency from the surface hydroxyl groups,. The widespread absorption in the 400–850 nm range is consistent with the normal Ti–O–Ti cm–1 bonding. Presence of alkene bond C=C in NC causes the sharp band absorption at 1384 cm−1. The sharp peak at 1114 cm−1 indicates C–O bonding.

Fig. 3
figure 3

FTIR Spectra of STZ1,STZ2,STZ3 nanostructures

3.3 Absorption study (UV-DRS)

The absorption and transmittance wavelength and optical band gap energy of STZ1, STZ2 and STZ3 were determined using UV-DRS spectral analysis. All the samples exhibit good optical quality in the visible region around 261 nm as shown in Fig. 4a, the absorbance curve increased sharply at 261 nm and reached a plateau as the wavelength increased. Hence, these nanocomposites are good catalyst in visible region of electromagnetic spectrum. In Fig. 4b, it has been shown that the transmittance decreases with wavelength before drastically slowing down at higher wavelength.

Fig. 4
figure 4

UV-DRS a Absorbance curves, b Transmittance Curves and c Kubelka–Munk function of STZ1, STZ2, and STZ3

The Eg can be calculated by the Kubelka–Munk function [12].

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

where F(R) is the Kubelka–Munk function, which corresponds to absorbance and R is reflectance of the samples. To determine the optical energy band gap value, extrapolated the linear portion of (F(R) × hν)1/2 versus hν and photon energy and is shown in Fig. 4c. For STZ, STZ2 and STZ3, the gap between the full and empty valence bands is 3.77, 3.82 and 4 eV, respectively. The band gap values of nanocomposites are nearly equal to the value of ZnO at room temperature which confirms the presence of ZnO in composites.

3.4 Morphological analysis (SEM/EDS)

Figure 5 depicts the surface morphology of the finished goods (a–c). As shown in Fig. 5a, it was discovered that the structures in STZ1 were notably tiny, spherical in shape, and included a hollow flower like structure identified by arrow mark. Due to the dopant material being absorbed into the base material, grain size increased as Zn dopant concentration increased, which may have affected the nucleation locations of the composites. The change in nanocrystallite morphology and size may be caused by the fact that ions in NC have more energy. These highly energetic ions are capable of adjusting their bond direction and length to obtain the best bonding to adjacent atoms, promoting vigorous nucleation that results in larger nanocrystallites. As illustrated in Fig. 5, the elemental composition of the produced nanostructures was examined using energy dispersive spectroscopy (EDS) (e, f and g). The existence of Sn, Zn, O, and Ti was confirmed by the EDS spectra as being well matched.

Fig. 5
figure 5

SEM image of a STZ1, b STZ2, c STZ3 nanostructures and eg are corresponding EDS

3.5 XPS analysis

The XPS core level spectra of Sn 3d, Ti 2p, Zn 2p, O 1 s and C 1 s for the STZ2 nanocomposites are shown in Fig. 6a–f. To have further knowledge about the energy level position of the elements, the core level spectra for Sn, Ti, Zn, O and C were deconvoluted. The survey spectrum depicted in Fig. 6a demonstrates that the STZ2 sample contains the elements Sn, Ti, Zn, O, and C.

Fig. 6
figure 6

X-ray Photoemission Spectrum of STZ2 nanocomposite a survey spectrum, b Sn 3d region, c Ti 2p region, d Zn 2p region, e O 1sregion and f C 1 s region

Two significant peaks in the Sn 3d spectrum are attributed to Sn3d5/2 and Sn3d3/2, and they are located at approximately 486.8 eV and 494.5 eV (Fig. 6b), indicating that there may be contact and electron transformation between SnO2 and TiO2/ZnO [33]. As showed in Fig. 6c Ti2p spectra can be attributed to Ti 2p3/2 and Ti 2p1/2, which have been centered at binding energies of 459.2 eV and 464.9 eV, respectively. The separation of the binding energies was ~ 5.7 eV, suggesting that the nanocomposite consists of Ti4 + element[34].Fig. 6d shows the XPS spectra of Zn-2p core level areas. In the region of 1022 and 1045 eV (vertical reference lines), which correspond to the Zn-2p3/2 and 2p1/2 core levels, Zn 2p3/2 XPS peaks are distinct. Thus, it is confirmed that Zn element is present on sample surfaces mostly in the form of Zn2 + [35].

According to Fig. 6e, the C 1 s signal has been split into two peaks with centers at 285.0 eV and 285.9 eV, indicating the presence of a (C=O) bond in the sample [36]. A metal oxide composite consists of different types of oxygen species like lattice oxygen and deficiency or vacant oxygen. The deconvoluted spectra of O1s as showed in Fig. 6f, peaks centered at 530.8 eV and 531.8 eV correspond to lattice oxygen (OL) and oxygen deficiency (OV) regions, respectively [37]. Generally, oxygen vacancy defect is a loss of oxygen atom from their respective position in the crystal lattice and mainly exist both in the bulk and on the surface or subsurface of the nanomaterial. In STZ2, the atomic percentage of lattice oxygen (OL) and oxygen deficiency (OV) is 6.6 and 46.5.The more number of oxygen deficiency confirms the oxygen defects on the surface.

The oxygen species, such as O2 or O ions, that are present in the matrix of the SnO2–TiO2:ZnO nanocomposite could be the cause of the peaks. According to Liu and colleagues, XPS is a surface characterization method that can identify species at shallow depths [38]. As a result, it is clear from the study of the preceding data that ZnO and SnO2–TiO2 have been successfully incorporated.

4 Gas sensing studies

4.1 Selectivity.

Selectivity is the potential of sensor to find a specific gas. The gas-sensing tests were conducted at room temperature with 18% of RH in the presence of various gas vapors, including Ethanol (C2H5OH), Acetone (CH3COCH3), Toluene (C6H5CH3), Formaldehyde (HCHO), and Trichloroethylene (C2HCl3) with 100 ppm concentrations, in order to determine the selectivity of gas for ZnO/SnO2–TiO2 nanocomposite films. It has been found that the STZ2 film is highly selective to Formaldehyde when compared with STZ1 and STZ3 as showed in Fig. 7.

Fig. 7
figure 7

Response of STZ1, STZ2 and STZ3 at 100 ppm of Formaldehyde

According to Fig. 8a, Formaldehyde gas had the greatest value among the different reducing gases, followed by Trichloroethylene, Ethanol, Acetone and Toluene of STZ2 sensor.

Fig. 8
figure 8

STZ2 gas sensing results a Selectivity b % of Sensitivity c Response time and Recovery time d Response time and Recovery time at 100 ppm

4.2 Sensitivity

By monitoring the change in resistance after exposure to a specific gas, the gas sensitivity of a thin film is often determined. As chemisorptions happen on the surface of the film, the resistance varies and is normalized. The term “sensitivity” for a gas sensor refers to change in resistance. To test the formaldehyde gas at various concentrations ranging from 10 ppm and above at room temperature with 18% of RH, STZ2-coated film was taken due to high sensitivity compared with the remaining two samples STZ1 and STZ3. The sensitivity of the sensor is defined as the degree of influence of a certain gas on the resistance of the sensor. Generally, it is determined by the ratio of the difference of resistance Ra in the air and resistance Rg in gas to the resistance Rg in the presence of gas for a particular concentration of a gas [39].

$${\text{Sensitivity}} {\%}=\frac{\text{Ra-Rg}}{\text{Rg}}\times 100.$$
(4)

After introducing formaldehyde into the chamber, sensor resistance initially drops quickly to its lowest level and then rises to a stable value after the acetone is removed. As shown in Fig. 8b, nanocomposites can detect formaldehyde gas starting at 10 ppm with 55% sensitivity and reaches a maximum value of 98% sensitivity at 100 ppm under the room temperature with 18% of RH, which lowers the cost of manufacturing the sensor element with the micro heater arrangement.

4.3 Response time and recovery time

An ideal gas sensor posesess very low response and recovery time. The response and recovery time of STZ2 are shown in Fig. 8c by increasing the formaldehyde concentration to 150 ppm that was introduced into the chamber. The response time is the length of time it takes to detect the gas stably and the recovery time is defined by the length of time it takes to return to the base resistance when the gas exits the chamber were both calculated.

The recovery and response times of formaldehyde for STZ2 sample from 10 to 150 ppm as shown in Fig. 8c demonstrate that the sample had low response time and recovery time at lower concentration. Some adsorption sites are inherently occupied during gas evacuation for the next testing of 150 ppm, resulting in its reduction. At high formaldehyde concentrations, the recovery time has also higher value due to reduction in adsorption which would reduce the response [40]. Figure 8d indicates the response time and recovery time of STZ2 at 100 ppm of formaldehyde concentration.

4.4 Gas sensing mechanism

The gas-sensing mechanism of STZ-coated sensors is widely accepted to be of the surface-controlled type. Many different factors influence gas-sensing performance, which is dependent on the change in electrical resistance of the sensor materials in the presence of target gases. The surface oxidation produces electrons and increases the charge in the conduction band thereby increasing its conductivity [27, 41,42,43,44]. The sensor operating temperature controls the amount of adsorbed oxygen ions and the presence of their various chemical forms (O or O2) on the sensor surface. The gas-sensing process is divided into two distinct reaction stages [45]

  1. 1.

    First, as oxygen molecules are absorbed by sensor materials, oxygen ions are produced. This drop in charge carriers lowers conductivity.

    $${\text{O}}_{{2}} \left( {{\text{absorbed}}} \right) \, + {\text{ e}} \to {\text{ O}}_{{2}}^{ - } \left( {{\text{ads}}} \right),$$
    (5)
    $${\text{O}}_{{2}}^{ - } \left( {{\text{ads}}} \right) \, + {\text{ e}} \to {\text{ 2O}}^{ - } \left( {{\text{ads}}} \right).$$
    (6)
  2. 2.

    The trapped electrons are then released when the target gases react with the absorbed oxygen molecules on the surface of the gas-sensing materials.

    $${\text{HCHO}} + {\text{ 2O}}^{ - } \to {\text{CO}}_{{2}} + {\text{H}}_{{2}} {\text{O}} + {\text{4e}^{-}}{.}$$
    (7)

Two possible effects of NPs are (1) a reduction in the activation energy between adsorbed oxygen and the semiconductor surface, which lowers the operating temperature, and (2) an increase in the amount of absorbed oxygen species, which strengthens the interactions between the target gases and the absorbed ionized oxygen and increases the interaction energy between the target gases and the absorbed ionized oxygen [46].STZ nanocomposite-coated sensor when exposed to reducing target gas exhibits an increase in conductivity and reduces the space of depletion region as shown in Fig. 9. The electrons are released when the adsorbed oxygen species on the material is exposed to gas which in turn increases the conductivity of the sensor.

Fig. 9
figure 9

Gas sensing mechanism (a) At air (b) At formaldehyde gas

The morphological study shows that STZ2 nanocomposite is made up of several spherical NPs and hollow flower like structure create looser nanostructure, which aids in the diffusion and movement of gas in the sensing layer and makes both the outer and inner surfaces of NPs accessible to target gas molecules.

Zn is essential for improving the behavior of gas sensors. Through chemical sensitization and spillover effects, the incorporation of Zn nanoparticles improves the performance of the sensing system [47]. As a result, the surface of SnO2-TiO2 has more oxygen species. It is assumed that part of the Zn2+ ions substitute for Sn4+ ions in the SnO2 lattice from the XPS spectrum, which increases the concentration of oxygen vacancies in the composite, and that surface defects are present from its absorption spectra. The semiconductor's behavior in detecting gas is mostly determined by oxygen vacancies and imperfections.

5 Conclusion

Ternary ZnO-doped SnO2–TiO2 nanocomposites may be successfully produced through a combination of simple co-precipitation and hydrothermal method. The resulting nanocomposites consist of tetragonal SnO2, anatase TiO2, cubic ZnO named STZ1, STZ2 and STZ3 in various nanoscale sizes.

Based on the results of the study, it was observed that.

  1. 1.

    The STZ2 nanocomposite has a very high response and outstanding selectivity towards formaldehyde gas with energy band gap value of 3.62 eV

  2. 2.

    STZ2-coated sensing film attained maximum sensitivity at 100 ppm at room temperature with 18% of RH and at 10 ppm response time and recovery time is 8 s and 9 s, respectively.

  3. 3.

    The substantial surface area of the nanocomposite may be responsible for STZ2's highly formaldehyde sensing capabilities.

This investigation concluded that the STZ2 nanocomposite exhibits outstanding formaldehyde detection capabilities under ambient temperature with no effect of humidity in the range 18%. As a result, constructing the sensor element becomes less expensive.