1 Introduction

At present, the development of sensors for volatile and toxic gas detection is essential because of the concerns for environmental pollution, product safety, and the safety requirements of industry, working place, and daily life. A gas that needs to be monitored is ethanol gas or vapor, which can produce harmful effects in certain doses particularly to humans. Ethanol is a flammable and colorless chemical compound and has various applications. Ethanol is used for certain products, such as in products of food and medical industries, fragrance, and coloring [1, 2]. Ethanol is also widely used in research laboratories for chemical synthesis [3]. Exposure to ethanol with excessive dosage causes unpleasant effects on humans, such as nausea and vomiting, and skin and eye irritation. Prolonged exposure to ethanol can even cause damage to the heart and kidney, and fatal effects. Therefore, ethanol sensor with high sensitivity and response must be developed to monitor ethanol gas or vapor in the environment, particularly in places where ethanol is frequently used.

Nanostructured metal oxides, such as tin oxide (SnO2), tungsten oxide (WO2), and zinc oxide (ZnO), have attracted much attention for sensor applications owing to their excellent gas sensing properties, including high sensitivity, rapid response, and fast recovery [4,5,6]. Among these metal oxides, ZnO is a promising material for gas sensor application because of its high electrochemical stability, non-toxicity, suitability to doping, and low cost. Recently, one-dimensional (1D) ZnO nanostructures are being fabricated because of their high stability and promising responses to various types of gases and chemicals [7]. ZnO is natively an n-type semiconductor material and possesses a high exciton binding energy of 60 meV and a wide bandgap of 3.3 eV [8]. ZnO nanostructures in low dimensions, particularly in 1D, offer great sensitivity and good response for gas detection because they facilitate high surface area and suitable surface condition for chemical sensing [9]. To date, various preparation techniques for synthesizing the nanostructures of 1D ZnO have been reported, including aqueous solution method [10,11,12], chemical vapor deposition [13, 14], pulsed-laser deposition [15], molecular beam epitaxy [16], vapor–liquid–solid [17], metal–organic chemical vapor deposition [18], and sputtering [19,20,21]. Among these techniques, aqueous solution is a promising method for growing 1D ZnO because of its advantages of low cost, simplicity, and low-temperature process [22, 23].

The weak n-type conductivity of intrinsic ZnO is attributed mainly to its surface defects, which produce excess of free electron [24, 25]. However, these surface defects and free electrons are unstable and react with atmospheric oxygen to form adsorbed oxygen ions. Thus, a depletion region is developed on the surface. This depletion region exhibits a characteristic Debye length and increases the resistance of ZnO. When ZnO surface is exposed to the reducing gas, such as ethanol gas or vapor, ethanol molecules are adsorbed on the ZnO surface such that the adsorbed oxygen ions are desorbed from the surface. This process releases back the electrons such that the resistance of ZnO decreases [26]. This mechanism produces a simple signal for ethanol detection, which is widely proposed as a sensing mechanism for metal oxide-based gas sensors. However, many challenges must still be resolved to improve the sensing properties of ZnO given that intrinsic ZnO-based sensors present limitations in gas sensor detection. These limitations include low sensitivity, long response and recovery times, and high operating temperature (400–500 °C for zero-dimensional ZnO) [27, 28]. The ZnO properties can be improved through doping with other metals to tune the morphology and surface to volume ratio, structure of energy band, and grain boundaries [29, 30]. The performance of nanostructured ZnO-based sensors can be improved by doping with metal ions, such as Sn4+ [31], Al3+ [22], Ga3+ [32], and Ti4+ ions [30]. However, Sn doping attracts attention because it can improve carrier concentration in ZnO because of the substitution of Sn4+ into Zn2+ site in the ZnO crystal structure, thereby resulting in two additional free electrons in the process [33]. In addition, the ionic radius of Sn4+ (0.069 nm) is smaller than that of Zn2+ (0.074 nm), thereby affecting the ZnO particle size when Sn ions are substituted at the Zn2+ site in ZnO crystal lattice [34]. During Sn doping, the excess of free electron in the ZnO semiconductor can be increased such that the grain size can be reduced. Thus, this condition can theoretically enhance the sensing performance of the doped samples.

Although the physical and chemical properties of undoped as well as doped ZnO nanostructures and thin films have been investigated, the detailed investigation on the effect of Sn doping on the structural and optical properties of ZnO nanorods (ZnO NRs) on magnesium (Mg)–aluminum (Al) co-doped ZnO seeded layer and their consequence to the ethanol gas sensing characteristics have been rarely reported. In addition, studies on the fabrication of Sn-doped ZnO nanorods (Sn:ZnO NRs) for ethanol sensor application, particularly at low operating temperatures, are still lacking. Therefore, the development of gas-sensitive materials at low temperatures is indispensable toward energy-saving sensor systems. In this study, Sn:ZnO NR-based ethanol sensors were fabricated using low-temperature solution immersion with sensor measurement operating at 100 °C.

2 Experimental procedures

2.1 Seeded layer preparation

Mg–Al co-doped ZnO seeded layer was used as the catalyst for ZnO NR growth and was coated on a glass substrate using the sol–gel spin-coating technique. The solution was prepared using 0.4 M zinc acetate dehydrate [Zn(CH3COO)2·2H2O, 99.5%, Merck] and 0.4 M monoethanolamine (C2H7N14, 99.5%, Aldrich) dissolved in 2-methoxyethanol solvent. Then, 0.012 M magnesium acetate tetrahydrate (C4H6MgO4·4H2O, 99%, Fluka) and 0.004 M aluminum nitrate nonahydrate [Al (NO3)3·9H2O, 98%, systerm] were added into the precursor solution as the dopant sources. The mixed solution was heated and stirred at 80 °C for 3 h. The solution was kept for 24 h at room temperature to obtain a homogeneous solution. The solution was coated onto a glass substrate using the spin coating. The solution was dropped ten times onto the substrate with a rotation speed of 3000 rpm for 1 min. The samples were preheated at 150 °C for 10 min in the atmosphere to remove the solvent. These coating processes were repeated five times to increase the film thickness. Finally, the samples were annealed at 500 °C for 1 h using a furnace.

2.2 Tin-doped zinc oxide nanorod growth process

Sn:ZnO NRs were deposited on Mg–Al co-doped ZnO seeded layer-coated glass substrate using aqueous solution immersion. The solution was prepared using 0.1 M zinc nitrate hexahydrate [Zn(NO3)2·6H2O, 98.5%, Riendemann Schmidt] and 0.1 M hexamethylenetetramine (C6H12N4, 99% purity, Aldrich) as a precursor and a stabilizer, respectively. For Sn:ZnO NRs, 0.001 M of tin (IV) chloride pentahydrate (SnCl4·5H2O, 98% purity, Aldrich) was added into the solution. These chemicals were mixed and dissolved in deionized (DI) water. Using ultrasonic water bath (Hwashin Technology Powersonic 405, 40 kHz), the solution was sonicated at 50 °C for 30 min. Subsequently, the solution was stirred and kept for 3 h at room temperature. Next, the solution was poured into a vessel with volume capacity of 100 mL in which the seeded-layer-coated glass substrate was placed at the bottom. The immersion process was performed by immersing the sealed vessels into a hot water bath at 95 °C for 30 min. After immersion, the ZnO NR films were washed with DI water and dried in a furnace at 150 °C for 10 min. Finally, the samples were annealed at 500 °C for 1 h in ambient conditions. On top of the film samples, gold (Au) metal contacts with 60 nm thickness were deposited using direct current (DC) sputtering (Emitech K550X). The schematic of ethanol sensor configuration for Sn:ZnO NR films is shown in Fig. 1.

Fig. 1
figure 1

Schematic configuration of ethanol gas sensor using Sn:ZnO NRs

The structural and crystallinity of the samples were characterized using X-ray diffraction (XRD, PANalytical X’Pert PRO). Morphological properties and composition analysis were investigated by field emission scanning electron microscopy (FESEM, JEOL JSM-7600F) and energy-dispersive X-ray spectroscopy (EDS, INCA), respectively. The optical properties of the samples were determined using UV–Visible (UV–Vis) spectroscopy (Cary 5000) and photoluminescence (PL) spectra (Horiba Jobin Yvion). The current–voltage (I-V) characteristics of the samples were investigated using a two-probe I-V measurement system (Advantest R6243). The ethanol sensor measurement system (Keithley 2400) was used to measure and investigate the response of the sensors.

3 Results and discussion

The XRD patterns of ZnO NRs and Sn:ZnO NRs are shown in Fig. 2. All diffraction peaks are represented in accordance with a hexagonal wurtzite structure of ZnO (JCPDS No. 36–1451). No additional peak induced by other by-products, such as Zn(OH)2 or SnO2, was detected in both samples. The results also show that both samples exhibited preferential growth at c-axis or (002) orientation. However, the intensity of (002) peak of Sn:ZnO NRs was lower than that of ZnO NRs. In addition, the (002) peak of Sn:ZnO NRs was shifted to a higher angle position compared with the peak of ZnO NRs. The degradation of diffraction peak intensities and shifted peak of Sn:ZnO NRs may be due to the incorporation of Sn into the ZnO lattice as substitution atoms such that a lattice change occurs; this result in agreement with that of Tsay et al. [34]. This result also implies that the lattice arrangement of the host ZnO crystal is marginally strained or distorted by the addition of Sn4+ ions. Scherrer’s formula was used to calculate the average crystallite size D(002) of ZnO NRs and Sn:ZnO NRs, as described in Eq. (1) [34, 35].

Fig. 2
figure 2

XRD patterns of ZnO NRs and Sn:ZnO NRs

$${\text{D}}_{{(002)}} = \frac{{0.94{\uplambda }}}{{{\upbeta }\cos {\uptheta }}},$$
(1)

where λ is the X-ray wavelength of 1.54 Å, θ is Bragg’s diffraction angle of (002) plane orientation peak, and β is the full width at half maximum (FWHM) of the (002) plane orientation peak in radian. The calculated average crystallite sizes of ZnO NRs and Sn:ZnO NRs were 56 and 46 nm, respectively. The D(002), FWHM(002), and angle position of (002) peaks are shown in Table 1.

Table 1 Diffraction angles at (100) and (002) plane orientations, crystallite size, FWHM(002), interplanar distance, lattice parameters, strain, stress and resistivity of ZnO NRs and Sn:ZnO NRs

Katoch et al. reported that nanograin size affects the sensor response [36]. Small nanograin results in high response because it provides additional grain boundaries for gas adsorption [36, 37]. Thus, the smaller nanocrystallite size of Sn:ZnO NRs than that of the undoped ZnO NRs obtained in the present study is expected to contribute to the better sensing performance of ethanol gas. The reduction in grain size in the ZnO nanostructure increases the surface area such that the sensor response to the ethanol gas is enhanced.

The lattice parameters of ZnO and Sn:ZnO NRs were determined using Bragg’s equations, as shown in Eqs. (2, 3) [38, 39]:

$$2{\text{d}}_{{{\text{hkl}}}} \sin {{\uptheta }} = n{{\uplambda }},$$
(2)
$$\frac{1}{{{\text{d}}_{{{\text{hkl}}}}^{2} }} = \frac{4}{3}\left[ {\frac{{{\text{h}}^{2} + {\text{hk}} + {\text{k}}^{2} }}{{{\text{a}}^{2} }}} \right] + \frac{{{\text{l}}^{2} }}{{{\text{c}}^{2} }},$$
(3)

where (hkl) is the Miller index; dhkl is the interplanar spacing of the crystallographic plane (hkl); a and c represent the lattice parameters of a-axis and c-axis, respectively; n is the order of diffraction (usually n = 1); λ is the X-ray wavelength of Cu Kα radiation (1.54 Å); θ is Bragg’s angle.

Using Eqs. (2, 3) with the first-order approximation, n = 1, the lattice constants of a and c could be estimated using Eqs. (4, 5), respectively [39].

$${\text{a}} = \frac{{\uplambda }}{{\sqrt 3 \sin {\uptheta }}},$$
(4)
$${\text{c}} = \frac{{\uplambda }}{{\sin {\uptheta }}}.$$
(5)

The lattice constant a corresponds to the (100) peak diffraction angle, while the lattice constant c corresponds to the (002) peak diffraction angle. The XRD pattern shows that the 2θ for (100)/(002) plane orientations of ZnO and Sn:ZnO NRs were 31.23°/33.90° and 32.25°/34.99°, respectively. The calculated lattice constants a and c and interplanar spacing dhkl for ZnO were 3.3031, 5.2824, and 2.6412 Å, respectively. For Sn:ZnO NRs, the calculated a, c, and dhkl were 3.2014, 5.1227, and 2.5614 Å, respectively. These calculation results are summarized in Table 1. The results show that the lattice parameters and interplanar spacing decreased as Sn was introduced into the ZnO crystal lattice. The decreasing value is due to the contraction of lattice when Sn4+ ions replaces the Zn2+ sites [40]. Furthermore, the diffraction of (002) peaks for Sn:ZnO NRs shifted toward high degree angles, as shown in Fig. 2. The shifted diffraction peaks of Sn:ZnO NRs is due to the substitution of Sn4+ ions into the ZnO lattice [41]. Similar results are obtained by other scholars, suggesting that the condition is due to the smaller radii of dopant ions (Sn4+ = 0.069 nm) than the radii of Zn2+ (0.074 nm) ions [34, 42]. Therefore, the substitution of Sn4+ ions into the ZnO lattice changes the interplanar spacing (d-values) and increases the diffraction angle; the reason is due to the deterioration of intrinsic stress in the crystal lattice [43]. The formation of stress and strain owing to the doping process can influence the ZnO properties. The lattice strain εzz along the c-axis of ZnO films was estimated using Eq. (6) [35, 44].

$${\upvarepsilon }_{{{\text{zz}}}} = \frac{{c_{{film}} - c_{{bulk}} }}{{c_{{bulk}} }} \times 100,$$
(6)

where c film and c bulk are the lattice parameters of the strained films and bulk ZnO (5.2066 Å), respectively. The value of strain is positive when the ZnO films are under tensile strain (material being stretched), while the value of strain is negative when the ZnO films are under compressive strain (material being compressed) [39]. The residual stress σfilm of ZnO films was determined using Eq. (7) [35, 44].

$${\upsigma }_{{{\text{film}}}} = \frac{{2{\text{C}}_{{13}}^{2} - {\text{C}}_{{33}} ({\text{C}}_{{11}} + {\text{C}}_{{12}} )}}{{2{\text{C}}_{{13}} }}{\upvarepsilon }_{{{\text{zz}}}} ,$$
(7)

where C11 = 208.8 GPa, C12 = 119.7 GPa, C13 = 104.2 GPa, and C33 = 213.8 GPa are the elastic stiffness constants of bulk ZnO, and εzz is the c-axis lattice strain. The film is considered under tensile stress when the stress value is positive. Meanwhile, the film is under compressive stress when the stress value is negative. The obtained results show that the strain/stress values of ZnO NRs and Sn:ZnO NRs were 1.45%/−3.38 GPa and −1.61%/3.75 GPa, respectively. These results suggest that the nanorod films exhibited compressive strain and tensile stress after doping with Sn. The lattice stress and strain can lead to the formation of dislocations and physical defects in the structure of the crystal [45, 46]. The dislocation density δ in the crystal lattice could be estimated using Eq. (8) [43].

$$\delta = \frac{1}{{{\text{D}}_{{{\text{(002)}}}}^{{\text{2}}} }},$$
(8)

where D(002) is the crystallite size. The dislocation densities of ZnO and Sn:ZnO NRs were calculated to be 3.2 × 1014 and 4.7 × 1014 lines/m2, respectively. The dislocation density of Sn:ZnO NRs increased by Sn doping such that lattice imperfections were generated.

The surface morphology images of synthesized ZnO NRs and Sn:ZnO NRs are shown in Fig. 3a, c, respectively. The images show that both samples were uniformly deposited with dense arrays. Both nanorods exhibited a hexagonal-shaped structure. However, Sn:ZnO NRs possessed higher surface porosity than ZnO NRs. The FESEM images show that the average diameter sizes of ZnO NRs and Sn:ZnO NRs were estimated to be 86 and 84 nm, respectively. This result suggests that the diameter size of nanorods was slightly reduced because of Sn doping. This condition is expected because the ionic radius of Sn4+ ions is smaller than that of Zn2+ ions, thereby influencing the diameter of the nanorod when Sn4+ ions substitute Zn2+ site in the lattice.

Fig. 3
figure 3

Surface morphology images of a ZnO NRs and c Sn:ZnO NRs prepared by solution immersion. Cross-sectional images of b ZnO NRs and d Sn:ZnO NRs. e EDS spectrum of Sn:ZnO NRs

The cross-sectional images of ZnO NRs and Sn:ZnO NRs are shown in Fig. 3b, d, respectively. The images reveal that the thicknesses of ZnO NRs and Sn:ZnO NRs were estimated to be 533 and 480 nm, respectively. The obtained result shows that the thickness of the films slightly decreased when Sn4+ ions was doped into ZnO. The elementary analysis of Sn:ZnO NRs was conducted using EDS; the results are presented in Fig. 3e. The analysis shows that the atomic percentage ratio of Sn:Zn:O was 0.26:43.76:55.98. The results show that the nanostructures consisted of Zn, O, and Sn elements. This result suggests that the Sn was successfully incorporated into the ZnO lattice.

The optical transmittance spectra of ZnO NRs and Sn:ZnO NRs are shown in Fig. 4. The average transmittances of ZnO NRs and Sn:ZnO NRs are highly transparent in the visible region (400–800 nm) with 83 and 86% transparency, respectively. The transmission spectra of Sn:ZnO NRs has distinct absorption edge in visible range, implying excellent quality of films. The transmission spectra exhibit the obvious blue shift of absorption edge to lower wavelength suggesting the higher shift of optical band gap of the film with introduction of Sn dopant. Previous studies suggested that the transmittance of the film decreases when the size of nanostructured ZnO decreases [47, 48]. However, the Sn:ZnO NRs in the present study possess smaller diameter than ZnO NRs, and they improved transparency in the visible region. Hsu et al. [49] indicated that the improvement of transmittance may be associated to the increase in carrier concentration in the thin film. The improvement of transmittance is also due to the high porosity that arose from periodic cylindrical nanorods on the surface [50]. Moreover, the improved transmittance may be due to a high degree of vertical alignment, low surface roughness, and the uniformity of the nanorod arrays [51].

Fig. 4
figure 4

Optical transmittance spectra of ZnO NRs and Sn:ZnO NRs

The absorption coefficients of ZnO NRs and Sn:ZnO NRs were calculated from the transmittance spectra using Lambert’s law, as described in Eq. (9) [22, 35].

$${{\upalpha }} = \frac{1}{{\text{t}}}\ln \left( {\frac{{\text{1}}}{{\text{T}}}} \right),$$
(9)

where t is the thickness of films, and T is the transmittance data of films. The band gap energy Eg of ZnO films was estimated using Tauc’s equation, as described in Eq. (10) [52].

$${{\upalpha hv}} = {\text{A}}({\text{hv}} - {\text{E}}_{{\text{g}}} )^{{1/2}} ,$$
(10)

where α is an absorption coefficient; hv is a photon energy; A is an energy-independent constant ranging from 1 × 105 to 1 × 106 cm−1 eV−1, which depends on electron–hole mobility; Eg is a band gap energy [53]. The band gap energy Eg values were estimated by plotting (αhv)2 versus hv, and the values were taken at the intercept of extrapolation line with the x-axis of the plot, as shown in Fig. 5. The obtained results show that the Eg values for ZnO NRs and Sn:ZnO NRs were 3.28 and 3.32 eV, respectively. The widening of the band gap value is related to the Burstein Moss effect, which corresponds to the increase in carrier concentration when Sn is doped into the ZnO nanostructures [52, 54]. The increase in Eg value is also influenced by the interatomic spacing of metal oxide materials [35, 55]. The XRD results indicate that the compressive strain and tensile stress observed after Sn doping in Sn:ZnO NRs such that the Eg of films increased. A similar observation was reported by Ghosh et al. [56].

Fig. 5
figure 5

Estimations of optical band gap energy Eg for ZnO NR and Sn:ZnO NR films using Tauc’s plot

The porosities of ZnO NRs and Sn:ZnO NRs were estimated using Lorentz–Lorentz’s equation, as described by Eq. (11) [39, 57].

$${\text{Porosity}} = {\text{1}} - \left[ {\frac{{\left( {\frac{{{\text{n}}_{{\text{f}}}^{2} - 1}}{{{\text{n}}_{{\text{f}}}^{2} + 2}}} \right)}}{{\left( {\frac{{{\text{n}}_{{\text{s}}}^{2} - 1}}{{{\text{n}}_{{\text{s}}}^{2} + 2}}} \right)}}} \right],$$
(11)

where nf is the refractive index of ZnO films, and ns is the refractive index of ZnO skeleton. The value of ns is widely accepted as 2 [58]. The value of nf was measured using Eqs. (12, 13) [59]:

$${\text{n}}_{{\text{f}}} = \left[ {{\text{N}} + ({\text{N}}^{2} - {\text{s}}^{2} )^{{\frac{1}{2}}} } \right]^{{\frac{1}{2}}} ,$$
(12)
$${\text{where N}} = \frac{{2{\text{s}}}}{{{\text{T}}_{{\text{m}}} }} - \frac{{\left( {{\text{s}}^{2} + {\text{1}}} \right)}}{2},$$
(13)

where s is the substrate glass refractive index (1.52); Tm is the transmittance envelope function, which is taken from the average of the transmittance data from the transparent area or the area where the value of α is near 0 [60]. For this study, that region was between 400 and 800 nm wavelengths. The porosities of ZnO NRs and Sn:ZnO NRs were calculated to be 12 and 19%, respectively. The results suggest the porosity of the sample increased by Sn doping. Bai et al. reported that the porous films ease the diffusion of test gas into the film [61].

The level of impurity and defect structure of ZnO NRs and Sn:ZnO NRs was characterized using PL spectroscopy at room temperature. The PL spectra in Fig. 6 show that two main emission bands appeared in the violet and visible regions. For ZnO NRs, a weak shoulder peak center at 383 nm was observed. This peak is generally considered to be caused by the near-band-edge excitonic transitions. However, for Sn:ZnO NRs, this near-band-edge emission completely disappeared. These results suggest the dominance of defect-related emission over band edge emission. The violet emission peaks for ZnO NRs and Sn:ZnO NRs were centered at 399 and 405 nm, respectively. This violet emission peak is assigned to the zinc vacancy-related emission [62]. The slight red shift of Sn:ZnO NRs emission peaks may be due to the influence of Sn4+ ion doping on ZnO NRs [63]. In other words, Sn4+ ions may take part in the substitution of Zn2+ ion and share the oxygen with Zn atoms, thereby subsequently changing the lattice arrangement [64, 65]. This condition is consistent with the present analysis on lattice parameters based on the XRD results when Sn element is doped into ZnO.

Fig. 6
figure 6

PL spectra of ZnO NR and Sn:ZnO NR films

The broad peaks of visible emission for ZnO NRs were observed at 600 nm. This peak corresponds to oxygen interstitial defects or acceptor-related defects [66,67,68]. However, for Sn:ZnO NRs, two visible emission peaks centered at 554 and 650 nm were observed. The emission peak at 554 nm is attributed to oxygen vacancy defects or donor-related defects, while the peak centered at 650 nm is due to oxygen-rich samples; this result is in agreement with that of a previous study on ZnO films [66, 68, 69]. For the Sn:ZnO NRs in the present study, the oxygen vacancy defects were dominant than the peak at 650 nm. The oxygen vacancy defects improve sensing performance by providing additional adsorption site that enables the interaction of gas molecules and the sensor surface [70, 71]. Han et al. mentioned that high gas response is attributed to the films of more donor-related defects rather than acceptor defects [72]. If more free electrons are captured by intrinsic acceptors, then less will be trapped by adsorbed oxygen ions; less adsorbed oxygen ions will react with less gas molecules, thereby leading to low gas response. This finding was also reported by Phan et al. [64].

Figure 7 depicts the current–voltage (I–V) characteristics of the Sn:ZnO NRs and ZnO NRs; these characteristics were measured using a two-probe measurement system. The I–V curves indicate that the Au metal connections formed ohmic contacts with both samples. The results also show that the current of the supplied voltage increased for the Sn:ZnO NRs compared with that for the ZnO NRs. The resistance values for the different Sn:ZnO NRs and ZnO NRs were calculated to be 1.0 and 3.2 MΩ, respectively. This I–V measurement result indicates that Sn:ZnO NRs presented a larger current value than ZnO NRs because of their large tensile stress value. However, ZnO NRs exhibited compressive stress such that the resistance of the sample was large. The resistivity was calculated from the slopes of the linear I–V plot using the sheet resistivity in Eq. (14):

Fig. 7
figure 7

I–V plot of ZnO NR and Sn:ZnO NR films

$$p = \left( {\frac{{\text{V}}}{{\text{I}}}} \right)\frac{{{\text{wt}}}}{{\text{l}}}$$
(14)

where V is the supplied voltage, I is the measured current, t is the film’s thickness, w is the electrode width (2 mm) and l is the length between the electrodes (1 mm). Table 1 shows the variation in resistivity with respect to ZnO NRs and Sn:ZnO NRs. It can be observed that the resistivity decreases from 512 to 144 Ω cm for ZnO NRs and Sn:ZnO NRs, respectively. The low resistivity of Sn:ZnO NRs might be due to the introduction of tensile stress within the crystal lattice and vice versa [73]. The present I–V measurement suggests that Sn doping improved carrier concentration in the ZnO films, thereby resulting in the tensile stress and compressive strain of Sn:ZnO NRs [55, 56].

The responses of ZnO NRs and Sn:ZnO NR films toward ethanol gases are shown in Fig. 8. The measurement was conducted at 100 °C with 240 ppm ethanol gas in the detection chamber. The ethanol sensor response R can be defined as the ratio of the resistance of thin films in the air Ra to that in the target gas Rg, as shown in Eq. (15) [74, 75].

Fig. 8
figure 8

Sensor response of ZnO NRs and Sn:ZnO NRs to 240 ppm ethanol gas

$${\text{R}} = \frac{{{\text{R}}_{{\text{a}}} }}{{{\text{R}}_{{\text{g}}} }}.$$
(15)

Figure 8 shows that the Sn:ZnO NR-based sensor showed higher response than the ZnO NR-based sensor when exposed to ethanol gas. The measured responses of Sn: ZnO NRs and ZnO NRs were at 3.8 and 1.5, respectively. The result shows that the response of Sn:ZnO NR sample was double that of ZnO NRs. These results indicate that the sensor response increased when ZnO NRs were doped with Sn.

The sensing mechanism for n-type semiconductor sensors, such as ZnO NRs, is based on the reaction of tested gas with the oxide surface. First, the oxygen molecules from the atmosphere capture free electrons from the ZnO NRs such that adsorbed oxygen ions, such as O, O2 , and O2−, are generated on the nanorod surface depending on the sensor temperature. At low temperatures ranging from 25 to 150 °C, the interaction of the nanorod surface with atmospheric oxygen causes ionosorption as molecular species in the form of O2 ions. However, at high temperatures, atomic species in the form of O and O2− are commonly formed and adsorbed on the nanorod surface, with the O ions acting as dominant species. The O2 ions are normally terminated from the nanorod surface when the temperature rises above 350 °C [76]. The processes of oxygen reaction on the nanorod surface could be described in Eqs. (1619) [76,77,78,79].

$${\text{O}}_{{{\text{2(gas)}}}} \Leftrightarrow {\text{O}}_{{{\text{2(ads)}}}} ,$$
(16)
$${\text{O}}_{{{\text{2(ads)}}}} + {\text{e}}^{-} \Leftrightarrow {\text{O}}_{{{\text{2(ads)}}}}^{-} ,\quad ({\text{at }}25\,^\circ {\text{C}} \le {\text{T}}\le150\,^\circ {\text{C}})$$
(17)
$${\text{O}}_{{{\text{2(ads)}}}}^{ - } + {\text{e}}^{-} \Leftrightarrow {\text{2O}}_{{{\text{(ads)}}}}^{ - } {\text{,}}\quad \left( {{\text{at }}150\,^\circ {\text{C}} \le {\text{T}} \le 350\,^\circ {\text{C}}} \right)$$
(18)
$${\text{O}}_{{{\text{(ads}})}}^{ - } + {\text{e}}^{ - } \Leftrightarrow {\text{O}}_{{{\text{(ads)}}}}^{{2-}} ,\quad ({\text{at T}}> 350\,^\circ {\text{C}})$$
(19)

For Sn:ZnO NRs, a large number of adsorbed oxygen ions are expected to be on the nanorod surface because of the high electron concentration induced by Sn doping. Sn atom possesses four outer-shell electrons and acts as electron donor when introduced into the ZnO lattice such that the free electrons in the ZnO increase [28]. When ZnO was doped with Sn, the Sn was diffused into the ZnO lattice according to Eq. (20) [80].

$${\text{SnO}}_{2} \to {\text{Sn}}_{{{\text{Zn}}}}^{{ \bullet \bullet }} + {\text{V}}^{\prime\prime}_{{{\text{Zn}}}} + \frac{1}{2}{\text{O}}_{{2({\text{g}})}} + {\text{O}}_{0}^{{\text{x}}} ,$$
(20)

where \({\text{Sn}}_{{{\text{Zn}}}}^{{ \bullet \bullet }}\) represents the two positive charges of Sn4+ ions that occupy the Zn2+ site at the lattice and act as a donor; O2 is the oxygen molecule; O0 is the oxygen ion in the inherent lattice; x represents the neutrality of O0. The equation indicates that the Sn4+ ion occupies the Zn2+ ion site in the ZnO lattice because of the doping process of Sn into ZnO. The substitute Sn4+ ion acts as an impurity in the lattice such that the point defect is formed. To maintain the crystal lattice electroneutrality, the doping process needs to reach quasi-chemical balance by capturing two electrons such that positive \({\text{Sn}}_{{{\text{Zn}}}}^{{ \bullet \bullet }}\) charges (·· is a positive effect charge) can be induced in the film and act as an effective double donor. The \({\text{V}}^{\prime\prime}_{{{\text{Zn}}}}\) (″ is a negative effect charge) indicates double ionized Zn vacancy at Zn2+ site in the ZnO lattice. The oxygen vacancies Vo can act as double donors and contribute to free electrons, and they might be formed by Eq. (21) [68, 80].

$${\text{O}}_{{\text{0}}}^{{\text{x}}} \to {\text{V}}_{{\text{0}}}^{{\text{x}}} + {\text{2e}} + \frac{{\text{1}}}{{\text{2}}}{\text{O}}_{{{\text{2(g)}}}} .$$
(21)

Hence, Sn acts as a cationic dopant in the ZnO lattice to provide two free electrons and oxygen vacancies in the process. As discussed earlier, the PL spectra in Fig. 6 show that oxygen vacancies existed in Sn:ZnO NRs. Sinha argued that the Sn4+ ions substitute the Zn lattice sites such that the lattice distortion is severe and lattice defects are introduced, particularly oxygen vacancies [81]. These oxygen vacancies and other related defects in the ZnO lattice act as potential adsorption sites for atmospheric oxygen.

When the NRs are exposed to a reductive gas of ethanol, the ethanol immediately reacts with adsorbed oxygen ion species on the sensor element surface and releases back the trapped electrons to the conduction band. This reaction decreases NRs resistance. Therefore, significant resistance change were observed for Sn:ZnO NRs because of the excess of free electrons released by the reaction relative to undoped ZnO [82, 83]. Given that the measurement was operated at 100 °C, most of the adsorbed oxygen ions on the nanorod surface were in the form of O2 ions. The related chemical reactions for ethanol sensing could be described by Eq. (22) [1, 2, 76].

$${\text{C}}_{{\text{2}}} {\text{H}}_{{\text{5}}} {\text{OH}}_{{{\text{(gas)}}}} + {\text{3O}}_{{\text{2}}}^{ - } \Leftrightarrow {\text{3CO}}_{{{\text{2(gas)}}}} + {\text{3H}}_{{\text{2}}} {\text{O}}_{{{\text{(gas)}}}} + {\text{3e}}^{ - } .$$
(22)

The entire process of sensing mechanism of sensor element and ethanol gas is shown in Fig. 9. The sensing mechanism of ethanol gas is influenced by several factors; in the present case, the sensing mechanism is due to the surface state and defects that correlated with free electron and the surface area, which is related to nanorod crystallite size and the amount of oxygen absorption. The defect in Sn:ZnO NRs plays a role in improving the sensor response where Sn occupies the Zn lattice; accordingly, two free electrons and oxygen vacancy defects are produced in the process. This condition increases the gas sensor response. The PL measurement (Fig. 6) indicates that the oxygen vacancies could be formed dominantly in the ZnO lattice by Sn doping. These oxygen vacancies can act as preferential adsorption sites for ethanol molecules. An et al. mentioned that the adsorption energy of oxygen vacancies is three times stronger than the perfect site [84]. Therefore, the oxygen vacancies formed in the ZnO lattice can attract and tightly bind additional ethanol molecules, which induce more ionic charge than the defect-free ZnO film. In addition, Sn:ZnO NRs possessed an excess of free electrons, which could induce additional oxygen adsorption on the nanorod surface. The reaction of atmospheric oxygen molecules with free electrons to form adsorbed oxygen ions (O2 ) on sensor surface plays an important role in ethanol gas sensor. Therefore, the free electrons in Sn:ZnO NRs facilitate high density of oxygen adsorption to form adsorbed oxygen ions and additional adsorption site for ethanol gas. These adsorbed oxygen ions then react with ethanol molecules to release electron in the process. Therefore, significant changes in the current signal could be observed for the sensor after ethanol gas exposure compared with that of without ethanol gas. In addition, the crystallite and diameter sizes of Sn:ZnO NRs were smaller than those of ZnO NRs. Furthermore, the porosity of Sn:ZnO NRs was higher than that of ZnO NR samples as estimated from the porosity calculation in the Eq. 11 and observed through FESEM images. These conditions provide high surface area for Sn:ZnO NR samples to adsorb more oxygen and ethanol gas than ZnO NRs. As a result, the gas response of Sn:ZnO NR-based sensor was improved significantly than that of ZnO NR-based sensor.

Fig. 9
figure 9

Schematic of the ethanol sensing mechanism of Sn:ZnO NRs. a Sn doping facilitated free electron on the nanorod surface. b The free electrons were captured by oxygen molecules from the environment to form adsorbed oxygen ions on the nanorod surface such that the nanorod resistance could be increased. c Upon exposure to ethanol gas, ethanol molecules were adsorbed on the sensor surface. d The reaction between adsorbed oxygen ions and ethanol released back free electrons such that the resistance of the nanorods was reduced

The response and recovery times of sensors based on ZnO NRs and Sn:ZnO NRs were calculated using the response plot in Fig. 8. The response and recovery times are defined as response times taken to achieve 90% from the minimum/maximum response value. The response and recovery times of Sn:ZnO NRs were shorter than those of ZnO NRs. The average response/recovery times of Sn:ZnO NRs and ZnO NRs were 75 s/53 s and 87 s/62 s, respectively. These results suggest that the response and recovery times of Sn:ZnO NRs are shorter than those of ZnO NRs. The shorter response and recovery times of the Sn:ZnO NRs can be explained by the high porosity of Sn:ZnO NRs compared with those of ZnO NRs; this finding indicates high porosities that promote ethanol gas access. Higher porosity introduces a higher surface area, which enhances the diffusion of gas and increase gas adsorption on the nanorod surface. This condition has been shown previously in the mechanism process in Fig. 9. In addition, the small crystallite and diameter sizes in Sn:ZnO NRs facilitate a smooth movement of charge carriers across the surface; as a result, the sensing response and recovery times of Sn:ZnO NRs were lower than those of ZnO NRs. Moreover, the surface condition of ZnO NRs may be less sensitive to ethanol gas than that of Sn:ZnO NRs because of the lower electron concentration and lower cationic charge density of Zn2+ ions than those of Sn4+ ions. Based on the previous reports, the doping process with metal improved electron concentration of ZnO and improved the specific surface area of the sensor, which led to the higher response of ethanol sensors made by doped ZnO [85,86,87]. The generation of free electrons when doped with Sn and high cationic charge density of Sn4+ is attributed to the smaller ionic radius of Sn4+ ions than that of Zn2+; such generation is expected to improve the adsorption and desorption rates of ethanol in Sn:ZnO NRs. According to the literatures, the doping of ZnO with metal that has lower ionization energy than that of the Zn resulted in the enhancement of surface activity in the ethanol sensing [85, 88]. In our case, Sn dopant (709 kJ/mol) has lower ionization energy than that of the Zn (906 kJ/mol), which led to reduction of activation energy for ethanol adsorption on the nanorod surfaces [89]. In addition, by Sn doping, it produces an injection of electrons in the surface region of nanorods due to the oxidation of the ethanol, which attributed to the difference of work functions between the dopant (Sn: 4.42 eV) and the ZnO (4.5 eV) [85, 90, 91]. Subsequently, this condition helps reduce the response and recovery times of the Sn:ZnO NR-based sensor.

The repeatability and stability properties of the Sn:ZnO NR-based sensor were investigated by exposing ethanol gas toward the sensing material surface by several cycles. Figure 10 shows the completed response and recovery characteristics of the Sn:ZnO NR-based sensor over four cycles. The calculated response of Sn:ZnO NR-based sensor remained constant at approximately 3.8 over four cycles. This result indicates that the Sn:ZnO NR-based sensor presented good reversibility properties with each response and showed nearly identical value in four cycles after exposure to ethanol gas. Table 2 shows the comparison values of working temperature, sensor response, and response and recovery times for ethanol sensing performance based on the present samples and those of other studies.

Fig. 10
figure 10

Repeatability behavior of Sn:ZnO NRs to 240 ppm ethanol gas over four cycles

Table 2 Comparison of working temperature, response, and response and recovery times for ethanol sensing performance

4 Conclusions

The Sn:ZnO NRs were successfully grown on Mg–Al co-doped ZnO seeded layer-coated glass substrate using low-temperature solution immersion. The XRD pattern indicates that Sn:ZnO NR and ZnO NR counterparts present a hexagonal wurtzite structure, which preferentially grows along the (002) orientation. The Sn:ZnO NRs demonstrate smaller diameter, crystallite size, and thickness than ZnO NRs. The EDS and strain and stress analysis results reveal that Sn4+ ions are doped into ZnO NRs successfully. The Sn:ZnO NRs show compressive strain and tensile stress of −1.61% and 3.75 GPa, respectively. The bandgap and porosity of Sn:ZnO NRs are approximately 3.32 eV and 19%, respectively. The Sn:ZnO NR-based sensor presents a high response of 3.8 and low response/recovery times of 75 s/53 s to 240 ppm of ethanol gas at 100 °C. These results indicate that the doping of Sn improves the sensing performance of ZnO NRs effectively.