Problems using BNO085 IMU with Pi Zer0 W

Hi Richard,

Really sorry for the delay in getting back to you. We were flat out with the launch of the new Pico today, and someone purchased the BNO085 we were using to test so we no longer have one to test with!

Setting the Clock frequency to a really low value is just a hacky workaround - but it will eventually still get out of sink. In theory the software driver is the way to go from what I understand of the issue so far.

Looks like the BNO085 might not support running that slowly:

Ok, it would be nice to hear if the latest purchaser uses I2C, and how he deals with this issue.

I tested your software driver idea above on a spare Pi Zero with bno08x_simpletest.py, and it seems to work. I will need to reallocate my working Pi’s pins to free up the required I2C pins 16 & 18.

Thanks for resolving this issue

2 Likes

I’ve been reading into this too, just out of interest.

The Core Oliver might be on the right track with the minimum baud rate. Even though there’s no minimum baud rate specified in the I2C standard, there are other limitations that introduce one. The BNO085 is SMBus compliant which has a minimum frequency of 10kHz - it’d be interesting to see if increasing the frequency to say 20kHz fixes the problem.

It’s also interesting that Adafruit set it to 800000 in their script when the maximum for fast mode is 400kbs - I guess it depends how you define the frequency - as rising edge to rising edge, or just edge to edge.

From the I2C standard:
image

The SAM D20 in the BNO085 also has a timeout setting, which if activated, might also be coming into play:

1 Like

Ok thanks, will try try 20kHz clock frequency later; but since your software I2C driver works, I’m currently trying some code to get absolute rotation output in degrees rather than quaternions.

2 Likes

Because of the clock stretching issue with the Pi and also ESP32, I use serial instead of I2C, with no problems. The Zero has serial. Would it be simpler to use that?

3 Likes

Thanks for that suggestion John. The I2C software driver is working so far, but will use SPI if I have any further problems. I’m still learning to use the sensor; trying to calibrate for magnetic distortion.

2 Likes