Night “autopilot” maintains the line in green

Type 1 diabetes is an autoimmune disorder in which the human body attacks and destroys beta cells that are located in the pancreas and serve to produce insulin. Then, the insulin, the hormone you need for glucose to enter your cells, is no longer produced. In that case, you must inject insulin in the body, either by injection or with an insulin pump. 

This is the story about how an insulin pump, a sensor that constantly measures blood sugar values and an Intel Edison minicomputer with Linux and opensource programs written by patients try to simulate the work of pancreas without the help of pharmaceutical companies which are still developing the product, and how much this project helps those who use it. 

When my child got diabetes in 2015, I already knew something about it because my wife had diabetes for about 10 years already, but it is much more difficult to manage diabetes in a three-year-old child than an adult. 

Our day looked like this: measuring blood glucose from her fingertips every hour or two, waking up every night and checking blood glucose every two to three hours, deciding what and when she can eat, and giving insulin by injections after each meal — not at all cheerful and fun. 

The two biggest problems with type 1 diabetes are hypoglycemia — low sugar from which you can fall into a coma, and ketoacidosis — a condition of long-term high sugar in which ketones are formed in the blood and can be dangerous to the whole organism and also lead to a coma. Fortunately, at the beginning of our second story with diabetes, a new glucose control device, Freestyle Libre, has appeared on the market and it allowed painless (no more finger pricking) tracking of glucose value and trends, 24 hours a day just by scanning the sensor that was glued to her upper arm. 

Shortly after we started using that sensor, we also got an insulin pump, a device containing an insulin reservoir that is connected to the body via the catheter and delivers insulin whenever needed without injections. It was a great psychological relief to our child because we didn’t have to constantly poke her and to us parents also because we had a constant insight into movement of sugars that are never stable for long. However, waking up too often and frequent glucose controls still remained. At night, we usually woke up every 2 to 3 hours for control, and if she had for supper some food that breaks down more slowly, it was usually more often. 

Somewhere around that time, the #WeAreNotWaiting movement appeared, a group of developers who have type 1 diabetes or have family members with the same problem. They decided not to wait for the products of pharmaceutical companies and made their own, an artificial pancreas, which would do the same as the real one. The resulting project was called OpenAPS (The Open Artificial Pancreas System). In short, a sensor that reads glucose values ​​sends data to the computer that controls the insulin pump. If the glucose value rises, the computer gives more insulin, if it falls, the pump stops the insulin delivery. 

Eg. the sensor reads glucose value 4mmol/L, glucose trend is declining, there are no carbohydrates in the body, pump stops and thus prevents a further drop in blood glucose. The same is true the other way around, the value of glucose is 9, the trend is increasing, the computer gives the command to the pump to deliver a certain amount of insulin. Of course, it’s not such a simple algorithm, but the basic logic is. 

How it works and looks like: 


On the upper arm you see a sensor that has a small cannula under the skin that measures the value of glucose and it sends it to a smartwatch that is on her hand and is connected to the internet. The watch sends data into a cloud, from where the computer (Intel Edison) downloads them, and controls the pump both based on collected data and manually entered values ​​of taken carbohydrates. 

open aps parts

Parts required to assemble Open APS system

When we started using this system, I dedicated a lot of time to its security. I analyzed all the things that can go wrong and how to prevent it. After 10 months of using OpenAPS the system not only proved safe, but gave us extra security and speed in preventing low and high sugars. 

An example of how everything works 

At night Ema’s basal (basal is the insulin that pump constantly slowly delivers and which covers basal needs of the organism such as respiration and digestion) is tuned to about 0.5 units per hour. The goal is to maintain the glucose value at 5.5 mmol/L. If the glucose value is higher than targeted then the temporary basal on the pump is raised to the value for which the OpenAPS algorithm calculates that it will return glucose to the target value of 5.5 mmol/L. If the measured value is lower and the trend is declining, basal rate decreases or completely stops the insulin delivery to avoid falling into hypoglycemia.

Within OpenAPS, there is also the option “meal soon” which, if we run it about twenty minutes before the planned meal, sets the target blood glucose value to 4 mmol/L, rising the temporary basal and by doing so during the meal glucose movement curve levels out. In that way we have a much smaller postprandial jump.

OpenAPS is one of the first systems of its kind, created by patients who used existing technology and came up with solutions to their health problems. Although this is not a cure for diabetes, it almost completely eliminates a large number of symptoms and problems that exist in a very time-consuming diabetes managing.

We use cookies on our website. Some of them are essential for the operation of the site, while others help us to improve this site and the user experience (tracking cookies). You can decide for yourself whether you want to allow cookies or not. Please note that if you reject them, you may not be able to use all the functionalities of the site.