1 Introduction

Vital signs are measurements of the most basic vital (life-sustaining) functions of the human body, and they are useful to detect or monitor health problems. The main vital signs that are monitored routinely are the following [1]:

  1. 1.

    Body temperature

  2. 2.

    Pulse (heart rate)

  3. 3.

    Breathing rate (respiratory rate)

  4. 4.

    Blood pressure

Vital signs can be measured in a medical institute, at home, during a medical emergency, or in any other place. Multiple devices are used in the medical industry to detect whether a person suffers from a respiratory disease, thus providing an early diagnosis [2].

Following emergency protocols when an accident occurs involves measuring vital signs to determine the state of the person and prioritize the necessary actions. One of these signs is breathing. Without equipment either ear is usually brought to the respiratory tract of the injured people to be able to listen their breathing or a mirror is placed next to the nose to detect the mist. However, in many cases the environmental conditions are not favorable such as rain, noise, and absence of light, thus making it difficult to perform any measurement. In this work, we adapt a FS5 sensor to a mask to detect respiration, no matter how weak it is, thus proposing more reliable breathing indicator.

The thermal mass flow sensor FS5 (Innovative Sensor Technology) [3] uses heat transfer principles to determine the air flow velocity. As the air flow passes through the sensor, the heat is carried from the sensor to the medium. As the air flow increases, the amount of heat transferred to the medium also increases. By knowing the heat transfer, it is possible to determine the flow rate from the amount of voltage compensation needed to maintain a constant differential temperature. A signal conditioning stage is used to deliver a DC voltage as a measurement parameter. This is due to Joule’s law of heating [4], which implies that the heat dissipation power in a current is a function of the square of the current that consumes the resistance to keep the heater at a constant temperature.

According to the data sheet of the FS5, the sensitivity curve shows a nonlinear, polynomial or logarithmic behavior. From 0.2 to 3 m/s (first stage) the sensor is highly sensitive, which is an advantage for using it to detect low respiration. On the other hand, this high sensitivity could detect parasitic air currents from external blizzards if the sensor is not used correctly.

2 Methodology

To modify the medical device for breathing detection, we used an FS5 air flow sensor, a conditioning module for the signal, a control circuit using a PIC16F88 microcontroller, and a 16 × 2 characters liquid crystal display (LCD) to visualize the data.

Figure 1 depicts the signal acquisition process stages.

Fig. 1
figure 1

Stages of data acquisition system

The sensor was calibrated by isolating it from the air currents to obtain a voltage of 3.6 V at the output of the conditioning circuit, corresponding to 0 m / s. Analog-digital conversion by the microcontroller was performed with a 10-bit resolution.

Using a high precision anemometer HD-300 and placing the sensor in via of an air controlled flow, we logged several points of air velocity versus DC voltage. By nonlinear regression these points were taken to reconstruct the calibration curve as shown in Fig. 2.

Fig. 2
figure 2

Calibration curve of the FS-5 sensor

Once the fit polynomial was obtained, it was embedded in the microcontroller as an equation to calculate air velocity during respiration.

We performed an experiment to gather data on the amplitude of characteristic breathing at rest; the sensor was incorporated into a face mask using a plastic tube as a guide to place the sensor inside. Afterward, a volunteer wore the face mask, and the sensor output was connected to a TDS2002B digital oscilloscope. The data were recorded for one and a half minutes, as depicted in Fig. 3. Each peak represents an exhalation. Using the cursors, we took a segment of 60s, having a frequency of 14 cycles per minute. We calculate an average of the maximum measured voltage, to have a standard value to be compared.

Fig. 3
figure 3

Breathing pattern of a volunteer at resting

As Fig. 3 depicts, the breathing signal shows a clear pattern: there are peaks when air is exhaled, then, the curve descents when air is inhaled. Inhalations are longer than exhalations.

Figure 4 depicts the amplitude peak of the exhalations in 4.6 V (Cursor 1) on average, corresponding to a speed of 4.8 m / s. The peaks lower than 4.6 V but higher than 4 V were due to the inhalations flow, which are less intense, but they still generate an air flow.

Fig. 4
figure 4

Intensity of the expirations

The average amplitude of an exhalation can be used as a parameter to be reached in order to count an exhalation. In other words, an exhalation is measured above 4.4 V. Figure 5 shows a lapse of three to four seconds between each exhalation, which corroborates a frequency of 15 to 20 respirations per minute.

Fig. 5
figure 5

Time between expirations

We performed a simulation using the Proteus Design Suite software, student version. As Fig. 6 illustrates, three LED indicators are used to show respiration intensity: red for null airflow, blue for low respiration, and green for normal respiration.

Fig. 6
figure 6

Air flow detector simulation using Proteus Design Suite software, student Version

We calculate air velocity (in m/s) every 300 ms. The initial time (t) was when we started measuring breathing of patients. We calculate the respiratory rate every 30 s using a sampling rate of twice the signal frequency as the Nyquist sampling theorem [5]. Respiratory rate is updated every 30 s using the “Timer1” of the microcontroller.

3 Results and discussion

We conducted respiratory tests with the detection circuit on an experimental breadboard to corroborate circuit’s operation. We placed the face mask on the nose of five volunteers imitating patients. Patients were collocated in different corporal positions and stimulated the FS5 sensor with low respiration levels. According the results, the breathing detection system was capable of discerning between low respiration and an external parasitic air flow. The experimental setup is shown in Fig. 7.

Fig. 7
figure 7

Experimental setup used in the laboratory tests

We tested the performance of our innovative technology under different conditions, such as audible noise, changes in room temperature, changes in ambient light, and transitory random air flow events.

After obtaining a robust prototype of a medical auxiliary, we designed and built a printed circuit using Altium Designer software (student version). Then, we incorporated the circuit to the face mask. Figure 8 illustrates the final printed circuit.

Fig. 8
figure 8

Electronic schematic diagram of the detection system

Since the SF5 sensor is highly sensitive, it may detect small air currents as a fake positive, thus adding breaths to the summation. We eliminate this source of error conditioning measurements to maintaining air flow constant for more than 700 ms (average time measured with the oscilloscope). After this time, we count an exhalation. The technology that we presented here to the respiration mask can be used for developing novel biomedical devices using the FS5 sensor.

4 Conclusions

We managed to characterize respiration by means of an airflow sensor and verify inhalation and exhalation times, as well as inhalation frequency. These parameters were implemented with a microcontroller to have an indicator of the intensity of breathing. Moreover, we managed to monitor respiratory rate using a modified medical face mask that does not disturb the natural process of breathing in patients with low level of respiration related to a health transitory risk. As future work, we will seek to change the components for surface assembling to reduce the size of the printed circuit. Similarly, we will attempt to design a face mask that incorporates the electronic circuits between their material layers.