Monitor your sleep: breath, apneas, movments, and snoring detection - with alerts by vibrations

Hi,
I implemented a ‘Sleep Monitoring’ device based on the great Seeed nRF52840 Sense board and the code is developed in the Arduino environment / IDE. It measures breathing rate, sleep positions, movements, suspected sleep apnea events by measuring low‑frequency micro‑movements of the human body.
It also measures audio noises to detect snoring.
Alerts can be triggered in case of position on the back that favors apneas and snoring.
Snoring volume can also trigger vibration alerts.

The project is designed mostly for experimentation, and my wife is the real life and happy tester, as she suffers apneas, only when she sleeps on the back. Some vibrations when she is ont eh back and… she moves to the side :partying_face:
The software is Arduino based, in C. The user interface generating graphics is written in Python.
Its available on Github, with some level of documentation: GitHub - midibody/Sleep_monitor: Sleep-monitoring wearable for breathing, apnea, and snoring detection with vibration alerts

It works quite well, but I would be happy to get some advices regarding the power consumption: I use the IMU and even when switching to system off (NRF_POWER->SYSTEMOFF = 1), it still burns aound 570uA. If I remove the calls to UMI functions, it falls to mostly 0uA. So, the LSM6DS3.h library included in the Arduino nRF52 package seems to force something up (I dont use the BLE firmware as I dont use Blutooth).
Any idea , code in this environment is welcome :slight_smile:

HI there,

and welcome here…

So , You will want to check out @msfujino Posts he has some very excellent examples and code for BLE and Sleep Apnea. The Radar sensors are also very effective and getting better with each new revision.

The Tiny Size of Xiao and the Sensors makes it very suitable for these kinds of products.

HTH
GL :slight_smile: PJ :v:

Hi troubadour06,

I’ve also built a similar device for experimentation. It uses the MAX30102 to measure heart rate and oxygen saturation. Later, I modified it to directly measure respiration using a BME280 pressure sensor, but it hasn’t been fully debugged yet.

I’ll look into your link as well.

EDIT: I wired a push button to D0 and an LED to D1 instead of a motor, then uploaded the sketch.
I wish there was a “quick start guide” that lets I try things out without reading all the documentation.

Thanks a lot for your feedback, I added a ‘quick start doc’ here: Sleep_monitor/quickStart.md at main · midibody/Sleep_monitor · GitHub

Thanks a lot for your feedback, I added a ‘quick start doc’ here: Sleep_monitor/quickStart.md at main · midibody/Sleep_monitor · GitHub