GY-86 in oXs arduino pro mini 16MHz

Development & General Chat for the superb openxvario project.

Moderator: rainer

ChrisOhara
Posts: 25
Joined: Mon Feb 01, 2021 11:56 am
Country: Germany

Re: GY-86 in oXs arduino pro mini 16MHz

Post by ChrisOhara » Thu Aug 26, 2021 4:03 pm

Hi Nesan

Did a bit more thinking about the MPU-6050.
The fact that a test code can read raw data from the the MPS-6050 is no guarantee that the IMU and wiring is ok.

Reason: there is more than one option how the IMU can be setup.

One is to send a request to the IMU, every time you want fresh data.
In this mode the arduino has to wait till the IMU gets back with the data.
This will take some time (especially when there is also sleep mode active).
This mode makes no sense for an openXsensor application. It would cause tons of "sensor lost" warnings I think.

So the mode openXsensor uses is interrupt driven.
The IMU does work on its own parallel to the arduino (and does not got in sleep mode either)
Every time the IMU has filled the registers with new data it sends an interrupt to the arduino and then goes on calculation new data
and also filling its registers again and again. Each time sending one interrupt.
Meanwhile openXsensor does handle other sensors but every time the interrupt occurs it sets a trigger that the IMU has new data.
When openXsensor finally calls the function for the IMU it checks whether the trigger is set (means at least one interrupt has occured since last call).
If yes the newest data is read from registers of the IMU.
This mode does require a working interrupt line. Otherwise openXsensor will never read the registers of the IMU.

Regards ChrisOhara


nesan
Posts: 37
Joined: Thu Nov 09, 2017 2:05 am
Country: -

Re: GY-86 in oXs arduino pro mini 16MHz

Post by nesan » Tue Aug 31, 2021 2:36 pm

ChrisOhara wrote:
Thu Aug 26, 2021 4:03 pm
Hi Nesan

Did a bit more thinking about the MPU-6050.
The fact that a test code can read raw data from the the MPS-6050 is no guarantee that the IMU and wiring is ok.

Reason: there is more than one option how the IMU can be setup.

One is to send a request to the IMU, every time you want fresh data.
In this mode the arduino has to wait till the IMU gets back with the data.
This will take some time (especially when there is also sleep mode active).
This mode makes no sense for an openXsensor application. It would cause tons of "sensor lost" warnings I think.

So the mode openXsensor uses is interrupt driven.
The IMU does work on its own parallel to the arduino (and does not got in sleep mode either)
Every time the IMU has filled the registers with new data it sends an interrupt to the arduino and then goes on calculation new data
and also filling its registers again and again. Each time sending one interrupt.
Meanwhile openXsensor does handle other sensors but every time the interrupt occurs it sets a trigger that the IMU has new data.
When openXsensor finally calls the function for the IMU it checks whether the trigger is set (means at least one interrupt has occured since last call).
If yes the newest data is read from registers of the IMU.
This mode does require a working interrupt line. Otherwise openXsensor will never read the registers of the IMU.

Regards ChrisOhara

Hello ChrisOhara!
Thanks for sharing your knowledge and effort.
I am learning your points.
same time. some other pulling out from imu-6050 as you said these also not interrupt controlled stream; at least confirm imu working.
in my last post if I uncomment "IMU debug" and remove the usb and connect back within few second hit the monitor button the IMU initialize success. if delayed then it fail to initialize;
could I thing internal i2c go to sleep mode?
and another thing in my one another computer i2c scanner find all the three addresses 0x68 0x77 0x1E.
same software.
how do you thing of this is any voltage difference in usb connector??
regars
Nesan
Attachments
MPU all data.jpg
(412.68 KiB) Not downloaded yet
mpu angle.jpg
(383.53 KiB) Not downloaded yet
mpu ini succ.jpg
(335.44 KiB) Not downloaded yet

ChrisOhara
Posts: 25
Joined: Mon Feb 01, 2021 11:56 am
Country: Germany

Re: GY-86 in oXs arduino pro mini 16MHz

Post by ChrisOhara » Tue Aug 31, 2021 10:27 pm

Hi Nessan
my know how about I2C is also very limited.
But what I've read there is something like a "bricked" i2C bus if you mess around.

Have you tried the Zip File I've send you with the complete OpenxSensor (including my configuration for the GY86).
You should unzip it and try this complete "Arduino project" as it is without any modification.

regards ChrisOhara

nesan
Posts: 37
Joined: Thu Nov 09, 2017 2:05 am
Country: -

Re: GY-86 in oXs arduino pro mini 16MHz

Post by nesan » Wed Sep 01, 2021 6:29 pm

ChrisOhara wrote:
Tue Aug 31, 2021 10:27 pm
Hi Nessan
my know how about I2C is also very limited.
But what I've read there is something like a "bricked" i2C bus if you mess around.

Have you tried the Zip File I've send you with the complete OpenxSensor (including my configuration for the GY86).
You should unzip it and try this complete "Arduino project" as it is without any modification.

regards ChrisOhara
Hi ChrisOhara.
Ii did use your working openxssensor with out modify anything.
check this one of my pc get all three addresses.
I tested 4 different gy-86. 3 from aliexpress, one from amazon.ca one not initiating at all. other 3 same

regards Nesan
Attachments
i2c.jpg
(183.92 KiB) Not downloaded yet

ChrisOhara
Posts: 25
Joined: Mon Feb 01, 2021 11:56 am
Country: Germany

Re: GY-86 in oXs arduino pro mini 16MHz

Post by ChrisOhara » Tue Sep 07, 2021 6:51 am

Hi Nesan
At the moment I do have no really hot ideas.
You could check which Arduino IDE you have. (see my screenshot)
But I doubt that that's the cause of the problem.
May i ask which country you are from.
(You may send me one of the parts to test).
regards Chris
Screenshot 2021-09-07 084425.jpg
Screenshot 2021-09-07 084425.jpg (5.73 KiB) Viewed 99 times


nesan
Posts: 37
Joined: Thu Nov 09, 2017 2:05 am
Country: -

Re: GY-86 in oXs arduino pro mini 16MHz

Post by nesan » Tue Sep 07, 2021 5:27 pm

ChrisOhara wrote:
Tue Sep 07, 2021 6:51 am
Hi Nesan
At the moment I do have no really hot ideas.
You could check which Arduino IDE you have. (see my screenshot)
But I doubt that that's the cause of the problem.
May i ask which country you are from.
(You may send me one of the parts to test).
regards Chris

Screenshot 2021-09-07 084425.jpg
Hi Chris. I am from France now living in Canada. I can send you the the GY-86 let me know your address.
I test with uno, nano, mini.
Regards
nesan

ChrisOhara
Posts: 25
Joined: Mon Feb 01, 2021 11:56 am
Country: Germany

Re: GY-86 in oXs arduino pro mini 16MHz

Post by ChrisOhara » Wed Sep 08, 2021 11:17 am

Hi Nesan

I wrote you my address in a PM (private Message)
regards Chris


Post Reply

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