1 Introduction

Conducting polymers such as polypyrrole, polyaniline, polythiophene and polyacetylene have found profound applications in auto electronic devices and gas and humidity sensors [1]. The demand for conducting polymers in the humidity sensor applications has been enormous due to their unchallenging synthesis, easy fabrication and efficient performances [2]. In the present work, a polypyrrole-based humidity sensor has been chosen for the study because of its simple concoction process, oxido-reduction properties and good environmental stability. Presently, two-dimensional (2D) materials of transition metal dichalcogenides (TMDs) like \({\hbox {MoS}}_{2}\), \({\hbox {WS}}_{2}\), \({\hbox {TiS}}_{2}\), \({\hbox {TaS}}_{2}\) and phosphorene [3, 4] have exhibited sparkling technical applications in the field of materials science [5, 6]. The appreciable humidity sensing properties of polyaniline composites with tungsten disulphide [7] and tantalum disulphide [8] motivated us to undertake this work.

The performance characteristics of every sensor is based on some interesting properties like sensitivity, selectivity, detection limit, response time, recovery time and other factors like small size, low-power consumption and compatibility. The literature survey reveals that the conducting polymers composited with \({\hbox {Ta}}_{2} {\hbox {O}}_{5}\) [9], \({\hbox {Fe}}_{2} {\hbox {O}}_{3}\) [10], \({\hbox {Y}}_{2} {\hbox {O}}_{3}\) [11], \({\hbox {TiO}}_{2}\) [12], \({\hbox {Cr}}_{2} {\hbox {O}}_{3}\) [13], \({\hbox {BaTiO}}_{3}\) [14], \({\hbox {MgCrO}}_{4}\) [15], \({\hbox {Sr}}_{3}({\hbox {AsO}}_{4})_{2}\) [16] and graphene oxide [17] have been studied for the development of humidity sensors. The sensing mechanism of these composites has been studied based on conductivity and permittivity of the samples by adsorption of water vapours [18]. Conducting polymers have exhibited a change in resistance on exposure to different relative humidity (RH) environments [19]. These materials alter the electrical resistance due to their inherent hydrophilic and porous nature, when exposed to the vivid RH environments. Also, the sensitivity of these sensors to humidity depends on the diminutive structures; wherein this can be attained by adopting special techniques or by doping suitable impurities. So, in this context, the \({\hbox {PPy/WS}}_{2}\)-50% composite was synthesized using an in situ polymerization technique. Further, to test the performance and reproducibility of the sample as a room temperature humidity sensor; its stability, response and recovery time have been tested. The composite in the pellet form was used for humidity sensing investigations throughout this work.

2 Materials and methods

All the materials used are of analytical grade reagents corresponding to pyrrole—\(\hbox {C}_{4} \hbox {H}_{4} \hbox {NH}\) (98% purity) and ammonium persulphate (99% purity) from SD fine chemicals, Mumbai, India. Tungsten disulphide—\({\hbox {WS}}_{2}\) (99.8% purity) metal basis is from Alfa Aesar. The pyrrole monomer was doubly distilled before use.

2.1 Synthesis of polypyrrole

Pyrrole of 0.3 M solution was appropriated in a tumbler and settled in an ice tray on a magnetic stirrer. Solution of ammonium persulphate of 0.06 M was persistently added drop-wise with the help of a burette to the solution of a pyrrole. The whole process was carried out for 5–6 h under continuous stirring and maintaining a certain temperature range of \(0{-}6^{\circ }\hbox {C}\). The precipitated-PPy was filtered and dried in an oven at \(100^{\circ }\hbox {C}\). The yield of polypyrrole was 3.4 g which is considered as 100 wt% [20].

2.2 Synthesis of polypyrrole–\({\hbox {WS}}_{2}\) composites

For 0.3 M pyrrole solution 1.7 g (50 wt%) of \({\hbox {WS}}_{2}\) was added and mixed rigorously. Furthermore, 0.06 M solution of ammonium persulphate was added dropwise continuously to the above solution with the help of a burette to obtain a \({\hbox {PPy/WS}}_{2}\)-50% composite. The formation of the composite is confirmed by a gradual change in the colour of the solution. Further, the filtrate was purified by washing repeatedly with distilled water and acetone, and then dried in vacuum at \(100^{\circ }\hbox {C}\) until a constant weight was reached [21]. The composites obtained were pressed in the form of pellets of 10 mm diameter by applying a pressure of 4 tons in a hydraulic press. For the purpose of humidity sensing measurements, the pellets are laminated with silver paste to attain better contacts of the sample to act as an electrode [22].

3 Results and discussion

3.1 FTIR spectroscopy

Fourier transform infrared (FTIR) spectra of pristine PPy, \({\hbox {WS}}_{2}\) and \({\hbox {PPy/WS}}_{2}\)-50% composites are shown in figure 1. Figure 1a represents the FTIR spectrum of PPy depicting its signature bands at 603 and \(919 \, {\hbox {cm}}^{-1}\) attributed to C–H wagging. The bands at 1366, 1566, 2971 and \(3896 \, {\hbox {cm}}^{-1}\) corresponds to the stretching vibrations of C–N, C–C, C–H and N–H in the pyrrole ring, respectively [23]. Whereas, bands at 1217 and \(1050 \, {\hbox {cm}}^{-1}\) correspond to the C–N stretching and C–H deformation vibrations of PPy respectively [24]. Figure 1b represents strong characteristic absorption bands of \(\hbox {WS}_{2}\) at 588 and \(871 \, {\hbox {cm}}^{-1}\) corresponding to W–S stretching vibrations, which is exactly in accordance with the earlier literature [25]. Figure 1c represents the FTIR spectrum of the \({\hbox {PPy/WS}}_{2}\)-50% composite in which the presence of significant bands corresponding to \({\hbox {WS}}_{2}\) and PPy confirms the successful formation of the composite.

Fig. 1
figure 1

FTIR spectra of: (a) pristine PPy, (b) \({\hbox {WS}}_{2}\) and (c) \({\hbox {PPy/WS}}_{2}\)-50% composite.

3.2 XRD analysis

X-ray diffraction (XRD) studies of pristine PPy, \({\hbox {WS}}_{2}\) and \({\hbox {PPy/WS}}_{2}\)-50% are shown in figure 2 with the assigned hkl values. Figure 2a shows the XRD pattern of pristine PPy with a broad diffraction peak around \(2 \theta = 25.77^{\circ }\). Figure 2b shows the prominent peaks of \({\hbox {WS}}_{2}\) at 14.4, 28.9, 32.7, 33.5, 39.5, 44, 49.7, 58.4 and \(60.5^{\circ }\) with respect to the interplanar spacing ‘d’ values of 6.18, 3.08, 2.73, 2.66, 2.27, 2.06, 1.83, 1.57 and 1.52 Å respectively and are in good conformity in the search match with a standard JCPDS file no-08-237 [26]. This confirms that \(\hbox {WS}_{2}\) possesses the 2H-phase with a hexagonal crystal system and trigonal prismatic coordination of the space group \(P6_{3}/{\textit{mmc}}\) [27]. Figure 2c depicts the XRD of \({\hbox {PPy/WS}}_{2}\)-50% wherein, the peaks of \({\hbox {WS}}_{2}\) are observable but the broad peak of PPy is suppressed and hardly noticeable due to the presence and predominance of crystalline \({\hbox {WS}}_{2}\) in the composite, confirming the PPy-deposited \({\hbox {WS}}_{2}\) and its crystalline nature.

Fig. 2
figure 2

XRD spectra of: (a) pristine PPy, (b) \({\hbox {WS}}_{2}\) and (c) \({\hbox {PPy/WS}}_{2}\)-50% composites.

Fig. 3
figure 3

FESEM images of: (a) pristine PPy, (b) \({\hbox {WS}}_{2}\) and (c) \({\hbox {PPy/WS}}_{2}\)-50% composite. (d) EDX of the \({\hbox {PPy/WS}}_{2}\)-50% composite.

Fig. 4
figure 4

Variation in resistance and sensing response of the \({\hbox {PPy/WS}}_{2}\)-50% composite with increasing %RH.

3.3 FESEM and EDX analysis

Field emission scanning electron microscopy (FESEM) morphological studies show that the PPy image in figure 3a shows uniformly distributed granular structures. The FESEM image of the filling 2D-material \({\hbox {WS}}_{2}\), explicitly showcasing its 2D nature as in figure 3b. The average size of such hexagonal \({\hbox {WS}}_{2}\) sheets was found to be around one micrometre. In fact, these are the bundle of nanosheets which are stacked together. Such a morphology correlates well with our earlier report [26]. The morphology of the \({\hbox {PPy/WS}}_{2}\)-50% composite is shown in figure 3c, which signifies the sustained issuance of \({\hbox {WS}}_{2}\) sheets in the matrix of PPy. It is evident that the addition of \({\hbox {WS}}_{2}\) in the matrix of PPy has brought a substantial change in its morphology, wherein PPy deposited on \({\hbox {WS}}_{2}\) sheets, forming interlayers facilitating the channel for the condensation of water molecules [12]. Such a morphology favourable for humidity sensing has been reported in our earlier literature [17]. The energy dispersive X-ray spectroscopy (EDX) pattern of the \({\hbox {PPy/WS}}_{2}\)-50% composite is shown in figure 3d. The EDX spectrum shows the presence of carbon, nitrogen and oxygen of PPy and tungsten and sulphur of the filling material \({\hbox {WS}}_{2}\) in the appropriate ratio which is in good agreement with the synthesis details of the composite. Also, the appearance of the oxygen peak in the EDX spectrum of the composite is due to the oxidation of the composite as is exposed to air [28].

3.4 Humidity sensing sensor studies

Figure 4 shows the variation of resistance and the sensing response with RH. A decrease in resistance and an increase in the sensing response of the \({\hbox {PPy/WS}}_{2}\)-50% composite within a range of 11–97% RH were observed. A gradual drop in resistance with an increase in RH is due to the adsorption of water molecules by the composite surface [29]. As RH increases, water vapours on the surface of the composite gets condensed between the inter layers of PPy and \({\hbox {WS}}_{2}\) causing an increase in proton hopping, leading to the consequent decrease in the resistance of the composite [17]. Figure 5 shows the response and recovery curves of the \({\hbox {PPy/WS}}_{2}\)-50% composite. The response as well as recovery times were recorded in the two states; namely the one in the lower humidity state (11% RH) and other in the higher humidity state (97% RH). When the composite was transferred to a higher humidity state, the resistance of the composite has changed desperately with a response time of 52 s. Again, the composite was transferred to a lower humidity state the resistance increased with a recovery time of 58 s. Thus, the composite \({\hbox {PPy/WS}}_{2}\)-50% exhibited a maximum sensing response of 97% as calculated by the equation:

$$\begin{aligned} S_{\mathrm{H}} = [(R_{\mathrm{o}}-R_{\mathrm{RH}})/R_{\mathrm{o}}] \times 100, \end{aligned}$$

where \(S_{\mathrm{H}}\) is the humidity sensing response, \(R_{\mathrm{o}}\) is the resistance at the lowest %RH and \(R_{\mathrm{RH}}\) is the resistance at the highest %RH.

Fig. 5
figure 5

Response and recovery curves of the \({\hbox {PPy/WS}}_{2}\)-50% composite.

Fig. 6
figure 6

Stability of the \({\hbox {PPy/WS}}_{2}\)-50% composite.

Figure 6 shows the stability of the \({\hbox {PPy/WS}}_{2}\)-50% composite at 55 and 97% RH. The humidity sensing behaviour of the composite remained the same even after two months, which was confirmed by recording sensing response values at every 10 days for a period of two months. This indicates that the composite was found to be stable in its performance as a humidity sensor. Because of its appreciable sensing response, response and recovery times and its long operational stability, the \({\hbox {PPy/WS}}_{2}\) composite emerges to be a competent material for an efficient humidity sensing device.

4 Conclusion

The selection of \({\hbox {WS}}_{2}\) as a composite material with PPy conglomerated by a chemical polymerization technique granted a good humidity sensing material. The \({\hbox {PPy/WS}}_{2}\)-50% composite manifests a confined change in resistance in the RH scale from 11 to 97% RH. The response and recovery times of the composite were found to be 52 and 58 s respectively with a maximum sensing response of 97%. Stable sensing ability of the composite has turned out to be another prominent feature to develop an efficient resistive-type humidity sensor at room temperature. Humidity and various gas sensing studies of such composites with other TMDs would provide further scope to the design of better sensors.