My Open Source Artificial Pancreas
It’s a great time (or soon to be a great time) to be a Type 1 Diabetic. Insulin Pump and Continuos Glucose Monitor (CGM) makers are starting FDA clinical trials with the promise of releasing a commercial artificial pancreas in the next one to three years. Medtronic has filed for Pre-Market Approval for their MiniMed 670g with the expectation of receiving a decision from the FDA in a year. Bigfoot Biomedical has announced the beginning of a closed loop clinical trial (Closed Loop?). The Bigfoot system will use an iPhone connected to their pump device, in addition to using a Dexcom G5 for CGM. And then there is my personal favorite (mostly because of the name) from Boston University based Beta Bionics and their iLet "fully integrated bionic pancreas". They hope to be able to offer a bi-hormonal insulin & glucagon system that will not adjust insulin delivery for high and low blood sugar, but infuse glucagon, which would raise blood sugar back to a safe level. There are even still more, but those are some of my favorites. Like I said, it is going to (soon) be a great time to be a diabetic.
I, however, am not waiting. #WeAreNotWaiting
I have joined the now 100 diabetics (or parents/loved ones of) who have built/assembled their own open source artificial pancreas. Through the community found on Gitter and Twitter we help each other go through the process of making our own DIY artificial pancreas. It's not easy, but with the help of others, anyone motivated enough can do it.
I started off building an OpenAPS "rig" that used a Raspberry Pi 3 computer, my Dexcom CGM receiver, a Medtronic CareLink USB stick (for radio communication to my insulin pump) plus a 9000mAh external battery to power the Raspberry Pi. Here's what a rig like this looks like.
(photo credit Dana Lewis)
All of these electronic bits fit snuggly inside a small digital camera bag. This is what my rig looks like. (Imgur album)
(leg model David Cintron)
I started using this system June 3, 2016, and according to the HbA1c estimate from my Dexcom reports I am down .6 points to 6.0 from my last lab tested result of 6.6 from May 2016. As of 7/25/2016 it is showing an estimated 5.8 A1C, and that is with 74% in range 75-160 mg/dL and only 8% hypoglycemia. I used to think 50% in range was doing pretty good! Instead of only making decisions when I tell my pump to do something (e.g. give insulin), my OpenAPS rig adjusts my insulin delivery in coordination with the readings from my CGM. I spent the first couple weeks using this system just amazed at what a difference it was already making in my therapy. I can easily say it's life changing.
Wanting to reduce the physical size of my rig, I started exploring and learning about the tiny versions people were using including replacing the Raspberry Pi with a much smaller Intel Edison microcomputer. The doers and makers in the OpenAPS community have built rigs with the Intel Edison, the smaller Raspberry Pi Zero, and replaced the CareLink USB radio stick with a more powerful range found in the Texas Instruments CC1111 (TI Stick).
(Pictured: Intel Edison rig with TI stick in front of MiniMed pump for scale)
(photo credit Toby Canning)
Expanding on that, there are makers like Pete Schwamb who designed a tiny printed circuit board (PCB) that has a Bluetooth Low Energy (BLE) chip that then can communicate with Sub 1GHz devices, which include the Medtronic MiniMed pumps being used for OpenAPS. His device is called the RileyLink. The next logical step, of course, was for someone to write an iOS framework and app to allow you to use your iPhone to run your artificial pancreas algorithm instead of having to carry around either of the above microcomputer/battery/radio combos seen above.
Being the lover of Apple and iOS devices that I am, this to me seemed like a great option. Especially because it allowed me to use my Dexcom G5 transmitter that already communicated with my iPhone via BLE. This also meant I wouldn't need my Dexcom receiver that I was using with my Raspberry Pi rig, or the huge battery for power.
(RileyLink PCB & Li-Po battery hotness next to giant in comparison Raspberry Pi rig)
That next logical step is found in the LoopKit framework and Loop app written by Nathan Racklyeft. All I had to do was fork (copy) his Github repository (Github is a social coding website), clone it to my Mac (boop beep), change a few lines of text and Build/Run the iOS app on my iPhone using Xcode (sounds easy, right?). I choose to call my app Skadoosh, complete with a Po app icon
(All copyright reserved by Dreamworks)
My iPhone now helps decide to add more basal insulin if my blood sugar is high, and will reduce or suspend insulin delivery if I'm going to be or am low. How cool is that? I wonder if the folks at Apple ever envisioned their devices helping people this way.
The algorithms in Skadoosh or OpenAPS (oref0) are not perfect, and I still have to give insulin before eating or to correct high blood sugar (although not as often as I used to), but some of the burdens of managing my disease are lessened and that to me is pretty amazing.
My wife or I can also remotely monitor the status of my loop by viewing my instance of Nightscout.
(My pump reservoir, battery and status are in the box outlined in red and the arrows point to the blue boxes which are the automatic changes in my basal insulin rate)
I am so excited about the future of Diabetes tech and am encouraged by what seems like the variety of companies (large and small) who are pushing towards the first commercial artificial pancreas. While I wait, however, I'll be using my own version.
If you would like to know more, please check out openaps.org or drop me a note. I'd love to chat.









