Low-Cost Wireless Wearable System for Posture Monitoring

: Posture monitoring aiming at preventing many of the pathologies affecting the spine is becoming more and more essential in many contexts, including telemedicine. The market pushes towards the development of new technical solutions that are comfortable for the user and that are increasingly becoming lower in terms of cost. Some systems at the state of the art level are effective and sometimes quite comfortable, but they have a degree of complexity that is not compatible with some market segments. Here, we report on the development, at a prototype level, a simple, low-cost, and potentially very comfortable microcontroller-based system capable of signaling incorrect postures with great sensitivity. The prototype, which has been tested also using video analysis, has shown its capacity to be easily integrated into a garment. Experimental activity has proven the prototype’s functionality. The wearable embedded system is able to detect ﬂections in the back region monitored by the ﬂex sensor with an accuracy of <3 ◦ . The achievement represents a further demonstration of the potential of wearable electronics in the context of cyber-physical systems for healthcare.


Introduction
The fast development of electronic wearable miniaturized systems is pivotal in the digital transformation, as it has enabled innovative smart devices in direct contact with the user's body [1,2]. One of the most interesting features of such devices is their ability to interface with mobile devices, including smartphones, using wireless protocols such as Bluetooth ® [3].
A wide range of wearable devices are currently available on the market, and the research effort in this field is quickly growing with the consequent demonstration of many prototypes with different levels of technological maturity [4,5].
Some of the most innovative wearable devices are specifically intended for healthcare applications, while others have functionalities potentially useful in several healthcare contexts [6,7]. Although the most widespread capabilities of these devices with potential health applications include the tracking of motor activities and/or monitoring of physiological data such as heart rate, oxygen saturation in blood, and body temperature, new classes of devices are under development that aim at responding to emerging health and market needs. Lower back pain prevention is one of the most urgent among these needs. In fact, this symptom affects up 23% worldwide population [8], and spinal therapy is among the most expensive therapies in the world.
In the last decade, scientific and industrial interest towards wearable posture monitoring systems is quickly growing and several technologies have been developed after the first attempts based on the use of miniaturized inertial sensors [9]. Systems based on image acquisition and processing are quite expensive, and their main drawback is related to privacy issues [10,11]. The alternative approach, which is the most promising, is based on wearable sensors that can be integrated in different platforms such as chairs or clothes. Many embedded systems based on this concept have been reported in literature, but research activity is still ongoing and aims at lowering the systems' cost and increasing accuracy and users' comfort [12][13][14][15][16][17][18][19][20]. A systematic review with respect to wearables for assessing spine kinematics and kinetics is available in [21]. The findings of that study and our analysis of the state of the art confirm that the development of low-cost comfortable wearable solutions to the problem of posture monitoring is an open research theme.
The paper reports on the development of a low-cost wearable system capable of monitoring the degree of curvature of a subject's back, alerting the user when she/he assumes an incorrect posture by using an acoustic signal. The system can be used easily and without cluttering. It is directly sewn on a garment and connected via Bluetooth ® to a smartphone. In this manner, the user is able to switch the device on and off directly from her/his smartphone and receive a summary of monitoring activity.

Materials and Methods
The prototype of the wearable embedded system is based on the Arduino Lilypad board including the ATmega328 microcontroller [22]. The board can be sewn into fabrics and connected to power supplies, sensors, and actuators via conductive wire. It has a diameter of 5 cm and is 0.8 mm thick; it is equipped with 22 pins (14 digital I/O pins, 6 analog I/O pins, 2 pins for power supply). The board does not include the USB terminal. For this reason, the FT232RL module [23] is used. This module is necessary for converting the USB port of the Arduino LilyPad board into a serial port.
Aiming at implementing wireless communication between the embedded system and a mobile device, e.g., a smartphone, the HC-06 Bluetooth ® module [24] is used. The module transforms the signal on the UART bus into a wireless signal via Bluetooth ® , generally using the Serial Port Profile.
In order to alert the user of a bad posture, a buzzer is included in the embedded system. The Lilypad buzzer is an inductive buzzer that uses 2 I/O pins on the Lilypad main board and generates different alert signals.
The embedded system is supplied by the LilyPad button charger containing a 20 mm coin cell battery such as the CR2032.
The sensing element is a flex sensor, which is a resistor for which its resistance value varies according to the bending. It is used to assess the angle of curvature of the back or neck. The sensor (model: ZD10-100, Suzhou LEANSTAR Electronic Technology Co., Ltd., Shenzhen, China) consists of a phenolic resin substrate on which conductive ink is deposited. When the sensor is straight, we have verified that its resistance is larger than 5 MΩ. When the sensor is bent, the conductive layer is stretched. At an angle of 90 • , the measured resistance is 15 kΩ. When the sensor is straightened again, the resistance returns to its original value. The flex sensor included in the prototype is shown in Figure 1. It has a length of 100 mm, a width of 10 mm, and a thickness <0.25 mm. The sensor weight is approximately 3 g. Its response time is less than 10 ms, its recovery time is less than 15 ms, and the operating temperature range is from −20 • C to 60 • C.
Electronics 2021, 10, x FOR PEER REVIEW 2 of 8 wearable sensors that can be integrated in different platforms such as chairs or clothes. Many embedded systems based on this concept have been reported in literature, but research activity is still ongoing and aims at lowering the systems' cost and increasing accuracy and users' comfort [12][13][14][15][16][17][18][19][20]. A systematic review with respect to wearables for assessing spine kinematics and kinetics is available in [21]. The findings of that study and our analysis of the state of the art confirm that the development of low-cost comfortable wearable solutions to the problem of posture monitoring is an open research theme. The paper reports on the development of a low-cost wearable system capable of monitoring the degree of curvature of a subject's back, alerting the user when she/he assumes an incorrect posture by using an acoustic signal. The system can be used easily and without cluttering. It is directly sewn on a garment and connected via Bluetooth ® to a smartphone. In this manner, the user is able to switch the device on and off directly from her/his smartphone and receive a summary of monitoring activity.

Materials and Methods
The prototype of the wearable embedded system is based on the Arduino Lilypad board including the ATmega328 microcontroller [22]. The board can be sewn into fabrics and connected to power supplies, sensors, and actuators via conductive wire. It has a diameter of 5 cm and is 0.8 mm thick; it is equipped with 22 pins (14 digital I/O pins, 6 analog I/O pins, 2 pins for power supply). The board does not include the USB terminal. For this reason, the FT232RL module [23] is used. This module is necessary for converting the USB port of the Arduino LilyPad board into a serial port.
Aiming at implementing wireless communication between the embedded system and a mobile device, e.g., a smartphone, the HC-06 Bluetooth ® module [24] is used. The module transforms the signal on the UART bus into a wireless signal via Bluetooth ® , generally using the Serial Port Profile.
In order to alert the user of a bad posture, a buzzer is included in the embedded system. The Lilypad buzzer is an inductive buzzer that uses 2 I/O pins on the Lilypad main board and generates different alert signals.
The embedded system is supplied by the LilyPad button charger containing a 20 mm coin cell battery such as the CR2032.
The sensing element is a flex sensor, which is a resistor for which its resistance value varies according to the bending. It is used to assess the angle of curvature of the back or neck. The sensor (model: ZD10-100, Suzhou LEANSTAR Electronic Technology Co., Ltd., Shenzhen, China) consists of a phenolic resin substrate on which conductive ink is deposited. When the sensor is straight, we have verified that its resistance is larger than 5 MΩ. When the sensor is bent, the conductive layer is stretched. At an angle of 90°, the measured resistance is 15 kΩ. When the sensor is straightened again, the resistance returns to its original value. The flex sensor included in the prototype is shown in Figure 1. It has a length of 100 mm, a width of 10 mm, and a thickness <0.25 mm. The sensor weight is approximately 3 g. Its response time is less than 10 ms, its recovery time is less than 15 ms, and the operating temperature range is from −20 °C to 60 °C. A block diagram of the embedded system is shown in Figure 2. One end of the flex sensor is connected to VCC, the power-supply voltage, and the other end is connected to A block diagram of the embedded system is shown in Figure 2. One end of the flex sensor is connected to V CC , the power-supply voltage, and the other end is connected to the analog pin A2 of the Lilypad board through a pull-down resistor of 10 kΩ. In fact, the easiest method to read the flex sensor is to connect it to a resistor with a fixed value and to implement a voltage divider. In this manner, the voltage drop across the pull-down resistor can be considered as sensor output and read by an analog-to-digital converter input of the Lilypad board. The sensor output voltage we measured is V O = V CC [R pull-down /(R flex + R pull-down )]. The buzzer negative end is connected with the ground pin GND of the Lilypad board; the positive end is connected to the digital pin 6 of the Lilypad board. The VCC, GND, Rx, and Tx pins of the Bluetooth ® module are connected to the V CC , GND, and the digital pins 7 and 8 of the Lilypad board, respectively. By using the Bluetooth ® module, it was possible to control the embedded system from a smartphone using the Bluetooth ® terminal for Android. Finally, the FT232RL module was connected to the Lilypad board, and the USB port of the FT232RL module is connected to the laptop only during the programming of the microcontroller. In order to render the posture monitoring system completely wearable, the battery module was added for which its positive and negative ends were connected to the GND and V CC pins of the Lilypad board, respectively. In this manner, it was possible to remove the connection between the Lilypad board and the laptop via the FT232RL module and USB cable after the end of programming activity. The prototype is integrated in a garment. The system's key elements, the Lilypad board and the flex sensor, were integrated in the garment and are shown in Figure 3.
the analog pin A2 of the Lilypad board through a pull-down resistor of 10 kΩ. In fact, the easiest method to read the flex sensor is to connect it to a resistor with a fixed value and to implement a voltage divider. In this manner, the voltage drop across the pull-down resistor can be considered as sensor output and read by an analog-to-digital converter input of the Lilypad board. The sensor output voltage we measured is VO = VCC [Rpulldown/(Rflex + Rpull-down)]. The buzzer negative end is connected with the ground pin GND of the Lilypad board; the positive end is connected to the digital pin 6 of the Lilypad board. The VCC, GND, Rx, and Tx pins of the Bluetooth ® module are connected to the VCC, GND, and the digital pins 7 and 8 of the Lilypad board, respectively. By using the Bluetooth ® module, it was possible to control the embedded system from a smartphone using the Bluetooth ® terminal for Android. Finally, the FT232RL module was connected to the Lilypad board, and the USB port of the FT232RL module is connected to the laptop only during the programming of the microcontroller. In order to render the posture monitoring system completely wearable, the battery module was added for which its positive and negative ends were connected to the GND and VCC pins of the Lilypad board, respectively. In this manner, it was possible to remove the connection between the Lilypad board and the laptop via the FT232RL module and USB cable after the end of programming activity. The prototype is integrated in a garment. The system's key elements, the Lilypad board and the flex sensor, were integrated in the garment and are shown in Figure 3.  The sketch for the Arduino IDE (integrated development environment) was organized in the two main functions. In the Void setup() section, the communication at 9600 bits per second with the serial port and the virtual serial port allowing the commutation with the mobile device according to the Bluetooth ® protocol is initialized. In addition, the pins of the Lilypad board are properly configured. The Void loop() includes the instructions for reading the sensor output and switching on the buzzer sound as soon as the sensor output exceeds a specific threshold that has been selected after the experimental activity described in Section 3. In addition, the section includes the instructions for controlling the communication between the embedded system and the mobile device. By using the Bluetooth ® terminal for Android, the acquisition of the sensor output can be initiated and terminated. A warning message is printed on the terminal if the user's posture is wrong, and a report on the user's posture during the acquisition time interval can be generated.  The sketch for the Arduino IDE (integrated development environment) was orga nized in the two main functions. In the Void setup() section, the communication at 9600 bit per second with the serial port and the virtual serial port allowing the commutation with the mobile device according to the Bluetooth ® protocol is initialized. In addition, the pin of the Lilypad board are properly configured. The Void loop() includes the instructions fo reading the sensor output and switching on the buzzer sound as soon as the sensor outpu exceeds a specific threshold that has been selected after the experimental activity de scribed in Section 3. In addition, the section includes the instructions for controlling the communication between the embedded system and the mobile device. By using the Blue tooth ® terminal for Android, the acquisition of the sensor output can be initiated and ter minated. A warning message is printed on the terminal if the user's posture is wrong, and a report on the user's posture during the acquisition time interval can be generated.

Results
The flex sensor has been characterized by using an experimental procedure simila to that reported in [25]. The sensor resistance dependence on the bending angle has been plotted in Figure 4. As expected, the resistance decreases as the bending angle increases We have repeated the characterization for 10 times, and we have observed good repeata bility with a maximum drift for each value of resistance at <10%.

Results
The flex sensor has been characterized by using an experimental procedure similar to that reported in [25]. The sensor resistance dependence on the bending angle has been plotted in Figure 4. As expected, the resistance decreases as the bending angle increases. We have repeated the characterization for 10 times, and we have observed good repeatability with a maximum drift for each value of resistance at <10%.  During all the experiments, the flex sensor was placed in the thoracic region of the spine, approximately in the anatomical zone between T4 and T8.
As shown in the diagram in Figure 5, in order to verify the correctness of the data generated by the flex sensor, three passive markers are placed on it and were equidistant from one another. Markers are identified as A, B, and C. Marker A was placed on the lower end of the flex sensor, marker B was placed in the center of the sensor, and marker C was placed on the upper end. During all the experiments, the flex sensor was placed in the thoracic region of the spine, approximately in the anatomical zone between T4 and T8.
As shown in the diagram in Figure 5, in order to verify the correctness of the data generated by the flex sensor, three passive markers are placed on it and were equidistant from one another. Markers are identified as A, B, and C. Marker A was placed on the lower end of the flex sensor, marker B was placed in the center of the sensor, and marker C was placed on the upper end. During all the experiments, the flex sensor was placed in the thoracic region of the spine, approximately in the anatomical zone between T4 and T8.
As shown in the diagram in Figure 5, in order to verify the correctness of the data generated by the flex sensor, three passive markers are placed on it and were equidistant from one another. Markers are identified as A, B, and C. Marker A was placed on the lower end of the flex sensor, marker B was placed in the center of the sensor, and marker C was placed on the upper end. After that, the flex sensor was equipped with the markers, many cycles of curvature and posture correction were performed repeatedly, and a video of the activity is obtained. A video analysis was performed on this video in order to collect data on the positions of the markers in space. For this purpose, an open source tool was used [26].
An interpolation is performed on the data relating to the positions of markers A, B, and C in order to be able to represent the absolute positions of the markers on the XY plane (see Figure 6a). Subsequently, marker A is fixed as a reference, and the positions of After that, the flex sensor was equipped with the markers, many cycles of curvature and posture correction were performed repeatedly, and a video of the activity is obtained. A video analysis was performed on this video in order to collect data on the positions of the markers in space. For this purpose, an open source tool was used [26].
An interpolation is performed on the data relating to the positions of markers A, B, and C in order to be able to represent the absolute positions of the markers on the XY plane (see Figure 6a). Subsequently, marker A is fixed as a reference, and the positions of the markers are represented on the XY plane (Figure 6b). Figure 6c shows the time dependence of the angle α formed by the positions of markers B and C for four cycles of curvature and posture correction, keeping the position of marker A as a reference.  By using the data in Figure 6, the system for detecting incorrect postures has been calibrated. In particular, the threshold value of α, after which the embedded system warns the user of incorrect posture, has been selected as equal to 20°.
We have experimentally verified the correct functionality of the prototype and its By using the data in Figure 6, the system for detecting incorrect postures has been calibrated. In particular, the threshold value of α, after which the embedded system warns the user of incorrect posture, has been selected as equal to 20 • .
We have experimentally verified the correct functionality of the prototype and its capability in detecting any user's wrong posture. In particular, we verified that when α exceeds 20 • , the inductive buzzer switches on and an alert message appears on the screen of the smartphone. In order to evaluate the accuracy of the system, we have slightly changed the value of the angle α around the threshold value of 20 • . By comparing the results of the video analysis and data provided by the system, we have concluded that the accuracy is <3 • . This result is comparable to the state of the art [21].

Conclusions
The development at prototype level of a wearable low-cost electronic system for posture monitoring is reported. The system, which is based on a flex sensor that has been properly characterized and calibrated before its inclusion in the prototype, can be wireless controlled via Bluetooth ® . System control, data digital conversion, and processing are implemented by the Arduino Lilypad board including the ATmega328 microcontroller. Several tests have been carried out on the prototype by using video analysis to compare the back curvature derived from the video analysis, and its estimation is obtained by the developed embedded system. We have experimentally verified that, as the user's posture becomes incorrect, an alert is generated. We have estimated the system accuracy, which is <3 • . Although the design methodology, which consists of using a rapid-prototyping board, is currently well established, the achieved results are a further demonstration of its validity also in the context of biomedical electronics and wearable devices. By comparing our achievements to the state of the art, we can conclude that we have obtained a performance that is comparable to the state of the art, and the key advantages of the technical solution proposed here include low cost and simplicity, which have been obtained without sacrificing accuracy. The features of the wearable embedded system suggest that it could be applied in the context of the prevention of risks associated with sedentary work.
Author Contributions: M.A., F.M. and M.V. implemented the prototype and carried out the experimental activity, while also writing reports on it. F.D. conceived the system, coordinated research activity, and wrote, reviewed, and edited the manuscript. All authors have read and agreed to the published version of the manuscript.