Knowing in what absolute direction your robot is pointed can be crucial, and expensive systems like those used by NASA on Mars are capable of calculating this six-dimensional heading vector to within around one degree RMS, but they are fairly expensive. If you want similar accuracy on a hacker budget, this paper shows you how to do it using cheap MEMS sensors, an off-the-shelf motion co-processor IC, and the right calibration method.
The latest article to be published in our own peer-reviewed Hackaday Journal is Limits of Absolute Heading Accuracy Using Inexpensive MEMS Sensors (PDF). In this paper, Gregory Tomasch and Kris Winer take a close look at the heading accuracy that can be obtained using several algorithms coupled with two different MEMS sensor sets. Their work shows that when properly used, inexpensive sensors can produce results on par with much more costly systems. This is a great paper that illustrates the practical contributions our community can make to technology, and we’re proud to publish it in the Journal.
Micro-electro-mechanical systems (MEMS) sensors have been around for over a quarter of a century, but in recent years, their adoption has grown exponentially. Several categories of modern devices would be radically different, if not impossible, without MEMS sensors: robots, drones and autonomous vehicles all use these devices to estimate which way and how fast they’re travelling. They’re also probably in your phone. Compared to larger and more expensive sensors, the small, inexpensive variety are usually thought of as inherently less accurate. This paper proves that this is not necessarily the case: properly calibrated sensors coupled with the right algorithm can produce heading errors of one degree RMS.
The authors test two sensor sets: Invensense’s MPU9250 and ST Microelectronics’ LSM6DSM/LIS2MDL, both of which combine accelerometers, gyroscopes, and magnetometers. They paired each set with EM Microelectronic’s EM7180 motion co-processor. The co-processor performs a proprietary sensor fusion algorithm, but also passes through the raw sensor data so that other algorithms can be tested in an apples-to-apples manner. As well as the built-in algorithm, they applied the open-source Madgwick algorithm and their own proprietary method. They tested the algorithms both with and without prior sensor calibration to determine how much this would improve the results.
To test the various combinations, the authors sourced a used Zeiss rotary stage from Ebay. Using an acrylic spacer to isolate the sensors from any influence of the metal parts, they mounted each sensor package on the stage in turn. The stage can be adjusted to a resolution of a tenth of a degree, providing an ideal testbed for evaluating heading accuracy.
After analyzing all the data, the authors determined that the proprietary solutions can produce an RMS heading error up to around twice as good as the open-source algorithm. However, the big surprise is the impact of calibration. Their extended pre-calibration routine brought even the worst, fifteen-degree setup, in line with the best.
Tantalizingly, there is still a predictable sinusoidal component to the error, which might be a result of magnetometer/accelerometer misalignment, that could stand to knock the error in half if that can be removed.
We applaud the empirical approach the authors took with this paper; their methodical assessment of sensor accuracy is exactly the kind of thing we are looking for in the Journal.
We Want Your Submissions
The Hackaday Journal (full title: the Hackaday Journal of What You Don’t know) is now – and continuously – accepting submissions for publication. You don’t have to submit the full paper right away if you just want to get some feedback on the topic; submitting a brief summary or abstract is fine. We know you have ideas we’d all benefit from reading about, and we want you to share them. So, drop us a line with your awesome paper topic.