Hi All,
I have run into some issues getting the adafruit (or sparkfun for that matter) BNO08X libraries to work with a Custom embedded bno080 breakout with an ESP32 feather MCU. I am using the standard libraries and I2C address 0x4B. Attached is the schematic for the IMU and some oscilloscope captures with decode. The device acknowledges it is on the bus when using an i2c scanner, but stops giving data within a few packets for the sparkfun library and none at all with the adafruit library. Any help would be greatly appreciated. I have spent a lot of time on this, and would really appreciate any help!
Issue with BNO080 and ESP32 Feather
Moderators: adafruit_support_bill, adafruit
Please be positive and constructive with your questions and comments.
- IKay01
- Posts: 7
- Joined: Fri Feb 26, 2016 9:37 am
Issue with BNO080 and ESP32 Feather
- Attachments
-
- Read dropout
- IMG_9970.jpg (46.75 KiB) Viewed 241 times
-
- I2C Scanner
- IMG_9922.jpg (45.56 KiB) Viewed 241 times
-
- Schematic
- IMG_9917.png (414.65 KiB) Viewed 241 times
- gammaburst
- Posts: 1014
- Joined: Thu Dec 31, 2015 12:06 pm
Re: Issue with BNO080 and ESP32 Feather
Are you able to talk successfully to an Adafruit or Sparkfun BNO085 breakout board?
Your schematic shows some BNO085 signals going off-page to unknown places.
What's causing the weird half-volt levels in your first scope image? Could be an electrical problem, or two bus drivers fighting, or a poor connection in a solderless breadboard.
Why put 47 ohm resistors in series with the I2C signals?
"stops giving data within a few packets":
Try temporarily installing a stronger pullup resistor (about 1K or 2K ohms) on I2C_SDA. Leave I2C_SCL at 3.3K. See if that helps the communication problem.
Your schematic shows some BNO085 signals going off-page to unknown places.
What's causing the weird half-volt levels in your first scope image? Could be an electrical problem, or two bus drivers fighting, or a poor connection in a solderless breadboard.
Why put 47 ohm resistors in series with the I2C signals?
"stops giving data within a few packets":
Try temporarily installing a stronger pullup resistor (about 1K or 2K ohms) on I2C_SDA. Leave I2C_SCL at 3.3K. See if that helps the communication problem.
- IKay01
- Posts: 7
- Joined: Fri Feb 26, 2016 9:37 am
Re: Issue with BNO080 and ESP32 Feather
Hi gammaburst,
Thanks for the reply. The signals that are cropped go directly into the feather’s I2C pins. I was able to successfully communicate with a CEVA labs breakout board (fsm300) using the SparkFun library. The resistors are there to control line impedance/offer debugging value. It appears only when I use the IMU that is soldered to my daughter board that I get the failure. I haven’t tried the mismatched pull up resistor yet, so I plan to give that a go next. There seems to be bus contention, which is odd since I only have one I2C device on the line currently.
Thanks for the reply. The signals that are cropped go directly into the feather’s I2C pins. I was able to successfully communicate with a CEVA labs breakout board (fsm300) using the SparkFun library. The resistors are there to control line impedance/offer debugging value. It appears only when I use the IMU that is soldered to my daughter board that I get the failure. I haven’t tried the mismatched pull up resistor yet, so I plan to give that a go next. There seems to be bus contention, which is odd since I only have one I2C device on the line currently.
- gammaburst
- Posts: 1014
- Joined: Thu Dec 31, 2015 12:06 pm
Re: Issue with BNO080 and ESP32 Feather
Even if the I2C devices are confused and out-of-sync, they should only drive to ground. Perhaps a ground connection is missing somewhere, or maybe the 47 ohm series resistor is actually 470 ohm. Comparing the signals on both sides of the 47 ohm resistor could give you more clues.
I've seen too many BNO055 and BNO085 projects that run intermittently or badly, then run fine with unequal pullup resistors.
I've seen too many BNO055 and BNO085 projects that run intermittently or badly, then run fine with unequal pullup resistors.
- IKay01
- Posts: 7
- Joined: Fri Feb 26, 2016 9:37 am
Re: Issue with BNO080 and ESP32 Feather
Hi gammaburst,
Thanks again for your help. I tried the unequal pull up (1.1k on SDA, 3k3 on SCL), and it may be too strong of a pull up because now it does not pull all the way down to logic low. The resistors are definitely 47R5, as the signal is basically identical on either side of the resistor. Still scratching my head on this one.
Thanks again for your help. I tried the unequal pull up (1.1k on SDA, 3k3 on SCL), and it may be too strong of a pull up because now it does not pull all the way down to logic low. The resistors are definitely 47R5, as the signal is basically identical on either side of the resistor. Still scratching my head on this one.
- Attachments
-
- unequal pull ups
- IMG_0001.jpg (42 KiB) Viewed 207 times
- gammaburst
- Posts: 1014
- Joined: Thu Dec 31, 2015 12:06 pm
Re: Issue with BNO080 and ESP32 Feather
Hi IKay01,
An I2C driver (in fast-mode) is required to pull down below 0.6V when sinking 6mA of current. Your 1.1K resistor pulls only half that much, so is should be fine. See Table 10 in the I2C specification https://www.nxp.com/docs/en/user-guide/UM10204.pdf
The I2C transaction looks reasonable except for the bad voltage levels. The two 1V 400us pulses are probably BNO clock-stretching cycles, and the five 1V 20us pulses are probably the BNO acknowledging the five write bytes. During those bad pulses about 3mA should be flowing from the 3.3V supply through 1.1K pullup R121, through wire I2C_SDA, through 47-ohm R128, into BNO085 pin 20, and through its I2C driver to ground. So the voltage across R128 during those bad pulses should be about 0.14 volts. What voltage do you see on the left and right sides of R128? You may need to zoom-in with your scope. That should tell us if the BNO isn't pulling down strong enough, or if something else is pulling up unexpectedly.
An I2C driver (in fast-mode) is required to pull down below 0.6V when sinking 6mA of current. Your 1.1K resistor pulls only half that much, so is should be fine. See Table 10 in the I2C specification https://www.nxp.com/docs/en/user-guide/UM10204.pdf
The I2C transaction looks reasonable except for the bad voltage levels. The two 1V 400us pulses are probably BNO clock-stretching cycles, and the five 1V 20us pulses are probably the BNO acknowledging the five write bytes. During those bad pulses about 3mA should be flowing from the 3.3V supply through 1.1K pullup R121, through wire I2C_SDA, through 47-ohm R128, into BNO085 pin 20, and through its I2C driver to ground. So the voltage across R128 during those bad pulses should be about 0.14 volts. What voltage do you see on the left and right sides of R128? You may need to zoom-in with your scope. That should tell us if the BNO isn't pulling down strong enough, or if something else is pulling up unexpectedly.
- IKay01
- Posts: 7
- Joined: Fri Feb 26, 2016 9:37 am
Re: Issue with BNO080 and ESP32 Feather
Success! I had to do both the unequal pull-ups and slow down the clock rate to 100k for the transactions to work successfully. This should be sufficient for my application. Thank you gammaburst! You were a tremendous help!
- gammaburst
- Posts: 1014
- Joined: Thu Dec 31, 2015 12:06 pm
Re: Issue with BNO080 and ESP32 Feather
Great that it's now working!
Are the bad I2C voltage levels still occurring?
I've never needed to lower my clock rate from 400K to 100K to make it work.
Perhaps whatever's causing the bad voltage levels is also causing trouble at 400K speed.
Are the bad I2C voltage levels still occurring?
I've never needed to lower my clock rate from 400K to 100K to make it work.
Perhaps whatever's causing the bad voltage levels is also causing trouble at 400K speed.
Please be positive and constructive with your questions and comments.