1. Introduction
One of the most discussed themes of COVID-19 was the application of personal protective masks. There was a lot of discourse about the positive and potentially harmful effects of mask-wearing in both the academic press and mainstream media. Although the interest and effect of COVID-19 have primarily fallen back, the issue remains as relevant today as it was then, as masks are not only used for infectious diseases; they are used in everyday work in hospitals, clean rooms, chemical environments, cities with highly polluted air, or workplaces with high dust emissions.
Rhee et al. [
1] found that passive mask use significantly increases carbon dioxide levels on the user side. The weight and size of the equipment with the sensing they used made measurements impractical in real-life wearable scenarios. Georgi et al. [
2] investigated several factors when different face masks were combined with physical movement. They suggested that the health risk of long-term mask use in healthy individuals is unlikely. Myhrvold et al. [
3] focused on the degradation of the academic performance of students. They conducted surveys in several schools with poor air quality before and after the ventilation system’s renovation. They used air temperature, humidity, radiant temperature asymmetry, and air velocity measurements with sensors and tracer-gas monitoring equipment. László Kajtár and Levente Herczeg [
4] confirmed the findings of [
3] regarding decreasing student performance. Escobedo et al. [
5] designed a CO
2 detection sensor device that can be integrated into a mask to monitor the CO
2 concentration inside the mask in real time; it has an opto-chemical carbon-dioxide sensing membrane with color data processing and NFC-enabled smartphone connection. The phone must be brought close to the circuit, and the circuit obtains energy from the nearby NFC magnetic field to take the measurement and then sends the data back via this NFC communication. A lack of a built-in power supply leaves the data collection to the user. Merkl et al. [
6] measured carbon dioxide by conducting multiple measurements in a homogeneous network structure with a wireless sensor network. Recently, Salva et al. [
7] focused on personal air-quality monitoring, where temperature, humidity, particulate matter PM 2.5, carbon monoxide, nitrogen dioxide, and ozone were measured in a portable device with distinct sensors, which could last for 30–60 h of work time. However, this complexity and PM analysis is still a challenge to scale down to the form factor of wearable masks, which is also due to the downsizing limitations of, e.g., PM sensors.
A. Fois et al. [
8] have designed a wearable mask with a proprietary design that provides the wearer with active protection and several sensors. It can measure temperature, humidity, and pressure inside the mask, with embedded thermal measuring in the fabric of the filter as a novelty. With appropriate detection software, potentially infected individuals can be detected. This device runs on lithium-ion batteries and communicates via Bluetooth. After use, the mask automatically disinfects (only COVID-19 is mentioned) and recharges itself when placed on the charging station.
Alexander et al. [
9] have developed a mask-mountable modular system that monitors the wearer using a barometer, accelerometer, microphone, magnetometer, AQI (Air Quality Index) sensor, temperature sensor, and wireless communication (Bluetooth). Power harvesting systems can be connected to the circuit via two connectors (AC/DC); the harvested energy is stored in capacitors. Based on their previous work, some of the sensors listed above have been used to measure ballistocardiography (BCG), respiratory rate, and mask fit using user calibration. Sethumadhavan et al. designed a smart mask using an air-purifying function [
10]. However, their paper lacks an actual presentation of the application and possible sensor interactions. Lazaro et al. [
11] presented a Smart Mask, which integrated a heat flux sensor for fast, remote healthcare monitoring. They revealed that breathing rate, coughing, and body temperature could be measured with their approach. Mudiyanselage et al. [
12] used IoT-based sensor integration to determine the life expectancy of the masks. They integrated humidity and temperature sensors into their configuration by sewing and cabling through the mask, meaning the filtering parameters were violated. Also, the sensor components were not specified. Chen [
13] presented a mask where identity recognition is integrated, and NFC technology is used to help prevent the spreading of the virus. Manchanda et al. [
14] presented an automated mask adjuster based on sensor fusion data for better fitting. Their implementation involved a 3D-printed shell and an Arduino-based system; however, the system had a shortcoming of being inconvenient. The system used light-dependent resistor (LDR) sensors and one temperature/humidity sensor (DHT11).
The AirPop Active mask [
15] from SX Innovation LTD of Hong Kong is perhaps the only sensor-equipped mask on the market available at the time of writing this paper. The built-in AQI sensor monitors local air quality and provides feedback on respiration while maintaining filtering performance. However, the outlet valve, where the electronics are stored, might be a concern during a pandemic. Data can be synchronized with a smartphone app. The device runs on a single CR1632 battery and lasts 3–6 months, with 2 h of use per day. The type of sensors used is not disclosed.
It can be seen that although several projects are addressing the issue of sensor implementation in masks, their tasks, objectives, sensor types, and actual components are very different. Currently, there is no easy-to-use, durable, autonomous solution whose primary purpose is all-around personal data collection.
In addition to the above, several smart masks without applied sensors and data collection have been developed recently. These often omit sensors and environmental monitoring but can include built-in fans and filters, microphones, speakers, and lighting. Their purpose is the user’s comfort and individual appearance. The LG PuriCare [
16] is one of the most common; it has two fans and a breathing sensor that continuously assists breathing through HEPA filters in the mask. A built-in 820 mAh lithium battery powers the device. Depending on the setting, the user can adjust the fan speed in three settings, with a single charge lasting 4–8 h. Razer’s Zephyr mask is very similar in terms of use [
17,
18]; it also features filters and fans without the need for environmental/breathing sensing. It has a much bolder design than its peers as it uses RGB lighting inside and outside and transparent surfaces to attract attention. However, unlike the LG PuriCare mask, this one was not antibacterial certified. Also, the mask was available during the pandemic; however, its support was discontinued later.
To sum up, there are different approaches for making personal protection equipment and environmental detectors within the frame of mask application. One possibility is where embedding requires proprietary sensing solutions, such as filter-embedded sensors [
8]. However, others have a bulky construction, where wearability or mask embedding is not practical [
1,
2,
7]. Moreover, they may require mounting or the complete redesign of the mask bulk [
9,
14,
16,
17,
18]; have power limitations [
5]; and have violated filtering [
12], and sensors may be omitted [
16,
17,
18] or there may be no specific description of their applications. Furthermore, it must be concluded that the best solutions integrate autonomous power [
7,
8,
9,
15,
16,
17]; they generally present humidity, temperature [
7,
8,
11,
12,
14], and AQI [
9,
15] measurements for user data and environmental analysis.
The works mentioned above touch upon multi-sensor-based measurements with IoT capabilities, often pushing the focus on filtration evaluation, pandemic control, and other comfort functions. However, a comprehensive device is missing from the literature that applies a multi-sensing-based, fully portable, IoT-enabled device and investigates both sides (the outside world and the proximity of the user underneath the mask) of a functional personal protective mask—in terms of temperature, humidity, pressure, and AQI sensing—while trying to retain the filtering capabilities of the system. We proposed to investigate this configuration using commercial masks retrofitted with such a device. This paper presents the research and development leading to actual measurements and validation in an urban environment.
2. Materials and Methods
Figure 1 shows the concept of embedding sensors and respective electronics into two different mask types. The first type (A) was a pair of commercially available, non-branded, three-layer medical masks; the second type (B) was a commercial, but more robust, 3M Aura 9320D+ FFP2-type mask. Details about the protective masks are presented in the given subsections.
The hardware design must be small and embeddable in the form factor of face masks. The design basics were based on our previous wearable air-quality monitoring system [
19] based on different sensor modules. The form factor and sensing functionality were optimized for embedding into the bulk of a mask. The block diagram and multi-sensing approach are shown in
Figure 1.
The Bosch BME680 is a common, cost-effective humidity, temperature, pressure, and VOC (Volatile Organic Compound) air-quality sensor [
20,
21]. Its miniscule size (3 × 3 × 0.9 mm
3) and low power consumption make it a popular choice for portable smart devices. The response time of the gas sensor (33–63% transition) is less than 1 s, and its output is the resistance value of the gas sensor. The sensor can validate the Air Quality Index (AQI), as defined in the datasheet (more information is provided in
Section 2.2). The integrated signal processing electronics can communicate via I2C or SPI. Temperature, humidity, and pressure results are also directly obtainable from the digital output of the sensor. The temperature sensor embedded in the BME680 has an absolute accuracy of ±0.5 °C at ambiance and ±1 °C along the full accuracy scale (0–65 °C). The output resolution is 0.01 °C and the operating temperature range is −40 to 85 °C. The pressure sensor has the same operating temperature and full accuracy range. The maximum resolution is 0.18 Pa. The absolute accuracy is ±0.6 hPa at 300–1100 hPa, and the relative accuracy is ±0.12 hPa at 25–40 °C and 700–1100 hPa, at constant humidity. The accuracy enables altimetry. The humidity sensor has the same operating and full accuracy range, with ±3 %rh absolute accuracy at 20–80 %rH at 25 °C, 1.5 %rh hysteresis at 10→90→10 %rh at 25 °C, and 0.008 %rH resolution. Two of the sensors were designed for the circuit so that we could monitor air outside and inside the mask at the same time.
The ST Microelectronics BlueNRG-2 microcontroller SoC (System on a Chip) is a standalone, programmable BLE 5.3 (Bluetooth Low Energy)-compliant wireless microcontroller. The BlueNRG-2 has no built-in USB (Universal Serial Bus) controller, so we used an external USB-UART converter: the Silicon Labs CP2102N integrated circuit. Bluetooth LE capability is essential for designing a portable circuit. A voltage converter was applied since the BME680 has a maximum voltage of 3.6 V. We used the Texas Instruments TPS63051 buck-boost converter for this purpose. Using a switching DC-DC converter, we can generate a stable 3.3 V supply voltage regardless of the current battery operating voltage range. For battery charging, the MCP73843 charge controller IC was chosen. The single-cell Li-Ion/Li-Po battery type was chosen based on consumption estimation and format factor (
Section 3.1 will present this in detail).
The final design was realized on a classic FR4 (Flame-Retardant Type 4, double-sided, 1.55 mm, 1 oz) PCB, where an SAC305-type alloy was used for soldering. A Finetech FinePlacer was used to mount the Bluetooth module. The system was reflowed using an eC-Reflow Mate (Eurocircuits, Hungary, Felsőtárkány) and SAC305 lead-free solder paste. X-ray analysis with a Nordson Dage Quadra 5 microscope was applied to investigate the surface mounting of the SoC package for the non-destructive inspection of the joints.
2.1. Software Design
The software design must be efficient, capable of communicating wirelessly, and work with low consumption.
Figure 2 presents the block diagram of the embedded software. The software was created in the Atollic TrueStudio development environment. The program’s first step is to initialize the inputs and outputs and the communication peripherals, and then the initialization functions of the BLE stack follow. The deep sleep function is vital for low power consumption. Due to the BLE communication and the automatic calibration of the internal clock, the microcontroller can wake up to a maximum of every 15 s or even immediately after a function call. Therefore, an important part of the sleep cycle is constantly checking the time spent in sleep based on the 32 kHz counter. A string is our smallest data storage unit; a string contains the metadata needed to write/read and the data to communicate. To make data transfer as compact as possible, all the data from our two BME sensors are transmitted in a single string within a shared service; this data bundle can later be decrypted in a smartphone app. The strings operate on a subscribe-notify basis.
To communicate with the sensors, we used the BME68x API (Application Programming Interface) [
22]. To use the library, we first had to write the functions that allow the API to communicate with the sensors. To initialize a sensor, we must create an array containing the sensor information, such as the sensor’s address or the pointer of the functions used to access the sensor. We then need to set the desired sampling filters and the gas sensor’s target temperature and heating time. Then, a measurement can be started at any time by identifying the appropriate function. The BSEC (Bosch Sensortec Environmental Cluster) library (Version 2.4.0.0, 2022) [
23] is a software package developed by Bosch to process the data measured by the BME680 (or BME688) sensor at the measurement site, even together with data from other sensors (sensor fusion). The output is a set of compensated temperature, humidity, pressure, and AQI (Air Quality Index) values calculated from each measured characteristic. It is interesting to note that in the datasheet, IAQ is mentioned; however, this is not in terms of its general meaning (Indoor Air Quality) but as the “Index of Air Quality”. To further avoid general confusion, we use the more general AQI term throughout the paper; however, it must be noted that the AQI reference must be handled in alignment with the datasheet values and ranges [
20]. The given index parameters apply only to the combination of BME680 together with the Bosch Software Environmental Cluster (BSEC) solution. According to the datasheet, the BSEC software auto-calibrates the low and high concentrations of VOC applied during initial testing to the indices of 50 and 200, respectively.
The AQI value is a relative index that can be interpreted between 0 and 500. A value of 0 indicates good air and a value of 500 indicates highly polluted air [
20]. These limits are continuously variable values, and their accuracy increases with the running time of the BSEC algorithm as the various ambient air-quality conditions change. This aspect was also validated during our experiments. To reduce the memory and power requirement, only the sensor on the outside of the mask will be processed by the BSEC library for AQI detection; the inner sensor will always be in a “polluted” air state due to the exhale of the user, which is concentrated under the mask and with which the outside values would be summarized, as the masks do not filter the outside values from this aspect. Thus, the AQI value calculated from the inside of the mask would be disproportionately inaccurate in any case. During development, it was apparent that the outside sensor was not affected by the exhale significantly (while the inner sensor was saturated). To sum up, the AQI is only calculated outside, and the other parameters are all read from both sides.
After initialization, the BSEC library provides the configuration data block. Once the settings have been loaded into the sensor, a measurement is started, and then it sleeps until the data are ready. Although there is no interrupt output on the sensor to indicate exactly when to read the data, the length of the sleep can be accurately determined from the heating time of the gas sensor. After the data are read, they are passed to the BSEC algorithm, and the processed data are published in the BLE characteristics via a serial port. After that, another sleep follows, the length of which is given to us by the BSEC algorithm. At the beginning of the cycle, we always check when the last voltage measurement was taken. If it is older than 30 s, we turn on the voltage divider and start an ADC (analog-digital conversion) measurement cycle. After waking up from the first sleep and reading the sensor data, the ADC reading is read, the voltage measurement time is stored, and the voltage divider is switched off. The ADC operates with a battery voltage resolution of 6.8 mV. This is enough to give an approximate estimate of the charge.
2.2. Embedding the Sensors and Electronics to the Mask Structure
For the mask embedding, we used two different types of masks. According to the literature, the commercially available, non-branded, three-layer medical mask has a supposed filtration rate that can go below 50% [
24] and up to 90% [
25]. This is named Mask Type A in
Figure 3 and later discussions (A/1 inner layer, A/2 inner filter layer, A/3 outer layer). The layers should be composed of different polymers (such as polypropylene [
25]); however, the proper composition is unknown. The 3M Aura 9320D+ FFP2 type mask, with three layers, is FFP2-certified, which means that the filter performance must be ≥94% [
26], or from the other side, according to EN 149:2001 + A1:2009, the maximum filter penetration must be 6% [
27]. The structure of the 3M Aura is known and is based on different layers of polypropylene filters [
27] (
Figure 3, B/1—outer layer, B/2—middle, main filter layer, B/3—inner layer).
The sensor-based electronics were embedded into the structure using two different approaches. Type A was very sensitive to any preparations, so two masks were adhered along the edges. Supposedly, this would increase the filtration capability. Type B was opened along the welded edge, and the electronic board and battery were positioned between the B/2 and B/3 layers. For both masks, the BME-type sensors were covered with the remaining residue-free adhesives (Kapton-type tape), and then the openings were joined and closed around the sensor with technical adhesive. After 24 h of curing, the covers were removed—this way, the sensor saturation with the departing volatiles from the adhesive was avoided. Type A and B also have different fittings; Type B has nose foam next to the nose clip and a more stable perimeter, resulting in better fitting along the face. As a technical difficulty, congested humidity inside the mask caused occasional resets in the electronics, so the bottom of the PCB was covered with Kapton-type dielectric tape to avoid further humidity precipitation.
2.3. Verification of the Mask Filtration Efficiency
The filtration efficiency before and after the mask modification was performed using a previously developed, particle-counting-based evaluation method [
28,
29]. A particle counter (LASAIR III 310C) and a prepared head model (Caucasian type, made by TSI) were used for measurement, and the sample holder head with mouth flow channel was connected to the particle counter with a pipe. This way, the system could validate the mask filtration capability before and after the sensor insertion. The setup is shown in
Figure 4.
The portable aerosol particle counter, Lasair III 310C, is usually applied to qualify clean rooms and is a laser-based particle counter. The device suctions air with particles that pass through a laser light. A photodetector detects the loss of the laser light by the scattering effect of the particles. The loss of the laser light allows for determining the obstructing particle’s size. The Lasair III 310C distinguishes the counted particles into six size ranges: 0.3–0.5 µm, 0.5–1 µm, 1–5 µm, 5–10 µm, 10–25 µm, and 25 µm<. To specify the velocity, the volume flow of the device was set to 30 l/min, which is approximately the average breathing volume of humans in calm conditions [
28,
29]. The particle concentration can vary between 1 and 5 × 10
7/m
3 in our laboratory, depending on the weather. According to our validation measurements, in the given range, the particle concentration does not affect the measurement results [
28].
The measurement contained two steps. First, the ambient air’s Particle Number Concentration (PNC) [pcs./m
3] was measured for 1 min. Then, the sample holder with the given mask was connected to the particle counter, and the PNC behind the mask was measured for 1 min. The Particle Filtration Efficiencies (PFEs) for each particle range were calculated from the measured PNC ratios [
28]:
where PNC
C is the particle concentration behind the mask [pcs./m
3] and PNC
A is the particle concentration of the ambient air [pcs./m
3]. The most applied EN 149:2001 standard [
30] provides the filtration efficiencies with aerosols with 0.4 and 0.6 µm MMADs (Median Mass Aerodynamic Diameters). The MMAD analysis of the ambient air in the laboratory showed that in the particle range between 0.3 and 5 µm, the MMAD is between 0.34 and 0.76 µm [
28], which is very close to the requirements of EN 149:2001.
4. Conclusions
In this paper, we realized a conceptual smart sensor node with IoT capabilities embedded into personal protective face masks and evaluated it in urban environments. The novelty comes from the form factor, the multi-parameter measurement approach, and the inside–outside sensor positioning, which simultaneously enables personal monitoring and outside-world evaluation, with possible fusion options. The setup uses standard protective materials and design, with real-time IoT communication capabilities, a working application, prospects of background data processing, and alignment with future trends, according to [
37,
38]. We optimized the form factor (36 × 20 × 4 mm PCB, and almost the same as the battery) to be embedded between two medical masks or into a professional, e.g., 3M Aura 9320D + FFP2 type personal protective mask. The device can communicate with a smartphone app, extending IoT usability. The battery life ensures the device can work for a working week (more than 90 h). It was found that the medical masks have a weak fit on the face, so filtration (essential protective function) fails with the embedding. The FFP2 professional mask could withstand the embedding process, where the filtering efficiency practically remained in a similar range.
We showed that the temperature sensor can follow the outside and inside temperatures; however, absolute temperature measurement is not possible due to exhalation, which heats the sensors. The temperature of the inner and outer sensors has a minimal (~±1 °C) difference. The inner temperature sensor can detect respiration with 10 Hz data acquisition using a simple moving-mean method. While thermal inertia smooths out temperature recordings, pressure measurement is more sensitive to turbulent flows inside the mask or slight stutters in respiration. As a fusion, it is suggested that the inner temperature should be used as the basis for the respiration rate; however, if the average temperature is rapidly changing (moving out of the steady state) by >0.1 °C/min, the inner pressure sensor should be used, which is insensitive in this matter. Also, the outer pressure sensor can be used as an altimeter in an urban environment, highlighting dynamic changes in the surroundings, such as rising/descending between stories, with 10% precision. The humidity of the system is saturated within the range of 10 min. “Outside” humidity values are also unreliable and altered by the filtering nature of the mask, which captures humidity. AQI analysis is not applicable to inspecting the respiration rate; however, after half an hour of settling, the outer sensor can capture the AQI defined by the manufacturer of the sensor. We showed use cases in various urban environments. AQI analysis is suggested if the user is wearing the device for longer (e.g., personal protective equipment during hours of work).
The results promote smart city concepts and help endeavors related to SDGs (Sustainable Development Goals [
39]) 3 and 11, regarding good health and clean, sustainable cities and urban environments. Future development has different potential paths. Work will continue with the backend development from data to improve respiration detection capabilities. Further use cases could help validate various data from the working environment. Also, the involvement of textile masks [
28,
40] and the improvement of the libraries and future sensors (e.g., a 688-type update on the applied units) will enable faster setting to a work point in the AQI measurements, more reliable use, and possible AI enhancements.