BNO055 - STEMMA QT / Qwiic - No pull up found on SDA or SCL; check your wiring

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
jdubrow
 
Posts: 32
Joined: Tue Dec 21, 2010 1:49 pm

BNO055 - STEMMA QT / Qwiic - No pull up found on SDA or SCL; check your wiring

Post by jdubrow »

I have a https://www.adafruit.com/product/4646, and I tried using the example from: https://learn.adafruit.com/adafruit-bno ... cuitpython. When I try running it returns the following error. I also have a sht31d connected via STEMMA QT connectors. I tried with just the BNO055 and it still gave the same error, but occasionally had the second error shown.

First (primary error):
Hello World!
Traceback (most recent call last):
File "code.py", line 13, in <module>
RuntimeError: No pull up found on SDA or SCL; check your wiring
Second error:
File "code.py", line 15, in <module>
File "/lib/adafruit_bno055.py", line 777, in __init__
File "/lib/adafruit_bno055.py", line 212, in __init__
File "/lib/adafruit_bno055.py", line 788, in _read_register
Code:
import board
import digitalio
import time
import busio
import adafruit_sht31d
import adafruit_bno055

print("Hello World!")

led = digitalio.DigitalInOut(board.LED)
led.direction = digitalio.Direction.OUTPUT

i2c = busio.I2C(board.SCL, board.SDA) # <=- line 13
sensor = adafruit_sht31d.SHT31D(i2c)
sensor2 = adafruit_bno055.BNO055_I2C(i2c)

User avatar
jdubrow
 
Posts: 32
Joined: Tue Dec 21, 2010 1:49 pm

Re: BNO055 - STEMMA QT / Qwiic - No pull up found on SDA or SCL; check your wiring

Post by jdubrow »

The sht31d works fine if python just uses that device, both with and without the BNO055 connected.

User avatar
jdubrow
 
Posts: 32
Joined: Tue Dec 21, 2010 1:49 pm

Re: BNO055 - STEMMA QT / Qwiic - No pull up found on SDA or SCL; check your wiring

Post by jdubrow »

Also, I'm using this feather: https://www.adafruit.com/product/5477

User avatar
Franklin97355
 
Posts: 23903
Joined: Mon Apr 21, 2008 2:33 pm

Re: BNO055 - STEMMA QT / Qwiic - No pull up found on SDA or SCL; check your wiring

Post by Franklin97355 »

There are pullup resistors on the board. Can you post pictures of the board so we can check?

User avatar
jdubrow
 
Posts: 32
Joined: Tue Dec 21, 2010 1:49 pm

Re: BNO055 - STEMMA QT / Qwiic - No pull up found on SDA or SCL; check your wiring

Post by jdubrow »

Here is a snapshot of the board.
Attachments
0919220921_HDR.jpg
0919220921_HDR.jpg (53.26 KiB) Viewed 392 times
0919220920_HDR.jpg
0919220920_HDR.jpg (45.53 KiB) Viewed 392 times

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

Re: BNO055 - STEMMA QT / Qwiic - No pull up found on SDA or SCL; check your wiring

Post by gammaburst »

Try this experiment:
Temporarily attach a short bare wire (a few centimeters) to signal SCL.
Grab the bare wire with two fingers, reboot the project, and observe its behavior.
Does the project run better, worse, or about the same?

Your fingers add some capacitance that slows the signal's risetime.

User avatar
jdubrow
 
Posts: 32
Joined: Tue Dec 21, 2010 1:49 pm

Re: BNO055 - STEMMA QT / Qwiic - No pull up found on SDA or SCL; check your wiring

Post by jdubrow »

gammaburst wrote: Mon Sep 19, 2022 5:00 pm Try this experiment:
Temporarily attach a short bare wire (a few centimeters) to signal SCL.
Grab the bare wire with two fingers, reboot the project, and observe its behavior.
Does the project run better, worse, or about the same?

Your fingers add some capacitance that slows the signal's risetime.
Tried that without any luck. My multimeter shows 3.3v on SDA/SCL when not running any code. Only having issues with the BNO055. Two other devices work without a problem.

/Jason

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

Re: BNO055 - STEMMA QT / Qwiic - No pull up found on SDA or SCL; check your wiring

Post by gammaburst »

Hi jdubrow,
I ordered a couple Adafruit 5477 boards. Should arrive Wednesday. I'll try to reproduce your error message.

In the mean time, here's an example of a successful finger-grab test:
viewtopic.php?p=889280#p889280
(That's discussing a BNO085, but it has the same I2C timing problem as the BNO055.)

Of course, your board may have a completely different problem.

User avatar
jdubrow
 
Posts: 32
Joined: Tue Dec 21, 2010 1:49 pm

Re: BNO055 - STEMMA QT / Qwiic - No pull up found on SDA or SCL; check your wiring

Post by jdubrow »

I tried adding a 2.8k resistor between Vin and SDA. It did not help. I then tried SCL also without luck.

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

Re: BNO055 - STEMMA QT / Qwiic - No pull up found on SDA or SCL; check your wiring

Post by gammaburst »

Hi jdubrow, I received the ESP32-S3 and connected it to a SHT31D and BNO055. I see two CircuitPython problems, maybe in the busio library:

- CircuitPython fails to clear the I2C bus (by outputting some dummy SCL cycles) when starting up. If a slave is holding SDA low, it emits the misleading "no pullup found" error message.

- CircuitPython times out during the BNO055's clock-stretching I2C cycle. That causes an "ETIMEDOUT" error message. I think you saw timeout errors too, but your earlier message (mentioning lines 777 212 788) didn't include the full error message. I tried changing the timeout value but it's either broken or poorly documented. I recall seeing this problem before, and I think I fixed it by switching from CircuitPython 8 to 7, but version 7 isn't available for the ESP32-S3.

The extra pullup resistor on SCL is probably needed too.

Other folks have encountered these same problems, but Adafruit seems uninterested in fixing them.

User avatar
jdubrow
 
Posts: 32
Joined: Tue Dec 21, 2010 1:49 pm

Re: BNO055 - STEMMA QT / Qwiic - No pull up found on SDA or SCL; check your wiring

Post by jdubrow »

gammaburst wrote: Wed Sep 21, 2022 10:42 pm ....
- CircuitPython fails to clear the I2C bus (by outputting some dummy SCL cycles) when starting up. If a slave is holding SDA low, it emits the misleading "no pullup found" error message.

- CircuitPython times out during the BNO055's clock-stretching I2C cycle. That causes an "ETIMEDOUT" error message. I think you saw timeout errors too, but your earlier message (mentioning lines 777 212 788) didn't include the full error message. I tried changing the timeout value but it's either broken or poorly documented. I recall seeing this problem before, and I think I fixed it by switching from CircuitPython 8 to 7, but version 7 isn't available for the ESP32-S3.

....

Other folks have encountered these same problems, but Adafruit seems uninterested in fixing them.
Ahhh that would explain why it thinks it had no pull up :)

Yes, that was one of the errors I received, though it only happened one time and I'm not even sure how I ended up causing it to occur and haven't been able to repeat it beyond the one time it failed with the timeout.

That stinks that they aren't willing to stand by the products and fix them. :( I'd never used circuit python before but thought it would be good to brush up on my python. Maybe I'll just go back to C. Where in the code is the problem? Is it in the adafruit library or some central part of circuit python?

/Jason

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

Re: BNO055 - STEMMA QT / Qwiic - No pull up found on SDA or SCL; check your wiring

Post by gammaburst »

CircuitPython is based upon MicroPython, so CircuitPython probably inherits its I2C bugs. I vaguely recall seeing similar bug reports in MicroPython forums. I don't know how to fix CircuitPython/MicroPython. I'm no Python developer. I'm maybe one step above a Python newbie. I normally use C.

The I2C bus clearing step is described in the I2C specification. See section 3.1.16: https://www.nxp.com/docs/en/user-guide/UM10204.pdf

I can read the SHD31D by using busio but not bitbangio.
I can read the BNO055 by using bitbangio but not busio.
I haven't found one way to read both sensors.

Here's my test code:

Code: Select all

import board
import digitalio
import time

print("\n\n***** Hello world *****")

if True:        # optionally wiggle SCL to clear I2C slave devices
  print("***** Clear I2C bus *****")
  scl = digitalio.DigitalInOut(board.SCL)
  scl.direction = digitalio.Direction.OUTPUT  # want open drain scl.drive_mode = digitalio.DriveMode.OPEN_DRAIN
  for n in range(1,20):
    scl.value = 0
    time.sleep(0.0001)
    scl.value = 1
    time.sleep(0.0001)
  scl.direction = digitalio.Direction.INPUT
  scl.deinit()

for k in range (2):
  print("***** Hello SHT31D *****")
  import busio
  import adafruit_sht31d
  i2c = busio.I2C(board.SCL, board.SDA, frequency=100000, timeout=10000)
  sht31d = adafruit_sht31d.SHT31D(i2c)
  for n in range (10):
    time.sleep(0.1)
    print("Temperature: {:+7.2f}".format(sht31d.temperature))
  i2c.deinit()
  print("***** Goodbye SHT31D *****")

  print("***** Hello BNO055 *****")
  import bitbangio
  import adafruit_bno055
  i2c = bitbangio.I2C(board.SCL, board.SDA, frequency=100000, timeout=10000)
  bno055 = adafruit_bno055.BNO055_I2C(i2c)
  for n in range (10):
    time.sleep(0.1)
    print("Quaternion: {:+8.5f} {:+8.5f} {:+8.5f} {:+8.5f}".format(*bno055.quaternion))
  i2c.deinit()
  print("***** Goodbye BNO055 *****")

print("***** Goodbye cruel world *****\n")

User avatar
jdubrow
 
Posts: 32
Joined: Tue Dec 21, 2010 1:49 pm

Re: BNO055 - STEMMA QT / Qwiic - No pull up found on SDA or SCL; check your wiring

Post by jdubrow »

Thanks! That code does work!

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

Return to “Other Products from Adafruit”