Hardware & Communication
Circuit Diagram & 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:
- The device would not be limited by distance such as bluetooth range
- It would be easier for multiple devices to access the data
- Access of the user's real-time data could be easily shared say with the user's doctor
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.
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.
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.
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.