Feather Huzzah ESP8266 and BNO055 not working (AGAIN)?

Please tell us which board you are using.
For CircuitPython issues, ask in the Adafruit CircuitPython forum.

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
greg_corson
 
Posts: 112
Joined: Tue Sep 01, 2015 8:00 pm

Feather Huzzah ESP8266 and BNO055 not working (AGAIN)?

Post by greg_corson »

Hi,
This is related to the locked post here viewtopic.php?f=57&t=90222

I've been working with the BNO055 board and the ESP8266 feather again. I started out plugging them into a solderless breadboard and hooking up the BNO055 using short (2 inch) wires powered from the 3.3v pin on the feather. This worked fine, all the Adafruit examples worked and some code I wrote to display the compass heading on a neopixel ring worked fine.

Then I tried connecting the BNO055 to an old Arduino Uno (5v) using 7 inch wires, this also worked and was totally reliable.

Today I went back to the ESP8266 feather and hooked up the BNO055 using the same 7 inch wires and it is now very unreliable. Sometimes it comes up ok in the test code and reports values that make sense. Most of the time it does not detect the BNO055 and never seems to detect it if after pushing the reset button on the ESP.

I went back to the post above and tried setting Wire.setClockStretchLimit(8533) and Wire.setClockStretchLimit(1000) as they suggest but this does not make any difference.

I have carefully checked the wiring and the fact that it SOMETIMES works confirms it must be wired up right. Not sure what might be wrong, Is I2c that sensitive to wire length (from 2 to 7 inches)?

User avatar
greg_corson
 
Posts: 112
Joined: Tue Sep 01, 2015 8:00 pm

Re: Feather Huzzah ESP8266 and BNO055 not working (AGAIN)?

Post by greg_corson »

Small update, I put the BNO055 back on the solderless breadboard and used very short wires to connect it to the ESP. Previously this configuration worked, now it does not.

Far as I can tell nothing has changed, but now the BNO055 is not detected. Doesn't if I have the clock stretching setup or not.

Guess I have to break out the logic analyzer on this one, unless you have suggestions?

User avatar
adafruit_support_mike
 
Posts: 67485
Joined: Thu Feb 11, 2010 2:51 pm

Re: Feather Huzzah ESP8266 and BNO055 not working (AGAIN)?

Post by adafruit_support_mike »

I2C shouldn't be bothered by wire lengths less than a foot or so.

Post a photo showing your hardware and connections and we'll see if those hold any clues. 800x600 images usually work best.

User avatar
greg_corson
 
Posts: 112
Joined: Tue Sep 01, 2015 8:00 pm

Re: Feather Huzzah ESP8266 and BNO055 not working (AGAIN)?

Post by greg_corson »

board 2s.jpg
board 2s.jpg (154.88 KiB) Viewed 227 times
board 1s.jpg
board 1s.jpg (142.2 KiB) Viewed 227 times
This same configuration with a neo-pixel ring attached was working a week ago. Now it does not work.

I have a couple different types of feather boards I can try it with today.

User avatar
greg_corson
 
Posts: 112
Joined: Tue Sep 01, 2015 8:00 pm

Re: Feather Huzzah ESP8266 and BNO055 not working (AGAIN)?

Post by greg_corson »

Just to confirm there is nothing wrong with the wiring or the BNO055, I took the same breadboard pulled out the Feather HUZZAH 8266 and replaced it with a WICED Feather and the IMU worked fine.

I guess this proves there is nothing wrong with the BNO055 breakout or the wiring.

I tried to build it for the Feather M0 WiFi but that failed with the error below which I found confusing because this isn't an Arduino Zero.

Code: Select all

Arduino: 1.8.5 (Windows 10), Board: "Adafruit Feather M0"

In file included from C:\Users\gcorson\Documents\Arduino\libraries\Adafruit_BNO055\examples\rawdata\rawdata.ino:3:0:

C:\Users\gcorson\Documents\Arduino\libraries\Adafruit_BNO055/Adafruit_BNO055.h:283:2: error: #error "On an arduino Zero, BNO055's ADR pin must be high. Fix that, then delete this line."

 #error "On an arduino Zero, BNO055's ADR pin must be high. Fix that, then delete this line."

  ^

exit status 1
Error compiling for board Adafruit Feather M0.

I would really like to get this project working with the ESP8266 as it's nice simple and cheap.

User avatar
greg_corson
 
Posts: 112
Joined: Tue Sep 01, 2015 8:00 pm

Re: Feather Huzzah ESP8266 and BNO055 not working (AGAIN)?

Post by greg_corson »

Ah ok...figured out that compile message, didn't realize the Feather M0 was already using the default I2C address for the BNO055.

Feather M0 WiFi with ATWINC1500: works after you change the BNO055 to alternate I2C address
WICED feather: works fine
Feather HUZZA ESP8266: Does not work, usually can't find BNO055, sometimes finds it but returns values that don't change.
Feather HUZZA ESP32: Not tested yet (have to solder on headers)

So I still need a solution for the ESP8266, would really like to use this chip.

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

Re: Feather Huzzah ESP8266 and BNO055 not working (AGAIN)?

Post by gammaburst »

Just a wild guess ... See if this simple test helps your BNO055 communicate more reliably.

I noticed that the BNO055 creates a marginal timing situation on the I2C bus, sometimes causing finicky communication. Simply touching one of the I2C pins with my finger causes the BNO055 to work better or worse. Symptoms vary from good to bad depending on which microcontroller I'm using.

Try adding unequal I2C pullup resistors to your breadboard, such as 2.2K from SDA to +3.3V, and 4.7K from SCL to +3.3V. The exact values aren't critical, the SDA resistor simply needs to be significantly lower value than the SCL resistor. This causes SDA to pullup faster than SCL.

Maybe that'll help.

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

Return to “Feather - Adafruit's lightweight platform”