// Collapsable Mobile Menus

The Which DIY Algorithm to Choose

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

Most of the information on the Loop and Learn website is focused on learning how to succeed with Loop.  But when deciding which DIY algorithm you should choose, consider the options.

  • The Loop algorithm is implemented only on Apple devices (iPhone/iPod) and uses a RileyLink compatible device to allow the phone to communicate with older Medtronic and Eros Omnipod pumps.
    • There are a variety of branches and forks for Loop available.
    • The Loop Master branch and one fork of Loop, referred to as FreeAPS, are compared on this page.
  • The OpenAPS Reference Design Zero and One (oref0 and oref1):
    • Implemented with older Medtronic pump 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, AndroidAPS uses a RileyLink compatible device for older Medtronic and Eros Omnipod pumps, direct communication for a few other pumps. 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 available when all objectives are completed.
    • In-process implementation on iPhone,  FreeAPS X  runs oref0 and oref1.  The FreeAPSX-master has limited local CGM choices, but with internet connection can use any CGM that sends values to Nightscout.  FreeAPSX-dev offers direct Dexcom support as well as the ability to use any CGM that sends values to Nightscout. If you believe you might want to try this algorithm and are a dedicated Apple user but a novice with DIY closed loop; our current recommendation is to build Loop/FreeAPS now. Later if you want to try FreeAPS X, it will be much easier given your Loop experience. FreeAPS X uses the same pumps and RileyLink compatible devices as Loop. It is not for novices in its current state.


  • FreeAPS is a fork of Loop
  • FreeAPS X is an implementation of OpenAPS algorithm on an iPhone

    Which Loop Branch to Choose?

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

    New Loopers should start with the Loop Master branch, but start with the dosing strategy at the default value of Temp Basal.  Once you’ve refined your settings and if you later want to try the automatic bolus dosing strategy, it’s a simple switch in the Loop settings.

    If you decide to start with the FreeAPS version of Loop because you like some of the features mentioned or you need to use one of the CGM that is natively supported by FreeAPS and not by Loop, then consider setting FreeAPS to mimic master behavior when starting and gradually turn on the extra features.

    Are you confused because you don’t know what the prior paragraphs mean?

    Initially, Loop used high temporary basals (“temp basals”) to deliver additional insulin in response to higher than expected BG without user intervention. As Loop developed, an alternative approach to correcting high glucose faster evolved that uses automatic correction boluses.

    The main Loop developers locked down the method for supplying the boluses with a simple interface (automatic-bolus dosing strategy).

    A different developer chose to make a fork (a complete copy of the code) called FreeAPS and provided their version of microboluses with significantly more options for configuring when to use micro-boluses versus temp basals or both at the same time.  FreeAPS also allows for additional continuous glucose monitor (CGM) options and a variety of user-requested features. (See FreeAPS branch comparison details below).  Click here for even more details about the many features of FreeAPS.

    The calculations for how much extra insulin (aka “Recommended Bolus”) is necessary is the same for Loop Master and FreeAPS. In both options, the amount of insulin needed is recalculated at 5 minute intervals (Loop Interval). In both options, the maximum allowed basal rate and bolus are respected. The difference is in how that extra insulin is delivered. The level of control available (in order) is:

    • Master = Temp Basal Only dosing strategy or Automatic Bolus (Experimental) dosing strategy (40%)
      • The 40% can be modified by customizing the code and building again
    • FreeAPS = Temp Basal and/or Microbolus (up to 100%)
      • The use of Temp Basal and fractional percent for Microbolus is adjustable inside the app (no rebuild required to modify)

    Loop Master 

    As of September 2021, the Loop Master branch (currently v2.2.6) gives the user the flexibility to select either Temp Basal Only or Automatic Bolus (Experimental) as the dosing strategy.  As a default, the dosing strategy in Loop Master is set to the Temp Basal Only and uses temp basals to manage insulin dosing.

    Temp Basal Only uses a combination of automated temporary basals and manual meal-time and correction boluses to manage blood glucose.

    1. When your blood glucose (BG) is at or above target, Loop determines the amount of Recommended Bolus based upon your settings.  Subject to your Delivery Limits, Loop will deliver the Recommended Bolus over 30 minutes by dispensing equal amounts of insulin every Loop cycle (approximately every 5 minutes) via  positive temp basals (i.e., increase in your scheduled basal rate) to increase your IOB. This decision is re-evaluated during every Loop interval.
    2. When your blood glucose (BG) is below target, negative temp basals (i.e., reduction of your scheduled basal rate) are used to reduce your IOB. This decision is also re-evaluated during every Loop interval.
    3. When you record a Meal, Temp Basal Only will recommend a bolus that you can accept or modify and then press Deliver.
    4. You can manually bolus at any time by pressing the Bolus icon in the center of Loop’s Main Screen.

    Automatic Bolus (Experimental) uses automatic bolusing to deliver correction insulin.

    To enable automatic boluses with Loop, click on Settings – Dosing Strategy – Automatic Bolus (Experimental):

    1. When your blood glucose (BG) is at or above target, you receive 40% of the Recommended Bolus at every Loop interval while the scheduled basal rate is unchanged.
    2. When your blood glucose (BG) is below target, negative temp basals (i.e., reduction of your scheduled basal rate) are used to reduce your IOB. This decision is re-evaluated during every Loop interval (same as Master Branch #2 above).
    3. When you record a Meal, you can accept the suggested bolus, or let the Automatic Bolus dosing strategy provide a bolus equal to 40% of the Recommended Bolus at every Loop interval.
    4. You can manually bolus at any time by pressing the Bolus icon in the center of Loop’s Main Screen (same as when using Temp Basal Dosing Strategy).  Any bolus recommendation that you see when you press the Bolus icon will be 100% of the Recommended Bolus.

    Now that Xcode 13 has been released, Loop v2.2.6 must be built with a Workspace build. The Build Script for Workspace builds is actually easier than the traditional zip file method. This can be built on an iPhone using iOS 12 or later, including iOS 15.


    What makes FreeAPS unique is that it has many user-defined Settings.  You determine the combination of temp basals and bolus % that are right for you.  As a default, FreeAPS is set to use temp basals to manage blood glucose – in the same manner as the Master Branch. For greater detail on using FreeAPS, please visit the FreeAPS page.

    When you first install FreeAPS, please leave Microboluses disabled in FreeAPS settings AND disable Adaptive Nonlinear Carb Model in iPhone settings.  This set-up will give you a branch very similar to the Master branch plus the additional CGM options.  Important Notice for those using Omnipod: If you ignored the pre-build warnings to make sure that your Looping phone and Pod are using the same time zone, please do not take any of the steps below until you access your Loop settings and click on Change Time Zone in order to avoid the Time Zone bug.

    If You Have Never Used Automatic Bolus as a Dosing Strategy

    You should ease your way into FreeAPS microbolusing, click on Settings – Microboluses- Enable Without Carbs, and then set your Partial Bolus Application (PBA) to 20% and your Basal Rate Multiplier (BRM) to a number consistent with your Maximum Basal Rate. This will give you a chance to double-check your settings before fully deploying Microboluses.

    With these settings, you’ll record meals just as you ordinarily would in Master and you’ll manually bolus.  Over time, you can Enable With Carbs, increase your PBA and decrease your BRM.

    If You are an Experienced AB Looper

    Click on Settings – Microboluses – Enable With Carbs and Enable Without Carbs and set your PBA to 40% and your BRM to 1x.  This set-up will give you a branch very similar to the current AB Branch.

    Over time, you can increase your PBA and adjust your BRM.

    The BRM determines the extent to which you receive extra insulin via temp basals versus microboluses.  If the BRM is 1, then only microboluses are used.

    If the BRM is set to Max basal limit (scroll down to the bottom of the BRM screen), then any Recommended Bolus will be delivered via temp basals up to the amount of your Maximum Basal Rate.  Of course, if you want to receive only temp basals, its very easy to click on Settings – Microboluses – and click Enable With Carbs and  Enable Without Carbs so that their checkboxes are no longer green.

    FreeAPS must be built using Loop Workspace.  FreeAPS only works on iPhones using iOS 13 or later.

    How much more insulin is delivered?

    I’m sure that by now, you’re asking yourself how much more insulin is delivered using Loop Master with Temp Basals Only as your dosing strategy vs.Loop Master with Automatic Bolus as your dosing strategy vs. FreeAPS. 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 (Loop Master with the Automatic Bolus dosing strategy or FreeAPS) really 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 Master with the Dosing Strategy set to Temp Basals Only, and AB is Loop Master 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, the Master Branch (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 (Experimental) dosing strategy selected (referred to as AB in the diagrams on this page), the Master Branch will deliver up to 40% 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 the AB (Experimental) dosing strategy and FreeAPS deliver almost the same amount of insulin within a 30 minute period (6 Loop intervals).  However, the difference in how fast the insulin is delivered is significant.  WithAB (Experimental), you receive 40% of the remaining Recommended Bolus every Loop interval, so 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 please please, set safe Delivery Limits (see Beginning Settings chart above).

    Skip to content