Interpretting datasheets is an art form. Vendors use varying terminology for devices even inside the same company, and across companies the terminology and units can vary widely making it difficult to compare a set of otherwise similar devices to determine which one is the best match for your specific needs.
In this guide, we'll show you how you can compare MEMS gyroscopes from several vendors to determine which device has the least offset error, on the assumption that our goal is to find the most 'precise' or 'accurate' gyroscope within a specific price range for use in an AHRS or orientation system.
The Contenders
We'll be comparing the following three axis gyroscopes, which all have reasonably similar features and are in a comparable price range:
- L3GD20 3 Axis MEMS Gyroscope - ST
- FXAS21002C 3 Axis MEMS Gyroscope - NXP
- LSM9DS0 9 Axis* MEMS Sensor (Accel + Mag + Gyro) - ST
- LSM9DS1 9 Axis* MEMES Sensor (Acce + Mag + Gyro) - ST
- MPU-9250 9 Axis* MEMS Sensor (Accel + Mag + Gyro) - Invensense
- BMI055 6 Axis MEMS Sensor (Accel + Gyro) - Bosch (Used in the BNO055)
* The main goal of this comparison is selecting a gyroscope for an orientation system, so the all-in-one 9-axis devices were also included in the comparison.
Device Overview
The table below show the keys values for the gyroscopes mentionned above, just to illustrate their comparable features:
L3GD20 FXAS21002C LSM9DS0 LSM9DS1 MPU-6250 BMI055 |
Dynamic Range (dps) 250/500/2000 250/500/1000/2000 245/500/2000 245/500/2000 250/500/1000/2000 125/250/500/1000/2000 |
ADC 16 bits 16 bits 16 bits 16 bits 16 bits 16 bits |
Zero Rate Levels
One important value in the gyroscope datasheet is the Zero Rate Level (sometimes called the Offset Calibration Error). This value indicates "the deviation of an actual output
signal from the ideal output signal if no acceleration is present", or more clearly the output value that will be generated when there is no movement on the device.
This value is very important since a large zero rate level will give your system the impression that the device is moving, perhaps a significant amount, when it's in fact perfectly stationary.
The example output below shows what this translates to in the real world. This is taken from the LSM9DS0 set to 250 dps dynamic range. The sensor thinks that there is about -8.5 dps of angular velocity on the Z axis despite the fact that the device is completely immobile:
While you can compensate for this value with a calibration offset if the error is linear, you generally want the lowest possible zero rate level you can get.
In the rest of this section we'll look at the datasheets for the devices we are examining to see what kind of promises the manufacturers can made for zero rate level.
L3GD20
The L3GD20 datasheet shows the zero rate level in dps (degrees per second), which is the unit we generally want to use. The value you want is listed as DVoff below:
This provides a complete picture of the zero rate error across all output ranges of the sensor, which is nice. As you can see, the higher the output range the more the zero rate error increases (+/-250dps has a lower zero rate error than at +/-2000dps).
- @ +/- 2000 dps = 75 dps
- @ +/- 500 dps = 15 dps
- @ +/- 250 dps = 10 dps
FXAS21002C
The FXAS21002C shows the zero rate error as follows:
This is less helpful than the L3GD20 above since we only have a single value, DO (or Zero-rate Offset), with the test condition shown as CTRL_REG0[FS] = 00. This means that this is probably the worst case scenarion since CTRL_REG0[FS] = 00 corresponds to +/- 2000 dps.
The value is also give in LSB rather than DPS, so we need to convert LSB to DPS to have a useful value, which we can do with the content of the Sensitivity entry above:
- At +/- 2000 dps (CTRL_REG0[FS] = 00), +/- 25 LSB = 25 * 0.0625 = 1.5625 dps
- At +/- 250 dps (CTRL_REGO[FS] = 11), we have to assume this is still +/- 25 LSB, which = 25 * 0.0078125 = 0.1953 dps
This starts to highlight some of the problems with datasheets, though. We have to make assumptions because the manufacturer hasn't provided all the information we might need, but generally the zero rate offset increases with sensitivity so this is a safe assumption in this particular case.
Manufacturer may attempt to hide unfavorable information by only selectively giving numbers, although in this case the values are very good even in the worst case scenario of +/-2000 dps.
To further complicate things, there are two zero offsets present, and the second value (Post-Board Mount) has this obscure footnote:
1. Post Board Mount Offset Specifications are based on an eight-layer PCB
I'm not sure what situation wouldn't have the device mounted on a PCB (???), but this doubles the zero offset error, which gives us the following final values:
- @ +/- 2000 dps = 3.125 dps
- @ +/- 500 dps = 0.78125 dps
- @ +/- 250 dps = 0.3906 dps
Tricky, although these are very good numbers so I'm not sure why NXP makes you jump through so many hoops to figure out the values, though some doubt remains since only 2000 dps is clearly documented.
LSM9DS0
The LSM9DS0 shows the gyroscope zero offset error in dps:
These numbers surprised me since I was expecting the same values as the L3GD20, but apparently they are using a different device in the all in one L3GD20, with the all in one chip having a clear advantage (although only at 2000dps, the values are 245 and 500 are identical):
- @ +/- 2000 dps = 25 dps
- @ +/- 500 dps = 15 dps
- @ +/- 245 dps = 10 dps
LSM9DS1
The newer LSM9DS1 strangely gives us less information:
We only get one value at +/- 2000 dps sensitivity, with a note that this is after 'MSL3 preconditioning' (MSL3 stands for Moisture Sensivity Level 3). This is worse than the earlier LSM9DS0 which listed +/-25 dps at 2000 dps sensitivity, proving that newer isn't always better. On the positive side, 2000 dps sensitivity is the worst case scenario, so we can reasonably assume the other sensitivity values are similar or better:
- @ +/- 2000 dps = 30 dps
- @ +/- 500 dps = ???
- @ +/- 245 dps = ???
This seems to be impressive at +/- 1 dps (Zero-rate Offset above), but there isn't any information on the relationship to sensitivity. The safe assumption is that this is a best case scenario, meaning the slowest operating speed which is 125dps.
MPU-9250
The MPU-9250 lists the value in the most general of terms:
They indicate an Initial Zero Tolerance of +/-5 dps @ 25°C, but then go on to say that this can vary up to +/-30 dps over temperature with no table to map changes in temperature to ZRO variation. Which means ... we probably just don't know without extensive testing ourselves! :(
We also have no idea what range this ZRO tolerance is at, and it it represents the best or worst case scenario or if it's linear across all ranges (highly unlikely).
Assuming the best case scenario of a controlled temperature environment of 25°C (since 'assuming' is all we can do based on this data), and that there is no 'variation over temperature' included at 25°C, this gives us:
- @ +/- 2000dps = 5dps (???)
- @ +/- 500dps = 5dps (???)
- @ +/- 250dps = 5dps
I find these first two values extremely unlikely, though, since the values will change with sensitivty, and they are almost certainly giving you the best possible case, which is going to be +/-250dps and 5dps zero offset error.
I think we have to consider the values at 500dps and 2000dps 'unknown' and would require testing to determine.
This seems to be impressive at +/- 1 dps (Zero-rate Offset above), but there isn't any information on the relationship to sensitivity. The safe assumption is that this is a best case scenario, meaning the slowest operating speed which is 125dps.
L3GD20 FXAS21002C LSM9DS0 LSM9DS1 MPU-9250 BMI055 |
+/- 250 dps 10 dps 0.3906 dps 10 dps ??? <= 30 dps 5 dps ? 1 dps ? |
+/- 500 dps 15 dps 0.78125 dps 15 dps ??? <= 30 dps ??? ??? |
+/- 2000 dps 75 dps 3.125 dps 25 dps 30 dps ??? ??? |
This shows us that at 250 dps and 500 dps, which will be common values in many simple orientation systems, most of these units are comparably noisy with significant zero offset errors. This will translate to your system appearing to constantly 'drift' when stationary and will need to be compensated in SW.
The clear exception, however, is the NXP FXAS21002C which blows the other devices out of the water with almost no meaningful zero offset error, almost requiring no compensation in SW. The BMI055 (used in the extremely popular BNO055 SoC) is a solid second, though the data is ambigious across the full sensitivity range.
It would be easy to miss these details if you don't look attentively at the datasheet and do a bit of calculation yourself, but if you want to get the easiest to use data out of your gyroscope with limited zero offset error, the FXAS21002C looks to be the best place to start, though you of course need to evaluate other device characteristics, part availability, price, etc.
Updates: User Feedback
Thanks Brian Boschma for some feedback on this guide, specifically the following useful suggestions that users of the LSM9DSx series might find useful:
Positive Feedback : Hi, I have read your spec comparison on the 9DOF sensors
you have characterized. Nicely done. As an extensive user of both the
LSM9DSO and LSM9DS1 I too have noted the spec for zero rate gryo drift as
having seemingly gone up. In the product manufactured here we calibrate
every unit for zero offset, so we capture the value at room temp. The DS0
and the DS1 seem to vary over the production spread about the same amount.
The 3 sigma values for both at the 250dps setting is +/- 8 dps. The
average runs about +/- 5 dps. We used to build our own sensor boards. The
device is sensitive to stress/strain in the mounting process and required
close attention to planarity of the board surface. For example no via's
beneath the chip. No solder mask beneath the chip. We are finding that the
Adafruit Flora boards do a good job of staying within spec of the
manufacturers claimed drift rates. One interesting glitch in going from the
DS0 to the DS1 is the magnetometer's offset in the Z Axis. The DS0's always
were in the range of about +500 to -500, while the DS1 all range (of the 100
or so measured) between +1000 down to +200. Something changed in the
design,, and or software had to change to accommodate this.
Text editor powered by tinymce.