IMU Sensor SEN-10183 I2C NXT

Discussion specific to the intelligent brick, sensors, motors, and more.
Post Reply
rsantoz
Posts: 2
Joined: 03 Jan 2012, 17:04

IMU Sensor SEN-10183 I2C NXT

Post by rsantoz »

Hi, I am an Electrical Engineering Student, in the Autonomous Systems course, and I had to develop an Extended Kalman Filter for attitude estimation.

After the Filter development, I had to take measurements from the following sensor:

http://www.sparkfun.com/products/10183

using the NXT brick. Unfortunately i can't communicate with the sensor since i keep getting errors like:

error message 221: "Communication bus error"
and
error message 32: "Pending Communication transaction in progress"

We can get the measurements from the NXT sensors.

Does anyone have an idea of what can be done to take measurements, using I2C interface with Matlab, from this kind of sensor?

Thanks for your help,
Regards
RS
mightor
Site Admin
Posts: 1079
Joined: 25 Sep 2010, 15:02
Location: Rotterdam, Netherlands
Contact:

Re: IMU Sensor SEN-10183 I2C NXT

Post by mightor »

The pull-ups may not be sufficient, they're only 4.7K and the NXT likes them around 83K for 5V and around 47K for 3V3.

- Xander
| My Blog: I'd Rather Be Building Robots (http://botbench.com)
| RobotC 3rd Party Driver Suite: (http://rdpartyrobotcdr.sourceforge.net)
| Some people, when confronted with a problem, think, "I know, I'll use threads,"
| and then two they hav erpoblesms. (@nedbat)
rsantoz
Posts: 2
Joined: 03 Jan 2012, 17:04

Re: IMU Sensor SEN-10183 I2C NXT

Post by rsantoz »

First thank you for your reply,

We already tried a pull-up with 82k resistors for 5V, since we found that info somewhere in this forum...

Can you identify any other possible problem?

Thank you again,
RS
mightor
Site Admin
Posts: 1079
Joined: 25 Sep 2010, 15:02
Location: Rotterdam, Netherlands
Contact:

Re: IMU Sensor SEN-10183 I2C NXT

Post by mightor »

Your IMU runs on 3V3, judging from the schematics on the product page. So why are you pulling up to 5V when a 47K to 3V3 will do fine. You may need a level converter like this one: http://www.sparkfun.com/products/8745

Also, don't cross post to multiple sub forums. I will delete the other one and move this thread.

- Xander
| My Blog: I'd Rather Be Building Robots (http://botbench.com)
| RobotC 3rd Party Driver Suite: (http://rdpartyrobotcdr.sourceforge.net)
| Some people, when confronted with a problem, think, "I know, I'll use threads,"
| and then two they hav erpoblesms. (@nedbat)
mattallen37
Posts: 1818
Joined: 02 Oct 2010, 02:19
Location: Michigan USA
Contact:

Re: IMU Sensor SEN-10183 I2C NXT

Post by mattallen37 »

Quick answer: expect it to be the hardest sensor you'll ever interface with the NXT (and hopefully it wont be too bad)!

Take a look at this topic for a more complete answer :?

I don't know what all you tried, or are capable of, but read through that topic for more info. I think the gyro and accel are the same for both IMUs, so expect the same issues.

Once you finish reading that topic (which explains some things), then click on the spoiler:
The one thing that I don't think was tested, and should work, is Philo's suggestion to use an I2C bus repeater (specifically the PCA9517). I would greatly recommend trying it, but unfortunately didn't know of such a device at the time of the other topic. Perhaps you will be successful much quicker than Aswin was.
Once you get the electrical right, and are able to communicate properly with the accelerometer and gyro, then it looks like communication with the magnetometer should be fairly straight forward.

Basically, make sure none of the pins on the IMU ever come in contact with a voltage >3.3v.

I also recommend you use a programming language that supports custom I2C calls. I don't know what all Matlab supports, but with a HW hack, you need to be reasonably sure that the SW isn't to blame for a lack of functionality (so you can focus on HW errors). I suggest you use NXC, as many people on these forums use it. ROBOTC is good as well, but not free (also not really supported here). If you are comfortable with Matlab, and confident with low level I2C (at a byte level), then I'd say give it a go.
Matt
http://mattallen37.wordpress.com/

I'm all for gun control... that's why I use both hands when shooting ;)
mightor
Site Admin
Posts: 1079
Joined: 25 Sep 2010, 15:02
Location: Rotterdam, Netherlands
Contact:

Re: IMU Sensor SEN-10183 I2C NXT

Post by mightor »

ROBOTC is good as well, but not free (also not really supported here)
Well, that's not really true. As long as I'm still around on these forums, it'll be supported. Don't forget about some of the other ROBOTC power users on these forums, there's quite a few of them :) However, there /is/ a ROBOTC specific forum, which you can find here: http://www.robotc.net/forums/.

These forums are language-agnostic, just as long as the subject is vaguely Mindstorms-related.

- Xander
| My Blog: I'd Rather Be Building Robots (http://botbench.com)
| RobotC 3rd Party Driver Suite: (http://rdpartyrobotcdr.sourceforge.net)
| Some people, when confronted with a problem, think, "I know, I'll use threads,"
| and then two they hav erpoblesms. (@nedbat)
mattallen37
Posts: 1818
Joined: 02 Oct 2010, 02:19
Location: Michigan USA
Contact:

Re: IMU Sensor SEN-10183 I2C NXT

Post by mattallen37 »

Oh, I know. I just meant that NXC is by far the most used on these forums (compared to ROBOTC), and more people here seem to use NXC than ROBOTC.
Matt
http://mattallen37.wordpress.com/

I'm all for gun control... that's why I use both hands when shooting ;)
aswin0
Posts: 201
Joined: 29 Sep 2010, 06:58

Re: IMU Sensor SEN-10183 I2C NXT

Post by aswin0 »

I do not want to change this topic into a "what is the best environment" flame war. But in this case I would go for Lejos. It does have support for working with matrices, which is invaluable when doing Kalman filters.
I do have robotC and Lejos drivers for all three sensors on this board.

Do you have any documentation of the Kalman filter you designed? I am very curious to the state you modeled.
My blog: nxttime.wordpress.com
Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests