Posture Analysis

Building a wearable sensor

Roles

Wearable Technology, Hardware, Interface Design

Timeline

2 months

Description

Technical Report

Objective

We wanted to build a non-intrusive wearable device that one could simply attach to their clothing and gain accurate insights about their posture throughout the day. The device should be able to provide feedback to the user to correct his or her posture whenever identified as improper. For this, the device must be able to correctly identify and classify the spinal curvature. It should also be able to communicate with the user in some way.

Motivation

The increase in improper posture including lower back pain (LBP) and neck and shoulder pain (NSP) has been related to increased desk-based activities such as using computers. As of April 2019, 4.4 billion people were active internet users. The reason for the development of improper posture can be accounted to the fact that repeating one activity throughout the day without reprieve can lead to the body orienting and adjusting itself to perform that action more efficiently.

Applications

Posture analysis finds important applications in bio-medical studies, healthcare and workplaces. There are several advantages of maintaining a healthy posture. The proper alignment of spinal curves leads to even distribution of weight along with balance amongst different parts of the body like the spine, shoulders, knees, hips etc. This helps define a good posture which is important for daily activities involving sitting, standing, and lying down. Having proper posture keeps bones and joints in correct alignment alleviating strain on the spine and decreasing the abnormal wearing of joint surfaces that could result in degenerative arthritis and joint pain. It also reduces muscle and ligament stress along joints, minimizing the likelihood of injury and preventing muscle fatigue.

Hardware and Communication

Diagram

Circuit

Prototype

Prototype

To estimate the complete posture accurately, we needed sensors to estimate the three curves of the spine — namely cervical, thoracic, and lumbar. Having accelerometers at the three locations allowed us to understand their inclination with reference to the ground, enabling us to reconstruct the spinal curve. Each accelerometer gave us data about acceleration in triaxial dimensions that was processed to identify its roll and pitch (which are essentially the rotations of the accelerometer along the x-axis and y-axis in 3D space respectively).

We used three ADXL345 accelerometers that were placed at a fixed distance of 15cm from each other.

We wanted the information to be transmitted over the internet for several reasons.

To implement the input of sensor data, processing, and transmission over wifi, we chose a wifi module + microprocessor. We used the NodeMCU ESP8266 to act as a central chip that inputs data from the three sensors, processes the values to obtain its inclination in degrees, and uses wifi to transmit to the database.

Firebase

We used Google's Firebase as our real-time database because of its web socket implementation. This helped us make a dynamic interface where change in data at our database by the wifi module reflected instaneously on the devices accessing the database.

Spine Curvatures

Classifying Posture

Neural Network

The device can classify if a posture is good, average, or bad based on the estimated reconstruction of posture. This is done by training a model on a manually labelled dataset of 450 data points (150 data points for each class). The dataset consists of three features that are the inclination values of three accelerometers. We trained a neural network on this dataset and found an accuracy of 95.54% on our test data.

Interface

Interface

Our interface consists of a graphical display with a representation of the estimated spinal curve from the three sensors. The display also shows if the posture is classified as good, average, or bad. In addition, a timer shows how long the user has been wearing the device and a visual demonstrating how often the user was in a good posture or a bad posture during that time.

A simulator to test with

Since the wearable technology is not accessible to everyone for a demonstration, we made this simulation where a user can control the inclination of the sensors and view how the posture estimate changes.

To view the simulation, you can open the simulation interface that displays the estimated posture representation. Then, open the update page on a new device or tab to change the accelerometer rotations. You can then observe how the interface graph changes real-time as you update the values.

You may note while using the simulation that changing the middle accelerometer linearly changes the values in the top and bottom accelerometers. This is because the middle accelerometer acts as a reference node to understand how the back is aligned with the ground i.e. if the user is standing, lying down, or bending. The difference between the top and middle accelerometers estimates the upper curvature of the spine and the bottom and middle accelerometers inform us about the lower curvature.