Exploitation of SnO2/Polypyrrole Interface for Detection of Ammonia Vapors Using Conductometric and Optical Techniques: A Theoretical and Experimental Analysis

This study describes the construction of a lab-built Surface Plasmon Resonance (SPR) system for gas sensing applications employing a highly sensitive and trustworthy optical approach. The nanocomposite thin film of tin oxide (SnO2) and Polypyrrole (PPy) were prepared for sensing highly toxic gas, i.e., ammonia (NH3) gas. The gas sensor was validated by both optical and conductometric techniques of gas sensing. The optical SPR gas sensor is based on the change in refractive index at the SnO2/Polypyrrole (PPy) interface with gas adsorption (NH3). The thickness of SnO2 and Polypyrrole thin films was optimised using theoretical calculations for a sharp SPR reflectance curve. The manuscript also offers theoretical SPR curves for different PPy and SnO2 layer thicknesses. To support the theoretical conclusions, the effects of NH3 gas on the prism/Au/SnO2/Polypyrrole system were also investigated experimentally. In comparison to other research described in the literature, it was observed that the constructed sensor’s sensitivity was higher. The obtained results demonstrate the utility of the SPR setup in the investigation of the interactions of adhered gas molecules with dielectrics and gas sensing. For conductometric gas sensing studies, the film having optimised thicknesses for sharp SPR reflectance curves was separately prepared on Interdigitated Electrodes. At a low working temperature of roughly 150 °C, the sensing response of the constructed film was observed and found to be maximal (60).


Introduction
The scientific community has been working to develop effective gas sensors for several decades in order to safeguard the environment and workplaces from harmful and deadly gas leaks [1,2]. Technologies for sensing gases come in a variety of forms, such as conductometric and optical sensing. On the other hand, conductometric sensing technology has a number of limitations, such as the requirement for elevated temperature, high energy consumption, and poor selectivity. Therefore, the development of an efficacious gas sensor based on optical sensor systems is the answer to this problem [3]. It is preferable to use optical sensors since they may operate at room temperature and use less energy [4]. Numerous optical techniques, such as infrared spectroscopy [5], ultraviolet-visible spectroscopy [6], ellipsometry [7], and SPR [8], are accessible for sensing applications. Compared to all other methods, optical gas sensors based on SPR have many advantages. SPR-based optical gas sensors provide great benefits over all other approaches, including easy fabrication of samples, sensing operation effective at room temperature, achieves lowest detection limits, good selectivity, and high responsiveness. Using the Kretschmann arrangement, investigators have deposited a gas-sensitive film on top of a metal layer to use the SPR technology for applications involving gas sensing [9][10][11]. However, the response obtained by the developed sensor is poor. As a result, optimizing the thickness of the detecting layer When light is reflected from metal/dielectric surfaces, Fresnel's equations can be utilised to characterise the behaviour of the reflected light intensity as a function of angle of incidence (angular interrogation mode). Theoretical reflectance values for one-layer (prism + metal + air) and two-layer (prism + metal + dielectric + air) systems, respectively, are used to calculate the dielectric constant (or refractive index) of the metal and dielectric layer [28]. The following is an explanation of the theoretical Fresnel's equations used to simulate the graphs. For the (prism + Au + air) system, which is a single layer system with a metal (Au) sheet of thickness d 1 , the reflectance at an incident angle is given by R 014 = r 01 r 14 exp(2ik z1 d 1 ) 1 + r 01 r 14 exp(2ik z1 d 1 ) and k zi = 2π where λ is the wavelength of the incoming light and ε i with i = 0, 1, and 4 are the corresponding dielectric constants of the glass prism, Au film, and air.
Given known values of ε 0 = (1.517) 2 and ε 4 = 1.0 Equations (1)-(3) were used to obtain the theoretical SPR data, with the imaginary component (11.9 + 1.2 i) representing the dielectric loss of the Au thin film and ε 1 (= ε 1 ' + jε 1 ") serving as the dielectric constant. For the (prism + Au + SnO 2 + air) system, a two-layer system with an Au film of thickness d 1 and a SnO 2 film of thickness d 2 might provide the predicted SPR graph. For the (prism + Au + SnO 2 + air) system, the reflectance R 0124 is given by where r 124 = r 12 + r 24 exp(2ik z2 d 2 ) 1 + r 12 r 24 exp(2ik z2 d 2 ) where r ik and k zi are determined by (2) and (3), respectively, and ε 2 and d 2 are the complex dielectric constant and thickness of the thin SnO 2 layer, respectively. The subscripts 0, 1, 2, and 4 stand for various media, including, successively, a glass prism, an Au film, a SnO 2 film, and air. The literature is used to determine the SnO 2 thin film's dielectric constant, which is ε 2 (=ε 2 ' + jε 2 "). The reflectance for (prism + Au + SnO 2 + PPy + air) structures, having a three-layer system (Polypyrrole, SnO 2 thin films and Au layer), is given as where r 1234 = r 12 + r 234 exp(2ik z2 d 2 ) 1 + r 12 r 234 exp(2ik z2 d 2 ) where r ijk , r ik , and k zi are supplied by (5), (2), and (3), respectively, while subscript 0, 1, 2, 3, and 4 indicate the various media, including the prism, Au layer, SnO 2 film, PPy film, and air, respectively. On the surface of the SnO 2 thin film, d 3 and ε 3 represent the average thickness of the PPy thin film and the complex dielectric constant, respectively. The value of the PPy thin film's complex dielectric constant (ε 3 = ε 3 ' + jε 3 ") was obtained from published sources.

Materials and Methods
This work prepared the film' multilayer structure. First, using thermal evaporation and the specifications described in our earlier research [29], an optimal Au thin film was formed on a glass prism. The SnO 2 film was then applied to the Au coated prism. SnO 2 nanoparticles were synthesised using the sol-gel process, and, subsequently, thin films were created using the spin coating approach [30]. Finally, thin PPy layers were applied to this framework. PPy nanoparticles were synthesized chemically, and films were prepared via a spin coater [30].
Excitation of Surface Plasmon (SP) modes were achieved using a right-angled BK-7 glass prism (n p = 1.517) in Kretschmann configuration. A p-polarized He-Ne laser (=633 nm for the (prism + Au + SnO 2 + PPy + air system) was employed as the excitation source. To estimate the SPR response, the reflected light was observed as a function of incidence angle. A separate attachment of a gas cell was prepared such that gas vapours directly hit the gas sensitive-coating (prism + Au + SnO 2 + PPy). The cell was first vacuumed, then a target gas of NH 3 at a particular concentration was introduced via the intake valve. Both static and dynamic testing procedures were used. The target gas was positioned within the gas cell for the full range of incidence angles, while the SPR reflectance curve was recorded in the static mode using an optical power metre and rotating stage. A CCD camera was utilised for dynamic measurements to record the response's fluctuation over time (PC interfaced).
The multilayer thin film structure of PPy/ZnO was formed on Platinum (Pt) Interdigitated Electrodes. Using this measurement technique, the variation in the resistance of the sensor was measured in response to the target gas of fixed concentration.

Optimization of SnO 2 and PPy Thicknesses
Theoretical SPR reflectance curves obtained from Fresnel's equations as described in the theoretical section for the prepared systems are presented in Figure 1. As the number of layers increased, i.e., when SnO 2 was deposited on the Au-coated prism and when PPy was deposited on the (SnO 2 + Au + prism) surface, the resonance angle increased. This was attributed to the variation in the refractive index of the sensing layer (SnO 2 + PPy layer).

Materials and Methods
This work prepared the film' multilayer structure. First, using thermal evaporation and the specifications described in our earlier research [29], an optimal Au thin film was formed on a glass prism. The SnO2 film was then applied to the Au coated prism. SnO2 nanoparticles were synthesised using the sol-gel process, and, subsequently, thin films were created using the spin coating approach [30]. Finally, thin PPy layers were applied to this framework. PPy nanoparticles were synthesized chemically, and films were prepared via a spin coater [30].
Excitation of Surface Plasmon (SP) modes were achieved using a right-angled BK-7 glass prism (np = 1.517) in Kretschmann configuration. A p-polarized He-Ne laser (=633 nm for the (prism + Au + SnO2 + PPy + air system) was employed as the excitation source. To estimate the SPR response, the reflected light was observed as a function of incidence angle. A separate attachment of a gas cell was prepared such that gas vapours directly hit the gas sensitive-coating (prism + Au + SnO2 + PPy). The cell was first vacuumed, then a target gas of NH3 at a particular concentration was introduced via the intake valve. Both static and dynamic testing procedures were used. The target gas was positioned within the gas cell for the full range of incidence angles, while the SPR reflectance curve was recorded in the static mode using an optical power metre and rotating stage. A CCD camera was utilised for dynamic measurements to record the response's fluctuation over time (PC interfaced).
The multilayer thin film structure of PPy/ZnO was formed on Platinum (Pt) Interdigitated Electrodes. Using this measurement technique, the variation in the resistance of the sensor was measured in response to the target gas of fixed concentration.

Optimization of SnO2 and PPy Thicknesses
Theoretical SPR reflectance curves obtained from Fresnel's equations as described in the theoretical section for the prepared systems are presented in Figure 1. As the number of layers increased, i.e., when SnO2 was deposited on the Au-coated prism and when PPy was deposited on the (SnO2 + Au + prism) surface, the resonance angle increased. This was attributed to the variation in the refractive index of the sensing layer (SnO2 + PPy layer).    Figure 2 illustrates the SPR reflectance curve for the multilayered (prism + Au + SnO 2 + PPy + air) system by changing the thickness of SnO 2 . Figure 2 shows that the lowest reflectance and observed fluctuation of resonance angle are both displayed. As noted  Figure 2 illustrates the SPR reflectance curve for the multilayered (prism + Au + SnO2 + PPy + air) system by changing the thickness of SnO2. Figure 2 shows that the lowest reflectance and observed fluctuation of resonance angle are both displayed. As noted from Figure 2, the resonance angle increases from 42.8° to 47.5°, whereas the minimum reflectance decreases from 0.08 to 0.01, with an increase in thickness of SnO2.  Table 1 lists the values of FWHM with the thickness of the SnO2 film. FWHM increases with thickness, having minimum value for the lowest value of thickness. As a result, 100 nm thick SnO2 SPR has the lowest FWHM (or absorption losses), making it the ideal SnO2 layer thickness.

Thickness of SnO2 (in nm)
Full   Table 1 lists the values of FWHM with the thickness of the SnO 2 film. FWHM increases with thickness, having minimum value for the lowest value of thickness. As a result, 100 nm thick SnO 2 SPR has the lowest FWHM (or absorption losses), making it the ideal SnO 2 layer thickness.   Table 2 shows the values of FWHM with thickness for the PPy layer. As observed from the studies, the system having a 300 nm thick PPy layer with minimum FWHM (or absorption losses) is the optimized system.   Table 2 shows the values of FWHM with thickness for the PPy layer. As observed from the studies, the system having a 300 nm thick PPy layer with minimum FWHM (or absorption losses) is the optimized system.

SPR Gas Sensing Experimental Studies
Before performing the experimental gas sensing studies on the prepared sample, the characterisation studies, i.e., XRD and AFM, were also included. Figure 4a shows the XRD spectra indicating the crystalline growth of SnO 2 thin film and PPy thin film having amorphous structure but does not show any peak in the spectra. Using Scherrer's formula along the prominent (101) peak, the crystallite size of the nanocomposite SnO 2 /PPy thin film with 100 nm and 300 nm thicknesses of SnO 2 and PPy, respectively, was calculated. It was found to be around 5.2 nm. The surface morphology of the produced sample with uniformly dispersed crystallites is seen in the AFM picture in Figure 4a.The porosity of the sample was also found to be high. Characterisation studies confirmed that the sample was optimized for a higher sensing response due to high porosity and uniformly distributed crystallites. Figure 4a shows the schematic of SPR gas sensor having metal/dielectric interface as (Au + SnO 2 + PPy), the Multi layered sensing element. Surface Plasmon Wave was generated at the interface of Au/SnO 2 propagating along the interface. Fixed concentration of NH 3 gas was exposed to the surface of the (prism + Au + SnO 2 + PPy) system. Utilizing the optimized system (prism + Au + SnO 2 + PPy + NH 3 ), the gas sensing results were obtained by exposing the sensing with different concentrations of NH 3 gas (0 to 200 ppm) and the recorded variation is shown in Figure 4b. With a rise in NH 3 gas concentration from 1 to 200 ppm, a consistent change in the SPR Resonance angle toward a higher angle was seen from 40.7 • to 51.1 • (Figure 4b). This ongoing change was caused by the changes in the SnO 2 thin film's refractive index due to the adsorption of reducing NH 3 gas at various concentrations.
The resonance parameters (θ SPR , R min and FWHM), as evaluated from SPR curves in Figure 4b, are plotted in the respective graphs of Figure 5a-c. Theoretical evidence indicates that the shift in resonance that was seen experimentally is associated with the change in the effective refractive index of the (SnO 2 + PPy) sensing interface brought on by the adsorption of reductive NH 3 gas at various concentrations. Up to 10 ppm of NH 3 gas concentration, both θ SPR and R min , linearly increased. When the concentration of NH 3 gas increased further, they saturated, suggesting that there was no discernible change in the effective refractive index. A similar variation in FWHM of SPR was recorded. The resonance parameters (θSPR, Rmin and FWHM), as evaluated from SPR curves in Figure 4b, are plotted in the respective graphs of Figure 5a-c. Theoretical evidence indicates that the shift in resonance that was seen experimentally is associated with the change in the effective refractive index of the (SnO2 + PPy) sensing interface brought on by the adsorption of reductive NH3 gas at various concentrations. Up to 10 ppm of NH3 gas concentration, both θSPR and Rmin, linearly increased. When the concentration of NH3 gas increased further, they saturated, suggesting that there was no discernible change in the effective refractive index. A similar variation in FWHM of SPR was recorded.

Sensing Mechanism
There are two major factors behind the detection of NH3 gas molecules using the (Au + SnO2) sensing layer. First, the change in the semi-infinite dielectric medium from air to gaseous molecules with a greater index of refraction for Ammonia (NH3). Secondly, an increase in the refractive index reactive layer of gas with a rise in the concentration of adsorbed NH3 gas molecules. The basic reason for the rise in the sensing layer's refractive index, i.e., SnO2 is that the SnO2 reduced after interacting with NH3 gas molecules. After reduction, oxygen molecules were released from the film surface, hence the trapped electrons. This finally led to an increase in the thin-film SnO2's refractive index.
The calibration curve of the prepared sensor, i.e., variation in effective index of (SnO2 + PPy) interface versus concentration, is shown in Figure 6a. As noted from Figure  6a, the refractive index linearly increases until 10 ppm. As a result, a different graph is constructed in Figure 6b for the variable refractive index with increasing concentration up to 10 ppm (b). The curve was fitted linearly, and the sensitivity value was determined by the calibration curve's slope, i.e.,4.5 × 10 −3 RIU/ppm.

Sensing Mechanism
There are two major factors behind the detection of NH 3 gas molecules using the (Au + SnO 2 ) sensing layer. First, the change in the semi-infinite dielectric medium from air to gaseous molecules with a greater index of refraction for Ammonia (NH 3 ). Secondly, an increase in the refractive index reactive layer of gas with a rise in the concentration of adsorbed NH 3 gas molecules. The basic reason for the rise in the sensing layer's refractive index, i.e., SnO 2 is that the SnO 2 reduced after interacting with NH 3 gas molecules. After reduction, oxygen molecules were released from the film surface, hence the trapped electrons. This finally led to an increase in the thin-film SnO 2 's refractive index.
The calibration curve of the prepared sensor, i.e., variation in effective index of (SnO 2 + PPy) interface versus concentration, is shown in Figure 6a. As noted from Figure 6a, the refractive index linearly increases until 10 ppm. As a result, a different graph is constructed in Figure 6b for the variable refractive index with increasing concentration up to 10 ppm (b). The curve was fitted linearly, and the sensitivity value was determined by the calibration curve's slope, i.e., 4.5 × 10 −3 RIU/ppm. Furthermore, humidity is a crucial factor in assessing the performance of a gas sensor. Hence, to check the effect of humidity on the performance of a fabricated SPR sensor, the gas sensing studies were carried out for a fixed concentration of 10 ppm of NH 3 gas for varying humidity ranges (40% to 80%). SPR reflectance curves for the prism/Au/SnO 2 /PPy configuration on exposure to 10 ppm concentration of NH 3 gas under different relative humidity conditions (40 RH% to 80 RH%) are shown in Figure 7a. The curves are found to slightly shift towards a higher angle with a slight increase in minimum reflectance. This is due to a change in the optical property (increase in conductivity) of the SnO 2 /PPy nanocomposite thin film as the humidity level increased. The calibration curves are also shown showing the corresponding variation of θspr and Rmin with the different relative Furthermore, humidity is a crucial factor in assessing the performance of a gas sensor. Hence, to check the effect of humidity on the performance of a fabricated SPR sensor, the gas sensing studies were carried out for a fixed concentration of 10 ppm of NH3 gas for varying humidity ranges (40% to 80%). SPR reflectance curves for the prism/Au/SnO2/PPy configuration on exposure to 10 ppm concentration of NH3 gas under different relative humidity conditions (40 RH% to 80 RH%) are shown in Figure 7a. The curves are found to slightly shift towards a higher angle with a slight increase in minimum reflectance. This is due to a change in the optical property (increase in conductivity) of the SnO2/PPy nanocomposite thin film as the humidity level increased. The calibration curves are also shown showing the corresponding variation of θspr and Rmin with the different relative humidity ambient (40% to 80%) in Figure 7b. The sensitivity of the prepared LRSPR sensor towards humidity derived from the calibration curve is 0.002°/RH%, which is negligible. The dynamic response for the multi-layered system composed of a prism, Au, SnO2, and PPy when exposed to NH3 gas at concentrations ranging from 0 to 200 ppm is also included in the current work (resonance angle set at 40.7 degrees). A continuous step-   Furthermore, humidity is a crucial factor in assessing the performance of a gas sensor. Hence, to check the effect of humidity on the performance of a fabricated SPR sensor, the gas sensing studies were carried out for a fixed concentration of 10 ppm of NH3 gas for varying humidity ranges (40% to 80%). SPR reflectance curves for the prism/Au/SnO2/PPy configuration on exposure to 10 ppm concentration of NH3 gas under different relative humidity conditions (40 RH% to 80 RH%) are shown in Figure 7a. The curves are found to slightly shift towards a higher angle with a slight increase in minimum reflectance. This is due to a change in the optical property (increase in conductivity) of the SnO2/PPy nanocomposite thin film as the humidity level increased. The calibration curves are also shown showing the corresponding variation of θspr and Rmin with the different relative humidity ambient (40% to 80%) in Figure 7b. The sensitivity of the prepared LRSPR sensor towards humidity derived from the calibration curve is 0.002°/RH%, which is negligible. The dynamic response for the multi-layered system composed of a prism, Au, SnO2, and PPy when exposed to NH3 gas at concentrations ranging from 0 to 200 ppm is also included in the current work (resonance angle set at 40.7 degrees). A continuous step- The dynamic response for the multi-layered system composed of a prism, Au, SnO 2 , and PPy when exposed to NH 3 gas at concentrations ranging from 0 to 200 ppm is also included in the current work (resonance angle set at 40.7 degrees). A continuous step-like behaviour was observed from 1 to 200 ppm of NH 3 gas at room temperature (Figure 8a). On the basis of the calibration curve, the constructed SPR sensor has a sensitivity of 0.202 ppm for NH 3 concentrations ranging from 1 ppm to 200 ppm, (Figure 8b). The results indicate how to design a reliable SPR gas sensor for quick NH 3 gas detection.
like behaviour was observed from 1 to 200 ppm of NH3 gas at room temperature ( Figure  8a). On the basis of the calibration curve, the constructed SPR sensor has a sensitivity of 0.202 ppm for NH3 concentrations ranging from 1 ppm to 200 ppm, (Figure 8b). The results indicate how to design a reliable SPR gas sensor for quick NH3 gas detection.
(a) (b) Figure 8. (a) Transient response of SPR sensor (prism + Au + SnO2 + PPy) system, (b) the calibration curve of the SPR sensor towards NH3 gas, and linear variation of change in reflectance with increasing concentration of NH3 gas.

Conductometric Gas Sensing Studies
Response variation of the optimized sensor with annealing temperature is shown in Figure 9 and it is evident from the sensing graph that there is a maximum response of 60 at a temperature of 150 °C. The sensing response is calculated as: where Rg is associated with resistance in the presence of the target gas and Ra is defined as sensor resistance in the presence of clean air. The sensor's response time is the amount of time it takes to reach 90% of saturated resistance in the presence of reducing (NH3) gas, whereas the sensor's recovery time is the amount of time it takes to reach 10% of saturated resistance. The sensing response shows maxima due to highly porous film having higher surface roughness, leading to maximum adsorption of target gas molecules. The adsorption leads to a change in the resistance of the film showing maxima. The sensor was also tested for repeatable characteristics. Another especially important parameter of the sensor is the selectivity. Selectivity of the sensor is also shown in Figure  9. The developed sensor was found to be highly selective towards the target gas, which is clear from the figure where a low response is observed for other interfering gases and a high response for the target gas. The reason behind the selective sensing of ammonia gas by the prepared sensor is the NH3 gas adsorbed on the SnO2/PPy surface. The sensor's ability to be selective in terms of sensing is greatly enhanced by the PPy thin layer and the NH3 gas due to a de-doping reaction between PPy and NH3 molecules. Hence, Figure 9 shows the highest sensing response of the prepared sensor towards NH3 gas.

Conductometric Gas Sensing Studies
Response variation of the optimized sensor with annealing temperature is shown in Figure 9 and it is evident from the sensing graph that there is a maximum response of 60 at a temperature of 150 • C. The sensing response is calculated as: S = (R a − R g )/R g where R g is associated with resistance in the presence of the target gas and R a is defined as sensor resistance in the presence of clean air. The sensor's response time is the amount of time it takes to reach 90% of saturated resistance in the presence of reducing (NH 3 ) gas, whereas the sensor's recovery time is the amount of time it takes to reach 10% of saturated resistance. The sensing response shows maxima due to highly porous film having higher surface roughness, leading to maximum adsorption of target gas molecules. The adsorption leads to a change in the resistance of the film showing maxima. The sensor was also tested for repeatable characteristics. Another especially important parameter of the sensor is the selectivity. Selectivity of the sensor is also shown in Figure 9. The developed sensor was found to be highly selective towards the target gas, which is clear from the figure where a low response is observed for other interfering gases and a high response for the target gas. The reason behind the selective sensing of ammonia gas by the prepared sensor is the NH 3 gas adsorbed on the SnO 2 /PPy surface. The sensor's ability to be selective in terms of sensing is greatly enhanced by the PPy thin layer and the NH 3 gas due to a de-doping reaction between PPy and NH 3 molecules. Hence, Figure 9 shows the highest sensing response of the prepared sensor towards NH 3 gas. A lot of work has been conducted on NH3 gas sensors using various metal oxide thin films, including ZnO [31,32], etc. Among these metal oxides, SnO2 thin film was studied extensively in comparison to other semiconducting materials towards the detection of a number of both oxidizing and reducing gases [33]. SnO2 is the most used material for conductometric gas sensors [33]. Very few reports are available on NH3 using SPR [16]. However, the reports lack in various context. The sensitivity was reported to be poor and mostly SPR sensors are utilized to identify ammonia with a greater concentration (>25 ppm). There are no published reports of SPR gas sensors for NH3 that use SnO2 sensing layers, even though SnO2 exhibits enhanced sensitivity for most of the gases [16]. This might assist in the development of effective SPR sensors for detecting ammonia gas at low levels. Additionally, an effort has been made to make the sensor more selective by incorporating the PPy layer. The sensor in the present study has higher sensitivity compared to other reports in the literature [34,35].

Conclusions
An optical gas sensor that is room-temperature operated has been designed for the detection of highly toxic gas, i.e., NH3 gas. SPR technology has been successfully exploited using the sensitive sensing interface of SnO2 and PPy. Thicknesses of SnO2 and PPy were optimized theoretically. The SPR sensor exhibited a quick response time (1 s) and high sensitivity (4.5 × 10 −3 RIU/ppm) towards NH3 gas across a wide variety of concentrations (1 to 10 ppm). Additionally, dynamic behaviour was seen, and the calibration curve's estimated sensitivity of 0.202/ppm was used. The sensor was also tested for conductometric sensing.
Author Contributions: Conceptualization, A.P.S.G. and A.P.; methodology, A.P.S.G. and A.P.; software, A.P.; validation, A.P.S.G., A.P. and A.K.; formal analysis, A.P.S.G.; investigation, A.P.; resources, A.P.; writing-original draft preparation, A.P.; writing-review and editing, A.P.S.G.; supervision, A.K. All authors have read and agreed to the published version of the manuscript.  A lot of work has been conducted on NH 3 gas sensors using various metal oxide thin films, including ZnO [31,32], etc. Among these metal oxides, SnO 2 thin film was studied extensively in comparison to other semiconducting materials towards the detection of a number of both oxidizing and reducing gases [33]. SnO 2 is the most used material for conductometric gas sensors [33]. Very few reports are available on NH 3 using SPR [16]. However, the reports lack in various context. The sensitivity was reported to be poor and mostly SPR sensors are utilized to identify ammonia with a greater concentration (>25 ppm). There are no published reports of SPR gas sensors for NH 3 that use SnO 2 sensing layers, even though SnO 2 exhibits enhanced sensitivity for most of the gases [16]. This might assist in the development of effective SPR sensors for detecting ammonia gas at low levels. Additionally, an effort has been made to make the sensor more selective by incorporating the PPy layer. The sensor in the present study has higher sensitivity compared to other reports in the literature [34,35].

Conclusions
An optical gas sensor that is room-temperature operated has been designed for the detection of highly toxic gas, i.e., NH 3 gas. SPR technology has been successfully exploited using the sensitive sensing interface of SnO 2 and PPy. Thicknesses of SnO 2 and PPy were optimized theoretically. The SPR sensor exhibited a quick response time (1 s) and high sensitivity (4.5 × 10 −3 RIU/ppm) towards NH 3 gas across a wide variety of concentrations (1 to 10 ppm). Additionally, dynamic behaviour was seen, and the calibration curve's estimated sensitivity of 0.202/ppm was used. The sensor was also tested for conductometric sensing.