MPU9150 board implementation

Post Reply
User avatar
ORION
Posts: 11
Joined: Tue Jul 10, 2012 8:00 pm

MPU9150 board implementation

Post by ORION »

Hello everyone

I'm a Multiwii fan for more than a year now and I have developped some flightcontroller and sensorboards for myself for the Multiwii software and built quite a lot of different copters.
I am now planning to make a 10DOF IMU with MPU9150 (=MPU6050+ mag) and MS5611 baro. The MPU9150 seems to be a perfect sensor for the multiwii software.. :D

The MPU9150 has not been implemented yet (at least I haven't seen anything) in the Multiwii code. Are there any plans to do that? Has anyone tested the mag function of the MPU9150 and compared it to the HMC5883?

I am not really a "software" guy but I will support as much as possible if I can...

Any thoughts/ideas are welcome ;-)

Greetings,
ORION

copterrichie
Posts: 2261
Joined: Sat Feb 19, 2011 8:30 pm

Re: MPU9150 board implementation

Post by copterrichie »

This technology is changing so rapidly, I just can not keep up. Wow!

alexia
Posts: 85
Joined: Sun Jun 17, 2012 10:23 pm
Contact:

Re: MPU9150 board implementation

Post by alexia »

i think we have to aim with already sensor if we want to improve flight performance!
add so many sensors is not very good!!mpu6050 is already very good

copterrichie
Posts: 2261
Joined: Sat Feb 19, 2011 8:30 pm

Re: MPU9150 board implementation

Post by copterrichie »

To my understanding, the mpu9150 has a gyro, acc and compass where as the mpu6050 only have gyro and accelerometer. So there is a much smaller footprint if 9 degrees are required.

User avatar
ORION
Posts: 11
Joined: Tue Jul 10, 2012 8:00 pm

Re: MPU9150 board implementation

Post by ORION »

The MPU9150 has the same gyro and acc like the MPU6050 but with an additional magnetometer integrated.

I agree that sensors have to be implemented properly before adding new sensors, but the MPU6050 works very well (even better than the ITG3200) and the LPF bug has also been corrected now.

The MPU9150 as a 9DOF chip which should simplify the board production process hence the cost for a 10DOF IMU should be lowered (again).

alexia
Posts: 85
Joined: Sun Jun 17, 2012 10:23 pm
Contact:

Re: MPU9150 board implementation

Post by alexia »

ORION wrote:The MPU9150 has the same gyro and acc like the MPU6050 but with an additional magnetometer integrated.

I agree that sensors have to be implemented properly before adding new sensors, but the MPU6050 works very well (even better than the ITG3200) and the LPF bug has also been corrected now.

The MPU9150 as a 9DOF chip which should simplify the board production process hence the cost for a 10DOF IMU should be lowered (again).



yes it s a good argument!!but you forget something:it s harder to buy this new sensor than mpu6050 :mrgreen:

User avatar
ORION
Posts: 11
Joined: Tue Jul 10, 2012 8:00 pm

Re: MPU9150 board implementation

Post by ORION »

Ok, you are right, but I guess that is just because it is quite new. Here: http://www.scantec-shop.com/mpu-9150.ht ... re=default you can buy the MPU9150 for example, and for manufacturing you can get it cheaper directly from China.

And: When more MPU9150 are sold, I think prices will lower and availability will increase. Even Sparkfun will make a breakout board if we are lucky !

A ready to run board with the MPU9150 is available here : http://www.aliexpress.com/product-fm/59 ... alers.html

I think I'm gonna buy one for testing (eventhough it is quite expensive :shock: )

Katch
Posts: 280
Joined: Thu Aug 04, 2011 1:44 pm

Re: MPU9150 board implementation

Post by Katch »

keep us posted on this one - I'm keen to see this sensor integrated as I'd much rather have one sensor that does it all than 2 or 3. It shouldn't be too hard to get it working as it is just a logical step from the mpu6050.

alexia
Posts: 85
Joined: Sun Jun 17, 2012 10:23 pm
Contact:

Re: MPU9150 board implementation

Post by alexia »

i think it could be the next step for multiwii sensor!it will be easier to find the failure ;)

x8r
Posts: 5
Joined: Tue Oct 18, 2011 4:52 pm

Re: MPU9150 board implementation

Post by x8r »

The MPU6050 is implemented and the magnetometer AK8975 is implemented. So it should be easy to implement the MPU9150.
BUT: The MPU6050 and the MPU9150 both include a Digital Motion Processor. Did anyone implement the DMP?

I want to use the MPU9150 in a university copter project. A first prototyp pcb is ready... but I have to wait for the MPU9150.
Its similar to the NanoWii-Board.
I'm communicating with Invensense and hope that the RegisterMap is availible soon.

Greetings,

Jan

User avatar
ORION
Posts: 11
Joined: Tue Jul 10, 2012 8:00 pm

Re: MPU9150 board implementation

Post by ORION »

Well, I have ordered the MPU9150 breakout board, will take some time to arrive here.

I also have a 10DOF board planned for multiwii copters, with MPU9150 and MS5611 but I first want to know how well the magentometer performs in real flight conditions.
The DMP would be a great step forwar to offload some calculations from the main flightprocessor and maybe allow more functions for atmega328 boards.... :P
But I am not a software guru so can't really help on that :oops: .
The DMP has not been implemented yet, but I think Invensense has not published all information about the DMP yet?

copterrichie
Posts: 2261
Joined: Sat Feb 19, 2011 8:30 pm

Re: MPU9150 board implementation

Post by copterrichie »

I am personally excited for you and hope this works out. The possibilities are endless as the footprint becomes smaller and smaller.

User avatar
ORION
Posts: 11
Joined: Tue Jul 10, 2012 8:00 pm

Re: MPU9150 board implementation

Post by ORION »

Thank you, I will try my best :D

PS: I'm thinking about making a larger quantity of sensorboards, in case someone is interested in getting one ....

Regards,
David

copterrichie
Posts: 2261
Joined: Sat Feb 19, 2011 8:30 pm

Re: MPU9150 board implementation

Post by copterrichie »

My bankbook is running on Empty, but I sure will keep this in mind if things should change. :)

User avatar
ORION
Posts: 11
Joined: Tue Jul 10, 2012 8:00 pm

Re: MPU9150 board implementation

Post by ORION »

x8r wrote:The MPU6050 is implemented and the magnetometer AK8975 is implemented. So it should be easy to implement the MPU9150.
BUT: The MPU6050 and the MPU9150 both include a Digital Motion Processor. Did anyone implement the DMP?

I want to use the MPU9150 in a university copter project. A first prototyp pcb is ready... but I have to wait for the MPU9150.
Its similar to the NanoWii-Board.
I'm communicating with Invensense and hope that the RegisterMap is availible soon.

Greetings,

Jan


Hi Jan

How are going to use the MPU9150. Have you planned on using the ES_DA and ES_CL lines to connect a pressure sensor or some kind of other sensor? With this we could have a 10DOF MotionFusion unit, since the I2C signals from the additional sensor is integrated into the DMP too when connected via the auxiliary I2C bus.

I'm waiting for my testboard, will also try to connect a BMP085 via the auxiliary I2C lines later..... But first have to get the MPu9150 itself working :)

PatrikE
Posts: 1976
Joined: Tue Apr 12, 2011 6:35 pm
Location: Sweden
Contact:

Re: MPU9150 board implementation

Post by PatrikE »

copterrichie wrote:My bankbook is running on Empty, but I sure will keep this in mind if things should change. :)

It should be empty!...
Plenty of room for new money when they arrive..;)

copterrichie
Posts: 2261
Joined: Sat Feb 19, 2011 8:30 pm

Re: MPU9150 board implementation

Post by copterrichie »

PatrikE wrote:It should be empty!...
Plenty of room for new money when they arrive..;)


I hope that is an Omen. Ha!

x8r
Posts: 5
Joined: Tue Oct 18, 2011 4:52 pm

Re: MPU9150 board implementation

Post by x8r »

The Implementation is quite simple...
Just define MPU6050 and define AK8975, it works. The sensor orientation has to be modified.

Greetings,

Jan

gompf-2
Posts: 136
Joined: Sun Jun 05, 2011 11:46 am

Re: MPU9150 board implementation

Post by gompf-2 »

x8r wrote:The MPU6050 and the MPU9150 both include a Digital Motion Processor. Did anyone implement the DMP?
Jan

Did anyone got the detailed docs for programming the DMP now?

Regards, gompf

drotek
Posts: 4
Joined: Thu Nov 03, 2011 7:27 pm

Re: MPU9150 board implementation

Post by drotek »

The MPU9150 breakout board is available here http://www.drotek.fr/shop/en/153-mpu915 ... meter.html.

QuadBow
Posts: 532
Joined: Fri Jan 04, 2013 10:06 am

Re: MPU9150 board implementation

Post by QuadBow »

@all
gompf-2 asked some months ago "Did anyone got the detailed docs for programming the DMP now?"
I would like to repeat the question again...

@drotek
Is there multwii-code available to initiate DMP?
Are you entitled to provide this code to customers?
Or will the situation remain as for the MPU-6050: a powerful chip, but nobody can use it to its maximum extend?

In anticipation of your answer.

x8r
Posts: 5
Joined: Tue Oct 18, 2011 4:52 pm

Re: MPU9150 board implementation

Post by x8r »

The DMP has no function what is useful for a multicopter.
The onliest thing what could be useful is the FIFO-Buffer. But the structure of Multiwii-code is not compatible to a Buffer.
I can't imagine a task where we can use the DMP.

Regards, Jan

drotek
Posts: 4
Joined: Thu Nov 03, 2011 7:27 pm

Re: MPU9150 board implementation

Post by drotek »

For DMP code maybe you can see here http://code.google.com/p/brushless-gimb ... &can=2&q=!!

Olstyle
Posts: 4
Joined: Sun Jan 13, 2013 6:29 pm

Re: MPU9150 board implementation

Post by Olstyle »

I did this together with a colleague for an university project and just upped it to my github page:
https://github.com/Olstyle/MultiWii-2.1-with-MPU9150
Here you can see the changes:
https://github.com/Olstyle/MultiWii-2.1 ... 7176f7ad5a
The code is mostly just a clash of the MPU6050 and AK8975 code, but it gets the work done.

We had a brief look at the additional computing features of the sensorcluster as well, but figured to use them one would have to remodel the whole sensor handling in MultiWii.

P.S.: I'm not sure about MultiWii's license, so I just ignored that point for the time being. Feel free to share the code however you like.

QuadBow
Posts: 532
Joined: Fri Jan 04, 2013 10:06 am

Re: MPU9150 board implementation

Post by QuadBow »

Thank you all for the quick response.
The digital motion control (DMP) is a feature which has always been a subject of invensense's advertisement for MPU6050 and MPU9150.
However, it is not documented at all. The code provided by Olstyle does cover the documented features of the MPU9150.
The code linked to by drotek is based upon reversal engineering, which has been proven on various occasions.
Having a look into the code reveals that
- a large effort has to be taken for the initialisation of the DMP (loading a few hundred bytes of binaries into the MPU),
- the result is a high precise quaternion,
- which has to be pulled out from the fifo-interface with additional effort (receiving 14 bytes from fifo which lasts ca 500us),
- then it takes 36 long lasting (200 clock cycles each) floating point multiplications/divisions and 5 sqrt/atan commands to calculate the euler angles (pitch, roll, yaw) out of the quaternion.

In summary, the DMP way of calculating the angles takes longer than the simplified complementary filter implemented in multiwii right now. We still don't know anything about the quality of the result since it is undocumented.
I would have hoped that the DMP had provided already calculated euler angles. Because that is obviously not the case, I agree with x8r "The DMP has no function what is useful for a multicopter" - at least not for a multicopter with a 8bit flight controller.

Nevertheless, the MPU6050 and MPU9150 are excellent devices - already without the undocumented DMP.
They provide sufficent accuracy if the raw values are joined by the great multiwii complementary filter.

Olstyle
Posts: 4
Joined: Sun Jan 13, 2013 6:29 pm

Re: MPU9150 board implementation

Post by Olstyle »

You have to keep in mind that the main field of use of those chips are mobilephones. There, the DMP can be used to program custom interrupts, e.g. to detect rotation between landscape and portrait mode without taxing the cpu. The buffer enables it to detect a "gesture" instead of a mear position.
All this assumes that we are talking about only one(or maybe two) patterns which are repeated quite often. Both isn't the case when you are flying a copter.

copterrichie
Posts: 2261
Joined: Sat Feb 19, 2011 8:30 pm

Re: MPU9150 board implementation

Post by copterrichie »

Here is an interesting read about the MPU9150


http://diydrones.com/profiles/blogs/sec ... he-mpu9150

brm
Posts: 287
Joined: Mon Jun 25, 2012 12:00 pm

Re: MPU9150 board implementation

Post by brm »

noise matters.
the mpu60x0 is not really shining - the mpu3000 is somewhat better.
those mpu6050 who have a better noise level do re-appear as mpu3300 with the accelerometer disabled.

just wait until there is chip revsion x+1 ... in the mean time someone may have a readable documentation.
dmp is ok for the 8-bit world - here you actually need it ;-)
wanna have more control ... forget all you know about dmp.

guile2912
Posts: 1
Joined: Wed Aug 07, 2013 9:14 pm

Re: MPU9150 board implementation

Post by guile2912 »

Full arduino code for the 9150 is now available thanks to pansenti.
The 9150 can output euler angle very easily and directly, as seen here https://github.com/Pansenti/MPU9150Lib/ ... no9150.ino
You can get a 9150 board for 23$ on goodluckbuy, or sparfun for the double, unfortunatly. ( I give the link, because it took my a lot of time to find a good price ...)

Post Reply