Using a gy-85 imu to measure 2d angle

Hi all,

I am trying to use an imu for a basic task, to find the angle between two different parts. I already have the imu, it is a gy-85 with 9DOF with the ADXL345 accelerometer, the HMC588L magnetometer and the ITG3205 gyroscope.

Unfortunately I have no knowledge of an imu and have very little time to complete this tasks. I have been researching and have seen a few things about complementary and karman filters but they seem to complete more difficult tasks than I need. Please I would greatly greatly appreciate any help, thank you.

Did you install the library for your device, and run the examples?

Does the library support reading an angle, or only reading a turn speed from the gyro?

Hi!

Thank you for responding to my post. Yes I have tried using the example that came with the library and it supports reading the raw values separately from the magnetometer, the accelerometer and the gyroscope. From what I understand, I will need to combine the outputs from the gyroscope and the accelerometer and I am not sure how to do that

The gyro should be sufficient for measuring angles. The rest depends on your device and procedure (handling) for the determination of the angle.

The gyro in a typical IMU cannot be used for measuring angles between "different parts". It is used to measure the [u]rate of change of angle[/u], which given [u]the elapsed time for the measurement[/u], can be used to estimate the total angle change.

Consumer grade IMUs are usually used for navigation. Given a North (magnetometer) and Down (accelerometer) reference, an approximate vehicle orientation relative the the Earth can be determined, at best to about one degree for carefully calibrated consumer grade IMUs.

It were possible to align the sensor with the first object, then with the second one, and compute the angle between both. But I also doubt that this is the intended use.

I guess I didn't explain myself very well. I apologize for that. I am trying to find the tilt angle of one part against another stationary part (that lies flat on the table) I hope that clarifies what I am looking for

Tilt angles can be calculated from the accelerations, resulting from gravity. The advantage over a gyroscope is the constant acceleration, which does not introduce integration errors during calculations. Have a look at e.g. quadcopter navigation, or find out yourself how the accelerations vary when you tilt the sensor.