Artificial Raspberry Pi Pancreas

Every now and then a project turns up that makes us blink hard and wonder what on earth we’ve started with this Raspberry Pi thing. This is one of them.

Dana Lewis has Type 1 Diabetes, which she’s had to deal with since she was 14. In Type 1 Diabetes, the pancreas doesn’t produce enough insulin – the hormone that makes glucose available to they body’s cells to use as fuel – or sometimes, the pancreas doesn’t work at all.

People like Dana have to monitor blood sugar levels very closely by wearing a continuous glucose monitor (CGM) under the skin of their abdomen, or pricking a finger 12 times a day and measuring the glucose in the resulting blood droplet. The dose of insulin is then calculated to correspond with the diabetic person’s blood sugar levels. This process is uncomfortable and can be difficult under some circumstances: in particular, Dana found that the alarm on the CGM which she relied on was easy to sleep through at night. If a diabetic person doesn’t correct their levels the results can be very dangerous. So Dana and her fiancé (now husband) Scott Leibrand decided to start a project to make the alarm of CGM loud enough to wake her in the night. But feature creep’s a thing that happens to all of us, and they ended up doing what any right-thinking pair of computer scientists would do.

They built an artificial pancreas.

DIY Pancreas, about to become airborne.

DIY Pancreas, about to become airborne.

DIY Pancreas, their device, has a Raspberry Pi at its heart. The Raspberry Pi receives data from the CGM, controls a learning algorithm, and issues commands to her insulin pump. That learning algorithm means that after observing Dana pressing the button which controls her insulin pump, the DIY Pancreas has learned from her habits, and gets her dose correct 100% of the time, even when she’s sleeping.

FDA rules mean that Dana and Scott can’t publish full instructions, but they are are working on making DIY Pancreas, which they describe as “closing the loop”, open source (you can find out more here), and making enough information available that the system can be replicated, so other people with diabetes can benefit from their work. They need volunteers with all kinds of skills: if you’re interested in helping, you can learn more about the project here.

We started the Raspberry Pi project to encourage kids into computer science in the UK. It’s become so much larger than that, with genuinely life-changing applications like this, an enormous global community, and more than seven million devices sold worldwide. We’d like to wish everybody who reads this blog a very happy new year: here’s to a fantastic 2016 full of innovation and technology that makes a difference in your lives.

48 comments

James avatar

This would be a great project for a Pi Zero.

kneekoo avatar

Indeed. The lower power consumption would make the DIYPS more efficient. Congrats to Dana and Scott! :)

Happy and Healthy New Year!

W. H. Heydt avatar

I don’t think so…notice that there are *3* USB devices connected. A Pi Zero would require adding a hub, and that would make the whole thing more complex. Better a B+ or Pi2B to begin with.

Matt GS avatar

There is only 2 USB devices connected, the third is the power supply that has its own USB port (there are 2 USB ports on the Zero, 1 for power and 1 normal mini USB connection).
Also one of the USB devices connected is for Wifi, this can be done via I2C on the GPIO connectors, so a Zero would be perfectly suited to this application.

Roger Smith avatar

The Pi Zero has ONE USB port only. The other micro-B connector only has the power lines connected. If you use the USB pads on the bottom of the board, then you can’t use the micro-B port.

Matt GS avatar

From https://www.raspberrypi.org/products/pi-zero/

Mini HDMI and USB On-The-Go
Micro USB power
HAT-compatible 40-pin header

So USB On-The-Go port for the continuous glucose monitor (CGM), the Micro USB power for the battery and the GPIO for the wifi.
Any other reason why the Zero can’t be used?

W. H. Heydt avatar

One to the pump, one to the CareLink, one for the WiFi dongle. Looks like 3 USB connections to me.

W. H. Heydt avatar

Four, if you count power. Pump, CareLink, WiFi. That’s 3 USB devices.

Matt GS avatar

I didn’t realise that the carelink and USB were seperate, from the labels on the photo it is not clear. However with the work being done here https://github.com/oskarpearson/mmeowlink/wiki/photos-and-descriptions, the Carelink is not needed, so wifi can be used on the GPIO as outlined https://www.raspberrypi.org/forums/viewtopic.php?t=67776&p=494850 and so a zero could be used.

Brandon D. avatar

Problem solved;
http://deluxecapacitor.com/projects/view/15
http://hackaday.com/2015/12/19/yet-another-pi-zero-usb-hub/

Still leaves a smaller foot print than the normal Pi’s, still consuming less energy… really gives you all the benefits of the RPi0. And would be extremely easy to print up a case for it.

Chris avatar

Surely if the instructions were posted by someone outside the jurisdiction of the FDA – that is not within the USA then people would be able to build it themselves. What is the actual problem with them posting the details or is there a DMCA issue with reverse engineering proprietary devices?

W. H. Heydt avatar

It probably comes under “practicing medicine without a license”, or just a medical device that hasn’t gone through FDA regulated tests and trials (which take years and cost millions of dollars).

If it were published, it would probably have be in some 3rd world country with lax or non-existent medical device regulation.

Jim Manley avatar

You don’t want people who don’t know what they’re doing just going out and buying the pieces, not following the instructions correctly, and then someone winds up in a diabetic coma, or worse. Even a typical doctor may not feel qualified to determine whether what they’ve done is appropriate, not because of the medical aspects, but due to the medical/technical boundary being crossed. There are very few people with enough expertise in both fields to evaluate this for use by people who aren’t as sophisticated as Dana and Scott, and they’re going to tend to work for device manufacturers and/or medical research organizations.

The good news is that by collecting sufficient data and demonstrating a very high level of benefit, folks like Dana and Scott are helping to accelerate the likely FDA approval of this technology. However, first, a lot of very important questions need to be answered, most of which have to do with “corner cases” in testing, especially in the reliability realm. A Pi and the software available is not something you’d want operating the autopilot on a commercial airliner because it was never designed for that level of reliability, and if I were a patient, I’d want something that has at least been banged on by someone without a horse in the race (a neutral observer) with a lot of experience in what can go wrong with such devices.

This is especially true in that there are a _lot_ of moving parts in this system that may not yet have undergone the total-system scrutiny you’d really want to do to not only verify proper operation, but identify precautions that must be followed. I’d guess that power reliability would be very high on the list, e.g., is backup battery power good enough for hands-off continued operation, or should an alarm sound/flash when primary power is interrupted? Should there be an independent monitoring system that ensures that none of the various components have locked up (e.g., a system “heartbeat” monitor that doesn’t rely on any of the operational system’s components)?

You don’t want the insulin pump to be told to not deliver any more insulin ever, or to pump the maximum amount for an unlimited period of time, and there are a lot of cases where that might be possible that have to be eliminated, or an alarm might need to be tripped if a monitoring system detects this seems to be happening. Murphy just loves this sort of problem domain … in spades.

Still, it is very exciting to see this and I hope that evaluation can be performed expeditiously and thoroughly to benefit many people. A friend my age passed away after struggling with managing wildly-varying blood sugar levels her entire adult life, despite careful monitoring and dietary precautions. While due to Type 2 (adult-onset) diabetes associated with child-bearing, it eventually caused wounds in extremities that couldn’t heal, deteriorating retinae, and eventually a brain hemorrhage that was the last straw.

scox avatar

As a libertarian leaning individual, I’m all for people who don’t know what they’re doing going out and buying the parts. People should be free to risk and innovate so long as they are not risking the life, liberty, or property rights of others. It is not the government’s job to play babysitter and ensure that I don’t hurt myself by taking risks. If the FDA is explicitly forbidding the publishing of a how-to, I would consider that unconstitutional suppression of speech. (Not that I would put it past them to assume otherwise. The U.S. Constitution is ignored and abused frequently. For more on this very U.S. American kind of perspective see the diyps.org’s own post: http://diyps.org/2015/09/03/does-the-fda-care-more-about-safety-than-people-with-diabetes-do/)

However, based on a quick review of their diyps.org, it looks like the actual issue may not be the FDA, but rather, the CGM. It sounds like the sort of thing that either required some reverse engineering, or the signing of an NDA:

“Right now, #DIYPS is n=1, and because it is making recommendations based on CGM data, we can’t publicly post the code to enable someone else to utilize #DIYPS as-is.”

The FDA is mentioned here: http://diyps.org/2015/03/31/why-the-diy-part-of-openaps-is-important/

It all really sounds a bit ambiguous. The explanations for why don’t seem, at first glance, to be complimentary. Maybe the FDA is protecting the interests of the CGM company and their proprietary protocol until DIYPS can finish jumping through more hoops?

Whatever it is, people taking charge of their own lives and bodies sounds like a good thing to me.

Jim Manley avatar

scox – You have no idea how much I am aligned with your proclivities – to a point, and for folks like Dana, Scott, and the other pioneers involved, they’re doing exactly the right things, including getting buy-in by the big, “bad” FDA. However, I’m pretty sure you don’t condone “libertarians” such as substance-abusing, self-entitled, spoiled-brat “celebrities” driving onto freeways going the wrong way via exit ramps while under the influence. What if someone who doesn’t know what they’re doing somehow manages to get this strapped on, is operating a vehicle (or, shudder, an aircraft as the only pilot), and passes out because something not yet foreseen goes wrong?

A quick observation of the clearly-stoopid drivers around us on a daily basis provides plenty of counterexamples as to why one needs to be careful about that for which they wish – don’t confuse liberty with chaos. We already have waaaay too many people drinking, tooting, texting, and otherwise wired on something while driving who are maiming and killing others, so we don’t need any more means of doing that. Pink Floyd had it right – we do have to keep the lunars on the path (even if they were being sarcastic), and yes, it doesn’t take very long to figure out exactly who they are. The after-action reports from mass-murder cases repeatedly point this out (including serial DUIers) – only good people can prevent bad people from doing evil things to The Rest of Us.

scox avatar

I am always happy to see that the love of liberty is not dead, though clearly we disagree on this matter.

I generally will have to agree that I don’t condone “libertarians” (word used very loosely) such as substance-abusing, self-entitled, spoiled-brat “celebrities” driving onto freeways going the wrong way via exit ramps while under the influence. However, it’s hard to pinpoint exactly what argument you are making here. Probably you are making multiple arguments at once, and it is hard to connect to the subject at hand in a concrete manner.

There are laws against driving onto freeways going the wrong way, and I acknowledge them as largely good laws, and well within the authority of the government to make. People, nonetheless will break those laws, on occasion, but it is rare, and I can imagine very little oversight that I would like to see added by the federal government to mitigate this risk.

Regarding substance abuse, separately, and the regulation of substance abuse, this is one of the key subjects that I feel I had long been oversimplifying. I am generally against substance abuse, and consistent with that, I had long supported the federal government’s so-called “war on drugs”. Then California went lax on marijuana and it came before the supreme court. The court did not not support the individuals accused, but I noticed an odd dissent by Chief Justice Rehnquist, who’s striking love and respect for the Constitution had earned him my respect. I thought it odd that he would dissent, so I read his dissent, and he made me realize that my desire to have the federal government regulate marijuana use and possession was contrary to fundamentally important constitutional principles.

Now, in most states, it is legal to get intoxicated, even though this is NEVER very safe, and some have loosened up on the regulation of marijuana. I think it will be to their own detriment. However, the federal government does not have a legitimate authority to regulate that, except to control the substance’s transportation between states, and supporting that would support a host of more pernicious government overreaches.

Similarly here, you make an argument regarding risk and safety, and advocate that we should embrace the federal government using its muscle to do things it doesn’t have the legitimate authority to do, in order to mitigate that risk. (At least, that is the putative mechanism you are defending, the FDA regulating the dissemination of this project.) While I can agree that there are risks, I cannot agree with a defense of that kind of action. There are many constitutionally compatible approaches to addressing such a problem should it become one significant enough to draw our attention, so why would we throw away the Constitution to solve a problem that is thus far only a figment of our imaginations?

Thus far, however, I will note, that OpenAPS/DIYPS have not clearly communicated what is stopping them from publishing their code? Is it FDA edict? (and if so, what type?) Is it an NDA or other proprietary interest protecting mechanism? Is it just their good will and fear of the risks? All have been officially suggested thus far, which leaves me scratching my head. If the FDA simply said “thou shalt not disseminate”, then I think that’s cause for concern. The more I read, though, the more I think that is probably not the issue they are having.

Dana Lewis avatar

Jim, thanks for the excellent comment, and to everyone else for the discussion! You are spot-on about the safety considerations and that was at the forefront at the design process. You may be interested in taking a look at the safety considerations as articulated in the #OpenAPS reference design here: https://github.com/openaps/docs/blob/master/reference-design.md

paddyg avatar

Jim, you’re right that there are serious safety issues here, and that you would hope more reliable tech [than the Raspberry Pi] would be used to run a passenger plane autopilot. However the fact is that the bureaucracy involved getting stuff certified kills innovation. For instance my dad flies a sailplane and because the market is so small that very few new instruments get designed, instead people velcro mobile phones and other bits of kit around the cockpit so they don’t have to be certified. Not ideal but the best solution is to make sure that all the hardware and software is open source and as many clever people as possible get to have a look at it.

You have a duty to join the OpenAPS group!!

Vincenzo Virgilio avatar

I think that people will be very carefull about their life and will do a DIYPS only if they fill confortable with this idea.
When you speak about reliability, Free Sotware is the most reliable software in the woeld, if you care about it.
I’m organizing the Italian conference about FreeSoftware in next june and we have a session abouth health, exactly GnuHealth!!!
If somepeople wants to make a speech and present its works, it’s welcome.
You can find the call for papere, open right now at http://www.confsl.it

solar3000 avatar

Awesome project! To save human lives.
But considering the pi2 uses about 1A and you still need to power all the sensor and accessories…..
Might need a more significant power source. Or …. without any programming change, a pi zero.

dwilkins avatar

I really want the code to interface with the Carelink dongle. I’ve got one of these and have to run a Windows VM to get data from the stupid thing.

Dana Lewis avatar

You can find tools to interface with your Carelink here: https://github.com/bewest/decoding-carelink (Big kudos to Ben West for his work for many years on understanding communication with Medtronic pumps, which enabled us to close the loop!)

Scott Leibrand avatar

You should come join our mailing list and/or Gitter chat room. There are a ton of tools our community has built that you’d find useful (many at https://github.com/openaps).

Rupert Burberry avatar

I’ve been diabetic for >40 years. I have a pump just like Dana’s & I sleep through the alarms myself sometimes. And sometimes, I just turn them off so I can sleep. In reality, plus or minus a few days per year with a high or a slightly low blood sugar is not going to extend or shorten my life expectancy.

Referring to the article conttents, I have never been asked to make 12 blood tests per day, with or without a CGM, by any doctor anywhere. I have actually been told that this would be too many!

Even if you are using the CGM, you still have to measure the blood. The CGM measures interstitial fluids, not blood levels, and thus not especially accurate. The accuracy is a fudge of software algorithms, timing and some calibration.

I do wish journalists would learn to read around their subject matter. I probably spend more time correcting the errors people have learned from ill informed journalists like this, than I do actually making blood tests.

I am happy for Dana that her control is better. It does feel good, when you get it right. However, one primary factor, which is not even considered here, is the amount of joint effort from her and her partner. They both WANT to see it work, so they are both motivated to consciously control the diabetes. I wonder if it would work so well for another diabetic, if they supplied the equipment and left that person to it?

Does she sleep with all that gear strapped to her?

Dana Lewis avatar

Rupert, good questions!

1. Would it work well for other people?
A: With #OpenAPS, there are now 22 other people (as of 1/4/16) who have built a system for themselves and are seeing similar results.

2. Sleeping with gear strapped on?
A: You don’t wear anything strapped on your body; you’re already wearing the pump and CGM, but the rest of the system can be under the mattress or on a bedside table. The range of the Carelink stick isn’t terribly far, but the average ~3 feet is good enough to work from sitting beside you on a desk or in a backpack or on a bedside table.

3. With regards to the accuracy of the CGM, it seems to vary by CGM. The Dexcom G4 with the 505 algorithm on the receiver is good enough for many people to choose to use in an AP setting. But even with that, the system has to be designed to take into account occasional fluky data, such as “compression lows”, missing data, etc. If you’re interested, you can read more in our reference design to see how we’re addressing that & other safety considerations: https://github.com/openaps/docs/blob/master/reference-design.md

Rupert Burberry avatar

Hi,

You missed my point about motivation. Dealing with a chronic condition like T1 diabetes is very much about attitude. If you are a motivated patient, that is about 90% of the battle. Clearly, you and all your co-investigators are more than motivated, to have undertaken all this extra work. If the work is not extra, if it is just what you do, then it is even easier.

For normal T1 diabetics, this would be far too much work. I think you know this, but I am not convinced that you understand what it means for your project. Your next step in your project is a big one. Almost certainly, it will be far larger and harder than you expect!

However, to get a truly randomised testing, you cannot rely on the Internet to gather your volunteers. You will need to persuade a hospital to join in, and that means real work, not tinkering. The hospital teams will have all the experience and contacts you are looking for. I would recommend a close hospital, but not your hospital!

I can recommend that you reach out to the head clinician at Hoag Allen Diabetes Center (Dr. Iyer), or Dick Allen himself (for funding, etc). Dick’s grand daughter should be about 5-10 years behind you if my estimates are correct, and a perfect user for your technology. Essentially, if any hospital is going to be interested, it would be one which sees the benefits of technology and is already using robots to save lives!

Apart from that, they are also both nice guys and professionals.

Dana Lewis avatar

Hi Rupert, something important that hasn’t been covered in this thread yet: we are not planning to commercialize or distribute anything. There are traditionally developed artificial pancreas systems undergoing clinical trials right now, driven by commercial players, and those options are slated to come to the market in 2017-2018 and be usable by anyone, which I think is where some of your comment is driving to. The DIY OpenAPS is an option for those highly motivated individuals who do not want to wait when the basic technology exists today. (You’ll often see this hashtag, #WeAreNotWaiting, used related to these efforts.) If you take a look at the reference design or any of the other documentation, you’ll see a big theme focusing on why the DIY parts of this project is important, in part because of the path it has taken in terms of development and testing so far.

Richard Sharpe avatar

Rupert, I too am a type one diabetic for 45 years. I also work in software development which must comply with certain safety standards, so you’re right in that there is real risk for anyone to implement. It’s great that Dana has achieved such good results, however for those of us living in the UK, CGMs are just not available except in extreme cases. That said, the DAFNE process is in use in many European countries (Dose Adjustment for Normal Eating) which is a very simple closed loop system where you measure your blood glucose level before each meal and simply dose according to the carbohydrates about to be taken together with +/- adjustment based on the result. What would be interesting is to know Dana’s HBA1C results before and after to demonstrate the improvement. Also with respect to other diabetics (22) taking this up Dana, how did they tune/calibrate their systems? A great effort though, many congratulations. This has to be the future of diabetic control. One final point regarding SD card corruption, have you thought about formatting into a number of blocks. Writing to each in turn, use a checksum to confirm successful write and then mark as current. If not retry a number of times and in event of failure either mark block as faulty and try another. Last case is overwrite the current block but this risks losing your data. (I could probably have worded that better).

Dana Lewis avatar

Hi Richard, thanks for your comment. I have shared much of my experience at DIYPS.org if you’d like to see some of my personal data that you asked about. In terms of “tuning”/calibration – one correction to this piece is that there are no machine learning components in the system. Each person has their own ISF, I:C, etc. ratios that the system uses to calculate what’s needed based on changes in BGs, so that is the customization component that varies by individual. (Out of the total 23 individuals implementing the system so far, there parents who have implemented the system for kids as young as 4; teens going through puberty; as well as young adult and adults; so you can imagine these ratios and settings vary widely person to person.) You can find out more about how the system works in our reference design here: http://openaps.org/open-artificial-pancreas-system-openaps-reference-design/

Scott Leibrand avatar

Wow, excellent analysis Jim. Those are exactly the issues we have been dealing with as we designed OpenAPS to be as safe as possible, and as more and more people (now 25) build their own systems based on the instructions we have published (which still require a fair bit of work and understanding, but have been followed by a number of folks with zero Linux experience). Fortunately we’ve designed our system to just fall back to standard care (pump and CGM) when OpenAPS fails, so it is orders of magnitude safer than not having it. But you’re right about the difficulty of proving that to the FDA in clinical trials, so we’ve decided to let companies like Medtronic and Bigfoot do that, while we focus on providing an interim solution for early adopters.

The Pi Zero is indeed a good contender for reducing the size and power consumption of the system. It should even be possible to do so without a hub, by using a BLE dongle to talk to the Dexcom and for Internet, but we’re also exploring the Edison (and phone platforms) because they have both BLE and wifi built in.

Chris: we actually just got a partial DMCA exemption from the Library of Congress if we need it. But all these devices are unencrypted, so that’s more for the future.

For now, the FDA is actually taking a really sensible attitude to all this: they recently came to the D-Data Exchange conference with us and gave an excellent presentation on their approach to DIY innovation like this. They are taking a very reasonable and risk-based approach: their theme was that they don’t want to add any red tape, just raise red flags if needed to make sure that we’re keeping all aspects of safety in mind, and not doing anything they might put the general public at risk. Their goals and ours are now very much aligned on getting safe and effective artificial pancreas systems more widely available as quickly as possible.

W. H. Heydt avatar

Having the data unecrypted, while beneficial to you to get this to work, should be viewed as a bug, not a feature.

William Easdown avatar

A very impressive project, great to see how the Pi is benefitting people across so many fields.

Also, *seven* million Pis now?!

Steve Richards avatar

This is really inspirational. I have a school assembly to deliver in 3 weeks about the positive and negative aspects of connected technology. I would love to use your story to highlight how even ‘ordinary’ * people like us with a bit of imagination and a lot of effort can really make a difference.

*There is no such thing as ‘ordinary’ people.

Dana Lewis avatar

Awesome, Steve! Please make sure to include Ben West in your story – he spent MANY years working to understand the communication between the Carelink stick & the pump, enabling us & so many others to do everything from better understand our existing devices to closing the loop as described above. Without his work, and without the contributions of many others to this project, we wouldn’t have this today. It’s truly a community project and a community effort.

Gordon77 avatar

Excellent project.

How does it cope with a controlled shutdown if the battery goes flat?

Dana Lewis avatar

Gordon, good question. If the battery for the Pi dies, or you go out of range of the system, or the SD card in the Pi gets corrupted, or (insert any number of failures), your pump simply resumes ‘normal’ operations. This means reverting to the pre-programmed insulin rate, which is standard of care/normal insulin pump operation.

We designed the system knowing that the battery might die unexpectedly, etc., and so instead of doing “boluses” (short bursts of insulin at one time, which can’t be counteracted easily without having to intervene and eat something), we issue temporary basal rates in increments of 30 minutes to alter the pre-programmed rate. If the BG rises, the rate is incrementally higher. If BG is dropping, the rate is lower as needed. *And*, the rate issued is the absolute safest thing to do based on past data and projections well into the future, assuming it could be the last command that the system receives. Thus, the system is often conservative, but if it is in range, will re-issue a command the next time it reads (~3-5 minutes) and continue the cycle.

You can see more about how this design is implemented by taking a look at our reference design here: https://github.com/openaps/docs/blob/master/reference-design.md

Gordon77 avatar

Thanks Dana,

Have you had any SD card corruptions due to the battery going flat?

Dana Lewis avatar

We have seen SD card corruption, so some people are working on various ways to shut down the system before losing power, but we’re also carrying extra SD cards pre-mounted and ready to go that can be swapped in if you’re out and about.

Anne avatar

As a type 1 diabetic using a wireless Contour Next link blood sugar tester to connect to my insulin pump, the security of that connection is vital. No interferrence of any kind should happen between both devices. (This link tranmits blood sugar level for possible correction and recording trend.)

Not knowing much of anything wireless, it concerns me if there is and external interferrence/corruption with any wireless link. Ex: pump to cgm and/or pump to pi.

Any insight or thought on this concern?

Anonymous Source avatar

The Medtronic pumps only use serial number as security for their wireless connectivity.

It has already been proven by a security researcher that the medtronic devices can be controlled fairly easily, including giving dosages from a computer with the relevant hardware.

My one query is, with the CGM and the bolus wizard, there already is a loop of sorts here. Ok this takes the manual element out of it, so is extremely useful.

Anne avatar

Thank you Anonomous Source. That is helpful.

My true concern is outside interference effecting the bolus communication between rapsberry & pump. An inadvertant over or under bolus caused by interferance (possible ex: wireless store security systems). Could any outside signal ‘detuning device’ cause undo harm?
Not trying to be devil’s advocate as much as my own personal concern. Please help me understand.
(my husband’s tinkering raspberry attemps cause me concern)

Scott Leibrand avatar

Anne: the Raspberry Pi can’t communicate with the pump without some sort of USB radio device like the Carelink stick. So nothing you do with a Pi is going to interfere with normal pump operation unless you’re actually trying to communicate with the pump.

If you do build an OpenAPS implementation, one of the things you’ll notice in reading through our reference design and documentation is that we never issue bolus commands to the pump: instead we only set temporary basal rates. It is possible for communication between the Carelink stick and the pump to be corrupted: the communications protocol doesn’t have a lot of error checking. However, since we’re only setting temporary basals, the worst that can happen is that we set an incorrect temporary basal rate (at a rate at or below the pump’s configured maximum basal rate). The next time the loop runs and successfully communicates with the pump (usually a few minutes later), it will detect that an undesired temporary basal is running and cancel it or reset a better rate. The amount of insulin that can be delivered over those few minutes at a reasonable maximum basal rate is no more than is normally delivered over about 15m, so the system can easily correct if that ever occurs.

Richard Sierakowski avatar

A very inspirational start to 2016. Congratulations on evolving such a useful project that has the potential to improve so many peoples lives.

Richard

Elijah Price avatar

This would be great for so many diabetics that A.) are interested in coding. B.) have a hard time keeping their blood sugars down. Having this for me would be great concidering i have problems keeping my A1c below 8.

Scott Leibrand avatar

Elijah: would love to have you join us and build your own OpenAPS system. You don’t need to already know how to code, though you’re correct that an eagerness to learn new skills is essential. There have been several people with no coding experience who learned how to use the Pi and implement their own system with little or no help.

Scot Dobson avatar

Wicked cool! It’s really crazy the variety of projects that show up on this site.

Chris avatar

Would Abbotts CGM FreeStyle Libre (European model) work for building it all together?

pooja avatar

evry body canot effort for a CGM cant we use general glucometer and integrate it with an andriod app to provide medicinal dosage

Comments are closed