Get your rig hardware¶
You have two main options for hardware:
1. The most recommended rig has been an Edison + Explorer Board. Unfortunately Intel stopped making the Edison boards as of 2018. If you can find an Intel Edison (eBay, local stores, etc), this is still a highly recommmended rig. It is the smallest rig (and easily portable), with better battery life because it is power efficient. See below for the list of hardware for Edison setups.
2. The other option is a Raspberry Pi-based setup, with the new Explorer HAT. This rig setup makes it easier to see information when offline because it has an onboard screen for displaying readouts. See below for the list of hardware required for Pi/HAT setups.
Hardware information for Pi-based setups with the Explorer HAT¶
Summary of what you need for a Pi/HAT rig:
As of April 2018, there is be a Pi+HAT rig as an option for closing the loop with OpenAPS. The HAT can be ordered from the same place that makes the Explorer Board (click here to pre-order). We call it the “Explorer HAT”, to differentiate from the Explorer “Board” that goes with the Edison (see below).
You also need a Raspberry Pi. Many users are opting for the “Raspberry Pi Zero WH” - with headers - so you don’t have to solder, and can simply add the HAT onto the Pi. See this PiZeroWH from Adafruit, or from other sellers around the world
As an alternative, you can also use the HAT with a Raspberry Pi 3.
Lipo batteries are typically used to power the rig on the go because they charge quickly and come in a variety of compact sizes. When choosing a battery, you have a trade-off between a larger battery with longer duration or a smaller battery with shorter duration that is easier to carry around. A 2000 mah battery is roughly the size of the Raspberry Pi0, and can last around 4 hours. You’ll want a “1S” type, which uses a single cell and outputs at 3.7 VDC. It needs a JST connector to plug into the Raspberry Pi. See this battery from HobbyKing.
If you will need to run longer than that while unplugged from wall power, consider a portable charger. These are in widespread use for cell phones and commonly available in a large number of sizes. Here is an example portable charger from Amazon. Using a USB to micro-USB adapter you can power the rig from the portable charger by plugging the charger into the Power port, which is the micro-USB port nearest the corner of the Pi0.
Note: You will probably want to underclock your Raspberry Pi to get a longer battery life. See this for details.
An 8 GB SD card should provide plenty of space for the linux operating system, OpenAPS code and storage for log files. The ability to use larger and removable storage is one of the advantages of the Raspberry Pi. You can get a MicroSD card and adapter from Adafruit when you order your Pi and Hat. Or you can get an equivalent 8 GB SD card from Amazon or other sellers.
Note about Pi+HAT cases¶
Because we are still optimizing the software to be as power-efficient as possible, we have not narrowed down on the best recommended battery. You may want to use a soft case for ease of access to the components, flexible arrangement and the ability to use a variety of battery sizes. If you are using the 2000 mah battery above, you can use this 3d printed hard case to protect the rig and battery in a relatively compact package. The design is built in OnShape, which has a free access level subscription for public domain documents. You can make a copy and tweak the design to your liking.
Hardware information for Intel Edison-based setups¶
The high level parts list (see below for more details, and links):
- Explorer Board Block
- Nuts and Bolts to attach the Edison to the Explorer Board Block
- At least one Lithium battery
- 2 USB cables
Explorer Board Block¶
The recommended board to use is the Explorer Board Block, which was co-designed by this community. It also has the benefits of a built-in radio. It’s only available from Hamshield/Enhanced Radio Devices.
There are 4 types of Edison’s. All of them work, but Versions 3 and 4 require an extra antenna, so 1 and 2 are preferred (1-EDI2.LPON, 2-EDI2.SPON, 3-EDI2.LPOF, and 4-EDI2.SPOF). If the seller does not specify the Edison model/version, you can see from the picture whether or not it has a white ceramic antenna in the corner. If it does not, then it will require an external antenna, but that version is fairly rare.
- Option 1 - Buy it from places like Ebay, Craiglist, or your nearest store - and follow the instructions to flash it.
- You may need to hunt for an Edison as supplies of them are dwindling - if you get it as part of a “kit” (i.e. breakoutboard + Edison), keep in mind you’ll still need to get the Explorer Board Block from Hamshield.
- Note: If you are doing Option 1 (an Edison from wherever you can find it) - you are getting an UNFLASHED Edison. Not a big deal - flashing it with jubilinux is just a few more steps (~15 minutes) - but remember you’ll need to start with the flashing instructions. Follow the steps for flashing on (a) all-computers page (with the most comprehensive troubleshooting section); b) the Mac-specific flashing page; or c) the Windows-specific flashing page), but stop before installing wifi and other steps and instead jump over to the “Install OpenAPS” page from there.
- Option 2 - (previously buy an Edison that is already flashed with jublinux when supplies were available. If you get a pre-flashed Edison, you can start installing and setup OpenAPS. (You would not need to “flash” the Edison).
Lithium-ion polymer (LiPo) battery or other battery supply¶
The Explorer Boards have battery charger circuitry on board, making it easy to use a LiPo battery.
- The example setup uses a 2000mah LiPo battery; also Lithium Ion Battery - 3.7v 2000mAh or Adafruit Battery Packs Lithium Ion Battery 3.7v 2000mAh are similar options, although many people prefer a higher capacity battery to get a full day from the rig (such as Adafruit Lithium Ion Polymer Battery - 3.7v 2500mAh (PRODUCT ID: 328) and the Adafruit Lithium Ion Cylindrical Battery - 3.7v 2200mAh (PRODUCT ID: 1781)). This battery uses a 2mm 2 pin JST connector to match the Explorer boards’ power plugs.
- For people in the UK, you may find you have to shop around to find the correct battery, as shipping restrictions appears to have reduced the supply somewhat. Pimoroni appear to stock the same Adafruit 2000mAh battery as mentioned above. Another source looks to be Cool Components, but you may find shipping costs expensive. CAUTION: RS Online sell a similar battery, but unfortunately it comes with the wrong JST connector (it comes with a 2.5mm JST XHP-2, and you need a 2mm JST PH). It is possible, however, to buy the right connectors and fit them yourself (numerous ‘how to’ videos on YouTube).
- For people in Australia you can find 2000mAh, 2200mAh and 2500mAh batteries from Little bird electronics, prices are very competitive and shipping is quick. These are the same Adafruit batteries that can be obtained from the US above.
Note: It’s best to buy from a reputable supplier, because if the internal two cells are mismatched the Explorer board cannot charge them seperately and they are prone to catching fire. Make sure that it includes a protection circuit to protect over-discharge. NEVER connect the battery to an Explorer board the wrong way round. There is no manufacturing standard so never assume correct polarity. The connector JP1 on the Explorer Block has two terminals. The left side is positive, the right side is negative. The side with the JP1 label is the positive side. Typically a battery’s red wire is the positive wire. Ideally you want a battery that has a 10k ohm thermistor for temperature protection by the Edison too.
You can also use any charger with a USB plug, including a wall power charger. The Explorer boards have pass through charging, so this is also how you will charge the LiPo battery.
You should monitor the rig periodically - especially the LiPo battery, checking for swelling or damage. Immediately discontinue use of any battery that shows sign of swelling or damage.
Radio stick (only if not using Explorer board)¶
We recommend an Explorer Board with a built-in radio (see above), because if you get an Explorer Board, you don’t need an additional radio stick or CC-Debugger.
If you don’t use an Explorer board, you can use a number of radio sticks: a TI-USB-Sticks, running subg_rfspy; Wireless Things ERF; Wireless Things Slice of Radio a Slice of Radio; or a Rileylink. For details about setup with these other stick and board options, the best instructions will be found in the mmeowlink wiki for setting up your board and stick. Note you may also need a CC debugger for these, and also note that it will be more work as the documentation is designed for the Edison/Explorer Board setup as the easiest path forward.
You will need two micro USB cables - with a micro connector on one end and a standard (Type A) connector on the other. Most cables will work fine, but some prefer to select lengths. You may already have one for charging a Dexcom receiver, or an Android phone, lying around at home. If you don’t, here’s an example of one that will work: Monoprice Premium USB to Micro USB Charge, Sync Cable - 3ft.
Warning: bad cables cause a lot of headaches during the Edison flashing process, so it may be worth verifying before you start if you have good cables that can transfer data.
Optional: Micro USB to Micro USB OTG Cable for offline looping¶
You may want to connect your Dexcom receiver (G4 or non-touchscreen G5) to your Explorer Block for offline looping. For this you will need to use a micro USB to micro USB OTG cable (or an OTG adapter). Here is an example of a cable that will work: BestGameSetups Micro USB to Micro USB OTG (On-The-Go) 12” (30cm) Data Cable.
Nuts and Bolts¶
You will likely want to screw your Edison onto the Explorer Block to stabilize the rig. There are two methods to do this. The simplest is to order a kit like the Sparkfun Intel Edison Hardware Pack, which provides standoffs, screws, and nuts specifically designed for the Edison. Alternatively, you can use (2) M2 screws and (2) M2 nuts and (4) M3 nuts (M3 or a bit larger to used as spacers). In this configuration, the screws should be just long enough to fit through the spacer nuts and screw into the M2 nuts on the other side. (Note: Sparkfun is no longer selling these screw kits. There were some available in April 2018 at Mouser.
You can use a variety of cases, either soft or hard. Make sure to check the case design to make sure it will support your preferred rig setup and battery size/type. Also, be careful with inserting your rig into some 3D-printed cases so you do not harm the board and/or the battery.
- TallyGear soft case - these are the soft cases Dana uses (see this example). The OpenAPS-sized case can be made any any pattern/fabric she uses elsewhere on the site.
- JD Burrows SD card case - this is a hard / soft case which fits the rig with a 2500mAh battery perfectly, can also fit a spare AAA pump battery (Australia)
Warning: be careful if you select a hard case. Some may be designed for a certain size/shape battery; and attempting to jam a rig in may harm the board and/or the battery.
Also: a hard case may make you less likely to look at your rig directly. You should monitor the rig periodically - especially the battery, checking for swelling or damage. Immediately discontinue use of any battery that shows sign of swelling or damage.
Generic hard cases:
- RadioShack Project Enclosure (3x2x1 inch)
- Small clear plastic case perfect for larger Sparkfun 2000 mAh battery: #8483
- Small Plastic Clear Case for 2500 mAh battery - Since a Tic-Tac box is too small for the 2500 mAh battery.
Cases for Edison plus battery:
- Ken Stack’s 3D design for a case with the battery next to the board
- Rob Kresha’s design with the battery compartment stacked on-top of the board compartment
- Gustavo’s 3D design
- Sulka Haro’s 3D design
- tazitoo’s 3D design: CAD (or STL for 3D printing)
- danimaniac’s Protective Cases & Accessories
- Luis’s ventilated acrylic simple design
- Robert Silvers and Eric Burt’s case for Explorer and 2500 mAh battery
- Robert Silvers’ case for Explorer and 2000 or 2500 mAh battery
- tynbendad’s case for 18650 battery
Cases for Edison plus G4 receiver: