Lilly’s Status Report for 3/8/2025

Items done:

  1. Wrote/tested initial angle calculation + user calibration code for the ESP32. Changes in angles reported are broadly correct but a lot of refinement is needed to make this usable.
  2. Finished the design report, which ate up most of the week before break.

 

Unfortunately my progress is a bit behind schedule, as I had aimed to have written and tested a basic BLE script for sending data between the ESP32 and RPi by now, and have a more stable version of the angle calculation code as well. I think the angle calculation code shouldn’t take too long since I know what I want to implement to fix the drifting values, so I will likely have enough time this week to figure out the RPi communications after coming back from break and getting a midterm over with. I had also wanted to put in an order for the non-electronic hat parts before the break, but this will be done on Monday now. We may also use a random hat we have, and fabric from Techspark to prototype for now if these parts do not arrive soon.

 

Deliverables for next week!

  1. Add complementary filtering to the angle calculation algorithm, and try offsetting drift values in the code. Also see how much the data improves from averaging over two sensors to decide if this is worth doing.
  2. Write BLE script for the communication to the RPi and set up calibration flow in the code (need to work with Cora for UI parts).
  3. Order a hat and mesh fabric for the wearable parts.

Lilly’s Status Report for 2/22/2025

Items completed this week:

  1. Tested the ESP32 microcontroller to make sure it worked alright (could be flashed with an example program, didn’t overheat). Researched different development environments (PlatformIO, Arduino) but ultimately decided to stick with the Arduino IDE for simplicity and ease of connecting to our specific microcontroller. I initially had concerns about the compiled code size using the Arduino IDE vs. other platforms but there should be more than enough memory on the board to handle this!
  2. Presented our design review to the class.
  3. Soldered pin headers to the ESP32 and the LSM9DS1 sensors so I can start breadboard prototyping and setting up I2C communications between them.
  4. Researched how to set up the BLE connection from the ESP32.

The I2C setup will hopefully be done tomorrow (on Sunday)! Along with connectivity checks for my soldering… Otherwise I’m pretty on-schedule, especially since I have all the necessary parts now.

 

Deliverables for next week:

  1. Finish up the design report.
  2. Test sending data over BLE between RPi and ESP32.
  3. Code up initial filtering/data processing algorithms for the gyro sensor data.
  4. Design mounting system for hat.

Lilly’s Status Report for 2/15/2025

This week, I completed the following items:

1. Researched, finalized, and ordered materials for the neck angle-calculation module. These included the gyroscope/accelerometer module, an ESP32-C6, and a battery to power these components. I also researched the communication protocols that I will need to configure and use to send data from the sensor to the ESP32 (I2C), and from the ESP32 to the main microcontroller (BLE).

2. Researched objective measures for determining poor neck posture. I hope to implement an approximation of craniovertebral angle, which is actually used for diagnosing forward head posture, but this will require good positional calculations from the accelerometer, which may not be feasible. To achieve this, I researched methods of improving calculation accuracy for angle/position, including Kalman filtering. An alternative threshold for neck strain is simply a 15 degree downward rotation of the neck.

3. Updated the design of the neck module to use a cap/visor instead of a neckband to improve wearability, comfort, and ease of component layout.

 

4. Tested and did initial calibrations on the OpenCV Python script that we will be adopting for the blink detection part of this project. From this testing, I confirmed that rudimentary blink detection worked, and identified areas that we will need to improve upon and modify to meet our use-case requirements. These included support for single-eye blink detection, ensuring that our rate-calculations do not factor in time where neither eye is in view of the camera, improving functionality in dimmer lighting, and improving landmark detection for glasses-wearers. However, as difficulties with running a Python script from the browser extension arose, Cora will be working on converting the script to JavaScript using OpenCV.js.

5. Prepared slides and presentation for the upcoming design review. 

A couple of my deliverables from last week were not completed unfortunately (figuring out the Bluetooth implementation between ESP32/RPI, and drafting code for gyroscope calculations), as I spent much more time than expected on researching and selecting a microcontroller, and working on the design review presentation. However, these two items would be more effectively completed with the parts in hand, so this isn’t super detrimental to our schedule.

 

Deliverables for next week:

  • Present design review and write design report.
  • Set up the development environment for flashing the ESP32.
  • Research how to implement bluetooth communication between ESP32 and RPi. If ESP32 arrives on Mon/Wed, work on actually setting up this connection too.
  • If sensors arrive as well, start setting up the I2C interfaces and test sensor reliability.

Lilly’s Status Report for 2/8/2025

This week I focused on researching components for the neck angle measuring system, mainly the gyroscopes.

While we were initially talking about using a gyroscope for tracking neck angle, I also researched inclinometers as another option since they can be used for angle measurement too, especially in steadier conditions. It seems that inclinometers on the market are mainly intended for industrial applications and are too clunky (I’m looking for something relatively flat to avoid disturbing the user) and expensive relative to our budget. So, for something wearable I continued to focus on gyroscope sensors.

As I researched, I looked into the potential of biaxial angle tracking, as forward neck posture is not the only way a user can experience neck strain after extended work periods. Most gyros have this capability anyway. I focused on options that allowed for angle tracking along at least 2 axes (sagittal and coronal) and researched the circuitry each sensor would need to work, with the aim of selecting a sensor with minimal circuitry and accuracy within our requirements, ideally much tighter as our initial goal of +/- 5 degree measurement accuracy is quite wide. Drift in the gyros also came up as a problem, which could be mitigated by doubling up the sensors – and would allow the band to be more symmetric in terms of weight on the user. I also researched/tested the range of angular velocities that our sensor would need to handle – a maximum speed of 200 deg/sec is what I looked for. Further, while an analog gyroscope would be nice so we can control the sampling rate/resolution better, I found that digital gyroscopes will be easier to find and use. A potential option is the L3GD20 gyro, which is small, has low input voltage requirements and a good-enough range.

I am on schedule for now. Further research on wearable batteries and gyroscope part selections will be completed tomorrow before our team meeting on Monday.

Deliverables for the next week:

  • Make purchases for neckband components after cross-checking with the team (Monday).
  • Research wireless connection between ESP32 + RPI.
  • Finalize design for how the neckband will be worn by the user.
  • Start drafting code for angle calculation with gyroscope data for the ESP32.