페이지 정보작성자 키트 작성일2017-08-22 16:00 조회1,526회 댓글0건
July 3, 2013 — Hari
This post is continuation of previous post on MPU9150. Using MPU9150gui utility program, orientation data has been logged for 2 hours 30 minutes. Note that the MPU9150 DMP initialized with default settings according to the Invensense library eMPL & I did not do any calibration. You may be interested in the logged data . The DMP quaternion data has been logged at every second after dev board power up & DMP configuration. The quaternion data converted into Euler angles ( degrees ) to analyze the drift when the MPU9150 is at rest ( no motion) for 2 hr 30 min. The first graph here shows how the DMP output converging & then starts drifting.
The Euler angles at 4th sec in the time line are Phi = -1.7398 Theta = -1.1055 Psi = -14.9286 & at 2 hrs 30 min are Phi = -1.5823 Theta = -1.1658 Psi = 27.6842. This shows us that the Phi drifted 0.1575 degrees, Theta drifted 0.0603 degrees & Psi drifted 42.6128degrees. We can conclude, the average drift rate is 0.0047348 degrees/sec ( 0.284085degrees/min).
The graph below gives an insight to the above graph & shows that there is noise ( non-linearity) too in Psi during the drift.
As of now, the eMPL inside MotionDriver5.1 has capability to produce only 6-axis DMP quaternion & it doesn’t uses magnetometer data. This preliminary analysis results also show that MPU9150 DMP quaternion produces heading drift using eMPL. The 9-axis fusion that isDMP quaternion + magnetometer data left for users ( whatever, they did not release source). Currently this is a bottleneck in using the DMP quaternion as it is. For improved heading stability, users have to find their own way of fusion.
The following are the possibilities for 9-axes orientation:
- Tweak the DMP part related to magnetometer ( may not be possible until InvenSense provides a solution).
- (i) Get the DMP quaterion, read only magnetometer data in bypass mode. Implement effective 9-axis fusion ( DMP quaterion+mag ) method on microcontroller platform.
(ii) Configure MPU9150 to populate DMP quaternion into FIFO, magnetometer data intoEXT_SENS_DATA_xx ( adress 0x49 ) & read it. Implement effective 9-axis fusion ( DMP quaterion+mag ) method on microcontroller platform.
(iii) Configure MPU9150 to populate DMP quaternion & the magnetometer data into FIFO, then read it. Implement effective 9-axis fusion ( DMP quaterion+mag ) method on microcontroller platform.
- Just get the sensors ( Accel, Gyro, Mag) raw data & implement any stable 9-axis AHRS fusion algorithm ( DCM or EKF).
I was able to get magnetometer data using the method 2(ii) ( have a look at my GitHub repository). Next job is 9-axis fusion, stay tuned it will be done soon.June 25, 2013 — Hari
If you are looking for a I2C library for the MPU9150 for STM32 family of microcontrollers, you may like to visit my opensource GitHub repository. There seems to be a decent libraryMPU9150Lib for Arduino by pansenti, but not available for ARM Cortex-M3 based STM32F103xx micros. Hence, I thought to share it for open community out there. It has been tested onOlimex STM32-P103 development board using only 5 pins of Sparkfun MPU9150 breakout board. The dev board has STM32F103RB micro. Unlike my other libraries for MPU6050 &HMC5883L, this library make use of latest ST’s CPAL ( Communication Peripheral Application Library) & handles communication errors. I also provided a complete project source based onIAR EWARM along with pre-compiled binary image which you can directly download to FLASH memory of your STM32 board. Download the USB Virtual COM port drivers here.
For testing the data coming from the board, you can download MPU9150gui. This software application developed using C# .NET & replicates the functionality of Python based client application provided by Invensense for evaluating MPU6050/MPU9150. In addition, it prints Compass data ( command invc) & also you can log the orientation data into .csv file for further use. You just select the COM port allocated for your board, then Click Open Port button. For sending commands to the board, just type the commands in the text box, they will be received by the board. I hope to extend the functionality of MPU9150gui over time.Doxygen html documentation will come soon. For the library source files & updates visit : GitHub MPU9150 RepositoryIf you find it useful in your application, Just say thanks & use it. I appreciate any comments/contributions for improving it further. That’s it, that’s all I have for this week. Thanks for reading.Note: This library is working successfully on STM32F103RB with Sparkfun MPU9150 breakout board. It should work on other microcontrollers of the same family too.
등록된 댓글이 없습니다.