Live GPS Telemetry Tracker
by ivorhewitt in Circuits > Microcontrollers
523 Views, 3 Favorites, 0 Comments
Live GPS Telemetry Tracker
A few years ago I wanted to find a simple 'live' GPS tracker I could use for both running ultra-marathon races, but also on personal 'adventure runs'. At the time it was rare for races to provide their own tracking service, although it's a lot more common now. I considered the available 'off the shelf' options at the time (first tries) but nothing quite met my needs.
So I embarked on a project to develop my own, as the project developed the tracker turned into a more advanced general purpose "live telemetry tracker", which now has the ability to not only publish live GPS location data, but also additional health metrics providing a live feed of heart rate data, blood sugar, core body temperature, ambient temperature and humidity and even fluid drunk data. These can be monitored remotely for more extreme events (and of course also "for science!")
The power and flexibility of the NRF52840 core that powers the unit means it can connect to both BLE and ANT+ devices, so it is a simple exercise to change, extend or improve any of the captured data it publishes.
Since this is a personal "development" device, early on I decided a display was essential for fine tuning options, and displaying status, so unlike most trackers, a small OLED is built in, again this could be enhanced and used for all sorts of alternative uses and messages.
Also because I wanted to be able to update and develop on this frequently, I exposed a jtag port through the case with a standard connector for easy connection of of a JLink-Edu. The jumpers allow the USB port to be connected to the BG96 if the Quectel firmware needs updating, otherwise the default NRF USB connection allows the tracker to be mounted as a USB disk.
Finally... since despite the screen the unit would normally be carried in a backpack, I used a Bangle.js watch to provide a live "HUD" status display.
Supplies
Printed PCB, 3D printed case parts, BOM of components with digikey part numbers.
Github links to designs and code:
https://github.com/ihewitt/tracker3 - Board designs, 3D models
https://github.com/ihewitt/raktrack - NRF52 tracker firmware source code
https://github.com/ihewitt/gps-server - Tracker web server code
There are a selection/series of blog posts with more details and additional comments up at: https://blog.ivor.org/2022/03/trackertwo.html, https://blog.ivor.org/2024/08/t3-rise-of-machines.html and https://blog.ivor.org/2024/08/tracker-iii.html
Evolution
After using the off-the shelf GPS devices, once I decided to build my own device I started along a slippery slope, first trying to build using combinations of modules (using the A9G), then switching to a RAK5010 board but these always ended up quite messy once including charging circuits and interfaces, the move to a custom board results in a much more compact and elegant build.
Also the potential uses for a development board like this are more than just for a GPS tracker.
Board Design
I used KiCad to layout and design the board, it's a 60x50mm single sided four layer PCB. This took a few iterations and I ended up trying and building three different versions before settling on the final design. I made use of the 3d render feature to visualise the board each time to decide if I was going in the right direction as the design improved and evolved, you can see the first render and the final render above.
After the first build, I redesigned the board and made use of the JLCPCB 'via in pad' feature for a much cleaner design and this was the board used for the first working/actively used tracker. However, the additional cost of the in-pad-vias led me to redesign again without, but with several minor changes and reorganisations from experience building with the earlier design. (e.g. moving the leds to the edge, reorienting the i2c ports and so on). I've annotated the final design above.
I was tempted to use a PCB build service but couldn't find anyone who could supply all the components and trying to order some parts separately (from China) to post (back to China) seemed like a silly idea.
So time now to learn hotplate surface mount soldering.
Pick and Place
The full BOM is above in supplies, I used Digikey to order 90% but had to find an alternative supplier for the BG96 and Holyiot modules.
With the JLCPCB supplied template I had built my first boards using a credit card and trying to fill in bit by bit.... this was moderately successful, but after I saw a video of a professional service doing it, and seeing a few guides on youtube I purchased some metal spreaders and changed my technique.
Now I apply a large spread of solder along one side of the board, and then in a single steady firm swipe with the spreader held at 45 degrees, I spread the solder across the template. The results with this technique are brilliant and provide an exact clean deposit of pad solder.
After the first few attempts placing the components, with my poor "old man" long sight, I got myself a magnifying headset, then with the assistance of a reluctant child to locate and pass the next components, I got into a routine.
With an ordered printout of components, worked through the BOM picking the components out of their tapes and placing them one at a time with a set of lightly sprung, not magnetic, fine sharp tipped tweezers.
Reflow
Never having built a surface mount board before, the first step was building an SMD hotplate, the first version was a set of bits bolted together (using an old PC power supply), once I knew what I was doing this was refactored into a neat compact case. Using the reflow guidelines from the BG96 to set the durations and temperatures. In the end I actually switched to a low temperature solder and used a lower temperature reflow instead.
Perhaps the topic for a new/different instructable, although there are many guides online already to build a reflow plate.
Testing
I used the NRF52 SDK to build the tracker app, a lot of the design was to ensure the software was robust and reliable, I didn't want to have the tracker crash, lose data or lock up when in use.
Firing up the board with the custom firmware and the board successfully got a GPS lock, also installing a build of Espruino allowed me to run a basic clock and even simple asteriods game!
Case Design
I used Freecad for the case design, modelling the case shape and design around the board, first I imported 3D models for all the main components, (KiCad can export the PCB design as an STL file) the screen, buttons, and a 3d rectangle for the battery. This made it easy to position them and model the case compoents around them.
I tried a smaller compact stacked design also, but reverted to the longer hand held design.
Initially I used standard basic "project" buttons that protruded from the case, but found the clicking annoying so decided to switch to soft membrane buttons.
These felt much nicer but require a button cap and also need to depress inside the case so these required a small key holder to be printed that held the buttons below the case outer with a hole above for the flanged buttons to sit in, a couple of print iterations created a nice feel and shape. Contrasting purple keys work well against the grey body. (I found my first purple case a little garish!)
Software
Software for the firmware, case designs, circuit designs and server software are all up on github.
The firmware is still a work in progress and is being constantly improved and extended. The code is written in C using the Nordic NRF SDK, a lot of time was spent fine tuning the code logic to cope with failure/fault conditions since I didn't want to have the tracker fail at the start of a run and not up load or save any data.
The firmware behaves as a USB storage device when connected to a computer to allow download of log files or gps log files directly for analysis, this also means its possible to run and use the device in an offline mode.
At the moment although the code is able to use multiple sensors, although the details are read from a config file, I would like/and intend to change this to have a "scan for sensors" option in the code.
Links:
https://github.com/ihewitt/tracker3 - Board designs, 3D models
https://github.com/ihewitt/raktrack - NRF52 tracker firmware source code
https://github.com/ihewitt/gps-server - Tracker web server code