IMU6050 understanding

Development & General Chat for the superb openxvario project.

Moderator: rainer

Post Reply
User avatar
Wene001
Posts: 47
Joined: Wed Feb 01, 2012 11:05 pm
Country: -

IMU6050 understanding

Post by Wene001 » Sun May 01, 2016 7:26 pm

i have build an Openxsensor for testing IMU6050
made the calibration via serial monitor

#define ACCX_SOURCE PITCH gives me Acceleration on X axis (about 8,90 to -8,90)
#define ACCY_SOURCE ROLL gives me Acceleration on Z axis (about 8,90 to -8,90)
#define ACCZ_SOURCE YAW gives me yaw Angle (+180° to -180°)/10

my Taranis is on 2.1.7 (new telemetry)

is this correct?
is it possible to send Acceleration on z Axis to the taranis?
(would be interesting which acrobatic manouvers are hard for the model)
If i understand things right, then on the Arduino the Z_Acceleration is used for faster vario response in combination with ms5611.

Would be more intuitiv if ROLL and PITCH are name ACC_X and ACC_Y

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

Re: IMU6050 understanding

Post by mstrens » Mon May 02, 2016 8:20 am

Wene001 wrote: #define ACCX_SOURCE PITCH gives me Acceleration on X axis (about 8,90 to -8,90)
#define ACCY_SOURCE ROLL gives me Acceleration on Z axis (about 8,90 to -8,90)
#define ACCZ_SOURCE YAW gives me yaw Angle (+180° to -180°)/10

my Taranis is on 2.1.7 (new telemetry)

is this correct?
PITCH is not expected to be an acceleration. It should be the angle (+180 to -180) saying if nose is up or down.
ROLL is not expected to be an acceleration. It should be the angle (+180 to -180) saying your wing is inclined left or right.
So, PITCH, ROLL and YAW gives you the orientation of the plane regarding Earth.
The unit is 1/10 of degree. So the value should be from 1800 to -1800

Frsky protocol has no dedicated field in order to transmit PITCH,ROLL,YAW so oXs allows you to "misused" AccX, AccY and AccZ in order to get the data.
Wene001 wrote: is it possible to send Acceleration on z Axis to the taranis?
(would be interesting which acrobatic manouvers are hard for the model)
It should be possible but in fact we have 2 kinds of Z acceleration in oXs.
One is the "vertical" (regarding to Earth) acceleration and the other is the Z acceleration regarding the sensor it self.
When the plane makes a vertical loop both should be similar but if you are cycling horizontally they are quite différent.
With the scale factor used for the imu, the accelerations could be measured up to 4 g which is not very high for a RC plane.
Primaraly, use of a imu 6050 was intended to get faster vario response than with a ms5611 alone.
Wene001 wrote: If i understand things right, then on the Arduino the Z_Acceleration is used for faster vario response in combination with ms5611.
Yes. the "vertical" acceleration regarding Earth is used in combination with altitude provided by MS5611 to get faster vario response

User avatar
Wene001
Posts: 47
Joined: Wed Feb 01, 2012 11:05 pm
Country: -

Re: IMU6050 understanding

Post by Wene001 » Mon May 02, 2016 9:05 am

Thanks for clarifying. Will test more in the evening.
do you think we have enouph memory to have the options to send the Accelleration of the three sensor axis in G via AccX AccY and AccZ

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

Re: IMU6050 understanding

Post by mstrens » Mon May 02, 2016 11:55 am

Yes.
But again wich accelerations:
The raw values given by the sensor (so refering to the sensor orientation) or those refering to Earth (calculated in such a way that Z is vertical)

User avatar
Wene001
Posts: 47
Joined: Wed Feb 01, 2012 11:05 pm
Country: -

Re: IMU6050 understanding

Post by Wene001 » Mon May 02, 2016 12:55 pm

I think the (calibrated) sensor values would be fine.
At least for me.


maisky
Posts: 20
Joined: Sun Jan 08, 2017 5:22 pm
Country: -

Re: IMU6050 understanding

Post by maisky » Tue Mar 14, 2017 9:27 pm

Has anyone used the IMU with an Arduino pro mini 3.3V / 8Mhz?
I have tried it and no problems found.
But is the calculating speed high enough?

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

Re: IMU6050 understanding

Post by mstrens » Wed Mar 15, 2017 8:00 am

I did not test at 8mhz.
I expect that there would not be enough calculating speed if all (or nearly) all types of sensor (voltage, current, baro, airspeed, gps,..) are activated too.
Probably that it will be ok if you only activate one baro and imu.

Best is to test it. Eventually you could activate the DEBUG parameter and add a few lines of code to see the enlapsed time between 2 runs of the main loop and to check that Vspeed is calculated once every 20 ms.

If you just want to use the IMU in order to get roll and pitch, then some cpu time can be saved deactivating the Kalman filter used to calculated Vspeed.

Note: even if it is out of tolerance (too low voltage), it seems that some users use a 16mhz pro mini with a 1S lipo.

maisky
Posts: 20
Joined: Sun Jan 08, 2017 5:22 pm
Country: -

Re: IMU6050 understanding

Post by maisky » Wed Mar 15, 2017 10:24 pm

Ok I unterstand.
I will only use one baro and imu.
I will try to check the timing in the mainloop.
Thanks

Post Reply

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

Who is online

Users browsing this forum: No registered users and 1 guest