GY-86 not working - am I missing something?

Development & General Chat for the superb openxvario project.

Moderator: rainer

mstrens
Posts: 1435
Joined: Fri Dec 27, 2013 7:49 pm
Country: -

Re: GY-86 not working - am I missing something?

Post by mstrens »

Ok fine.

GRacing
Posts: 25
Joined: Mon Dec 23, 2019 5:53 pm
Country: Portugal

Re: GY-86 not working - am I missing something?

Post by GRacing »

Hello,

First of allcongartulations to mstrens for this fantastic project.
I´m no programming Guru but have some experience with arduino, unfortunately i´m getting crazy with the GY-86 offset values i´m having..

I read the description and made everything likeit described...

I uncommented the #define DISPLAY_ACC_OFFSET in order to verify the acc offsets from the 3 axis.. X, Y, Z..
For veryfing it i used another skecth that i attach as jpeg:
The values are almost identical for the openx sensor calibration and the other sketch, but when i put the offset values in the config file,and coment again and send to the pro mini mine opentx shows a correct -1 accG for Z, 0.5 accG for y and 4G accx ....
I don´t know what i´m doing wrong!

Any help would be very valuable!

Best Regards to all
Attachments
calibration offsets MPU6050.jpg
mstrens
Posts: 1435
Joined: Fri Dec 27, 2013 7:49 pm
Country: -

Re: GY-86 not working - am I missing something?

Post by mstrens »

What are the values that you get for offsets?
They should normally not be far away from 0 (I expect in range -3000 , +3000)

Did you proceed as explained in the file oXs_config_description.h ?
* - after startup, terminal should, every 2 or 3 sec, display Acc followed by 3 numbers being respectively AccX, AccY and AccZ. Please note that those numbers change when mpu6050 moves.
* - ensure that the mpu6050 (on GY86,GY87) is perfectly horizontal and does not move (e.g. put on a table)
* - notice the 2 first numbers ( = AccX and AccY ) ; Don't take care of the 3rd number because when the sensor is in this position, it will reflect the gravity and will be around 16384.
* - rotate mpu6050 in order to get X or Y axis perfectly vertical and do not move. Now, the 3rd number would become much lower (because it does not measure gravity anymore)
* - notice the 3rd number ( = Accz )
* - update oXs_config_advanced.h file filling the 3 numbers in lines #define ACC_OFFSET_X , #define ACC_OFFSET_Y and #define ACC_OFFSET_Z

I would not use the values from the sketch because the IMU can be setup with different sensitivities and it is not sure that the sensitivity from the sketch is the same as the one used in oXs.
GRacing
Posts: 25
Joined: Mon Dec 23, 2019 5:53 pm
Country: Portugal

Re: GY-86 not working - am I missing something?

Post by GRacing »

Hello mstrens,

I have done everything exactly like it's in description.
Board levelled...seeing X and y from above...I checked the level with a bubble level in X and y axis....both offset in X, y and z are the same provided by the other sketch..

-3200 in accx
880 in accy
238 in accz (board is rotated 90 degrees in the X axis...Y pointing up)

Regards
mstrens
Posts: 1435
Joined: Fri Dec 27, 2013 7:49 pm
Country: -

Re: GY-86 not working - am I missing something?

Post by mstrens »

This seems OK.

I presume that you uncomented this line
//#define FILL_TEST_1_2_3_WITH_LINEAR_ACC // uncomment this line if oXs has to fill TEST_1, TEST_2, TEST_3 with linear Acc

And that you asked to transmit the Acc using
#define ACCX_SOURCE TEST_1 // select between TEST_1, TEST_2, TEST_3, GLIDER_RATIO , SECONDS_SINCE_T0 ,AVERAGE_VSPEED_SINCE_TO , VOLT_1, VOLT_2, VOLT_3, VOLT_4, VOLT_5, VOLT_6, PITCH, ROLL, YAW, ADS_VOLT_1, ADS_VOLT_2, ADS_VOLT_3, ADS_VOLT_4

#define ACCY_SOURCE TEST_2 // select between TEST_1, TEST_2, TEST_3, GLIDER_RATIO , SECONDS_SINCE_T0 ,AVERAGE_VSPEED_SINCE_TO , VOLT_1, VOLT_2, VOLT_3, VOLT_4, VOLT_5, VOLT_6, PITCH, ROLL, YAW, ADS_VOLT_1, ADS_VOLT_2, ADS_VOLT_3, ADS_VOLT_4

#define ACCZ_SOURCE TEST_3 // select between TEST_1, TEST_2, TEST_3, GLIDER_RATIO , SECONDS_SINCE_T0 ,AVERAGE_VSPEED_SINCE_TO , VOLT_1, VOLT_2, VOLT_3, VOLT_4, VOLT_5, VOLT_6, PITCH, ROLL, YAW, ADS_VOLT_1, ADS_VOLT_2, ADS_VOLT_3, ADS_VOLT_4


With those values in your config, I would expect that accX and accY should be nearly equal to 0 on your TX display when the GY86 is horizontal (and do not move)

GRacing
Posts: 25
Joined: Mon Dec 23, 2019 5:53 pm
Country: Portugal

Re: GY-86 not working - am I missing something?

Post by GRacing »

Hello mstrens,

It is exactly like you said in the previous post.

Please check photo

What Ami doing wrong?Image

Enviado do meu Mi 9T Pro através do Tapatalk

mstrens
Posts: 1435
Joined: Fri Dec 27, 2013 7:49 pm
Country: -

Re: GY-86 not working - am I missing something?

Post by mstrens »

It is strange.
Perhaps I introduced a bug in some changes.
I do not have a GY86 to make my own tests.

Could you try with an oldier release of oXs. You can try e.g. release V7.
Take care that in this old release:
- there is only one config.h file (but most parameters are similar)
- in order to fill TEST1,2,3 with ACC, you have to uncomment //#define TEST_SEND_MPU in file openXsensor.ino
mstrens
Posts: 1435
Joined: Fri Dec 27, 2013 7:49 pm
Country: -

Re: GY-86 not working - am I missing something?

Post by mstrens »

some more points about your tests with the "master" release:
- did you check that there where no other line in the config that asked for filling Test1 ,2 and 3 with other values than accelerations?
- if you rotate your sensor, does the accX and Y change in a logical way?
GRacing
Posts: 25
Joined: Mon Dec 23, 2019 5:53 pm
Country: Portugal

Re: RE: Re: GY-86 not working - am I missing something?

Post by GRacing »

mstrens wrote:some more points about your tests with the "master" release:
- did you check that there where no other line in the config that asked for filling Test1 ,2 and 3 with other values than accelerations?
- if you rotate your sensor, does the accX and Y change in a logical way?
Hello mstrens,


I tried this approach first:

There isn't any more filling for test_1, test_2 and test_3.

When I invert the board in the accz it goes from -1g (9.81m s^2) to -2g...

When I point X up, 90 degrees from levelled Y axis I get 4.3g, and when I point X down, -90 degrees from levelled Y axis I get 3.5g

When I point Y up, 90 degrees from levelled X axis I get -2.50 g and when I point Y down, -90 degrees from levelled X axis I get -2.95 g.


Something strange is happening....[emoji19][emoji19][emoji19][emoji19][emoji848][emoji848][emoji848][emoji848][emoji848]


Enviado do meu Mi 9T Pro através do Tapatalk

ronron84
Posts: 48
Joined: Sat Apr 18, 2020 7:13 pm
Country: -

Re: GY-86 not working - am I missing something?

Post by ronron84 »

Hi,

I'm trying to get temperature value from 5611 in openxsensor for frsky, do you know an easy way to do it?

Thanks
GRacing
Posts: 25
Joined: Mon Dec 23, 2019 5:53 pm
Country: Portugal

Re: GY-86 not working - am I missing something?

Post by GRacing »

Hello ronron84,

I would like too, but i think it´s not implemented.
The best person to help you his mstrens.

Best Regards
User avatar
kalle123
Posts: 905
Joined: Sat Mar 29, 2014 10:59 am
Country: -
Location: Moenchengladbach

Re: GY-86 not working - am I missing something?

Post by kalle123 »

ronron84 wrote: Sat Apr 18, 2020 7:17 pm I'm trying to get temperature value from 5611 in openxsensor for frsky, do you know an easy way to do it?
I think, you should start a new thread. ;)

br KH
mstrens
Posts: 1435
Joined: Fri Dec 27, 2013 7:49 pm
Country: -

Re: GY-86 not working - am I missing something?

Post by mstrens »

I did not recommend using the MS5611 temperature because it is usually a few degree above the real temperature.
It is so, because oXs reads the sensor very often (50 X per sec) and so the MS5611 is heating.
Still if you want it, you can make some changes to the openXsensor.ino file

Currently in this file, you can find following lines

// if ( oXs_MS5611.varioData.climbRate.available ) {
// test1.value = oXs_MS5611.varioData.temperature ;
// test1.available = true ;
// }

You have to remove the // in front of all those lines and so "test1" will be filled with the temperature in 1/10 of degree
Then in the file oXs_config_basic.h you have to ask to transmit test1 e.g. as T1
So you have (e.g.) to remove the // from this line
//#define T1_SOURCE TEST_1

Normally it should work.
On Tx side, you probably have to apply a scaling factor in order to convert the temp in 1/10 of degree to degree
ronron84
Posts: 48
Joined: Sat Apr 18, 2020 7:13 pm
Country: -

Re: GY-86 not working - am I missing something?

Post by ronron84 »

Thanks for your answer mstrens, i will try it this week.
sorry for my intrusion in this post.
Best regards

Post Reply

Return to “OpenXVario - an open source vario supported by the open source firmwares!!”