GY86 no IMU data but Baro still ok?

Development & General Chat for the superb openxvario project.

Moderator: rainer

Post Reply
EagleFly
Posts: 16
Joined: Wed Feb 05, 2020 9:04 pm
Country: -

GY86 no IMU data but Baro still ok?

Post by EagleFly »

Hey Guys,
yesterday I received my GY86 Sensor and I connenctet together with my GPS on my pro_mini.
GPS, and Baro works fine and I changed all parameters with the hope that I did it right. My Horus telemetriy get following Sensors
:Vsped, Alt, RSSI, RxBt, RPM, GPS, GAlt, Gsped, Hdg but no ACC data. Also the horizon within my Widget is still flat.
I don´t know how I can test the ACC datas? Maybe I have an bug inside my arduino but I don´t find the point for this.

To be sure, I just have to setup the config_basic and config_advanced parameters?
Maybe someone can help me to check my sketch or maybe some other ideas?
Is it possible to connect an other ACC only parallel for test it?

Thank you for your support!!!!
Attachments
oXs_config_basic.h
(11.13 KiB) Downloaded 265 times
oXs_config_advanced.h
(18.9 KiB) Downloaded 264 times

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

Re: GY86 no IMU data but Baro still ok?

Post by mstrens »

In order to get Acc, you have to modify the config files.
By default, those data are nore sent.

So in oXs_config_basic.h file you have to uncomment those lines
//#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

Then, in oXs_config_advanced.h file you also have to ask to fill TEST1, 2 3. So you also have to uncomment 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
EagleFly
Posts: 16
Joined: Wed Feb 05, 2020 9:04 pm
Country: -

Re: GY86 no IMU data but Baro still ok?

Post by EagleFly »

Thank you mstrens for this help!
I´ve done it as you post, but now I got the following message (I´m sorry but I don´t know what that means, I´m a beginner with Arduino)
z not declared.jpg
but what should I change now?
mstrens
Posts: 1435
Joined: Fri Dec 27, 2013 7:49 pm
Country: -

Re: GY86 no IMU data but Baro still ok?

Post by mstrens »

When I try to compile with the latest version on Github , it seems OK.
Please note that I the latest version , I made some change in the config file. So edit the files from this version and do not reuse config files made with a previous version.

Let me know if it still does not work.
EagleFly
Posts: 16
Joined: Wed Feb 05, 2020 9:04 pm
Country: -

Re: GY86 no IMU data but Baro still ok?

Post by EagleFly »

Ok, I tried again and I used the Version from original download 4days ago and just changed the extra setup for GY86 + GPS and the ACC modify as you send me above. But anyhow I got the same message too!
Please find the attached File, maybe I have another mistake inside but I don´t know!?

basic:
#ifndef OXS_CONFIG_BASIC_h
#define OXS_CONFIG_BASIC_h

#define PROTOCOL FRSKY_SPORT
#define FIRST_BARO_SENSOR_USE MS5611
#define VSPEED_SOURCE BARO_AND_IMU
#define AIRSPEED_SENSOR_USE NO_AIRSPEED
#define ARDUINO_MEASURES_VOLTAGES YES
#define NUMBEROFCELLS 0
#define ARDUINO_MEASURES_A_CURRENT NO
#define AN_ADS1115_IS_CONNECTED NO
#define CALCULATE_RPM NO
#define SAVE_TO_EEPROM NO
#define A_GPS_IS_CONNECTED YES
#define A_MPU6050_IS_CONNECTED YES
#define CALCULATE_YAW_WITH_HMC5883 YES
#define A_FLOW_SENSOR_IS_CONNECTED NO
#define A_LOCATOR_IS_CONNECTED NO
#endif
Attachments
oXs_config_basic.h
(11.17 KiB) Downloaded 239 times
oXs_config_advanced.h
(19.7 KiB) Downloaded 245 times

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

Re: GY86 no IMU data but Baro still ok?

Post by mstrens »

The oXs_config_advanced.h file that you use is not based on the file on github.

It contains e.g. those lines (and more ) that have been moved to another file in the latest version.

So please, use the latest version (including for basic and advanced config files



#define BASED_ON_AIRSPEED 0
#define BASED_ON_GPS_SPEED 1
#define AVERAGING_DELAY_MILLISEC AVERAGING_TOLERANCE * 100

#define FIRST_BARO 1
#define SECOND_BARO 2
#define AVERAGE_FIRST_SECOND 4
#define AIRSPEED_COMPENSATED 3
#define BARO_AND_IMU 5
#define PPM_SELECTION 6

#include <Arduino.h>
struct ONE_MEASUREMENT {
uint8_t available ;
int32_t value ;
} ;
EagleFly
Posts: 16
Joined: Wed Feb 05, 2020 9:04 pm
Country: -

Re: GY86 no IMU data but Baro still ok?

Post by EagleFly »

I´m sorry, I think that I´m not able to find the right way! (...maybe I´m not born for arduino and I´m short before giving up.....)

Now, I copyed the following two files https://github.com/openXsensor/openXsen ... urrent_GPS
and replaced it in my script. (drag and drop) (is this correct, or is ther an other way? If yes, how I can get the original complet Arduino file?)
I´ve changed all parrameter for the GY86 and GPS (line by line in the _basic and advanced)
I´ve verifed it and got "done compiling"
Than I´ve changed the ACC settings as your description again and I received the same message again!
Attachments
oXs_config_basic.h
(11.13 KiB) Downloaded 234 times
oXs_config_advanced.h
(18.43 KiB) Downloaded 256 times
EagleFly
Posts: 16
Joined: Wed Feb 05, 2020 9:04 pm
Country: -

Re: GY86 no IMU data but Baro still ok?

Post by EagleFly »

Now I downloaded the folder openXsensor and used it for a fresh new version and I could realize it as described by you. Now there was no more message.
...as soon as you get it right, it already works!!

(the ACCY,Z,X are waked up and send datas, however only about once a minute, also the GPS didn´t find the pos right now. Maybe there is need for some tuning now....)

Anyhow, on this Point, Thank you so much vor your support and sorry for all my inability!
GRacing
Posts: 25
Joined: Mon Dec 23, 2019 5:53 pm
Country: Portugal

Re: GY86 no IMU data but Baro still ok?

Post by GRacing »

Hello Eaglefly,


Do you have correct accelerations outputs in X,Y AND Z, because I'm having good output in Z but not in X and Y...
Do you use opentx?

Best Regards

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

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

Re: GY86 no IMU data but Baro still ok?

Post by mstrens »

EagleFly wrote: Thu Feb 13, 2020 11:16 pm Now I downloaded the folder openXsensor and used it for a fresh new version and I could realize it as described by you. Now there was no more message.
...as soon as you get it right, it already works!!

(the ACCY,Z,X are waked up and send datas, however only about once a minute, also the GPS didn´t find the pos right now. Maybe there is need for some tuning now....)

Anyhow, on this Point, Thank you so much vor your support and sorry for all my inability!
It may take several minutes before the GPS get a fix.
As long GPS does not get a fix, oXs does not sent GPS data.
Note: usually there is a led on the GPS module that starts blinking when GPS got a fix. Still, there are several levels of fixes and oXS uses next level. So it is normal that oXs starts sending gps data only a few seconds (minutes) after the gps starts blinking.
EagleFly
Posts: 16
Joined: Wed Feb 05, 2020 9:04 pm
Country: -

Re: GY86 no IMU data but Baro still ok?

Post by EagleFly »

GRacing wrote: Fri Feb 14, 2020 6:36 am Hello Eaglefly,


Do you have correct accelerations outputs in X,Y AND Z, because I'm having good output in Z but not in X and Y...
Do you use opentx?

Best Regards

Enviado do meu Mi 9T Pro através do Tapatalk
Yes I have X,Y,Z signals but not good and only very few signals.
after power on, it needs few min to get the first Y,Z,X signals, my cheap GPS needs around "only " one min! (and yes there is also a red led, it starts to flash when the GPS is fixed)
I know the ACC don´t need time and there must be a bug in my script, but where is this point?
To be sure... only config_basic and confid_advanced must be modified? (all other register are without modification, right?)

Yes I have openTX (Horus X10S) and I check the telemery inputs, actual, without any change I don´t receive ACC datas, but GPS and Baro! It is very strange.
GRacing
Posts: 25
Joined: Mon Dec 23, 2019 5:53 pm
Country: Portugal

Re: GY86 no IMU data but Baro still ok?

Post by GRacing »

Are you using a pro Mini?..Are you sure that is 5V 16MHZ, and not the 3.3V 8Mhz?
EagleFly
Posts: 16
Joined: Wed Feb 05, 2020 9:04 pm
Country: -

Re: GY86 no IMU data but Baro still ok?

Post by EagleFly »

GRacing wrote: Fri Feb 14, 2020 8:37 am Are you using a pro Mini?..Are you sure that is 5V 16MHZ, and not the 3.3V 8Mhz?
it´s a clone by ebay and on bottom there is noc dot for 3,3 or 5V But on the chip is 328P 1437 and I "guess" it should be a 5V, because with 5V I receive also the Baro and the GPS signals too. (in case for 3.3V I think there should be no datas!?)

But, maybe there is another mistake.
my Sensors are soldered with SDL,SCL,and gnd and VCC (5V) but I alsoe have on it a 3.3.V pad.
WP_20200214_09_43_48_Pro.jpg

some pictures frome others I found that some guys soldrerd also INT to port D2 (in my case not)
Here: https://board.mfc-solingen.de/cms/index ... plan1-jpg/


It´s really strange, cause 30min ago there was few sec. I got many ACC date quickly, all axis was changed around 2x/sec. but after few sec. it´s freez again. I checked also the soldered connection and moved the GPS away, maybe cause interferences, but no better signals.
GRacing
Posts: 25
Joined: Mon Dec 23, 2019 5:53 pm
Country: Portugal

Re: GY86 no IMU data but Baro still ok?

Post by GRacing »

You need to solder the INT(interrupt) to Digital PIN 2 of the Arduino Pro Mini clone, if you don´t do it, it will not work!!!!

Please try it....
mstrens
Posts: 1435
Joined: Fri Dec 27, 2013 7:49 pm
Country: -

Re: GY86 no IMU data but Baro still ok?

Post by mstrens »

The GY86 has a voltage regulator (close to the hole).
So, if you provide 5V on Vcc-in pin, you should get only 3.3V on the pin marked with 3.3V.

The accelerometer/gyro are working on 3.3V and the GY86 has level converter on SCL and SDA signal in order to be able to communicate safely with an arduino 5V Vcc

If you have 5V on pin marked 3.3V, it could be that the IMU is damaged.
mstrens
Posts: 1435
Joined: Fri Dec 27, 2013 7:49 pm
Country: -

Re: GY86 no IMU data but Baro still ok?

Post by mstrens »

GRacing wrote: Fri Feb 14, 2020 10:56 am You need to solder the INT(interrupt) to Digital PIN 2 of the Arduino Pro Mini clone, if you don´t do it, it will not work!!!!

Please try it....
Are you sure?
The doc (oXs_config_description.h) says that you can use pin 3 too (config file has to edited accordingly)
GRacing
Posts: 25
Joined: Mon Dec 23, 2019 5:53 pm
Country: Portugal

Re: GY86 no IMU data but Baro still ok?

Post by GRacing »

I´m sorry,

I thought that you didn't solder the INT pin of the GY 86 board....yes, you can connect to Pin 3 of the Pro mini..If you declare it of course in the config. file..
Please check if that pin isn't assigned to any other thing...
EagleFly
Posts: 16
Joined: Wed Feb 05, 2020 9:04 pm
Country: -

Re: GY86 no IMU data but Baro still ok?

Post by EagleFly »

Ok, now I soldered PIN2 to INT on GY86.
And I changed in the: oXs_config_description.h PIN2 and YES as following.
#define A_MPU6050_IS_CONNECTED YES : Replace NO by YES if a IMU6050 is connected and has to transmit his data
#define PIN_INT_6050 2 // Interrupt from 6050 has to be connected to Arduino pin 2 or pin 3 (do not use here the same pin as PPM)


I checked the voltage and take 5V in RAW and measured 5V on the VCC Pin too (no 3.3V Pin in this version)
So I think it must be the 5V 16Bit pro mini Arduino. I think the Board should be ok.

anyhow, no ACC in my telemetry Datas.
It´s really annoying and incredibly time consuming, because I don't understand how and why it all have to do.
I don't understand where I can get the necessary information for this project as an Arduino beginner.

Many thinks I don´t understand....for example in the documentation https://github.com/openXsensor/openXsen ... uild_Vario is no information about connection between INT and PIN2!? How I can get this information?
Why I received this morning ACC datas but just short time? How do I know which parameters to set where, apart from config_basic and Config_advanced?

Is there anywhere a description or manual for beginner like me?
Attachments
openXsensor_13.2.2020_V2_GPS_MS5611_ACC - Kopie.zip
(323 KiB) Downloaded 188 times
mstrens
Posts: 1435
Joined: Fri Dec 27, 2013 7:49 pm
Country: -

Re: GY86 no IMU data but Baro still ok?

Post by mstrens »

The documentation is given in file oXs_config_description.h
It is quite long but normally you should find all informations about this project.
You do not have to be able to write program to use this project but it is supposed you already know how to use an Arduino. There are many videos/tutorials on internet about using Arduino platform.

In order to know if you Arduino can communicate with your sensors, you can try to uncomment a line in oXs_config_advanced.h.
Please uncomment (removing //) the line
//#define DISPLAY_ACC_OFFSET // used ONLY in order to display the acceleration offset on pc terminal; KEEP AS COMMENT once offsets have been setup

Then reflash the arduino.
Connect the arduino to PC (just like when you flash it) and then open the arduino serial terminal (press CTRL + SHIFT +M).
Verify (right below) that the baud rate is 112500 (or 38200 if GPS is used too).
You should get continously a new line on your pc display with the Acc values.
Those values should change if you rotate your GY86.
Please report here if it works or not.
For this test, there is no need to look at your Transmitter.
EagleFly
Posts: 16
Joined: Wed Feb 05, 2020 9:04 pm
Country: -

Re: GY86 no IMU data but Baro still ok?

Post by EagleFly »

Dear mstrens, Thank you for your great support and many thanks for your persistence with my inability!
This test was successful, I was able to read out the sensor and also recalibrate it. So the ACC is in Life!

Now I also changed also some settins in the script,
I changed the INT to Pin3 = #define PIN_INT_6050 3
also #define FIRST_BARO_SENSOR_USE MS5611 insted GX86

Now, it seems that it works, Vsdp,Alt,AccY,AccZ are fine and the datas are right and fast. only my AccX is missing, the Sensor is detected but the value is 0.00g without change. (within the IMU Test by SerialPort in advane there was an value depending on the movement)

However... a long Trip and many bugs by my inability, but I´m really happy that 90% are running and I really grateful for your support and time investment in my trouble Project!! ;-)
mstrens
Posts: 1435
Joined: Fri Dec 27, 2013 7:49 pm
Country: -

Re: GY86 no IMU data but Baro still ok?

Post by mstrens »

Thanks for the feedback.
Another user reports also some issues with the Acc data (he get values but out of range).
I will look for a bug.

You said you changed the INT to Pin3 = #define PIN_INT_6050 3
So I presume you solder also arduino digital pin3 to MPU6050 INT pin. Othewise, it is inconsistent and should not work.

You put #define FIRST_BARO_SENSOR_USE MS5611 insted GX86
Does this changed something?
I presume you still have the line #define VSPEED_SOURCE BARO_AND_IMU
GRacing
Posts: 25
Joined: Mon Dec 23, 2019 5:53 pm
Country: Portugal

Re: GY86 no IMU data but Baro still ok?

Post by GRacing »

EagleFly wrote: Fri Feb 14, 2020 9:33 pm Dear mstrens, Thank you for your great support and many thanks for your persistence with my inability!
This test was successful, I was able to read out the sensor and also recalibrate it. So the ACC is in Life!

Now I also changed also some settins in the script,
I changed the INT to Pin3 = #define PIN_INT_6050 3
also #define FIRST_BARO_SENSOR_USE MS5611 insted GX86

Now, it seems that it works, Vsdp,Alt,AccY,AccZ are fine and the datas are right and fast. only my AccX is missing, the Sensor is detected but the value is 0.00g without change. (within the IMU Test by SerialPort in advane there was an value depending on the movement)

However... a long Trip and many bugs by my inability, but I´m really happy that 90% are running and I really grateful for your support and time investment in my trouble Project!! ;-)
Hello EagleFly,

If you see 0G is a good value, and i expect if you tilt it in the X, Y and Z axis you should see the acceleration increase and decrease..Have you tested?
Mine gives wrong values, but they change when i move it and rotate it!


According to the GURU Openx Sensor, Mstrens, :
"...Is that oXs takes care of the orientation of the sensor (in 3D) and substracts the acceleration of the gravity. So, if the sensor is well calibrated and does not move, it should report (nearly) 0 as acceleration in the 3 directions (even if you turn the sensor by 90°). It is only when you shake it, that acceleration values would increase."

Please check and confirm...May be your feedback could help me!

Best Regards

Post Reply

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