1 Introduction

In the advancement of nanotechnology, nanoparticles and the involved synthesis process have emerged as one of the most key disciplines to seek materials that find their application in various sectors. Owing to the distinctive physicochemical and morphological properties, silver nanoparticles (Ag-NPs) are appearing to be a promising scientific area of research for optical, electronic [1], and antibacterial [2, 3] properties that have a wide range of applications from biomedical [4] to sensors and actuators [5,6,7]. Silver, being one of the noblest metals, has opened a wide spectrum of disciplines in biomedical and therapeutic protocols, such as wound dressings, cardiovascular implants, dental composites, catheters, orthopedic implants, agriculture engineering, and nano-biosensing [8]. Silver nanoparticles have also been extensively used in devices and fields including photovoltaic devices [9, 10], electrode material [11], catalysis, photochemistry, energy conversion, and medicine [12].

Over decades, there have been numerous approaches to synthesize Ag-NPs either physically, biologically, or chemically [4]. There are a variety of techniques to synthesize Ag-NPs like green synthesis using bacteria, fungi, microorganisms [8, 13] and physical methods such as pulsed laser ablation [14] and evaporation–condensation [15]. Silver-resistant bacteria can aggregate silver on the bacterial cell walls which are later extracted as Ag-NPs [8]. A commonly used chemical method is chemical reduction [7, 16] of silver ions to zero valence state by using a surfactant/stabilizing agent for preventing the aggregation of nanoparticles (NPs) [7, 16,17,18,19,20]. However, the purity of the synthesized product via chemical reduction is uncertain. Pulsed laser ablation in liquid (P-LAL) is a widely used physical method for the generation of various kinds of NPs (metal, semiconductor, and amorphous) by the interaction of nanosecond (ns) laser pulse with solid target immersed in liquid [5, 18, 20, 21]. There are many researches based on pulsed laser ablation of glass and silicon target for depositing desired nanomaterials, semiconductor nanocrystal [22] synthesis for photovoltaic studies. D Pathak et al. grew silver indium diselenide (AgInSe2) on silicon substrate for photovoltaic applications which showed 0.42 V open-circuit voltage [23, 24].

P-LAL technique is suitable for modifying the size and shape of NPs by changing laser parameters (wavelength, repetition rate, energy) and nature of the solvent (with and without surfactant). P-LAL technique is also best because it reduces the use of chemical precursors and surfactants, has faster synthesis, and does not require pre- and post-sintering processes and furnaces. However, the growth mechanism of NPs by nanosecond pulsed laser is yet to be fully understood [25]. Many researchers suggested that pulse duration for several nanoseconds transfers the energy to the lattice system that takes place simultaneously along with the absorption of pulse energy by the electron system in the target [26, 27]. Long pulse duration (10 ns) reduces the accumulation of energy at the electronic system, and conversely, it increases the energy in the lattice system [27, 28]. Under such circumstances, boiling temperature is easily reached and fragmentation is favored for NPs generation. Most recently, the reduction of silver salt by laser ablation in a nonpolar solvent by reverse micelles formation is used. Mafune et al. have prepared Ag-NPs under different laser powers and showed an increase in average particles with an increase in laser power and laser duration [5]. The increase in ablation time also increases the concentration of nanoparticles which leads to more interaction between the neighboring particles for nucleation and agglomeration to the formation of butterfly nanopark shape [43,44,45].

Ammonia and ethanol have been widely used chemicals in the industry. Their leakage and exposure to such toxic gases would become a serious problem for humans and the ecosystem [29]. The sensor fabrication and detection of toxic gas are based on the clad modification of the small portion of PMMA plastic optical fiber. A typical optical fiber sensor is based on the idea that change in the transmitting light intensity in the fiber with the change in the refractive index of modified clad material changes the output optical signal [29].

In the present work, silver nanoparticles were synthesized by reduction of silver nitrate solution by using laser ablation under different laser ablation durations, which were 20, 40, 60, and 80 min. To the best of our knowledge, laser irradiation of silver salt solution under 1064 nm wavelength has not been reported. Also, the idea of using prepared Ag-NPs in the clad-modified optical fiber sensors for gas (ethanol and ammonia) sensing applications is new. Laser wavelength of 1064 nm was used because many researchers in previous reports have ablated silver nanoparticles using 1064 nm wavelength [30,31,32]. Silver nanoparticles show good absorption in the range of 1064 nm fundamental harmonics. Also, the ablation efficiency with shorter-wavelength laser pulse is lower than that with longer wavelength laser pulse [33]. In this work, about 3 cm of the passive cladding region was etched carefully around the surface of the optical fiber and was replaced by Ag-NPs. The transmitted output light intensity is affected by the change in optical properties of Ag-NPs when it was exposed to the target gas. Traditionally, metal oxides have been widely studied for gas sensing due to their excellent optical properties. There is much space for research on the metal NPs for optical fiber sensors, which also shows excellent optical properties. Though silver nanoparticles have been used indirectly in the material by few researchers for sensing applications as given in Table 1, direct usage in the gas sensor is yet to be done. In recent years, several researchers showed the gas sensing response mainly with metal oxide materials. But the applications of the gas sensing properties of Ag-NPs have been rarely studied. The novelty of this work is the reduction of silver nitrate solution assisted by laser ablation which yielded silver nanoparticles and their direct application in fiber optic gas sensing. Using fiber optic gas sensor has its boons of simplicity in operation, being small size, lightweight, high sensitivity, low cost, flexibility, and remote sensing [34, 35].

Table 1 Comparison of sensing performance of reported silver nanoparticle-based materials with the present work

2 Experimental section

2.1 Experimental setup for laser ablation

In this study, Ag-NPs are synthesized by laser ablation of silver nitrate solution with trisodium citrate under the different ablation durations of 20, 40, 60, and 80 min. About 60 mL mixture containing 0.01 M (50 mL) of silver nitrate solution and 0.1 M (10 mL water) of trisodium citrate solution was taken for irradiation. The prepared solution was kept under constant stirring for laser ablation with unfocused light. Ag-NPs samples prepared under the 20, 40, 60, and 80 min of ablation duration are referred to as S2, S4, S6, and S8. Ag-NPs in yellowish-brown color colloid was obtained (Fig. 2). The general schematic of the experimental setup for the pulsed laser ablation in liquid is shown in Fig. 1a. The experiments are carried out under Nd:YAG laser (Spectra Physics, Model Pro: 230–10) which delivers 10 ns pulse at a repetition rate of 10 Hz at the wavelength of 1064 nm. The energy per pulse of the laser beam was measured at the wall of the beaker which was 725 mJ with a beam diameter of 0.95 cm.

Fig. 1
figure 1

a Experimental setup for the pulsed laser ablation in liquid. b Fiber optic gas sensing setup

2.2 Experimental setup for gas sensing

The prepared Ag-NPs (Sample S8) were used as modified clad material in fiber optic gas sensing for ammonia and ethanol gas at room temperature. PMMA multimode plastic optical fiber of 30 cm was used. The cladding portion at the center of the optical fiber was manually etched out to about 3 cm in length without damaging the core region of the fiber. The etched area was investigated under an optical microscope to monitor the surface uniformity of the clad-removed area. The sample S8 to be sensed was coated on the etched region by the dip-coating method with a dipping time of about 60–120 s. The Ag-NPs colloidal solution was allowed to evaporate and thicken, which then was deposited on the clad-removed portion. Before and after coating, the thickness of the optical fiber was measured using an optical microscope (Olympus make, attached with the Microhardness tester: Shimadzu, HMV-2). The coating thickness was found to be 150 μm. The sensing region was inserted into the gas chamber of the fiber optic gas sensor setup for gas sensing after being dried at room temperature. The experimental setup for the gas sensor consists of a fiber optic spectrometer (model: EPP-2000, StellarNet Inc, USA) with white light source wavelength ranging from 100 to 2000 nm. The sensor region was kept in a gas chamber connecting the fiber terminals to the spectrometer and the light source, respectively. Figure 1b shows the fiber optic gas sensor experimental setup schematic. All the gas sensing experiments were performed at 25℃ room temperature and a relative humidity level of 55% which was measured using HTC-1 hygrometer digital temperature and humidity meter. Experiments were carried out three times for a period of one month for its reproducibility test.

The gas sensing experiments were done using ethanol and ammonia target gas from 0 to 500 ppm prepared by the serial dilution method. 1000 ppm of stock solution was prepared from the concentrated ethanol or ammonia assay. From this stock, 0 to 500 ppm of series of required vapor solutions mixed with DDW was prepared using the dilution factor equation.

3 Characterizations

To confirm the generation of the silver nanoparticles, UV–Vis absorption spectra (Model: JASCO V 670) of as-prepared Ag-NPs were immediately recorded after synthesis. High-resolution transmission electron microscopy (JOEL 2010, 200 kV) was used to record the NPs size directly by dropping the colloidal Ag-NPs on the carbon-coated Cu wire grid, and the solvent was allowed to evaporate at room temperature.

Clad-modified PMMA plastic optical fiber was used for sensing ammonia and ethanol gas under different concentrations (0–500 ppm). The characteristic curve has been recorded by the SpectraWiz software, and respective data were plotted for analyzing the sensitivity and selectivity of the gas sensor.

4 Results and discussions

Figure 2 shows a snapshot of the Ag-NPs immediately after the laser ablation by the reduction method. The growth of Ag-NPs is expected to complete in three steps sequentially by photothermal decomposition, interatomic interaction followed by competition, and termination. The mechanism involved in the formation of silver NPs by the laser ablation of aqueous salt is the photolysis of the water molecules and the formation of free radicals in the solution [41]. The photolysis process is completed by the multiphoton absorption of the laser pulse (laser photon energy 1.16 eV). Here, three-photon energy absorption takes place in the transition which is over 7 eV; this is a value above 6.5 eV for photodecomposition of water which leads to the production of e-, OH-, and Haq radicals [5, 20, 42]. The reaction was followed in a very short time to create enough number of zero valence state of the silver ions. The reaction scheme is followed in two ways [20]:

$$Ag^{ + } + e_{aq}^{ - } \to Ag^{0}$$
(1)
$$Ag^{ + } + H \to Ag^{0} + H^{ + }$$
(2)
Fig. 2
figure 2

Images of synthesized colloidal silver nanoparticles with ablation time starting from left to right 80, 60, 40, and 20 min

Each silver nucleation center formed by the water photolysis can grow through the addition of the silver atoms or by further reduction of the silver ions [20]. The absorbance peak intensity from the UV–Vis spectrum of silver salt solution for different irradiation  duration increased with an increase in the laser exposure time. The laser exposure time was responsible for the increase in several nucleation centers, where each nucleation center aggregates many silver atoms. Here, trisodium citrate (TSC) is used as a stabilizing/reducing agent for nanoparticles, which prevents the rapid aggregation of NPs. The Ag-NPs are constrained inside reverse micelles. The sizes of the NPs are controlled by the concentration of the reverse micelles (ratio of water to nonpolar solvent) on the surface of the Ag-NPs in the solution.

4.1 Optical characterization

Figure 3a shows the UV–Vis absorption characteristic spectra of Ag-NPs samples synthesized at various time intervals (0 min to 80 min) in the wavelength ranging between 300 to 700 nm. Figure 3b shows average particle sizes concerning the growth of NPs with an increase in laser ablation duration from 0 to 80 min. The surface plasmon peaks of NPs have been affected by the nature of metals, aggregation, and size of the NPs. The surface plasmon peak of Ag-NPs was found to be shifted from 405 to 415 nm with an increase in the laser ablation duration, from 0 to 80 min, with consecutive 20 min increase in exposure time. Mafune et al. have prepared Ag-NPs under different laser powers and showed an increase in average particles with an increase in laser power and duration [5]. The increase in ablation time also increases the concentration of nanoparticles which leads to more interaction between the neighboring particles for nucleation and agglomeration to form butterfly nanopark shape [43,44,45]. The shift in the surface plasmon peak to a longer wavelength of 415 nm (low energy region) for 80 min is because single isolated particles form densely packed aggregates by dipole interaction between neighboring particles [46, 47]. The increase in particle agglomerates size to 31 nm for 80 min ablation time may shift the plasmon resonance peak to a higher wavelength according to Mie theory [30]. Soon after the laser ablation, the color of the Ag-NPs appears yellowish brown, which indicates the formation of Ag-NPs (see Fig. 2) [30, 48].

Fig. 3
figure 3

a UV–Vis absorption spectrum of silver nanoparticles. b Maximum absorbance peak and average particles size with increase in laser ablation duration of silver nitrate salt

4.2 Morphology studies

Figure 4a–d shows TEM images of Ag-NPs with different laser ablation durations. The average particle sizes of NPs are about 5, 6, 9, and 31 nm, respectively. In the first 20 to 60 min, the average particle size reaches from 5 to 9 nm. After the 60–80 min of ablation, there was a sudden rise in the particle sizes as well as a change in the shape of NPs (from spherical to butterfly and truncated triangular). The growth of Ag-NPs from 20 to 60 min (for sample S2 to S8) was by 4 nm. For Ag-NPs from 60 to 80 min, the growth was by 23 nm. The reason for shape and size change is not clear, but it is safe to assume that nanosecond laser pulse can be responsible for melting and fusing the spherical Ag-NPs to form triangular- and butterfly-shaped NPs (fusion of two triangular-shaped silver nanoparticles) (see Fig. 4d). The sides of each triangular NPs are around 30 nm (see Fig. 5a–d), which was also verified with the Gaussian fitting of NPs distribution (see Fig. 6a–d).

Fig. 4
figure 4

TEM analysis of silver nanoparticles under the laser ablation: a 20 min, b 40 min, c 60 min, d 80 min

Fig. 5
figure 5

TEM image of the silver nanoparticles under the 80 min of ablation (S8) with different resolutions: a 200 nm, b 50 nm, c 10 nm, and d 5 nm

Fig. 6
figure 6

Relative size distributions of silver NPs: a 20 min, b 40 min, c 60 min, and d 80 min

4.3 Calculation of size of the silver nanoparticles

At the place of the laser spot, a dense cloud of silver atoms was produced within a small time as a result of the reduction of the silver nitrate from laser ablation. Initially, the interatomic interaction among the silver atoms is much stronger than the silver and citrate ions [5]. Silver atoms are formed until the effect of sodium citrate does not compensate for the interaction among silver atoms [5]. Firstly, the silver atoms aggregate rapidly before sodium citrate comes into play; as a result, in 20 min the average particle sizes of the Ag-NPs about 5 nm are obtained. In the next 40 to 60 min, a much large number of silver atoms are formed and the size of NPs increases from 5 to about 8.5 nm in 60 min. Finally, there are not much enough silver atoms to lead to form bigger NPs. After 60 min, each smaller NP gets excessive energy and starts aggregating due to nanosecond laser pulse energy.

Each isolated silver atom acts as a nucleation center before becoming the silver NPs. Let us define \(n\) as the number of silver atoms in an embryonic particle and \(V\) as the volume of the isolated silver atom. Here, \(R_{0}\) and \(R\) are the radii of the silver atom and nanoparticles, respectively. The volume of silver NPs which consist of n silver atoms is V [5].

$${\mathbf{nV = }}\frac{{{\mathbf{4\pi R}}^{{\mathbf{3}}} }}{{\mathbf{3}}}$$
(3)

The rate of change of volume depends on NPs which depends on the number of silver atoms attached to the surface per second,

$${\mathbf{4\pi R}}^{{\mathbf{2}}} \frac{{{\mathbf{dR}}\left( {\mathbf{t}} \right)}}{{{\mathbf{dt}}}}{\mathbf{ = V}}\frac{{{\mathbf{dn}}\left( {\mathbf{t}} \right)}}{{{\mathbf{dt}}}}$$
(4)

where the number of silver atoms generations depends on both the energy of photon and laser energy per pulse. Hence, the rate of ablation depends on the natural logarithmic of the ratio of the laser energy pulse to the threshold energy of the laser pulse for specific materials [49].

$$\frac{{{\mathbf{dn}}\left( {\mathbf{t}} \right)}}{{{\mathbf{dt}}}}{\mathbf{ = E*ln(}}\frac{{{\varvec{\upvarepsilon}}}}{{{{\varvec{\upvarepsilon}}}_{{{\mathbf{th}}}} }}{\mathbf{)}}$$
(5)

Now comparing Eqs. (2) and (3), we get

$${\mathbf{4\pi R}}^{{\mathbf{2}}} \frac{{{\mathbf{dR}}\left( {\mathbf{t}} \right)}}{{{\mathbf{dt}}}}{\mathbf{ = V*E*ln(}}\frac{{{\varvec{\upvarepsilon}}}}{{{{\varvec{\upvarepsilon}}}_{{{\mathbf{th}}}} }}{\mathbf{) }}$$
(6)

On integrating Eq. (4), we have

$${\mathbf{R}}^{{\mathbf{3}}} \left( {\mathbf{t}} \right){\mathbf{ = t*V*E*ln(}}\frac{{{\varvec{\upvarepsilon}}}}{{{{\varvec{\upvarepsilon}}}_{{{\mathbf{th}}}} }}{\mathbf{) + const}}$$
(7)

The value of the constant is evaluated by taking the limiting value \(t = 0\), so the \(const = R_{0}\). Hence, \(R_{0}\) is the size of the silver atom before the aggregation of silver atoms took place. We assume that very small particles have negligible volume.

$${\mathbf{V \approx R}}_{{\mathbf{0}}}^{{\mathbf{3}}}$$
(8)
$${\mathbf{R}}\left( {\mathbf{t}} \right){\mathbf{ = R}}_{{\mathbf{0}}} \left( {{\mathbf{1 + t*E*ln(}}\frac{{{\varvec{\upvarepsilon}}}}{{{{\varvec{\upvarepsilon}}}_{{{\mathbf{th}}}} }}} \right){\mathbf{)}}^{{{\mathbf{1/3}}}}$$
(9)
$${\mathbf{R}}_{{\mathbf{p}}} \left( {\mathbf{t}} \right){\mathbf{ = 2*R}}_{{\mathbf{0}}} \left( {{\mathbf{1 + t*E*ln(}}\frac{{{\varvec{\upvarepsilon}}}}{{{{\varvec{\upvarepsilon}}}_{{{\mathbf{th}}}} }}} \right){\mathbf{)}}^{{{\mathbf{1/3}}}}$$
(10)

where parameters used are for the close approximation of this experiment;

$${\mathbf{R}}_{{\mathbf{0}}} {\mathbf{ = 0}}{\mathbf{.172}}\;{\mathbf{nm}}$$
$${\mathbf{E = 1}}{\mathbf{.16}}\;{\mathbf{eV}}$$
$${{\varvec{\upvarepsilon}}}{\mathbf{ = 725 }}{\mathbf{mJ}}$$
$${{\varvec{\upvarepsilon}}}_{{{\mathbf{th}}}} {\mathbf{ = 225 mJ}}$$
$${\mathbf{t = 0 - 80 min}}$$

The above equation estimated the size of particles, which is comparable with experimentally obtained particle sizes. The theoretical and experimentally observed value differs when the ablation duration is increased. For the lower ablation duration, the theoretical and experimental values are close (Table 2).

Table 2 Comparison of theoretical and experimental estimation of particle size

Figure 7 shows the scheme of a generation of butterfly and triangular Ag-NPs from spherical NPs with an increase in laser exposure duration. Steps 1 and 2 in Fig. 7 show the reduction of silver salt by laser ablation and formation of a cloud of silver atoms in a nonpolar solvent by reverse micelles formation and capsulation. The laser pulse energy irradiated for several nanoseconds makes the electronic system of the material absorb the pulse energy and also transfers the energy to the lattice system simultaneously [26, 27]. The longer the pulse duration, the electron system excessively transfers the energy to the hot matrix lattice system by reducing the energy in itself [27, 28] which results in increase in lattice internal energy and melting [50]. Under such conditions, boiling temperature is easily reached and fragmentation takes place for NPs generation (steps 3 and 4). The hot molten NPs (isolated sphere and distorted shapes) are continuously bathed with light from nanosecond laser pulses. Because of single isolated particles forming densely packed aggregates by dipole interaction between neighboring particles, it becomes a nucleation site for more silver atoms to get attached to its surface. This allows agglomeration and to lose the excess energy in melting to the solvent by relaxation process (phonon–phonon relaxation 100 ps) [50]. These particles after reaching their minimum surface energy which is the equilibrium state and its minimum surface area resulted in nano-triangular- and nano-butterfly-structured particles.

Fig. 7
figure 7

Schematic representation of particles growth under laser ablation

Figure 8a shows the particle size estimation from the theoretical calculation and experimentally obtained value. Figure 8b shows the scheme of the NPs formation up to 0–80 min of laser irradiation. The slope of the curve from a to b is 1.0 nm/min, while the slope from b to c is 0.043 nm/min (see Fig. 8b). The growth of Ag-NPs in the first 5 min of laser irradiation is 23 times much faster than the next 55 min. The rapid growth of NPs can be understood by the atomic interaction among the silver atoms and dipole interaction. The growth of the Ag-NPs by aggregation of silver atoms competes with the sodium citrate ions. Hence, after 60 min of ablation, trisodium citrate molecules start constraining (micelles formation) NPs. After attaining critical size in growth of Ag-NPs, NPs start colliding, melting, and fragmenting (Fig. 7 step 3).

Fig. 8
figure 8

a Plot of particle size growth of silver nanoparticles with time. b Plot of dynamic growth of silver nanoparticles

4.4 Sensing mechanism

The fiber optic sensor has the potential to detect toxic gases by utilizing the phenomenon of the change in intensity of leaked light through the sensing material (modified cladding) when target gas is introduced [51, 52]. The modified cladding region interacts with the target gas, which results in the change in intensity of guided signal along with the core of the optical fiber, therefore producing the change in the output spectrum intensity [51, 52]. This is related directly to the sensitivity and selectivity of the respective target gas sensor [52]. The gas sensing mechanism is based on the amount of oxygen adsorbed on the surface of sensing materials in the form of oxygen species (O2-, O2-, and O22-) by capturing a free electron from the conduction band of the sensing material [51]. When ethanol gas was passed, gas molecules got attached to the surface by the lone pair of electrons in the oxygen species. CO2 and H2O molecules were released when ethanol reacts with the pre-adsorbed oxygen species [51, 53]. These molecules leave the electron back to the conduction band leading to an increase in the carrier concentration. The cladding medium (Ag-NPs) has a lesser refractive index than the core material; therefore, total internal reflection takes place. However, the cladding medium absorbs a small amount of light depending on the absorption coefficient of the material (evanescent wave) and gas interaction. The rest of the light undergoes total internal reflection. This leaked light which absorbed into the cladding re-enters into the core after suffering a significant change in the amount of light at the air–cladding interface due to target gas interaction [54]. The prepared samples showed increase in the intensity counts as the concentration of the ammonia and ethanol solution is increased. The peak intensity increased due to increase in the number of ethanol and ammonia molecules.

4.5 Ethanol and ammonia gas sensing

The S8 sample was tested with various concentrations of ethanol and ammonia gas ranging from 0 to 500 ppm using a clad-modified fiber optic gas sensor, and their spectral responses are presented in Fig. 9a–d, respectively. In this study, the spectral response shows the highest peak around 670 nm. The spectral peak around 670 nm wavelength exhibited the most variation with different concentrations of ammonia (Fig. 9a, b) and ethanol (Fig. 9c, d) gases in the steps of 100 ppm. The change in the output spectral response intensity with respect to the gas concentration is defined as the sensitivity. The gas sensitivity, estimated by maneuvering a plot between the spectral peak intensity (670 nm) and the concentrations of ammonia and ethanol gas for the sample, is shown in Fig. 9b, d. Ammonia and ethanol gases showed a monotonic increase in the output spectrum for an increase in gas concentration. The gas sensitivity of the ammonia and ethanol gas is found to be around 64 and 9.5 counts/ppm, respectively, which is the slope of the sensing response graph in Fig. 9b, d.

Fig. 9
figure 9

a Spectral response of the silver nanoparticles for ammonia sensing, b plot of peak intensity of ammonia concentration (0–500 ppm) with slope, c spectral response of silver nanoparticles for ethanol sensing, and d plot of peak intensity of ethanol concentration (0–500 ppm) with slope.

It was found that Ag-NPs showed a lesser sensitivity toward the ethanol (9.5 counts/ppm) and relatively high sensitivity for ammonia gas (64 counts/ppm). Ammonia showed almost seven times greater sensitivity than ethanol.

Further, the sensitivity percentage (%) for ammonia and ethanol gases at each concentration is displayed in Fig. 10 in the form of a bar diagram. S8 exhibited a high percentage of sensitivity for ammonia gas at room temperature, and it monotonically increased with an increase in concentration to a maximum of 27% at 500 ppm compared to ethanol gas which reached a maximum of only 4%. The sensitivity (%) was calculated using formula [55, 56],

$${\text{Percentage of sensitivity }}\left( \% \right) = \frac{Io - Ig}{{Io}} \times \, 100$$
(11)

where Io is the spectra maxima in the absence of gas and Ig is the spectra maxima in the presence of gas.

Fig. 10
figure 10

Histogram showing sensitivity % of ammonia and ethanol for each concentration depicting Ag-NPs selectivity toward ammonia

This shows that the tested Ag-NPs are selective toward ammonia gas. Hence, the study showed Ag-NPs can be used for ammonia detection at room temperature.

5 Conclusion

Silver nanoparticles were synthesized successfully by pulsed laser ablation of silver nitrate solution with trisodium citrate under different ablation durations of 20, 40, 60, and 80 min. TEM images of Ag-NPs revealed the average particle size to be 5, 6, 9, and 31 nm for 20, 40, 60, and 80 min, respectively. Triangular- and butterfly-shaped Ag-NPs were obtained under the laser ablation for 80 min. The theoretical and experimental estimation of the particle size showed good agreement with the lower ablation period. The surface plasmon peak of Ag-NPs in UV–Vis spectra shifted from 405 to 415 nm with an increase in the ablation time from 20 to 80 min, which is due to dipole interaction between neighboring particles and aggregation to form butterfly nanopark Ag-NPs. The butterfly-shaped Ag-NPs were tested for ethanol and ammonia gas sensing with various concentrations of gas ranging from 0 to 500 ppm. The silver NPs showed a good response and selectivity for ammonia gas compared to ethanol with a sensitivity of 64 counts/ppm for ammonia and 9.5 counts/ppm for ethanol. The sensitivity percentage was 27% for ammonia and only 4% for ethanol, respectively. Hence, the study showed Ag-NPs can be a promising nanomaterial for ammonia detection at room temperature.