The general concept being the build is rather simple and straightforward. The device wakes itself up at specific intervals using an onboard DS3231 RTC, acquire a new position and goes back to sleep. To achieve power efficiency, the goal was to find the right balance between accuracy (sample count) and power saving. Too much accuracy and you're losing power. Too much power saving and you're losing accuracy when moving, and you can even miss entire tracks sometimes.

The solution was to modulate the sleeping time between positions based on speed and time of the day. Speed is rather obvious: you can acquire a position every few minutes or so while maintaining a good accuracy when you're barely moving, but not if you're driving at 100km/h. The time of the day is not so obvious, but in my case why acquiring tens of positions at night when I know I won't be moving?

Finding that balance took some time and a google spreadsheet :)

Another concern for power saving is the SIM808 GPRS module. Turning it on, looking for a network and registering to it consume a lot of power. Especially in a country where cell coverage can be sparse or nonexistent. So real-time positions backup (which I don't need anyway) has been traded and network backup is only done when the tracker stops moving basically. And of course, the backup is postponed if no reliable signal is found. In the meantime, the onboard 24LC512 can buffer a whopping 4000 positions. Yep, I'm sorry to say that I'm not using the SD card after all because I simply don't have enough room on the ATmega328p to hold all that code :(

With all that, I'm able to achieve several weeks of power autonomy on a 1700mAh battery, leaving the tracker to do its thing without my intervention. Once in a while, I check that all running well by looking at the last positions on the backup server but that's just me worrying for nothing actually.

I used the tracker for my nine months journey across New Zealand. Needless to say that the box I'm using is weather sealed so the tracker was protected from the cold and humidity during all that time!

It only failed on me twice because of the RTC coin backup battery being flat and so not waking up the tracker properly. I suspect there is something going on there because I was expecting a single coin battery to last for years.

As probing the electrical issue was out of the equation during my journey, I circumvent the issue by implementing SMS alerts when either the main battery or the RTC backup battery are getting low.

GPS coordinates are also not really easy to read and comprehend without a map, so I quickly added a basic web UI on top of the API where I was sending the data to using OpenStreetMap and Leaflet. That UI is far from perfect but has served me well for what I wanted to do, and I'd like to improve it in the following months now that I will have unlimited and reliable access to the internet again ! \o/