MPU9250 Investigation Result

Silly me, Saw that the $8.50 HiLetgo 9-axis IMU / MPU-9250 lists VCC of 5v and didn’t think they would run the I2C at 3.3v.

I made a nice adapter cable, plugged it into the GoPiGo3 hardware I2C jack, affixed the board nicely to a “first generation” DI / Grove sensor mount that only cost 50 cents, fired up a read of the “WHO AM I?” Register, and saw the expected 0x71 “MPU9250” response, and proceeded to attempt calibration.

Only when the output values seemed to be jumping about wildly did I begin to suspect something was amiss.

I connected the board direct to another RPi and discovered much better behaving output values.

Guess I should have done more investigation before getting excited about saving some money. I don’t want to wire it direct to the GoPiGo3 GPIO connector so the final result is to toss this board and buy the DI IMU.


I am running a MPU-9250 with an Rpi 3B+ on my Lino Robot and it works very well with Rpi. It gets calibrated every time I start the Lino Robot chassis up and so far has provided excellent accel/gyro/compass values.

By the way, you might want to take a look at this Jetbot which is a little more expensive than the GoPiGo3, but uses a Jetson Nano and comes with some great visual tracking software.


1 Like

Thanks, but:

  1. I will not upgrade to another robot until Carl is self sufficient and cpu bound.
  2. I am over a year into familiarization w/GoPiGo3. Switching will set me back a year and another $350 or more.
  3. The only “ride” Carl might benefit from at the moment, would be a Roomba that has a hacking interface, cleans the floors, and manages its own recharging, but it is not small, it is noisy, it is expensive, and is still a setback.

Carl’s deficiency is me. I get distracted too easily.

Is your MPU 9250 code on github?

My test was not very successful. The best I could get after successful calibration is 2 degree repeatability on roll and pitch, neither of which Carl has or wants freedom to explore, and 10-20 degree repeatability on yaw which means it is totally useless to Carl. As far as dX, dY, dZ from a reference point, nothing repeatable or usable.

It may very well be that I caused some damage when I hooked the board’s 3.3v I2C to the GoPiGo3’s 5v I2C.

This was before calibration:

And this is the mag calibration result:

Complete story and code:


Being a system engineer I seldom if ever write code unless I absolutely have to.

The code I am using can be found here as it is part of the linorobot program package.


1 Like


Pardon my two kopeks, and no, I’ve done nothing yet with MY IMU yet, but I remember reading somewhere that IMU readings - especially the kind of data received from these el-cheapo IMU boards - tends to be quite noisy.

Again, based on my reading, the fancier IMU devices also include a micro-controller that does a fair amount of signal processing to get the kind of accuracy and repeatability you want.

I haven’t had the opportunity to play with the Dexter IMU on Charlie - I hope to do that soon - but you may end up having to write a small module that takes the data, performs some kind of statistical averaging and/or linear regression, and then passes the filtered data on to wherever you want to use it.

Yes, I switched to the DI IMU - the fusion processor handles that at 100Hz.