Inspired by the terrors of final exams plaguing us even within our dreams, our team decided to make a sleep tracking app that uses hardware to detect and prevent nightmares by gently rousing the user. Our team decided on this path after finding research correlating nightmares to worse sleep quality and shorter life span. With this research in mind, we planned to make an app to intelligently detect nightmares early-on through ECG and EMG signals, which would then trigger a wearable device to vibrate and rouse the user from their nightmares.

After some research into the methodology, viability, and accuracy of existing techniques, we decided on using the BioAmp EXG Pill with ECG sensors. We then decided to connect our devices over Bluetooth, allowing us to transmit the data collected to a back-end, as well as send command signals to the Arduino and vibration motor. We had very limited hardware experience, so it was challenging to figure out ECG electrode placements, as well as serial port management for Bluetooth transmission. After the data collection worked, we made a back-end in Flask with Python, connected to a Postgres database.

While some of us worked on the hardware, others turned their attention to the machine learning model for sleep score and nightmare detection, as well as the front-end. Given our market research, we had decided to use Swift to target iPhone users, but this ended up proving challenging due to the limitations of XCode, particularly its availability only to iOS/MacOS users.

Built With

Share this project:

Updates