Inspiration
Many people are affected by neurological diseases, including one of our hacker's own aunt. Through conditions like Parkinson's disease, many people are afflicted with hand tremors that slowly progress over time. We wanted a product that could should act as a monitoring aid clinicians and patients to track when tremors started occurring, their severity, and their frequency.
What it does
An ESP32 DevKit reads an LSM6DS3 (IMU) over I2C at (104\,\mathrm{Hz}). About every (2.5\,\mathrm{s}) the band turns the raw acceleration and gyro into a data to be displayed on a personalized dashboard. The window included peak frequency, power, RMS, amplitude, and a few shape features. A small on-device classifier labels the window still, voluntary movement, or tremor, and sends the label with the features.
The laptop takes those windows over USB into a FastAPI service backed by SQLite. A React dashboard shows the live frequency, current prediction of movement, and frequency graph.
How we built it
In our GitHub Repo, we have 3 sections. Our Firmware is C++ in PlatformIO (Arduino framework, esp32dev), made through from VS Code. The API is Python 3.11 with FastAPI, Uvicorn, SQLModel, and a pyserial bridge. The dashboard is Vite, React, and TypeScript. The classifier was trained on synthetic windows only, then run on the chip to classify the new windows coming in.
Challenges we ran into
The first pin map we created was wrong, as we needed to connect more of the IMU pins to power and ground than we had originally planned.
Additionally, Windows did not recognize the ESP32 board when we plugged it initally. The problem was the computer did not have the correct drivers to properly read the data. We solved it by going into device manager and loading a completely new driver into the unrecognized part. Then the COM3 appeared and we could finally upload the firmware.
What we learned
Something we learned was how to manage device through windows and analyze the device drivers. We learned how to connect and IMU to our computer through an ESP32 board, and display that data using a backend.
What's next for TremorBand
The next step for TremorBand is size. Our minimal viable product, while able to classify the data, is too bulky for the intended purpose. We want to design a PCB that would dramatically reduce the size of the total product, allowing us to place it comfortably on the wrist. We also want to get rid of the computer connection, and have the setup transmit through wifi on battery power.
Built With
- c++
- esp32
- fastapi
- imu
- platformio
- pyserial
- react
- sqlite
- sqlmodel
- typescript
- uvicorn
- vite