An Energy-Autonomous Smart Shirt Employing Wearable Sensors for Users’ Safety and Protection in Hazardous Workplaces

Featured Application: The presented wearable device is thought to monitor the physical and environmental condition of workers operating in particularly dangerous workplaces, reducing the accident risks or mitigating their consequences. Abstract: Wearable devices represent a versatile technology in the IoT paradigm, enabling non-invasive and accurate data collection directly from the human body. This paper describes the development of a smart shirt to monitor working conditions in particularly dangerous workplaces. The wearable device integrates a wide set of sensors to locally acquire the user’s vital signs (e.g., heart rate, blood oxygenation, and temperature) and environmental parameters (e.g., the concentration of dangerous gas species and oxygen level). Electrochemical gas-monitoring modules were designed and integrated into the garment for acquiring the concentrations of CO, O 2 , CH 2 O, and H 2 S. The acquired data are wirelessly sent to a cloud platform (IBM Cloud), where they are displayed, processed, and stored. A mobile application was deployed to gather data from the wearable devices and forward them toward the cloud application, enabling the system to operate in areas where a WiFi hotspot is not available. Additionally, the smart shirt comprises a multisource harvesting section to scavenge energy from light, body heat, and limb movements. Indeed, the wearable device integrates several harvesters (thin-ﬁlm solar panels, thermoelectric generators (TEGs), and piezoelectric transducers), a low-power conditioning section, and a 380 mAh LiPo battery to accumulate the recovered charge. Field tests indicated that the harvesting section could provide up to 216 mW mean power, fully covering the power requirements ( P = 1.86 mW) of the sensing, processing, and communication sections in all considered conditions (3.54 mW in the worst-case scenario). However, the 380 mAh LiPo battery guarantees about a 16-day lifetime in the complete absence of energy contributions from the harvesting section. Cloud Functions service to detect anomalies in the acquired data, in which case, alarm messages are sent to the database of the on-cloud application and a notiﬁcation to the company’s safety manager and the worker. The smart garment also includes signaling devices (e.g., LEDs) and a vibration generator to immediately warn the user when abnormal parameters (e.g., high gas concentrations) are detected. simple of


Introduction
The evolution and diffusion of the Internet of Things (IoT) paradigm and smart devices in recent years have resulted in the development of new healthcare, lifestyle analysis, and environmental protection solutions [1][2][3][4]. Wearable devices with various sensor types for gathering characteristics relevant to various quantifiable domains have drawn the interest of the scientific community and companies [5][6][7][8]. These technologies have been shown to be particularly effective for the continuous monitoring of a user's health as it is impacted by behavioral, physiological, psychological, and, most importantly, environmental parameters [9,10]. In addition to typical wearables that can only measure parameters in dangerous gas species, and air temperature and humidity; in addition, the device acquires the current user's position by using an integrated GPS module.
In relation to the BAN approach, B. Jethwa et al. presented a WSN-based environmental and health monitoring approach for soldiers on the battlefield [30]. It comprises a soldier's unit, integrated into a belt, based on a Raspberry Pi 3 board, which collects data from different sensors and sends the encrypted information to the base station. The system tracks the heartbeat, body temperature, and SpO 2 . The device also integrates gas sensors for detecting combustible gas, smoke, and harmful gases. The data are processed and compared to different threshold values to determine the soldier's health condition, which is then displayed through the graphical user interface (GUI). In addition, A. Binajjaj et al. presented a wearable gas sensor network constituted by Arduino-based sensor nodes equipped with CO and CH 4 gas sensors and temperature and humidity sensors. The device wirelessly transmits the acquired data to coordinator nodes, providing access to the Internet through a coordinator PC [15]. All of the devices described above are powered by batteries; however, the constraints imposed on the weight, flexibility, and comfort of wearable devices limit the dimensions and capacity of the storage device. A smart approach to solve these issues involves integrating energy harvesting systems into wearable devices, limiting the need for recharging the device or replacing batteries. These considerations represent the starting point for the presented work: the combination of wearable devices and energy harvesting systems.

Aims and Contributions of the Presented Research Work
The following scientific work presents the development of a smart garment designed for monitoring biophysical and environmental parameters. The wearable device consists of a sweatshirt equipped with multiple sensors, namely, a photoplethysmography (PPG) sensor to monitor heart rate (HR) and SpO 2 , temperature sensors to acquire body and air temperatures, an integrated accelerometer to detect falls and step count, and custom electrochemical gas sensing modules to measure the concentrations of dangerous gas species (CO, H 2 S, and CH 2 O), as well as the oxygen level (O 2 ). Among the various gas sensor types, electrochemical gas sensors were chosen for the wearable application. The advantages of electrochemical gas sensors include reduced power consumption and size, making them ideal for wearable devices [31][32][33]. Unlike semiconductor gas sensors, electrochemical ones do not need to bring the sensitive material, specifically the semiconductor, to the working temperature (of the order of 100-400 • C) through a resistor, resulting in greater current consumption that would affect the energy performance of the wearable application. Compared to optical sensors, the advantages of electrochemical gas sensors include their lower costs and smaller sizes, simplifying their integration. However, the typical drawbacks of electrochemical sensors are their high sensitivity to external agents such as temperature and humidity, cross-sensitivity (i.e., interference due to the presence of other gases to which the electrodes are sensitive), and rather short life span (around two years on average) [34].
Among the gas species monitored by the wearable device, carbon monoxide constitutes an insidious danger because it is odorless, colorless, and toxic [35]. This gas species is emitted by combustion processes lacking oxygen, as happens in stoves, boilers, and furnaces. Because its usage or emission is connected to various production activities, it can be found in various industrial settings (food, chemical, metallurgical industries, etc.). Additionally, H 2 S is commonly used in diverse industrial activities, from the food preservation industry (e.g., sugar bleaching and conservation of wine and meat) to the purification of thermal waters and oil refining. Long exposure to its fumes can cause extensive damage to various body systems: it can paralyze the olfactory nerve, making it impossible to perceive, and can cause unconsciousness within a few minutes. Exposure to low concentrations in the air can irritate the eyes and throat and, in the long term, cause fatigue, confusion, and memory problems. Furthermore, CH 2 O is a colorless gas with a pungent odor that is highly soluble in water [36]. The International Agency for Research on Cancer (IARC) highlights that this compound is carcinogenic to humans and, in particular, causes cancer of the nasopharynx (nasopharynx) and leukemia. Exposure to formaldehyde has also been positively associated with sinus cancer. Exhaust gases from vehicles, power plants, incinerators, and stoves, as well as cigarette smoke, are the main sources of exposure for the general population. In the workplace, on the other hand, all those who work in industries involving adhesive or insulating plastic products or where there is extensive use of paints for woodworking, as well as in the food industry, are exposed to much higher and potentially more dangerous concentrations. Finally, O 2 monitoring can be extremely useful for people, such as miners, who operate in enclosed spaces, where the air may become unbreathable due to poor air exchange. Additionally, a device using an O 2 sensor could be useful for users who, either for recreation or work, operate at high altitudes where the air is so thin that it could cause discomfort or fainting. Table 1 summarizes the main limits of the aforementioned gas species according to international or European regulations. The collected data are acquired and processed by a suitably designed electronic board based on the SAMD21G18A microcontroller. This section also includes a Bluetooth Low Energy (BLE) module for forwarding the acquired data to a cloud platform using a mobile IoT gateway installed on the user's smartphone. The device is meant to monitor the physical and environmental conditions of workers who operate in particularly harsh workplaces (food, chemical, steel industries, etc.), reducing the risks of accidents or mitigating their consequences. The developed wearable device represents the source nodes of a monitoring system based on a cloud platform (IBM Cloud), which displays, processes, and stores the gathered data. The developed system enables remote monitoring of workers' parameters and sends alarm notifications to users and companies' security managers if abnormal parameters are detected. Furthermore, a mobile application was developed to gather data from wearable devices and forward the acquired data to the cloud platform through Message Queue Telemetry Transmission (MQTT), acting as a mobile IoT gateway.
In addition, the developed device integrates a multisource energy harvesting section to scavenge energy from sources associated with the human body. Specifically, the smart garment deploys thin-film photovoltaic panels, thermoelectric generators (TEGs), and flexible piezoelectric transducers, allowing the harvesting of light energy, body heat, and mechanical energy related to joint movements. The extracted energy is accumulated in a 380 mAh lithium polymer (LiPo) battery to feed the integrated sensing section. Field tests demonstrated that the harvesting section could guarantee the energy autonomy of the developed wearable device in real operating conditions.
The main contributions of the presented scientific work are: • Development of a low-power and versatile wearable solution for monitoring the operating conditions of workers who operate in particularly harsh environments. The aim is to create a monitoring system fully based on the edge computing paradigm, allowing remote control of working conditions to detect the lack of a healthy state in the workplace and accidents suffered by workers. • An efficient and conformable multisource energy harvesting section integrated into the garment, tailored to scavenge energy even in conditions with low illuminance and a small difference in temperature between the skin and environment. • Low-power conditioning sections for electrochemical gas sensors, integrated into the garment to detect the environmental concentrations of dangerous gas species. • A custom gateway mobile application to gather data from the wearable device and forward them to a cloud application, where they are displayed, stored, and processed to detect dangerous situations for workers.
The remainder of the paper is arranged as follows: In the next subsection, the architecture of the developed smart garment is introduced, along with the description of harvesters, sensors, and electronic modules. Afterwards, the design of electrochemical gas sensor modules integrated into the garment is introduced for detecting the air concentrations of CO, H 2 S, CH 2 O, and O 2 . Then, the mobile application that forwards the acquired information to the IBM Cloud platform is presented, as well as the communication tests between the sensor node and the cloud platform. Afterwards, the results of field tests on the multisource energy harvesting section are reported in different operating conditions. Finally, the results of the characterizations and tests carried out on the sensors integrated into the wearable device are presented.

Materials and Methods
In this section, the architecture of the smart garment is described, discussing the structure of both sensing and energy harvesting sections. Then, the integration of sensors and electronic modules into the garment is presented, focusing on the physical connections with the SAMD21-based microcontroller board.

Architecture of the Developed Smart Garment
The proposed wearable device is a garment integrating multiple sensors for detecting the user's vital signs and environmental measurements, which might reveal harmful conditions for workers' health. For human safety, the wearable device is designed to monitor the condition of workers operating in particularly difficult environments, providing extensive and real-time data.
In particular, the device is equipped with several gas sensors for detecting the presence and concentrations of dangerous gaseous species. Indeed, the device is equipped with a low-power electrochemical carbon monoxide (CO) sensor (model ME2-CO, manufactured by Winsen Inc., Singapore, Singapore) to detect the local CO concentration caused by gas leakages and abnormal combustion emissions ( Figure 1). The smart garment includes a hydrogen sulfide (H 2 S) sensor (model ME3-H2S, manufactured by Winsen Inc., Zhengzhou, China) for the accurate and timely detection of H 2 S concentration in dangerous workplaces (i.e., tanks for food transport or in cramped environments), thus avoiding accidents that are sometimes deadly [37]. Additionally, the smart jacket comprises an electrochemical formaldehyde (CH 2 O, model ME2-CH2O, manufactured by Winsen Inc., Zhengzhou, China) sensor to detect the local concentration of this gas species. Furthermore, the smart garment has an oxygen sensor (O 2 , model ME2-O2, produced by Winsen Inc., Zhengzhou, China) that measures oxygen concentration in the air to determine its quality [38]. Two conditioning boards were developed for the electrochemical gas sensors, as described in Section 3.1. The first is a multisensor conditioning board for two-terminal electrochemical sensors (ME2-CO, ME2-CH 2 O, and ME2-O2); the latter is a conditioning module for the three-terminal H 2 S sensor (ME3-H2S). tration in the air to determine its quality [38]. Two conditioning boards were devel for the electrochemical gas sensors, as described in Section 3.1. The first is a multis conditioning board for two-terminal electrochemical sensors (ME2-CO, ME2-CH2O ME2-O2); the latter is a conditioning module for the three-terminal H2S s (ME3-H2S). In addition, the smart garment is equipped with multiple sensors to monito worker's vital signs: a PPG sensor (model MAX30102, produced by Maxim Integr San Jose, CA, USA), located at the jacket wrist for monitoring HR, SpO2, and body perature; a MEMS accelerometer (model MMA8452Q, produced by NXP Semicondu Eindhoven, The Netherlands), located at the garment's waist for tracking the phy activity level (PAL) and step count and detecting falls [39,40]; a temperature s (model LM75A, produced by NXP Semiconductor) for assessing the air temperature The sensors were chosen based on their power consumption, measurement ac cy, resilience, and cost, considering the application. A custom microcontroller b based on SAMD21 Cortex M0+ (manufactured by Microchip Inc., Chandler, AZ, was developed to acquire and process the data from the sensors, coordinate the t missions with the gateway, and optimize the device power consumption (Figure 2) board includes a BLE transceiver (model JDY-23, manufactured by Jindou Yun nology Inc., Vancouver, BC, Canada) to send the acquired environmental and biop cal data to a smartphone, which acts as an IoT gateway to the Internet network. In addition, the smart garment is equipped with multiple sensors to monitor the worker's vital signs: a PPG sensor (model MAX30102, produced by Maxim Integrated, San Jose, CA, USA), located at the jacket wrist for monitoring HR, SpO 2 , and body temperature; a MEMS accelerometer (model MMA8452Q, produced by NXP Semiconductor, Eindhoven, The Netherlands), located at the garment's waist for tracking the physical activity level (PAL) and step count and detecting falls [39,40]; a temperature sensor (model LM75A, produced by NXP Semiconductor) for assessing the air temperature [41].
The sensors were chosen based on their power consumption, measurement accuracy, resilience, and cost, considering the application. A custom microcontroller board based on SAMD21 Cortex M0+ (manufactured by Microchip Inc., Chandler, AZ, USA) was developed to acquire and process the data from the sensors, coordinate the transmissions with the gateway, and optimize the device power consumption ( Figure 2). The board includes a BLE transceiver (model JDY-23, manufactured by Jindou Yun Technology Inc., Vancouver, BC, Canada) to send the acquired environmental and biophysical data to a smartphone, which acts as an IoT gateway to the Internet network.
Moreover, a custom mobile application installed on the user's smartphone enables the smart garment to connect to the Internet even when a WiFi hotspot is not accessible, such as in remote outdoor locations. The collected data are forwarded to the IBM Watson IoT cloud platform in the form of JavaScript Object Notification (JSON) through Message Queue Telemetry Transmission (MQTT), enabling remote data collection, processing, and storage. Indeed, the platform provides an easily expandable architecture that allows the simple addition of additional services, such as the IBM Cloudant service, a database management system optimized for managing a large number of mobile devices ( Figure 1). The database is used for storing data from smart devices, along with the worker's actual GPS coordinates provided by their smartphones. Furthermore, the acquired data are analyzed by the IBM the simple addition of additional services, such as the IBM Clouda management system optimized for managing a large number of m 1). The database is used for storing data from smart devices, alo actual GPS coordinates provided by their smartphones. Furtherm are analyzed by the IBM Cloud Functions service to detect anom data, in which case, alarm messages are sent to the database of the and a notification to the company's safety manager and the worke also includes signaling devices (e.g., LEDs) and a vibration gene warn the user when abnormal parameters (e.g., high gas concentra Furthermore, the smart garment is energetically autonomous t multisource energy harvesting system, enabling the scavenging o associated with the human body [42,43]. Two thin-film flexible pho 0.125W 5V-45*25, manufactured by Dongguan New Energy Techn Guangdong, China) are positioned on the user's back to convert i (solar or artificial) into electrical energy (Figure 3b). These photov acterized by 1 W maximum power, 1.5 V operating voltage, 1200 rent, 2 V open-circuit voltage, and 197 mm × 97 mm × 0.8 mm dim conditioning section based on the LTC3108 IC (produced by Linear CA, USA) is employed to scavenge energy from the two photovolta series (Figure 3b). Through a 1:90 external step-up converter, th configured as a flyback converter that allows a minimum input vol of three TEGs (model TEC1-12706, manufactured by Thermonamic placed on each forearm to scavenge the thermal energy produced b a larger thermal gradient (Figure 4b) [44]; elastic bands maintain TEGs' hot joints and the skin. The used TEG model has 40 mm × 40 Furthermore, the smart garment is energetically autonomous thanks to an integrated multisource energy harvesting system, enabling the scavenging of energy from sources associated with the human body [42,43]. Two thin-film flexible photovoltaic cells (model 0.125 W 5 V-45 * 25, manufactured by Dongguan New Energy Technology Co., Dongguan, Guangdong, China) are positioned on the user's back to convert incoming light energy (solar or artificial) into electrical energy (Figure 3b). These photovoltaic panels are characterized by 1 W maximum power, 1.5 V operating voltage, 1200 mA short-circuit current, 2 V open-circuit voltage, and 197 mm × 97 mm × 0.8 mm dimensions (Figure 4a). A conditioning section based on the LTC3108 IC (produced by Linear Technology, Milpitas, CA, USA) is employed to scavenge energy from the two photovoltaic panels connected in series (Figure 3b). Through a 1:90 external step-up converter, the LTC3108 IC can be configured as a flyback converter that allows a minimum input voltage of 22 mV. A series of three TEGs (model TEC1-12706, manufactured by Thermonamic inc., Jiangxi, China) is placed on each forearm to scavenge the thermal energy produced by the body to achieve a larger thermal gradient (Figure 4b) [44]; elastic bands maintain contact between the TEGs' hot joints and the skin. The used TEG model has 40 mm × 40 mm dimensions, 127 p-n junctions, and a weight of 15 g.  Similarly, two LTC3108-based modules are installed on the garment's sleeves to scavenge energy from the two series of TEGs; all LTC3108 stages are configured to 3.3V output voltage. Additionally, two flexible piezoelectric harvesters are placed in correspondence to the user's elbows to convert the kinetic energy associated with the limb movements. The piezoelectric harvesters consist of 3D-printed flexible supports with a corrugated profile (160 mm × 20 mm × 7 mm-at the peak of corrugation), realized using TPU filament (with hardness 80 Shore A), on which is deposited a stack of two PVDF layers (model 3-1004346-0, manufactured by TE Connectivity Measurement Specialities Inc., Schaffhausen, Switzerland) connected in series by means of epoxy glue (Figure 4c,d). The resulting device is highly flexible (also due to its corrugated profile), resilient, and lightweight (10 g), making it unobtrusive to the user's movements. Lastly, a nylon cover was applied to the transducer to protect the surface of the polyvinylidene fluoride (PVDF) layers. For convenience, the two harvesters are fixed to joints by elbow pads for improving the mechanical coupling with the body. Two LTC3588-based modules (manufactured by Linear Technologies Co., Milpitas, CA, United States) are used to scavenge energy from the two piezoelectric harvesters. The LTC3588-1 integrates a low-loss rectifying bridge and a configurable DC output voltage set to 3.3 V for the two piezoelectric harvesting stages, making it well-suited to collect energy from alternate sources ( Figure  3a).   Similarly, two LTC3108-based modules are installed on the garment's sleeves to scavenge energy from the two series of TEGs; all LTC3108 stages are configured to 3.3V output voltage. Additionally, two flexible piezoelectric harvesters are placed in correspondence to the user's elbows to convert the kinetic energy associated with the limb movements. The piezoelectric harvesters consist of 3D-printed flexible supports with a corrugated profile (160 mm × 20 mm × 7 mm-at the peak of corrugation), realized using TPU filament (with hardness 80 Shore A), on which is deposited a stack of two PVDF layers (model 3-1004346-0, manufactured by TE Connectivity Measurement Specialities Inc., Schaffhausen, Switzerland) connected in series by means of epoxy glue (Figure 4c,d). The resulting device is highly flexible (also due to its corrugated profile), resilient, and lightweight (10 g), making it unobtrusive to the user's movements. Lastly, a nylon cover was applied to the transducer to protect the surface of the polyvinylidene fluoride (PVDF) layers. For convenience, the two harvesters are fixed to joints by elbow pads for improving the mechanical coupling with the body. Two LTC3588-based modules (manufactured by Linear Technologies Co., Milpitas, CA, United States) are used to scavenge energy from the two piezoelectric harvesters. The LTC3588-1 integrates a low-loss rectifying bridge and a configurable DC output voltage set to 3.3 V for the two piezoelectric harvesting stages, making it well-suited to collect energy from alternate sources ( Figure  3a).  To avoid reverse currents, Shottky diodes (type BAT86s, made by Vishay Co., Malvern, PA, USA) are used to aggregate the energy contributions delivered by each conditioning section (Figure 3b). They are featured by very low forward voltage (<300 mV), improving the efficiency of the harvesting system. Lastly, the voltage of the aggregated power is increased to 4.2 V using a low-power BQ25570 step-up converter (produced by Texas Instruments, Dallas, TX, USA), enabling charge accumulation in a 380 mAh LiPo Similarly, two LTC3108-based modules are installed on the garment's sleeves to scavenge energy from the two series of TEGs; all LTC3108 stages are configured to 3.3 V output voltage. Additionally, two flexible piezoelectric harvesters are placed in correspondence to the user's elbows to convert the kinetic energy associated with the limb movements. The piezoelectric harvesters consist of 3D-printed flexible supports with a corrugated profile (160 mm × 20 mm × 7 mm-at the peak of corrugation), realized using TPU filament (with hardness 80 Shore A), on which is deposited a stack of two PVDF layers (model 3-1004346-0, manufactured by TE Connectivity Measurement Specialities Inc., Schaffhausen, Switzerland) connected in series by means of epoxy glue (Figure 4c,d). The resulting device is highly flexible (also due to its corrugated profile), resilient, and lightweight (10 g), making it unobtrusive to the user's movements. Lastly, a nylon cover was applied to the transducer to protect the surface of the polyvinylidene fluoride (PVDF) layers. For convenience, the two harvesters are fixed to joints by elbow pads for improving the mechanical coupling with the body. Two LTC3588-based modules (manufactured by Linear Technologies Co., Milpitas, CA, USA) are used to scavenge energy from the two piezoelectric harvesters. The LTC3588-1 integrates a low-loss rectifying bridge and a configurable DC output voltage set to 3.3 V for the two piezoelectric harvesting stages, making it well-suited to collect energy from alternate sources ( Figure 3a).
To avoid reverse currents, Shottky diodes (type BAT86s, made by Vishay Co., Malvern, PA, USA) are used to aggregate the energy contributions delivered by each conditioning section ( Figure 3b). They are featured by very low forward voltage (<300 mV), improving the efficiency of the harvesting system. Lastly, the voltage of the aggregated power is increased to 4.2 V using a low-power BQ25570 step-up converter (produced by Texas Instruments, Dallas, TX, USA), enabling charge accumulation in a 380 mAh LiPo battery. It has a very low quiescent current (300 nA), a wide input range (from 0.1 to 5.5 V), and high efficiency (up to 93%); additionally, the converter has a user-programmable overvoltage threshold and an internally set undervoltage discharge threshold to prevent shortening of the battery lifetime [45]. Nevertheless, no matching section was included in the harvesting architecture since relatively good impedance matching was already obtained for both photovoltaic and thermal subsystems. Indeed, the LTC3108 board shows an 11 Ω input resistance for a 1:90 transformer, which fits well with the TEG impedance (i.e., for the series of three TEC1-12706 TEGs equal to 12.6 Ω at ∆T = 5 • C operating point). However, for future development, the design of an impedance matching network for harvesting sections has to be performed to optimize the charge extraction.

Integration of the Sensing and Processing Sections into the Smart Garment
The three used digital sensors (i.e., MAX30102, LM75A, and MMA8452Q) communicate via an I 2 C digital communication interface, which takes place on two lines: serial data (SDA) and serial clock (SCL). For the MMA8452Q accelerometer, a further connection line was added, which is the line for the interrupt signal set to detect freefall conditions. Furthermore, the electrochemical gas sensor modules were placed on the garment shoulders, making these the only sensors to protrude from the sweatshirt surface; the two developed modules provide four analog outputs, which are connected to analog inputs of the acquisition and conditioning board. Therefore, five connection lines were realized for the power supply and the three analog outputs of the conditioning module, including the two-terminal electrochemical gas sensors (i.e., ME2-CO, ME2-CH2O, and ME2-O2). Similarly, three connection lines were integrated for the power supply and the output signal of the conditioning module, integrating the ME3-H2S electrochemical sensor.
The connections between the microcontroller board and sensors were directly sewn into the garment's fabric. Highly flexible and small-diameter stainless steel thread was used to sew the connections between the sensors and the microcontroller directly onto the fleece, as shown in Figure 5. In particular, the conductive thread is made of SUS316L steel, characterized by low resistance (i.e., 40 Ω/m), good electrical conductivity, and extreme resistance to heat (up to 1300 • C) and corrosion, and it also provides an electromagnetic shield (model Electro-Fashion, manufactured by Kitronik Co., Nottingham, UK). Their characteristics and elongation capability make it ideal for developing wearable devices, preventing any impediments to user movements; indeed, it is featured by elongation at break of 37% [46] (Figure 5a, inset). Appl. Sci. 2022, 12, x FOR PEER REVIEW 10 of 31 treme resistance to heat (up to 1300 °C) and corrosion, and it also provides an electromagnetic shield (model Electro-Fashion, manufactured by Kitronik Co., Nottingham, UK). Their characteristics and elongation capability make it ideal for developing wearable devices, preventing any impediments to user movements; indeed, it is featured by elongation at break of 37% [46] (Figure 5a, inset).
(a) (b) Figure 5. Images of the garment interior: electrical connections sewn to the fabric using stainless steel thread (a) and the distribution of sensors and electronic modules (b).
Later, the electronic connections were insulated using a flexible silicone-based glue. Furthermore, as shown in Figure 6a, the connections were terminated on nickel-plated copper pressure clips. In this way, the board can be easily removed from the garment by releasing the clips and removing the sensors to allow safe washing. The developed garment is powered by a 380 mAh LiPo battery (model 702035, manufactured by Guangzhou Serui Battery Technology Co., Ltd., Guangzhou, China) characterized by 3.7 V nominal voltage, reaching 4.2V in the fully charged condition. The sensors integrated into the developed smart garment are powered by a voltage of 3.3 V supplied by a voltage regulator (model XC6206332M, manufactured by Torex Semiconductor Ltd., Tokyo, Japan) integrated on the microcontroller board. Lastly, a plastic cover was fabricated by 3D printing to protect the MCU board ( Figure 6b). Later, the electronic connections were insulated using a flexible silicone-based glue. Furthermore, as shown in Figure 6a, the connections were terminated on nickel-plated copper pressure clips. In this way, the board can be easily removed from the garment by releasing the clips and removing the sensors to allow safe washing. The developed garment is powered by a 380 mAh LiPo battery (model 702035, manufactured by Guangzhou Serui Battery Technology Co., Ltd., Guangzhou, China) characterized by 3.7 V nominal voltage, reaching 4.2 V in the fully charged condition. The sensors integrated into the developed smart garment are powered by a voltage of 3.3 V supplied by a voltage regulator (model XC6206332M, manufactured by Torex Semiconductor Ltd., Tokyo, Japan) integrated on the microcontroller board. Lastly, a plastic cover was fabricated by 3D printing to protect the MCU board ( Figure 6b). Appl. Sci. 2022, 12, x FOR PEER REVIEW 10 of 31 treme resistance to heat (up to 1300 °C) and corrosion, and it also provides an electromagnetic shield (model Electro-Fashion, manufactured by Kitronik Co., Nottingham, UK). Their characteristics and elongation capability make it ideal for developing wearable devices, preventing any impediments to user movements; indeed, it is featured by elongation at break of 37% [46] (Figure 5a, inset).
(a) (b) Figure 5. Images of the garment interior: electrical connections sewn to the fabric using stainless steel thread (a) and the distribution of sensors and electronic modules (b).
Later, the electronic connections were insulated using a flexible silicone-based glue. Furthermore, as shown in Figure 6a, the connections were terminated on nickel-plated copper pressure clips. In this way, the board can be easily removed from the garment by releasing the clips and removing the sensors to allow safe washing. The developed garment is powered by a 380 mAh LiPo battery (model 702035, manufactured by Guangzhou Serui Battery Technology Co., Ltd., Guangzhou, China) characterized by 3.7 V nominal voltage, reaching 4.2V in the fully charged condition. The sensors integrated into the developed smart garment are powered by a voltage of 3.3 V supplied by a voltage regulator (model XC6206332M, manufactured by Torex Semiconductor Ltd., Tokyo, Japan) integrated on the microcontroller board. Lastly, a plastic cover was fabricated by 3D printing to protect the MCU board ( Figure 6b). The MAX30102 PPG sensor for HR and SpO 2 monitoring was fixed on the garment's right cuff, fixed by an elastic band to improve adhesion to the user's wrist, thus reducing measurement errors ( Figure 7a). Specifically, a commercial MAX30102 breakout board was employed, which was suitably modified by removing the unnecessary 3.3 V DC/DC converter to reduce power consumption [47]. Additionally, the gas sensing modules were positioned on the garment's shoulders and connected to analog inputs of the MCU board; in particular, the H 2 S sensing module was installed on the right shoulder (Figure 7b), and the multisensor module was placed on the left shoulder (Figure 7c). Both modules were positioned inside pockets, so only the gas sensors are located outside the garment. The MAX30102 PPG sensor for HR and SpO2 monitoring was fixed on the garment's right cuff, fixed by an elastic band to improve adhesion to the user's wrist, thus reducing measurement errors (Figure 7a). Specifically, a commercial MAX30102 breakout board was employed, which was suitably modified by removing the unnecessary 3.3V DC/DC converter to reduce power consumption [47]. Additionally, the gas sensing modules were positioned on the garment's shoulders and connected to analog inputs of the MCU board; in particular, the H2S sensing module was installed on the right shoulder ( Figure  7b), and the multisensor module was placed on the left shoulder (Figure 7c). Both modules were positioned inside pockets, so only the gas sensors are located outside the garment. Similarly, the environmental temperature sensor (LM75A) was also positioned on the left cuff, as shown in Figure 8a. It was sewn onto the garment sleeve using non-conductive thread and is in direct contact with the external environment to detect the air temperature; a commercial LM75A breakout board was integrated into the garment [48]. The MMA8452Q accelerometer was embedded into a large elastic band sewn at the waist of the jacket and thus solidly fixed to the monitored body for reducing errors in step counting or fall detection (Figure 8b). Similarly, a commercial MMA8452Q breakout board was integrated into the garment, allowing the simpler use of the IC. To reduce the power consumption of the module, unnecessary components (i.e., the 3.3V DC/DC regulator and MOS level shifter) were removed from the board [49]. Similarly, the environmental temperature sensor (LM75A) was also positioned on the left cuff, as shown in Figure 8a. It was sewn onto the garment sleeve using non-conductive thread and is in direct contact with the external environment to detect the air temperature; a commercial LM75A breakout board was integrated into the garment [48]. The MMA8452Q accelerometer was embedded into a large elastic band sewn at the waist of the jacket and thus solidly fixed to the monitored body for reducing errors in step counting or fall detection (Figure 8b). Similarly, a commercial MMA8452Q breakout board was integrated into the garment, allowing the simpler use of the IC. To reduce the power consumption of the module, unnecessary components (i.e., the 3.3 V DC/DC regulator and MOS level shifter) were removed from the board [49]. The MAX30102 PPG sensor for HR and SpO2 monitoring was fixed on the garment's right cuff, fixed by an elastic band to improve adhesion to the user's wrist, thus reducing measurement errors (Figure 7a). Specifically, a commercial MAX30102 breakout board was employed, which was suitably modified by removing the unnecessary 3.3V DC/DC converter to reduce power consumption [47]. Additionally, the gas sensing modules were positioned on the garment's shoulders and connected to analog inputs of the MCU board; in particular, the H2S sensing module was installed on the right shoulder ( Figure  7b), and the multisensor module was placed on the left shoulder (Figure 7c). Both modules were positioned inside pockets, so only the gas sensors are located outside the garment. Similarly, the environmental temperature sensor (LM75A) was also positioned on the left cuff, as shown in Figure 8a. It was sewn onto the garment sleeve using non-conductive thread and is in direct contact with the external environment to detect the air temperature; a commercial LM75A breakout board was integrated into the garment [48]. The MMA8452Q accelerometer was embedded into a large elastic band sewn at the waist of the jacket and thus solidly fixed to the monitored body for reducing errors in step counting or fall detection (Figure 8b). Similarly, a commercial MMA8452Q breakout board was integrated into the garment, allowing the simpler use of the IC. To reduce the power consumption of the module, unnecessary components (i.e., the 3.3V DC/DC regulator and MOS level shifter) were removed from the board [49].

Operating Modalities to Characterize the Energy Harvesting Section
Several field tests were carried out to assess the effectiveness of the multisource harvesting system integrated into the smart garment when it was worn by a user and in various operational conditions, described in Table 2. Specifically, for testing the harvesting function, five different operational conditions were considered, characterized by different illuminance values and source typologies, thermal gradients between the skin and air, and performed activities. In scenarios 1-2, the user was exposed to direct sunlight, and in scenario 3, he was in indirect sunlight. In contrast, in scenarios 4-5, the user was in an indoor environment under an artificial light source (neon light). The reported illuminances and thermal gradients were calculated as mean values over an observation interval of 30 min. Furthermore, in scenario 1, the user was steady, whereas, in scenarios 2-4, he walked at a mean speed of 5 km/h. In scenario 5, the user performed pushups with a repetition frequency of 0.5 Hz. To measure the power delivered to the load, an electronic load (model Tenma 72-13210, produced by Tenma ® , Leeds, England) was attached to the output of the multisource harvesting system in constant resistance mode (100 kΩ).

Results
This section presents the design of conditioning sections for the electrochemical gas sensors integrated into the wearable device. Then, the operating modalities of the developed smart garment are reported, including firmware solutions for reducing the system's power consumption.

Design of the Conditioning Sections for Electrochemical Gas Sensors
This section describes the low-power modules integrated into the smart garment for conditioning the current signal generated by the electrochemical gas sensors described above.
In particular, a multisensor board for detecting the environmental concentrations of CO, CH 2 O, and O 2 was developed using two-electrode electrochemical sensors (ME2-CO, ME2-CH2O, and ME2-O2). The electrochemical sensors of carbon monoxide (CO) and formaldehyde (CH 2 O), when in contact with the aforementioned gaseous species, produce oxidation reactions; therefore, electron transfer occurs from the gas to the working electrode (WE), causing a complementary reaction on the counter electrode (CE). Therefore, the sensor generates a current that flows from CE to WE in proportion to the concentration of the gaseous species. For the electrochemical oxygen sensor (O 2 ), a reduction-type reaction on the WE occurs, with consequent electron accumulation on the counter electrode, thus generating an output current from the WE. Furthermore, the used electrochemical sensors require an aging time of 24/48 h when they are calibrated or after long storage periods but ensure a response time of less than 30 s during the measurement phase.
For the CO and CH 2 O sensors, potentiostatic stages for two-electrode sensors are employed. In this circuit configuration, a voltage buffer fixes the d.d.p. between the CE and WE (Figure 9). In addition, a load resistor R L between WE and CE is needed, which constitutes an RC smoothing filter with an intrinsic sensor capacitance for reducing the output noise. In addition, the value of load resistance affects the response time of the sensing module in the presence of gas. The manufacturer suggests load resistances between 120 Ω and 300 Ω for both sensors [35,36].
constitutes an RC smoothing filter with an intrinsic sensor capacitance for reducing the output noise. In addition, the value of load resistance affects the response time of the sensing module in the presence of gas. The manufacturer suggests load resistances between 120 Ω and 300 Ω for both sensors [35,36]. Additionally, a transimpedance stage converts the current supplied by the sensor into an output voltage proportional to the concentration of the gaseous species. The reference voltage is generated by a voltage divider that allows obtaining a voltage of 300 mV from a supply voltage of +3.3V.
The gains of the transimpedance stages were sized according to the STEL limits for the corresponding gas species (Table 1). In particular, a CO concentration limit of 100 ppm was considered for sizing the gain of the transimpedance stage, taking into account that the ME2-CO sensor is characterized by a sensitivity value equal to 0.023 ± 0.008 µA/ppm. To obtain a full-scale voltage equal to +3.3 V, the resistance on the feedback loop can be calculated as: Furthermore, the gain of the transimpedance stage was dimensioned, taking into account a CH2O concentration limit of 0.4 ppm (STEL limit, Table 1) and sensor sensitivity of 0.45 ± 0.15 µA/ppm, thus resulting in a sensor current of 0.18 µA (Isense).
Since electrochemical oxygen sensors base their operation on a reduction reaction, they will provide a negative output voltage at the output to a potentiostatic circuit if connected as previously described. Thus, to obtain a positive output voltage, it is necessary to invert the positions of CE and WE. A galvanometric circuit was chosen to perform the conditioning of the signal supplied by the ME3-O2 sensor; the sensor current is dropped across a load resistor, and the consequent voltage is amplified with a non-inverting stage. Figure 10 shows the conditioning scheme designed for the ME2-O2 Additionally, a transimpedance stage converts the current supplied by the sensor into an output voltage proportional to the concentration of the gaseous species. The reference voltage is generated by a voltage divider that allows obtaining a voltage of 300 mV from a supply voltage of +3.3 V.
The gains of the transimpedance stages were sized according to the STEL limits for the corresponding gas species (Table 1). In particular, a CO concentration limit of 100 ppm was considered for sizing the gain of the transimpedance stage, taking into account that the ME2-CO sensor is characterized by a sensitivity value equal to 0.023 ± 0.008 µA/ppm. To obtain a full-scale voltage equal to +3.3 V, the resistance on the feedback loop can be calculated as: Furthermore, the gain of the transimpedance stage was dimensioned, taking into account a CH 2 O concentration limit of 0.4 ppm (STEL limit, Table 1) and sensor sensitivity of 0.45 ± 0.15 µA/ppm, thus resulting in a sensor current of 0.18 µA (I sense ).
Since electrochemical oxygen sensors base their operation on a reduction reaction, they will provide a negative output voltage at the output to a potentiostatic circuit if connected as previously described. Thus, to obtain a positive output voltage, it is necessary to invert the positions of CE and WE. A galvanometric circuit was chosen to perform the conditioning of the signal supplied by the ME3-O2 sensor; the sensor current is dropped across a load resistor, and the consequent voltage is amplified with a non-inverting stage. Figure 10 shows the conditioning scheme designed for the ME2-O2 sensor to guarantee a positive output voltage. As illustrated in the schematic in Figure 10, the ME2-O2 electrodes are connected to a 100 Ω load resistance (R1); the voltage generated by the sensor current is applied to the non-inverting input of the operational U1, configured as a non-inverting amplifier, characterized by a gain equal to 1+ R3 R2 . The operational amplifier is powered by the supply terminals to +3.3 V, filtered through capacitor C2 located towards the ground. The gain of the conditioning circuit was calculated taking into account the sensor's sensitivity (0.3 mA/Vol) and the maximum detectable oxygen concentration (23% Vol), at which the current supplied in the sensor output (Isense) is equal to 70 µA (0.3 mA/Vol × 0.23 Vol). This current generates a d.d.p. equal to 7 mV on the load resistance (R1). To obtain a maximum voltage of +3.3 V at the output, the gain of the non-inverting stage must be equal to: Figure 11a presents the circuit scheme of the conditioning board for the ME2 family sensors, which detects the environmental concentrations of CO, CH2O, and O2. Furthermore, on the two potentiostatic stages used for the ME2-CO (green box) and ME2-CH2O (blue box) sensors, a capacitor was added in parallel to each feedback chain of the transimpedance stage (red box in Figure 11a), which determines the circuit's time constant. Furthermore, RC filters were placed in series with the outputs of the transimpedance stages to remove the noise generated by the potentiostatic stage in the output signals. Additionally, a galvanometric circuit based on the SGM8042 opamp was used for the ME2-O2 sensor. The galvanometric section gain was determined considering a 100 Ω sensor load resistance and 23% Vol maximum detectable concentration, at which the output of the non-inverting amplifier must be equal to 3.3V. From (3), the gain of the As illustrated in the schematic in Figure 10, the ME2-O2 electrodes are connected to a 100 Ω load resistance (R1); the voltage generated by the sensor current is applied to the non-inverting input of the operational U1, configured as a non-inverting amplifier, characterized by a gain equal to 1 + R3 R2 . The operational amplifier is powered by the supply terminals to +3.3 V, filtered through capacitor C2 located towards the ground. The gain of the conditioning circuit was calculated taking into account the sensor's sensitivity (0.3 mA/Vol) and the maximum detectable oxygen concentration (23% Vol), at which the current supplied in the sensor output (I sense ) is equal to 70 µA (0.3 mA/Vol × 0.23 Vol). This current generates a d.d.p. equal to 7 mV on the load resistance (R1). To obtain a maximum voltage of +3.3 V at the output, the gain of the non-inverting stage must be equal to: Figure 11a presents the circuit scheme of the conditioning board for the ME2 family sensors, which detects the environmental concentrations of CO, CH 2 O, and O 2 . Furthermore, on the two potentiostatic stages used for the ME2-CO (green box) and ME2-CH2O (blue box) sensors, a capacitor was added in parallel to each feedback chain of the transimpedance stage (red box in Figure 11a), which determines the circuit's time constant. Furthermore, RC filters were placed in series with the outputs of the transimpedance stages to remove the noise generated by the potentiostatic stage in the output signals. Additionally, a galvanometric circuit based on the SGM8042 opamp was used for the ME2-O2 sensor. The galvanometric section gain was determined considering a 100 Ω sensor load resistance and 23% Vol maximum detectable concentration, at which the output of the non-inverting amplifier must be equal to 3.3 V. From (3), the gain of the non-inverting amplifier is equal to 471; therefore, the two resistances R8 and R10 were set at 100 Ω and 47 kΩ, respectively. The resulting board has dimensions equal to 43 mm × 54 mm (Figure 11b). A conditioning board for the ME3-H2S sensor was designed for detecting the H 2 S concentration. Appl   Specifically, the circuit solution used for conditioning the current signal provided by the H 2 S sensor is depicted in Figure 12, which is essentially a potentiostatic circuit for three-electrode sensors. The conditioning circuit comprises a transimpedance stage (based on Ut opamp), which converts the current signal into a voltage signal, and a further operational amplifier (Up) in a potentiostatic configuration to fix the d.d.p. between the RE and WE.
Through negative feedback, the opamp Up guarantees that the d.d.p. (V WE -V RE ) remains constant (as |V CE | = −|V WE |) so that no current flows through the RE; in practice, when the d.d.p. between CE and WE varies according to gas concentration changes, the opamp Up balances these variations according to: The gain of the transimpedance stage was sized to meet the concentration limit dictated by the European Union. In particular, the H2S concentration in the workplace should not exceed 10 ppm (STEL limit, Table 1). Considering the sensor's sensitivity (0.8 µA/ppm), the output current from the sensor (Isense) will be equal to 8 µA. Equations (5) and (6) allow sizing capacitance C7 and the feedback resistance (R3) of the transimpedance stage based on the opamp Ut ( Figure 12). The VoMax and VoMin voltages indicate the dynamics of the Ut output voltage; IMax represents the maximum current delivered by the sensor during gas detections, and fp is the pole frequency due to capacitor C7 and the resistor placed in the feedback loop (R3).  Figure 13a shows the circuit diagram, created with Eagle CAD software, of the conditioning section for the electrochemical sensor ME3-H2S. The resistor series placed in the feedback loop was calculated from Equation (6) and is equal to 400 kΩ. Finally, a 50 kΩ (R10) SMD potentiometer was added in series to the feedback loop, which includes the resistors R5-R6, allowing fine-tuning of the transimpedance stage gain to increase the resolution of the measurement of the gas concentration.
The layout of ME3-H2S sensor is depicted in Figure 13b, in which the connections and components are placed in the top layer, whereas the sensor lies on the bottom layer. By adopting this solution and optimizing the positioning of the components, the board dimensions were significantly reduced (i.e., 29 mm × 33 mm). The gain of the transimpedance stage was sized to meet the concentration limit dictated by the European Union. In particular, the H 2 S concentration in the workplace should not exceed 10 ppm (STEL limit, Table 1). Considering the sensor's sensitivity (0.8 µA/ppm), the output current from the sensor (I sense ) will be equal to 8 µA. Equations (5) and (6) allow sizing capacitance C7 and the feedback resistance (R3) of the transimpedance stage based on the opamp U t (Figure 12). The V oMax and V oMin voltages indicate the dynamics of the U t output voltage; I Max represents the maximum current delivered by the sensor during gas detections, and f p is the pole frequency due to capacitor C7 and the resistor placed in the feedback loop (R3). Figure 13a shows the circuit diagram, created with Eagle CAD software, of the conditioning section for the electrochemical sensor ME3-H2S. The resistor series placed in the feedback loop was calculated from Equation (6) and is equal to 400 kΩ. Finally, a 50 kΩ (R10) SMD potentiometer was added in series to the feedback loop, which includes the resistors R5-R6, allowing fine-tuning of the transimpedance stage gain to increase the resolution of the measurement of the gas concentration.
The layout of ME3-H2S sensor is depicted in Figure 13b, in which the connections and components are placed in the top layer, whereas the sensor lies on the bottom layer. By adopting this solution and optimizing the positioning of the components, the board dimensions were significantly reduced (i.e., 29 mm × 33 mm).

Firmware Development and Experimental Tests on Realized Smart Garment
This section describes the development of the proposed smart garment's firmware, detailing the communication modalities between the installed sensors and the acquisition and processing section; furthermore, the management of the data coming from the sensors is also analyzed to calculate the relevant parameters measurable by the smart system. Moreover, the results of the communication test performed between the smart garment and the IBM Watson cloud platform are reported.

Firmware Development and Experimental Tests on Realized Smart Garment
This section describes the development of the proposed smart garment's firmware, detailing the communication modalities between the installed sensors and the acquisition and processing section; furthermore, the management of the data coming from the sensors is also analyzed to calculate the relevant parameters measurable by the smart system. Moreover, the results of the communication test performed between the smart garment and the IBM Watson cloud platform are reported.
The flowchart of the firmware deployed by the wearable device is illustrated in Figure 14. First, all of the variables useful for programming purposes are declared, and the used communication interfaces (I 2 C and UART interfaces) are initialized. Then, the program flow enters a loop that iterates until the device is switched on. Subsequently, the measurement cycle starts by verifying the contact of the PPG sensor with the user's skin. This task is performed by checking the reflected IR component acquired from the MAX30102 sensor; if the reflected component is lower than a given threshold, it means that there is no contact with the sensor. The acquisition cycle is thus stopped until the user puts on the smart garment. Once the wearable device is worn, the acquisition cycle starts by gathering raw data from the PPG sensor. First, the 32-bit samples of IR and red components acquired by the two detectors integrated into the MAX30102 sensor are stored by the microcontroller for 4 s; since the sampling period is set to 25 samples per second (sps), 100 elements are collected and stored into two arrays. The flowchart of the firmware deployed by the wearable device is illustrated in Figure 14. First, all of the variables useful for programming purposes are declared, and the used communication interfaces (I 2 C and UART interfaces) are initialized. Then, the program flow enters a loop that iterates until the device is switched on. Subsequently, the measurement cycle starts by verifying the contact of the PPG sensor with the user's skin. This task is performed by checking the reflected IR component acquired from the MAX30102 sensor; if the reflected component is lower than a given threshold, it means that there is no contact with the sensor. The acquisition cycle is thus stopped until the user puts on the smart garment. Once the wearable device is worn, the acquisition cycle starts by gathering raw data from the PPG sensor. First, the 32-bit samples of IR and red components acquired by the two detectors integrated into the MAX30102 sensor are stored by the microcontroller for 4 s; since the sampling period is set to 25 samples per second (sps), 100 elements are collected and stored into two arrays.
The acquired samples are stored inside the data memory (static random-access memory (SRAM)) of the SAMD21G18A microcontroller. Then, the measurement is refined by recording new samples every second for 35 s; specifically, the first 25 sets of samples are deleted, and the remaining ones are shifted to the top of the corresponding array. Therefore, by setting the variable i = 75 (the array index), 25 new samples can be recorded every second (Figure 14a). After 35 iterations, the HR and SpO 2 are calculated; specifically, the HR firmware detects the time interval between two peaks of the optical signal reflected from the skin surface [50]. In addition, the implemented SpO 2 firmware relies on the Lambert-Beer law, which allows measuring SpO 2 using the molar extinction coefficients of oxygenated hemoglobin (HbO 2 ) and deoxygenated (RHb) hemoglobin [51]. Arterial blood, periodically pumped into blood vessels, absorbs and modulates incident light as it passes through the tissue and forms a photoplethysmographic signal (PPG). The AC component of PPG signals represents the light absorbed by pulsatile arterial blood and is usually found at a frequency of 1 Hz, depending on the heart rate. The acquired samples are stored inside the data memory (static random-acces memory (SRAM)) of the SAMD21G18A microcontroller. Then, the measurement is re fined by recording new samples every second for 35 s; specifically, the first 25 sets o samples are deleted, and the remaining ones are shifted to the top of the correspondin array. Therefore, by setting the variable i = 75 (the array index), 25 new samples can b recorded every second (Figure 14a). After 35 iterations, the HR and SpO2 are calculated specifically, the HR firmware detects the time interval between two peaks of the optica signal reflected from the skin surface [50]. In addition, the implemented SpO2 firmwar This AC component is superimposed on a DC signal that captures the effects of light absorbed by other blood and tissue components (venous and capillary blood, bone, water, etc.). The relationship between the AC signal and the DC level is commonly referred to as the perfusion index (PI). Two LEDs with different wavelengths are needed to measure SpO 2 , selected so that the molar absorption coefficients of HbO 2 and RHb are well separated.
A 660 nm red LED and an 880 nm infrared LED are commonly used in pulse oximetry because oximetry relies on the change in the absorption of the electromagnetic energy of the hemoglobin molecule when its chemical bonds are altered (i.e., when it comes into contact with the light beam generated by the LED) [52]. SpO 2 can be expressed by the following polynomial relationship: where a, b, and c are calibration coefficients; AC red and AC ired are the amplitude of the AC components of the output signals from the red and IR photodiodes, respectively; DC red and DC ired are the amplitude of the DC components of the output signals from the RED and IR photodiodes. In the literature, the SpO 2 percentage is often calculated for medical devices as [53]: The implemented firmware for the SpO 2 calculation does not use the previous formula but rather the function %SpO 2 = −45 × R 2 +30.54 × R + 94.845, implemented by the approximation array shown in Figure 15, which numerically approximates the function. to as the perfusion index (PI). Two LEDs with different wavelengths are needed to measure SpO2, selected so that the molar absorption coefficients of HbO2 and RHb are well separated. A 660 nm red LED and an 880 nm infrared LED are commonly used in pulse oximetry because oximetry relies on the change in the absorption of the electromagnetic energy of the hemoglobin molecule when its chemical bonds are altered (i.e., when it comes into contact with the light beam generated by the LED) [52]. SpO2 can be expressed by the following polynomial relationship: where a, b, and c are calibration coefficients; AC red and AC ired are the amplitude of the AC components of the output signals from the red and IR photodiodes, respectively; DC red and DC ired are the amplitude of the DC components of the output signals from the RED and IR photodiodes. In the literature, the SpO2 percentage is often calculated for medical devices as [53]: The implemented firmware for the SpO2 calculation does not use the previous formula but rather the function %SpO2 = -45 × R 2 + 30.54 × R + 94.845, implemented by the approximation array shown in Figure 15, which numerically approximates the function. Afterwards, the correctness of the HR and SpO2 measurements is checked through two flags called HR_valid and SpO2_valid; if two flags are true, the other parameters are acquired, namely, gas concentrations from the electrochemical gas sensor modules, body temperature from MAX30102, and the environmental temperature from LM75A. Relatively to the developed electrochemical gas sensor modules, presented in Section 3.1, the analog signals are acquired by the 12-bit ADC of the SAMD21G18 MCU and converted into gas concentrations through transfer functions of the different stages:  Afterwards, the correctness of the HR and SpO 2 measurements is checked through two flags called HR_valid and SpO2_valid; if two flags are true, the other parameters are acquired, namely, gas concentrations from the electrochemical gas sensor modules, body temperature from MAX30102, and the environmental temperature from LM75A. Relatively to the developed electrochemical gas sensor modules, presented in Section 3.1, the analog signals are acquired by the 12-bit ADC of the SAMD21G18 MCU and converted into gas concentrations through transfer functions of the different stages: O 2 concentration = V 0.141 mV %Vol (11) H 2 S concentration = V 0.32 V/ppm (12) where V is the acquired voltage in volts, whereas the CO, CH 2 O, and H 2 S concentrations are expressed in ppm, and the O 2 concentration is in %Vol.
These data, suitably formatted, are transmitted to the gateway through the integrated BLE module. The measurement_OK flag is then set to 1 to signal that the measurement and data packet transfer occurred correctly. The flag controls the operation mode of the wearable device, which takes measurements every 15 min (Figure 14a). If the flag is set to 1, the sensor, BLE module, and microcontroller are put into a 15 min sleep mode to save energy and extend the device's autonomy. After resetting the measurement_OK flag, the entire system is restarted, and a new measurement cycle begins. However, if the measurement cycle fails, the flag is not set, and the garment begins a new measurement cycle right away. Finally, fall detection is deployed using the embedded freefall detection mechanism of the MMA8452Q accelerometer (Figure 14b). The algorithm relies on analyzing the three-axis acceleration values, detecting when they are below a set threshold for longer than a given time duration, called debounce time; from experimental tests, the optimal values for the two parameters are 0.063 g and 100 ms, respectively [23]. The fall event is connected to an interrupt source of the MMA8452 accelerometer, which wakes up the microcontroller, recalling an interrupt service routine (ISR). This last event awakens the BLE module for transmitting a warning signal to the cloud platform, which triggers the transmission of an alert message to the company's security manager. Later, the microcontroller brings the BLE module into low-power mode again, and the microcontroller goes into sleep mode for the time remaining before the next awakening. The MMA8452Q sensor was positioned on the waist (as shown in Figure 8b) since this body area was identified as the most suitable for guaranteeing excellent fall detection [54]. As a result, the measurement cycle lasts roughly 40 s, owing to the algorithm's convergence time for measuring the HR and SpO 2 . Figure 16 presents a screenshot of the Serial Bluetooth Terminal (developed by Kai Morich Inc., Hockenheim, Germany) to verify the phases of data acquisition and transmission of the wearable device. It can be observed in this figure that after the command "Start Measurement", the formatting of the acquired data occurs as eight separate streams; each line consists of the parameter identifier, its value, and the corresponding measurement unit. Sleep indicates that the system has entered the standby period (1 min for testing purposes) before the next measurement. where V is the acquired voltage in volts, whereas the CO, CH2O, and H2S concentrations are expressed in ppm, and the O2 concentration is in %Vol. These data, suitably formatted, are transmitted to the gateway through the integrated BLE module. The measurement_OK flag is then set to 1 to signal that the measurement and data packet transfer occurred correctly. The flag controls the operation mode of the wearable device, which takes measurements every 15 min (Figure 14a). If the flag is set to 1, the sensor, BLE module, and microcontroller are put into a 15 min sleep mode to save energy and extend the device's autonomy. After resetting the measure-ment_OK flag, the entire system is restarted, and a new measurement cycle begins. However, if the measurement cycle fails, the flag is not set, and the garment begins a new measurement cycle right away. Finally, fall detection is deployed using the embedded freefall detection mechanism of the MMA8452Q accelerometer (Figure 14b). The algorithm relies on analyzing the three-axis acceleration values, detecting when they are below a set threshold for longer than a given time duration, called debounce time; from experimental tests, the optimal values for the two parameters are 0.063 g and 100 ms, respectively [23]. The fall event is connected to an interrupt source of the MMA8452 accelerometer, which wakes up the microcontroller, recalling an interrupt service routine (ISR). This last event awakens the BLE module for transmitting a warning signal to the cloud platform, which triggers the transmission of an alert message to the company's security manager. Later, the microcontroller brings the BLE module into low-power mode again, and the microcontroller goes into sleep mode for the time remaining before the next awakening. The MMA8452Q sensor was positioned on the waist (as shown in Figure 8b) since this body area was identified as the most suitable for guaranteeing excellent fall detection [54]. As a result, the measurement cycle lasts roughly 40 s, owing to the algorithm's convergence time for measuring the HR and SpO2. Figure 16 presents a screenshot of the Serial Bluetooth Terminal (developed by Kai Morich Inc., Hockenheim, Germany) to verify the phases of data acquisition and transmission of the wearable device. It can be observed in this figure that after the command "Start Measurement", the formatting of the acquired data occurs as eight separate streams; each line consists of the parameter identifier, its value, and the corresponding measurement unit. Sleep indicates that the system has entered the standby period (1 min for testing purposes) before the next measurement.

Characterization of the Multisource Harvesting Section Integrated into the Smart Jacket
This subsection presents the characterization results of the multisource harvesting sections integrated into the smart jacket in the operating modalities described in Section 2.3.

Characterization of the Multisource Harvesting Section Integrated into the Smart Jacket
This subsection presents the characterization results of the multisource harvesting sections integrated into the smart jacket in the operating modalities described in Section 2.3. Figure 17 summarizes the power generated by the multisource energy harvesting section in the five different scenarios previously described. Five different tests were conducted for each scenario with a 30 min observation interval; the current values absorbed by the electronic load were acquired and recorded using a portable data-logger (model PM8236, manufactured by Shenzhen Huayi Peakmeter Technology Co., Shenzhen, China) with a 30 s sampling time interval. The maximum power generated by the multisource harvesting system was calculated using the acquired time-domain trends. The mean maximum power (P Max ) values for each scenario are shown in Figure 17, along with the maximum power generated by the multisource harvesting system, which are calculated using the acquired time-domain trends. Figure 17 summarizes the power generated by the multisource energy harves section in the five different scenarios previously described. Five different tests w conducted for each scenario with a 30 min observation interval; the current values sorbed by the electronic load were acquired and recorded using a portable data-log (model PM8236, manufactured by Shenzhen Huayi Peakmeter Technology Co., Sh zhen, China) with a 30 s sampling time interval. The maximum power generated by multisource harvesting system was calculated using the acquired time-domain tren The mean maximum power (PMax) values for each scenario are shown in Figure 17, al with the maximum power generated by the multisource harvesting system, which calculated using the acquired time-domain trends.   Therefore, the photovoltaic harvesting section contributes the most to the electr power stored in the battery when the garment is directly exposed to sunlight (scena 1-2, Figure 18). However, due to the continued contributions of the thermal and piez  zhen, China) with a 30 s sampling time interval. The maximum power generated multisource harvesting system was calculated using the acquired time-domain The mean maximum power (PMax) values for each scenario are shown in Figure 17 with the maximum power generated by the multisource harvesting system, wh calculated using the acquired time-domain trends.   Therefore, the photovoltaic harvesting section contributes the most to the el power stored in the battery when the garment is directly exposed to sunlight (sc 1-2, Figure 18). However, due to the continued contributions of the thermal and p Therefore, the photovoltaic harvesting section contributes the most to the electrical power stored in the battery when the garment is directly exposed to sunlight (scenarios 1-2, Figure 18). However, due to the continued contributions of the thermal and piezoelectric harvesting subsections, it allows the continuous charge of the 380 mAh LiPo battery even in dispersed illumination (scenario 3) or artificial light (scenarios 4-5).
As evident from the experimental results reported above, the energy contribution provided by the piezoelectric harvesting section is significantly lower compared to the thermal (a factor 11) and mainly photovoltaic (777) ones. However, in this research application, we chose to integrate the thermal contribution with the piezoelectric one, which contributes in all situations where no light sources are available, while also considering the reduced invasiveness of the developed transducers ( Figure 4).
According to the results of the harvesting system tests, scenario 2 requires roughly 4 h of charging time to completely charge the 380 mAh LiPo battery ( Figure 17). As described in Section 3.2, the device's operating cycle includes the acquisition, processing, and transmission phase and lasts 40 s; after that, the sensing section goes to sleep for 15 min and then restarts for another cycle. In contrast, fall detection is entrusted to an interrupt for the MCU generated by the inertial module (MMA8452Q), triggering an ISR, with a consequent warning message transmitted to the cloud app. Additionally, tests on the electronic section demonstrate that in power-down mode, the mean absorbed current is 255.91 µA (I sleep ), whereas, in active mode, it is only 7.51 mA (I active ). Considering the operating modalities described in Section 3.2, the mean current absorbed by the garment in a measurement cycle is given by the weighted average of the current values just reported, taking into account the time duration of the active and sleep phases: Therefore, the wearable device consumes a 1.86 mW (3.3 V × 0.56 mA) mean power; alternatively, the system requires a 0.56 mAh (Q hourly ) charge for every operation hour; thus, the charge needed for daily operation of the system is given by: Assuming a 40% discharge margin for the LiPo battery, the following relationship provides the autonomy of the smart garment in the absence of any contribution from the harvesting unit.
13.53 mAh/day = 16.85 days (15) However, the mean current absorbed from the battery was monitored in each measurement cycle for four days. The results demonstrate that the mean absorbed current is 0.57 mA with a ±3% deviation, in accordance with that reported in Equation (13) (i.e., 0.56 mA). Therefore, a reduction in the battery charge of 54.7 mAh (0.57 mAh × 24 h × 4 days) was measured over four days, corresponding to about 25% battery capacity curtailed at a 40% discharge margin (380 mAh × 0.6 × 0.25 = 57 mAh).
Adopting suitable operational strategies, optimizing the hardware and firmware of the different portions of the wearable device, and exploiting low-power operating modes for the MCU and sensors enabled around 16 days of autonomy when no energy contributions are available from the harvesting section. Lastly, considering that the sensing and communication units require approximately 0.56 mAh per hour of operation (13.53 mAh/24 h), the energy harvesting section is capable of providing, in the worst-case scenario (scenario 5 of Figure 17), much more charge (0.850 mAh) than required (0.56 mAh), ensuring the energy autonomy of the designed smart electronic garment.

Discussion
The presented work describes the development of a smart garment for monitoring the environmental conditions and vital signs of users who work in workplaces with health risk sources. The aim is to develop a monitoring system applicable to every working scenario for quickly detecting dangerous situations that threaten workers' safety. In fact, the developed smart jacket constitutes the source nodes of the monitoring system, gathering local and accurate information related to the worker's status. In particular, the garment integrates a wide range of sensors for detecting biophysical data (HR, SpO 2 , body temperature, step count, falls, etc.) and workplace conditions, such as the presence of dangerous gas species and the oxygen concentration. For this purpose, two low-power conditioning boards for electrochemical gas sensors are used to detect the air concentrations of CO, CH 2 O, O 2 , and H 2 S. The acquired data are forwarded to the IBM Cloud through a custom mobile application, which gathers data from the smart jacket and acts as a gateway, providing Internet access to the wearable device. In particular, the collected data are arranged in JSON packets and sent to the IBM Watson IoT service through the MQTT protocol. The data are sent to the company's security managers by a suitable dashboard, stored by the IBM Cloudant database, and analyzed by the IBM Cloud Functions service to detect anomalies and send notifications when dangerous situations are found. Furthermore, a multisource harvesting system was integrated into the garment, recovering energy from light, heat, and limb movements and collecting it in a storage device (LiPo battery). The scavenged charge is used to feed the sensing section, making the smart garment energy-autonomous in common operating scenarios, as demonstrated in Section 3.3.

Mobile Application for Routing Acquired Data to the Cloud Platform
A mobile application was developed to manage the communication between the wearable device and the IBM Cloud platform. As described above, the smartphone acts as an IoT gateway, collecting data from the smart garment, formatting them into a JSON packet, and sharing them using the MQTT protocol with the IBM Watson IoT cloud platform ( Figure 19). In particular, the application is connected to the smart garment by the BLE protocol and receives data streams (Figure 16), parsing them to extract single parameters. The application arranges the data into a JSON packet and publishes it on the topic related to the smart garment using the credentials of the cloud service.
safety. In fact, the developed smart jacket constitutes the source nodes of the monitoring system, gathering local and accurate information related to the worker's status. In particular, the garment integrates a wide range of sensors for detecting biophysical data (HR, SpO2, body temperature, step count, falls, etc.) and workplace conditions, such as the presence of dangerous gas species and the oxygen concentration. For this purpose, two low-power conditioning boards for electrochemical gas sensors are used to detect the air concentrations of CO, CH2O, O2, and H2S. The acquired data are forwarded to the IBM Cloud through a custom mobile application, which gathers data from the smart jacket and acts as a gateway, providing Internet access to the wearable device. In particular, the collected data are arranged in JSON packets and sent to the IBM Watson IoT service through the MQTT protocol. The data are sent to the company's security managers by a suitable dashboard, stored by the IBM Cloudant database, and analyzed by the IBM Cloud Functions service to detect anomalies and send notifications when dangerous situations are found. Furthermore, a multisource harvesting system was integrated into the garment, recovering energy from light, heat, and limb movements and collecting it in a storage device (LiPo battery). The scavenged charge is used to feed the sensing section, making the smart garment energy-autonomous in common operating scenarios, as demonstrated in Section 3.3.

Mobile Application for Routing Acquired Data to the Cloud Platform
A mobile application was developed to manage the communication between the wearable device and the IBM Cloud platform. As described above, the smartphone acts as an IoT gateway, collecting data from the smart garment, formatting them into a JSON packet, and sharing them using the MQTT protocol with the IBM Watson IoT cloud platform ( Figure 19). In particular, the application is connected to the smart garment by the BLE protocol and receives data streams (Figure 16), parsing them to extract single parameters. The application arranges the data into a JSON packet and publishes it on the topic related to the smart garment using the credentials of the cloud service. The custom application, created using the MIT App Inventor, is constituted by a single screen composed of four sections, as highlighted in Figure 19a:

•
The first section is devoted to communication with the cloud platform (yellow box); • The second section manages the connection with the Bluetooth device (red box); • The third section displays the data received in the last valid measurement, even storing them during the 15 min system sleep interval (purple box). Then, the formatted JSON packet containing the received data is published on the cloud; • The last section shows the trends of the acquired parameters (blue box).
In particular, the IBM Watson IoT platform was employed to receive the data from IoT devices; regarding the communication with the cloud, the first step consists in configuring and setting up the platform appropriately ( Figure 20).  Firstly, the credentials were set for authentication: a new device of "smart_jacket" typology was created and characterized by a given authentication token. To allow the device's connection with the IBM Watson platform, it is necessary to provide the user ID (organization ID) during the creation of the user profile. By adding these parameters to the code of the developed Android app, it is possible to enable communication with the cloud platform via the MQTT protocol. Once these parameters have been set, by restarting the communication with the smart garment, it is possible to check that the developed Android application is correctly sharing data with the cloud platform through the status code at the top screen. At this point, the event section can be accessed after logging into the created user profile and selecting the registered device. The events section is shown in Figure 20a; this figure presents the data received from the device associated with the transmissions carried out by the application on the topic user, called "sensor1". Then, a custom dashboard for displaying the incoming data is created (Figure 20b). Lastly, the IBM Cloudant service is connected to the IBM Watson IoT platform via Historian Connector to securely store the acquired parameters ( Figure 20c). As introduced above, the collected data are processed by the IBM Cloud Functions service for triggering actions based on their values. This service is based on a trigger and action mechanism, executing code sections when given events occur. In particular, the system detects the exceedance of a set of thresholds set for physiological reasons (biophysical data), regulations (gas concentrations), and significant events (falls).

Characterization and Testing of the Sensors Integrated into the Smart Garment
The developed gas sensor modules were tested statically using a test chamber (model EC01, manufactured by Figaro Inc., Arlington Heights, IL, Unites States). The sensor modules were put in the characterization chamber where clean air was present; then, a fixed gas concentration was established for 120 s, and finally, the gas was removed from the chamber. In particular, for each sensor, the corresponding STEL limit was used as the target concentration during these tests (Table 1). For O 2 , the sensor was first exposed to clean air with an oxygen level between 21% and 23%, and then the oxygen level was decreased to 16% for 120 s; afterwards, new clean air was introduced. Therefore, the output voltage transients were acquired using a bench multimeter (model GDM-8351, manufactured by Gwinstek, Taipei, Taiwan) for all used sensors, and thus, the corresponding gas concentrations were calculated using Equations (9)- (12) to verify different features of the used electrochemical gas sensors (sensitivity, response time, and recovery time) (Figure 21). Firstly, the credentials were set for authentication: a new device of "smart_jacket" typology was created and characterized by a given authentication token. To allow the device's connection with the IBM Watson platform, it is necessary to provide the user ID (organization ID) during the creation of the user profile. By adding these parameters to the code of the developed Android app, it is possible to enable communication with the cloud platform via the MQTT protocol. Once these parameters have been set, by restarting the communication with the smart garment, it is possible to check that the developed Android application is correctly sharing data with the cloud platform through the status code at the top screen. At this point, the event section can be accessed after logging into the created user profile and selecting the registered device. The events section is shown in Figure 20a; this figure presents the data received from the device associated with the transmissions carried out by the application on the topic user, called "sensor1". Then, a custom dashboard for displaying the incoming data is created (Figure 20b). Lastly, the IBM Cloudant service is connected to the IBM Watson IoT platform via Historian Connector to securely store the acquired parameters ( Figure 20c). As introduced above, the collected data are processed by the IBM Cloud Functions service for triggering actions based on their values. This service is based on a trigger and action mechanism, executing code sections when given events occur. In particular, the system detects the exceedance of a set of thresholds set for physiological reasons (biophysical data), regulations (gas concentrations), and significant events (falls).

Characterization and Testing of the Sensors Integrated into the Smart Garment
The developed gas sensor modules were tested statically using a test chamber (model EC01, manufactured by Figaro Inc., Arlington Heights, IL, Unites States). The sensor modules were put in the characterization chamber where clean air was present; then, a fixed gas concentration was established for 120 s, and finally, the gas was removed from the chamber. In particular, for each sensor, the corresponding STEL limit was used as the target concentration during these tests (Table 1). For O2, the sensor was first exposed to clean air with an oxygen level between 21% and 23%, and then the oxygen level was decreased to 16% for 120s; afterwards, new clean air was introduced. Therefore, the output voltage transients were acquired using a bench multimeter (model GDM-8351, manufactured by Gwinstek, Taipei, Taiwan) for all used sensors, and thus, the corresponding gas concentrations were calculated using Equations (9)- (12) to verify different features of the used electrochemical gas sensors (sensitivity, response time, and recovery time) (Figure 21).  Table 3 summarizes the parameters (response time, recovery time, and sensitivity) extracted from the above transient characteristics. Table 3. Parameters of the electrochemical gas sensors extracted from the transient characteristics reported above.  Table 3 summarizes the parameters (response time, recovery time, and sensitivity) extracted from the above transient characteristics. The results are in good agreement with the data reported in the datasheets [35][36][37][38], falling within the tolerance ranges provided by the manufacturer. In addition, five tests were carried out in an industrial scenario with the sensor modules installed inside the smart garment worn by a walking user. In particular, the measures provided by the wearable devices were compared with those provided by calibrated portable detectors. Specifically, the BW CLIP 4 multiparametric detector, manufactured by Honeywell Inc., was employed to measure the CO, H 2 S, and oxygen concentrations; on the contrary, the FP-31G detector, manufactured by GrayWolf Inc., was employed to detect the environmental concentration of CH 2 O. Table 4 summarizes the results of the above-described tests. As evident from the obtained results, the smart garment provides measurements in agreement with the reference values derived by the portable detectors, with a maximum deviation of ±10% ascribable to the tolerance values of the components. In addition, a comparison between measurements provided by the smart jacket and those provided by reference instruments was carried out; in particular, for the HR, a professional arm blood pressure monitor (Medel Check model 3498, manufactured by Medel International Srl, Milano, Italy) was employed, whereas, for SpO 2 , a commercial pulse oximeter (model PR-10, manufactured by CocoBear, Shenzhen, Guangdong, China) was used. For body temperature (BT), an infrared thermometer (model HT-820d, produced by HT-Instruments Inc., Faenza, Italia) was used, and the air temperature (AT) was measured with a digital thermometer (model DM120-0-3, produced by Cooper Atkins Inc., Middlefield, CT, United States). Table 5 summarizes the data acquired by the smart jacket with the reference values, along with the corresponding deviations. As is evident, optimal agreement was obtained for all considered measurements, indicating the correct functioning of the sensors integrated into the garment.
Finally, to highlight the contribution of the presented work, a comparative analysis with other similar scientific works is presented in Table 6 from the point of view of the detected number of biophysical and environmental parameters, availability of the harvesting section, and invasiveness.  The reported comparison shows that other devices reported in the literature can acquire similar parameters but with different sensor technologies [25]. The use of electrochemical gas sensors allows reducing the garment's power consumption. Furthermore, a key feature of the proposed device that is not exploited in the compared systems is the combination between a wearable sensing system and a harvesting unit, enabling the significant extension of the device lifetime and making it energetically autonomous in practical operating scenarios.

Conclusions
Today, the rapid evolution of the Internet of Things (IoT), with billions of interconnected devices, is opening new possibilities for innovative services that make our lives easier, safer, and healthier. Wearable devices represent a versatile technology in the IoT paradigm, enabling non-invasive and accurate data collection directly from the human body for a wide range of applications, including health monitoring, assistance for impaired people, accident detection or prevention in industrial environments, etc. In particular, the proposed research work presents the development of a smart garment to monitor working conditions in particularly dangerous workplaces (e.g., food, chemical, and metallurgical industries). In particular, the wearable device integrates several sensors deployed in different human body positions for acquiring the user's vital signs (HR, SpO 2 , body temperature, and falls) and environmental parameters (e.g., concentrations of harmful gas species and oxygen level). The core section is represented by a custom acquisition and processing board based on the SAMD21G8A microcontroller and BLE transceiver (model JDY-23). Specifically, electrochemical gas sensing modules were developed and integrated into the wearable device for detecting the air concentrations of CO, H 2 S, CH 2 O, and O 2 .
The smart garment wirelessly transmits the acquired data to the cloud platform (IBM Cloud), where they are displayed, processed, and stored. Specifically, a custom mobile application was developed, which collects data from the wearable device and sends them to the cloud platform by the MQTT protocol, acting as an IoT gateway and, thus, enabling the system's operation in areas where a WiFi hotspot is not available.
Moreover, the smart garment comprises a multisource energy harvesting system for recovering energy closely associated with the human body, such as light, body heat, and limb movements, using thin-film photovoltaic panels, TEGs, and flexible piezoelectric transducers. Field tests indicated that the harvesting section could scavenge up to 260 mW in real operating conditions, fully covering the energy requirements of the sensing and processing system in all tested scenarios. Nevertheless, the 380 mAh LiPo used to store the charge extracted from the harvesting section can ensure a lifetime of 16 days when no energy contributions are available. Finally, the characterization and tests on the sensors integrated into the garment confirm their correct operation.