BNO055 set G

Hello All!

I am working with the BNO055 sensor. I previouisly found a discussion about how to set the G from 4(default) to 2G. However, I want to set the G to 16G.

I tried to use the following code:

void Adafruit_BNO055::set2GRange()
adafruit_bno055_opmode_t modeback = _mode;

/* Switch to config mode (just in case since this is the default) */

/* save selected page ID and switch to page 1 */
uint8_t savePageID = read8(BNO055_PAGE_ID_ADDR);
write8(BNO055_PAGE_ID_ADDR, 0x01);

/* set configuration to 2G range */
write8(BNO055_ACC_CONFIG_ADDR, 0x0F);

/* restore page ID */
write8(BNO055_PAGE_ID_ADDR, savePageID);

/* Set the requested operating mode (see section 3.3) */

The difference between my code and the code provided by another user was that they wanted to configure to 2G, which is 0x0C, where I will want to set the last two bits to 11, so the hex will be 0x0F.

However, I am still hitting the ceiling of the g range

Any ideas?


G range ceiling.png

However, I am still hitting the ceiling of the g range

But is it less sensitive than it was on the 2G setting?

Knocking the sensor against a solid object could well generate more than 16G?

What are you trying to achieve with your project?

It is also important what mode you are running the chip in.
The data sheet ( you have read this? ) says

The accelerometer sensor operation mode is not configurable by user when BNO power mode is configured as low power mode. BNO rewrites the user configured value to Normal mode when switching from config mode to any BNO operation mode. This used to achieve the BNO low power mode performance.

I have not changed the mode, so I am running the defaults. I am running the fusion mode, normal mode, 62.5Hz.

It seems that I should be able to set the acc_config for the range in any mode, but I have yet to make this work.

I am running the fusion mode,

Page 27 of the data sheet - the G range is auto configured in Fusion mode.
So you can’t change them.

Although the configuration possibilities are restricted in fusion mode, the accelerometer configuration can be changed by writing to the ACC_Config register. The User can select any of the G Range in all modes.

Attached is a picture of page 27 (the file says 28) with highlighted portions on which I am referring to.

BNO055_Datasheet_page28.pdf (110 KB)

I think you are misreading the data sheet (your attachment can't be opened, BTW).

I've been using the BNO055 for quite a while and am pretty familiar with the data sheet, but after reading some more (my data sheet version is DS000_14), it is not at all clear to me that you can do what you are hoping to do and then run the device in fusion mode.

Assuming that it IS possible to have different accelerometer settings in fusion mode, have you been able to find a statement of what those restricted settings might be?

I haven't, and my reading of page 28 of the data sheet indicates that those settings are "auto controlled" in fusion mode, and are NOT configurable by the user.

You still have not said what you are trying to do. If you just want to read raw accelerations, don't use fusion mode, and then you can use any range you want.

Sorry, I made a typo and I actually am referring to page 27. I have tried to paste another screenshot of the page 27 BNO datasheet with this reply, and hopefully it works in png files.

I have been using the accelerometer, gyroscope, and magnetemeter. Everything is working however I have had this problem where I am maxing the acceleration to the full 4Gs.

This is the link to the datasheet that I am currently using:

Does this change information help?

G range ceiling.png

your attachment can't be opened, BTW

Yes I found that with the version 1.4, on my iPad you can select any text but the copy option doesn’t appear. An earlier version of the data sheet I had you could copy the file and it did not have the comment about fusion mode.
But always go with the latest data sheet.
The fact that you are failing to set the G to the value you want with that code you got from Adafruit has got to tell you something.

Yes that page 27 is what my old data sheet says but not the new one.
I got the new one on the Mouser site.
Note your link is to the version 1.2 and the new one is version 1.4

Darnit! Classic old datasheet trickery. :slight_smile: I have now seen the newest datasheet I believe...

Hmm, well this changes things.

I am now going to change from fusion mode to use just the accelerometer and the gyroscope. Hopefully then I can use the 16g and the 2000 degrees/sec config.

Thanks for the patience.