Between a RAK and a sweet place


I decided to switch my homebrew tracker over to a RAK5010 board:
 
New board!

I thought it was going to be an ideal choice since the previous tracker based on the A9G had needed lots of tweaks - a fix to the power circuitry, adding a charging board and had no inbuilt ANT+/Bluetooth so I'd had to add a second radio board also. The homemade (up to build version 9) unit was getting a bit clunky:

Getting a bit crowded in here

(also the development support for it is effectively dead with no opensource firmware and multiple unresolved known bugs) so the idea of a single all-in-one board was attractive with the RAK5010 based on the Nordic NRF52 chipset with integrated BT/ANT+, charging circuitry and a BG96 GPS module on board.  I thought this would be a much better platform....

That was the idea.

Predictably after playing with it for a bit I do already have a wish-list for their next version, and pondering alternatives or building myself a custom board.

The current wishlist for the RAK5010

  1. Add more IO ports - the NRF52 has loads... the RAK board exposes just 4. I wanted to connect an SD card (see point 2) and a screen and had a better idea for the GPS (see point 4)
  2. Add an SD card connector, the board does have onboard flash, but it's always convenient to be able to plug a card in and out.
  3. Add a 3.3v feed. the board runs i/o at 1.8v, it accepts a 4/5v source. It has a level converter for the I/O but you need to feed it with a reference level to use, so you need to have another converter somewhere.
  4. Connect up the GPS IO pins, the AT data port is connected but this requires polling and is mixed use with the GSM port, but the BG96 has additional data lines that can be used to provide constant "ticking" data.
  5. Provide port jumpers. Both the NRF52 and BG96 have USB ports, but only one at a time can be connected to the USB socket, and this can only be changed by resoldering two resistors on the board, this would be so much nicer if it was a miniature switch or just a jumper.
  6. Add a separate power switch... the board has two switches (PWR,RST), but while the RST resets the board, PWR is for the BG96. Sure I can add one to the battery, but why not just pop one on the board.

My modifications so far have worked around most of these limitations and it's a little rough at the moment but once I'm happy and not planning on changing it any more I should be able to tidy them up.

Perhaps I should get my own custom board manufactured after all? 🤔

RAK Enhancements:

1. Add a screen.

First screen attempt was frustrating lots of garbled output....
 

but then inspiration... just give up and use the same basic LCD as before. Same code from last time, and now we're getting live temperature and HRM data from ANT+

(testing before connecting to new ports)

2. More ports

Checking the schematic showed that there were some testpoints that linked to a couple of IO pins and exposed the SDA/SCL lines... so adding a little level converter (the 5010 runs 1.8v IO points, so these need lifting to be usable)

More ports wired in...

3. and an SD card

The RAK has an onboard flash, but it can be convenient to be able to simply plug and unplug one to download data....and we've got the ports to do this now.

4. add a 3.3v feed

The RAK runs IO ports at 1.8v... it has an onboard level converter so you can connect it to standard 3.3v boards, but you need to supply a 3.3v line. so.... a tiny power board glued on the back connected to VRef.


5. Loop in the GPS

The onboard GPS has multiple IO lines and can be set to run generating a constant 'ticking' feed... but the RAK is only connected to the AT port so you need to initiate a poll request and wait for the data using the same lines used for GSM coms... but.. so... quick patch feeding the GPS port around to two of my (now) spare IO lines:



Then I discover that the older version of the firmware shipped with the GPS module on the RAK5010 doesn't actually support these lines... sigh.... and now the frustration that to talk to the GPS you need to move two soldered resistors. Once moved over and the firmware updated to v12.. and IT WORKS! 

Tiny resistors re/moved.

OK. Ready. All the pieces are in place.... now just to rework it into a portable package/case, polish off the software and switch over. Perhaps I need a 3D printed case.

Now to make pretty.

More sugar

After the original (partly successful) experiment with the Libre blood sugar sensors I tried switching to an alternative make - the GlucoRx Aidex product.

Unlike the Libre sensors, these are two piece sensors which helps (slightly) with the waste produced that I moaned about before, the transmitter containing the battery and processor clips into the separate sensor patch.... although the "applicator" bit still creates excessive waste, it would be much better if the applicator needle (which is built into the applicator) could be a separate item to be clipped in for use.


This looked particularly interesting since this is a "Bluetooth" only product there can't be any of the NFC authentication/setup that the Libre uses to complicate matters. After a brief period of sniffing and analysing I discovered that I can get a live data stream off these directly over Bluetooth LE advertisements. I couldn't work out how to get historical data, but that's not a problem for my use case.

After a bit of "ah that numbers going up... and ah that one counts to 300 and resets.." we have live streaming data over the air to a Bangle.js watch (one of the simplest Bluetooth prototyping tools to hand). 

Digging the Bluetooth

Streaming direct to watch

Checking the code/logic, I updated the old tracker build to sample data from the Aidex and went for a run... great success (after finding and fixing two embarrassing bugs) it works we can have live remotely viewable heart rate, body temperature and blood sugar! 👍



Now to finish the RAK build, make it elegant and reliable. Perhaps I need a 3D printer... and a custom board....



Comments

Popular posts from this blog

seven month update

Tracking running Part #2

back from the brink