Voting resources, early voting, and poll worker information - VOTE. ... Adafruit is open and shipping.

BNO055 IMU Changing Magnetomer data rate
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

BNO055 IMU Changing Magnetomer data rate

by samyguerra on Sat Aug 15, 2020 2:20 pm

Hello, working on a project with a BNO055 from adafruit. For it, I am calculating quaternion with the .getQuat function. So far so good.

From my understanding (correct me if I am wrong) the quaternion uses the magnetometer, and that's were my problem starts. I would like to change the bandwidth of the magnetometer, which is at 10Hz - default settings. How can I do that? (Using an arduino and the libraries used are <Adafruit_BNO055-master> and <Adafruit_Sensor-master> downloaded from the website).

Posts: 1
Joined: Sat Aug 15, 2020 2:09 pm

Re: BNO055 IMU Changing Magnetomer data rate

by Keep_Looking_Up on Sat Aug 22, 2020 8:38 pm

If by bandwidth you mean the magnetometer data output rate, it appears that cannot be changed if you're using a fusion mode to get quat outputs (fusion is the default). This is from page 29 of the BNO055 data sheet. The data output rate, operation mode and power mode magnetometer configuration options are auto controlled in fusion mode. If you're not in a fusion mode, you can adjust the output rate via the MAG_Config register.

The datasheet is listed on this page under files: ... /downloads

I took a quick look through the adafruit arduino sensor and bno055 library code and I'm not seeing any options to adjust this register (but I might have missed it). You might have to do it manually. You can change the mode the BNO055 is in with the begin() statement. You can find the values in the Adafruit_BNO055.h file in the Operation mode settings section. For example, 0X08 puts the sensor in IMU only mode (no magnetometer). 0X02 puts it in Magnetometer only mode. 0X0C puts it in NDOF mode which is the default. There are lots of other modes. Check the datasheet for descriptions of the various modes.

For example, bno.begin(0X08) puts the chip in fusion mode but without the magnetometer, so it works like an IMU, and shows x axis relative to where the chip was started, rather than relative to magnetic north. To change the magnetometer config register, I believe you'll have to choose one of the non fusion modes. But then, you'll not get the orientation outputs. You'll have to do the calculations yourself.

I hope this helps.

Posts: 4
Joined: Sat Aug 22, 2020 8:17 pm

Re: BNO055 IMU Changing Magnetomer data rate

by SimpleJack on Wed Aug 26, 2020 8:49 pm

You can change the bandwidth of the Magnetometer to 20HZ if you want. Nothing bad will happen to your system if you do that. However, in the long run, it will only run with 20HZ only and will not run if it gets a 20HZ bellow. That's the dilemma you have to make if you want to change your bandwidth.

If I were you, I would just sit on your couch and play granny game and akinator the web genius on your laptop.

Posts: 1
Joined: Wed Aug 26, 2020 8:40 pm

Please be positive and constructive with your questions and comments.