mpu9250 Kris Winer

Hi,
I am a master student and I need the data from 4 mpu9250. I used an arduino mega2560 with a multiplexer and the sensors are connected by i2c. With the library of kris winer I calibrated the sensors and I had the angles from the 4 mpu at the same time but I have a problem...pitch and roll works well but the yaw after few seconds returns to its starting position...do you have an idea about the causes? I pass the the Madgwick function the variables in the NED order but even if I changed this order, the yaw problem continues to be there...
Thanks for the help,

Alessia

Sounds like the digital compass part is not working correctly.

RTImuLib is much better, state of the art software, and works with the MPU9250.

You can read about my experience in implementing it for a different sensor here. It took only about 10-20 minutes to get everything to work properly.

thanks a lot for the help!:)...in the last week i tried to run the RTIMULib but I have some difficulties. I managed to view the angles from one mpu9250 and I can say that this library works well than the one of Kris Winer, but I am not able to extend the code in order to view all the sensors together at the same time...Should I change all the files of the library (.cpp and .h) or should I modify only the arduino code (.ino)?????

You are permitted to change the library code on your system.

You could have four $2 Pro Minis, each running one MPU9250 and RTImuLib, and sending the data elsewhere by serial comms.

Why go to all that trouble just to use one Mega2560?

  1. Minis are a pain to program. If you're using the serial comms you have to have a way of unplugging that.

  2. A $2 Mini may be a bad clone. There's a high probability you might throw away half of the ones you get delivered.

  3. The time you spend debugging the bad clones before you decide to throw them out. Plus waiting for the next delivery.

  4. Now you have to have some place to bolt down 4 PCBs which don't have any mounting holes.

  5. Those mounting places have to be accessible for reprogramming (see #1)

  6. And you have to design and program a serial comms protocol.

I find that the Pro Minis are most certainly not a pain to program -- same as any other Arduino.

I use double sided foam tape to securely mount the tiny boards to flat surfaces.

I have used at least a dozen clones from eBay, and have never encountered a bad one. Buy them 5 at a time for about $10 with free shipping.

$2 Pro Minis have been running a 220V pump and several 110V greenhouse ventilator openers for a couple of years now, with zero failures.

Finally, coming up with a serial data transfer protocol to merge four data streams is (I estimate) at least two orders of magnitude less work than modifying one copy of RTImuLib to deal with four IMUs. After all, a Kalman filter stores and uses the measurement history from each sensor to accomplish its task.

@MorganS: This is not your project, but I suggest that you avoid Pro Minis.