Sensor problem With Ver 2.0

Post Reply
ashta
Posts: 14
Joined: Mon Mar 14, 2011 9:37 am

Sensor problem With Ver 2.0

Post by ashta »

hello,
Kidly help me
I successfully down loaded Ver 2.0 and the sketch was down loaded to my board.
Since i use
ITG3200
BMA180
BMP085
HMC5883
defined those just like in 1.9
also changed the address of ITG (D2)and BMA180 (82)in sensors.
Also defined Quad X.
With these changes all vesrsions up to 1.9 was working.
But 2.0 is not working.

When i read thru the forum, i understand that in Ver 2.0, we have to chnge the orientation individualy in the config file.
I did that and some and it si working fine. Follwoing is the changes that i have made.
// Original ACC
//#define ACC_ORIENTATION(X, Y, Z) {accADC[ROLL] = Y; accADC[PITCH] = -X; accADC[YAW] = Z;}
//ACC Modification ashta
#define ACC_ORIENTATION(X, Y, Z) {accADC[ROLL] = Y; accADC[PITCH] = -X; accADC[YAW] = Z;}
//Original Gyro
//#define GYRO_ORIENTATION(X, Y, Z) {gyroADC[ROLL] = -Y; gyroADC[PITCH] = X; gyroADC[YAW] = Z;}
// Gyro modification Ashta
#define GYRO_ORIENTATION(X, Y, Z) {gyroADC[ROLL] = Y; gyroADC[PITCH] = -X; gyroADC[YAW] = -Z;}
// Original Magneto
//#define MAG_ORIENTATION(X, Y, Z) {magADC[ROLL] =X; magADC[PITCH] = Y; magADC[YAW] = Z;}
// Magneto a modification Ashta
#define MAG_ORIENTATION(X, Y, Z) {magADC[ROLL] =Y; magADC[PITCH] =-X; magADC[YAW] =Z;}

With the above changes the Quad is flying well.
But i changed the above values by trial and error with lot of pain. Is there a more systematic and approprate way to do this.
Kindly advize.

thanking you
ashta

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

Re: Sensor problem With Ver 2.0

Post by Hamburger »

ashta wrote:But i changed the above values by trial and error with lot of pain. Is there a more systematic and approprate way to do this.

there is a howto in the faq section on multiwii.com. It gives details how to test and setup.

User avatar
mbrak
Posts: 136
Joined: Sat Dec 03, 2011 8:08 pm
Location: Germany, Lemgo

Re: Sensor problem With Ver 2.0

Post by mbrak »

do you have standalone sensors or are you using an imu-board with the sensors you wrote?

ashta
Posts: 14
Joined: Mon Mar 14, 2011 9:37 am

Re: Sensor problem With Ver 2.0

Post by ashta »

i designed my own board with these sensors. I made 15 such boards and gave it to my friends in banagalore at cost price. Up to 1.9 Vesrsion the baord worked with the standard setiings. With 2.0 it dosn'nt. Waht is the standard way of doing this.

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

Re: Sensor problem With Ver 2.0

Post by PatrikE »

Look at one of the sensor shields who uses same sensors how its done.
You can find it in def.pde.
Create a define for your. board.

ashta
Posts: 14
Joined: Mon Mar 14, 2011 9:37 am

Re: Sensor problem With Ver 2.0

Post by ashta »

Thanks PartrikE.
I treid thsi as you suggested. Same IC config has different values declared.
However, with lot of trial and error, i fixd the following values and it seems to work.
#define ACC_ORIENTATION(X, Y, Z) {accADC[ROLL] = Y; accADC[PITCH] = -X; accADC[YAW] = Z;}// This combination works for 2.0
#define GYRO_ORIENTATION(X, Y, Z) {gyroADC[ROLL] = Y; gyroADC[PITCH] = -X; gyroADC[YAW] = -Z;}// This combination works for 2.0
#define MAG_ORIENTATION(X, Y, Z) {magADC[ROLL] = -Z; magADC[PITCH] =-X; magADC[YAW] = -Y;}// This combination works for 2.0
What i was wondering was, if there is a way to define this from the sensor datasheet, other than this trail and error
thanks a lot

Post Reply