SurfTrack: ocean sports tracker by TvE build log

I’m starting to roll up my sleeves for my third attempt at building an ocean sport fitness tracker. I paddle surfskis, which are long and narrow sit-on-top kayaks designed to surf waves in the open ocean. It’s a very addictive sport because it engages the whole body paddling and balancing as well as the brain to read waves and figure out where to steer towards :rowing_man: :surfing_man: :ocean:

I want a tracker that does two things: measure my performance (speed, heart rate, stroke rate) as well as send my position to my spouse in case there’s a problem so I can be located.

My first attempt 2 years ago looked like this:

It included an STM32L082 board I designed with a HopeRF LoRa radio, a GPS breakout board, and an IMU breakout. I also jammed a BLE breakout in there to connect to a heart rate strap.

I learned that I really need to spend the time to integrate things tightly so the total package size actually fits on the foot strap. That I need to select my components better, e.g. the GlobalTop GPS works and is cheap but if you really want 10Hz position reports with good accuracy to measure acceleration on a wave, say, then steer towards u-blox. And I need to think more carefully about the communication, and antenna design in particular (I expected it not to work well, but didn’t have much choice).

Some “fun” moments included me falling out of the surfski and opening the latch of the waterproof box with my toes. I found the electronics and battery floating in the surfski. After a slew of cleaning, a new battery and some reflowing of the gps module everything worked again! Second “fun” moment was forgetting the box in the surfski on the roof rack and loosing it enroute :frowning: .

My second attempt tried to tackle just the safety position reporting using a cellular LTE modem. I had just gotten some Particle Mesh boards in, including a Boron with an LTE modem, so I tried this:

(The display was intended only for diagnostics, not for displaying any performance real-time.)
Unfortunately I got entangled in too much of the Particle software stack complexity and even though I had almost everything working I never took it to the ocean.

My goals for round 3 are to build a functional solution in as compact a package as possible, challenging myself to integrate tinier IC packages, some RF design, and figuring out a decent enclosure.

  • 2.7" Sharp Memory display (awesome in daylight, wish I could get a 1.8" version 'cause 2.7" is a bit large)
  • ublox GPS, looking at CAM-M8Q for the non-panel antenna
  • BLE radio for heart rate and cadence sensors, perhaps MicroChip RN4871 or Dialog DA14531MOD (can’t tell whether that comes with ready-to-go firmware I can talk to over serial or whether I have to write an app for it)
  • either LoRa radio or LTE modem (haven’t decided yet)
  • simple accelerometer to go to sleep when not moving (prob ST LIS3DH)
  • flat LiPO cell for power (prob cell phone battery)

I’m hesitating between nRF52840, nRF9160, STM32WLE5xC, and STM32L4xx in terms of SoC. I like to use MicroPython, which needs lots of memory, and framebuffer + fonts stuff also needs memory. So:

  • nRF52840 integrates the BLE and has plenty of flash and RAM. Downsides are that I’ve never used an nRF5 and it’s not fun to hand-solder.
  • nRF9160 integrates LTE and has plenty flash&RAM, but no BLE (wtf?). I haven’t decided between LoRa and LTE, so this only makes sense for the latter choice.
  • STM32WLE5xC integrates LoRa, which only makes sense if I don’t want LTE. I’m familiar with the STM32L4 series, so that’s a plus, but the package is not hand-solder friendly. Biggest issue is that even the biggest version is tight in flash and RAM for my purposes.
  • STM32L4 series CPU would be familiar and can be had with enough flash and RAM, but then all radios are external, using board space.

My current plan is to build a board with a STM32WLE5JC (BGA package) first and see how that goes.

I’m also really stumped about the enclosure. The display has 63mm x 43mm outer dimension and I’m hoping I can fit everything onto a PCB of the same size (I love the size challenge). The only two off-the-shelf enclosures that vaguely fit the bill are the Hammond 1591ACTL, which is 100mm x 50mm x 24.82mm and thus quite a bit larger and not waterproof (I’d have to improvise a seal):

and the Serpac WM010I, which is 91.44mm x 57.15mm x 15.24mm and IP67 (with an available gasket) but not transparent, so I’d have to make a cut out for the display and seal that. Also the thinness is quite a challenge considering that I need to stack display, PCB, and battery into 12mm.

I’d rather not get into the 3D printing rabbit hole so in despair I ordered a cheap waterproof bicycle computer with the intent of throwing the guts away and reusing the enclosure:

It’s large enough to fit the memory display, but unfortunately I could only open it by sawing along the welded seam around the perimeter. So it may be possible to fit everything into the slim case, but I’d have to glue it shut to make it waterproof, which isn’t great for experimentation. (Maybe I could hot-glue it??)

Is the enclosure always more work than the PCB? I’m getting that feeling…

It often is. Check out New Age Enclosures. They have a nice range and are very good about doing CNC customization at reasonable prices.