Skip to content

Omnicore DIY hardware

dexdan edited this page Jan 6, 2020 · 5 revisions

Introduction

Omnicore does not need special hardware beyond RileyLink. However, the hardware can be improved upon, and various custom hardware solutions are possible. This page details some of them, all of which need electronics/soldering skills. (If you do not have these skills, local mobile phone repair shops may be willing to do the work for you).

• A replacement ceramic antenna, which improves RileyLink reception / range but keeps it in the same form factor.

• A replacement balun (a SMD component on the RileyLink board) which improves RileyLink further.

• Mounting RileyLink in S7 phone case (similar idea can be applied to other phones).

• RileyLink attached to back of phone using 3D printed case.

• Waterproof swim-compliant RileyLink with wireless charging, including custom wire antenna design.

Overall, improving the antenna / balun will extend the reception / range, meaning the RileyLink can be further away from the pod and still work OK. It will also reduce the number of pod ‘screamers’. So if you are having problems with range / disconnections or screamers replacing the antenna (as a fairly straightforward first step) and balun (as a trickier second step) are worth considering.

Replacement ceramic antenna

The default 433mhz RileyLink is supplied with a helical antenna. This is generally OK but it can be replaced with a Johanson 0433AT62A0020E ceramic antenna, which will give a 10-15% improvement in reception. The RileyLink should continue to fit in the default case.

It is a fairly easy change, for someone with basic soldering skills, and is worth doing. Please note that, while the ceramic antenna works well for Omnicore, we have had some reports that the ceramic antenna may not work well with Loop (giving problems with pod pairing).

This antenna is available from ebay, Amazon, and electronics suppliers such as Farnell, Digikey, Mouser etc (ebay / Amazon probably best as the electronics suppliers tend to have large shipping charges). To fit this, there are two slightly different approaches – take your pick:

  1. Unsolder the old helical antenna. Flux one corner of the new ceramic antenna terminal (the end with the beige rectangle) and tin it with some solder. Use electrical tape to cover the pad next to the antenna pad (this is to stop a short). Flux the antenna pad on the board. Place the antenna in position (hold it temporarily with tape). Heat with an iron from the top until the solder joins.
  1. Snip off the old antenna, leaving a 1mm vertical stub. Use electrical tape to cover the pad next to the antenna pad (this is to stop a short). Flux the stub and tinned the end of the aerial then put a drop of solder on the flat of the iron and touched it to the stub. The solder ran down and joined both.

Replacement balun

A balun is a component which ‘matches’ the radio signal produced by an integrated circuit with the antenna used. The 433mhz RileyLink is supplied with a 915Mhz balun (originally designed for Medtronic pump use) which works, but not as well as it might do for 433mhz omnipod use. It is therefore possible to replace the default balun with a more appropriate balun - the Johanson 0433BM15A0001E. This will give a 10-15% improvement in reception (combined with the ceramic antenna replacement, this will give a 20-30% reception improvement). The RileyLink will continue to fit in the default case.

This is a fairly tricky SMD soldering job: the component is just 2mm long with 0.3mm pin spacing. But it is worth doing if you have the skills to do it. If you do not have SMD soldering skills, I highly recommend you watch these videos about SMD soldering techniques: https://www.youtube.com/watch?v=4OYakUQmgd0 and https://www.youtube.com/watch?v=_g8mvs482Ng. This photo shows the balun marked; note the orientation, with the dot away from the CC1110 IC:

Parts needed:

Johanson 0433BM15A0001E balun - available from electronics suppliers such as Farnell, Digikey, Mouser etc (not on ebay / Amazon at the time of writing). You might want to buy 2 or 3; these things are smaller than a grain of rice and if you drop one, you might not find it!

• Bismuth solder for desoldering, such as Chip Quik Low Melt 58C SMD Removal Alloy. You won’t need much – there are some ebay suppliers supplying it in single lengths; electronics suppliers tend to supply tubs with lots of lengths which are quite costly and you won’t need that much.

• Solder paste such as Chip Quik SMD291AX. Available from electronics suppliers such as Farnell, Digikey, Mouser etc.

• Liquid flux, such as Topnik TK83. Available from ebay or electronics suppliers such as Farnell, Digikey, Mouser etc.

• De-solder braid / wick.

• IPA 99.9% alcohol for cleaning.

• Cotton buds.

• Cocktail sticks.

• Heatgun – a 1500W paint-stripping type heatgun, with 2/3 temperature modes and a small head. Various available thru ebay or local hardware stores. (Or you could spend 40x as much on a SMD soldering station, but you won’t need it!!)

• Heat mat

• Normal soldering iron

• Magnifying glass / eye loupe

• Needle-nose tweezers

Steps as follows, but essentially you need to follow the same kind of steps as in the youtube videos above. Before starting I would recommend practicing some SMD soldering with an old board (I practiced on an old DVD player board).

  1. Apply flux.

  2. Heat old balun with an iron, and apply bismuth solder liberally.

  3. Flick old balun out of the way with an iron or with a cocktail stick.

  4. Dip solder wick in flux, then put that on top of the bismuth solder with iron to wick it all up.

  5. Clean area with ipa, using a cotton bud. Check board is clean (shiny pads) and as solder free as poss.

  6. Lightly heat board with heat gun (a few seconds on lower setting).

  7. Apply a very small amount of solder paste to the 6 pads. A warm board will mean it will 'flow' on. (Note this is one technique not shown on the youtube videos but it is helpful to do this way to avoid getting too much solder paste). You need to ensure that there is paste on every pad BUT not too much*; it doesn't matter if the paste bridges the pads as it will shift away from them when heated.

*You don't need much but it does need to go on all pads. Typically you will have too much paste if a thick line is on top of the pads like in some of the videos. I examined with a magnifying glass at this point and removed a bit of excess paste (and a filament from a cotton bud that could have caused problems!) with a cocktail stick.

  1. Place balun in place with tweezers; ensure correct orientation (dot away from IC). Check again orientation/position and that there is paste under each pad.

  2. Heat with heat gun, keep it moving, low setting to start then blast on hot in the last second once solder starts melting.

  3. Remove heatgun. Check with magnifying glass for any solder bridges. If so v gently sort those out by fluxing then applying soldering iron and flicking out of way with iron or cocktail stick.

  4. Done! Best of luck.

RileyLink in Samsung S7 power case [by @dexdan]

Here is how to put RileyLink (433) in a Samsung S7 battery case. It allows for use of aaps+omnicore with no hardware beyond the phone in its case. PLEASE NOTE this needs electronics / soldering skills so read thru and check you are confident to attempt it before starting.

  1. I used this case - https://rover.ebay.com/rover/0/e11011.m43.l3160/7?euid=5016bbf3eb8c4d04bd4ee64c3eef40f4&bu=43165446585&loc=https%3A%2F%2Fwww.ebay.co.uk%2Fulk%2Fi%2F332929203308&sojTags=bu=bu

  2. Open case - remove faux velvet sticker, undo all screws (?6), remove metal plate, undo plastic clips and it separates into two.

  3. Desolder the battery. Snip away & desolder the large USB power socket.

  4. Prepare RileyLink - snip away and desolder white JST battery connector, solder on wires in its place.

4 a. I would recommend replacing the balun as detailed above. Without doing this, the reception may not be good enough with this case setup to avoid screamers etc.

4 b. Remove black socket covers on programming pins.

RileyLink with power wires and socket covers removed

4 c. Desolder antenna, replace it with 18cm piece of solid core wire (see below re tweaking the length). Alternatively, you are likely to get better results by using Edward’s custom antenna – see next section below.

4 d. I also used a silicone conformal coating to waterproof the RL - I was trying to get a silicone spray one but couldn't get it so used this one instead which you apply like nail varnish to both sides - https://rover.ebay.com/rover/0/0/0?mpre=https%3A%2F%2Fwww.ebay.co.uk%2Fulk%2Fitm%2F171365019664 . I made sure to mask the switch & USB connector so not to gum them up.

4 e. I put electrical tape on the back of the RL board to insulate it from the case charging circuit.

RileyLink testing for size / basic orientation in case

  1. Prepare case - get a small SMD switch (like this:  https://rover.ebay.com/rover/0/0/0?mpre=https%3A%2F%2Fwww.ebay.co.uk%2Fulk%2Fitm%2F163792239569 ) and solder wires to it (middle/end poles). Super glue it down to case where the USB opening is. Make sure it is recessed sufficiently so the throw doesn't protrude/get caught but is also accessible with a pen. Tape down wires to stop movement.

Switch with wires glued in place

5 b. Create a protection around switch with sellotape, and make a 'back' to allow gluing of the usb aperture so it doesn't fill too much. Use epoxy to fill this - aim to create a solid window where usb aperture is, without gumming up the switch. Allow 24hrs to set.

Switch window created

5 c. Place RL into case - RL USB power socket down and facing bottom of case. Use a Dremmel with a small routing bit to cut away some case to allow this to fit. I needed to cut a little trough to allow space for RileyLink USB. Make sure switch on RL board turned on.

5 d. Run wire antenna up the left side of case (side furthest form usb aperture), gently bent round top. I needed to use a dremmel to cut away some of the notches to allow it to fit. Tape down the antenna.

Location of antenna along edge (these photos were actually taken after completion of later steps below

5 e. Solder one side of switch to +ve RileyLink power. Cover with heat shrink tube or electrical tape.

  1. Get a replacement battery. You need a smaller battery (around 4200mah but the physical dimensions are the most important) to put in place of the 6500mah battery removed from the case. Smaller size important so (i) RL will fit in case top-to-bottom and (ii) there is clearance for areal left to right. The 6500mah removed is dimensions 846088 (ie 8.4mm thick, 60mm left-right, 88mm top-bottom). You're looking for something like 845080 or slightly smaller. I found this difficult to source but found a perfect battery size using the battery out of this iphone battery case, which is 4200mah - https://rover.ebay.com/rover/0/0/0?mpre=https%3A%2F%2Fwww.ebay.co.uk%2Fulk%2Fitm%2F293048352985 (that case comes apart in similar way to S7 case... just get the battery out and chuck the rest!).

6 b. Secure battery down with double sided tape on the right hand side nearest the top (ie on USB aperture side).

  1. Check for fit with everything. Case charger circuit goes on top of RileyLink. You may need to Dremmel more case away to get Rileylink to seat far down enough.

  2. Solder power -ve side all together: battery, RL,  case. Ensure switch is off then solder +ve battery, switch and case.

  3. Test and adjust antenna. Turn switch on. Lightly place the metal case on top. Get Omnicore going, and use it to establish link with pod. Use 'update' status button to check db loss (between RielyLink and pod, not phone and RL) in conversations tab. Trim antenna down by 1mm and repeat 'update' button. Keep trimming till db worsens (ie gets a bigger -ve). eg If it was -55 then gets to -53 it has got better so trim another 1mm but if results on -56 it has got worse so stop trimming.

  4. Shut case. Clip together, replace metal plate, replace screws, replace faux velvet. I managed to damage the clips at the bottom which meant I needed to superglue shut to stop it gaping but shouldn't be necessary if you were careful!

  5. The end result... is being able to just carry your normal phone (albeit with a power case, albeit I always had one anyway), and nothing else to manage your diabetes except a pack of sweets... this is a big deal for me! It all works surprisingly well with Omnipod and AAPS+Omnicore. You can see the RL green LED through the epoxy which is a useful reassurance. When you need to charge your phone press the button on the case - this should give 1-2 charges (but don't exhaust the case battery entirely or the RileyLink won't get power).

In summary this is RL in a phone battery case, sharing the battery with phone backup battery; a wire antenna - up the side of the case (with about 12mm clearance from side of battery) and around the top; an accessible switch for RL.

On the question of transmission range - the case does not allow for as good a range as the RL in native case, but it is very much adequate. I found the RL in native case had a maximum range to pod of about 11m, although it was quite directional. This setup, with the wire antenna, has a shorter range (around 4m) but much less directional which is quite helpful for normal use. It works fine for phone in pocket during the day (regardless of pod location) and on bed headboard at night.

RileyLink attached to back of phone using 3d printed case (Stephane Achkar)

Please see details of this in Facebook post https://www.facebook.com/groups/TheLoopedGroup/permalink/2265309447019042/ and video https://youtu.be/zjlRRF2pwE4

Waterproof swim-compliant RileyLink with wireless charging (in three steps, by @Edward)

Some things to keep in mind... 3D parts are not waterproof. You can think of them as a sieve and under water the pressure is very high even at relatively low depths. This is sufficient to force water into most 3D designs. First off, you can paint the surface with acetone (nail varnish remover) and this will melt it just a tiny bit but enough to seal the plastic.

1) MAKE A BETTER AERIAL

It is also important to remember that radio waves and water do not play nicely (this is why submarines use sonar not radar and drag their aerials hundreds of metres behind for morse code communications). Google "signal attenuation". Basically the higher the frequency, the worse it gets.

Bluetooth uses 2.4GHz which for most CGM/phone combos gives a maximum range of about 5cm in fresh water and about 1cm in salt water. I use the Unihertz Atom (https://www.unihertz.com/atom) because it is waterproof and has an arm strap so you can strap the phone directly on top of the CGM (so long as you wear it on your arm). I tested this with a G6 and a Miaomiao/Libre with no problems in either a fresh water lake in Finland or the Atlantic ocean.

The omnipod uses 433MHz so the range "should" be 5.5x better than Bluetooth at the same number of decibels. Unfortunately the RL antenna is not very good and struggles to keep contact even in air sometimes. Radio theory tells us a few things to help: thicker aerial wires have less resistance which means more broadcast power; longer aerials work better than shorter ones.

The length of the aerial is very important (think tuning an analogue radio into a radio station, small movements of the dial - which change the aerial length - cause the station to quickly degrade into static). The aerial is normally either 1 wavelength, 1/2 wavelength or 1/4 wavelength.

Unfortunately the speed of light (radio is a kind of light) is also really important. The "optimum" aerial length in metres is (Speed of light in m/s)/(Frequency in Hz or "waves per second") so "metres/s" / "waves/s" = "metres * waves". To get the length, we make waves = 1, 0.5, 0.25 depending on the fraction of a wavelength we want...

Speed of light is 299'792'458 m/s, pod is 433 MHz which is 433'000'000 waves/s (does anyone know the real pod frequency?): 299'792'458/433'000'000 = 0.692361335 metre.waves which gives 69.24cm; 34.62cm; 17.31cm

The main issue is that these aerials are rather long so the solution used in the default RL aerial is to take a 1/4 wavelength aerial and wrap it in a tight coil. Unfortunately this coil is very directional in its signal so the risk of data loss is high if the aerial is not pointing at the pod. Bad data quality/signal strength = error 49 pod death and AAPS/SMB can have a lot of chatter with the pod.

I started experimenting using a very thin wire and a hybrid between a helix and a straight antenna. . However for water communication, a straight aerial made of thick copper wire is best. Unfortunately, the best length design I am unable to explain as it came from 1) a mistake I made with the maths followed by a day of trial-and-error optimising the winding pattern for the "wrong" length. 2) The observation that with a "correct" length wire it didn't work nearly as well!

For this project you will need the following things

  1. Some 1.5mm2 single core mains electrical wire; 2) a 5x90 screw or a small screwdriver wwith a 2mm diameter shaft; 3) some string; 4) a ruler; 5) wire cutters; 6) a potato peeler: 7) some tape; 8) some epoxy resin; 9) a Qi-mobile phone wireless charger; 10) some acetone; 11) a 3D printed case (see below)

Measuring wire accurately is almost impossible because it is very hard to keep straight. Take some string and measure that to 26cm in length. Tape it every few cm to the wire. Add 5 mm to the end (you will have lost this much in tension errors) and cut. Bought at https://www.obi.ch/

Next you need to remove the plastic insulation. The easiest method I found was to use a standard home potato peeler and cut the plastic insulation off by just slicing parallel to the wire away from your body like peeling potatoes (the plastic does not burn or melt because mains wire is fire resistant and it is too long to pull off easily). strip away plastic

Measure 2cm from the end of the wire and put a mark with a pen. Measure an additional 17.3cm from the mark and put another mark, wrap the the wire tightly around the thread of a 5x90 screw. You then need to squash the loops together to make them effective (I don't know why) but it also takes up less space if you do this.

Alternatively, if you have a 2mm diameter small screwdriver then you can wrap the wire around that instead. It is easier to make tight coils on a screwdriver. Coil until you reach the mark. Your coil should be 17.3cm (1/4 wavelength).

Measure the length of the wire below the coil and trim it to 1.73cm (1/40 wavelength). Measure the long end of the wire and trim it to 6.9cm (1/10 wavelenght): 1.73 + 17.3 + 6.9 = 25.93cm (like I said, a stupid length)

Press a kitchen knife gently between each loop of the helix and wiggle just a bit. Check that none of the turns in the coil actually touch each other using a bright light behind the coil (this is important or you get a bad signal again).

Remove the aerial from the RL either by melting the solder (best) or using nail clippers (if it is stuck and really won't budge).

Then solder the new aerial onto the same spot (put a small bit of flux on the copper wire to ensure it sticks before you apply the solder)

Tune the aerial with nail clippers checking the signal strength all around it is as strong as possible. You need to check along the sides and end-on. Check the signal strength at 1m, 5m, in the next room, upstairs. An oscilloscope is safest but you can try with a real pod also (but it may fail). The optimum length will be somewhere between 5.6cm-6.4cm (seems to depend on the the coil density but it may also be that the best total length is 1/3 wavelength for this design (17.3+5.7 = 23cm which is about 1/3 of 69.2cm) again, no idea why... you can bend the long wire and force it into a box or for a longer range. Melt a small hole in the box using a soldering iron and have the copper stick out (much better range)

Does it work? Yes!

I put the phone/pi/hacked RL on the side of the bath, put a test pod in the bath stuck to the bottom using insulet pad under pod and started sending 2 unit bolus commands at different depths in open loop mode (via omnipy). Each tested twice with a five minute wait). Number is water depth

0 cm: obviously works 10 cm: instant response 20 cm: instant response 30 cm: delivery took 30 seconds for first attempt, adjusted RL position and second completed after 20 seconds ~40 cm: bolus not received, error 49 on second attempt (30cm ruler so exact measurement hard, this is the limit of my bath also!)

Obviously, your mileage may vary but unobstructed error free comms for at least 20cm underwater is a huge improvement.

2) ADD A WIRELESS CHARGING LOOP

If you look on the underside of the RL, you will see two holes which are labelled "Alt.PWR" on the top side. These can be used for direct charging of the RL battery. Note carefully the + and -. The charging loop has a top and a bottom. The plug will wrap up to the side that should be away from the charger. Note the + and -. These refer to the two outer most wires on a microUSB charger (the cheapest). Cut off the plug and carefully solder the + on the charger to the + on the underside of the RL. Solder the - to the -. It may be easier to use a bridging wire. If all goes well you will have something like this. If you place it on a Qi charger the red LED should come on. You may have to move it about to find the best position (note picture shows a less good earlier aerial design. Don't bend the aerial back on the itself, it must point away from the RL)

3) MAKE A BOX AND WATERPROOF EVERYTHING

I made a rectangular box with a lid at the narrow end in Fusion-360. It is best to use not more than a 1mm thickness of plastic or it will make the charging less effective. White plastic enables the LEDs to be visible. The STL file can be downloaded from here: http://oakeley.com/wiki/RL_big_aerial_Swim.stl

This is what it looks like for real: It was printed in "Standard PETG (FDM)", Colour: White, 20% infill, 100μm

To waterproof "properly" paint all the electronics with epoxy. For a "good enough effort", paint the entire box inside and out with acetone (nail varnish remover). When it is dry put the electronics inside and epoxy the lid shut.

Other Omnicore wiki pages

Omnicore Introduction

Omnicore and AAPS setup

Omnicore use and troubleshooting