Pumping iron to keep the headache at bay

Back in October 2017 I ran an experiment where I determined that not staying hydrated throughout the day aggravated my headache.  This past month, I tested another couple of variables.  Just as before, for the several days leading up to the beginning of Week 1, I stopped taking all Excedrin, and didn’t take it at all during the experiment so it wouldn’t interfere with my results.

Week 1 – Establishing Baseline
I tracked my headache for this first week, striving for a pain reading every 15 minutes.  My scale runs from 0-10, where 0 is no headache at all, and 10 is "curled up in a ball, whimpering".

Week 2 – Windows Nightlight Mode
For the second week, I switched Windows Nightlight Mode on, to cut down on the amount of blue light I was seeing on my monitors during the evenings.  I configured it to be enabled on my laptop and my phone from 7:30 until midnight.  Since I am very frequently on my computer until just before I go to bed, I was curious to see if the blue light from my screens was contributing to my headache at all.

As it turns out, I felt no perceivable difference in my headache pain with Nightlight on or off.

10

After Week 2, I turned this mode off.

Week 3 – Iron Supplements
A friend of mine mentioned that an iron deficiency can contribute/cause headaches.  I did a bit of research into that angle, and sure enough, there are ample references to the link between these two (for example, see this article or this article).  So, for Week 3, I started taking a daily iron supplement.

The results here were much more interesting. 

20

On average, I saw a 0.4 drop in my headache rating when I was on the iron supplement (compared to Week 1’s baseline).

Week 4 – Blood pressure
On more than one occasion, I’ve noticed that bending over to tie my shoes, or doing something very strenuous aggravates my headache.  I began to wonder if there was a correlation between my blood pressure and my headaches.  I had an automatic home blood pressure monitor, so during Week 4 I intended to record my blood pressure alongside my headaches, and see if there was a relationship.

Unfortunately, I stopped this part of the way through the week, for two reasons.  First, I was getting consistently higher readings for my blood pressure than any of the times I’ve had it measured by a professional.  I wondered if a) I was either not placing the cuff on my arm correctly (too high/too low on the arm, too tight around it, etc.), or b) the machine needed to be recalibrated.

Second, and more seriously, I didn’t want to take readings every 15 minutes because it would have driven my co-workers nuts.  So, I tried taking a couple of readings in the mornings before I went to work and a couple in the evenings after I got home.  I was initially concerned that only getting 3-4 readings a day wouldn’t be enough to really determined correlation.  That thought continued to nag me until I decided to stop the experiment.  Perhaps I’ll revisit this later.

Summary
So, to date, I’ve found that the following aggravate my headaches:

  • Not staying sufficiently hydrated throughout the day
  • Too much sodium
  • Not enough iron in my diet

That’s progress.

Advertisement

My headaches are now driving me to drink

For the first three weeks in October, I conducted an experiment – on myself.  I’ve suspected for a while that at least a contributing factor for my daily headaches was not drinking enough throughout the day.  There had been days where I got so busy at work that I went the entire workday drinking only 8oz.  By the time I got home on those days, my headache was raging.

My original experiment was to start on October 2, and look something like this:

  • Week 1: Establish baseline for liquid consumption and record headache-pain
  • Week 2: Increase liquid consumption by 50% of baseline
  • Week 3: Increase liquid consumption by 100% of baseline

For several days leading up to the start of Week 1, I took no Excedrin.  I wanted to get that completely out of my system, so it wouldn’t interfere.  I also vowed to not take it during the three weeks, for the same reason (as I’ll discuss towards the end, I broke that rule once).

I decided to follow my previous self-survey template, and recorded these two data points every 15 minutes (or as close to it as I could manage).  I thought about reworking iSelfSurvey to record just these two points, but that would require a fair amount of work (for starters, I would have to get Android Studio reloaded on my computer), and I just didn’t have the time at the end of September to do that.  So, I went went low-tech.  I created 21 custom PocketMods to record the time, my headache pain rating, and the amount of liquid (in ounces) I had consumed since the last reading:

10

Each evening, I would transfer the data to a spreadsheet so I could run the analysis.  I think the results were pretty clear:

20

The days I averaged only 56oz, my average daily headache was 5.7.  When I increased that amount to 50% more (which worked out to about 84oz of liquid per day), my average daily pain level dropped more than a full point to 4.5.  In fact, the effect was so pronounced that I modified Week 3 to merely be a duplicate of Week 2 (mostly to demonstrate Week 2 hadn’t been a fluke).

This is a breakthrough. 

I don’t normally notice myself getting thirsty during the day, but apparently I was – and have been for years.  In fact, for the first few days of Week 2, I learned to start drinking immediately after taking a reading, just so I would remember to drink more!

Since the end of Week 3, I’ve kept up my regimen of drinking 84+ ounces a day, and my headache has pretty consistently stayed lower.  I’m chalking that up as a win.

***

I mentioned at the beginning that I vowed I wouldn’t take Excedrin during this experiment, because I didn’t want it tainting the numbers.  At the end of Week 2, I woke up Sunday morning with an extremely nasty headache.  The baseline pain was a 6 (out of 10), but then periodically I would get a sharp stabbing pain behind my right ear, pushing my the pain up to an 8 or a 9.  I had been doing great all week – what happened?  The day before I had consumed over 100oz of liquid, so it’s not like I fell back into old habits on that front.

Oh – the chicken.  We had take out fried chicken the night before for dinner – something that I know is crazy high in sodium: 2 chicken strips, a regular side of potato wedges and a biscuit come to 2,470mg of sodium – more in one meal than I’m supposed to be getting in the entire day.  CJ has reported getting headaches pretty consistently after eating that meal in the past (especially if we had the leftovers the second night).  Perhaps sodium – or more correctly, too much sodium – is another trigger?  I’ve never tracked how much sodium I consume in a given day.  I wonder what would happen if I decreased that?

And THAT will become my next experiment.  Stay tuned.

Building Tools

For the better part of a year, I’ve been trying to build a system to capture and analyze data points – on me.  This is part of a long-shot plan to find out what might be contributing to my headaches.  I’m pleased to say that since July of 2015, I’ve been successfully capturing over a dozen data points on myself, multiple times a day.

I started out with the easiest thing that could work: an alarm clock telling me to take a survey every 15 minutes, and a Windows desktop app called iSelfSurvey that saved its data to a text file.

10

Then, in mid-January, I launched an Android version of iSelfSurvey that allows me to capture data outside of the 7:30-5 that I’m at my computer at work.

20

 

30

Late last year, I also built a companion application called iSelfAnalysis that allows me to upload those data files, and then run a number of functions on the data, looking for patterns.

40

For example: is there any correlation of the severity of my headaches to the number of hours of sleep that I got the night before?  Is there any correlation to the amount of liquid I’ve been drinking?  How about if my blood sugar takes a dive 4 hours ago – does that affect my headaches now?  I’ve only begun to scratch the surface of the kinds of questions I can ask – and now answer.  I now have the tools in place to run experiments on myself – experiments where I adjust one data point and observe how my headaches react.

Is this system over the top?  Have I spent too much time sharpening my axe?  No.  Asking anyone to answer a dozen questions every 15 minutes is moderately intrusive at best.  Trying to analyze the data by hand would get old after about a day.  This system takes as much of the pain out of this process as I can manage, and makes it far more likely that I’ll continue day after day after day.

I have 127 days’ worth of data collected so far – thousands of data points.  I don’t expect to find any smoking guns, but if I can find ways to minimize my headaches, I’ll consider that a win.

Getting Traction

In July, I showed the nearly feature-complete version of a project I’ve been tentatively called "iSelf".  In August I managed to get all of the components you saw on the breadboard stuffed into a wearable case:

10

In the last full week of August, I took iSelf out for the first official test drive – wearing it on my belt while I was at work, and then downloaded the data in the evenings.  About halfway through that week, though, I found that the download application I wrote wasn’t always able to finish correctly.  In fact, there were times it wouldn’t even start downloading correctly.  On those nights, I opened the case, popped the micro SD card out, and manually pulled the data off.

What I thought was a minor glitch turned into three solid weeks of troubleshooting, debugging, and refinement of both iSelf’s onboard program as well as the app I wrote to download the data.  I finally got everything working this past Wednesday, so on Thursday the 17th I again wore it to work.

Everything was proceeding normally until it stopped recording about mid-day.  I tried rebooting it several times, again thinking it was just a glitch.  Nothing worked.

Between Thursday night and last night, I wrote a suite of diagnostic programs, testing each component until I found the problem.  As it turns out, I had two.  The micro SD card logger, OpenLog, stopped responding correctly to the initialization routine I wrote.  I found through trial and error that it would still accept data in "write" mode, and would accept commands in "command" mode, so I modified the initialization routine to work around this issue.

Then I tested the BMP085 temperature/pressure sensor.  I found it wasn’t sending any data any more, even after a reset.

With all of the components soldered onto the motherboard now, it was going to be extremely difficult to replace those components.  Starting over from scratch would mean buying replacements for the Arduino Micro, the PowerBoost, the OpenLog, and a temperature/pressure sensor.  It would mean at least another 10 hours of work to cut out new pieces of protoboard, and solder everything together again.

I left things last night depressed and a little angry.  I had just gotten it working, after weeks of solving problem after problem, and had collected four hours of real data – only to have it fail.  This project was 9 months of work – after my day job is done, after the house chores are done, after my kids are in bed.  

9 months – lost.

***

Well – perhaps not completely lost. 

I’m reminded of the story of a Foursquare-like check-in startup called "Burbn".  In 2010, the founders got together to talk about its future.  Burbn was having problems getting traction – problems of the sort that would shutter them permanently if they didn’t do something.  They took a hard look at what they had built so far, and found that one particular piece of their service was actually being well-received.  They decided to focus on that one piece and let the rest die.  Years later, their photo-sharing application – called Instagram – was sold to Mark Zuckerberg for $1 billion.

One of the components I built for iSelf was a twice-an-hour survey that I give myself.  This survey collects a number of data points about my mental or physiological state, or other topics that would be difficult to collect any other way:

20

This application has consistently worked well, and as a result I now have nearly 2 full months of data from it.  I’m still collecting 11 different data points from it every day.  Hmm…

After 8 hours of relatively good sleep last night, I remembered what my focus in this project really was: finding things that contribute to my headaches.  The focus was not "to build a wearable".  The analogy between Burbn and iSelf is clear – focus on what I’m getting traction with.  (And if the analogy extends to me selling this down the road for a billion dollars – hey, all the better.)

My next task, then, is to get the raw data I’ve been collecting from the survey into a system where I can start formulating questions.  Stay tuned.

iSelf 0.2

Over a week ago, I unveiled a project I’ve been working on tentatively called “iSelf”.  Since then, I’ve finished the rough versions of the software components (both the program that runs on the Arduino Micro, as well as the custom downloader for the device) , and and greatly refactored both. 

Late last week, I took delivery of the newest hardware components – a lithium ion polymer, or LiPo battery, and a PowerBoost 500c from Adafruit.  This morning, I hooked them both up to the iSelf prototype, and removed the set of AA batteries that I had been powering it with up to this point:

20

The “c” in the 500c stands for “charger”.  I can have a battery plugged in to power the device(battery shown at the top, center of the picture below) .

10

I can also plug in a microUSB charging cable (the black cable going off to the right of this picture), and simultaneously power the device and recharge the battery.

I have a couple of additional hardware components to work in (a power switch, and a couple of external LEDs), and probably a few additions to the software, but iSelf is nearly feature complete.  The next major tasks will be soldering the components down onto a single board, and then getting a case for it.

What a Headache

For the last several months, I’ve been working on a new project that I’m tentatively calling "iSelf".  Here is the official version 0.1.0:

10

I’m building my own, custom wearable.  And before you ask, the answer is "no", the title of this blog does not refer to the spaghetti of breadboarding wires you see before you.  The title actually refers to what I hope iSelf will help me with.  Allow me to set this story up.

For more than a decade, I’ve had daily headaches.  I first noticed them as such in 2003.  At that point, I would feel the headache coming on mid- to late afternoon.  I would take two Excedrin with dinner, and by 8pm or so the headache would be gone.  About 2011 or 2012, I started noticing that the headaches were getting longer.  I’d feel them start earlier in the day, and it would be later into the evening before the Excedrin would kick in.

Then during the summer of 2013, I realized that I was waking up with a headache, and Excedrin was no longer knocking them out.  In other words, I’ve had a headache all day, every day, for the last two years.

In late 2013, and then much of 2014, I got even more serious about trying to determine what was causing them.  I spoke with my general doctor about it.  He had me try a couple of different medications.  When those didn’t work, he referred me to a neurologist, who tried a few different medications, which didn’t work.  He also had my head examined – both an MRI (which you can read about here).  Thankfully, nothing abnormal turned up.  They found a brain, and it showed no signs of bleeding or tumors.  Check and check.

I also went to see an ear, nose, and throat doctor.  Even after a CT scan, two home sleep studies, and a third sleep study in an overnight lab, he wasn’t able to find anything wrong with me either.

Whenever I went in for an exam or a follow-up, the doctors would usually ask me "on a scale from 1-10, how is your headache today?" and I would respond with some number.  But that question was asked once every two weeks, at most.  I don’t have the same headache every day – there are some days it is easier to move it to the background than others.  But why?  What is influencing the "badness level"?  If I can’t find a solution to the headaches and make them go away completely, could I find out if there is some external influence affecting their quality?  To answer that, I needed data – lots and lots of data.

So, in late 2014 I started sketching out what kind of data would I want to collect, and how could I analyze it.  I decided that taking readings every 30 minutes of the headache "badness level" was probably a good place to start, but I also wanted to capture things like what temperature and barometric pressure was I being exposed to (two things I’ve read affect headaches in some people).  I also wanted to record how long I stood, sat, and walked in a day.  That’s where the wearable comes in.

I considered buying an existing, off-the-shelf wearable, but after looking at a dozen different brands, I couldn’t find one that recorded the data points I wanted, and as far as I could tell none of them let me get at the raw data that they did collect.  They all had their own cloud- or mobile apps for displaying really pretty, interactive charts, but I none had anything like a "download to Excel" feature.  So, custom it was.

iSelf v0.1.0 features a temperature/pressure sensor that I scavenged off of the stratoballoon instrument pack, a microSD card reader/writer (also from the stratoballon), and an Arduino Micro as the processor.  I’m getting very near to the point where the software is ready, and I can solder the components together, get a case for it, and be able to wear it on my belt like a phone.

Eventually I’ll add an IMU (which stands for inertial measurement unit, a combination of a 3-axis accelerometer and a 3-axis gyroscope) so I can track how long I am sitting/standing/walking, and a Bluetooth Low Energy (LE) module so I can communicate with my mobile device.  The plan is for iSelf to send a signal to the mobile device (initially my Nook, but eventually a phone) to tell me to take a survey every 30 minutes.  I’ll answer one or more questions (how bad is your headache right now, are you hungry, etc.), and the mobile device will transmit the answers back to iSelf, which will add them to the raw data points that it collects directly.  At night, I’ll download the day’s data.

Once I have several weeks’ worth of data, I can start asking questions like "does my headache get worse when I’m hungry?" or "does my headache get better when I’m exposed to higher temperatures?"  I’ll hopefully be able to spot some patterns in the data, and that will allow me to create some experiments to run on myself.

There is a crazy number of things that can cause headaches.  I’ve eliminated a few.  At worst, iSelf will allow me to eliminate a few more.  At best, it will show me a couple that contribute.