Page 1 of 1

Number of Issues on During Setup

Posted: Fri Oct 11, 2013 3:45 am
by ardot
Hey all,

I am trying to do my initial setup of the board, and am running into a number of issues. Namely, the Accelerometers and Gyros seem to be disjoint from eachother. Judging by the start-up manaul:

"How should be the sensor axis directions
TILT the MULTI to the RIGHT (left side up):

MAG_ROLL, ACC_ROLL and GYRO_ROLL goes up
MAG_Z and ACC_Z goes down
TILT the MULTI forward (tail up):

MAG_PITCH, ACC_PITCH and GYRO_PITCH goes up
MAG_Z and ACC_Z goes down
Rotating the copter clockwise (YAW):

GYRO_YAW goes up
The copter stays level:

MAG_Z is positive ; ACC_Z is positive"

When I tilt the multi to the right, the ACC Pitch goes DOWN, and the GYRO Roll goes UP. There is no reading from the MAGs.

Similarly, when I tilt the multi forward, the ACC Roll goes UP and the GYRO Pitch goes UP. Again, there is no reading from the MAGs.

Any ideas as to what I am doing wrong or how I could fix this?

Re: Number of Issues on During Setup

Posted: Fri Oct 11, 2013 8:38 am
by Noctaro
Hi,
first, what hardware do you use?

There is an option in the "config.h" where you can exchange all axis of your sensors. Search for "sensor orientation" in the mentioned file, this will take you to the right place.
You may exchange your axis, by swapping xyz, or just reverse how the work by adding or removing the minus.

Hope that helps!
Greetz Noc

Re: Number of Issues on During Setup

Posted: Fri Oct 11, 2013 6:54 pm
by ardot
Hi Noc,

Thanks so much for the quick reply! Sorry for not specifying - I am using a v1.9 board, and v1.9 software. For posterity, I found and changed the following lines of code in config.h:

"
//if you want to change to orientation of individual sensor
#define ACC_ORIENTATION(X, Y, Z) {accADC[ROLL] = Y; accADC[PITCH] = -X; accADC[YAW] = Z;} // THIS LINE NOW UNCOMMENTED
//#define GYRO_ORIENTATION(X, Y, Z) {gyroADC[ROLL] = -Y; gyroADC[PITCH] = X; gyroADC[YAW] = Z;}
//#define MAG_ORIENTATION(X, Y, Z) {magADC[ROLL] = X; magADC[PITCH] = Y; magADC[YAW] = Z;}
"

This said, now that I changed that line and uploaded the code - I can no longer get readout through the MultiwiiConf UI! Yikes! When I connect and choose 'start', I only get a single flat line across the graph, and the "Debug2" value goes crazy. I understand Debug2 represents I2C errors.

Commenting the above line back out, and uploading the unchanged code doesn't change anything. Still no reading. Any ideas what could be going on?

Thanks,
-T

Re: Number of Issues on During Setup

Posted: Fri Oct 11, 2013 6:57 pm
by ardot
Hi Noc,

Thanks so much for the quick reply! Sorry for not specifying - I am using a v1.9 board, and v1.9 software. For posterity, I found and changed the following lines of code in config.h:

"
//if you want to change to orientation of individual sensor
#define ACC_ORIENTATION(X, Y, Z) {accADC[ROLL] = Y; accADC[PITCH] = -X; accADC[YAW] = Z;} // THIS LINE NOW UNCOMMENTED
//#define GYRO_ORIENTATION(X, Y, Z) {gyroADC[ROLL] = -Y; gyroADC[PITCH] = X; gyroADC[YAW] = Z;}
//#define MAG_ORIENTATION(X, Y, Z) {magADC[ROLL] = X; magADC[PITCH] = Y; magADC[YAW] = Z;}
"

This said, now that I changed that line and uploaded the code - I can no longer get readout through the MultiwiiConf UI! Yikes! When I connect and choose 'start', I only get a single flat line across the graph, and the "Debug2" value goes crazy. I understand Debug2 represents I2C errors.

Commenting the above line back out, and uploading the unchanged code doesn't change anything. Still no reading. Any ideas what could be going on?

Thanks,
-T

Re: Number of Issues on During Setup

Posted: Fri Oct 11, 2013 8:58 pm
by Noctaro
hey ardot,
multiwii 1.9 is quite outdated. Try to figure out wich sensors your board uses. Then go to the multiwii code repository and get multiwii 2.2 or above if you would like to use development stage software. Multiwii 2.2 was the last mainrelease. If you have downloaded the sketch, edit your config.h. Uncomment the sensors you use. You may have a look at your old config file and uncomment same things.

Now that I2C errors seem strange. Are you sure your cable/solder connections are fine?
Did you try to hit calibrate acc in GUI?
You may also comment the diffrent sensors in config.h and try to reconnect to get an idea wich sensor produces the i2c errors.

Hope that helps.
Greetz Noc