Page 3 of 6

Re: Pico and BNO055 IMU

Posted: Wed Jan 05, 2022 12:29 pm
by Roberthh
Did you connect the resistors between SDA and 3.3V, SCL and 3.3V?

Re: Pico and BNO055 IMU

Posted: Wed Jan 05, 2022 12:53 pm
by Thomas_G_S
My SDA and SCL aren't connected to a 3.3v pin. Only the power is. Have you got any idea why it might have changed, because it was working ok before without any change to the wiring.

Re: Pico and BNO055 IMU

Posted: Thu Jan 06, 2022 11:26 am
by Thomas_G_S
I've tried connecting the gyro to a greater power supply, ~5V. I've also changed the wiring to see if that makes a difference, and still no luck.

Re: Pico and BNO055 IMU

Posted: Thu Jan 06, 2022 12:00 pm
by Roberthh
My SDA and SCL aren't connected to a 3.3v pin.
It is not about connecting these directly to 3.3V. The hint was to connect a 4.7k resistor between
- SDA and 3.3V
- SCL and 3.3V

That way, the level of the SDA and SCL signals is pulled up when not driven by board or sensor. Still strange, if the current setup works with another firmware/driver combo.

Re: Pico and BNO055 IMU

Posted: Thu Jan 06, 2022 12:57 pm
by Thomas_G_S
I still don't quite understand what you mean when you say "between the SDA/SCL and 3.3V". This is my current setup:
- Pico GP0 to BNO055 SDA
- Pico GP1 to BNO055 SCL
- Pico 3v3(out) to BNO055 Vin
- Pico GND to BNO055 GND

I have tried putting normal resistors into the SDA and SCL lines between the Pico and the BNO055, are these the same as pullup resistors? When we first got the gyro working it was with exactly this setup and driver.

Re: Pico and BNO055 IMU

Posted: Thu Jan 06, 2022 1:32 pm
by Roberthh
A proper I2C looks like the picture below. Sometimes the devices like the Gyro have the Pullup resistors already integrated. Than you do not need external ones.
pullup.png
pullup.png (12.76 KiB) Viewed 12808 times

Re: Pico and BNO055 IMU

Posted: Thu Jan 06, 2022 1:39 pm
by Thomas_G_S
Ok, I think mine does, it is a breakout board and appears to have a lot of functions. Any idea why it isn't working with the basic setup then? I've tried changing the frequency as you said.

Re: Pico and BNO055 IMU

Posted: Sun Jan 09, 2022 8:29 pm
by Nitrosfpv
You have to set the frequency to 4000 then it works properly:

from bno055 import *
i2c = I2C (0, scl = Pin (5), sda = Pin (4), freq = 4000)
imu = BNO055 (i2c)

And yes, this is enough for the most complex control movements:

https://www.youtube.com/watch?v=9afIRWvspV8

;)

Re: Pico and BNO055 IMU

Posted: Sun Jan 09, 2022 9:09 pm
by Roberthh
You have to set the frequency to 4000 then it works properly
That is a clear indication that the external pull up resistors are missing, or/and the wires are too long. The internal pull up resistors are 30-40kOhm.

Re: Pico and BNO055 IMU

Posted: Sun Jan 09, 2022 9:38 pm
by Thomas_G_S
I tried setting the frequency to 4000 but still no luck. Thanks for the suggestion though Nitrosfpv :)

Roberthh, I've connected three pullup resistors in series to reach a total of 1.27kΩ (330Ω, 470Ω, 470Ω). The Pico is still failing to detect the BNO055. I'm using wires which are around 20 cm long. Any other suggestions?

Thank you so much for all of the help, much appreciated :)