// permanent fix for 3 instead of > // divi mobile menu collapsing effect

Which DIY Algorithm to Choose

There are several do-it-yourself (DIY) closed loop algorithms. The best known are Loop and OpenAPS, with several implementations for each. Both algorithms require careful attention to settings and there is a learning curve for each. Some prefer Loop (iPhone only); some prefer OpenAPS (rig, Android or iPhone); most believe that any closed loop algorithm is better than manual control, which is why #WeAreNotWaiting.

Most of the information on this website concentrates on using Loop

Loop:

The Loop algorithm is implemented only on Apple devices (iPhone/iPod).

  • The released version is commonly referred to as Loop-main or Loop 3.#.#, and supports both Omnipod DASH and Eros, as well as some older Medtronic Pumps.  A radio-link device is required for all pumps except for the Omnipod DASH.
  • There are a variety of branches and forks for Loop available, which are compared in Which Loop Version to Choose?, below on this page.

OpenAPS:

Follow this link to find out more about the OpenAPS Reference Design.

  • Implemented with older Medtronic pumps using a battery operated single-board computer to run the algorithm.
    • The “rig” has a radio to talk to the pump.
    • The user enters data via the pump and Nightscout; and edits preference files to modify configurations.
  • Implemented on Android phones with a variety of pump and CGM choices: AndroidAPS.
    • Uses a RileyLink compatible device for older Medtronic and Omnipod Eros pumps
    • Direct (Bluetooth) communication for a few other pumps, including Omnipod DASH
    • User interface contained locally on the Android phone.
    • Must complete objectives while learning the system to progress through levels of complexity.
    • Plan to spend weeks progressing from open loop to full access of the oref1 features.
    • Additional automation is available when all objectives are completed
  • Implemented on iPhone, iAPS (used to be called FreeAPS X)

    Which Loop Version to Choose?

    If you have decided to use the Loop system, you need to decide which version should you start with.

      Loop

      This version is supported by the developers with documentation and build instructions found at LoopDocs.

      A major update to Loop, known as Loop 3, was released in January 2023; with minor updates since then.

      You may see some people refer to this as Loop-main; main is the name of the branch where the current released version is found. The release status is found at Loop Releases, but be sure to follow the directions for building Loop from LoopWorkspace.

      Here are a few reasons for using Loop 3.

      • You can build Loop 3 using either a Browser Build (no Mac required) or a Mac-Xcode Build.
      • Onboarding protocol with guardrails ensures all settings are entered
      • Streamlined main screen display and settings screens provide improved user experience
      • Better alerts and notifications assist the user
      • Added Features are available:
        • Fingerstick blood glucose prompts when data is stale
        • Non-pump insulin entry within the app
        • Manual Temp Basal feature that automatically restores to closed loop at end of selected duration
        • Remote Carb/Bolus capability

      New Loopers should start in Open Loop (with the Closed Loop switch in the disabled position). When transitioning to Closed Loop, begin with the Dosing Strategy at the default value of Temp Basal.  Once you’ve refined your settings, if you want to try the automatic bolus dosing strategy, there are switches in the app settings to enable the more advanced features.

      Loop with LnL Patches

      A word about open-source:

      • Open-source software is provided for the public to use and modify as desired.
      • The GitHub repositories (LoopKit for Loop and loopnlearn for Loop with LnL Patches, FreeAPS and some customization options) are controlled by individuals who contribute to the community by providing code they believe works properly.
      • When a new release is provided by the developers at LoopKit, the loopnlearn team updates Loop with LnL Patches as quickly as they can.
      • Users choose when to build and are asked to report back if they discover any problems.

      Loop and Learn provides a customized branch of Loop 3.#.# (main_lnl_patches) that enables people who want these customizations to easily add them. This is available with the Build Select script and using the GitHub (Browser Build) method. This version is only found at the loopnlearn GitHub repository.

      It is not supported by the main Loop developers – it is a community provided resource encompassing input from several DIY users.

      • What is added with LnL Patches
        • The CustomTypeOne LoopPatches customizations
        • Two additional CGM clients that support some Libre sensors
        • A modified Loop logo to indicate this is a customized version

          FreeAPS

          Warning – FreeAPS sunset is approaching

          • There will be limited support for FreeAPS in the future
          • There is the chance that the next iOS or Xcode update could “break” FreeAPS and you would need to migrate to another Loop branch or fork.
          • Please build Loop 3 or Loop with Patches

          The FreeAPS fork of Loop was created by Ivan Valkou who is no longer supporting it. It is maintained by the Loop and Learn team at the loopnlearn GitHub repository.

          There are some patches, Loop with LnL Patches, which have been added to the released version to accomodate some features users of FreeAPS want to have available.

          • Release Notes for loopnlearn FreeAPS.
            • Note that FreeAPS is based on Loop 2.2.x and does not include the feature enhancements or safety improvements in Loop 3
            • To learn more about FreeAPS or to build FreeAPS using the FreeAPS Build Script, click here.

            A Warning about Multiple Apps

            There are a lot of DIY apps out there that use a shared appGroup and store their data in Apple Health.  This enables code to share information – but this also enables code to share information.

            What does that mean?  If you have one DIY app reading and storing CGM information, that CGM information might be shared with another DIY app.

            This can be a good thing, but it might have unintended consequences.  Once you decide which DIY app to try, limit the installed versions on your phone to that selection.

            And if you decide to have more than one app on your phone that can control a pump – be absolutely certain that only one is actually controlling your pump.

            What are app names that might share app groups and write to Apple Health?

            • Loop
            • FreeAPS (fork of Loop)
            • iAPS (OpenAPS implementation for iOS)
            • xDrip4iOS
            • libre-direct (aka Glucose-direct)

              How much more insulin is delivered?

              This is an old section but people like to refer to it. Until it gets updated, it will stay on this page.

              How much more insulin is delivered using Dosing Strategy of Temp Basals Only compared to Automatic Bolus (40% with Loop) or FreeAPS using one of the Microbolus options. Well that’s a trick question.  As long as you aren’t bumping up against limits, the answer is that effectively the same amount of insulin is delivered over time.

              There are times when automatic bolusing makes a big difference in blood glucose (BG) management:

              1. Corrections:  Insulin for corrections gets into your system faster.
              2. Meals:
                • Long absorbing meals
                • Meals that you forgot to bolus.

              Pro-Tip:  All Loop versions achieve the best results when you include protein and fat in your meal bolus. The automatic bolusing versions are better at correcting for those times when you forget.

              It is very important to know how Loop operates and be careful to set safe Delivery Limits for Maximum Basal Rate and Maximum Bolus.  Here’s a quick reference guide to help you set safe Delivery Limits as you start Looping.

              In the tables below, Master is Loop-main with the Dosing Strategy set to Temp Basals Only, and AB is Loop Main with the Dosing Strategy set to Automatic Bolus.

               

              In the example below, you can see how quickly your extra insulin is delivered using Master, AB and FreeAPS.

              With the Temp Basal Only dosing strategy selected, either Loop or FreeAPS (referred to as Master in the diagrams on this page) will deliver up to 17% of your Recommended Bolus every Loop interval. With the Automatic Bolus dosing strategy selected (referred to as AB in the diagrams on this page), Loop will deliver up to 40% of your Recommended Bolus every Loop interval, but with FreeAPS, the % of Recommended Bolus that you receive is based upon your Partial Bolus Application (PBA). You can set your PBA to any % that you’d like from 10% to 100%.  In the example above, FreeAPS is set at 60% and 80% for comparison purposes.

              Warning:  Unless you’re a very experienced Looper with excellent settings and your current sensor readings are verified to be stable and accurate, do not use a PBA above 80%.

              In this example, with scheduled basal set at 1u/hour and Maximum Basal set at 3u/hour, Temp Basal Only delivers the least amount of insulin because it is bumping up against the  Maximum Basal Rate. The most basal that can be delivered in 30 minutes is 1.5u (0.5u as regularly scheduled basal + 1u as temp basal). With a scheduled basal of 1u/hour and a Recommended Bolus of 2.1, you’d need to have a Maximum Basal Rate of 5.2u/hour (1u/hour as scheduled basal + 4.2u/hour for 30 minutes as temp basal) in order to receive the entire Recommended Bolus amount as temp basals over a 30-minute period.

              You’ll notice that all these dosing strategies deliver almost the same amount of insulin within a 30 minute period (6 Loop intervals), unless the max Temp Basal rate is limiting it (first column).  However, the difference in how fast the insulin is delivered is significant.  With AB (40%), after 5 minutes, you have received 40%, but after 15 minutes, you have received almost 79% ((0.85u+0.50u+0.3u)/2.1u).  Whereas after 15 minutes with FreeAPS, you have received almost 93% ((1.25u+0.50u+0.20u)/2.1u) at a 60% PBA or 100% ((1.7u+0.30u+0.10u)/2.1u) at a 80% PBA.

              Because of the speed at which automatic bolusing delivers insulin without any manual intervention on your part, it is important to have solid settings before you decide to enact either autoboluses or microboluses.  It is also worth mentioning how much more insulin you get with the  Temp Basal Only dosing strategy (referred to as Master below) at a Maximum Basal Rate of 5.2 in comparison to 3u/hour.  As you start your Looping journey, please set safe Delivery Limits (see Beginning Settings chart above).

              Skip to content