Hacking Diabetes Meters, Towards An Artificial Pancreas

We’ve covered a number of diabetes-related hacks in the past, but this project sets its goals especially high. [Tim] has diabetes and needs to monitor his blood glucose levels and administer insulin accordingly. As a first step, he and a community of other diabetics have been working on Android apps to log the data when combined with a self-made Bluetooth re-transmitter.

But [Tim] is taking his project farther than previous projects we’ve seen and aiming at eventually driving an insulin pump directly from the app. (Although he’s not there yet, and user input is still required.) To that end, he’s looking into the protocols that control the dosage pumps.

We just read about [Tim] in this article in the Guardian which covers the diabetic-hacker movement from a medical perspective — the author currently runs a healthcare innovation institute and is a former British health minister, so he’s not a noob. One passage made us pause a little bit. [Tim] speaks the usual praises of tech democratization through open source and laments “If you try to commercialize [your products], you run up against all sorts of regulatory barriers.” To which the author responds, “This should ring alarm bells. Regulatory barriers are there for a reason.”

We love health hacking, and we’re sure that if we had a medical condition that could be helped by constant monitoring, that we’d absolutely want at least local smart-phone logging of the relevant data. But how far is too far? We just ran an article on the Therac-25 case study in which subtle software race conditions ended up directly killing people. We’d maybe hesitate a bit before we automated the insulin pump, but perhaps we’re just chicken.

The solution suggested by [Lord Ara Darzi] in the Guardian piece is to form collaborations between patients motivated by the DIY spirit, and the engineers (software and hardware) who would bring their expertise, and presumably a modicum of additional safety margin, to the table. We like that a lot. Why don’t we see more of that?

51 thoughts on “Hacking Diabetes Meters, Towards An Artificial Pancreas

    1. What???
      People with Type 2 can still use insulin. It’s not as common as in Type 1, but it still happens, especially in people who have used insulin in the past. And insulin isn’t as great a ‘solution’ as you would think. The options are:
      1. I stab myself 4 times a day, plus fingerprick blood tests. Not my idea of a holiday.
      2. I have a pump and cannula, permanently attached. I tried this. I even tried a continuous glucose monitor. I couldn’t deal with having to change the cannula every 2 days, and having a needle always under my skin.
      Maybe I’m just soft, but I don’t like a pump. I’ve tried it. I lasted 3 weeks. I’ve heard of people lasting 2 days.
      Insulin is a ‘solution’ in that is stops my blood glucose going so high I can basically only lie down and drink water. But it isn’t a cure. It is a right pain in the arse.
      All of the methods that professionals, mainly, have come up with for managing Type 1 can apply to Type 2. I have a grandfather with Type 2, and he manages it the same way I do (Type 1), but with a bit more diet control, mostly for general health reasons.
      Also, calling someone an ‘insensitive clod’, while less offensive than most insults on the internet, isn’t polite, especially when the person you are insulting may have no knowledge of why you are offended, other than 5 minutes of googling. You would be surprised how many people don’t know bugger all about diabetes, hell, when I was diagnosed (August 2015) I couldn’t even spell it.
      I think that you should rethink your position.

      1. As a type 1 insensitive clod, I do not find the above term a pejorative.
        Since the times of Σωκράτης , our culture has a proud history fraught with tales of extreme peril. My father was a Type 2 insensitive clod, who contributed many insights into treating complex hormonal disorders. He was ignorant of most other subjects, smelled bad, and extraordinarily impolite… but you don’t have to like the people that want to live well. In fact, we still feel pissing people off when they need to hate someone instead of the disease as a free mental health service.
        You’re welcome friend.

        1. I’m wondering what you’re trying to prove with this. I found some parts mildly educational, such as that Type 2 is an inability to use insulin. I didn’t know that. But the message that: “There’s one lesson to be learned here: Health isn’t found in pharmaceutical drugs, not even old tried-and-true drugs.” seems to me like the kind of hippie bullsh!t that leads to the “vaccines cause Autism” stuff.
          Just because it’s being used in non-ideal cases, doesn’t mean insulin isn’t an effective solution for some people.
          And I just read that article’s author’s bio. Wow. “exposing the modern medical scam and the politics surrounding it”? I don’t know if things are different here in Australia, but I have found that there’s not much scam happening. I get my injection needles for free. Several months’ supply of insulin is about $70, after medicare rebate. And, with private health insurance, an insulin pump is free. That doesn’t sound like a scam to me.

      2. Relax, it was meant as a joke. I apologize if it was misunderstood. I wasn’t serious about someone being an insensitive clod. Nor am I offended in any way by the parent post.

        And yes I do understand that there diabetics far worse off than I am.

    2. Change your diet. works great and makes a HUGE difference. Yes that means you kick Sugar out of the house and out of your diet and kiss potatoes, pasta,bread, and rice goodbye.

      1. There is a lot of research into ketogenic diets curing diabetes. It’s a hard solution, but it does work for type 2. Type 1 may not be able to successfully complete the diet due to the extreme nature ketoacidosis. I personally decided to try a keto diet (for weight loss, not that I have diabetes) and I felt amazing once my body switched from a carbohydrate diet to ketones. The initial induction is painful, but once it’s over, you suddenly feel amazing. I have no doubts that it would work to reverse type 2.

    3. Umm… Metformin, TZDs, alpha-glucosidase inhibitors, pramlintide, SGLT-1 inhibitors. You have so many choices available to you.

      In addition, some Type 2s can manage simply with weight loss, diet, and exercise.

      Oh yeah let’s not forget a Type 2 can additionally take insulin, but is not entirely dependent on it and as a result still has their pancreas participating in a regulatory function.

      As a result, no need for the significant extra data from CGM, no need for the significant extra control from a pump.

      Meanwhile, a Type 1 has only ONE available solution – insulin delivery via multiple daily injections or a pump. Dosing accuracy is extremely important and sugar levels must be constantly managed. All other “solutions” are just management technique improvements for insulin delivery. (One exception: T1s can also use pramlintide to some benefit. There has also been some studies involving using metformin to improve insulin sensitivity in some T1 cases, but while T2s have a variety of first-line treatments with insulin as a last resort, insulin is the ONLY treatment for a T1, and all other “treatments” are merely synergists for injectable insulin.)

  1. If there was an obvious hacker-scale solution to the problem it would be on the market by now. The problem is that diabetes is hard. You only get one chance to fuck up with an insulin overdose; you do that when nobody is around to call the EMT’s and you die. And the feedback mechanisms are subtle and not well understood. If you’re a hacker and you’re sticking these needles in yourself every day it probably looks really tempting to hack that problem, but the big problem with it is that your first downside overcorrection is your last.

  2. I’m not insulin dependent, and I’d really like to stay that way. My point is, there are many diabetics who aren’t insulin dependent, but there’s not much out there other than metformin (or some other medication), diet modification and exercise.
    Yes, I do all of the above.

  3. This is of interest to me especially since I have Pancreas organ failure, non-alcoholic in nature. I need to take enzymes with all meals and have Chronic Pancreatitis from this issue, LOTS of pain, but with medication and a spinal implant it can be partially controlled, but I still need to be admitted every 2 to 4 months for a week at a time into the hospital, with a three week recovery time after that. For those that don’t know, the mortality rate for Chronic Pancreatitis is 80% over ten years. I’m lucky, since mine most likely was caused at birth, and is now catching up with me (in my mid adult years) – that we have progressed far enough in medicine to at least partially treat the condition. I will get diabetes at some point soon enough. So, monitoring, or anything that shines light on one of the few organs left that they don’t understand fully is a fantastic approach to working towards medical solutions or better treatments, and these ideas are an interesting way to build data towards that end. And the first person that figures out how to print a pancreas, I’m on board!!!

    1. Your story tells me that there’s a better solution than “Regulation and None”…

      Some diseases and ailments have significantly higher risk than others. In cases where we know that fatality is high, I say we lessen up the certification and regulation engine. If i’s your choice to engage in a highly speculative solution that may or may not work, I see no reason why we should stop that.

      Now, for more mundane things, regulate and certify.

      1. Nothing speculative about my treatment. As it turns out, you can get on a list for a new pancreas – but they need to replace both the pancreas and the kidney. And apparently they don’t do that until you are too weak to survive the procedure in many cases, don’t ask me why. Right this minute I’m debating on if I should go to the E.R., of course, since it is Halloween, I most likely will not be helped for a very, very long time. Beyond that, Doctors don’t like things that they can’t fix (I.E. a broken leg vs. stomach pain) or understand, they want to be able to fix it and send you on your way. So there is a large political issue with people that are considered pain patients (cancer patients, abdominal cases, etc.) – they not only do not like them, they discourage their presence as much as possible, or ignore the issue and send you on your way. I have gone so far as to have had a Doctor not even give a physical in the E.R., no listening to the lungs, or heart – nothing, and discharge me. They virtually don’t want to engage. If we could fix that issue – I’d be happier too. This is with significant documentation from Specialists, my own Doctor, and other Doctors within the hospital who know it’s not a bogus issue. So we have issues in hospitals with not only quality care, but getting quality Doctors. Anything that can prove out a case more completely or lead to better treatment is a good thing – like monitoring hardware devices. Frankly, I’m excited about some of the things I’m reading on the roll-your-own, not so much the dispensing part – I agree with people on that, can be dangerous, but the hourly or multi-hourly monitoring of different stats. I just hope I wasn’t born too early to take advantage of these things.

  4. I have Type 1 diabetes, and I currently use an insulin pump. I hate the fact that my pump can be controlled via a radio. I would never use a fully autonomous system. Especially from a device such as a smart phone. A program with one bad memory leak, or even the os mishandles memory allocation, you could get a severe overdose. Having normal lowes can be pretty disorienting. Having 100 units instead of 10 injected into you without you knowing about it… I doubt you could get to the glucagon fast enough.

    1. Warning: non diabetic. Feel free to flog me if this is dumb, but please be gentle. :)

      Does it ever make sense to inject anything approaching 100 units? I heard from someone I trust about a nurse giving a patient 75 units of insulin instead of 7.5, and got the impression that sort of error should be mind-bogglingly obvious to anyone with more than zero medical/diabetic knowledge.
      Maybe a much smaller upper limit could be an effective fail-safe?

      Going a step further, could the pump be sized such that would deliver much less at a time, but more often, so that even if it were to fail and run full duty for some small-ish amount of time it would trigger another fail safe to the continuous operation case? Or maybe sized such that continuous operation would still leave you with ample time (hours) to recognize the effects and intervene?

      I could see this being risky during sleep periods. Would it make sense to shut off the pump while sleeping, assuming you had your blood sugar relatively close before going to bed? I assume you could do so safely, if current pumps are manually triggered, anyway.

      1. I have a son with Type 1, He is on a t-slim pump, with a CGM, and I have built the Dexdrip (now x-drip) out of a wixel RF dev board and commodity bluetooth module. It is excellent for when you are resetting the CGM every 7 days.

        During the startup, or reset of the cgm (if you take a cgm sensor past 7 days), you have no visibility to BG until the sensor has ‘warmed up’. With the x-drip, you can see data while the factory cgm is in its startup mode. Great for use during bedtime resets.

        It is also awesome if we are at relatives in rural Vermont when we can’t get the data on our phones or pebbles through nightscout. My kid is the only student in his elementary school with an Iphone allowed in class ( suitably locked down, for BG data exfil from his cgm). If we go someplace without cell coverage and we only have local monitoring (30-ish feet), the more monitors the better. Also, the Dexcom transmitter is a thing of beauty, but their G4 receiver is commodity grade, and does fail, often. Any spare is always handy.

        As to the sanity check on bolus dosing ( administering insulin at mealtime) depending on your metabolic rate, insulin sensitivity, number and type of carbohydrates being eaten, you could easily push 25 units at a large meal, especially if you are a teenage boy eating at Cheesecake Factory,. I hear stories of teenagers with a total daily dosage exceeding 100 units.

        My son (age 8) is becoming VERY good at math, and he has caught the very situation of a moved decimal point or flipped data input on his own. To be sure, we have him read his dose back to us at mealtime before pushing the deliver button. Try swapping a BG of 170 and a carb count of 57 in a pump and see what dose comes back, even without reverse correction.

        I’m going to add that predictive algorithms for insulin dosing that do not take things like exercise, heart-rate, type of carbohydrates recently consumed, type of activity recently performed, or any of the dozens of factors that define metabolic state are going to perform woefully poorly. I see changes based on which friend he’s hanging around with. The only way that my Wife and I (mostly her, though) have gotten any measure of control is by tailoring his dosage rates by the kind of day he is having. Long car trips and rainy weekends inside will see his insulin needs increase %20,

        I would take the CGM over the pump anyday, if it came down to a choice. Any advances in the art of the CGM are going to have huge benefits for long term health, and I feel for any T1D who doesn’t have access to one. It has brought the only true measure of sanity to our lives since he was diagnosed.

        1. I have been a type 1 diabetic for almost 20 years and have gone from manual injections to insulin pumps to insulin pumps and continuous glucose monitoring and I agree with a lot of the concerns and difficulties when it comes to finding a good fit for the constant problem of getting the right amount of exogenous insulin at the right time. I am also an athlete and this only complicates it more. That being said, it is all worth doing and a closed loop insulin delivery system is something that is next of kin to a cure for type 1 diabetes.

          For those that are expressing how scary the idea of having a software system make life or death decisions based on programed calculations, I can say from experience, You have no military idea! Ha ha.. but it does get better, and this is why I think a closed loop insulin delivery system is a very positive thing if wielded wisely. Most of us here are engineers or aspiring engineers, so the idea is this.

          An insulin pump is basically a control system, granted the thing that it is controlling is something that has “the butterfly effect” as an element. That is, as type 1 diabetics, our blood sugar levels and amount of needed exogenous insulin needed from moment to moment is a thing that has a sensitive dependance on initial condition. What is more than that, that initial condition is always changing. It is complex but it is not impossible, it is risky to automate but that is not a reason to give up on, in my case, an approach to my diabetic care that I borrow from Japanese management principles, where you strive to constantly improve and to exacting specifications on an ongoing basis. It is not an easy path, but it is worth doing. Risk is not a reason to abandon one’s potential. The whole process falls down however, when the marching orders of how to improve are not based on solid, consistently collected information. That resource is exactly what a system like this is there to provide. I have no problem with risk, I cannot get away from it and have made friends with it. (not the type of friend that you would trust with your life though, the type of friend you occasionally have to apply tough love to in the form of a boot in their ass when they act unacceptably.) It is just that I prefer my risks be of the calculated variety. No insulin means no life so that is out, Insulin pumps have made my life and health improve by a factor of 10, but the amount of decisions needed to be made correctly in a day to get it right is a weight on one’s quality of life (and I have earned the right to say this) Insulin basal rates and the reactive math that we constantly have to get right whether we are in a good state of mind or woozy from fluctuating sugars, is a job a machine should be doing if our organs fail to do so.

          The closed loop insulin pump is analogous to the concept of “Fly by wire”, where carefully collected statistics concerning one’s own chain of causes and effects fed into a tested and working system, can and will increase the quality of our lives as much as insulin pumps are an improvement over taking multiple shots by hand every day. You know, flying wing aircraft like the B2 bomber have been around since WW2, but they did not become used by the military until the late 1970s, due to the fact that that type of airframe is only stable and “Pilot-able” if there is a computer translating the pilot’s slow, directional movements of the stick into hundreds of tiny mathematical adjustments on the control surfaces each second, to keep the aircraft stable, whilst still going where the pilot wants the plane to go, otherwise it is so hard to fly, accomplishing a reconnaissance mission or god forbid, going into combat would be too risky to contemplate. Type one diabetes is just like that, with a pump and cgm, but something is to be said for the improvement in the quality of life that would come from not having to divert one’s attention to calculating , recalculating, second guessing and adjusting constantly and not getting a break without ending up in trouble. Us type 1’s would be much better off having that “fly by wire” computer in our control system. It is not something that would allow us to ‘set it and forget it’ as attractive as that pipe dream may be, but rather would allow us to make decisions and have them carried out for us while providing a way to improve, based on our past experience. DIY in this case is sort of the ‘pure science’ that is the stuff of horror/science fiction, where a scientist performs experiments on himself, but there is a right way to do science like that (and it is by taking calculated risks not impulsive ones.) Reading the well thought out nuanced and careful, insightful writings of those working on these open sourced closed loop insulin systems, and knowing full well what they are doing and why they are doing it, these people are no Seth Brundles.

          I agree though Will, that better CGM sensors would be a major milestone to a fully functioning artificial pancreas, and I also hate that term.. My pancreas still works it just has a low population of beta cells.(Call it artificial beta cell populations??) I can say on good authority that I have a high population of glucagon producing alpha cells, so usually even if I get too much insulin, I rebound higher and higher.. I think the best thing that a closed loop system would do for me, is reduce the amount of insulin that I take by addressing the nuances based on evidence from a closed loop of constant observation and intervention. This group of people doing the DIY thing should be encouraged, yes it is risky, but for us type 1’s no matter what we do that risk is always there, and doing nothing or stagnating is the most risky thing that we can do. I reject the notion that this is crazy, it is the right thing for these people to be doing with their skills!

      2. If you read some of the original design criteria from the first DIYers to go closed-loop, some of what you describe was part of their design criteria for safety reasons.

        Insulin pumps do two things:
        1) Deliver a semi-constant “basal” insulin rate to meet the body’s minimum insulin needs without eating. This actually can vary during the day due to a few factors. It meets the function that long-acting insulins (NPH, Lantus, etc.) provide for diabetics still on multiple daily injections (MDI) like myself. One of the advantages of the pump over long-acting insulin in MDI is the ability to adjust to varying basal requirements via “temp basal” adjustments – for example, reducing basal delivery when exercising, increasing it when stress/sickness reduces insulin sensitivity. (Instead of using long-acting insulin for basal supply, the pump uses rapid-acting insulin for everything). Completely shutting down insulin delivery for more than a short period of time will lead to a significant rise in bloodsugar within 2-3 hours (likely the rise will be noticeable significantly earlier) and ketoacidosis not too long after that.
        2) Deliver “bolus” doses for meals.

        Most pumps support “temporary basal” rate adjustments. These often have limitations in terms of maximum adjustment, and also, putting in a temp basal over and over again really doesn’t have a negative impact since you’re saying “Deliver x units/hour more than the current normal rate for n hours” vs “Deliver y units now”.

        The people who created the first “DIY” closed-loop system intentionally limited it to basal adjustments only for this reason – errors lead to far less excessive IOB, making correction for errors in a timely fashion much easier. Whereas a repeated bolus command could result rapidly in an uncorrectable situation.

        Also, proper boluses need to be delivered in advance of the meal they’re intended to handle. If the pump bolused for a meal after the CGM saw a rise, it would be too late to prevent a significant overshoot in sugar levels.

      3. Thank you both for the input. I didn’t realize the importance, size, or timing of bolus dosing or that there were different rapid/long acting types of insulin.

        Existing solutions probably have big/little pumps or two separate circuits for driving a single small pump with electronic inhibitors that would prevent retriggering each at too high a rate? i.e. increasing the pump’s duty cycle correspondingly lengthens the retrigger delay, in hardware.

        If not, everyone likes to see more 555s around here, right? :)

        1. In the case of existing pumps, it’s a single pump that I believe effectively microsteps a plunger. During normal basal delivery, this is just pulsed periodically. For a bolus, it’s rapidly pulsed to meter out the total bolus amount I believe.

          Most safety is handled via strict and rigorous FDA approval processes, a level of rigor matching or exceeding what you find for safety-critical aircraft avionics. Not sure if the FDA approval processes mandate some medical equivalent of, for example RTCA DO-178, but I assume they do.

          Obviously these DIY solutions aren’t DO-178 level, but that’s why there was intentional restriction to basal adjustments only, effectively leveraging the pump’s safety interlocks to limit what a bad external command could do.

          Unfortunately the only remotely controllable pump on the market was able to have remote bolus commands and in addition, the security of the remote control system was pretty “meh”. There was, to my knowledge, no user interaction on the pump needed to “approve” an unrecognized remote control device.

          There’s now an Accu-Chek meter that uses Bluetooth, with I’m assuming some fairly stringent pairing security requiring local user interaction on the pump side.

          1. That is correct, in EU we have had access to a Accu-Chek meter that uses Bluetooth for some years.

            “stringent pairing security requiring local user interaction on the pump side” – correct

      4. Also, to add to the well said comments about safety. The Artificial Pancreas algorithm is from OpenAPS.org, the system as said utilises temp basal adjustments over a max time of 30mins in its suggestions. This means you will be getting an adjustment to your normal basal for no longer than 30mins. Safety checks are built into the system so you cannot go over * 4 your current default basal and the pump itself has built in limits for max basal + bolus, etc.

        The situation of typing 75 and not 7.5 is very possible via UI, but this should be checked in code and the final safety catch will be the limit set on the pump itself.

        Are there risks? – Yes, do the risks out weigh the benefits? – for me, no.

  5. I thought the problem with an artificial pancreas like this was that the sensors of glucose meters wear off and need to be replaced after every use.

    There was someone with an insulin pump in my math lectures 9 years ago. She still had to prick her finger to measure the glucose level.

    1. I tried a pump. The Continuous Glucose Monitor (the sensor) lasts for (officially) 1 week. I was told that they can last up to a month, but become unreliable at that time. While I was on the pump, but not the CGM, I still had to do fingerprick blood tests for blood glucose measurements.

    2. Dexcom was first founded in 1999 or so – I don’t think they had anything available on the market until at least a few years after that.

      9 years ago, CGM systems were extremely rare. It’s only in the past 2-3 years that they’ve become better covered by insurance companies and more usable (most notably by increasing the sensor life from 3-4 days to 6-7 days. Dexcom is FDA-rated to 7 with some people frequently wearing to 14, Medtronic is FDA-rated to 6 I think)

      CGM users still need fingersticks at least twice a day for calibration, but between fingersticks we get automatic readings every 5 minutes via a sensor embedded under our skin for a few days that measures the sugar content of interstitial fluid.

  6. Hey everyone,

    Great points raised in the article and very much agree with them – once the system is complete (closed loop) there will be a discussion with the community on how easy it should be to access the code, after all, all this requires is a app install on a mobile.

    Also, I would like to direct you to the OpenAPS.org project, this is what some of my code is based on and there are people out there now in the wild with a full DIY Closed Loop system!

    Happy to answer any questions. -tim

    1. Probably would be useful to point out to the readers here that most current “closed loop” DIY systems have been intentionally scope-limited to NOT deliver bolus insulin as a safety measure.

      They adjust basal insulin only, since most pumps have fairly good built-in safety limits for temp basals/it’s hard to wind up with too much IOB to correct when the CGM alarms/if the system repeatedly sends a “set temp basal” command it does next to no harm vs. repeatedly sending a bolus delivery command is BAD NEWS.

      I started using the Dexcom G4 a few months ago, and this weekend I’m going to be working with the G5 and an Ubertooth One to help with the effort to get G5 support into xDrip.

    2. Tim, Happy to see this topic getting wide visibility. I have a question regarding your transmitter. Have you successfully opened the g4 ( i assume) transmitter unit to replace the batteries? If so, did the transmitter come up as soon as the batteries were replaced, or was there some sort of reset performed? I’m extremely interested in any info you feel like sharing on that subject. Many Thanks, Keep up the good work.

    3. @entropy512 – correct, HAPP will deliver bolus as I plan for it to completely replace the current meter that comes with the pump. Some serious checks will need to be performed to be sure you do not “double” bolus, you will only get as far as the max daily bolus limit set in app – what still is not good. Good luck with the G5 hacking, if its not for people like you others would not be able to develop with your solutions.

      @Will – yes I did and the transmitter comes up almost right away – you just have to wait for the next 5 mins check. You can tell by reading the voltage output of the transmitter, see my blog post. Also, I now have my hands on the slim transmitter and plan to up that up soon, with a little Sugru I should be able to open a reseal the device!

      1. Odd question – It seems like the transmitters have SOME sort of feature to reduce/prevent battery drain in a shipping configuration. Did you see any hints as to what might “activate” a transmitter?

        I originally thought it might be some contacts or a Hall effect sensor, but there’s nothing in the shipping case that would touch the two contact points and no magnet.

        1. Yes they do, inside the Transmitter is a switch that when active disconnects the batteries. You will notice there is a small magnet in the box the transmitter comes in. Putting the Transmitter back in its packaging will result in this switch being activated by the magnet and the batteries disconnected.

          I cannot remember how I know this, someone told me once.

          1. Hmm, I need to look at the box again, I assumed it was a Hall or reed-switch disable with a magnet, but I have had trouble FINDING said magnet.

            That would explain why I seem to have so many missed readings when playing PS4 – I think the magnets for the rumble motors may be killing the transmitter. :)

  7. The unfortunate thing about your pancreas is that it is very risky to remove. For someone that has an otherwise healthy pancreas that just doesn’t produce enough insulin, you pretty much have to keep what you have.

    For pancreatic cancers or a pathology that requires it be removed, the surgery to get rid of it is dangerous. The most common way is the Whipple procedure and it is considered to be the height of the game of surgery and I don’t think they even can take all of it out. There are a lot of tie in’s to other organs and major blood vessels and nerves around it, since it sits so deep within the boiler room.

    An external or an internal pump wouldn’t exactly necessitate a removal of the faulty organ, but when external hardware is the only option with no way to transplant, it goes to show how complex and important your pancreas is. More work / research needs to go to fixing what’s already there in my opinion.

    1. It’s not like it needs to be removed. There are islet cell transplant procedures, and they work. The problem is that they require immune system suppressants to continue working, and they seem to be forever in trial. As someone with type 1 and an otherwise kickass immune system (it killed my original islet cells just for kicks, as it were) I would gladly take the risk of any other disease and yet to get put on trial for an islet transplant apparently requires you already be well connected or luck into the right doctor.

      I stand with the comments above about not wanting /anything/ that can be wirelessly controlled determining my insulin intake. In addition the pumps and cgms require something like a 6″ length of (admittedly tiny) tubing to be placed under your skin. I tried and I couldn’t handle that. A lot of people can’t and don’t consider any bionic solution to be a cure for diabetes mellitus. That was a bit long winded perhaps. With all that said I wish the person luck in this endeavor, because any amount of freeing up the data collection and transmission from glucose monitors will only help diabetics manage their disease, regardless of the treatment options they pursue. Techies who aren’t familiar with what’s out there would be shocked at the primitive state of monitors, especially the lower cost ones.

  8. There is absolutely nothing difficult about closing the feedback loop on insulin pumps with continuous glucose monitors. The reason that billion dollar companies like Medtronic aren’t doing it yet is because the sensor is not accurate or reliable enough. My own sensor frequently declares me dead when it malfunctions, usually because I slept on it.

    If you hack away the human in the loop you’re likely to end up actually dead.

    1. Hey Peter, agree you do have the issue with sensor “noise”. There are many functions in the system to manage this, for example taking the advantage delta of the last 3 readings not just the most recent. Also feel free to read up more on OpenAPS.org about other safety limits of the system and pumps.

      Closed loop trials are already active in medical institutions.
      There are already DIY systems in use.

      It works – is there a risk, yes

  9. I use a Medtronic pump and that uses a strip meter that communicates results to the pump and the pump suggests actions and corrections. I also have a CGMS monitor which is an inserted sensor that checks BG continuously for 6 days and sends the results continuously to the pump – but for the most part you don’t need to use the CGMS more than a few days in a month just to check settings and overall BG regulation. All the control should be entirely in the pump.

    This in an interesting learning project but is really just reinventing the wheel. The the FDA and legal implications are huge and the big companies are already on it….. There is not really any reason to have a device like a smartphone in the loop and many good reasons not to. An app that evaluates trends in a medical setting from data uploaded maybe, but not as part of the bolus/basal control loop.

  10. “If you try to commercialize [your products], you run up against all sorts of regulatory barriers.” To which the author responds, “This should ring alarm bells. Regulatory barriers are there for a reason.”

    as working for a company that develops medical devices that are used by the customer (=patient) I strongly agree with this. In case of a commercialization there is a good reason that there are regulatory barriers as the customer of the product will (have to) rely on the product (as not everyone is a tinkerer).
    I guess in case of commercialization the debate is more or less the same with autonomous driving cars: who is liable if something happens. Can algorithms be perfect/adept to any situation?

    from a technical point of view: All therapy relevant data should be not only be saved once but also in a different way. This also applys for algorithms so basically every fault can be detected and prevented. Most medical devices are supposed to be single fault safe which means that in case of a first fault the system shall stay safe or emit an error. (There are systems that need to be available 24/7 hence an error message is not an option). Usually this is done by a two channel architecture (where the other channel is either on another chip (ideally from another manufacurer to avoid common mode errors) or implemented at least on a diverse manner. these channels can also be (partly) phisical and virtual and the important point is that the data is compared afterwards. Keyword: diversity in stead of redundance. Furthermore data security is a major issue especially if you transmit data (but also for stored data).
    Obviously this holds true for therapy relevant data and algorithms.

    So, in case of a insulin pump: you can kill a person just by overdosing Insulin. Hence therapy relevant commands (dose medication) should be utterly secured. In my opinion even calcuclated data from a continuous glucose measurement sensor that is then used for some kind of therapy advice (so not even closed loop) should be made to satisfy above mentioned standards.

    Speaking of standards: IEC 62508 pretty much covers the functional safety requirements mentioned above: https://en.wikipedia.org/wiki/IEC_61508

    So for the tinkerers I think it is okay to put your own life at risk. If you would make something that endangers others (like a homemade autonomous car) tinkering is not okay. But i guess this is common sense :)

  11. What you’d want with regards to the calculations is a base system that runs the Glucose checker and a system of automation in regards to administration of meds is one that runs separate checks and compares and averages the result into one cohesive result, rather than one check that runs x times to gain a result. Medical equipment that comes with Bluetooth, webserver, etc that can allow transfer of medical data is a useful prospect and one that could see a bigger usage in ‘open medical data’. Having apps that help with meds is useful but and here it is a big thing they need to be encrypted from the very start, otherwise the effects could be :-{.

    What open medical hackers offer is more feet on the ground working at solutions that do not run into the oldest issue of any medical breakthrough, cash. New investment in any area is hard to come by, but people in sheds and garages do not come at it from this perspective.

  12. That’s great! Several companies are working on the development of a wearable (instead of implantable) artificial (a.k.a. bionic) pancreas, including Pancreum (www.pancreum.com).

Leave a Reply

Please be kind and respectful to help make the comments section excellent. (Comment Policy)

This site uses Akismet to reduce spam. Learn how your comment data is processed.