GY-91 // MPU-9250 + AHRS ... here come troubles!

Hello everyone,

I'm looking to understand what is expecting the Adafruit AHRS library ?
I need to know what are the input units and ... what is the correct sensor calibration ?
What should be the offsets/bias/scale factors/etc ...
Sensor is already working, I can gather data from it using SPI @ 20 Mhz easily.

Thanks for your inputs :slight_smile:

That information is in the sensor data sheet.

What should be the offsets/bias/scale factors/etc

Follow this tutorial for the accelerometer and magnetometer: Tutorial: How to calibrate a compass (and accelerometer) with Arduino | Underwater Arduino Data Loggers

1 Like

Thanks @jremington ,

Seems like what I want to achieve might be pretty hard ...
I'm actually looking to onboard a MPU9250 inside a project for an ultra light aircraft as a tracker for orientation and applied Gs (Ex. : when there is a hard landing).

Calibrating this kind of sensors should be done in the final environment which seems a little bit tricky to do it in a plane.
Anyway, I know there are devices from Garmin that do the same but without the need of calibration each time and/or over time ... which definitely seems strange to me right now after reading your link.

Do you think there is a way to do something about that or is it totally impossible based on the limitations of the IMU/MPU ?

Thanks for your time.

You will find that those are not very accurate.

Accurate calibration of the MPU-9250 requires some effort, but is not difficult. If you do the calibration outside of the "ultralight", mount the sensor as far as possible away from any magnetic or iron containing objects, and it should work OK.

Github link to working AHRS for the MPU-9250 (the Sparkfun and Kris Winer versions give totally erroneous results): GitHub - jremington/MPU-9250-AHRS: Arduino Mahony AHRS, includes magnetometer and accelerometer calibration code

Hello !
I found this library [MPU-9250-AHRS: (GitHub - jremington/MPU-9250-AHRS: Arduino Mahony AHRS, includes magnetometer and accelerometer calibration code)....... and tried ... MPU9250_tiltcomp.
I have the same MPU mode, but when compiling it gives all kinds of errors ... it doesn't find lib, the class is not part ..
If someone managed to make it work, it might help me.
Thanks in advance

You need to download and install the library.

Thanks for the quick reply.
The example is from the library and it is installed.

Evidently, the library is not installed where the IDE is expecting to find it. It helps to read the error messages.

To help forum members help you, please read and follow the instructions in the "How to get the best out of this forum" post, linked at the head of every forum category.

1 Like

Thank you, Mr. JR.
I read more carefully .... To compile MPU9250_Mahony.ino or MPU9250_tiltcomp.ino, copy the contents of the "lib" directory to a "lib" subfolder of the Arduino folders that contain the respective .ino files ..... and has been compiled.
Now, let me see if I have any more problems.
My respects!

Ok result. Maximum deviation 2 degrees.
This is ... without accelerometer and magnetometer calibration ....
I don't know how to add an image with the result in the console.
Thank you again.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.