Skip to content

Gyroscope values are not correct when changing the range #7

@wollewald

Description

@wollewald

Hi,

first I want to thank for this library. I tried the BNO055 library from Adafruit first (which is basically OK), but yours has much more features implemented. Great work.

I have found a small issue and a more complex one when I tried the example sketch config.ino. The smaller one is that the settings applied in this sketch do not have an effect because you switch into NDOF mode:

bno.setOprMode(BNO::eOprModeNdof); // shift to other operate mode, reference datasheet for more detail

NDOF is a fusion mode and according to the data sheet chapter 3.5.1 - 3.5.3 the settings you apply are autocontrolled in fusion mode. You can easily test this. E.g. apply a range of 2G for the accelorometer and move the BNO055 fast. You will get values beyond 2G in NDOF mode. If you change to AMG, the limits are correct.

The solution is easy: Just change to a non-fusion mode. I suggest AMG.

I discovered the other issue when I tried the +/-125 dps range (bno.setGyrRange(BNO::eGyrRange_125);) for the gyroscope (in AMG mode). I get values between ~-2048 and ~+2048 when I rotate the module quickly and measured values are still too high if I rotate it slowly. It seems the results need to be scaled by a factor of 2000/range.

The reason for this bevavior is not really clear to me because setting different ranges for the accelerometer works fine, and I did not see differences in how you implemented the range settings in your library.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions