Category Archives: The War On Sleep

The Caffeine Alarm Clock

A friend asked me on IRC for tips on waking up early, and it reminded me that there’s a thing I do that works really well and isn’t common knowledge. I can’t actually currently do it because of my current draconian restrictions on caffeine (Hi, I’m David and I am a caffeine addict. It has been 25 days since my last fix), but that’s no reason to stop you.

The trick is this: Before you go to bed, put a large glass of water and a 200mg caffeine pill  (depending on your caffeine tolerance you may wish to reduce this – it’s the equivalent of a very large coffee but isn’t an unreasonable daily intake of caffeine) next to your bed. Set your alarm for about half an hour before you want to actually get up. When your alarm goes off, take the caffeine pill and drink the glass of water.

You are now permitted to roll over and go back to sleep if you want. You are under no obligation to get out of bed.

But you almost certainly will quite soon. Within about half an hour you will be buzzing and probably need to go to the bathroom, so you won’t want to stay in bed, and you will get up at the intended time.

People look at me funny when I tell them I do this, but I think that’s just because it makes the caffeine habit a bit too transparent. People will judge you for a caffeine intake that is strictly smaller than theirs if you take it in pill form and they take it as beverages.

I am not naturally a morning person, and this won’t turn me or you into one, but as a way of getting out of bed when your first inclination on waking is that you really don’t want to, it’s incredibly effective and as long as you don’t mind the caffeine dependence I can strongly recommend it.

This entry was posted in life, The War On Sleep on by .

Better Sleep Data through pulse oximetry

I wrote a while back that I was looking for recommendations on getting better sleep data. It turns out that there’s an easy and affordable solution for doing this that is directly designed for this problem.

The required device is a pulse oximeter. It measures both heart rate and blood oxygen content, and is used for diagnosing Sleep Apnea. I bought this one off ebay (it’s a v3.5 Contec CMS50F) for really very little money. It’s easy to wear while sleeping, as it’s reasonably comfortable and stays on just fine even if you move about.

There is then good open source software called Sleepyhead which is designed for CPAP machines but also handles Pulse Oximeter data (there is also proprietary software for Windows which I haven’t tried yet because it comes on a CD and I got Sleepyhead working before my Amazon Primed external CD drive arrived).

I’ve not been super happy with Sleepyhead, but that’s more because my use case is not what it’s designed for: I don’t have a CPAP machine (yet?) and would quite like access to the raw oximetry data, which the export doesn’t provide. I’m going to stick with it for now, but I’ll also try the proprietary software at some point, and may try writing a Python script for doing data export from the oximeter, as its protocol doesn’t appear to be very hard.

I’ve only been using it for two nights, so too early to say if this data is going to prove useful or not, but the data does seem suggestive that something is going on. I may/probably will post further updates.

This entry was posted in The War On Sleep on by .

Seeking recommendations for better sleep data

OK. Lets start with the problem.

The ultimate problem is that I often/usually wake up feeling like shit. I am in the process of attempting to determine whether this is caffeine related by removing caffeine from my life, but I would describe myself as something like 80% confident that it is not. I don’t believe I have sleep apnea, but checking that is also something I will be trying to do at some point.

I have been using a Jawbone UP for sleep tracking. I am considering replacing it with a Ouija board in order to get more useful and relevant information. It appears to be categorically unable to detect whether I am actually asleep, let alone what sort of sleep I am currently experiencing (though I have been getting some benefit out of the sleep tracking functionality).

However, it has highlighted one interesting thing: I noticed this morning that my heart rate spiked to > 100bpm twice last night. My “normal” heart rate is somwhere in the region of 55bpm, so that’s quite a spike.

And I think I’ve seen that before, just based on the shape of the graph, though it’s not consciously registered.

So why don’t I look at the data?

Well, I’d love to! Except Jawbone throw away all the detailed heart rate data that’s more than 24 hours old, and don’t let you access the detailed data even from the last 24 hours. I’d be fine with scripting a data export and just dumping it somewhere, but it’s completely impossible in a classic internet of things “You thought that just because you own the device you can actually make use of its functionality? Sucker” backstab.

So that’s the proximate problem: I would like to answer the question “Does my heart rate routinely spike during the night and is that indicative of something?”

The obvious way of answering this is using some sort of continuous recording of heart rate data which has the controversial and exciting feature of my actually being able to access the data.

I only really need this while I am asleep, but it would be nice to have it while I’m out and about too.

So, here is approximately what I am looking for:

  1. A wearable heart rate monitor with accurate data. I am perfectly happy for this to be a chest strap based one rather than a watch.
  2. Which I can get a complete data export from. Ideally I would be able to do this for historic data without needing a nearby bluetooth capable device to send the data to live.
  3. That isn’t ruinously expensive (definitely not > £100. Ideally more in the £50 region).

I currently have three contenders:

  1. A fitbit. They provide full historical heart rate data and an API you can get it from. I am mostly not just going straight for this one because I’ve heard fairly bad things about the accuracy of the fitbit’s heart rate monitoring.
  2. A Zephyr. People seem to mostly be recomming the ruinously expensive Bioharness, but they also have the merely slightly pricey HxM. I do not believe I can get historic data out of them only live. These are mostly recommended because they are accurate and have a good bluetooth API.
  3. Get a cheap chest strap monitor that speaks the standard heart rate service bluetooth specification (there are some really cheap ones), and try out the various android apps that speak it, then later if that works well, write a small Python script to just dump it to a database and run it on a raspberry pi or something next to my bed.

I’m currently most tempted to try the third option first despite it being the “worst” in many regards (requiring the most manual effort on my part). Heart rate service is pretty standard, as far as I can tell, so I can experiment with a heart rate monitor that costs ~£15 and upgrade if the data looks promising (e.g. the Polar heart rate monitors are supposedly quite good and speak heart rate service).

I am however not very satisfied by any of these options, and am open to general advice, recommendations, etc on any of the above, on any point from the proximate to the ultimate problem. So please share. Comments are open on this post, and you’re also welcome to tweet or email me.

This entry was posted in The War On Sleep on by .