1 Introduction

Formaldehyde is an organic compound that is often used in various products such as paper, paint, medicine, cosmetics, glue, and antiseptics. However, extensive exposure of formaldehyde can negatively affect human health. The effect of the over exposure of formaldehyde involves irritation of the nose, eyes and throat. This can potentially lead to leukaemia and nasopharyngeal cancer [1]. Therefore, it is imperative to monitor and control the presence of formaldehyde in the environment.

There are several existing methods of formaldehyde detection such as optical detection devices and gas chromatography-mass spectrometry (GC-MS) [2]. However, although the GC-MS method has better sensitivity, the high cost and heavy equipment is not favoured for in-field measurement [3, 4]. Optical sensors tend to be large and expansive when used, even though they are less time consuming [5, 6].

Gas sensors based on metal oxides such as tin dioxide (SnO2) [7, 8], titanium dioxide (TiO2) [9, 10], and zinc oxide (ZnO) [11, 12] have played a crucial role in this area, attributable to their good sensing responses and the easy modification of their electrical characteristics. Gas sensors based on thin film ZnO are particularly favoured for sensing applications, primarily because of their tuneable surface morphology, large surface-to-volume ratio, and excellent stability due to better crystallinity [13]. Typically, metal oxide semiconductor material is deposited in the form of thin or thick film, and is used as an active layer for gas sensing devices. For the detection of toxic gases, semiconductors based chemiresistor sensor are mostly investigated, due to their low cost and simplicity. The principle of chemi-resistivity is based on the change of electrical resistance that results from the interaction of metal oxide semiconductors and the targeted gas [14]. This type of sensor has relatively high sensitivity, low cost, short response time and applicability in portable instruments.

There are various methods that can be applied in order to produce Sn doped ZnO thin film such as spray pyrolysis, pulse laser deposition [15], electron beam evaporation [16], and magnetron sputtering [17]. Spray pyrolysis can easily be performed, since no high temperature is required, and the film’s quality depends on the size of the droplet and nozzle used [18]. However, as the spray method is conducted in open air, sulphide oxidation may occur, which could lead to the cluttering of the spray nozzle after multiple uses. Pulse laser deposition is also used to produce thin film, as it can control the growth rate of the film. However, if large kinetic energy is used, re-sputtering could occur, and subsequently affect the growth of the thin film [19].

Meanwhile, electron beam evaporation has a high film deposition rate and high purity form. However, it is difficult to be controlled and to enhance the step coverage, and the x-ray by the electron beam evaporation can be harmful if it is misused [20]. Magnetron sputtering, which involves a strong electric and magnetic field, can also be used. It has better film quality and can be used for a large target area [21]. However, the substrate can be damaged due to high ion bombardment by plasma, and it is difficult to distribute the solution uniformly, especially with a complex shape. Futhermore, it is also challenging to produce thick film coating due to high residual stress levels.

In this paper, Sn doped ZnO interdigitated electrode (IDE) structure is introduced to detect formaldehyde at a low temperature using the sol-gel method. The operating temperatures used in this work are 130 °C, 150 °C, 170 °C, and 190 °C, with various doping concentrations of 0.5 at%, 1.0 at%, and 1.5 at%. The doped IDE structure is used as a sensing device to detect formaldehyde. The dopant used is Sn ions, because when Sn becomes Sn4+ after being replaced for Zn2+ in the ZnO structure, it has two free electron remaining [14]. This is important for electron conduction activity. According to Yung [22], doping plays a significant role in optical properties, as it can modify the characteristics of ZnO thin film by affecting the grain size and vibrational structure of the thin film. Due to the radius difference between Sn4+ and Zn2+ being about 30% (Zn2+ = 0.74 Å and Sn4+ = 0.69 Å), a limited solid solution could be created. The sensing device is made up of a glass substrate (22.8 × 7.6 mm) deposited with a gold interdigitated electrode (IDE) obtained from DropSens. The reason for using IDE is because better electrical conductivity can be achieved when the formaldehyde is attached to the device. IDE technology with different gap sizes has been proven to be sensitive, can be used with a low volume of samples, and at the same time, enhances the detection limit while providing a quick response for sensor application, as reported by Ajili et al. [23, 24].

2 Experimental procedure

2.1 Sol–gel process

The precursor for colloids/nanoparticles in the sol-gel process consists of a metal or metalloid element [25]. Zinc acetate is an organic compound that is widely used in sol-gel. The sol-gel process can be classified into three types of growth, which are solution growth, hydrothermal and template-based growth [25]. The hydrolysis and condensation method takes place in the solution growth process. First, zinc acetate dehydrate dissociates into zinc monoacetate and acetate ions in the alcoholic solution [26]. Then, the acetate ions and water are adsorbed on the substrate, and when zinc monoacetate is hydrolysed, zinc oxide and acetic acid are produced. Since the drying temperature is higher (150 ˚C) than boiling point (118 ˚C), the acid is evaporated [26]. The condensation process occurs in an alkaline solution where ethanolamine is provided [26]. Ethanolamine is a bidentate ligand, and works as a chelating and stabilizing ligand that prevents the precipitation of ZnOH and encourages the bridge between two zinc atoms [26]. Once monoacetate is formed, it reacts with OH/NH2 from ethanolamine [26].

2.2 Sol-gel synthesis of ZnO

In this work, zinc acetate dehydrate (ZnC4H6O4) and tin chloride pentahydrate (Cl4H5O5Sn) were mixed together and dissolved in 2-methoxyethanol (CH3OCH2CH2OH). The chemicals were purchased from Sigma Aldrich. The concentrations of tin chloride pentahydrate (Cl4H5O5Sn) used in the mixture were 0.5 at.%, 1.0 at.% and 1.5 at.%. The precursor was stirred for 1 hour at 80 ˚C. Then, ethanolamine (C2H7NO) as a stabilizer was added drop by drop until the solutions became homogeneous, with a molar ratio of 1:1. After that, the precursor was aged for 24 h at room temperature.

2.3 Spin-coating deposition

The prepared precursor was then deposited on an Au interdigitated electrode by using the spin coating method. The speed used was 500 rpm for 40 s. The solvent evaporation, followed by condensation reactions, resulted in the deposition of solid film on the Au interdigitated electrode substrate. Then, the substrate was soft baked for 10 min at 150 ˚C, to remove any organic residue. The process was repeated six times to obtain the desired thickness. After that, the substrate was annealed for 5 hours at 500 ˚C in a furnace.

2.4 Characterization of the thin film

The structure properties were analysed by using a Bruker advanced diffractometer with CuKα radiation (λ = 1.5406 Å) as the x-ray source, XRD. Surface morphological characteristics were investigated by a JEOL SEM operated at 15k eV and AFM. The electrical resistance was measured by the two probe method using an E4980A Precision LCR Metre.

2.5 Chemiresistivity and gas sensor set-up

Figure 1 shows the schematic diagram of the ZnO-based chemiresistive gas sensor used in this work. The prepared precursor was dropped between fingers of Au interdigitated electrode (IDE) of the gas sensor, and then annealed at 500 ˚C for 5 h.

Fig. 1
figure 1

 A schematic diagram of ZnO based chemiresistivity gas sensor

The formaldehyde sensing measurement was conducted based on the setup illustrated in Fig. 2. The device was placed in a closed chamber (25 cm × 15 cm × 25 cm) on a hotplate (1 cm in diameter) at the temperatures of 130 °C, 150 °C, 170 °C and 190 °C. Initially, the resistance of the device was recorded for five minutes to ensure the device is stable, before formaldehyde was introduced. Then, a predefined amount of formaldehyde was injected by using micropipette into the chamber, while the resistance value of the device was recorded. Since the formaldehyde used in this work is in liquid form, Eq. 1 is used to convert the amount of injected liquid into a gas concentration of ppb [27]:

$$C = \left[ {\frac{{V_L \times D_L \times T}}{{M_L \times V_A}}} \right] \times {\mathrm{8}}{\mathrm{.2}} \times 10^4 \times 1000$$
(1)

where C is the concentration in ppb, VL (µL) is the volume of the formaldehyde, DL (g ml1) is the density of the formaldehyde, T (K) is the operating temperature, ML (g mol1) is the molar mass of the formaldehyde, and VA (mL) is the volume of the diluted gas, which is equal to the test chamber. The device took some time to recover to the initial resistance value. Once the resistance reading returned to the initial point, it was assumed that the device fully recovered, and the experiment was repeated for various concentrations of Sn doped ZnO thin film.

Fig. 2
figure 2

Schematic diagram of the test chamber

3 Results and discussion

3.1 Structural and morphological characteristics

The X-ray diffraction data in Fig. 3 shows that when ZnO thin film is doped with Sn4+, the diffraction peak shifted at a high degree, with respect to 002. This is due to the smaller ionic radius of Sn4+ (0.069 nm), compared with the ionic radius of Zn2+ (0.074 nm), which leads to the replacement of Zn [23].

Fig. 3
figure 3

X-ray diffraction pattern of undoped and Sn doped ZnO thin film annealed at 500 °C for 5 h

The crystallite size of the thin film is calculated and tabulated in Table 1 based on Bragg’s Law equation. The crystallite size decreases as the doping increases. However, there exists variations in the crystallite size due to the changes in density of nucleation center, thus resulting in the decrease in the crystallite size when compressive stress occurs. The crystallite size increased to the original size when the crystal structure underwent tensile stress. This explains why, at a doping concentration of 0.5at% Sn, the crystallite size was slightly higher, and decreased when further doping was introduced. Similar cases of change in crystallite size with doping presence has also been reported in the related literature [28].

Table 1 XRD analysis for undoped and doped ZnO thin film

The XRD diffraction peak for undoped and doped ZnO thin film in Table 1 is compared with JCPDS No.: 05-0664, and shows a stable hexagonal wurtzite structure. The crystallite size, d, is calculated by using the following equation:

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

where λ is the x-ray wavelength, D is the crystallite size, β is the broadening of diffraction line in radian and θ is the angle of incidence. As shown in the table, the crystallite size decreases when doping is present. This situation occurs because there is incorporation of tin into the lattice [28].

Figure 4a shows the SEM images of undoped ZnO thin film after annealing at 500 °C. The image shows that the samples are densely packed with non-spherical particles of a hexagonal wurtzite structure. The ZnO structure becomes a hexagonal nanodisc as the annealing temperature and time is high [29]. When the Sn4+ dopant is introduced at 1.5 at.%, it can be observed that it is wrapped around the ZnO particle, as shown in Fig. 4b [30]. Further proof of the presence of Sn in ZnO is shown in XRD at the peak of 40–45° (220) at 1.5 at.% [31]. In terms of surface roughness, Fig. 5 shows the relation between the surface roughness and the size of the grain for different doping concentrations. The surface roughness for undoped is the lowest at 5.48 nm, and the highest surface roughness is recorded for 1.5 at.% Sn doped ZnO thin film is 16.7 nm. This trend shows that when the dopant concentration increases, the average grain size decreases. This situation was also reported by Zahari [20]. The thickness of the thin film that was measured using a stylus profilometer is about 150–160 nm. Therefore, as the film thickness is below 200 nm, only a small part of the grain has changed, whereas the in-plane grain size does not differ much.

Fig. 4
figure 4

SEM images of a undoped and b 1.5 at.% Sn doped ZnO thin film

Fig. 5
figure 5

Surface roughness (RMS), average grain size and crystallite size of undoped and doped ZnO thin film

When the grain size decreases, the value of the surface roughness increases, and this situation occurs because there was substitution of the Sn in the ZnO thin film. The increase of surface roughness favours the adsorption of atmospheric oxygen on the surface, thus increasing the sensing response [32]. It is important to have a smaller grain and crystallite size for good sensing performance. However, as depicted in Table 1, for 0.5 at.% Sn doped, the grain size is higher compared with others. This is probably due to the crystallite overlap caused by agglomeration [33], which alters the surface roughness. Since the grain size of the thin film affects the gas sensitivity [10], it is expected that the small crystallite size in this work will reflect a higher gas sensitivity response.

3.2 Electrical properties

An Agilent LCR metre was used to measure the electrical characteristics for undoped and Sn doped ZnO thin films. A dc-two probe method was used to measure the resistivity of the doped and undoped ZnO films. A variety of resistance values that act as a function of temperature and inverse absolute temperature in the range of 130 to 190 °C are shown in Fig. 6. The resistance value for undoped ZnO thin film is higher compare to doped ZnO thin film, due to the contribution of ions from Sn4+ on site of Zn2+ ions [34]. Two processes occur simultaneously when the temperature is increased, namely, thermal excitation of electrons, and adsorption of electrons. The thermal action of the electrons process is influenced by the oxygen adsorption as the resistance increases to 170 °C for undoped ZnO thin film. However, the oxygen adsorption at the surface of the thin film is dominated by the thermal action of electrons when the temperature increases, which decreases the resistance value [25]. This situation occurs when the temperature exceeds 180 °C, which decreases the resistance further. This trend is in line with prior works [35, 36].

Fig. 6
figure 6

a Electrical resistance as a function of temperature and b inverse absolute temperature of the films

3.3 Formaldehyde sensing analysis

The gas response of formaldehyde is investigated in order to identify the lowest amount of formaldehyde that can be detected. The value of resistance was recorded before and after the presence of formaldehyde, and the sensitivity was calculated by using the following equation:

$${\mathrm{S}}\left[ {\mathrm{\% }} \right]{\mathrm{ = }}\left[ {\left( {{\mathrm{R}}_{\mathrm{a}}{\mathrm{-R}}_{\mathrm{g}}} \right){\mathrm{/R}}_{\mathrm{a}}} \right]{\mathrm{ \times }}100\%$$
(3)

where Ra is the resistance before formaldehyde is introduced, and Rg is the resistance after its introduction. The response and recovery time of the undoped and Sn doped ZnO thin film is defined as the time required to achieve 90% when formaldehyde is present, and to reach its baseline when formaldehyde is absent. Figure 7 shows formaldehyde sensitivity response within the temperature range of 130–190 °C. According to the figure, 1.0 at.% Sn doped ZnO thin film exhibits the best sensitivity towards formaldehyde. The best response for doped ZnO thin film is when the operating temperature is at 170 °C, which has high sensitivity for 1.3 ppb, 2.0 ppb, 2.7 ppb and 3.4 ppb of formaldehyde.

Fig. 7
figure 7

Sensitivity response of formaldehyde in various concentrations as a function of temperature at 130 °C, 150 °C, 170 °C and 190 °C for a undoped, b 0.5 at.%, c 1.0 at.%, and d 1.5 at.% Sn doped ZnO thin film

Hence, the change in the resistance of the doped ZnO thin film as a function of time with the presence of formaldehyde at this

particular temperature is presented in Figs. 8 and 9. The total response and recovery time of the device is tabulated in Table 2, while the response and recovery time is shown in Figs. 8 and 9 for undoped and 1.0 at.% doped ZnO thin film, respectively.

Fig. 8
figure 8

Response and recovery time of formaldehyde at a temperature of a 130 °C, b 150 °C, c 170 °C, and d 190 °C for undoped ZnO thin film

Fig. 9
figure 9

Response and recovery time of formaldehyde at a temperature of a 130 °C, b 150 °C, c 170 °C, and d 190 °C for 1.0 at.% doped ZnO thin film

Table 2 Average total response and recovery time of undoped and 1.0 at.% doped ZnO thin film

Based on these figures, 1.0 at.% doped ZnO thin film shows the shortest response and recovery time compared with undoped ZnO thin film. The response and recovery time are longer when the amount of formaldehyde solution is increased.

Figure 10 shows the response stability of undoped and 1.0 at.% doped ZnO for 1.3 ppb, 2.0 ppb, 2.7 ppb and 3.4 ppb formaldehyde concentration at a temperature of 170 °C. The experiment was conducted continuously for nine days for 1.0 at.% doped ZnO thin film. The gas sensing response time was recorded throughout nine continuous days. It can be seen that the sensor is stable, as the response recorded for undoped and 1.0 at.% Sn doped ZnO thin film shows fluctuations of 3 and 2% only, as compared with the work done by Prajapati [32], where it shows a fluctuation of 6% at an operating temperature 275 °C for 9 days.

Fig. 10
figure 10

Response stability of a 1.0 at.% doped and b undoped ZnO thin film towards formaldehyde at a temperature of 170 °C as a function of time in days

The sensing mechanism of ZnO is dependent on the surface controlled type. The sensitivity is affected by the active layer grain size, oxygen adsorption, surface state and lattice defects [37]. In order to enhance the sensing response, Sn4+ dopants were introduced. Dopants increase the sensing response by altering the resistance of ZnO. According to Bhati [38], dopants can reduce the working temperature of the sensor, enhance the stability and sensitivity, and give a high response towards the targeted gas. This is because, when dopants are introduced, the surface morphology and grain size changes. The grain size of doped ZnO became smaller as the dopant inhibits the crystal growth rate. Thus, this can improve the sensing performance as a small sized particle has a high surface area, hence increasing the chemisorbed oxygen ions.

Oxygen vacancies are also among the factors that affect the effectiveness of a metal oxide semiconductor. Oxygen vacancy acts as an electron donor and a direct adsorption site [39]. In this work, ZnO is n –type material, and the doping of Sn4+ increases the conductivity by enhancing the electron density [40]. This is due to the Sn4+ annihilating the variation of oxygen species. Sn may be incorporated with a ZnO lattice, as their ionic radii is about the same (0.074 nm for Zn2+ and 0.069 nm for Sn4+). In the ZnO lattice, Sn remains as a defect with a negative charge. The conductivity is increased due to the oxygen vacancy, and ZnO is associated with an oxygen deficiency. The Sn donor is ionized and doubly ionized in the oxygen vacancy in the ZnO material. The Fermi level should be close to the conduction band in the n-type semiconductor. Hence, being doped with Sn (donor) will contribute more electrons to the reaction, as the majority carriers are electrons, and the minority carriers are the holes.

Besides this, the detection of the ZnO based gas sensor is obtained from the variation in electrical resistivity. Since the annealing temperature used is high, which is at 500 °C, the ZnO resistivity also increases because of the chemisorption of oxygen at the grain boundaries, thus encouraging the formation of the extrinsic trap localized at the boundaries. As such, this trapped electron creates a potential barrier by producing a depletion region to the grain boundaries. This situation causes the resistivity to increase as the mobility carrier decreases.

Oxygen molecules in the atmosphere were absorbed by the surface of the sample combined with an electron in the conduction band and become ionized, then become absorbed as 2O- (ads). The space charge layer or depletion layer occurs because of the electron transfer between the oxygen molecules and the surface of the ZnO thin film. This region has insufficient carriers because the electrons are trapped by chemisorbed oxygen. This situation causes the conductance of the material to decrease significantly. This shows that electrical conductivity is strongly dependent on the surface state resulting from the molecular adsorption in the region.

The high surface area typically favors high adsorption–desorption sites, thus increasing sensitivity. When the metal oxide surface adsorb the atmospheric oxygen, different oxygen species are formed, depending on the operating temperature used, as shown in Eqs. 4a4c. However, when there is formaldehyde present, the conductivity of the metal oxide semiconductor changes, thus changing the gas sensitivity as well. When undoped and Sn doped ZnO thin film are introduced with a reducing gas such as formaldehyde, it releases electrons into the conduction band by reacting with the oxygen chemisorbed semiconductor surface. This situation reduces the O2- and O- ions, increases the amount of electrons in the conduction band [41], and also increases the electrical conductivity of the undoped and Sn doped ZnO thin film.

$${\mathrm{O}}_2\left( {{\mathrm{air}}} \right) \leftrightarrow {\mathrm{O}}_2\left( {{\mathrm{ads}}} \right)$$
(4a)
$${\mathrm{O}}_2\left( {{\mathrm{ads}}} \right) + {\mathrm{e}}^ - \leftrightarrow {\mathrm{O}}_{2^ - }\left( {{\mathrm{ads}}} \right)$$
(4b)
$${\mathrm{O}}_2\left( {{\mathrm{ads}}} \right) + {\mathrm{e}}^ - \leftrightarrow 2{\mathrm{O}}^ - \left( {{\mathrm{ads}}} \right)$$
(4c)

At first, the atmospheric oxygen gain electron from ZnO and forms 2O2. It is also well known that the sensing response depends on the number of 2O2. Formaldehyde then reacts with 2O2, and the electron is released back to the conduction band, as shown in below equation:

$${\mathrm{HCHO}} + 2{\mathrm{O}}_2^ - \leftrightarrow {\mathrm{HCHO}} + 2{\mathrm{O}}_2 + 2{\mathrm{e}}^ -$$
(5)

Apart from this, Prajapati [31] described another mechanism of formaldehyde where water and carbon dioxide are formed besides the electron. When formaldehyde is present, the reaction shown in Eq. 6 takes place, and the electron returns to the conduction band.

$${\mathrm{HCHO}} + {\mathrm{O}}_2^ - \leftrightarrow {\mathrm{CO}}_2 + {\mathrm{H}}_2{\mathrm{O}} + {\mathrm{e}}^ -$$
(6)

The high operating temperature can stimulate the oxidation of formaldehyde, and donates the electron to ZnO. However, as the temperature is continuously increasing, the sensitivity drops because the adsorb oxygen is desorbed from the metal oxide surface.

As shown in Table 3, most of the devices in previous works operate at a higher temperature compared with this work, where it has been found that the optimum operating temperature based on the sensing performance is 170 °C. A low temperature leads to low energy consumption. In terms of the device preparation method, we chose the sol-gel method due to its simplicity, as opposed to other available methods.

Table 3 Previous works on low level of formaldehyde detection as compared with this work

4 Conclusion

This paper investigated undoped and Sn4+ doped ZnO thin film deposited on Au IDE prepared by sol-gel method for the purpose of formaldehyde sensing. It was found that the use of Sn4+ dopant improved the sensitivity and recovery of formaldehyde sensing. The surface roughness of the thin film increased when Sn4+ dopant was added, but lowered the size of the grain as more dopant was added. The electrical properties demonstrate that the undoped ZnO thin film has a higher resistance compared with doped ZnO thin film. The most sensitive device is 1.0 at% doped ZnO thin film, as it shows the highest sensitivity response of over 65% towards 1.3 ppb, 2.0 ppb, 2.7 ppb and 3.4 ppb of formadehyde, at 170 °C.