Hacker News new | past | comments | ask | show | jobs | submit login

Anecdata: Have sleep apnea, so am interested in better sleep, and I'm hooked up to a CPAP machine which registers every breath I take. I've tried several devices (withings, 2 garmin smart watches and a fitbit), and quite frankly, the results have been appalling.

Some random observations:

* My latest garmin has an "SpO2" sensor. Which is basically a random number generator with red LED. When I compare the results with an actual on-finger SpO2 monitor, there is zero correlation.

* Both the fitbit and the garmins have mistaken masturbation for deep sleep. You would think that the wrist movement would be a clue to not being asleep, but no. Deep sleep.

* The deep sleep vs REM classification seems to be based more on time-of-day than on anything else. Apparently I always start my nights with a block of deep sleep, followed by an alternating pattern of light & REM. This is true even when I'm awake during this "deep sleep" malarky.

* My CPAP, on the other hand, is very useful for telling apart sleep & waking. Breathing rate becomes much more steady when asleep. I can see when I woke up, even if it's just for a few seconds while I change position.

I had an AHI of 150 and my CPAP has absolutely saved my life and massively improved my quality of life. The data it provides is also so empowering. I've been doing long term studies on pillow types for me.

As I understand it, Fitbit doesn't provide a detailed breakdown of your sleep unless it registers "more than 3 hours of sleep". Do you regularly idle in bed or otherwise for 3+ hours? While I take their stats with a hefty dosage of salt, I've not encountered the situations you have. I'm a fairly sedentary person and I don't think I can idle for more than 30-45 minutes.

Have you tried Sleepyhead to analyze your CPAP reports?

The developer stopped actively maintaining it, but the software still works great.


OSCAR is the new sleepyhead. You can grab the source here: https://gitlab.com/pholy/OSCAR-code

Looks like it's currently getting some TLC under the hood. Hopefully it'll continue to be maintained.

How are you getting that much data off a cpap? Mine will give me basic states (on time, # apnea events) but not much else.

There are online communities dedicated to these questions. Looks like the current tool of choice is OSCR https://gitlab.com/pholy/OSCAR-code

Many CPAP devices have have an SD card which is used to record all that data. You can use OSCAR to read/analyse it. Not all devices are supported, and it can be a bit tricky to interpret the data at first. Lanky Lefty has some pretty useful videos on the subject, like this one: https://youtube.com/watch?v=5jCNeivvrjU

This reminds me, I was suprised to learn that ECGs can measure breathing (well, not the least expensive ones but most). If breathing is enough then an ECG might be one of the better ways for anyone who doesn't need CPAP and there are some available with local analysis software. They do require a prescripition in many places.

The way I understand it, breathing has an impact on heart rate variability, mostly because the chest cavity expands/contracts, which impacts the vagus nerve, which can then cause the HR to vary a bit. I don't know how reliable it is and if you can reconstruct every breath based on that data. I imagine shallower breaths would have less of an impact.

Perhaps someone more knowlegeable can pitch in?

Breathing in causes systolic pressure to drop slightly. The negative pressure in the chest cavity decreases the amount of blood that fills the heart prior to contracting ("preload"). The drop is small (<10mmHg), and generally your heart rate doesn't bother compensating for it to any significant extent. In theory you can detect breaths by looking at the R-R interval (the time between the beats), but it's a very subtle signal and in my experience it's useless in any real world setting.

More advanced ECGs can measure the impedance of the chest (which changes as you breath). This is more complicated to implement, but much more reliable.

In either case, it's not something you'd be able to measure without several stickers on your chest, with wires running to some central box. I think the CPAP would be less obtrusive. If you don't need a full fledged CPAP, you could use something like nasal capnography, that just measures exhaled CO2.

Hmm. My Fitbit (Alta HR) considers masturbation exercise.

Though, it has recorded that I was in deep sleep while I was awake.

Guidelines | FAQ | Support | API | Security | Lists | Bookmarklet | Legal | Apply to YC | Contact