Introduction

As one type of the fundamental wearable electronic devices, humidity sensors can detect the changes of humidity in the ambient environment or on the human skin surface. They operate in a noncontact sensing mode, which avoid the mechanical wear and cross infection usually occurring in their contact sensing counterparts. They have immense potential in diverse fields, ranging from healthcare monitoring, human-machine interface (HMI), sentiment analysis, sports, and safety production1,2,3,4. Previous humidity sensors are mainly prepared by coating the humidity-sensitive materials on the substrate of polymeric films5,6, e.g. polyimide (PI)7,8, polyethylene terephthalate (PET)9,10,11,12, and polydimethylsiloxane (PDMS)13,14, with electrodes. Although these sensors exhibit excellent humidity susceptibility and reliability, the limited breathability of these substrates hinders the evaporation of human skin secretions through perspiration15,16,17, which tends to cause skin irritation and even allergy after long-term operation of the humidity sensor18. Additionally, the film with a large thickness (hundreds of micrometers) and its mechanical mismatch to the skin would cause the attachment failure at the interface, which deteriorates the fidelity of the measurement. Taking the PI for instance, the critical thickness for the conformal contact to the skin has been proved down to 25 μm19. A non-conformal contact may limit the available locations of the device to those relatively flat regions of the human body. Thus, the humidity detection can hardly be accomplished in the vicinity of the sites with sharp curvature, such as the finger and face.

To improve the device’s form factor for breathability, the researchers have developed the porous or air-permeable substrates including paper20,21,22, fabric23, and electrospun nanofibers3,24,25,26,27. For example, Firat et. al.20 reported a paper-based humidity sensor with high porosity, in which the paper’s porous framework ensures the breathability of prepared devices. Xing et. al.23 proposed a breathable humidity sensor using cellulose fiber nonwoven fabrics and MXenes as the substrate and active material, respectively. The outstanding breathability (~0.320 g cm−2 d−1) of the flexible fabrics-based can improves the comfort for a better usage experience. However, the thickness of fabric or paper (ca. 340 µm) hinders the conformal contact with the skin, which may further reduce the measurement accuracy. Electrospinning is an important technique in fabricating ultrathin and porous material for breathable electronics because of its fast, simple, low-cost and customizable characteristics24,28,29. For example, Wooseong et al.24 prepared a ultrathin and porous poly(vinyl alcohol) nanofibers (PVA NFs) substrate using electrospinning process to create a PVA NFs/Au-based humidity sensor. The volume of PVA NFs expands/shrinks when absorbing/desorbing water, causing the fracture and recovery of the surface attached Au conductive network. Although the thickness and air permeability of humidity-detecting device is low to a few microns and high to ~0.113 g cm−2 d−1, respectively, the expansion and shrink rate of PVA NFs is relatively low, resulting in a long response/recovery time (148 s/110 s) and low humidity response range (<30%). Therefore, it is crucial to develop humidity sensors with ultrathin, good air permeability, quick humidity response and high sensitivity for continuous health monitoring.

In this work, we propose a skin-conformal and breathable humidity sensor based on poly(styrene-block-butadienstyrene) nanofibers (SBS NFs) and alkalized MXenes/polydopamine (AMP) composite (Fig. 1). The porous feature of nanofiber networks ensures air permeability of device. The Young’s modulus of SBS NFs (~0.10 MPa) is very similar to that of human skin (~0.13 MPa)17,30, enabling conformal contact between sensors and contoured skin surface. The humidity-sensitive AMP composite combines the high specific surface area of MXenes and the large amount of hydroxyl groups (-OH) of polydopamine (PDA), enabling excellent humidity response31. The synergistic effect of SBS NFs and AMP (SAMP) facilitates the realization of a skin-conformal and breathable humidity sensor with high sensing performance. The device can successfully recognize breathing patterns under different exercise and emotional conditions based on humidity fluctuation information. Furthermore, the noncontact HMI (3 × 3 pixels) is developed to control the motion of a robot car using the inherent humidity field of human finger surface. This work demonstrates the potential applicability of our humidity sensor in healthcare and non-contact HMI.

Fig. 1
figure 1

Schematic illustration and applications of the SAMP-based humidity sensor.

Results and discussion

Design principle and fabrication of SAMP-based humidity sensor

The SAMP-based humidity sensor is composed of the AMP composite and the interdigital electrodes (IDEs) on an ultrathin SBS NFs substrate. According to Grotthuss mechanism4, surface water molecules can form conductive networks. The electrical paths between AMP composite and IDEs increased when AMP composite adsorbs water molecules, causing the decrease of resistance. Therefore, the humidity variation can be converted to the electricity change through this humidity sensor. The fabrication process of the SAMP-based humidity sensor is outlined in Fig. 2a. The SBS NFs serving as a porous substrate with desired flexibility and air permeability were prepared through electrospinning. The specific electrospinning parameters (e.g. solution concentration, voltage, distance, feed rate, and so on) are detailed in the experimental section. Figure 2b shows a top view of surface morphology of the as-electrospun SBS NFs substrate. The disordered SBS nanofibers with a diameter of hundreds of nanometers overlapping and twisting around each other to weave a mesh-like porous film.

Fig. 2: Fabrication and characterization of SAMP-based humidity sensor.
figure 2

a Schematic illustration of the fabrication process of the SAMP-based humidity sensor. SEM images of b SBS NFs (scale bar: 5 μm), c SBS NFs/Ag NWs (scale bar: 5 μm) and d SAMP (scale bar: 2 μm), respectively. e EDS element maps scanning images of SAMP for Al, Ti, Na and N (scale bar: 2 μm), respectively. f XRD spectrum of the SAMP and MAX. g N 1 s spectra of the SAMP. h Side-view SEM image of the ultrathin SAMP-based sensor (scale bar: 25 μm). i Photograph (scale bar: 2 mm) and j optical microscopy image (scale bar: 500 μm) of SAMP-based humidity sensor attached to a thump of a volunteer.

Then the Ag NWs-based IDEs was prepared onto the SBS NFs substrate by air-spraying AgNW suspension using a stainless-steel mask. Ag NWs was exploited here due to their high aspect ratio and excellent conductivity that can form continuous conductive networks on SBS NFs frame. The Ag NWs we used has a diameter of ~29 nm and a length of ~20 μm with good purity and crystallinity (Supplementary Figure 1a–c). The adhesion of Ag NWs on the SBS NFs is confirmed by the Ag elemental maps, as shown in the inset SEM images (Fig. 2c). The sheet resistance of Ag NWs on the SBS NFs is only 40.1 ± 4.0 Ω sq−1, which increase to 64.2 ± 7.3 Ω sq−1 after peeling from the backing film (Supplementary Figure 1d), demonstrating its good conductivity. The IDEs with the width and spacing of ~150 μm is shown in Supplementary Figure 2.

The humidity-sensitive AMP composite was synthesized through the insertion of Na+ into MXenes and the self-polymerization of DA (Supplementary Figure 3). After etching Al layer and inserting Na+, the classic multilayers structures of alkalized MXenes (AMX) are clearly observed (Supplementary Figure 4a, b), which are beneficial to improve the interaction area with water molecules. The humidity-sensitive AMP composite was then drop-casted on the IDEs to form the humidity sensor. Figure 2d, e shows the SEM image and energy dispersive spectrometer (EDS) element mapping images of AMP, including the Ti, Na, N, and Al elements. The uniform distribution of the Ti, Na, and N elements on AMP indicate the successful synthesis of AMP composite. The almost undetectable Al element indicates that the aluminum layer has almost been removed. This can be also demonstrated in XRD spectrum in Fig. 2f and Supplementary Figure 4c that the most intense (104) peak (2θ ≈ 38.9°) of SAMP is hardly visible, and the (002) peak is shifted to the left by 2.2°. The in situ oxidation polymerization of DA is critical to the successful synthesis of PDA on the surface of AMX. In the X-ray photoelectron spectroscopy (XPS) spectrum in Fig. 2g, the appearance of the N 1 s peak from PDA confirms the polymerization of DA on the surface of AMX.

The thickness of this SAMP-based sensor is approximately 26 μm according to the side-view SEM image in Fig. 2h. The Young’s modulus of SBS NFs (~0.10 MPa) is very similar to that of human skin (~0.13 MPa), enabling conformal contact between sensors and contoured skin surface. Figure 2i exhibits a picture of the SAMP-based humidity sensor attached to a thump of a volunteer. The ultrathin and flexible SAMP device provides a conformal contact and adequate adhesion to the skin (Fig. 2j), owing to the strong van der Waals force32,33. The enlarged image observed by an optical microscope clearly indicated that the ridges and valleys of the fingerprint surface covered by this SAMP-based humidity sensor are distinguishable, like bare fingerprint. Meanwhile, surface topographies of the thumb replica with/without the as-prepared SAMP-based humidity sensor were observed. As presented in Supplementary Figure 5, the average amplitude (h) and wavelength (λ) of the replica are 75.7 µm and 294 µm, respectively, while those values are 54.1 µm and 240 µm after attaching the SAMP-based sensor. These results prove the ultrathin thickness and high conformability of our device.

Sensing Performance

The electrical conductivity of humidity-sensitive AMP composite changes upon absorbing/desorbing water molecules from the environment. This change is reflected in the variation of the contact resistance between AMP composite and IDEs. The resistance response of SAMP-based sensor depends on the concentration of AMP composite. However, the high concentration of AMP composite can weaken its air permeability. Therefore, optimization of AMP concentration is necessary to balance the resistance response and the air permeability of SAMP-based device. Here, devices coated with five different AMP concentrations of 0.2, 0.4, 0.6, 0.8 and 1.0 mg/ml were designated as SAMP1, SAMP2, SAMP3, SAMP4, SAMP5, respectively. As presented in Fig. 3a, SAMP1 and SAMP2 make a response when the relative humidity increases to 30% and 15%, respectively, which are higher than the humidity detection limit (10%RH) of SAMP 3-5. This is because that the low AMP composite concentration cannot adsorb enough water molecules in the lower humidity environment to form a continuous conductive network, thus failing to cause a change in the resistance value. Meanwhile, the increased AMP concentration can reduce the resistance of the device, which is reflected in the Fig. 3a that the histograms about SAMP 3 - 5 are both lower than SAMP 1 - 2. The sensitivity of humidity sensor can be defined as S = RL/RH, where RL and RH are the resistance of the device under the lowest and highest relative humidity, respectively34. As shown in Fig. 3b, the sensitivity of SAMP 1 - 5 is 157, 208, 704, 420 and 259, respectively. Both the RH of SAMP 3 - 5 are almost the same due to the saturated water molecules, while the RL of SAMP 3 is higher than that of SAPM 4 - 5, so the sensitivity of SAMP 3 is highest. According to the detection limit and sensitivity summarized in Fig. 3b, the sensing performance of SAMP 3 is optimal, which is also higher than that of other reported ultrathin and breathable humidity sensor24,29.

Fig. 3: Quantitative study of the SAMP-based humidity sensor performance.
figure 3

a Humidity responses of the SAMP-based sensor prepared with different AMP composite concentration from 0.2 - 1.0 mg/ml. b The relationship of detection limit and sensitivity with AMP composite concentration. c The mass changes of the water that remained in the bottles covered by different films. d WVTRs of open, covered by SBS NFs, and SAMP 1 – 5 devices. e Hysteresis behavior of sensor for a cycle of 10%RH – 95%RH – 10%RH. f The long-term stability of the sensor. g Response/recovery time of the sensor. h Dynamic contact angles of the SAMP-based sensor.

To evaluate the effect of AMP composite concentration on the air permeability of device, the water vapor permeation test rate (WVTR) was measured at each condition35,36,37, including the opening of which was uncovered, covered with different SAMP 1–5, SBS NFs, commonly used films for flexible wearable electronics (e.g. polyimide (PI), Ecoflex–3 (E–30), polydimethylsiloxane (PDMS)) and bottle cap (close), respectively. The thickness of these films is approximately 26 μm that is comparable to the thickness of the SAMP (Fig. 2h). The containers were all filled 1.0 g deionized water at 0 h. Clearly, the water content of containers covered with SBS NFs and SAMP-based sensor after evaporating for 70 h are lower than others, as shown in Fig. 3c. WVTR is presented as Wloss/(A·t), where Wloss, A and t is the weight of water lost in container, the area of the container mouth and the evaporation time, respectively. Specifically, the WVTR of SAMP 1 - 5 is 0.082, 0.079, 0.078, 0.075 and 0.074 g cm-2 d-1, respectively, which reduces successively as AMP composite concentration decreases (see Fig. 3d). This trend is attributed to that the attached AMP composite would reduce the porosity of SBS NFs substrate. Considering the sensitivity and air permeability, SAMP-based sensor with AMP concentration of 0.6 mg/ml was chosen as the optimal sample.

The hysteresis of the humidity sensor was represented by measuring the resistance change of five samples for a cycle of 10%RH–95%RH –10%RH. The resistance curve of one of the samples during water absorption and desorption is shown in Supplementary Figure 6. Obviously, the gap between water absorption (red line) and desorption curve (black line) is small, indicating little hysteresis of the device (Fig. 3e). Meanwhile, we assessed the stability and repeatability of our sensor. The response of an Ag NWs/SBS NFs film and the SAMP-based sensor during cyclic stretching was measured. As depicted in Supplementary Figure 7, the resistance of both two devices increases when the substrates are stretched due to the increased distance between conductive materials. Their resistance can restore to the initial value after a cyclic stretching, indicating that these materials do not delaminate from the substrate under stretching. Furthermore, as shown in Supplementary Figure 8, the resistance value of the sensor changed by less than 8% even under the bending of 150°, and increased only 4.2% after withstanding 90° bending deformation with 500 times. This proves that the device has good flexibility and bending stability.

It’s well known that pure MXenes tends to oxidize and degrade rapidly when exposed to air and/or water, due to the formation of titanium dioxide (TiO2) and carbon (C)38. The humidity-sensing material reported in our previous work31, AMP, can effectively obstruct the path of oxygen permeation through the tight bond of PDA layer with MXenes sheet surface, thereby enhancing the material stability. Figure 3f confirmed the long-term stability of the SAMP-based sensor when stored at room temperature (RT, 22 °C) in a drying closet (~25% RH) over a two-week period. It is evident that the resistance signal of the device remains relatively stable over 14 days of repeated testing. Meanwhile, we studied the impact of temperature and air pressure on the sensor performance (Supplementary Figures 9 and 10). It is observed that the effect of temperature on the performance of the sensor is minimal, while air pressure has a great influence on SAMP-bases sensor. Descend air pressure will reduce water molecular adsorbed by the humidity-sensitive layer of the device, leading to an increase in resistance.

The dynamic response of the device when the relative humidity changes from 45% to 95% were shown in Fig. 3g. Response time is defined as the time that it takes for the current value to change from 10% to 90% and the opposite for the recovery time39. The response and recovery times of the device were calculated as 0.9 s and 0.9 s, respectively, which were less than those of the previously reported ultrathin and breathable humidity sensor24,29. We employed dynamic contact angle testing and thermogravimetric analysises (TGA) to discuss the effect of water adsorption and desorption process on the response time and sensitivity of our humidity sensor. The sensing performance of the humidity sensor is closely related to the capacity for water adsorption of the material. The water contact angle measurement is essential technique to characterize the water adsorption ability of the humidity-sensing material. If the hydrophilicity of the humidity-sensitive material is high, it facilitates adsorption of the water molecules and consequently results in a high response value and quick response speed for the humidity sensor40,41,42. As shown in Fig. 3h, the water contact angle of the device (AMP layer side) reduces from 17.76° to 14.75° after ten seconds of wetting. This demonstrates that SAMP-based device exhibits superior hydrophilicity, which aids in the rapid water adsorption onto the device surface and in reducing the response time. This is largely attributed to the abundance of hydrogen bonds present on the surface of the humidity-sensitive material AMP7. Furthermore, from the TGA curve of the SAMP 3-based sensor, as shown in Supplementary Figure 11, there is approximately 15.2% weight loss below 100 °C. We hypothesize this is due to the evaporation of water molecules adsorbed on the water-saturated SAMP3-based humidity sensor, indicating the high sensitivity to humidity3. The excellent repeatability of the device was demonstrated in Supplementary Figure 12. The resistance value of sensor hardly declined during 5 cycles when relative humidity was performed in the 45-75%RH and 45-95%RH cycle. A comparison of the response cycle period Ttotal (the sum of response time and recovery time) and sensitivity of several previously reported resistive-type humidity sensors, including Ti3C2Tx/chitosan-quercetin8, alkalized MXenes23, PVA NFs/Au24, polyvinyl alcohol (PVA)/graphene nanofiber29, alkalized Ti3C2/PDA31, Ti3C2Tx/ poly(diallyldimethylammonium chloride) (PDAC)34, alkalized Ti3C2Tx43, and MoO3 nanosheets44 is showed in Supplementary Figure 13 and Supplementary Table 1. It can be seen that the sensitivity and the sum of response time and recovery time of our SAMP-based humidity sensor are at an average level, but its air permeability is better than most devices.

Application demonstration

The SAMP-based humidity sensor with prominent air permeability exhibits a high humidity response and can be used as a wearable device to monitor some humidity-related behaviors that can reflect adequate motional and emotional states of humans in real-time (see Fig. 4a). Here, the as-prepared device was attached to a volunteer’s forehead to monitor the sweat amount, before, during, and after the deep squat exercise. The forehead skin perspired during the exercise, and the evaporated water molecules were captured by the SAMP, leading to changes in electrical signals of the sensor, as shown in Fig. 4b. This demonstrates the potential application of our device in detecting sweat on the skin surface. Remarkably, our sensor presents superior adhesion to the skin in which there are a lot of sweat. Here, we dropped 2 ml of normal saline (0.9 wt.%) onto the sensor attached to the skin surface to simulate heavy sweating. As depicted in Fig. 4c, the sensor presents conformal deformation along with the squeezed skin and shows no obvious peeling after being squeezed 10 times.

Fig. 4: Humidity sensor application in the recognition of motional states and emotional modes.
figure 4

a Illustration of SAMP-based humidity sensor attached on the face to monitor humidity-related behaviors. b The current response of sensors for before, during and after exercise. c Photograph images of SAMP-based humidity sensor attached to skin soaked with normal saline after being squeezed by fingers (scale bar: 8 mm). d Current response of sensors under different exercise states, including breath holding, resting, walking and running, respectively. e CWT results for the breath frequency versus time curves of d. f Digital images showing the skin conditions of the volunteer after attaching different films, including PI, E-30, PDMS, and SAMP-based sensors. g The measured current for breathing patterns under different emotional states, including fear, pain, normal and wonder. h Flow chart of the emotional state recognition algorithm based on machine learning. i Confusion map for four types of breathing pattern recognition.

The breathing patterns, such as, depth and frequency, are strongly influenced by human motional and emotional states45,46. Due to the high water molecule content in exhaled air from nose or mouth, a humidity sensor can be employed to estimate human motional and emotional states by monitoring breathing patterns. We tested output current of the SAPM-based humidity sensor attached on subnasal under four motional conditions, including breath-holding, resting, walking, and running (see Fig. 4d). The continuous wavelet transform (CWT) results for the time-domain current response curve to clearly indicate the frequency and magnitude characteristic of different breath patterns are also shown in Fig. 4e. There was no depth change and frequency information at breath-holding state. The breathing depth and frequency for resting, walking, and running were 2.4 ± 0.3 × 10–7A, f = 0.173 ± 0.015 Hz; 3.3 ± 0.5 × 10–7 A, f = 0.29 ± 0.025 Hz; 4.0 ± 0.5 × 10–7 A, f = 0.37 ± 0.034 Hz; respectively. The revealed distinct breathing depths and frequencies indicate the device’s ability to distinguish various exercise states. The reliability of the device was demonstrated by monitoring the breathing patterns of one volunteer under resting condition for 65 min (Supplementary Figure 14). Permeability and biocompatibility are essential for wearable and on-skin devices. The biocompatibility of the materials used in our sensor, including SBS, Ag NWs, MXenes, and PDA, has been confirmed by cell and animal experiments17,47,48,49. Meanwhile, we carried out on-skin tests to demonstrate the permeability of our sensor for long-term wearability. Four samples, including SAPM-based sensor, PDMS, E-30 and PI films, were attached to the inner forearm of a volunteer to observe changes of skin surface condition over time. As shown in Fig. 4f, no obvious abnormalities appeared on the skin surface for these four samples after three days. However, after eight days, erythema and oedema developed in the skin under the other three films, while the skin attached by the SAMP-based sensor remained normal, indicating its skin-friendliness. It should be note that there are some dark spots observed on the skin could be attributed to dust particles. Over the course of the 8-day wear period, volunteers continued their daily routines as normal, during which the skin would naturally secrete sweat and oils. These secretions can easily trap dust particles from the surrounding environment pass through the gas holes of SAMP. Consequently, without any cleaning treatment, some dark dirt spots are likely to appear on both the skin areas where the SAMP-based sensor is attached and the bare skin areas.

In addition, the current curves of our humidity sensor were collected when the volunteer was in the state of normal, fear, pain, or wonder. As depicted in Fig. 4g and Supplementary Figure 15, from the breathing patterns between different emotions states, we can find that the human breaths shallowly in pain state, rapidly in fear state, deeply and slowly in wonder state, which is consistent with the results in previous works45,46. Furthermore, a support vector machines (SVM) algorithm was employed for accurate recognition of various breathing patterns (Fig. 4h). We directly employed raw current data in the time domain as the sample features. The length for each emotional state data is 355, implying that each sample has 355 features. Each feature represents one data point in the time series during breathing, encapsulating information related to breathing depth, rate, pause and the ratio of inspiratory time to expiratory time, among other factors. Details about experiments are shown in Methods. Based on the machine learning model, a high recognition accuracy of 86.7% can be achieved (Fig. 4i).

HMI functions can be realized based on various mechanisms, including conductivity50, piezoresistivity51, piezoionic52, and triboelectricity53. Among these, the HMI based on the humidity modal exploiting the inherent humidity field of the finger skin is operated noncontact to avoid mechanical contact and bacterial cross-infection. Moreover, the response signal depends on the distance between the finger skin and device, which can respond to both varied and stable humidity. As shown in Fig. 5a, the maximum value of the current-time curve showed a decreasing trend when the distance between the fingertip surface and the sensor increased from 1 mm to 3 mm. This is because the humidity near the skin surface decreases with distance. To avoid the problems caused by accidental triggering of a single-point control and effectively distinguish finger movements, a 3 × 3 humidity sensor array is prepared to monitor finger sliding tracks. As shown in Fig. 5b, c, the current value curve of 8-5-2 pixels in sensing array responded to the fingertip, denoting the finger sliding track “↑“, and exhibited a distinct time sequence. The other two sliding tracks, including “↓“ and “←“, were also verified (Supplementary Figure 16). Meanwhile, a wearable and non-contact HMI based on this 3×3 sensor array for controlling a robot car motion to transfer a medical kit was successfully realized. Figure 5d, e showed the photograph and the circuit diagram of the HMI system, which consists of a robot car, processing circuit, a 3 × 3 humidity sensor array, a storage box, a medical kit and a battery. In detail, when the finger crossed the 8-5-2/2-5-8, 6-5-4 and 1-4-7/3-6-9 pixels surfaces of the HMI system in turn, HMI system sent out control commands for the robot car to move forward/backward, turn left, and the clamp to close/open, respectively. Figure 5f and Supplementary video 1 exhibited the continuous movements of going forward, gripping the medical box, turning left and moving forward, releasing the medical kit and going backward, respectively. The above application shows the potential of the flexible HMI in the field of noncontact control.

Fig. 5: Application of the noncontact HMI based on SAMP-based humidity sensor.
figure 5

a The dynamic current response of sensor near the fingertip surface. b Diagram of the current value distribution of a 3 × 3 humidity sensor array. c The response current-time curves of the 8-5-2 sensing pixels of array in sequence. d Photograph and e circuit diagram of the wearable and non-contact HMI system to control a robot car. f Demonstration of HMI in controlling a robot car to transfer a medical kit.

Overall, a skin-conformal and breathable humidity sensor based on electrospun SBS NFs and AMP has been proposed. Owing to the high specific surface area of MXenes and large amount of -OH groups of PDA, this humidity sensor shows a high sensitivity (S = 704) and fast response/recovery property (0.9 s/0.9 s). The flexible and porous SBS NFs provides the sensor an ultrathin thickness (~26 μm) and satisfactory air permeability (0.078 g cm–2 d–1). The accurate detection of respiration under different exercise states and recognition of four emotional states were successfully demonstrated. A noncontact HMI based on the 3 × 3 humidity sensor array was developed to control the motion of a robot car through the noncontact finger slide. Our work has great potential for the future of healthcare and HMI.

Methods

Materials

Dopamine hydrochloride, Tris(hydroxymethyl) aminomethane (Tris), hydrofluoric acid (HF), sodium hydroxide (NaOH), Tetrahydrofuran (THF) and Dimethylformamide (DMF) were purchased from Sinopharm Chemical Reagent Co., Ltd. Ag NWs ethanol dispersion were purchased from Nanjing XFNANO Materials Tech Co., Ltd. MAX(Ti3AlC2) powder was purchased from 11 technology Co., Ltd. SBS particle was purchased from Alibaba Group Holding Limited. All the materials were used without further purification.

Synthesis of AMP composite

First, 20 ml HF was added dropwise into 2 g MAX powder and stirred continuously for 24 h in a water bath heated to 50 °C. Then, the above dispersion was repeated washed with deionized water until its pH value was diluted to 6. Followed by drying at 110 °C for 12 h under vacuum oven, the MXenes powder with multilayer structure was obtained. Additionally, 80 mg MXenes powers was added into 20 ml 5 M NaOH solution and stirred continuously for 2 h. After the mixture was dried in a vacuum oven at 70 °C for 10 h, the alkalinized MXenes (AM) powder was prepared. Subsequently, the AM powder was completely mixed with Tris buffer solution (pH = 8.5) for 2 h under constant stirring. The dopamine hydrochloride was added into the mixture in an ice bath for 10 min and stirred continuously for 24 h to polymerize the dopamine molecules. Finally, after several deionized water centrifugal washing to remove the free PDA particles and Tris, the AMP composite suspensions was prepared.

Preparation of SBS NFs substrate

First, SBS particle was dried at 50 °C for 12 h under vacuum oven. Then, 14 wt.% SBS/THF/DMF solution (the mass ratio of THF to DMF was controlled at 3:1) was stirred for 4 h at room temperature. Subsequently, the SBS solution was electrospun by applying a high voltage of 14 kV across a metallic needle (27 G). The feed rate of solution and the collecting distance between the needle tip and the fiber collector was kept to be 0.3 ml/h and 12 cm, respectively. To make the fabricated SBS NFs substrate easy to delaminate, the SBS NFs were collected on a roller (radius = 4 cm) covered with silicone-coated paper for 15 min. Finally, after drying at fume cupboard for 2 h to evaporate the residual THF/DMF solvent, the SBS NFs substrate was obtained. SBS NFs substrate were prepared using an electrospinning machine (JDF05, Changsha Nayi Instrument Technology Co., Ltd.).

Fabrication of SAMP sensor

A 100 μm thick PET-based frame with rectangular apertures was made and adhered to the SBS NFs substrate to facilitate the transfer of the fabricated sample to the surface of the object to be tested. Then, the Ag NWs suspension was patterned to IDEs on SBS NFs through an air spraying process with a stainless-steel mask. In the end, after 150 μL AMP suspensions were deposited onto the IDEs and dried at RT for 12 h, the SAMP-based humidity sensor was fabricated.

Characterization

The humidity environment was controlled by a constant temperature/humidity chamber (GPS-3, ESPEC environmental equipment CO., LTD.). The electrical property of the sensor was measured by a digital source meter (2600, Keithley). The microscopic morphologies were characterized by scanning electron microscopy (S-4800, Hitachi) and ultra-depth three-dimensional microscope (VHX-5000, KEYENCE). The element of SAMP was analyzed by X-ray photoelectron spectroscopy (250Xi, 0EscaLab) and X-Ray Diffraction (smartlab 9, Rigaku). The sheet resistance of Ag NWs was measured by 5601-Y sheet resistivity meter (Quatek Inc.).

Emotional mode recognition

Humidity sensors were applied to the skin on subnasal of volunteers for emotional mode recognition tests. Six human subjects were instructed to replicate each of four emotional states, including normal, pain, fear, and wonder, 30 times to ensure the reliability of the data set. The 720 samples in all were randomly divided into two groups at the ratio of 7:3 (training: 540 samples, testing: 180 samples) for emotional mode recognition in machine learning model.

Ethical information for studies involving human subjects

The volunteers provided signed written informed consents to participate in the study. All experiments involving human subjects were conducted in compliance with the guidelines of Institutional Review Board. All procedures involving human were approved by the Science and Technology Ethics Committee of Shanghai University.

Reporting summary

Further information on research design is available in the Nature Research Reporting Summary linked to this article.