Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MPU9250, mag not working, gyro wrong scale #325

Open
jlecoeur opened this issue Sep 11, 2016 · 3 comments
Open

MPU9250, mag not working, gyro wrong scale #325

jlecoeur opened this issue Sep 11, 2016 · 3 comments
Labels

Comments

@jlecoeur
Copy link
Collaborator

jlecoeur commented Sep 11, 2016

I saw two issues with the MPU9250:

  • After a few seconds, the magnetometer is not updated. Its value is either constantly [0, 0, 0] or the last read value. This prevents flying without motion tracking system, @GregoireH did you have the same issue?
  • The scale of the gyroscope does not look right. When turning the drone by hand at approx 90°/s, the reading is 3.3rad/s which is around 180°/s. @jeanfrancoisburnier you checked gyroscope scales, have you noticed this before?

(branch mobrob_sparkyv2)

@jlecoeur jlecoeur added the bug label Sep 11, 2016
@jlecoeur
Copy link
Collaborator Author

edit: units

@jlecoeur
Copy link
Collaborator Author

I did some tests regarding gyro scale. I think the chip is not configured properly.

First I multiplied by 2 gyro_scale_ and obtained correct scale with gyro_range = GYRO_500_DEG;
Then I configured the module with

  • gyro_range = GYRO_1000_DEG;
    -> value 2 times too high
  • gyro_range = GYRO_250_DEG;
    -> value 2 times too low

@jlecoeur
Copy link
Collaborator Author

Quick fixes until we solve the issue in the driver:

  • In Remove mallocs, add ChibiOS/HAL #326 there is a hack to fix the gyro scale, but it only works for the default config gyro_range = GYRO_500_DEG;.
  • The magnetometer can be disabled in the attitude filter by commenting the call to update_step_mag(); in Ahrs_ekf::update() here ahrs_ekf.cpp#L425

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant