Introduction

In recent years, air pollution is a major problem due to industrialization and urbanization. All over the world many researchers are focusing their interest in monitoring and preventing air pollution. Most of the researchers used materials like metal oxides, and polymers to solve this major problem. Recently, nanostructured metal oxides are used as a sensor for environmental and biological monitoring due to its excellent properties and also its cost-effectiveness. Shaghayegh Farzi-kahkesh et al. [1], Yanlei Cui et al. [2], and Patil et al. [3] worked on nanostructured metal oxides proved their improved sensing performance toward toxic gases. Ammonia is a natural gas released from agriculture and animal waste, which can affect human, animal, and environmental health. So monitoring and sensing the NH3 gas is essential for safety purposes. The metal oxide gas sensors are promising candidates for measuring the parameters regarding air pollution. Some of the metal oxides (MOs) such as ZnO, TiO2, WO3, and SnO2 are the materials used for sensing. Among these metal oxides, SnO2 is an extensively used gas-sensing material. It has n-type with high direct bandgap (~ 3.6 eV), moderate electrical conductivity, low cost, and high-exciton binding energy [4]. Tin oxide crystals show oxygen vacancy and interstitial oxygen atoms that are responsible for the exciting properties of SnO2 films [5, 6]. It is an utmost striking semiconductor material among the variety of MOs, and has the potential for the detecting the toxic gases [7]. SnO2-based gas sensors have been studied for the detection of a variety of gases [8]. Recently Jae-Hun Kim et al. [9] prepared Sb-loaded SnO2 nanowires which exhibited better sensing capability due to surface defects. Kelin Hu et al. [10] manufactured plasma-treated Pd-induced SnO2, and Mingming Zhu et al. [11] synthesized Ho-loaded SnO2 and showed excellent gas-sensing properties due to the generation of oxygen vacancies. In addition to this, few researchers organized nanocomposites such as PdO/SnO2/CuO [12], rGO/SnO2 [13], SnO2/NiO [14], and SnO2–In2O3 [15] boosted the gas-sensing behavior due to the formation of heterojunction. However, all the mentioned materials have showed gas-sensing response between 100 and 200 °C.

Sensitivity, selectivity, and stability are the three key parameters for measuring gas-sensing properties. Sensitivity is a key feature of a gas sensor that needs to be improved in a low-temperature range. Several researchers have made attempts to enhance the sensitivity and stability of SnO2 with the doping of certain noble metals. Therefore, nanostructured SnO2 has been extensively used because of the sensing material attributable to the very huge surface area, availability of ample surface states, and improved surface reactivity [16]. Nonetheless, there are some flaws in SnO2-based gas sensor such as poor selectivity, sensitivity, and it needs high-operating temperature. It is worth to mention that the sample operated at a higher temperature will increase the cost of the gas sensor and operated temperature can affect the nanostructure of the material resulting in a poor gas response. Apart from these while sensing the hot material the harmful gases may catch fire easily [17]. So it is always better to fabricate a room-temperature gas sensor. Several approaches, such as doping and morphology, play a crucial role in improving the gas-sensing properties of SnO2 nanostructure at 300 K [18,19,20,21,22]. Doping alters the structural and opto-electrical nature of the SnO2. Rare-earth metals such as Gd, Tb, Y, Nd, and Er were widely used to improve SnO2 gas sensitivity and selectivity. Moreover, research related to the review of the gas-sensing characteristics of metal oxides doped by rare-earth metals is not detailed enough. Few reports are available for doped SnO2 sensors and they suggests that rare-earth dopants can considerably improve the response of the SnO2-based sensor [23, 24]. Chikhale et al. reported that the co-precipitation synthesized 3% SnO2-La nanopowder, which exhibited an improved acetone gas-sensing performance compared to pure SnO2 [25]. Sankar et al. prepared Ru:SnO2 thin films for sensing of NH3 by spray method, in which 10% of Ru-doped films showed the highest response toward ammonia operated at 250 °C [26]. Han Wu et al. studied NH3 sensing through tin monoxide nanoshells for different ppm levels in which the highest response was achieved for 200 ppm [27]. Li et al. reported that electrospinning-synthesized 0.6% Pr-SnO2 hollow nanofibers have the highest response of ethanol sensing at 300 °C, compared to pure sample [28].

To our knowledge, for Er-doped SnO2 thin films that could be operated at room temperature for sensing NH3is not available. High-operating temperatures have always been a major issue for sensing purposes. To detect low-level concentration, fast response and recovery time at 300 K are also important. We prepared SnO2:Er thin films using the nebulizer spray pyrolysis (NSP) route for the application of ammonia sensors for the achievement of these objectives. While NSP is one of the best methods to construct thin films for tin oxide compared to other methods like RF sputtering, SILAR, sol–gel method, and chemical bath deposition. It is considered as one of the most convenient methods because of its ease of operation, vacuum less route, easy to add doping elements, uniform coatings on a large area, no need for thermal annealing to get better crystalline films [26, 29]. Hence this work focuses on generating SnO2:Er thin films using the NSP technique and its features for the ammonia gas sensor.

Result and discussions

Structural analysis

Figure 1 illustrates the XRD pattern of SnO2:Er thin films coated with various Er doping concentrations. The XRD peaks of the prepared samples appeared at (110), (101), (200), (211), (220), (310), and (301). These observed diffraction peaks signify the polycrystalline nature of the prepared samples with the rutile tetragonal structure (JCPDS card No. 41-1445). No additional peaks are found corresponding to erbium and erbium oxide. This suggests that the doped material Er3+ is incorporated well with Sn4+ lattices. All the films have preferential orientation along with (110) hkl planes. A similar phenomenon was reported by Boben Thomas et al. [30] for Ce-doped SnO2 thin films. From the XRD, it is observed that the intensity of the preferential orientation peaks is decreased and broadened with Er doping concentration increase, which indicates the shrinkage of grain size as shown in Fig. SI (see supporting information). This reduction shows the successful incorporation of the doping element in the host lattice. The grain size of the thin films was evaluated using Debye–Scherer’s equation [31,32,33,34],

$$D = \frac{0.9\lambda }{{\beta \cos \theta }}$$
(1)
Figure 1
figure 1

X-ray diffraction patterns of SnO2:Er thin films with different Er doping concentrations.

Here all codes are well-recognized. The determined grain size values are ~ 13, 11, 11, and 10 nm for Er concentration from 0 to 5 wt%, respectively. The lesser grain size gives a bigger surface to volume ration for oxygen adsorption and gas exposure that improves the gas–solid interface possibility, thus improving the response. The lessening in the values of grain size can be attributed to the incorporation of larger ionic radii of Er3+ ions (0.881 Å) as compared to Sn4+ ions (0.69 Å) [35]. The reason for peak enlargement can be attributed to the reduction in the size of the grains and the strain present in the lattice due to the expansion of the lattice. This implies that the crystalline nature of the thin films is slightly reduced by adding Er content as well as increase of strain and dislocation density. This indicates that the doping Er content has increased the strain of SnO2 films in their positions. The decrease in grain size with Er doping is in good agreement with earlier reports of Gurpreet Singh et al. [16] and Conti et al. [36].

The SnO2 films defects, such as strain (ε) and number of dislocations (δ) were estimated using Eqs. (2) and (3) [37,38,39,40,41,42]:

$$\varepsilon = \frac{\beta \cot \,\,\theta }{4}$$
(2)
$$\delta = \frac{1}{{D^{2} }}$$
(3)

The calculated structural parameter values of pure SnO2 and SnO2:Er films are given in Table 1. The observed changes of strain due to the point defect and crystallite size are in accordance with literature [43]. The higher ε and δ values noticed on erbium doping indicates the defect generation in films which support for the promotion of vapor sensitivity by NH3 adsorption due to the defect centers.

TABLE 1 Film thickness, lattice constants, and structural parameters of SnO2:Er thin films.

Lattice constants “a” and “c” of the tetragonal phase of SnO2 and unit cell volume “V” were calculated from relations [44, 45]:

$$\frac{1}{{d^{2} }} = \left\{ {\frac{{h^{2} + k^{2} }}{{a^{2} }}} \right\} + \left\{ {\frac{{l^{2} }}{{c^{2} }}} \right\}$$
(4)
$$V = a^{2} c$$
(5)

where (hkl) is miller indices and d is the inter-planer distance. The lattice constants and unit cell volume values are rising slowly with increasing the Er concentration. The increase of lattice constants “a” and “c” due to the replacement of Sn4+ ions by Er3+ ions introduces stress in the system. The calculated values are listed in Table 1.

Surface topography analysis

Figure 2 depicts the 3D AFM images of spray pyrolysis-coated SnO2:Er films. The pristine and doped SnO2 thin films have fairly spherical shaped grains along with some bigger grains unevenly spread over the film surface. The roughness of the films was calculated from IA_9 software installed with the system and noticed to increase as 90, 100, 115, and 120 nm, when Er doping concentrations increase from 0, 1, 3, and 5 wt%, respectively. The film with high roughness promotes the high sensing property.

Figure 2
figure 2

AFM 3D images of (a) pure, (b) 1%, (c) 3% and (d) 5% SnO2:Er thin films.

Compositional analysis

We have conducted a detailed study on the distribution of elements through EDX and elemental mapping to access the existence of erbium found in SnO2 thin films. Figure 3a–e displays elemental mapping and EDX image of 5 wt% Er-doped SnO2 thin film. As can be seen in the result of the elemental mapping in Fig. 3b–d, Sn, Er, and O elements are contained and homogeneously distributed in the erbium-incorporated SnO2 samples. Since no impurity phases are detected in the XRD spectrum, it suggests that erbium atoms could be integrated into SnO2 thin films. The weight % of the elements such as Sn = 52.46%, O = 42.73%, and Er = 4.81% is observed from EDX spectrum.

Figure 3
figure 3

(a) SEM image, (b–d) elemental mapping and (e) EDX spectrum of SnO2:Er(5%) thin film.

Photoluminescence analysis

Figure 4 displays the room-temperature PL spectra of different doping levels of SnO2:Er thin films obtained in the range of 350–600 nm using 325 nm excitation wavelength. The emission spectrum is composed of 365, 402, and 468 nm emission peaks. The peak strength is decreased with the concentration of doping. The near band edge (NBE) emission of SnO2 is observed at 365 nm (3.39 eV) [46]. The violet peak at 402 nm (3.08 eV) is associated with a doubly ionized oxygen vacancy [47]. The blue peak of 469 nm (2.64 eV) is appeared due to the presence of a singly modified oxygen vacancy [48]. Furthermore, PL intensity is decreased due to a decrease in the crystallinity of the film with increasing doping concentration. These smaller crystallites of the film can promote quick response and recovery time [49].

Figure 4
figure 4

PL spectra of SnO2:Er thin films with different Er doping concentrations.

UV–Vis analysis

The optical transmittance spectra of SnO2:Er thin films is reported in Fig. 5a. The decreasing optical transmittance of the SnO2:Er film with increasing Er doping concentration is may be due to an increase in film roughness, which enhances the gas-sensing property. The optical bandgap (Eg) was obtained from Tauc’s equation [50, 51]:

$$\alpha h\nu = A\left( {h\nu - E_{{\text{g}}} } \right)^{1/2}$$
(6)
Figure 5
figure 5

(a) Transmission, (b) Tauc’s plots of SnO2:Er thin films with different Er doping concentrations.

where α is coefficient of absorption, ν is frequency of incident photons, and Eg is energy gap between the valance band and conduction band in the prepared thin films. The optical bandgap (Eg) which can be calculated from the extrapolation of the linear section of (αhυ)2 vs. plot. Figure 5b illustrates (αhυ)2 vs. photon energy plots of SnO2 thin film as a function of Er3+ doping concentrations. The energy axis intercept gives Eg values, which is decreased from 3.59 to 3.26 eV with the increase in erbium doping concentrations [52]. This is due to oxygen vacancies like defects created due to smaller grain size [53].

Ammonia vapor-sensing analysis

In this current investigation, initially, we studied the selectivity of Er-doped SnO2 thin films through different toxic gases which pollute the environment at room-temperature condition. The NSP prepared samples were subjected to numerous volatile organic compounds (VOCs) such as toluene (C7H8), acetone ((CH3)2CO), isopropanol (C3H8O), methanol (CH3OH), ethanol (C2H5OH), and ammonia (NH3) with the concentration of 25 ppm, are shown in Fig. SII (see supporting information). The minimum response was observed for toluene (C7H8), acetone ((CH3)2CO), isopropanol (C3H8O), methanol (CH3OH), ethanol (C2H5OH), and the maximum response was observed for ammonia. From this result, we found that the present SnO2:Er thin films show a notable response toward ammonia gas. To find out the sensitivity, the prepared Er-doped SnO2 films were exposed to 25 ppm of NH3, at 300 K. The sensitivity versus Er doping concentration for SnO2:Er-based sensor is shown in Fig. 6a. A wide range of sensitivity values of 79, 82, 85, and 91% have been found for SnO2-based (Er = 0, 1, 3 ,and 5%) sensor. This can be due to the formation of nanograins with a rough surface by Er doping, which promotes the inner-grain interaction among gas and film material surface and hence the gas sensitivity has considerably increased. Figure 6b shows the switching behavior of SnO2 thin film. An analogous switching response of MOs-based sensors for NH3 was also documented by Khun et al. [54] and Petrov et al. [55]. Figure 6c, d indicates the response (tres) and recovery time (trec) properties of SnO2:Er films prepared at different doping concentrations (Er = 0, 1, 3, and 5 wt%) toward various NH3 concentrations. It is evident that tres and trec decrease systematically for Er-doped films and also the tres decreases, and trec rises when increasing the ammonia concentration from 25 to 125 ppm. It can be attributed to an increase in surface roughness and reduction in crystallite size due to Er doping, which greatly promotes the absorption of oxygen on the sensor surface significantly. The obtained response time and recovery time values are shown in comparison Table 2. It indicates 5 wt% Er-doped SnO2 thin film exhibited rapid response time (~ 29 s) and quick recovery time (~ 7 s) toward 25 ppm of ammonia vapor. These obtained values are lower with SnO2-based sensor with response/recovery time of 175/210 [54] and 10/30 min [56].

Figure 6
figure 6

(a) Sensitivity, (b) switching behavior of pure SnO2 film, (c) response time and (d) recovery time toward various concentrations of NH3 of SnO2:Er thin films.

TABLE 2 Sensitivity, response, and recovery times of various materials toward NH3 sensing.

Figure SIII (see supporting information) depicts the sensing features of 5 wt% SnO2:Er thin film for various NH3 contents at room-temperature operating conditions. Sensitivity is increased considerably as ammonia vapor increases from 25 to 125 ppm. The adsorption of higher number of gas fragments and their reaction on surface of SnO2:Er(5%) sites may be accountable for high sensitivity to NH3 gas. The reusability of the sensing sample was analyzed for 5 wt% SnO2:Er thin film for 5 cycles and is shown in Fig. SIV (see supporting information). It exhibited good repetition property without an obvious change in their ammonia gas response. The long-term stability of the device is an important parameter for any sensing materials. Figure 7 shows the resistance graph for air and various ppm level of ammonia of pure and SnO2:Er films at room temperature observed over 50 days. From this graphical result, we observed that the repeatability and reversibility of the redox reaction on the surface of the film.

Figure 7
figure 7

Stability of SnO2:Er(5%) thin film tested over a period of 50 days with various concentrations of NH3.

Ammonia gas-sensing mechanism

The sensing nature of gas of SnO2:Er films is explainable through oxygen adsorption on surface of SnO2 by exposure to reducing ammonia vapor. Before NH3 vapor exposes, the depletion region generated owing to e-trapping by O-molecules and increases the surface resistance of the SnO2 layer. At the time of NH3 vapor expose to the surface of the film, which is adsorbed on the SnO2 surface, a large number of electron–hole pairs produced, thus the carrier concentration in the SnO2:Er thin film rises thereby reducing the depletion region (Fig. 8). The NH3 oxidation on surface of SnO2 is given as follows:

$${\text{2NH}}_{{3}} + {\text{3O}}^{ - } \to {\text{N}}_{{2}} + {\text{3H}}_{{2}} {\text{O}} + {\text{3e}}^{ - }$$
(7)
$${\text{4NH}}_{{3}} + {\text{5O}}_{{2}}^{ - } \to {\text{4NO}} + {\text{6H}}_{{2}} {\text{O}} + {\text{5e}}^{ - }$$
(8)
Figure 8
figure 8

Possible mechanism for the adsorption of (a) air and (b) NH3 molecules on the SnO2:Er surface at room temperature. (Green color spherical shape indicates SnO2:Er grain and blue color spherical shape indicates electron depletion layer).

Equations (7) and (8) reveal that the free trapped electrons in adsorptive conditions consequences in enhancing of current on reacting the NH3 with oxygen. Generally, the degree of sensing retort is based on two aspects: (1) quantity of captured electrons from CB by adsorbed oxygen and (2) quantity of released electrons from the oxygen (O) adsorbed on reacting to NH3. Based on these facts, nearly all apprehended electrons are freed from adsorbed-O that signify that NH3 gas can accomplish a central role in exchange of electrons. It is also interesting to note that at higher levels of Er content the response factor is increased due to the small grain size, rough surface, and high surface area and creation of acceptor level due to replacement of Sn4+ ions by Er3+ ions. Petrov et al. [55] proposed a novel mechanism of negative charges transferred from the silver atom to the oxygen because the electronegativity of oxygen is higher than that of silver. Thus a new adsorption active center is created on the surface of the film to promote the sensing property. Rani et al. [57] observed the higher response for high-Fe content in SnO2 due to the effect of the reduced crystallite size. Tone et al. [58] observed the sensitivity of SnO2 film is due to the increase of depletion layer thickness by creation of Schottky/p–n junctions and expansion of this layer in the film improving the gas-sensing sensitivity. Shao et al. [59] reported a higher response of the SnO2 sensor is attributed to the sensitization effects of Sb2O3 and Sb2O5 by Sb doping. In this study, an increased gas sensitivity produced by Er doping is due to low grain size and surface roughness and these factors promote a relatively large number of oxygen ions to be adsorbed and produce high performance.

Conclusion

Rare-earth metal erbium-doped SnO2 films were fabricated by the NSP method at 400 °C. The XRD, AFM conforms that the Er doping greatly affects the crystallite size and morphology. The ammonia vapor-sensing study was found to be enhanced by Er doping. The SnO2:Er (5%) sensor exhibits the highest sensitivity of 91% to 25 ppm of ammonia vapor at room temperature with rapid response and recovery time. These results indicate that SnO2:Er (5%) sensor has a potential application for manufacturing a cost-effective and high-performance room-temperature ammonia vapor sensor.

Experimental section

Preparation of SnO2:Er thin films

Tin(IV) chloride pentahydrate (SnCl4·5H2O), erbium(III) nitrate pentahydrate (Er N3O9·5H2O), and methanol have been used as a precursor and solvent for preparing the SnO2:Er films. The glass substrates were first thoroughly cleaned with distilled water then rinsed with acetone. Finally, the substrates were soaked in chromic acid for 20 min. For the coating of Er-doped SnO2 thin films, 0.1 M of SnCl4·5H2O and the required amount of doping material Erbium(III) nitrate pentahydrate (0, 1, 3, and 5 wt%) was added and dissolved in 10 ml of methanol. The precursor solution was continuously stirred for 30 min, and we obtained the homogeneous solution. The formulated solution was sprayed onto a 400 °C pre-heated substrate using a nebulizer spray setup [60]. Once the precursor solution is sprayed on a hot substrate, the thin film was formed by pyrolytic decompose and chemical reactions.

Characterization techniques

The following characteristic studies were carried to study structure, morphology, and other characteristics of SnO2:Er films. Table SI (see supporting information) displays the list of instruments and their parameters applied in current study. The output of the SnO2:Er thin-film ammonia vapor sensor was measured in the room-temperature test chamber. The registered quantity of ammonia vapor was sent into test chamber and resistance was measured by the Keithley electrometer w.r.t. time at various concentrations of Er doping. The sensor sensitivity was determined by following equation [54]:

$${\text{Sensitivity}} = \left\{ {\frac{{R_{{\text{a}}} - R_{{\text{g}}} }}{{R_{{\text{a}}} }}} \right\} \times 100\%$$
(9)

where Ra and Rg reflect resistance in air and gas atmospheric testing, respectively. In this case, the time of response of the prepared sensor is determined by means of time needed for resistance to exceed 90% of the steadiness value once the ammonia gas is applied and time of recovery is recorded by means of time essential for sensor to achieve 10% resistance higher than unique value in air.