Mark Gilbert's Blog

Science and technology, served light and fluffy.

Science & Technology Podcast, Episode 33: String Shooter

Mark and Lucy build a machine that shoots string, and lets them play with waves:

https://markofquality.wordpress.com/2017/01/10/science-technology-podcast-episode-33-string-shooter/

January 10, 2017 Posted by | Podcast, Science | Comments Off on Science & Technology Podcast, Episode 33: String Shooter

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.

January 30, 2016 Posted by | Science, Tools and Toys | Comments Off on Building Tools

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.

September 20, 2015 Posted by | Embedded/Wearable, Science | Comments Off on Getting Traction

Science & Technology Podcast, Episode 31 – Rover v2

In this episode, Mark and Lucy build a programmable rover based on the Raspberry Pi 2:

https://markofquality.wordpress.com/2015/08/01/science-technology-podcast-episode-31-rover-v2/

August 1, 2015 Posted by | Podcast, Science | Comments Off on Science & Technology Podcast, Episode 31 – Rover v2

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.

July 14, 2015 Posted by | Embedded/Wearable, Science | 1 Comment

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.

July 3, 2015 Posted by | Embedded/Wearable, Science | 1 Comment

Science & Technology Podcast, Episode 30 – Baking Soda and Lemon Juice

In this episode, Mark and Lucy explore mixing acids and bases – and try to avoid volcanoes.  Given that today is the 35th anniversary of Mount St. Helens eruption, we think that’s an admirable goal.

 

https://markofquality.wordpress.com/2015/05/18/science-technology-podcast-episode-30-baking-soda-and-lemon-juice/

May 18, 2015 Posted by | Podcast, Science | Comments Off on Science & Technology Podcast, Episode 30 – Baking Soda and Lemon Juice

Science & Technology Podcast, Episode 29 – Snap Rover

In this episode, Mark and Lucy build an RC Snap Circuits Rover.

https://markofquality.wordpress.com/2015/03/29/science-technology-podcast-episode-29-snap-rover/

March 29, 2015 Posted by | Podcast, Science | Comments Off on Science & Technology Podcast, Episode 29 – Snap Rover

Science Podcast, Epsiode 27 – Stratoballoon Rigging

Mark and Katherine describe how the capsule, radar reflector, parachute, and balloon were all held together.

https://markofquality.wordpress.com/2015/01/19/science-podcast-episode-27-stratoballoon-rigging/

January 19, 2015 Posted by | Podcast, Science | Comments Off on Science Podcast, Epsiode 27 – Stratoballoon Rigging

Science Podcast, Episode 26 – Stratoballoon Capsule Construction, Part 2 of 2

Mark and Katherine finish the details of the stratoballoon capsule construction:

https://markofquality.wordpress.com/2015/01/14/science-podcast-episode-26-stratoballoon-capsule-construction-part-2-of-2/

January 14, 2015 Posted by | Podcast, Science | Comments Off on Science Podcast, Episode 26 – Stratoballoon Capsule Construction, Part 2 of 2