New BNO085 "I2C" connection failed to initialize

Breakout boards, sensors, other Adafruit kits, etc.

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
csostena
 
Posts: 5
Joined: Sun Jan 17, 2016 12:16 am

New BNO085 "I2C" connection failed to initialize

Post by csostena »

Hello,

So, we seem to have a problem (hardware?, ... library?) with the new BNO085 sensor.

I2C connection to Feather nRF52840 Express failed to initialize.

Tried a few things:
. Feather has no issue connecting to other I2C devices.
. Changing I2C address doesn't help.
. Forcing P0, P1 lines Low or High makes no difference
. Using extra resistors on SCL/SDA makes no difference (seemed to be an issue with BNO055)
. Connecting thru Stemma QT or breadboard connection makes no difference.

I2C:

Verified that call "if (!bno08x.begin_I2C()) { ... " returns 0.

15:24:20.642 -> Adafruit BNO08x test!
15:24:20.642 -> Failed to find BNO08x chip

I2C scanner has no problem reporting the correct address though!

15:26:43.875 -> I2C Scanner
15:26:43.875 -> Scanning...
15:26:43.875 -> I2C device found at address 0x4A !
15:26:43.875 -> done

SPI:

SPI connection worked with both examples (rotation_vector and more reports), although I didn't validate the output.
Here's the initial output if Version/Build may help to debug the problem.

15:44:18.018 -> Adafruit BNO08x test!
15:44:18.836 -> BNO08x Found!
15:44:18.836 -> Part 10004148: Version :3.2.13 Build 6
15:44:18.836 -> Part 10003606: Version :1.2.4 Build 230
15:44:18.836 -> Part 10003254: Version :4.4.3 Build 485
15:44:18.836 -> Part 10003171: Version :4.2.10 Build 548
15:44:18.836 -> Setting desired reports
15:44:19.591 -> Reading events
15:44:19.685 -> sensor was reset Setting desired reports

UART:

Couldn't get UART to initialize either.

Call "if (!bno08x.begin_UART(&Serial1)) { ..." doesn't seem to return from library.

Please, let me know if you need any further information and keep us updated with any solution.
Thanks,
CRS.

User avatar
adafruit_support_carter
 
Posts: 29469
Joined: Tue Nov 29, 2016 2:45 pm

Re: New BNO085 "I2C" connection failed to initialize

Post by adafruit_support_carter »

Let's troubleshoot the I2C setup. Please wire that up and post a photo of your setup showing how everything is connected.

Are you using Arduino or CircuitPython?

User avatar
garyrkey
 
Posts: 13
Joined: Fri Feb 07, 2014 8:14 pm

Re: New BNO085 "I2C" connection failed to initialize

Post by garyrkey »

<edit>
Just FYI
</edit>

Same problem(?)
Feather STM32F405 Qwiic connected to BNO08x 9-dof,
Arduino IDE,
Board and Libraries updated,
rotation_vector example:

"Adafruit BNO08x test!
Failed to find BNO08x chip"

tried
"if (!bno08x.begin_I2C()"
and
"if (!bno08x.begin_SPI(BNO08X_CS, BNO08X_INT)"
- both failed in same was as above.

Looking forward to an answer to csostena's post :-)

Thanks - Gary
Last edited by garyrkey on Tue Oct 27, 2020 5:42 pm, edited 1 time in total.

User avatar
adafruit_support_carter
 
Posts: 29469
Joined: Tue Nov 29, 2016 2:45 pm

Re: New BNO085 "I2C" connection failed to initialize

Post by adafruit_support_carter »

@garyrkey Please start a new thread for your issue.

User avatar
csostena
 
Posts: 5
Joined: Sun Jan 17, 2016 12:16 am

Re: New BNO085 "I2C" connection failed to initialize

Post by csostena »

BNO085.txt
Compile and upload dump ... it may help!
(45.81 KiB) Downloaded 15 times
Feather Express to BNO085 thr Qwicc
Feather Express to BNO085 thr Qwicc
20201027_181342.jpg (295.51 KiB) Viewed 1464 times
Feather Express to BNO085 thru breadboard
Feather Express to BNO085 thru breadboard
20201027_154447.jpg (310.45 KiB) Viewed 1464 times
Hello again,
Thank you for your prompt reply.

Tested again on 10/27/2020
Programming on Arduino IDE version 1.8.13 on Windows 10

Adafruit drivers:
https://github.com/adafruit/Adafruit_Wi ... ag/2.4.0.0

Sketches:
https://github.com/adafruit/Adafruit_BN ... vector.ino
https://github.com/adafruit/Adafruit_BN ... eports.ino

Serial monitor (same for both sketches):
18:49:48.447 -> Adafruit BNO08x test!
18:49:48.800 -> Failed to find BNO08x chip

No problem getting I2C address though:
18:50:29.209 -> I2C Scanner
18:50:29.209 -> Scanning...
18:50:29.209 -> I2C device found at address 0x4A !
18:50:29.209 -> done

User avatar
adafruit_support_carter
 
Posts: 29469
Joined: Tue Nov 29, 2016 2:45 pm

Re: New BNO085 "I2C" connection failed to initialize

Post by adafruit_support_carter »

Thanks for all the additional info. I was able to recreate this and have opened an issue for you here:
https://github.com/adafruit/Adafruit_BNO08x/issues/2

User avatar
gammaburst
 
Posts: 1016
Joined: Thu Dec 31, 2015 12:06 pm

Re: New BNO085 "I2C" connection failed to initialize

Post by gammaburst »

Try my unequal-pullup trick to see if it fixes your I2C problem. It's easy to do, and it worked on my Hillcrest and SparkFun BNO080 breakouts:

* Install an external 1K resistor from SDA to 3.3V.
* Install an external 4.7K resistor from SCL to 3.3V.

The BNO055, BNO080, and probably the BNO085 all have the same I2C timing error. When the BNO ends a clock-stretching cycle, the SDA-to-SCL setup time is occasionally on the verge of failure. My unequal pullup trick creates unequal rise times, thereby increasing the SDA-to-SCL setup time.

Here's how I view this event on an oscilloscope. Ensure the I2C bus is running at 400 kHz, display both SDA and SCL, select Normal trigger, select pulse-width trigger and adjust it so trigger occurs when SDA goes high for between 1 and 2 us. Notice that SCL rise and SDA rise are sometimes barely 100 ns apart.

User avatar
csostena
 
Posts: 5
Joined: Sun Jan 17, 2016 12:16 am

Re: New BNO085 "I2C" connection failed to initialize

Post by csostena »

Thank you for your attention.
I had already tried a combination of resistors before without any luck.
I was crossing my fingers, but no, the values you gave didn't work either.
And indeed, the forum at Nordic-DevZone also points to several problems with pullups at certain frequencies and also the fact that there seem to be some internal pullups (13K ?) enabled by default (nobody knows why).
Can't follow up with the oscilloscope ... don't have one.
Also, I assume the board is running at default speed (100 kHz ?).
Thank you,
CRS

P.S. There is also a parallel discussion at github going on (see link above), presently about I2C buffer size.

User avatar
gammaburst
 
Posts: 1016
Joined: Thu Dec 31, 2015 12:06 pm

Re: New BNO085 "I2C" connection failed to initialize

Post by gammaburst »

Hi csostena,

Oh well, you're probably chasing a different problem. Good luck with that!

I mentioned using an oscilloscope because my BNO projects have short (5 cm) I2C wires and only one or two I2C devices, whereas other folks' projects may have long I2C wires or many I2C devices, and those differences affect I2C risetime. An oscilloscope is helpful to examine the situation and choose suitable pullup resistor values.

The I2C timing problem occurs infrequently and can be tricky to observe clearly on an oscilloscope, so I described scope settings that worked for me. The problem occurs at any I2C bus speed - the scope's pulse width trigger window needs to be adjusted according to I2C speed. Various scopes have different trigger capabilities that make it easier or more difficult to view this event.

User avatar
csostena
 
Posts: 5
Joined: Sun Jan 17, 2016 12:16 am

Re: New BNO085 "I2C" connection failed to initialize

Post by csostena »

The problem has been solved.
Please, refer to "https://github.com/adafruit/Adafruit_BNO08x/issues/2" for details.
Thanks all,
CRS

Locked
Please be positive and constructive with your questions and comments.

Return to “Other Products from Adafruit”