Profiles and closed-looping

Diabetes gives challenges in so many ways…and swinging basal/ISF adjustments during hormones is one of them.  We don’t just seem to have changing basal/ISF needs at one time of the month…it actually seems closer to twice a month (ovulation and menstruation both seem to have their own needs).

Prior to looping at all, we simply adjusted basal/ISF on the fly.  For ourselves, usually a simple basal change seemed to adequately compensate for what was needed and usually we could keep isf constant.  We eventually got tired of hand-typing in the profile changes, and we instead created profiles A and B to switch between.

Things got even more complicated when school vs weekends became an issue too.  With school stresses and team sports activities, school days would always bring a need for a large amount of extra insulin in the morning (“oh my gosh, what should i wear today?  am i going to be late to class? do i have everything i need this morning?” seems to make her BGs spike) and then a corresponding decrease in the end of school day (all the sports activity, walking around campus finally cause a BG drop just as the day ended).

Balancing out the various profile changes has been a minor juggling act.  School day with hormones?  Which hormones are we getting?  Will she even want to discuss where she is in her cycle with me?  If she doesn’t want to discuss with me…how am i going to help with basal adjustments going forward (because each month isn’t always exactly the same)?  This has been a real ongoing issue to tackle.

When we started Loop, we originally were about a month into the school year and that school morning spike was BRUTAL.  To deal with the difference between a school vs weekend profile, we had to set up two different Loop apps on the phone.  We gave each different icon photos and names so that we could tell them apart visually and quickly.  The weekend Loop has a big W for a logo and was named Weekend.  She got quite adept at knowing on Friday and Sunday nights to switch between the two loops…but there were definitely times we forgot and had some less than stellar looping as a result.  Nothing dangerous, just not optimal.

As school went on, her morning nerves lessened and we’ve actually grown to the point of not needing separate school vs. weekend profiles.  Loop app can handle the adjustments without a separate profile.  So, we started using a single Loop app again and things went well.

Until the hormones started to rage.  The periods are now regular, and the associated basal/isf changes with them became more pronounced.  We are definitely finding differences between times of month and basal adjustments needed.  And just as all this was coming along, we decided to try OpenAPS.  Because why not throw more complications in at once?

Now here is where things get complicated.  OpenAPS has two “advanced” features that are called autotune and autosens.  You can choose to run your closed loop with them, or without them.  Neither are mandatory parts of the closed loop.  They sound the same, but work subtly different.  We have had both of them enabled on our loop.

Autotune starts with your PUMP’s profile at midnight (technically 12:05am).  It looks at the previous day’s happenings (by pulling data from Nightscout).  Based on that analysis, autotune sets up a NEW autotune-adjusted profile for your day ahead.  Hour-by-hour for the whole day ahead, your rig has an adjusted set of basals and ISFs to use.  Autotune cannot change your new profile by any more than 20% of your pump’s profile that is has current at midnight (that’s hard-coded into the autotune code).  The thing to realize, therefore, when autotune is enabled in your closed loop…changing anything in your pump profile during the day WILL NOT result in changes to the profile that the loop is using to calculate your  needs.  Changes to your pump settings will only be read and considered at midnight and applied the next day as part of the new autotuned-profile.  So, if you have a sudden need for a significant increase in basal during the middle of the day (took a steroid medication?  on a dextrose drip?)…you may need to consider making changes to your autotune, as discussed later in this post.

Autosens will automatically adjust your basal and ISF settings, similar to autotune, by a certain multiplier you specify.  The defaults are no more than 1.2 increase, 0.7 decrease.  (These defaults can be changed in the preferences.json file pretty easily.)  The difference is that autosens runs all  the time, not just once per day.  Autosens goes back on the previous 24 hours of data, excluding times of food influence, and looks to see if basals or isf might need adjusting.  Autosens is a more immediately-acting impact on your closed loop’s settings than autotune, since autosens runs continously.

The question is why am I telling you all this?  Well, this week Anna got hit with her period and a vicious head cold all at the same time.  Things were going along just fine before the cold came.  In fact, I didn’t even see her period reflected in her BGs like I normally do to start with…OpenAPS seemed to be handling it just fine.  The problem became when the head cold hopped on board with it.  A couple nights ago, Anna’s BGs hung out around 120 mg/dl all night, just below our high alarm level (130 mg/dl), even though her target is set to 90 mg/dl.  She was carrying positive IOB the whole time with it.  A sure sign that her basals and/or ISF needed some adjusting.  We went into the next day, and I was making adjustments on her pump the whole time.  Things weren’t getting worse…but they weren’t changing like I expected.  Even though I was putting in much higher basal rates in the pump…openaps was seemingly ignoring my pump changes.  I could see in the openaps pills and loop functions, the higher basal rates just weren’t being considered.  I was stumped.

Finally, I realized something I hadn’t understood before.  Autotune basically was locking me into a basal/isf profile each day at 12:05am.  No matter what I did in the pump settings that day, my basal rates and ISF were only going to change if autosens decided to adjust them dynamically.  And those adjustments were capped at 20% increase and 30% decrease.  So…that explained it.  All my little button pushing all day wasn’t going to make an impact.

The good news is that last night at midnight, autotune took all of yesterday’s insulin resistance and higher basal needs and made some adjustments for us.  Last night, she didn’t hang out in the 120s.  She was near target the whole time and not holding IOB.  Today has been better, too…pretty much at target.  And we didn’t do any profile adjustments.

This whole experience presented me with some important what-if scenarios worth exploring:

  • “What about those times where you absolutely need to change your mid-day basals for some reason?”  Maybe you need to start a new BG-impacting medicine or you end up needing a dextrose drip?  Well, you can turn autotune off so that you can manually use your pump to adjust settings immediately for your loop.  But, you do need to know how to navigate your rig and openaps in the event you want to make immediate changes.  So, setting up a way to remotely login through your phone is a really good step.  You can also simply turn off your loop…that’s always an option.
  • “What can I do to help situations that normally require different basal profiles (like hormones or school)?”  Well, you can still use different profiles, but you just need to be aware that the change in profile won’t really become effective until the next day.  You can also allow autosens to make greater adjustments than the defaults (change your preferences.json accordingly).  That will help in situations like hormone surges hitting where the change might be greater than 20% increase needed in basals/ISF.
  • “What happens with a site failure or bad insulin?  Will that mess up my next day?”  Yes, that could cause problems.  Will they be horrible?  Probably not, but it may be worth turning off autotune and/or autosens when you have a bad site failure or bad insulin that causes your BGs to be artificially high.
  • “Do I even still need two profiles?”  The answer is probably “it depends.”  I’d use the Medtronic 670g pump as an example of where openaps’ autotune and autosens is headed.  User needs to provide very little input (really just a starting point once), and then all the subsequent adjustments are made based on data collected from the previous day(s).  Autotune and autosens seem capable of that to me…but they will need your help to provide sensible allowances (maybe more than 20%) to make those changes, good inputs (log carbs and doses accurately), and perhaps a little patience when a period AND head cold come at the same time.  🙂  I’ll report back later when we have more time under our belt with openaps running through these situations where we normally would have switched profiles.  But, so far, I’d say it handled the period and head cold situation pretty well.  The failing was in my lack of patience and my lack of understanding for how autotune was working.

So, I am writing all this as kind of a learning lesson about how the different looping systems handle the information.  It caught me by surprise, so I thought it was worth noting.  Loop will allow you, within the app, to immediately change your basal and isf settings at any time.  And it will immediately use those new settings.  If you have autotune/autosens enabled, OpenAPS will dynamically be watching and adjusting 24-7 based on how your BG impacts have been happening (or not happening).  At times, that may mean a slight delay in seeing some of the larger changes to pump settings that you previously were used to being enacted immediately when you entered them (like Loop).  The plus side is that you won’t have to be the one calculating the needed change or pushing the buttons to make it happen.  OpenAPS will do that for you.  You can mitigate the effect of the delay by giving the default settings more room to make adjustments.

Am I scrapping autotune as a result of this experience?  Nope.  I’ve still liked the results I’ve gotten from the system.  I have widened my autosens allowances from default settings to help with the hormones and head colds more.  And, I also know that I’m not going to change basals/ISF on the pump during the day (because it won’t do anything anyways while autotune is enabled).  Instead, I’ll be more apt to look at my autotune results and make adjustments at the end of the day when I feel it is necessary.  Thus far, I don’t think that I need to.

I’ll keep tabs on this and report back.




Loop vs OpenAPS

Note:  This post is outdated because the features of Loop and OpenAPS have both been updated since this was originally published…The link to the updated post will be posted here shortly.


How do you choose the “best” DIY closed-loop system?  The answer is still a YDMV (your diabetes may vary) answer…but here’s some thoughts from a parent’s perspective.

I have a 14-year-old t1d daughter.  She is relatively independent and can count her own carbs fairly well.  After a little practice and gentle reminders, she can usually learn new things about her t1d management.  BUT, she’s not an independent adult.  She’s prone to forgetting things in the presence of her peers, getting distracted in busy environments, and not advocating for herself in the presence of authority figures.  She worries about fiddling with diabetes gear in class (“will the teacher think I’m playing on my phone if I need to text about diabetes?”).  So, as she goes out in the world with a system making automated decisions about insulin on her behalf, I have a different set of considerations about a system than an adult t1d closed-looper might.  (I’m going to try to keep the little kiddos in mind too as I walk through the differences between these two DIY closed loop systems; Loop and OpenAPS.)

In any comparison, it’s a good idea to know the person’s assumptions and priorities when they are doing the comparison.  Here’s my short list of the non-algorithm issues I considered in evaluating Loop life vs OpenAPS life.

  1. Size
  2. Cost
  3. Durability
  4. Ease of build
  5. Ease for caregivers/school nurses
  6. Troubleshooting
  7. Reliability
  8. Portability
  9. Ease of use
  10. Kid-specific features

I intentionally left BG control off the list is because either system is capable of achieving great BG results.  BUT, the ease/difficulty in the WAY you have to adjust your thinking, actions, or lifestyle to achieve the desired control was important to me.  And I’ll get to that shortly.

Size, Cost, and Durability (Advantage: Even)

These factors are virtually the same between the systems.  Both systems can be easily put in a box about the size of a tic-tac box.  The Loop system costs about $99 annually (Apple developer program), Heroku (for Nightscout) is free, and the RileyLink costs $135.  OpenAPS costs about $163 for the parts, and there are potentially some data costs depending on how you set up your system.  If you want to run multiple rigs, you may need to upgrade to the $7 per month Heroku “hobby” plan (for one rig you should be safe under the free Heroku plan still).

Both systems consist of a small circuit board and a rechargeable lipo battery…so the same care and durability should be expected between the systems.  We plug both systems in for recharge nightly and they last the whole day on the one charge.

OpenAPS Rig on the left, RileyLink on the right



Ease of build (Advantage Loop)

I had both systems built and operational within about 2 hours of getting all the parts together.  Am I some sort of mad genius with computers?  Absolutely not.  You can do this, too.  There are guides for both systems that tell you what to do and the order to do it.  Both systems have very helpful groups on Gitter where people will help you through the setup process…Loop and OpenAPS.

That said, Loop can initially seem like a more relaxing build for the people who are uncomfortable with “code” since much of it is done through the Apple interface (think, pictures and symbols).  OpenAPS is done through linux commands and scripts.  HOWEVER, do not let this deter you.  Both systems will take you into places on your computer you have likely never been before (Loop to Xcode, OpenAPS to Terminal), and you will live to tell the story.  I am actively involved in providing some updates to the OpenAPS docs that will hopefully help new, non-code people through the setup process…just as easily as Loop can be done.  To be honest, setting up an Apple developer account was probably the most frustrating part of the Loop setup and putting two tiny screws in the explorer board was probably the most frustrating part of the OpenAPS setup.  Notice, neither complaint is actually about the software building.

I’m here to say…don’t let your intimidation stop you from trying either or both systems. (Perhaps slight advantage to Loop here…but the gap is closing.)

Ease for Caregivers/Small Kids (Advantage OpenAPS)

Here’s one that adult t1ds probably don’t have to worry about.  Can a school staff member reliably dose your kid with insulin through the closed loop system?  Here is where I was surprised to see a large difference between the systems potentially.  Anna has operated her Loop inputs fairly independently and has gotten used to some of the quirks, so in many ways she’s more like an adult user.  However, for little kids relying on school staff for meal bolusing the differences between systems may be more important.  Loop uses the app to enter meal carbs and calculate/administer boluses; whereas OpenAPS uses the pump.  OpenAPS likely has an advantage for these considerations:

  • Failed boluses  – Every once in awhile, for whatever reason, a bolus command in the Loop app will not go through.  A notification pops up on the iPhone saying “Bolus may have Failed”.  If the caregiver/kid doesn’t notice the notification, it may be some time before the missed bolus is recognized.    And unfortunately, sometimes, the bolus actually will begin shortly after the notification pops up.  The caregiver/kid will have to be trust-worthy enough to recognize the need to look for the message and if the message appears, to first check the pump to ensure the bolus is not actually already in progress before attempting to re-enter the bolus command.  Since OpenAPS is bolusing directly from the pump, failed boluses would be immediately obvious to a caregiver/kid. (Advantage OpenAPS)
  • Bolus wizard guard – The default setting for Loop is that the app will not suggest a bolus if the t1d is below, or predicted to go below, their minimum BG target.  This feature, called the bolus wizard guard, can result in the carbs for a meal being entered but no bolus being offered.  The bolus wizard guard can be removed or modified by parents, but it is definitely something to be aware of.  Many new Loop users fail to modify this feature and find no bolus being given.  Parents should have a plan in place with the caregivers in the event no bolus is offered by the app.  OpenAPS does not have an analogous bolus wizard guard.  (Advantage OpenAPS)
  • Double Carb Entry – When a carb entry is entered in the Loop app, there is a “save” button to move you onto the bolus recommendation part (just like a pump’s bolus wizard).  In both Loop and OpenAPS, an entered carb is saved by default.  Backing out of a bolus wizard does not cancel the carb entry.  In Loop, the caregiver/kid can go into the app and cancel/edit the unwanted carb entry.  However, in OpenAPS you cannot edit the entry.  So both systems require a consistent method of carb entry to prevent unintentional double entries. (Advantage Loop)
  • Yellow/Red loop – Loop will not bolus if it is having trouble communicating with the pump or receiving BG readings.  The Loop will turn yellow or red, depending on how long it has had problems with communications.  If a caregiver/kid doesn’t resolve the issue, they can still enter a bolus through the pump directly as a backup.  However, the caregiver/kid will need to separately enter the carbs into the app (Loop does not read the pump’s carb entries).  Since OpenAPS boluses are directly from the pump, meal boluses can continue as normal even in the event the looping is not functional at the time of the meal.  No special considerations are needed.  (Advantage OpenAPS)
  • Carb Absorption Time – Loop has a unique feature called Carb Absorption Time for each carb entry.  Basically, it is akin to saying how fast or slow Loop should expect the food to absorb (and thus affect BG levels).  If you have new food or classroom treats, your caregiver/kid will need to estimate the carb abs time of the food.  Loop can tolerate some inaccuracy in those estimates, but if you are off by significant amount (like 60 minutes vs 120 minutes estimate) you may end up under- or over-corrected by Loop as the meal progresses.  Also, it’s important that your caregiver/kid respect the importance of entering in the correct carb absorption time for a meal…otherwise unwanted BG impacts can occur.  In OpenAPS, the absorption of carbs is tracked dynamically by the loop.  Therefore, the caregiver/kid does not need to estimate a carb absorption time as part of their mealtime entries.  (Advantage OpenAPS)
  • Emergency tube changes – If you child needs an emergency tubing change at school, there is a special consideration for Loop users to be aware of.  Priming new tubing, without a change of reservoir, will require the caregiver/kid to delete 30 minutes of reservoir history in order to not have the primed insulin count as delivered insulin (IOB).  Parents and adult t1d users of Loop get pretty used to this action, but trying to describe this step over the phone with school staff or young kids could get pretty difficult.  OpenAPS reads the pump’s actions and will not count primed insulin as IOB.  A notation is also made on the Nightscount site automatically when a prime event occurs.  (Advantage OpenAPS)
  • Net IOB – The Loop app tracks net IOB (IOB from both boluses and basals). As such every Loop bolus and correction is automatically consider net IOB. However, Medtronic pumps do not track IOB from temp basals. In OpenAPS, since there is no app, netIOB is usually seen in Nightscout (in fact, the IOB pill will even break down the basal IOB contribution). Caregivers/kids will need to be aware that the usual “take BG before a meal and add a correction adjustment to meal bolus using pump’s bolus wizard” should not happen. Most OpenAPS users will only bolus for their meals using straight carb ratio, and not use the pump to suggest a +/- correction bolus. (Advantage Loop)
  • Corrections – BG momentum in Loop has proved to be a difficult concept for my teen to watch for in Loop.  In times of rapidly increasing, BG momentum can tend to over-predict and thus offer too strong a bolus correction.  This can also affect meal boluses in Loop.  OpenAPS boluses using straight carb ratios seem slightly safer for small kids under remote care.  Plus the bolus snooze option helps corrections take effect without having the loop go to low-temping when you might be stuck on a stubborn high for whatever reason. (Advantage OpenAPS)

Troubleshooting (Advantage even)

Loop relies on the RileyLink for communications, OpenAPS relies on the explorer board.  Both feed information into Nightscout about the status of those communications and looping.  A remote parent can receive information about potential problems that may be causing the loop to stop running.

For both systems, the solution to getting looping started again is usually pretty straight-forward.  For Loop, it’s almost always a retune.  For OpenAPS, a power button push.  However, advantage goes slightly to OpenAPS because a power button push is a little faster and doesn’t require opening an app.  And if your kid isn’t capable of retuning the RileyLink themselves, explaining how to retune a RileyLink can be a little cumbersome over text messages or phone calls with school staff.  A power button is a more straight-forward explanation.

If a fatal program error happens on either system, they can both be rebuilt fairly quickly and easily following the original steps.

Reliability (Advantage OpenAPS)

How often does each system go down?  How far can your kid get from the rig before communications/looping quit?  The answer is “it depends”.  If you live in a “noisy” radio frequency environment, you may find yourself needing to retune RileyLink fairly often.  If you live in an area with no wifi or cell service, you will likely have a poor OpenAPS experience*.

But, the advantage here goes to OpenAPS’s rig because it’s communications has a longer reach and seem more stable.  Kids don’t have to be quite as close to their rig as they do to the RileyLink.  On average, I’d estimate we retuned the RileyLink about 2-3 times per day.  On OpenAPS, we have had to power cycle the rig only once in 12 days (and I think that actually was just my impatience rather than truly a problem).

Portability (Advantage even)

The portability of Loop is pretty great.  You could take it to the middle of nowhere and still be able to run a closed-loop…no internet, wifi or cell needed.  HOWEVER, I’m a remotely-monitoring parent and I like to check Nightscout to see how things are going.  So, even Loop needs internet connection for the parent to monitor things.  (If I were reviewing portability as an adult t1d, Loop would be an easy advantage.)

The newest release of OpenAPS also has made the system truly “portable” in my eyes.  Before this update, kids might have to remember to turn on their phone hotspots when leaving a known wifi network.  That’s not practical for kids.  But, the new release is a very stable handoff between known wifi networks and iPhone hotspot.  So, as your kid leaves home to go to school, the rig will automatically connect with the kid’s iPhone via bluetooth hotspot tether.  When your kid gets to school, it can pick up on the school’s wifi automatically…thus saving you on cellular data and hassle.

*There are options for running OpenAPS without internet like Loop (aka “camping mode”).  I’m just not setup like that.  You could directly plug-in the dexcom receiver to the rig.  Or you could use X-drip to upload locally to the rig.

For summer diabetes camp in the woods…we will likely use Loop.  I think.  Maybe.

Ease of Use (Advantage OpenAPS)

Oooph.  This one is tough.  The iPhone screen is soooo sexy.  Kids LOVE the iPhone.  And they love not bolusing from the pump sometimes.  Since the iPhone is already glued to her hands, Loop gets a lot of love from my 14 year old.

But, the ease of entering a meal bolus from OpenAPS is just heaps easier than Loop.  Kids (heck, even adults) can have a hard time estimating what a proper carb absorption time for a food should be.

There’s also a really sweet feature that you can find in OpenAPS that you can’t get in Loop.  As a parent, you can remotely set a temp BG target using Nightscout’s careportal.  When my daughter goes to track practice, I can set a temp BG target ahead of time to help keep her in a slightly higher target range.  I can also easily cancel the temp target if practice gets out early or situations change.


I love both systems…but I do think the OpenAPS is easier to “use” if you are a parent sending your kid to a slumber party or school dance where they will have new foods and perhaps harder bolusing than they might be used to under your care.  Also nice to have some ability to remotely help nudge loop behavior “up or down” through the use of temp BG targets.  It definitely has saved me quite a few text messages as a result.

Kid-specific features (Advantage OpenAPS)

There are some feature that OpenAPS specifically designed to adapt for kid t1ds.  We haven’t used or tested these, but they may be of interest to some of you reading here.

  • Override High Target with Low: “Defaults to false, but can be turned on if you have a situation where you want someone (a school caregiver, for example) to use the bolus wizard for meal boluses. If set to “True”, then the bolus wizard will calculate boluses with the high end of the BG target, but OpenAPS will target the low end of that range. So if you have a target range of 100-120; and set this to true; bolus wizard will adjust to 120 and the loop will target 100. If you have this on, you probably also want a wide range target, rather than a narrow (i.e. 100-100) target.”
  • Carb Ratio Adjustment: “This is another safety setting that may be useful for those with secondary caregivers who aren’t dedicated to looking up net IOB and being aware of the status of the closed loop system. The default is 1 (i.e. do not adjust the carb ratio; off). However, in the secondary caregiver situation you may want to set a higher carb ratio to reduce the size of a manual bolus given at any time. With this ratio set to 1.1, for example, the loop would multiple the carb inputs by 10%, and use that number to calculate additional insulin. This can also be used by OpenAPS users who rely on the bolus wizard to calculate their meal bolus, but who want to only bolus for a fraction of the meal, and allow advanced meal assist to high-temp for the rest.”

Conclusions (Advantage OpenAPS)

I feel like I’m cheating on my best friend Loop by saying that I’ve really enjoyed OpenAPS.  All the technical stuff above spelled out…here’s the short version of the parts I’ve noticed the most.

Fewer texts to Anna during school:  Through the use of temp BG targets, I don’t have to text her to remind her to prepare the two hours ahead for track workout.  I don’t text her anymore to ask her to retune the Loop.  I don’t get texts from her asking for carb absorption times for food from classroom parties.  I spend less time asking her if she got too far from her RileyLink.

Easier mental at meal time:  I have enjoyed not thinking about carb absorption times.  Now I’m back to my regular thoughts about whether a meal would do well to split bolus…and that thought is the same with both systems regardless.  (Anna says this part never really bothered her.)

OpenAPS pill:  I get a little more information from the OpenAPS pill.  I have enjoyed that.  I also enjoy seeing the Basal IOB using the Nightscout IOB pill.

Auto-tune:  I haven’t really touched on it here much…but there’s a newly unveiled feature called auto-tune which looks back on the previous day’s data and can adjust ISF and basals automatically where it sees the values may be slightly off.  I think that needs a special post of it’s own.

Loop enacted:  I have REALLY enjoyed never seeing that the loop is stalled out or needs retuning when I open the Nightscout app.  I have pretty much gotten used to seeing the OpenAPS rig always functioning.

Easier to switch between patterns:  Anna has definite differences between school days and non-school days.  On school days, she needs about 6 hours of a lower basal rate during the day and through track practice.  Switching between patterns on the pump has been just a little easier than switching between the two different Loop apps that I had setup.  It’s just one little less thing to do.

If I were an adult t1d, my metrics would probably weigh the various considerations quite differently.  But as a parent of a t1d, I’ve really enjoyed OpenAPS.  We have great BG control on both systems…I’m just trying to find ways that we talk less about diabetes and more about everything else.

Looping in our Life

On August 29, 2016 after my daughter’s first week in high school, she asked to change her insulin pump.  She no longer wanted to be on omnipod…she told me she wanted a tubed pump.  Her reasons were simple; she wanted to show off a pump and she wanted to just be able to directly bolus from a pump (instead of pulling out her PDM bag and unzipping).  I was thrilled because this opened the door at last to the DIY closed-looping community that I’d been reading about for awhile.

You can read about the history of the community in many places (I’ll add links to the bottom of this post later, in fact); but the short version is some really smart people got tired of data sitting unused and unaccessed.  They all developed various parts and pieces (both software and hardware) to make it so that the CGM can talk to an insulin pump and make automated decisions about basal insulin delivery to help stay in target BG range.

Blood sugars going up?  Insulin pump is told to delivery more insulin.  Blood sugars going down?  Insulin pump is told to deliver less insulin.  That’s a grossly oversimplified version of the algorithm (math and decision tree) that is the heart of a closed-loop system, but that gives the rough idea.

So why did Anna need a tubed pump to make this happen?  Well the commercial pump industry has software on each of their pumps that control how outside devices, like remote controls or remote meters, can communicate with the pump.  It turns out that certain older model medtronic pumps have a software (aka firmware) that will allow the DIY community to access the commands of the pump.  That communication portal has been shut down in newer versions and does not exist in other brands of pumps to-date.  Therefore, it can’t be omnipod, animas, t-slim, or whatever other pump brand name or model you’ll ask about.  It has to be a certain Medtronic model of pump and a certain range of firmware versions.

Now, originally I thought the only DIY closed loop system was one called OpenAPS.  And my original impressions (in August 2016) was that the rig was clunky big and the setup was only for the type of people who were comfortable with linux commands (of which I am not).  So while I was thrilled to have this option available, I didn’t think it was actually going to fly with Anna.  She wasn’t going to want to carry a ton of gear.  She wouldn’t have the ability to troubleshoot linux commands at school if the system went down.

I searched for awhile looking for options that might make the OpenAPS “rig” (gear pack) smaller.   In searching Twitter, I found this photo of a boy starting school and his iPhone screen showed something I’d never seen before in all my #openaps searching.  This kid was holding something that if I zoomed in looked like BG graphs on an iPhone.

Researching it further, I discovered the iPhone app he was using is called Loop.  Loop is a DIY closed loop system, but it is not the same as OpenAPS. This opened up worlds to me.  Loop had a small form factor (not a lot to carry) and could be on an iPhone (what kid wouldn’t want that? And it wasn’t linux, which bode well for my ability to get it built potentially).

You know those instances where the world of innovation just seem to take leaps and bounds all at the same time?  Three days after the photo above was posted, Dana of OpenAPS tweeted a photo of the new smaller OpenAPS rig.  It’s called an explorer board/edison rig.  ACK…now I had some real useable choices that could be available for my teen t1d.

But, which one to choose?  Well, the answer was simple enough.  Building the Loop system was more immediately available.  The smaller OpenAPS rig’s parts were still not in production and therefore not available.  Plus…teen and iPhone.  That’s a slam dunk.

If you know me from online at all, you know I threw myself into Loop (and finding that elusive old medtronic pump).  Our RileyLink (communications part of the Loop system) arrived on September 21st and it took me about 2 hours to “build” our system.  We closed the loop that night and never looked back.

We’ve achieved amazing results on Loop.  The sleep at night has been fantastic.  The BG control unbelievable.  The independence for the teen t1d is glorious.  I spent less time texting her at school to tell her to adjust pump settings or give corrections.  Loop was like sending along a diabetes babysitter with my kid all day.  It just simply changed EVERYTHING.

On October 29th, I went to Nightscout’s Hackathon in San Francisco.  I just wanted to see the people who created the systems (Nightscout, pebble watch faces, Loop, OpenAPS) in person.  I wanted to throw flower petals at their feet and thank them for the tireless work that they’ve done.

I did all that, but also managed to walk away motivated to pay-it-forward however I could.  Since I can’t hack, solder, code, or program…I decided that I would work to make the online documentation for Loop more robust.  I threw myself into that effort over the next month(s).  The result was a lot of wiki pages and screenshots, but I think it was well worth the time.  I learned a WHOLE lot about the Loop system as a result, which definitely helped improve my Loop success.

We would likely have never tried a different closed loop system, except for two things.

  • Loop has some little quirks that people seemed to be struggling with, in particular with kids at school.
  • I couldn’t find a good comparative review of OpenAPS vs Loop from a PARENT perspective.

Since I love trying new things, on January 18th, I ordered the necessary gear for building an OpenAPS rig and put on my big girl pants ready to slog through linux.  The gear showed up on January 21st, two days earlier than expected.  And here’s the super unexpected part….

Within a few hours of delivery, I had a fully functional OpenAPS rig going.  It was “supposed” to be a lot harder than that.  I’d heard it was really tough to build those rigs.  And I don’t know linux.  What happened?  Turns out the instructions are quite good, just intimidating on the surface.

I had to pry the Loop app out of my kid’s hands.  She didn’t go super willingly into this experiment.  She doesn’t like changes to her diabetes management system.  But, she agreed to let me try this out so that I could learn first-hand what the practical differences were between the two systems.  ESPECIALLY from the perspective of a parent and t1d kid use scenario.

So now that leaves at the current day.  We’ve been running OpenAPS rig for about 10 days and I have some good idea now of the differences between the systems.  It’s time to get that comparison going.









Think Like a Pancreas

Secret handshakes for special groups.  Decoder rings to translate hidden messages.  Star-bellies and not-star-bellies (for the Dr. Suess fans).  I felt like I’d finally been given the membership to the special club when I’d read Think Like A Pancreas.  Suddenly, the burden of type 1 diabetes management felt ever so much lighter.  Not quite as feel-good as Julie Andrews singing on top of a Swiss mountain, but pretty damn close.

happy day

The book lays out how to figure out insulin needs.  Basals and boluses.  Pumps and multiple daily injections.  It has all the information.

I’m an engineer by training, and a numbers geek by birth.  I have always felt comfortable with math and this book broke diabetes down into numbers.  It finally allowed me to look at all those numbers I was collecting in the log books and make sense of them FOR MYSELF.  I didn’t have to call the endo to have her do it for me…I could participate in the management and likely do it better because I simply had more hour-to-hour information than the endo had about what was going into those numbers (exercise, stress, sleep, etc).

The first take-away from the book was basals.  That a correct basal should hold you steady throughout the day.  This hadn’t been really well explained by any of the medical professionals we’d talked with.  All we’d been told is that basals were involved in your keeping your waking number steady, but it’s actually a far more complex system than that.    The book discusses the value of doing a good basal testing program periodically to test whether your basal is holding you steady.  If you’re seeing drifts in blood sugar trends up or down in the absence of food or rapid insulin, that basal might need adjusting.  The book helps define an overnight target of <30 mg/dL change from bedtime to wake.  If you’re dropping or raising more than 30 mg/dL, it might be time for a change in basal doses.

The second take-away from the book was insulin action time.  The doctors had explained that Anna’s rapid insulin (humalog, at the time) would last 4 hours in her body, with a peak action time at about 1 hour after injection.  In other words, her blood sugar would still potentially be dropping up to 4 hours after she bolused for food.  Most online sources from diabetes websites to drug manufacturer’s quote an action time of about 4-6 hours, like this one from

insulin action time

This book gave me the knowledge that in practice, insulin action time varies from person to person.  When we tested Anna’s insulin action time, it actually showed that rapid insulin only lasts 2 hours in her system.  What a difference!  This meant we understood a little better what mechanisms were at play (or not at play) when we were looking at how her blood sugars were behaving more than 2 hours after a meal.  If we saw rising blood sugars more than 2 hours after a meal or correction, we started to know that maybe her basals weren’t enough (and the opposite for falling blood sugars).

The third take-away from the book was about insulin correction factor.  We learned how to test, in the absence of food and exercise, how much one unit of insulin would drop her blood sugar.  We did the experiment several times and came up with a consistent result.  One unit dropped Anna’s blood sugar by 30 mg/dL, not 50 mg/dL like the doctors had been giving us to work with.

Armed with this new knowledge, I started to fine-tune Anna’s basal and bolus numbers based on the daily numbers we’d been collecting.  I made little tweaks to the dosing, timing, and started to try to predict what number she’d be two hours after a meal.  When she wasn’t near that prediction, I’d look for possible reasons why…exercise, faulty carb counting…and I’d keep notes to help me see if I could find patterns.  After just over a week or so, I’d figured out that Anna needed 12 units of lantus, a carb ratio of 1:8, and a correction factor of 1:30.  We stopped calling our numbers into the doctor and were making adjustments as needed.  Ourselves.  It felt great to finally see some insight into the numbers.

The numbers showed the progress (average blood sugar and the standard deviation):

Week 1: 230 mg/dL ± 75 (hospital and home)

Week 2: 160 mg/dL ± 54 (with endo adjustments)

Week 3: 144 mg/dL ± 49 (Think Like a Pancreas)

Week 4: 144 mg/dL ± 41

Week 5: 120 mg/dL ± 33

But wait until you see what happens in week 6!!  The CGM arrives!

Week 2 of Type 1 diabetes

Freshly diagnosed with a scary disease, we decided to do what anyone would…go on our pre-scheduled family vacation for Spring Break.  We’d booked a lovely cabin in Yosemite with my parents and my brother’s family.  The trip had been planned for months in advance, and the weather report included a good chance of snowfall while we would be there.  How could we possibly miss out on that?


The doctors told us to simply call in every day to report our carbs/insulin/blood sugar numbers, and that they would review them to see if any dosing changes needed to be done.  It was scary, I totally admit it.  We were going somewhere fairly removed from medical services, hadn’t yet experienced a low blood sugar event and barely knew what to expect.  But, life needs to go on even in the scary parts.

We had a great time.  The kids played with their cousins, it snowed a bunch for two days.  Sledding, snowballs, exploring, hiking.  All great fun!  We had access to a full kitchen, which made diabetes a lot easier for us.

foresta yosemite

yosemite sledding

yosemite valley floor

yosemite valley

We seemed to still be dealing with such variable blood sugars…each time we checked, we had no idea what number to expect.  Midway through the trip, we’d had her lowest blood sugar check since diagnosis. 83 mg/dL…while in the car driving back to the cabin from the valley floor.  Anna said she had started to feel “shaky” and when we saw such a low number (at the time), we got a little panicky.  Worried if the 10 minutes we still had to drive would be enough time to get home safely.  Did we need to pull the car over right away and feed her the emergency 15 grams of juice that the doctors had told us about?  We opted to keep driving and gave her snacks when we got back to the cabin.  Whew, our first low alert.  Made it out only slightly shaken (pun intended).

Also a memorable on the trip, it was the first time I tried to do a little correction before bedtime.  Anna tested at 188 mg/dL at bedtime one night and she’d been consistently waking up above range.  So, I thought that I’d try a one unit correction (half what the normal daytime correction would have been).  By the calculations the doctors had provided, I expected her to drop to about 138 mg/dL, which would’ve felt just great to me.  Maybe a little out of range, but still comfortably close to it while avoiding a low.  But when I tested her at 2am and the meter read 63 mg/dL.  I got cold sweats.  WTF?!  How could she have dropped that fast, that much?!  Had I almost killed my kid?!  I gave her some juice, but I remained solidly awake.  We still had more days left on the trip, but I’d completely lost my will to be there.  I wanted nothing more than to go home to my safety net.  I wanted (fast, not cabin-speed) internet.  I wanted medical journals.  I wanted to KNOW WHAT WAS GOING ON.  I wanted CONTROL.  I did not want the knowledge to be over with the doctors exclusively.  I shouldn’t be calling in numbers to them and not knowing how they were evaluating them, what they were looking for.  This should no longer be some secret handshake that only the doctors understood.  I wanted the damn decoder ring, too.  LET ME IN!  I NEED TO KNOW WHAT’S HAPPENING!

So, I did what anyone would do at 2am.  I drank. I googled.  How to dose insulin, how do doctors adjust insulin doses, best books for diabetes, and various other google topics.  They all provided a common answer.  Think Like A Pancreas repeated as a good solid read.  I downloaded it to my kindle and proceeded to read the book entirely by 6am (skipping the parts that had to do with insulin pumps since those weren’t something we were using).  Those were hands-down the best 4 hours I’d invested in diabetes since diagnosis.  It changed EVERYTHING.

Think Like a Pancreas