imu notes


I’m really new to both Raspberry and the whole electronics world: I’m experimenting with the board, using Windows IoT (since I’m quite familiar with C# as a development platform). I’m not, however, bound to this OS: I can switch to Raspian and see if I can play with Mono to use C# or change the language.

Anyway, for my project – after blinking LEDs for a while – I’d like to connect a sensor to detect positioning and later on a camera. As for the sensor, I noticed on Adafruit that they have a nice piece which includes accel/mag/gyro: they sell it as “for Arduino” and I’m not yet at the point where I can tell the difference what goes well with what.

Can I use this with Raspberry/Win? Do I have to revert to Raspian? Do I have to look for a completely different sensor?

Thank you!

2 Answers


The linked sensor appears to require special Arduino software to work as a useful device.

To get it to work you would either need to use an Arduino or port some pretty specialized code to the Raspberry Pi.

Unless you really need the claimed additional accuracy I would choose another sensor. Google 9DOF Raspberry Pi.

  • Thank you for pointing me in the right direction, I can find more info and tutorials now that I know that 9DOF or 9 degrees of freedom sensor is what I’m looking for. Something like this sparkfun.com/products/13944looks promising. I don’t have requirements in terms of accuracy, I need to start something, experimenting and see what happens. – ccalboni Nov 7 ’17 at 11:30
  • That should be fine, You just need to check it can be powered from 3V3 (rather than 5V). – joan Nov 7 ’17 at 12:01
  • Specs say “Operating Voltage: 3.3V”, should be fine with the Raspi pin 1 – ccalboni Nov 7 ’17 at 12:42


Question summary

[OP] new to Rpi and electronics, but quite familiar with Win C#

Now experimenting, but not bound to Win IoT

Can switch to Raspian Mono C# or even change language

Want to use sensor to detect position

Want to know if Adafruit accel/mag/gyro sensor for Arduino also for Rpi/Win?

Or should look for a different sensor?


The OP introduces his background, his objective, and asks a couple of questions.

His objective is clear: detect position using a sensor.

He is considering a couple of alternatives, but he is very flexible on OS, language, and sensor

I am more or less on the mirror side of the OP. I am quite familiar with electronics and have 10 years hobbyist experience in Arduino and Rpi. I am familiar with Python, but know very little Win C#.

I have decided to do some research, and see if I can give an answer, or part of an answer.

Since I have almost zero experience in gyro/accelero/magnetic sensors, I need to do quite a bit of research first. So I am starting to write random, unstructured research notes which would finally be deleted, and hopefully replaced by my answer.

Research Notes

What is 9DOF?

As titled, the OP wants to use 9DOF sensors. I don’t really know what the hell exactly is 9DOF. 🙂 So I googled and started reading the following article.

9dof – The highest quality sensors – xsens.com‎

I skimmed xsens but could not find what is 9DOF. I only made a summary.

Xsens PCB fuses the following:

  1. Attitude and Heading Reference System (AHRS),
  2. Vertical Reference Unit (VRU), and
  3. Inertial Measurement Unit (IMU) on PCB,

And produces the following output:

  1. Inertial data,
  2. Magneticic field,
  3. Free acceleration,
  4. Roll/pitch,
  5. Heading tracking,
  6. Referenced yaw

Almost all the above terms are new to me, though I guess output 5 “Heading tracking” should be important to avoid airplane crashing. 🙂

6/9 DOF, MEMS, IMU, Gyro/Accelero/Magneto sensor reading notes

I still don’t know what is 9-DOF. So I wikied the following to read. Finally I now know that 6-DOF is for mechanical (3 translation, 3 rotating), 3-DOF is for magnetic, adding together is 3 + 3 + 3 = 9 DOF. I found Wikipedia good. So I am reading more wiki articles.

And the summary of 6 degrees of freedom:

  1. Moving up and down (elevating/heaving)
  2. Moving left and right (strafing/swaying)
  3. Moving forward and backward (walking/surging)
  4. Swivels left and right (yawing)
  5. Tilts forward and backward (pitching)
  6. Pivots side to side (rolling)

Degrees of freedom (mechanics) (DOF) – Wikipedia

Microelectromechanical systems (MEMS) – Wikipedia

Inertial measurement unit (IMU) – Wikipedia

Gyroscope (Gyro) – Wikipedia

Accelerometer (Accelero) – Wikipedia

Magnetometer (Magneto) – Wikipedia

AdaFruit or SparkFun, That is the Question

The OP mentions AdaFruit but not SparkFun. I think one reason is that Adafruit is more friendly to everybody, but SparkFun more friendly to technical people. Anyway, I googled both and summarized below.

After considering many factors, my first choice is MPU9250.

AdaFruit Motion Sensors Catalog

Accelero – AXDL335, AXDL345, AXDL326, AXDL337, AXDL 343, LIS3DH, MMA8451

Gyro – L3GD20H,

9-DOF – BNO055, FXOS8700 + FXAS21002, L3GD20H + LSM303

10-DOF IMU – L3GD20H + LSM303 + BMP180

SparkFun Gyro/Accelero/Magneto

Triple Axis Accelerometer and Gyro Breakout – MPU-6050 $29.95

VR IMU Breakout – BNO080 (Qwiic) $34.95

SparkFun IMU Breakout – MPU-9250 $14.95

6-DOF IMU – ITG3200/ADXL345

6-DOF IMU – – ITG3200/ADXL345

Accelerometer – MMA8452Q $10.49 Accelerometer – ADXL335 $14.95

Accelerometer Breakout – LIS331 VR IMU (Qwiic) – BNO080 High Precision

SPX-14618 Qwiic IMU – MPU-9250 SPX-14896 – $148.00

Accelerometer, Gyro and IMU Buying Guide

Gyroscope Tutorial – SparkFun

Gyro Tutorial – AdaFruit

SparkFun Accelerometer and Gyro – MPU-6050 $29.95

SparkFun IMU Breakout – MPU-9250

MPU-9250 Hookup Guide – SparkFun

/ to continue, …

Categories: Uncategorized

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: