-
Notifications
You must be signed in to change notification settings - Fork 30
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
Magnetometer reading error #22
Comments
I want you to check these.
|
|
My sensor works with the library https://github.com/bolderflight/mpu9250-arduino This library is the only one that works with my hardware! But I would also like to get the coordinates of the direction of the sensor not in the axes, but in the tilt angle, and the second from the Magnetometer as the direction where it is looking. |
Thank you for the photos. |
Hi, I think the mag error comes from an error when reading the high/low bytes, they are switched: MPU9250_asukiaaa/src/MPU9250_asukiaaa.cpp Line 151 in b983f4f
vs MPU9250_asukiaaa/src/MPU9250_asukiaaa.cpp Line 221 in b983f4f
|
Same here can't read mag values, same board, one strange thing is that whoamI returns 0x70 and according to datasheet it's a mpu6050, I'm not sure if there is a wat to certify if it's a 9250 or 6050 |
Did you use it with esp32 only? |
I have the same issue on a GY-91 board (contains the MPU9250). Using bolderflight, I read the magnetic sensor data just fine, but with this library, I cannot access it. Reading through the code, it looks like bolderflight uses master mode and reads the magnetic data through the MPU while this library tries to do the bypass and read the AK8963 directly. Unfortunately, I don't know enough right now to understand why that doesn't work. |
I have the same issue on the esp32 board. surly my sensor is mpu9250. |
Hi, |
I checked and succeeded in reading values with using ESP32-WROOM-32D and platform-espressif32.v4.1.0 (it includes arduino-esp32 v2.0.1). Can you report with the following information?
In my case.
|
The chip on my sensor board is MP92 236LA 1833 |
@izsoandras where you able to find a solution? I'm having the same issue and also a very similar serial number on the sensor board |
@marcofariasmx Unfortunately no. After I couldn't reach the magnetometer directly I gave up, because the exams kicked in. Maybe when they are finished I'll try it again. |
I tried today and it's no problem on my environment. My env
I suggest you to use newer arduino-esp32. Latest version is 2.0.3.
It seems no problem.
No, before that you need to write value to 0x6B register likes MPU9250_asukiaaa/src/MPU9250_asukiaaa.cpp Lines 116 to 122 in b983f4f
|
@Overff |
Actually i use Teensy3.6 (like arduino) I2CScan: |
My teensy3.6 could read mag value. I add function to call beginMag again when failing to get mag values. |
Thank you for support. I have realized that your MPU is differ than mine.. Probably my has another register with mag data and so on. Could you provide some advice what should i need research to find out the problem? |
Can you see |
Checked it. Ii says: mp92/U601A1/2148 |
Thank you for the information. |
thank you any way! |
I have the same sensor board as Overff "GY91 MPU9250+BMP280" and I also have the "MP92/U601A1/2148" installed on this board. Acceleration values and gyro values can be read out, but no values come from the magnetometer. |
had anyone got any solution to read values come from the magnetometer ? written "mp92" on the sensor ic . but when i test with the program it shows 0x70 and MPU6500 . |
Hi there! I2CScanner result (normal board): I2CScanner result (fake board): |
I don’t understand how the I2C scanner showed you the address of the magnetometer sensor 0x0C if this is an internal address. |
https://invensense.tdk.com/wp-content/uploads/2015/02/PS-MPU-9250A-01-v1.1.pdf |
I also purchased 5 gy-91s and they were also marked as "MP92/U601A1/2148" AliExpress Item : https://www.aliexpress.com/item/32654511799.html AliExpress Vendor : https://www.aliexpress.com/store/403088 |
I re-purchased another 5 GY-91s which were genuine mp9250s (WHOAMI 0x71) with correctly working barometers, the previous purchase detailed above only 2 of the 5 BMP280s functioned correctly as well as having fake IMUs (WHOAMI 0x70)/ |
started
sensorId: 113
accelX: -0.07
accelY: 0.00
accelZ: -1.02
accelSqrt: 1.02
gyroX: 0.85
gyroY: -1.59
gyroZ: 0.67
Cannot read mag values
at 102ms
sensorId: 113
accelX: -0.08
accelY: -0.02
accelZ: -1.01
accelSqrt: 1.02
gyroX: 0.79
gyroY: -1.59
gyroZ: 0.67
Cannot read mag values
at 610ms
board MPU9250
MCU borad Loraduino R1.2
I2C connection (A4, A5)
Arduino IDE 1.8.4
The text was updated successfully, but these errors were encountered: