Tracking running Part #2

Part deux tracker blog posting... 

If you're just interested in running and not technology, this is probably not that interesting for you so head over to the run post instead... (link)
If you are just interested in technology, this is the post for you!
If you're interested in both, probably wander off and read that one first, then come back here. 😁

After several improvements and reworks from the first build of the tracking website (described over here) I was happy with my tracking website now, and it had worked well on the race day...


The site can follow several trackers, supports several different types (mine, tk102, tk104, lk109, orux map), can show the track taken for each, overlay a "course" show the elevation profile with aid stations along the way, highlight the viewers location... (ok it is possible I may have over-engineered it since it's just a personal site)
So decided it was time to stop adding bells and whistles and should return to the idea of building my own tracker.

Whilst simple, functional and "OK" the basic tracker I was using was missing lots of tricks and possibilities. Since the device was just a very generic cheap Chinese device, there are lots of similar models all using very similar software, but there is no open community, no source code, no option to do it yourself it's all very closed, locked down and secretive. Which *is* odd given there are lots of companies producing them, all ripping off each others software and making their own changes and variants. Weird. oh well.

I had hoped there would be a way to customise the existing software since the hardware is pretty basic there are lots of things that would make more sense... e.g. the units (well some of them) can use an SD card, and you can set a custom upload time, the slower, the longer the battery life. But you can't do anything "smarter" e.g. save locations to SD card every x seconds, but upload every x minutes. Also, when it stopped working it wasn't obvious why.
I had lots of ideas and assumed I'd end up using something like an arduino and GPS module, but doubted it would be efficient with battery or small enough... but then... I happened upon the A9G GPS module

Absolutely perfect, it's a small self contained GPS/GPRS module with I/O ports *and* a SoC processor (RDA8955) which can be reprogrammed.

The Amazon man cometh...
and it's tiny! (Small Casio watch for scale)

After a few iterations, and getting familiar with the development kit. (spoiler: it's buggy, bits of it aren't available as source code - despite again clearly being available to some people, the tools are only properly functional on Windows)

Further hassle, it seems that there's a design fault in these little development boards where the power drops when GPRS is activated, but after implementing a cunning fix from Zak Kemble (Power bug) it seems stable now.
Further further hassle... it seems the development board's battery circuitry isn't actually complete for LiPo charging, and the last thing I want is a ball of fire in my pocket, so next hack, adding a separate (TP4056dual charging board... and prototype v1 complete.

Initially thought I was going to use 18650 batteries that could be swapped on the go, but instead settled on a flat LiPo (from a Sony mobile phone) instead.


With the "power board" and capacitors fix.(from Zak)
(and only just noticed I pasted the image with a mistake! it should be a "1000uF" for the electrolytic!)

(Doh! mistyped the capacitor size on image originally - elegantly fixed!)

After choosing a nice case it wasn't quite as small as my first build, but needed to be a bit bigger to be able to adjust and change stuff, but it's not unreasonably big. A few test runs and it seems to run pretty well with several little tweaks after each outing.
After a few iterations of software (currently version 5.2 😃) I was relying on blinking the led at different speeds to show what it was doing... quick 1 second hunting for GPS slow once 5 seconds, all OK, fast 1/2 second blink "problem" etc etc... quickly concluded this was a PITA and I needed a better solution. 

I think I need an OLED screen.... two OLED's later (first one didn't work) and I've got a prototype going. Starting by using an LinkIt Arduino type board for easy of playing (and my "fallback" tracker board in case the A9G didn't work).
After trying to use a few libraries, decide I might as well write my own display code. How hard can it be... Many hours of frustration later. In my defence the documentation is *awful* and the "standard" Adafruit library people use with Arduino's is waaay to big and waaay too generic.

I decide it can be viewed through the case clearly enough so don't bother with a "window":

Now to port my display to the A9G.... I ponder adding a Goggins motivational quote on startup. 🤣



Finally... version 4 of the tracker build, with version 5 of the software with the running tracker app website.

Undoubtedly I'm going to find ideas for improvement or new features to add as I use it and test it, but it does the job nicely for now.

Should re-draw that properly with something...



In summary for ultra-running (either racing or training) I wanted:

  • An "I can just turn it on and use it tracker" 
  • I didn't need to book in advance or hire.
  • I wanted a simple(ish) tracking site, that...
  • I can also upload planned routes onto that can be used for crewing and following.
  • but, that also shows trails and footpaths (not just google maps).
  • The device needs a long battery life and..
  • I don't want to be fiddling with a phone.
  • I want the device to be completely independent from my phone which I don't want to run out of battery.

Main features:

  • Using Sony (2600mAh) LiPo it runs for about 38 hours which is good for everything I need it for.
    there might be power saving improvements possible with code improvements.
    but I also have a few of these batteries and can switch them out if needed.
  • Reports status and battery on screen (configurable timeout)
  • Button turns screen on and off. Held for 5 seconds will power off... (thinking of possible additional modes)
  • Can be charged any time / on the go from a USB connection.
  • Upload and record time are independent, can log positions every 10 seconds and upload each 5 minutes to get a nice smooth track.
  • Will reconnect to mobile network on connection loss and upload any data stored so far.
  • Either fast boots GPS from last location or cold boots if cant connect.
    will warm-boot if there's a no lock while in use.

Future thoughts....

  • Lots more testing... mobile network seems to "deny" connection sometimes. 🙁
  • Might be nice to include live heart rate data. (or as Vince says... "I'm alive data 😅)
  • Showing messages would be easy, but can't think of why or how it would be useful
  • Temperature reporting might be useful.

Firmware source code is up on github: https://github.com/ihewitt/ivrtrack 
Website source will be there when it's thoroughly cleaned (it has "evolved"). 

*Update* cleaned, updated and uploaded to: https://github.com/ihewitt/gps-server 

*Update* - version 6 build: 
New more compact build.

Still a bit of an untidy squeeze.

Popular posts from this blog

seven month update

back from the brink