Scott Hanselman

The Promising State of Diabetes Technology in 2016

June 17, 2016 Comment on this post [20] Posted in Diabetes | Open Source
Sponsored By

Glucopilot helped PalmPilots users in the 90sI've been a Type 1 Diabetic now for nearly 25 years. The first thing that every techie does once they've been diagnosed with Diabetes is they try to solve the problem with software or hardware. Whatever tool they have, they use that too to "solve their Diabetes." Sometimes it's Excel, sometimes it's writing a whole new system. We can't help ourselves. We see the charts and graphs, we start to understand that this is a solvable problem.

However, innovation in Diabetes technology has two sides. There's the "what can we do within the medical establishment" side, and there's the "what components do I, the actual diabetic, have to work with" side. We are given insulin pumps, glucose meters, and drugs but we aren't involved in the development, which makes sense to a point.

Fifteen years ago (yes, really, 15) I went on a trip with a PalmPilot, OmniSky wireless modem, Blood sugar meter, and insulin pump and quasi-continuously sent my blood glucose numbers back to a server and my doctor. Many many years later I demonstrated on stage at a Microsoft conference (video) how a remote management system like NightScout along with other innovations in IoT are taking these concepts so much further. It's through the work of hundreds of innovators and tinkerers that I think we're on the cusp.

Aside: If you are wholly unfamiliar with how Type 1 Diabetes works, please take a moment and read Diabetes Explanation: The Airplane Analogy. This post pretty clearly explains how blood sugar rises and falls and why fixing this isn't a simple problem.

Four years ago - four years ago this week in fact - I wrote a post called The Sad State of Diabetes Technology in 2012, largely in frustration. It became one of my most popular posts. For some it was a turning point and was called "seminal." For most Diabetics, though, the post said what everyone already thought and already knew. Diabetes sucks deeply, the technology we are given to manage it sucks deeply, and we are pretty much tired of waiting. We've been told a "cure" (or at least, a mostly fool-proof way to manage it) is just 5 years out. I've been told this, personally, every year for the last 25.

Here we are four years after I wrote my angry post and I'm actually feeling like we are on the edge of something big.

I believe that now we are inside a 5 year window of time where we WILL make Type 1 Diabetes MUCH MUCH easier to deal with.

Using this generation diagram from the JDRF, it's totally clear that the open source diabetes community is making Stage 4 happen today.

6 stages of "Artificial Pancreases"

Let's stop and level set for a moment. Here's a generalization of your day if you're not diabetic.

The "Normal Sugared" have it easy.

Here's what a Type 1 diabetic (like me) does:

Diabetics have to constantly manage their sugar, manually

What we need is for the "loop to be closed."

Is a Closed-Loop System for Diabetes Management like a Self-driving Car?

You know how the press just loves to call the Tesla a "Self-driving car?" It's not. I've driven one for over 15 thousand miles. It has two main features and they are both effectively cruise-control. There's the cruise control that slows down when there's a car in front of you, and then there's the "Tesla Auto-Pilot" feature. Amazing, sure, but realistically it's effectively "side to side cruise control." It will keep you in the lanes, usually, to a limit. You can't go to sleep, you shouldn't be texting. You are in charge. This isn't to minimize the amazing work that Tesla has done, but using a closed-loop insulin stages above as a parallel, a Tesla is barely stage 3 or 4.

However, this is still a fantastic innovation and for a diabetic like myself, I *would* like to take my hand off the diabetic wheel as it were, at least for the easy stuff like staying in the lanes on the freeway while going straight. Automatic basal insulin dosing (background insulin dosing) would free my mind up a LOT.

It's possible and it's happening.

What's required for a closed loop?

In order to close the loop, what are the components we need? For this simple exercise please assume that "safely and securely" applies to all of these statements.

  • The ability to tell an insulin pump to deliver insulin
  • The ability to read data from the insulin pump.
  • The ability to read current blood sugar from a continuous glucose meter
  • Some CPU or "brain" where an algorithm or controller lives to coordinate all this.
  • Storage, cloud or otherwise, to keep all this historical data

There are a number of issues to think about, though, if the open source community wants to solve this before the commercial companies do.

  • Most pump manufacturers don't like the idea of remotely controlling them after a series of insulin pump proof of concept "attacks."
    • This means that some systems require the use of an older pump to allow remote control. We, the community, need to encourage pump manufacturers to create pumps that allow secure remote control.
  • Most CGM manufacturers don't publish their specifications or like 3rd party apps or systems talking to their stuff.
    • We, the community, need to encourage manufacturers to create glucose meters that allow secure access to our sugar data. 'Cause it's our data.
  • Universal concern that someone will accidentally hurt or kill themselves or someone else.
  • Where should the "closed loop brain/algorithm" live? The cloud? Your phone? Another CPU in your pocket?

What happened in the Diabetes Technology Ecosystem in the last 4 years to make this possible?

The interesting part about this problem is that there are many ways to solve this. In fact, there are multiple closed loop OSS systems available now. Lots of things have made this possible.

Here's a rough timeline of the Open Diabetes Ecosystem.

  • Insulaudit -  Ben West starts an open source driver to audit medical devices
  • Decoding CareLink -  Driving an insulin pump with Python, Oct 2012
  • Decoding Dexcom - Pulling data off a Dexcom CGM 3 years ago!
  • CGM-Simple-Reader - Using Windows 8 DLLs from Dexcom Studio to get CGM data. Next step was uploading it somewhere!
  • Pebble - Being able to remotely view Nightscout Data on your wrist on a pebble.
  • Nightscout - Remote viewing of glucose data by pulling from a CGM and uploading to a web app. The addition of a REST API (Web API) was the killer that kick started other apps.
  • Parakeet Google App Engine - Gets data from The Parakeet Unit and talks to xDrip over the cell network. "OnStar for diabetes"
  • Nightscout Share Bridge - Takes Dexcom G5 data and copies it over to Nightscout.
  • xDrip - Talk to a CGM without a Receiver. Pulling the signal off the air itself. Can we improve their algorithm ourselves?
  • PingRF - Talking to the Animas Ping Pump via RF
  • OpenAPS - Open Artificial Pancreas System. A platform for building a closed-loop with open tools. There are almost 100 people running their own closed loops, today.
  • Watch Dana Lewis talk about OpenAPS at OSCON this year!
  • RileyLink - A bridge that can talk a Medtronic Pump. Make a the pump's RF programmatically available via Bluetooth
  • Loop - iPhone-based closed loop that uses RileyLink
  • xDripG5 - iOS Framework for talking to Dexcom CGMs over Bluetooth
  • OmniAPS - Talking to an OmniPod Pump

I realize this isn't comprehensive, but the point here is to understand there are dozens of ways to solve this problem. And there are dozens (hundreds?) of excited and capable people ready to make it happen.

Here's the systems that I have. This is my Dexcom G5 on my iPhone showing my blood sugar in near-realtime. Here I can see my sugar, but I have to make my own decisions about dosing.

Dexcom G5 on an iPhone

Here is a Raspberry Pi running OpenAPS. This is the brain. The algorithm runs here. It's talking to my Dexcom, to Nightscout in the cloud, and to my Medtronic Pump via RF via a USB device called a CareLink.

OpenAPS on a Raspberry Pi

Here is OpenAPS again, this time running on an Intel Edison sitting on a SparkFun Block with a battery and a TI C1111 RF transmitter. The Edison is the brain and has Bluetooth. The TI transmitter can replace the CareLink.

IMG_0058

As an alternative to OpenAPS, here is a RileyLink custom board that can also talk to the pump, but doesn't have a brain. There is no algorithm here. Instead, this is a bridge with RF in one hand and Bluetooth in the other. It makes a pump controllable and readable. The brain lives elsewhere.

RileyLink

Here's the RileyLink in a 3D printed case. I can keep it all in my pocket and it will run all day.

RileyLink in a 3D printed case

Here is a build of Loop from Nathan Racklyeft that uses Bluetooth to talk to both my CGM (Glucose Meter) and the Pump via the Riley Link. In this example, the phone is the brain. This is good and bad. You can't really trust your phone to keep stuff running if it also runs Candy Crush AND has a crappy battery. However, if both my Pump AND CGM spoke Bluetooth, we can imagine a world where the brain of my "artificial pancreas" is just an app on my phone. No additional hardware.

Loop puts the brain on your phone

The most important point here is that a LOT of stress could have been avoided if the manufacturers had just created open APIs in the first place.

There's also amazing work happening  in the non-profit space. Howard shared this common on my original "Sad State" Diabetes Post:

Great article, Scott. You've accurately captured the frustration I've felt since my 12 year old daughter was diagnosed with T1D nine months ago. She also wears a pump and CGM and bravely performs the ritual you demonstrate in your video every three days. The technology is so retro it's embarrassing.

Since then, Howard created Tidepool and recently spoke at the White House! On the commercial side, there are lots of players rushing to market. Medtronic may '>'>'>have a hybrid closed loop called the 670g by spring next year although trials move slowly so I'm thinking later or possibly 2018. Lane Desborough from Bigfoot Biomedical has also closed the loop and they are bringing it to market...soon we hope!

For more information, go watch Mark Wilson's talk at D-Data Exchange 2016. It is an excellent 30 minute overview of the ecosystem and a call to action to everyone involved.

Check out this visualization of 6 years of Hacking Diabetes. These are all the projects and commits as folks dump into Open Diabetes Hacking Community.

What's the take away? It's an exciting time. It's happening. It can't be stopped.

More Diabetes Reading


Sponsor: Big thanks to Redgate for sponsoring the feed this week. How do you find & fix your slowest .NET code? Boost the performance of your .NET application with ANTS Performance Profiler. Find your bottleneck fast with performance data for code & queries. Try it free!

About Scott

Scott Hanselman is a former professor, former Chief Architect in finance, now speaker, consultant, father, diabetic, and Microsoft employee. He is a failed stand-up comic, a cornrower, and a book author.

facebook twitter subscribe
About   Newsletter
Hosting By
Hosted in an Azure App Service
June 17, 2016 2:52
Always find your diabetes-related posts interesting - I live in the UK, my partner is also type 1 and we're lucky enough to be supplied with an insulin pump and all consumables completely free of charge.

Sadly no CGM, though (manual bolus and preset basal rates only) - insulin pumps are only generally provided to children and adults having a particularly hard time managing blood glucose (though they are becoming more commonplace) - so we don't even qualify for 'Stage 1'. We have mentioned the idea of investing privately in a CGM but have never seriously considered that it might be worth the expense... reading this post, though, that might be changing pretty rapidly.
June 17, 2016 3:36
I'm happy that people are learning to control diabetes with artificial means, but how much nicer would it be if we had a cure, like Viacyte is currently developing with the support of Johnson & Johnson.
I've looked into the clinical trials for my T1D son, but ironically they're only recruiting adults for juvenile diabetes testing.
June 17, 2016 3:36
Scott, an off the cuff response having stumbled on your article. My son is 3, diagnosed last Nov. He has a Dex G5 and an Animas Ping is in his near future. Just another device attached to his body to leave marks on his otherwise perfect/sacred 3 y.o skin. My dad is 73 and he's had t1d since the days of peeing on test strips (to simply know if he was the "high" or "low" color) and boiling glass needles to inject "regular" insulin. Watching an adult deal with it all these years is one thing (it skipped me and my brother) .. but a witnessing this happening to an otherwise up to that point perfect little boy be is something else. Still grappling with the gut wrenching hospital intake experience and new reality filled with endless doctors and needles and pain. He's incredibly brave and I would do anything to take it for him. I sympathetically wore the pump for this week for 3 days and BG every meal. It sucked. Cant wrap my head around the 24/7 regimen. It's 2016 and we can land rovers on Mars and do face transplants and divine the origins of life itself, but we cant cure an ailment that's been identified for 100 years. Fortunately it looks like the Star Trek technology is finally catching up, but not soon enough and only a better mousetrap and based much on the almighty $. I teared up at the end of your vid, I 'Grok' your experience and pain. Thank you for taking the time to demonstrate and especially for what you said towards the end related to children. Cheers. Dave in Sacramento
June 17, 2016 4:34
Love it Scott. I hope within 5 year, Type 1 can have a autopilot glucose control solution!

And it should build on Azure of course!
June 17, 2016 5:11
Scott, one additional piece to the puzzle...
Last week, the FDA issued draft guidance to encourage device manufacturers to share with patients the data collected from their own devices. Up until now, many device makers have used regulatory concerns as a reason/excuse for not opening up their APIs. This is essentially a 'request for comment' from the FDA. I'm sure they'd be interested to hear your perspective.
June 17, 2016 5:42
I don't mean to rain on this very cool post, but a small comment: the FDA will not care if it's a non-profit. They care about provable safety and efficacy, and they have specific requirements for any entity marketing and selling a medical device, including how they are set up to handle/document/respond to adverse events, and how they implement a quality system around all produced pieces of software/hardware in the system. It seems to me like it will be very difficult for an organization to support this without a sustainable business model.
June 17, 2016 10:22
Love the video, Scott, I'll be sharing that for sure, as it explains the pain.

We (i.e., my daughter!) recently trying Abbott's FreeStyle Libre (which, for Anthony Plant above might be interesting as it's the poor man's CGM). Unfortunately, it has been marketed as the end of finger-pricks, but I actually found myself doing more (because you want to confirm whether things are really as bad as they seem -> the FreeStyle Libre seems to exaggerate the extremes - especially highs.

But, that's the point I'm slowly working my way towards: how good can the closed loop be when it's relying on 'slow', and not-always-accurate CGM? I mean, finger pricks are already +-10% (or is it 20?).

That aside, I guess it's a good time to be young and have diabetes, because help is coming, albeit slowly. I totally identify with Dave Lauder (though my daughter was 5, not 3), it sucks, and how come it isn't fixed already?! My daughter is WAY braver than I could ever be, she sucks it up and gets on with her life. But what choice has she got?

Finally, at our level, what we really need technological help with is carb counting. Have you got any ideas or tips for that, Scott? I mean, I'm a 'technical' person, but I just find that turning mealtimes into maths just totally sucks, so my carb counting is VERY hand wavy. And getting my daughter (or even my wife) to calculate ratios (while the food is going cold) is a non-starter.

Would it be possible crowd-source carb counting? Or have at least a 'carb-counting' trainer app?

The best would be a phone app where you take a photo of your food and it calculates the carbs for you :)
June 17, 2016 16:53
Scott,

Thanks for this inspiring post.

I'm not an endocrinologist or an engineer, but I would think that the transition from stage 4 to 5 APS will be difficult, just because of the delays between consumption of BG, arrival of the glucose into the interstitial fluid, SC delivery of increased insulin, and impact of that insulin on BG. When the detector and effector mechanisms are so laggy, it's very difficult to make a negative feedback control mechanism work.

However, as the parent of a T1D toddler, even a system that just automates nighttime basal control would be a godsend. I'm not technophobic by any means, but not a techie. I can follow instructions, and have access to Dexcom G4 and an Animas Ping. What's your rough guess on how many hours it takes most people to set up an APS? You mention that 100 people or so have done it... are they all engineers? Could a non-engineer do it in less than, say, two weeks of work?

~Greg
June 17, 2016 21:54
Having recently been in a serious accident i can see how tech is key to medical advancements, keep going. Glad nerds on the case !
June 17, 2016 22:21
@Karkow - we were actually offered a trial of the Libre last year but unfortunately found that the readings fluctuated so wildly as to be all but useless and - as seems to be your experience - we ended up second-guessing all of the readings. It was a shame because it sounded very promising.

My partner has actually just been moved from the AccuChek Combo to the new insight but sadly it seems the biggest difference is that the lightning-fast LCD handset has been replaced by an unbelievably sluggish touch-screen (constant spinning wheel of doom on every instruction). Not much of an advancement and still no out-of-box CGM integration support.

An OmniPod was offered as an alternative - maybe that would have been a better choice given that it at least seems to have some open source presence.
June 18, 2016 0:20

Here is the problem with closed loop systems in 2016:

  1. the patient eats a big pizza

  2. a huge post-prandial blood glucose peak sets in

  3. because the CGM measures glucose in interstitial fluid (not in blood), it takes between 15 and 20 minutes for the CGM to pick up this glucose peak

  4. the algorithm in the AP wakes up, and decides to give a lot of fast acting insulin

  5. it takes 20 minutes for this insulin to come into effect and bring down the glucose in his blood

  6. at this point, the closed loop is 40 minutes behind

  7. immediately after his meal, the patient has decided to go for a run

  8. the glucose in his blood has already been lowered by his basal insulin, because exercise makes insulin more effective

  9. the insulin that the AP has given him is now a) probably too much, and b) super effective as a result of the exercise

  10. result: patient goes into hypoglycemia. best case scenario, he will need to eat more, hereby further disturbing the closed loop system.



Yes, dual-chamber pumps (hosting both insulin and glucose) might help, but there are other problems with that.

I do not see closed loop systems solving this post-prandial problem anytime soon. If we're ever going to close the loop, then what we need is…

  1. CGMs to be faster (not to mention more accurate and more consistent)

  2. fast insulin to be a LOT faster

  3. the patient to announce his meals to the system (which kinda defeats the loop to be truly "closed")

June 18, 2016 0:52
Stefan - I hear you, but honestly, after doing this for a while, you lost me at #1. We don't get to do that.

All that said, you'd be surprised how quickly the CGM picks up sugars these days. But, yes, we will have fast (10-15 min) insulin in the next few years.
June 18, 2016 5:12
I love the idea where you could use the camera on your phone to take a picture of a meal and then somehow get the carb count from the picture. I'm going to think about that for a bit. Maybe take a picture of the nutrition label and use OCR to get the carbs.
June 18, 2016 13:01
@adam here is a project working on that http://gocarb.eu (taking a picture of a meal, that is)
June 19, 2016 13:29
Nice article, when reading it I reminded a project currently held in France. I put you the english page, it could be interesting to see what's happening on this side of the sea : http://www.diabeloop.fr/?lang=en
June 23, 2016 18:10
Your words make an interesting read that suggests, how one can make use of technology to keep a check on their sugar (in this blog) or blood-pressure levels. One needs to keep an eye on the food intake. It is better to include Bitter-gourd as vegetable or juice, Neem juice, Tulsi leaves, and plenty of water (4-5 liters) on daily basis. They can fight diabetes and bring down sugar levels. My friend from India suggested these and I can see major dip in my high-sugar levels. I continued with insulin till the bitter juices came in to action. It took 2-3 months to bring down sugar levels.
June 27, 2016 20:41
What a wonderful blog Scott - so sorry it's taken so much longer than you ever thought for the technologies to converge like this - I've only been a Type 1 diabetic for five years now, on MDI and using a Dexcom G5.

From a control engineering point of view, how do you overcome the time lags involved in the negative feedback loop? And you'd have to plan and input post-prandial exercise well in advance to avoid having too much insulin on board.

Very exciting times though :)

With best wishes,

Ian
June 28, 2016 7:48
Great summary Scott, like you I'm really excited about what the next 5 years will bring. I got a chance to wear a 2nd pump/CGM as part of the Bionic Pancreas trial with glucagon and was pleasantly surprised by the results. I think they've a great concept, if they can work out the kinks with a longer-lasting glucagon.

I've had T1 for almost 43 years, and like you a 'cure' is always 5-10 years away. If I had a working AP setup, I could happy wait for the remaining 5 years...whenever that might arrive.
June 28, 2016 9:54
hi nice post I love read this blog i have hybrid development firm it is very useful for me
July 17, 2016 14:09
I was diagnosed with type 1 diabetics i for close to 8 months, my friend Lilian visited me and introduce me to Dr Ogun that he can cure me I never believe because I have spend so much money on different doctors she advice me to try him because he cured her too on her Cancer disease. so I mailed him, he welcome me and I complain to him about my illness, he said to me I am in the right place. today Dr Ogun cured me with a herbal medicine, all i did was to order for the herbs, he sent it to me through courier delivery services and ask me to drink it for a period of 4 weeks, but before the completion of the 4th week i was totally cured,I'm so happy. thanks you doctor. I share this because I care about you all too because he said, he also have herbs for all kind of illness including HIV/AIDS, ASTHMA, CANCER, DIABETIC 1&2, GONORRHEA, BARRENNESS, IMPOTENCE, WOMB DAMAGE, HIGH BLOOD PRESSURE, EPILEPSY,PREGNANCY etc. He is also a spell caster, he cast spell to bring back Ex lover and many other stuff he is capable of. Email him right now via: drogunamegu@gmail.com or whatsapp him +2349038294139. thank you Doctor i can never stop thanking you. I'm telling the world about you sir. thank you so much. i can go the work now

Comments are closed.

Disclaimer: The opinions expressed herein are my own personal opinions and do not represent my employer's view in any way.