0

issues connecting to NXP 9DOF IMU on I2C using Raspberry Pi
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

issues connecting to NXP 9DOF IMU on I2C using Raspberry Pi

by BoredInventor on Thu Jun 23, 2022 10:43 am

The Issue

I am using a Raspberry Pi with Raspberry Pi OS buster headless installed and intend to read the IMU data from the official Adafruit NXP 9DOF sensor. I have soldered the pins onto the breakout and wired the device exactly as described in the official guide.

My Setup

Using python 3.8.10 and pip 20.0.2, I installed the following libaries:

- Adafruit-Blinka
- adafruit-circuitpython-fxos8700
- adafruit-circuitpython-fxas21002c

And used the demo code (also found in the official guide)to attach to the IMU and read + output its data But all I got was the following message:

Code: Select all | TOGGLE FULL SIZE
ValueError: No I2C device at address: 0x1f


Troubleshooting I did

I then proceded inspect the I2C bus using
Code: Select all | TOGGLE FULL SIZE
sudo i2cdetect -y 1
, where I the connection is wonky and sometimes only one, sometimes both but most of the time none of the IMUs sensors are detected at all. Here are three subsequent but different outputs of
Code: Select all | TOGGLE FULL SIZE
sudo i2cdetect -y 1
:

Code: Select all | TOGGLE FULL SIZE
me@raspi:~
> $ sudo i2cdetect -y 1
     0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f
00:                         -- -- -- -- -- -- -- --
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
70: -- -- -- -- -- -- -- --                         
me@raspi:~
> $ sudo i2cdetect -y 1
     0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f
00:                         -- -- -- -- -- -- -- --
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
20: -- 21 -- -- -- -- -- -- -- -- -- -- -- -- -- --
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
70: -- -- -- -- -- -- -- --                         
me@raspi:~
> $ sudo i2cdetect -y 1
     0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f
00:                         -- -- -- -- -- -- -- --
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
20: -- 21 -- -- -- -- -- -- -- -- -- -- -- -- -- --
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
70: -- -- -- -- -- -- -- --                         
me@raspi:~
> $ sudo i2cdetect -y 1
     0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f
00:                         -- -- -- -- -- -- -- --
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
20: -- 21 -- -- -- -- -- -- -- -- -- -- -- -- -- --
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
70: -- -- -- -- -- -- -- --                         
me@raspi:~
> $ sudo i2cdetect -y 1
     0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f
00:                         -- -- -- -- -- -- -- --
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 1f
20: -- 21 -- -- -- -- -- -- -- -- -- -- -- -- -- --
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
70: -- -- -- -- -- -- -- --


When opening the python interpreter, I accessed the I2C bus and used the scan method to see the connected devices, where the output also varied wildly:

Code: Select all | TOGGLE FULL SIZE
Python 3.8.10 (default, Mar 15 2022, 12:22:08)
[GCC 9.4.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import board
>>> i2c = board.I2C()
>>> i2c.scan()
[]
>>> i2c.scan()
[31, 33]
>>> i2c.scan()
[31, 33]
>>> i2c.scan()
[33]


Conclusion

I have performed troubleshooting using other I2C devices (i.e. the 16-channel servo driver) and the connection works just fine, so I recon there is an issue with connecting to the IMU. I cannot connect to and use the IMU at all. I have double-checked and re-done the soldering - please see the attached image of the solder spots. I know it is not world class but I figure the connections should be sufficient.

Screenshot from 2022-06-23 16-07-49.png
Screenshot from 2022-06-23 16-07-49.png (162.72 KiB) Viewed 54 times


The Help I need

I have contacted the officially licensed Adafruit reseller Tinkerly/Paradisetronic and they said I would have to contact Adafruit "since it is on them to determine whether I am eligible for a replacement or not". So I am posting this issue here and will be sending an email to the tech/customer support and try to get a refund/new IMU.

I really need this device to work and would strongly prefer using this IMU over the other available products. If there is any more troubleshooting I can do or if I am eligible to be refunded a new IMU, this would be greatly appreciated!

BoredInventor
 
Posts: 2
Joined: Tue Mar 19, 2019 2:45 am

Re: issues connecting to NXP 9DOF IMU on I2C using Raspberry

by dastels on Thu Jun 23, 2022 11:57 am

I would start by revisiting the soldering. A few look pretty questionable. Ideally they should look something like circus tents. The ground pin looks especially questionable.

Did you enable I2C using raspi-config?

Dave

dastels
 
Posts: 10145
Joined: Tue Oct 20, 2015 3:22 pm

Re: issues connecting to NXP 9DOF IMU on I2C using Raspberry

by BoredInventor on Thu Jun 23, 2022 12:04 pm

Hi, I can redo the soldering no problem. But a few darkened spots are appearing already. Could that be an issue leading to me damaging the board if I try to solder it again?

Did you enable I2C using raspi-config?


Yes I did, I have also attached some output when running the
Code: Select all | TOGGLE FULL SIZE
i2cdetect
command.

BoredInventor
 
Posts: 2
Joined: Tue Mar 19, 2019 2:45 am

Re: issues connecting to NXP 9DOF IMU on I2C using Raspberry

by dastels on Thu Jun 23, 2022 1:05 pm

You shouldn't need to apply heat for that long. Just enough to melt the solder and have it flow into the hole, leaving a smooth concave "tent".

What are you using to connect the IMU to the Pi?

Dave

dastels
 
Posts: 10145
Joined: Tue Oct 20, 2015 3:22 pm

Please be positive and constructive with your questions and comments.