## 2 Materials and Methods
### 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). 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.