GY-86 not working - am I missing something?
Moderator: rainer
GY-86 not working - am I missing something?
oXs is working very well with MPU6050, MS5611 and GPS modules.
When I change the MPU6050 and MS5611 to a GY-86 to save space, it does not work, no SPort data is sent, not even from the GPS
I also set the following:
#define FIRST_BARO_SENSOR_USE GY86
I know that the GY86 is 'alive' because it returns the 0x68 and 0x77 addresses when I run an I2C Scanner.
Any ideas? Justin
When I change the MPU6050 and MS5611 to a GY-86 to save space, it does not work, no SPort data is sent, not even from the GPS
I also set the following:
#define FIRST_BARO_SENSOR_USE GY86
I know that the GY86 is 'alive' because it returns the 0x68 and 0x77 addresses when I run an I2C Scanner.
Any ideas? Justin
Re: GY-86 not working - am I missing something?
So the GY-86 seems to be ok. That is not the initial problem.
Check the wiring and post oXs_config_basic and oXs_config_advance.
br KH
Check the wiring and post oXs_config_basic and oXs_config_advance.
br KH
Re: GY-86 not working - am I missing something?
Hi Kalle - the wiring must be OK because the I2C Scanner gave the correct addresses (I didn't change the wiring when I ran this).
I will take another look at the oXs config basic and advanced files.
I assume that other people have had success with the GY-86 and recent versions of oXs.
Justin
I will take another look at the oXs config basic and advanced files.
I assume that other people have had success with the GY-86 and recent versions of oXs.
Justin
Re: GY-86 not working - am I missing something?
What is the I2C address when you run the GY86?
The mS5611 has 2 I2S address.
Perhaps the GY86 is designed to use the other one (0x76).
You can change this in the file openXsensor.ino in the folowing code
#define I2C_MS5611_Add 0x77 // 0x77 The I2C Address of the MS5611 breakout board
// (normally 0x76 or 0x77 configured on the MS5611 module
// via a solder pin or fixed)
The mS5611 has 2 I2S address.
Perhaps the GY86 is designed to use the other one (0x76).
You can change this in the file openXsensor.ino in the folowing code
#define I2C_MS5611_Add 0x77 // 0x77 The I2C Address of the MS5611 breakout board
// (normally 0x76 or 0x77 configured on the MS5611 module
// via a solder pin or fixed)
Re: GY-86 not working - am I missing something?
Hi mstens - I was getting 0x68 and 0x77 when I ran the scanner and I have 0x77 selected in openXsensor.ino.
I presume that other people are successfully using oXs with a GY-86??
I presume that other people are successfully using oXs with a GY-86??
Re: GY-86 not working - am I missing something?
The 2 I2C adress are correct.
Normally it should work with a GY-86.
I build one (at least using an oldier version of oXs).
Can you post here your 2 config files.
Are you sure that your Aduino is using a AVR328P. Some are using a AVR168 that has less memory?
Still I expect this should generate an error at compilation/flashing.
Normally it should work with a GY-86.
I build one (at least using an oldier version of oXs).
Can you post here your 2 config files.
Are you sure that your Aduino is using a AVR328P. Some are using a AVR168 that has less memory?
Still I expect this should generate an error at compilation/flashing.
Re: GY-86 not working - am I missing something?
Hi mstrens - the two files are attached.
Yes - the Arduino is a -328 and works very well with separate MPU and MS5611 modules. I did try a separate Arduino (Pro Mini 3.3V), but same result.
Thanks - Justin
Yes - the Arduino is a -328 and works very well with separate MPU and MS5611 modules. I did try a separate Arduino (Pro Mini 3.3V), but same result.
Thanks - Justin
- Attachments
-
- oXs_config_basic.h
- (11.18 KiB) Downloaded 294 times
-
- oXs_config_advanced.h
- (19.15 KiB) Downloaded 293 times
Re: GY-86 not working - am I missing something?
Your config seems OK.
There is perhaps a bug in oXs.
Can I ask you to test following things:
- test disabling the GPS (GPS and GY86 require quite a lot of memory and perhaps there is a conflict)
- test using #define FIRST_BARO_SENSOR_USE MS5611 in your config (so with MS5611 instead of GY86).
You normally can still use #define VSPEED_SOURCE BARO_AND_IMU if you have also #define A_MPU6050_IS_CONNECTED YES
- test using #define FIRST_BARO_SENSOR_USE MS5611 in your config but ask for getting the Vspeed without using the IMU calculation
So use #define VSPEED_SOURCE FIRST_BARO
In this cas, you can use #define A_MPU6050_IS_CONNECTED YES or NO depending if you want the roll/pitch/acceleration or not
Let me know the result of the tests.
There is perhaps a bug in oXs.
Can I ask you to test following things:
- test disabling the GPS (GPS and GY86 require quite a lot of memory and perhaps there is a conflict)
- test using #define FIRST_BARO_SENSOR_USE MS5611 in your config (so with MS5611 instead of GY86).
You normally can still use #define VSPEED_SOURCE BARO_AND_IMU if you have also #define A_MPU6050_IS_CONNECTED YES
- test using #define FIRST_BARO_SENSOR_USE MS5611 in your config but ask for getting the Vspeed without using the IMU calculation
So use #define VSPEED_SOURCE FIRST_BARO
In this cas, you can use #define A_MPU6050_IS_CONNECTED YES or NO depending if you want the roll/pitch/acceleration or not
Let me know the result of the tests.
Re: GY-86 not working - am I missing something?
Hi Michel, I have been doing some testing:
Test disabling the GPS - no change
#define FIRST_BARO_SENSOR_USE MS5611 - no change
#define FIRST_BARO_SENSOR_USE MS5611 + Vspeed without using the IMU calculation - no change
However, when I set
#define A_MPU6050_IS_CONNECTED NO, the GPS and MS5611 work OK, so it is a problem with this.
There may be a problem with my GY-86, even though the correct I2C addresses are found with the scanner. The code works OK with separate MS5611 and MPU modules. Tried to scope the interrupt line to the MPU - noisy signal. I probably need to get a new GY-86.
Justin
Test disabling the GPS - no change
#define FIRST_BARO_SENSOR_USE MS5611 - no change
#define FIRST_BARO_SENSOR_USE MS5611 + Vspeed without using the IMU calculation - no change
However, when I set
#define A_MPU6050_IS_CONNECTED NO, the GPS and MS5611 work OK, so it is a problem with this.
There may be a problem with my GY-86, even though the correct I2C addresses are found with the scanner. The code works OK with separate MS5611 and MPU modules. Tried to scope the interrupt line to the MPU - noisy signal. I probably need to get a new GY-86.
Justin
Re: GY-86 not working - am I missing something?
Does oXs use the magnetometer on the GY-86? Another project uses the GY-85 and nowadays most of the boards that are sold have a fake/clone "5883" that doesn't work right, at least not like the original. Apparently there are software changes needed but no datasheet can be found and while some managed to get it to somewhat work it does so poorly, leading to people having to try and find sources with an original by trial and error. Most likely the same issue exists with the GY-86.
Re: GY-86 not working - am I missing something?
Thanks for the information.
When the option GT86 is activated in oXs it does not use the magnetometer.
In order to use the 5883, you have to explicitely activate it (as a separate option).
So, this could not be the reason here.
When the option GT86 is activated in oXs it does not use the magnetometer.
In order to use the 5883, you have to explicitely activate it (as a separate option).
So, this could not be the reason here.
Re: GY-86 not working - am I missing something?
Do we now have a problem with some GY-86 or is the code putting to much load on the Arduino?
If necessary, I could do tests here ....
br KH
If necessary, I could do tests here ....
br KH
Re: GY-86 not working - am I missing something?
There is no new version of oXs since many weeks now.
I expect GY86 option combined with a GPS should work but It could be good to test it to be sure.
So if you have the hardware to make test it would be fine to report here the result.
I expect GY86 option combined with a GPS should work but It could be good to test it to be sure.
So if you have the hardware to make test it would be fine to report here the result.
Re: GY-86 not working - am I missing something?
Just did a short test here on the window sill.
Just pluged the components together. Arduino UNO, BN-180 GPS, GY-86 FrSky S6R.
Took the oXs_config files, Justin posted.
I do see GPS and Alt values. I forgot to define Vario source in Open TX, but for me, there is no issue at the moment.
br KH
Just pluged the components together. Arduino UNO, BN-180 GPS, GY-86 FrSky S6R.
Took the oXs_config files, Justin posted.
I do see GPS and Alt values. I forgot to define Vario source in Open TX, but for me, there is no issue at the moment.
br KH
Re: GY-86 not working - am I missing something?
Thank you for the test.
Re: GY-86 not working - am I missing something?
Kalle - thanks for doing this test - interesting result.
Your set up works OK, without needing to set #define A_MPU6050_IS_CONNECTED NO. Did you select any MPU values (Pitch, Roll or Ay) for display on the Tx?
Mine does not work unless I deselect the MPU6050. I am using a Pro-Mini 3.3V Arduino, so that is different... or there is an issue with my GY-86.
The GY-86 modules are quite expensive now - I will, probably connect my separate MS5611 and MPU modules together - these work fine.
Justin
Your set up works OK, without needing to set #define A_MPU6050_IS_CONNECTED NO. Did you select any MPU values (Pitch, Roll or Ay) for display on the Tx?
Mine does not work unless I deselect the MPU6050. I am using a Pro-Mini 3.3V Arduino, so that is different... or there is an issue with my GY-86.
The GY-86 modules are quite expensive now - I will, probably connect my separate MS5611 and MPU modules together - these work fine.
Justin
Re: GY-86 not working - am I missing something?
Perhaps there is an issue with a pro mini at 3.3V because it is running at 8 Mhz instead of 16 MHZ and handling the imu +gps + MS5611 is perhaps too much.
Re: GY-86 not working - am I missing something?
Justin, did not do anything special. Flashed the Arduino Uno with the code (your config files), connected the components, switch it on and did a telemetry search on Taranis. That is all.
Get an 5V 16 Mhz Arduino and do another test.
br KH
Get an 5V 16 Mhz Arduino and do another test.
br KH
Re: GY-86 not working - am I missing something?
Just wondering if this issue was resolved?
I have just received a GY63 module & hooked it, but am not getting any Serial port output during the IMU calibration process.
IMU is selected & 1st BARO set as GY63 etc. Interrupt pin 2 is selected & used.
The Serial port output line is also uncommented.
The GY63 has been tested with a simple program which reads the IMU registers (doesn’t use interrupt output) with I2C address 0x68 and I get Acc & G output values which change to different values as I move the sensor axis orientation.
Temperature reading is good & changes correctly when held/released to cool
Where do I check which I2C address OSX is using?
Peter
I have just received a GY63 module & hooked it, but am not getting any Serial port output during the IMU calibration process.
IMU is selected & 1st BARO set as GY63 etc. Interrupt pin 2 is selected & used.
The Serial port output line is also uncommented.
The GY63 has been tested with a simple program which reads the IMU registers (doesn’t use interrupt output) with I2C address 0x68 and I get Acc & G output values which change to different values as I move the sensor axis orientation.
Temperature reading is good & changes correctly when held/released to cool
Where do I check which I2C address OSX is using?
Peter
Re: GY-86 not working - am I missing something?
It is not clear what type you are using.
In your message you refer to GY63 and to IMU calibration.
The GY63 module does have an IMU. It has only a MS5611 (baro sensor).
Please clarify if you are using a GY63 or a GY86.
If you are using a GY86, please declare your first baro sensor as a GY86.
For information, oXs uses this adress for INV6050
#define INV6050_addr 0x68
#
In your message you refer to GY63 and to IMU calibration.
The GY63 module does have an IMU. It has only a MS5611 (baro sensor).
Please clarify if you are using a GY63 or a GY86.
If you are using a GY86, please declare your first baro sensor as a GY86.
For information, oXs uses this adress for INV6050
#define INV6050_addr 0x68
#
Re: GY-86 not working - am I missing something?
Sorry, a typo. Should be GY86!
I am using an Arduino Uno for my test setup if that makes any difference.
I think that I have everything configured correctly?
The GY86 connections are untouched from my working simple IMU sketch.
GY86 INTA pin is definitely connected to Uno D2 (INT0).
Peter
I am using an Arduino Uno for my test setup if that makes any difference.
I think that I have everything configured correctly?
The GY86 connections are untouched from my working simple IMU sketch.
GY86 INTA pin is definitely connected to Uno D2 (INT0).
Peter
- Attachments
-
- oXs_config_basic.h
- (11.47 KiB) Downloaded 224 times
-
- oXs_config_advanced.h
- (15.86 KiB) Downloaded 234 times
Re: GY-86 not working - am I missing something?
It should work with an Uno instead of a Pro mini.
Your config seems OK.
Does you get some messages on Arduino serial terminal when the UNO is reset? (I presume you know how to open the serial terminal, select the COM port, set the baudrate on 112500.
Can you report the message you get.
Your config seems OK.
Does you get some messages on Arduino serial terminal when the UNO is reset? (I presume you know how to open the serial terminal, select the COM port, set the baudrate on 112500.
Can you report the message you get.
Re: GY-86 not working - am I missing something?
Hi,
The serial terminal opens ok either using the Arduino IDE tools tab serial monitor, or Ctrl + Shift + M, using the same Com Port as for the sketch upload, but I get get no output at all on the serial terminal!
(I have tried several serial terminal speeds including 115200).
Peter
The serial terminal opens ok either using the Arduino IDE tools tab serial monitor, or Ctrl + Shift + M, using the same Com Port as for the sketch upload, but I get get no output at all on the serial terminal!
(I have tried several serial terminal speeds including 115200).
Peter
Re: GY-86 not working - am I missing something?
Can you test the folowwing:
In the .ino file, there is the setup function which starts with
void setup(){
// set up the UART speed (38400 if GPS installed else 115200)
#ifdef GPS_INSTALLED
Serial.begin(38400); // when GPS is used, baudrate is reduced because main loop must have the time to read the received char.
#endif
#ifdef DEBUG
#ifndef GPS_INSTALLED
Serial.begin(115200L); // when GPS is not used, baudrate can be 115200
#endif
Serial.println(F("openXsensor starting.."));
Serial.print(F(" milli="));
Serial.println(millis());
Serial.print(F("freeRam="));
Serial.println(freeRam());
#endif
First I suggest that you add 1 line nearly at the end of this extract to be sure that the DEBUG option is active.
So having
Serial.println(F("openXsensor starting.."));
Serial.print(F(" milli="));
Serial.println(millis());
Serial.print(F("freeRam="));
Serial.println(freeRam());
#error DEBUG is activated
#endif
With this line added, you should get a compilation error with a message "DEBUG is activated"
It you get the compilation error, it is fine and you can go to the next test:
Remove then the line you just added (to avoid the compilation error) and replace it by a delay(5000)like this
Serial.println(F("openXsensor starting.."));
Serial.print(F(" milli="));
Serial.println(millis());
Serial.print(F("freeRam="));
Serial.println(freeRam());
delay(5000);
#endif
Adding this line should give enough time to the Uno to send some messages to the arduino terminal before going further on (and perhaps blocking)
This is just to be sure that the beginning of the program works and that the serial port is OK
In the .ino file, there is the setup function which starts with
void setup(){
// set up the UART speed (38400 if GPS installed else 115200)
#ifdef GPS_INSTALLED
Serial.begin(38400); // when GPS is used, baudrate is reduced because main loop must have the time to read the received char.
#endif
#ifdef DEBUG
#ifndef GPS_INSTALLED
Serial.begin(115200L); // when GPS is not used, baudrate can be 115200
#endif
Serial.println(F("openXsensor starting.."));
Serial.print(F(" milli="));
Serial.println(millis());
Serial.print(F("freeRam="));
Serial.println(freeRam());
#endif
First I suggest that you add 1 line nearly at the end of this extract to be sure that the DEBUG option is active.
So having
Serial.println(F("openXsensor starting.."));
Serial.print(F(" milli="));
Serial.println(millis());
Serial.print(F("freeRam="));
Serial.println(freeRam());
#error DEBUG is activated
#endif
With this line added, you should get a compilation error with a message "DEBUG is activated"
It you get the compilation error, it is fine and you can go to the next test:
Remove then the line you just added (to avoid the compilation error) and replace it by a delay(5000)like this
Serial.println(F("openXsensor starting.."));
Serial.print(F(" milli="));
Serial.println(millis());
Serial.print(F("freeRam="));
Serial.println(freeRam());
delay(5000);
#endif
Adding this line should give enough time to the Uno to send some messages to the arduino terminal before going further on (and perhaps blocking)
This is just to be sure that the beginning of the program works and that the serial port is OK
Re: GY-86 not working - am I missing something?
I have inserted the “#error DEBUG is activated” text at the location identified but get no compilation error & the sketch uploads ok.
I have also tried putting the same text in the GPS_INSTALLED ifdef section (34800 baud) & get the same result!
I have also tried putting the same text in the GPS_INSTALLED ifdef section (34800 baud) & get the same result!
Re: GY-86 not working - am I missing something?
So, it means that DEBUG option is not activated.
Normally, this option is activated automatically if you oXs_config_advanced.h file have this line uncommented
//#define DISPLAY_ACC_OFFSET
It was uncommented in the file you posted here above.
Was it still uncommented in the test you just made?
Normally, this option is activated automatically if you oXs_config_advanced.h file have this line uncommented
//#define DISPLAY_ACC_OFFSET
It was uncommented in the file you posted here above.
Was it still uncommented in the test you just made?
Re: GY-86 not working - am I missing something?
Yes, all IMU6050 lines are uncommented in the advanced config file
Re: GY-86 not working - am I missing something?
Mstrens,
I have just commented out the display offset instruction line, compiled & uploaded to the 3.3v Pro Mini.
I can discover all acc values, Alt & Vspeed on the Transmitter & values change when I re-orientate the sensor, so it seems that the problem is just with the calibration serial output.
I have just commented out the display offset instruction line, compiled & uploaded to the 3.3v Pro Mini.
I can discover all acc values, Alt & Vspeed on the Transmitter & values change when I re-orientate the sensor, so it seems that the problem is just with the calibration serial output.
Re: GY-86 not working - am I missing something?
Yes, I expect it is just with the serial output.
Serial output does not work because DEBUG option is not automatically activated.
It seems that the reason is that in your config advanced file you have this line
#include "oXs_config_macros.h"
This line does not exist anymore in the latest version I published on github (I moved it into several other files).
So there could be some inconsistency.
So, if you want to try the calibration process, I suggest that you download the latest version on github and manually edit the config file in this new version.
Changes in the new version have been done just in order to work properly with the configurator but not to the code for baro or IMU sensors.
Serial output does not work because DEBUG option is not automatically activated.
It seems that the reason is that in your config advanced file you have this line
#include "oXs_config_macros.h"
This line does not exist anymore in the latest version I published on github (I moved it into several other files).
So there could be some inconsistency.
So, if you want to try the calibration process, I suggest that you download the latest version on github and manually edit the config file in this new version.
Changes in the new version have been done just in order to work properly with the configurator but not to the code for baro or IMU sensors.
Re: GY-86 not working - am I missing something?
Many thanks,
downloading the latest version of OxS from github has resolved the problem & I now get a serial output.
I thought that I had used the version of oXs downloaded on only 21st Jan, but maybe not ....
Peter
downloading the latest version of OxS from github has resolved the problem & I now get a serial output.
I thought that I had used the version of oXs downloaded on only 21st Jan, but maybe not ....
Peter