Using ublox GPS for Greater Precision

Anker Berg-Sonne’s passions for autocross high-speed racing and DIY electronics crossed paths when he found himself in need of a data logger to analyze his driving skills. Rather than purchasing a data logger, he chose to build his own and customize it to his needs.

Project Requirements

  • Low cost, but still using state-of-the-art technology
  • Upgradeable to new technology as it evolves
  • Ability to capture precise data at minimal intervals

Creating a Better Solution

“The first [data logger] I made used the GPS Data Logger Shield and logged serial NMEA data to files on a microSD card,” he said, of his project’s first iteration. “The big challenge was to be able to keep up with the data stream from the GPS on the shield. To deal with that, I decided to use an Arduino Mega 2560 so I could use a hardware serial port instead of SoftwareSerial.”

He noticed that the time spent writing data to the microSD was also a challenge. For the Mega 2560 to keep up with the 10-hertz data stream from the GPS, Berg-Sonne had to do minimal parsing, keep messages sent from the GPS to an absolute minimum, and send the data to the microSD with as little processing as possible.

Tracking autocross data presents a unique challenge, because the cone course changes for every race, so Berg-Sonne made the logger operate in two modes. In one mode, he marked the GPS coordinates of the cone course by pressing a button on the logger at the position of every cone. In the other mode, data was logged any time the speed of the car exceeded 10 miles per hour.

“Using car speed to trigger logging turned out to work really well,” he said. “Most commercial data loggers require that you manually turn logging on and off, or they require that you very carefully mark the start and end of the course to turn logging on and off. Autocrossing is very intense and it is very easy to forget to start the logger at the start of a run! With my logger, you don't have to worry about that.”

A GPS map.A GPS map.
Mapping of multiple runs showing starting and stopping points.

“The reduction of overhead resulting from switching to u-blox allows me to continue to use the MEGA 2560 with the GPS running at 20 hertz,” he said, “which is something that wouldn't have been possible with NMEA. It also helps that the u-blox receivers support I2C."

 

In parallel to the advances in hardware Sibert was seeing, the free and collaborative Centipede Network of reference stations providing real-time corrections was introduced and is quickly growing in France. It reached him at the beginning of 2021. When it arrived, Sibert said, “I added a hc-05 Bluetooth module to my device to get corrections through my smartphone. It is astonishing to have a real-time position with an announced accuracy of a few centimeters.” Then, another breakthrough occurred - “Mid 2021, I got the Sparkfun RTK Express. It is more convenient than my device thanks to its compactness, integrated battery, and configurability.”As both a caver (a person who explores caves, often referred to as spelunking) for more than 30 years and an ambitious contributor to an open-source map project (OpenStreetMap (OSM)) since 2009, Eric Sibert has a long-standing passion for positional accuracy. In all that time, Sibert has been on a quest to find an accurate and portable tool that allows him to easily switch between these tasks - a quest that has proven to not be so simple.

To meet his requirements, he would need a tool that could be taken into remote caves, but also provide extreme accuracy for correcting street-level data. This dilemma ended up being a drawn-out and fruitless endeavor for quite some time. “I’ve been watching for years for potential GPS chips providing raw data at a low price. I made some attempts in the mid-2000s with the SiRF III chip.

A data logger and collector next to a digital map.A data logger and collector next to a digital map.
Data logger and data collected for two runs.

“The reduction of overhead resulting from switching to u-blox allows me to continue to use the MEGA 2560 with the GPS running at 20 hertz,” he said, “which is something that wouldn't have been possible with NMEA. It also helps that the u-blox receivers support I2C.”

But he’s not done innovating yet. Berg-Sonne said the next phase will be to use RTK for real-time error corrections, with a base station using an RTK receiver, coupled to a transceiver, that sends the correction data to the loggers within range.

When asked how accurate he needed his GPS to be, Berg-Sonne said two centimeters would be ideal. Hopefully, with the updates he is making to his design, he will be able to reach his goal of two-centimeter accuracy!

Dashboard view of data logger.Dashboard view of data logger.
Dashboard view of data logger.