Support for FreeIMU v0.3.5* and MS5611-01BA

This forum is dedicated to software development related to MultiWii.
It is not the right place to submit a setup problem.
Software download
Post Reply
fax8
Posts: 61
Joined: Mon Feb 14, 2011 5:29 pm

Support for FreeIMU v0.3.5* and MS5611-01BA

Post by fax8 »

Patch at http://sprunge.us/gdZS rolled against r195 adds support for FreeIMU v0.3.5, v0.3.5_MS and v0.3.5_BMP.

This patch also comes with initial support for the MS5611-01BA. I'd say that the code for this is 90% there.. it needs optimizations, mainly in the awful usage of pow() instead of shifts, and there is still some little bug which is making it acting bad on the MultiWiiConf.. I'm sure that a coder with more knowledge than me in the MultiWii internals should be able to fix it in a couple of minutes.

Fabio

ziss_dm
Posts: 529
Joined: Tue Mar 08, 2011 5:26 am

Re: Support for FreeIMU v0.3.5* and MS5611-01BA

Post by ziss_dm »

Hi Fax8,

Define "acting bad". :)
Does it really have separate starts for pressure and temperature?

regards,
ziss_dm

Alexinparis
Posts: 1630
Joined: Wed Jan 19, 2011 9:07 pm

Re: Support for FreeIMU v0.3.5* and MS5611-01BA

Post by Alexinparis »

Hi,

Fabio, are you sure about the XYZ convention orientation of the board ?
The default convention is compatible with the orientation of FFIMU from Jussi.
It it not tied to the XYZ orientation defined in each data sheet.

User avatar
Hamburger
Posts: 2578
Joined: Tue Mar 01, 2011 2:14 pm
Location: air
Contact:

Re: Support for FreeIMU v0.3.5* and MS5611-01BA

Post by Hamburger »

for Freeimu V0.1 I am pretty sure the orientation is correct in r190 like this:

Code: Select all

#define ACC_ORIENTATION(X, Y, Z)  {accADC[ROLL]  =  -Y; accADC[PITCH]  = X; accADC[YAW]  = Z;}


I did test it like described here:
http://www.rcgroups.com/forums/showpost ... stcount=37

Maybe other userss of this board could check and clarify?
Hamburger

fax8
Posts: 61
Joined: Mon Feb 14, 2011 5:29 pm

Re: Support for FreeIMU v0.3.5* and MS5611-01BA

Post by fax8 »

I'm not sure about the XYZ orientation.. all my boards have the axis of the 3 sensors aligned and there was a difference between the configuration of v0.1 and the other FreeIMU defined which shouldn't be the case.

Regarding the MS5611 support.. there is still something to sort out.. basically when I do enable the baro I get weirds spikes on the Acc_Z line on MultiWiiConf while the readings of the baro seems stable..

fax8
Posts: 61
Joined: Mon Feb 14, 2011 5:29 pm

Re: Support for FreeIMU v0.3.5* and MS5611-01BA

Post by fax8 »

I've seen my patch above has been submitted to MultiWii. Please note that a part of the code hasn't been included (at least in r202) so when you enable the MS5611 or FREEIMUv035_MS code won't compile.

Simply adding the following code to Sensors.pde fixes the problem.

Code: Select all

#if !defined(MS561101BA_ADDRESS) 
  #define MS561101BA_ADDRESS 0xEE //CBR=0 0xEE I2C address when pin CSB is connected to LOW (GND)
  //#define MS561101BA_ADDRESS 0xEF //CBR=1 0xEF I2C address when pin CSB is connected to HIGH (VCC)
#endif

Post Reply