bfrmd / EFIS-AHRS-AvionicsDuino

MIT License
11 stars 0 forks source link

Problems connecting the MPC9250 module with the library #1

Closed brightproject closed 1 year ago

brightproject commented 1 year ago

Hello @bfrmd I am studying your code, I planned to repeat on the microcontroller stm32f401ccu6, on which I create my aircraft instrument. photo1688111848 But I ran into a problem in the operation of the MPU9250 module and the library. Скриншот 10-07-2023 16 08 56 The same module works great with the SparkFun library. Скриншот 10-07-2023 15 48 13 So I don't understand what's wrong... Perhaps you are planning to change the IMU module in your aircraft devices, from MPU9250 to something new and produced? Maybe sensor GY-LSM6DS3? 6_osevoy-datchik-polozheniya-GY_LSM6DS3-_2v1_-akselerometr_-giroskop_ Tell me, can't you calculate a quaternion without data from a magnetometer? Therefore, do we need accelerometer, gyroscope and magnetometer sensors?

bfrmd commented 1 year ago

Hi Vladislav, We do not use MPU9250. This InvenSensee 9DOF inertial unit is used in the examples provided with the UNav INS library, But it is obsolete and increasingly difficult to find. In addition, online sales sites are full of clones of dubious provenance that do not work. Therefore, we have adapted the software to use more modern and efficient STMicroelectronics sensors that are very easy to find on the market. Have you read this? The uNav-INS library is extensively discussed here.

brightproject commented 1 year ago

herefore, we have adapted the software to use more modern and efficient STMicroelectronics sensors that are very easy to find on the market.

This is great news! I read the topic, but there are a lot of technical details, so understanding everything is a long time. AHRSV2-1024x589 I don't see a magnetometer in this photo, I only see an accelerometer + gyroscope board LSM6DSOX. It turns out that you connected two boards to the I2C bus and use in the library code? That's it, figured it out - you are using a ready-made IMU ADAFRUIT ADA-4517, this board contains an axel + gyroscope and a separate magnetometer chim. And it's all on the bus, with two addresses.

//                SDA   --------------------->   SDA1 (pin 17)  résistance pull sur la carte Adafruit 
//                SCL   --------------------->   SCL1 (pin 16)  résistance pull sur la carte Adafruit

But even when two chips are on the same board and on the same I2C bus, you still work with them through two different libraries ... which is a little inconvenient. But still better than using the outdated and EOL chip mpu9250.

Adafruit_LSM6DSOX lsm6ds;
Adafruit_LIS3MDL lis3mdl;