Latest commit 1661481 Feb 7, 2017 @jotomo committed on GitHub Fixes.
Permalink
Failed to load latest commit information.
images Add CGM comparison section. Jan 4, 2017
.gitignore Explain ESM, initial carb absoprtion rate test section. Nov 30, 2016
README.md Fixes. Feb 7, 2017

README.md

Diabetes Improvement Project

Introduction

This page shows how I, and how anybody can use technology available today to improve diabetes treatment and make living with type 1 diabetes easier. I build upon and link to the original work of other people, which did the bulk of the work - I mostly applied what others created. Note that these are DIY solutions, not consumer products, so it's important to be willing to learn and understand how the technology works and how it can fail. It's all doable though, all it takes is time and some effort. Hopefully this inspires more people to improve their own or their kids diabetes as well.

If you have any questions or comments feel free to email me (in English or German): dip (at) jotomo.de

Content

LimiTTer & xDrip: an affordable DIY CGM

The LimiTTer is a self-made transmitter that upgrades the Libre FGM to a CGM. The LimiTTer scans the Libre sensor every 5m and transmits the result to a smartphone. Build instructions, including photos of a more compact design can be found here The version depicted here uses a bigger battery, which lasts up to 9 days and is an initial build during which I learned soldering and assembling. The result is bulky, but very functional.

There is a crowdfunding project called blueReader which was successfully funded, which aims to produce a compact, waterproof LimiTTer and is expected to be available for purchase in early 2017. The project's progress can be tracked via the developer's blog. The layout and exact measurements haven't been finalized, but the design currently aimed for can be seen here - which is considerably smaller than the LimiTTer, with the device being just a bit taller than the Libre sensor itself.

Charging indicator

LimiTTer charging indicator hole

Charging port

LimiTTer charging port

Power switch

LimiTTer on-off switch

In action, attached to arm and sensor using velcro tape

LimiTTer in Action

xDrip+ app

The xDrip+ app collects the data the LimiTTer sends, allows entering therapy carbs, boluses and gives predictions about highs and lows. Raises (configurable) alarms for predicted highs and lows and actual highs and lows. xDrip application

xDrip+

xDrip+ watch faces

The xDrip+ app (optionally) sends the data to a smartwatch, which displays the values, allows entering treatments and also raises alarms like the app.

The default watch face, light version

Smartwatch xDrip+ Watchface

The BigChart watch face, dark version

Smartwatch xDrip+ dark watchface

Benefits

The benefit of all this is that for the first time - for me at least - I can delegate some of the work that is diabetes therapy to a device: unless I exercise or have other factors that potentially have a fast impact on blood glucose, I can forget about diabetes for hours, knowing that I don't need to do anything because I'm in range. Should my glucose levels approach the upper or lower bound of my target range, my digital diabetes assistant will alert me and let me know that I need to intervene to prevent a hypo or hyper. And unless I'm getting an alert, I don't need to do anything and are free to enjoy the non-diabetes aspects of life. This can take some getting used to, transitioning from monitoring the device, ensuring it works properly to really delegating work to it and trusting it.

LimiTTer repairs

A soldering joint went bad, so I had to open the LimiTTer up again and resolder it. Here's the unboxing - I used the opportunity to take a few shot since I missed that during initial assembly.

Unboxing

Unboxing

Unboxing

Unboxing

Eating soon mode

Eating soon mode

The new/additional data from a CGM gives new options to manage glucose values. Reducing spikes and drops reduces stress for the body and tames the disease a bit, since values that raise and fall slower - a generally flatter curve - are easier to handle (keep the delay between blood glucose and CGM-sensor glucose values in mind, see the next section). One such way is the Eating soon mode, which is a way to reduce post-meal spikes. It works, in short, by administering a small dose of insulin 1h before a meal, like 1 unit, targeting the lower end of your target range (or adding something like 5 carbs to prevent glucose levels from dropping too far). Then, when eating the meal, bolus normaly, minus the dose administered earlier and eat the meal. Since the initial bolus is already active for an hour, it can significantly flatten the post-meal spike that usually occurs when dosing right before a meal, when insulin activity onset is too slow and the initial carb absorption hits before any insulin has any relevant impact. As can be seen in the picture above, starting before the meal at 140mg/dl, bolusing 1 unit, eating 45 minutes after, the resulting spike was only around 40mg/dl, from `120mg/dl to 160mg/dl and dropping to 140mg/dl just 1.5h after the meal.

The original findings, including a much more thorough explanation are available here: How to do “eating soon” mode

Carb absorption rate test / CGM delay test

Carb absorption rate test Full size picture

This test - while mainly intended to gather data to configure a loop, is helpful to get a feeling for CGM readings. It shows, for example, when you can expect to see a change from fast acting carbs you toke to counteract falling gluose values. For example, the data above is the test I did (hence this only applies to me, be sure to run the test yourself), where I ate 15g of carbs in the form of juice and observed the readings afterwards. For me it takes 10m for the blood glucose to start raising, while the CGM needs 15m to register a change and it takes about 30m (after the inital delay) for my body to absorb the carbs. I used this to configure the low-prediction in xDrip+, which I've set to alert me 30m before a predicted low. Given the CGM is 15m behind, this means I have 15m left before I go low. If I drink some juice at that point, which takes 10m to start acting, there's a 5m window the catch my blood glucose before it goes low. I also know that the CGM readings will continue to drop for maybe 15m, flatten out for 10m while insulin and carbs battle each other and only then there might be an uptick. This can vary greatly, but I know that after taking carbs the CGM readings are basically meaningless for the next 20-30m, so I shouldn't check them, but simply wait.

One final idea: before I had a CGM I carried around 0.2L juice boxes which I drank when I was hypoglycemic. This was fine when I needed to go back up from 60-70mg/dl. But since I now correct before that (I reduced the amount of hypos by about 90% due to CGM technology!), I don't need such a large push. Now I carry a 0.5L or 1.0L bottle of juice with me, so I can do smaller corrections, 5g, 10g, 15g, not always 20g. The nice thing about juice boxes was that they were measured, just drink one and you're done. On the road and with a bottle, I don't have a measuring cup with me. Except I do, but didn't notice for quite a while: my mouth. I measured the volume of my mouth, which is 100ml, which are to swallows, which are then 5g carbs each. Pour some water into a glass, put it onto a scale, set it to zero and fill your mouth with water. The scale now shows you how much volume your mouth has. Now you can measure whatever you drink, wherever you got it from - your own bottle, a cup of coke, you name it.

See Determining your carbohydrate absorption rate for a detailed instruction how to run the test.

Carelink in a VM

This explains how to create a Virtual machine using VirtualBox to upload (and CSV export) pump data using the Contour Next Link 2.4 (CNL), which pairs with the MiniMed 640G pump and is currently the only way This explains how to create a Virtual machine using VirtualBox to upload (and CSV export) pump data using the Contour Next Link 2.4 (CNL), which pairs with the MiniMed 640G pump and is currently the only way to get access to all the pump's data. While accessing the Carelink website from Linux is possible by spoofing the User-Agent, uploading is not possible natively on Linux. Hence a VM. The biggest obstactle was finding a solution to unstable USB: while the CNL stick started communication with the pump, it only ever succeeded once in a bluemoon. Setting VirtualBox to use USB 3 emulation and installing a USB 3 driver in the VM solved this.

  • Install Windows 7 64-bit in a fresh VirtualBox machine
  • Install guest additions
  • Set up a shared folder via VirtualBox (to pass exported CSV files to the host)
  • Set VirtualBox to use a USB 3.0 controller, add filter for CNL
  • Install Firefox x86
  • In Firefox settings, set download folder to the shared folder from above
  • Install Java (JRE) x86
  • Install Intel USB 3.0 Drivers
  • Open Carelink upload page, say yes to activating Java and allow applet to execute
  • Upload away
  • Download CSV file, view reports

CGM systems comparison

My insurance started supplying me with Enlite sensors, which enabled me to compare the Enlite sensor to the Libre sensor, since the Libre still had some time left before it expired. The following graphic shows the Enlite data (red, every 5m), the data produced by the Abott reader (orange, every 15m) and the data from the LimiTTer (green, every 5m). Note that this is just a small sample, gathered along the way, so there may be all sorts of errors in there. However, it does show a few interesting things.

CGM readings comparison chart Full size picture

What do we see here? The divergent LimiTTer values in the left half demonstrate the importance of calibrating when glucose values are relatively stable. I calibrated the LimiTTer around 4:00 when values were raising. The small plateau at 11:30 yielded a better calibration, bringing the readings together with the other CGMs (but still a bit off, since the following readings were all 5-10mg/dl lower. There weren't many opportunity that day to do good calibrations...). The readings between the different devices vary somewhat, with the Libre having a tendency to show overall lower values. In terms of delay the differences aren't major. While the LimiTTer algorithm diverges the most, it's still within a usable range. Keep in mind that blood glucose meters and CGMs alike are imprecise, they all differ up to 15% when compared to lab results.

My takeaway from this is that all devices can be used to improve diabetes treatment significantly. While blood glucose readings might be more precise and up-to-date (when taken properly), the value of CGMs lies not in precision, but in showing a trend, where the glucose level is heading, with the absolute reading being less important: it's more valuable to know that values are dropping towards a hypoglycemia from somewhere between 100-120mg/dl, rather than knowing that the exact value is 107g/dl without knowing where values are heading towards to. With a CGM showing such trends hypoglycemias can be seen and prevented before they happens.