Between a RAK and a sweet place
New board! |
Getting a bit crowded in here |
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
- 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)
- 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.
- 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.
- 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.
- 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.
- 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.
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+
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
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! 👍