Problem with the IMU 6050 and OXS

Development & General Chat for the superb openxvario project.

Moderator: rainer

Post Reply
devil
Posts: 4
Joined: Fri Mar 24, 2017 11:29 am
Country: Germany

Problem with the IMU 6050 and OXS

Post by devil » Fri Mar 24, 2017 12:08 pm

Hello,
Right at the beginning I'm a novice with OXS and Arduino ... ;-)
My very special thanks to mstrens, great what you have created!
I find OXS absolutely great, it really offers a lot of possibilities.
If you understand it .... ;-)

Two problems with the IMU 6050

1. Issue
I have done the calibration of ACC X, Y, and Z as it is in the Config.H Described.
But no matter what values I enter at #define ACC_OFFSET_,
It does not change the transmitted values in the telemetry.
The sensor is flat on the table and is not moved.
The display in the Horus always shows ACCX = 0.04g, ACCY = -0.04g, ACCZ = -0.68g
ACCY and ACCX is OK but ACCZ should have 1.00g and not -0.68g or?
My FC and other sensors I have show 1,00g so synonymous.


2. Issue
If I now everything switched on, left on the desk,
The value of ACCZ changes by approx. 0.01g infinity every approx. 35-40 seconds.
The starting value is ACCZ = -0.68g after 40 sec. -0.69g after another 40 sec. -0.70 and so on.

Here is the start
IMG_1570.JPG
After 5 minutes
IMG_1571.JPG
After 10 minutes
IMG_1572.JPG
After 40 minutes
IMG_1573.JPG

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

Re: Problem with the IMU 6050 and OXS

Post by mstrens » Fri Mar 24, 2017 1:09 pm

I presume you are running the latest version available on github.
Could you explain how you proceeded to get AccX, Y and Z on your telemetry screen because there is no such options in the config.h.
So I am not sure what is displayed on the screen.
Did you use data TEST_1, 2,3 and uncommented some line in the .ino file (if so which line did you uncomment).

About the drift, can you also make a test without looking at the telemetry fields on the TX and using the arduino IDE terminal.
In the file oXs_config_description.h , it is explained in section 12 how to proceed to get the Acc offsets from the imu. You have to uncomment the line #define DISPLAY_ACC_OFFSET
Then the IDE terminal will display the raw acc values returned by the sensor. If you put oXs flat on a table and you let it runs for a long time (e.g 10 min), will you also see a drift of the values. Note : in this test 1g should be displayed as about 16384 .
Note : when oXs runs while connected to FTDI, it is safe not to connect it to the Rx or a battery to avoid having 2 power supply simultaniously.

devil
Posts: 4
Joined: Fri Mar 24, 2017 11:29 am
Country: Germany

Re: Problem with the IMU 6050 and OXS

Post by devil » Fri Mar 24, 2017 1:55 pm

mstrens wrote:
Fri Mar 24, 2017 1:09 pm

About the drift, can you also make a test without looking at the telemetry fields on the TX and using the arduino IDE terminal.
In the file oXs_config_description.h , it is explained in section 12 how to proceed to get the Acc offsets from the imu. You have to uncomment the line #define DISPLAY_ACC_OFFSET
Then the IDE terminal will display the raw acc values returned by the sensor. If you put oXs flat on a table and you let it runs for a long time (e.g 10 min), will you also see a drift of the values. Note : in this test 1g should be displayed as about 16384 .
Note : when oXs runs while connected to FTDI, it is safe not to connect it to the Rx or a battery to avoid having 2 power supply simultaniously.
I did the test in the arduino IDE terminal.
The values are stable and do not drift.
Here times the recorded values.
Serial Monitor 6050.xlsx
(15.61 KiB) Downloaded 9 times

Code: Select all

openXsensor starting..
 milli=0
freeRam=484
vario setting up..
vario is up..
AirSpeed Sensor:4525 I2C Addr=28
Set up 4525 done. I2C Error code= 0
 milli=2106
End of GPS setup
FRSky Output Module: TX Pin=4
Sport protocol= 1
End of general set up
acc 176 -111 15201
acc 178 -114 15205
acc 170 -108 15198
acc 172 -108 15201
acc 169 -112 15211
acc 167 -107 15210
acc 168 -111 15203
acc 169 -108 15204
acc 173 -113 15205
acc 172 -118 15205
acc 179 -111 15187
acc 175 -112 15194
acc 176 -111 15199
acc 171 -108 15209
acc 168 -115 15208
acc 169 -112 15205
acc 173 -108 15208
acc 172 -107 15205
acc 170 -115 15202
acc 173 -113 15213
acc 178 -114 15210
acc 172 -111 15204
acc 175 -110 15203
acc 175 -117 15198
acc 173 -107 15209
acc 174 -106 15209
acc 172 -107 15204
acc 168 -111 15206
acc 172 -115 15200
acc 173 -112 15199
acc 171 -108 15204
acc 172 -112 15197
acc 180 -109 15199
acc 176 -109 15202
acc 174 -110 15192
acc 169 -112 15208
acc 173 -109 15206
acc 172 -115 15201
acc 169 -105 15212
acc 169 -110 15210
acc 181 -110 15196
acc 180 -116 15198
acc 178 -111 15205
acc 183 -118 15201
acc 177 -117 15209
acc 170 -118 15196
acc 173 -115 15203
acc 173 -115 15198
acc 178 -112 15203
acc 173 -113 15198
acc 175 -109 15195
acc 171 -112 15197
acc 178 -112 15206
acc 181 -106 15209
acc 173 -112 15200
acc 182 -113 15207
acc 178 -114 15200
acc 177 -113 15209
acc 175 -110 15197
acc 177 -110 15202
acc 178 -112 15196
acc 173 -116 15202
acc 179 -111 15198
acc 176 -111 15194
acc 180 -112 15195
acc 180 -110 15201
acc 177 -113 15203
acc 175 -109 15209
acc 172 -112 15200
acc 173 -109 15211
acc 174 -117 15202
acc 175 -113 15206
acc 173 -109 15198
acc 177 -110 15194
acc 173 -109 15202
acc 176 -113 15197
acc 174 -110 15190
acc 178 -111 15193
acc 181 -111 15196
acc 173 -113 15208
acc 175 -105 15198
acc 180 -115 15203
acc 174 -111 15205
acc 180 -109 15201
acc 179 -113 15204
acc 179 -109 15190
acc 171 -110 15196
acc 182 -109 15199
acc 174 -113 15202
acc 170 -112 15205
acc 170 -112 15211
acc 175 -110 15206
acc 179 -110 15200
acc 176 -118 15194
acc 179 -110 15202
acc 173 -110 15190
acc 178 -116 15199
acc 171 -110 15192
acc 180 -115 15205
acc 177 -114 15203
acc 179 -115 15199
acc 175 -110 15203
acc 176 -114 15194
acc 178 -112 15200
acc 175 -111 15207
acc 174 -111 15211
acc 173 -112 15209
acc 174 -114 15200
acc 176 -111 15202
acc 176 -109 15200
acc 175 -113 15206
acc 174 -112 15203
acc 174 -118 15204
acc 173 -113 15202
acc 178 -111 15204
acc 174 -110 15200
acc 176 -112 15192
acc 183 -118 15193
acc 175 -109 15199
acc 182 -111 15198
acc 176 -114 15199
acc 180 -115 15203
acc 178 -120 15196
acc 180 -115 15195
acc 176 -110 15204
acc 177 -116 15200
acc 173 -112 15197
acc 179 -111 15197
acc 174 -111 15200
acc 175 -113 15205
acc 171 -114 15200
acc 174 -112 15209
acc 177 -112 15207
acc 176 -119 15206
acc 170 -112 15196
acc 174 -113 15198
acc 169 -110 15210
acc 173 -115 15204
acc 179 -113 15193
acc 175 -115 15195
acc 177 -113 15203
acc 180 -110 15201
acc 176 -114 15203
acc 173 -114 15201
acc 177 -112 15196
acc 178 -105 15200
acc 181 -117 15202
acc 173 -110 15208
acc 178 -113 15205
acc 172 -110 15203
acc 180 -112 15202
acc 172 -106 15201
acc 174 -111 15207
acc 175 -115 15202
acc 176 -113 15197
acc 178 -112 15197
acc 178 -112 15207
acc 178 -115 15207
acc 180 -104 15194
acc 177 -106 15203
acc 180 -110 15208
acc 173 -108 15203
acc 176 -109 15196
acc 183 -110 15193
acc 171 -112 15204
acc 176 -105 15207
acc 174 -117 15210
acc 174 -115 15203
acc 179 -112 15212
acc 177 -108 15208
acc 172 -113 15203
acc 181 -108 15202
acc 173 -115 15198
acc 181 -109 15209
acc 184 -116 15208
acc 179 -114 15201
acc 174 -116 15202
acc 174 -113 15199
acc 175 -114 15196
acc 174 -111 15206
acc 179 -115 15188
acc 175 -116 15186
acc 178 -112 15191
acc 174 -117 15213
acc 173 -115 15202
acc 174 -112 15206
acc 171 -115 15203
acc 175 -105 15200
acc 175 -108 15211
acc 172 -110 15202
acc 176 -117 15203
acc 175 -115 15207
acc 177 -115 15208
acc 175 -107 15206
acc 178 -111 15205
acc 173 -117 15211
acc 171 -107 15201
acc 167 -109 15193
acc 175 -111 15196
acc 176 -113 15194
acc 173 -109 15196
acc 174 -117 15211
acc 174 -111 15200
acc 173 -113 15194
acc 175 -110 15194
acc 173 -109 15203
acc 174 -114 15207
acc 172 -109 15205
acc 174 -116 15199
acc 178 -110 15202
acc 182 -112 15192
acc 178 -110 15198
acc 174 -114 15201
acc 177 -113 15212
acc 174 -115 15204
acc 176 -108 15210
acc 180 -113 15215
acc 181 -117 15199
acc 178 -106 15208
acc 180 -108 15202
acc 177 -109 15196
acc 173 -113 15207
acc 176 -115 15206
acc 164 -116 15203
acc 174 -109 15197
acc 175 -110 15203
acc 176 -111 15195
acc 174 -115 15205
acc 176 -113 15201
acc 175 -112 15199
acc 178 -110 15194
acc 173 -111 15197
acc 180 -116 15205
acc 170 -111 15199
acc 175 -113 15209
acc 180 -113 15199
acc 173 -109 15203
acc 176 -112 15202
acc 176 -104 15195
acc 178 -111 15203
acc 172 -118 15199
acc 179 -106 15202
acc 175 -115 15207
acc 179 -118 15198
acc 179 -112 15212
acc 171 -111 15204
acc 175 -116 15195
acc 171 -112 15193
acc 175 -114 15202
acc 174 -113 15185
acc 172 -113 15196
acc 173 -114 15199
acc 177 -113 15192
acc 171 -108 15204
acc 174 -111 15197
acc 171 -110 15200
acc 169 -110 15205
acc 173 -114 15199
acc 174 -111 15209
acc 179 -111 15198
acc 169 -110 15205
acc 177 -112 15203
acc 175 -116 15203
acc 175 -115 15199
acc 178 -113 15196
acc 183 -109 15200
acc 178 -109 15185
acc 174 -116 15190
acc 176 -115 15202
acc 174 -116 15203
acc 182 -112 15202
acc 180 -119 15213
acc 172 -116 15209
acc 175 -111 15203
acc 172 -109 15200
acc 174 -109 15192
acc 178 -110 15204
acc 174 -113 15205
acc 178 -109 15192
acc 168 -109 15202
acc 175 -107 15196
acc 173 -111 15192
acc 177 -111 15203
acc 170 -114 15201
acc 170 -115 15207
acc 179 -110 15202
acc 175 -112 15210
acc 177 -111 15210
acc 176 -114 15209
acc 176 -110 15212
acc 184 -112 15196
acc 180 -110 15206
acc 177 -110 15210
acc 171 -109 15201
acc 180 -107 15207
acc 174 -103 15203
acc 180 -113 15209
acc 177 -114 15195
acc 176 -113 15209
acc 176 -110 15197
acc 174 -114 15199
acc 179 -115 15195
acc 181 -110 15190
acc 177 -112 15191
acc 169 -118 15195
acc 179 -115 15207
acc 173 -110 15207
acc 179 -111 15204
acc 175 -113 15206
acc 180 -110 15205
acc 176 -106 15202
acc 177 -111 15199
acc 177 -115 15206
acc 175 -116 15205
acc 170 -110 15206
acc 174 -116 15200
acc 180 -108 15198
acc 175 -112 15197
acc 177 -110 15204
acc 172 -111 15195
acc 168 -112 15206
acc 177 -114 15204
acc 174 -111 15212
acc 174 -112 15209
acc 179 -111 15196
acc 170 -111 15197
acc 178 -116 15199
acc 174 -115 15201
acc 176 -117 15195
acc 172 -108 15212
acc 173 -112 15213
acc 178 -108 15208
acc 175 -115 15207
acc 177 -111 15194
acc 173 -107 15202
acc 179 -112 15206
acc 173 -109 15201
acc 178 -110 15210
acc 173 -112 15198
acc 180 -114 15194
acc 172 -109 15196
acc 171 -114 15204
acc 170 -112 15204
acc 170 -114 15208
acc 172 -112 15199
acc 170 -109 15207
acc 173 -115 15190
acc 174 -109 15196
acc 173 -112 15205
acc 176 -111 15206
acc 174 -110 15207
acc 176 -111 15205
acc 170 -109 15193
acc 173 -114 15209
acc 173 -113 15201
acc 174 -117 15200
acc 168 -111 15193
acc 168 -109 15201
acc 171 -106 15199
acc 169 -112 15211
acc 168 -109 15193
acc 171 -114 15195
acc 181 -112 15203
acc 176 -109 15200
acc 169 -112 15210
acc 176 -112 15202
acc 174 -113 15205
acc 173 -109 15204
acc 176 -114 15203
acc 173 -103 15203
acc 178 -107 15190
acc 173 -114 15208
acc 174 -106 15202
acc 177 -112 15204
acc 171 -112 15208
acc 175 -112 15190
acc 175 -116 15197
acc 171 -115 15198
acc 175 -109 15204
acc 177 -113 15209
acc 175 -112 15197
acc 176 -108 15203
acc 172 -111 15209
acc 173 -111 15209
acc 171 -108 15199
acc 173 -108 15196
acc 176 -115 15195
acc 170 -109 15196
acc 174 -111 15209
acc 167 -112 15207
acc 178 -113 15204
acc 176 -120 15214
acc 173 -113 15191
acc 170 -112 15212
acc 171 -108 15208
acc 171 -111 15197
acc 176 -114 15198
acc 178 -114 15207
acc 171 -109 15201
acc 174 -110 15203
acc 174 -110 15202
acc 169 -108 15202
acc 163 -107 15210
acc 163 -112 15190
acc 167 -110 15207
acc 168 -100 15204
acc 158 -109 15209
acc 170 -108 15209
acc 163 -106 15203
acc 171 -109 15201
acc 169 -103 15203
acc 172 -111 15201
acc 165 -103 15202
acc 167 -109 15198
acc 168 -108 15203
acc 163 -117 15202
acc 167 -108 15208
acc 164 -111 15209
acc 169 -106 15194
acc 166 -108 15197
acc 166 -112 15197
acc 169 -105 15203
acc 167 -112 15193
acc 168 -106 15200
acc 164 -109 15194
acc 170 -105 15205
acc 165 -109 15196
acc 166 -109 15204
acc 165 -104 15197
acc 164 -108 15194
acc 173 -109 15201
acc 166 -113 15198
acc 165 -107 15204
acc 166 -107 15208
acc 169 -109 15198
acc 162 -104 15203
acc 165 -106 15199
acc 174 -105 15202
acc 164 -104 15207
acc 170 -102 15201
acc 171 -114 15197
acc 168 -108 15192
acc 166 -105 15208
acc 170 -105 15208
acc 175 -107 15204
acc 166 -112 15203
acc 167 -109 15206
acc 164 -110 15195
acc 163 -107 15210
acc 169 -106 15208
acc 168 -108 15206
acc 164 -108 15211
acc 164 -111 15207
acc 173 -108 15211
acc 174 -110 15218
acc 168 -105 15210
acc 176 -106 15189
acc 168 -108 15205
acc 168 -111 15208
acc 166 -106 15202
acc 158 -111 15199
acc 168 -105 15206
acc 171 -106 15207
acc 166 -107 15197
acc 170 -102 15206
acc 164 -110 15204
acc 171 -108 15212
acc 163 -107 15211
acc 169 -112 15202
acc 164 -108 15209
acc 171 -106 15201
acc 165 -111 15203
acc 169 -107 15209
acc 159 -104 15206
acc 170 -108 15207
acc 168 -111 15192
acc 165 -111 15197
acc 172 -108 15187
acc 166 -114 15201
acc 167 -109 15199
acc 169 -114 15203
acc 166 -105 15207
acc 163 -110 15214
acc 171 -104 15198
acc 168 -107 15189
acc 166 -102 15197
acc 171 -109 15199
acc 168 -109 15206
acc 166 -107 15202
acc 171 -103 15196
acc 162 -103 15202
acc 164 -107 15201
acc 168 -103 15195
acc 172 -109 15199
acc 163 -108 15203
acc 163 -102 15195
acc 162 -106 15197
acc 166 -111 15203
acc 166 -109 15193
acc 166 -112 15202
acc 174 -110 15197
acc 167 -109 15199
acc 165 -111 15201
acc 168 -104 15201
acc 167 -106 15191
acc 168 -100 15204
acc 167 -103 15184
acc 170 -108 15201
acc 169 -106 15198
acc 166 -106 15199
acc 166 -108 15200
acc 169 -110 15193
acc 166 -104 15212
acc 164 -109 15202
acc 161 -108 15201
acc 166 -100 15205
acc 163 -109 15209
acc 169 -108 15194
acc 166 -105 15202
acc 178 -108 15196
acc 174 -108 15199
acc 165 -106 15199
acc 171 -104 15199
acc 170 -108 15202
acc 173 -111 15201
acc 168 -107 15207
acc 169 -106 15210
acc 157 -106 15209
acc 163 -108 15204
acc 172 -110 15206
acc 164 -113 15206
acc 168 -111 15202
acc 166 -103 15212
acc 163 -115 15200
acc 171 -114 15204
acc 168 -109 15208
acc 171 -116 15205
acc 166 -104 15194
acc 165 -101 15205
acc 170 -102 15203
acc 169 -113 15203
acc 166 -108 15212
acc 169 -106 15193
acc 162 -119 15199
acc 170 -102 15195
acc 159 -102 15191
acc 168 -112 15206
acc 166 -101 15196
acc 161 -111 15210
acc 163 -108 15196
acc 165 -101 15198
acc 171 -109 15213
acc 167 -109 15207
acc 171 -101 15199
acc 169 -112 15212
acc 168 -102 15197
acc 159 -107 15204
acc 161 -103 15214
acc 162 -103 15202
acc 166 -106 15200
acc 165 -103 15204
acc 166 -104 15205
acc 168 -105 15196
acc 165 -108 15202
acc 167 -108 15204
acc 166 -107 15203
acc 163 -105 15199
acc 165 -107 15204
acc 167 -104 15204
acc 164 -112 15199
acc 165 -106 15209
acc 170 -106 15203
acc 158 -108 15205
acc 160 -111 15207
acc 164 -107 15194
acc 163 -106 15195
acc 165 -111 15199
acc 164 -101 15205
acc 163 -108 15209
acc 165 -109 15203
acc 172 -105 15182
acc 166 -106 15209
acc 169 -107 15194
acc 173 -107 15208
acc 171 -111 15201
acc 165 -108 15206
acc 163 -101 15197
acc 169 -111 15197
acc 171 -114 15202
acc 166 -110 15210
acc 174 -114 15204
acc 168 -110 15199
acc 174 -106 15195
acc 167 -105 15212
acc 171 -110 15201
acc 167 -108 15204
acc 168 -106 15204
acc 167 -107 15198
acc 173 -106 15190
acc 166 -109 15205
acc 162 -113 15195
acc 173 -111 15199
acc 166 -110 15195
acc 168 -110 15199
acc 174 -105 15205
acc 167 -112 15220
acc 169 -107 15215
acc 167 -107 15196
acc 170 -109 15206
acc 171 -114 15198
acc 173 -103 15191
acc 170 -106 15215
acc 166 -111 15203
acc 169 -110 15198
acc 166 -104 15197
acc 166 -106 15200
acc 164 -106 15193
acc 167 -110 15200
acc 167 -106 15204
acc 177 -107 15198
acc 170 -109 15203
acc 168 -104 15209
acc 166 -112 15198
acc 166 -110 15203
acc 172 -106 15203
acc 171 -105 15201
acc 172 -110 15190
acc 170 -109 15213
acc 169 -115 15204
acc 171 -108 15204
acc 172 -113 15188
acc 162 -112 15200
acc 163 -107 15202
acc 166 -107 15190
acc 166 -105 15201
acc 167 -109 15193
acc 173 -101 15201
acc 170 -108 15195
acc 170 -108 15202
acc 172 -108 15202
acc 165 -109 15212
acc 161 -109 15205
acc 167 -106 15197
acc 171 -114 15201
acc 164 -109 15217
acc 170 -109 15188
acc 169 -113 15202
acc 164 -113 15207
acc 164 -111 15200
acc 158 -105 15198
acc 161 -110 15202
acc 164 -101 15198
acc 167 -112 15200
acc 160 -106 15202
acc 162 -103 15193
acc 164 -106 15202
acc 159 -108 15205
acc 163 -106 15200
acc 161 -106 15200
acc 159 -114 15206
acc 164 -111 15200
acc 163 -105 15203
acc 163 -106 15209
acc 170 -107 15202
acc 163 -108 15206
acc 162 -105 15207
acc 164 -107 15209
acc 159 -104 15195
acc 163 -109 15213
acc 164 -106 15198
acc 160 -112 15208
acc 165 -107 15200
acc 159 -107 15200
acc 166 -102 15199
acc 161 -108 15200
acc 168 -108 15209
acc 167 -112 15201
acc 168 -106 15201
acc 162 -105 15205
acc 163 -104 15201
acc 164 -110 15214
acc 159 -112 15195
acc 165 -103 15203
acc 162 -102 15193
acc 164 -106 15207
acc 168 -103 15198
acc 161 -108 15202
acc 166 -104 15187
acc 164 -112 15208
acc 165 -112 15200
acc 164 -108 15198
acc 170 -103 15197
acc 159 -111 15204
acc 170 -105 15206
acc 162 -106 15200
acc 166 -103 15201
acc 163 -111 15209
acc 160 -107 15206
acc 156 -107 15195
acc 165 -103 15202
acc 161 -106 15197
acc 163 -107 15200
acc 164 -102 15193
acc 158 -105 15202
acc 157 -101 15188
acc 165 -107 15200
acc 159 -108 15202
acc 160 -110 15200
acc 162 -105 15203
acc 164 -103 15200
acc 156 -107 15201
acc 160 -104 15208
acc 163 -106 15192
acc 161 -110 15200
acc 165 -110 15204
acc 161 -99 15206
acc 166 -106 15198
acc 167 -108 15196
acc 161 -104 15200
acc 164 -107 15205
acc 158 -111 15202
acc 167 -108 15203
acc 161 -108 15207
acc 162 -110 15200
acc 162 -105 15204
acc 165 -113 15196
acc 162 -111 15200
acc 163 -104 15199
acc 158 -103 15200
acc 161 -106 15210
acc 161 -102 15201
acc 168 -106 15202
acc 165 -103 15208
acc 168 -102 15206
acc 160 -108 15207
acc 165 -108 15201
acc 165 -104 15206
acc 163 -107 15211
acc 161 -107 15199
acc 163 -106 15196
acc 162 -109 15211
acc 164 -109 15199
acc 165 -112 15200
acc 164 -106 15206
acc 157 -108 15207
acc 160 -103 15197
acc 163 -108 15200
acc 159 -110 15198
acc 167 -105 15201
acc 164 -110 15199
acc 161 -105 15205
acc 168 -107 15202
acc 162 -104 15195
acc 161 -106 15204
acc 162 -111 15203
acc 162 -110 15200
acc 169 -104 15200
acc 166 -107 15203
acc 161 -109 15198
acc 163 -105 15201
acc 164 -106 15196
acc 166 -108 15201
acc 163 -100 15200
acc 166 -112 15199
acc 158 -106 15200
acc 162 -105 15203
acc 166 -109 15198
acc 168 -106 15196
acc 160 -106 15199
acc 164 -101 15191
acc 163 -108 15204
acc 164 -104 15205
acc 167 -107 15198
acc 162 -109 15208
acc 166 -111 15200
acc 162 -111 15193
acc 164 -108 15200
acc 165 -108 15196
acc 160 -107 15200
acc 164 -108 15205
acc 170 -107 15199
acc 163 -110 15202
acc 163 -107 15200
acc 164 -104 15200
acc 160 -105 15201
acc 166 -107 15203
acc 166 -106 15207
acc 157 -102 15199
acc 161 -103 15206
acc 165 -109 15200
acc 156 -105 15196
acc 164 -109 15203
acc 161 -100 15212
acc 163 -105 15199
acc 165 -102 15210
acc 166 -106 15205
acc 155 -107 15202
acc 163 -110 15205
acc 173 -105 15196
acc 167 -112 15203
acc 161 -108 15207
acc 170 -107 15204
acc 164 -108 15193
acc 162 -102 15198
acc 164 -110 15209
acc 163 -108 15208
acc 168 -107 15206
acc 168 -108 15196
acc 164 -102 15197
acc 161 -105 15211
acc 159 -105 15207
acc 168 -106 15213
acc 162 -101 15206
acc 164 -107 15210
acc 162 -104 15203
acc 157 -106 15205
acc 155 -108 15208
acc 159 -107 15198
acc 168 -103 15216
acc 162 -99 15212
acc 159 -114 15212
acc 156 -105 15209
acc 162 -109 15207
acc 169 -108 15197
acc 165 -109 15202
acc 163 -107 15198
acc 163 -111 15208
acc 163 -105 15201
acc 163 -113 15208
acc 164 -106 15206
acc 169 -107 15202
acc 165 -104 15203
acc 158 -107 15199
acc 163 -105 15198
acc 166 -104 15210
acc 161 -111 15217
acc 170 -114 15195
acc 162 -112 15205
acc 158 -103 15206
acc 170 -109 15208
acc 164 -110 15209
acc 161 -111 15203
acc 169 -108 15204
acc 165 -109 15213
acc 160 -110 15210
acc 164 -104 15193
acc 163 -104 15201
acc 166 -106 15202
acc 164 -101 15205
acc 163 -105 15206
acc 161 -105 15215
acc 160 -103 15207
acc 171 -106 15199
acc 159 -106 15199
acc 170 -108 15189
acc 164 -109 15201
acc 161 -107 15201
acc 166 -111 15208
acc 167 -109 15206
acc 161 -105 15191
acc 161 -100 15201
acc 167 -110 15196
acc 164 -108 15196
acc 161 -109 15200
acc 157 -109 15215
acc 154 -105 15198
acc 160 -111 15205
acc 160 -112 15202
acc 163 -103 15209
acc 161 -107 15211
acc 162 -102 15200
acc 167 -115 15198
acc 171 -105 15207
acc 169 -106 15207
acc 168 -103 15201
acc 163 -110 15196
acc 166 -111 15199
acc 166 -107 15200
acc 165 -110 15191
acc 165 -109 15212
acc 169 -106 15219
acc 162 -108 15204
acc 165 -105 15196
acc 164 -108 15195
acc 162 -102 15205
acc 168 -107 15203
acc 168 -106 15204
acc 161 -114 15202
acc 161 -108 15201
acc 160 -99 15200
acc 164 -108 15205
acc 168 -105 15199
acc 165 -109 15197
acc 171 -107 15198
acc 167 -108 15211
acc 170 -109 15195
acc 161 -105 15213
acc 166 -101 15210
acc 164 -105 15208
acc 167 -105 15211
acc 167 -106 15211
acc 166 -101 15193
acc 162 -100 15201
acc 166 -111 15205
acc 170 -105 15200
acc 169 -107 15201
acc 166 -109 15205
acc 165 -104 15204
acc 165 -109 15201
acc 159 -108 15204
acc 164 -107 15208
acc 162 -100 15206
acc 156 -109 15198
acc 164 -106 15211
acc 162 -104 15206
acc 164 -105 15197
acc 168 -104 15204
acc 162 -103 15200
acc 165 -110 15208
acc 161 -106 15196
acc 163 -107 15201
acc 164 -105 15205
acc 166 -104 15201
acc 160 -102 15199
acc 167 -105 15202
acc 163 -105 15207
acc 164 -107 15195
acc 160 -110 15210
acc 166 -106 15197
acc 163 -105 15204
acc 161 -108 15207
acc 160 -102 15203
acc 157 -110 15203
acc 165 -105 15200
acc 166 -107 15202
acc 159 -109 15200
acc 165 -112 15202
acc 164 -109 15200
acc 164 -104 15198
acc 166 -107 15190
acc 166 -109 15215
acc 165 -99 15209
acc 168 -111 15201
acc 161 -109 15204
acc 171 -115 15206
acc 165 -109 15206
acc 167 -109 15199
acc 165 -108 15203
acc 163 -114 15199
acc 167 -104 15202
acc 164 -107 15199
acc 162 -112 15202
acc 160 -107 15200
acc 162 -111 15206
acc 161 -109 15204
acc 156 -106 15201
acc 165 -109 15205
acc 168 -113 15200
acc 168 -106 15212
acc 171 -107 15209
acc 166 -110 15202
acc 172 -108 15204
acc 176 -106 15204
acc 161 -111 15207
acc 160 -101 15205
acc 161 -111 15203
acc 165 -104 15198
acc 161 -110 15205
acc 164 -106 15203
acc 168 -107 15197
acc 161 -111 15207
acc 164 -107 15188
acc 170 -108 15197
acc 162 -101 15203
acc 168 -106 15203
acc 163 -104 15206
acc 165 -109 15203
acc 168 -109 15206
acc 164 -110 15211
acc 162 -108 15200
acc 166 -113 15205
acc 168 -107 15208
acc 167 -106 15205
acc 161 -112 15199
acc 169 -110 15206
acc 164 -111 15198
acc 167 -113 15199
acc 170 -108 15215
acc 170 -104 15213
acc 165 -109 15204
acc 155 -106 15207
acc 162 -112 15204
acc 163 -110 15200
acc 165 -109 15205
acc 169 -104 15207
acc 165 -109 15202
acc 163 -108 15208
acc 165 -107 15194
acc 167 -104 15199
acc 163 -104 15196
acc 166 -107 15202
acc 167 -106 15209
acc 172 -104 15208
acc 163 -107 15209
acc 168 -109 15200
acc 165 -109 15204
acc 160 -111 15209
acc 164 -110 15202
acc 162 -108 15207
acc 165 -106 15205
acc 168 -110 15209
acc 162 -107 15210
acc 162 -105 15201
acc 168 -109 15207
acc 163 -104 15193
acc 157 -105 15201
acc 166 -108 15201
acc 163 -105 15210
acc 163 -104 15202
acc 165 -105 15212
acc 159 -107 15207
acc 159 -107 15218
acc 164 -111 15207
acc 164 -107 15204
acc 167 -108 15208
acc 161 -112 15203
acc 161 -103 15194
acc 165 -109 15202
acc 164 -111 15206
acc 163 -102 15206
acc 165 -108 15193
acc 163 -103 15203
acc 161 -104 15203
acc 161 -99 15209
acc 166 -104 15197
acc 168 -112 15207
acc 166 -102 15203
acc 166 -106 15192
acc 165 -108 15200
acc 159 -104 15201
acc 164 -101 15206
acc 164 -105 15209
acc 161 -108 15203
acc 165 -105 15203
acc 161 -107 15209
acc 162 -104 15189
acc 163 -100 15199
acc 170 -109 15199
acc 166 -104 15208
acc 168 -104 15207
acc 170 -107 15206
acc 162 -108 15197
acc 164 -107 15198
acc 172 -106 15203
acc 163 -105 15215
acc 162 -104 15208
acc 170 -106 15210
acc 170 -109 15206
acc 165 -104 15199
acc 163 -108 15199
acc 170 -100 15203
acc 162 -107 15197
acc 163 -110 15212
acc 161 -105 15199
acc 168 -103 15204
acc 162 -106 15197
acc 169 -103 15204
acc 158 -105 15200
acc 165 -109 15201
acc 170 -111 15194
acc 164 -107 15206
acc 162 -110 15203
acc 170 -104 15205
acc 161 -105 15203
acc 164 -103 15205
acc 164 -108 15205
acc 164 -106 15212
acc 161 -107 15204
acc 160 -109 15207
acc 166 -110 15204
acc 167 -105 15197
acc 165 -104 15191
acc 168 -102 15211
acc 162 -107 15194
acc 166 -109 15204
acc 158 -109 15208
acc 160 -105 15191
acc 170 -99 15207
acc 166 -106 15201
acc 164 -116 15194
acc 164 -106 15204
acc 164 -97 15196
acc 167 -107 15199
acc 166 -103 15203
acc 163 -111 15200
acc 169 -110 15199
acc 168 -110 15209
acc 161 -108 15206
acc 160 -112 15205
acc 163 -99 15205
acc 159 -106 15215
acc 161 -114 15210
acc 164 -111 15211
acc 163 -110 15200
acc 164 -104 15201
acc 163 -108 15201
acc 168 -110 15203
acc 160 -110 15200
acc 167 -107 15208
acc 160 -114 15202
acc 160 -104 15204
acc 165 -109 15203
acc 166 -113 15206
acc 167 -102 15214
acc 161 -103 15205
acc 162 -105 15204
acc 162 -109 15209
acc 164 -107 15195
acc 164 -105 15207
acc 163 -113 15203
acc 161 -104 15198
acc 167 -106 15192
acc 169 -109 15193
acc 164 -108 15214
acc 170 -109 15205
acc 170 -106 15200
acc 163 -112 15204
acc 156 -106 15212

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

Re: Problem with the IMU 6050 and OXS

Post by mstrens » Fri Mar 24, 2017 4:57 pm

The values seems ok.
There is no drift of raw values of Acc given by the imu.

Please answer the first part of my post in order to try to understand what happens
"I presume you are running the latest version available on github.
Could you explain how you proceeded to get AccX, Y and Z on your telemetry screen because there is no such options in the config.h.
So I am not sure what is displayed on the screen.
Did you use data TEST_1, 2,3 and uncommented some line in the .ino file (if so which line did you uncomment)."
Best to send me your config.h file

devil
Posts: 4
Joined: Fri Mar 24, 2017 11:29 am
Country: Germany

Re: Problem with the IMU 6050 and OXS

Post by devil » Fri Mar 24, 2017 6:54 pm

To understand better what I have done.

Here is my setup:

RX Frsky

Arduino Pro mini, Nano and Uno for Test
OXS V7
Sensors: GY-86 with MS 5611 and IMU 6050, GPS M8N, Airspeed 4225DO.

The transmitted values are: VSPD, ALT from 5611, ACC X, Y, Z from the IMU 6050, : Airspeed from 4225DO , GPS: Position, HDG, GALT, GSPD,
SAT (number of satellites),  HDOP (quality GPS position) With number of satellites and HDOP quality GPS position but I had help from another forum (User Stoschek in the FPV forum)  I am unfortunately missing the knowledge to do this myself.
Sat.JPG
sat1.JPG
transmit.JPG
The V8 with my values I do not get to run :(


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

Re: Problem with the IMU 6050 and OXS

Post by mstrens » Fri Mar 24, 2017 7:33 pm

I understand your issue with AccX Y and Z.

In fact oXs does not transmit the accelerations provided by the IMU because it was not considered as usefull data.
In place of giving accelerations, oXs "misused" (or reused) the fields AccX, Y and Z in order to transmit (optionnaly) other data that were not foreseen by Frsky.
Some of the data that can be transmitted are Pitch, Roll and Yaw. Those data where asked by a user in order to get an artificial horizon.

Your config just ask for those data in lines
#define ACCX_SOURCE PITCH
#define ACCY_SOURCE ROLL
#define ACCZ_SOURCE YAW

So the data that you see on your Tx are not accelerations but angles (that are calculated by oXs based on the gyros from the imu).
All gyros are quite accurate to measure the speed of rotation but not so good to measure angles because there heve some drift).
Pitch and Roll should be quite accurate because there is some algorithm running in the IMU that realign those 2 angles looking at the data provided by the accelerometers. It assumes that on a long term the only acceleration is the vertical gravity.
Still for Yaw, it is not possible to realign it knowing the vertical direction.
That is the reason why the IMU contains also a magnetometer chip that could realign Yaw based on North.
oXs does not use the magnetometer and so it is not abnormal that Yaw has some drift.
The user that asked me to transmit Yaw accept it.

oXs allows to transmit some accelerations but currently this requires to edit also the ino file (and not only the oXs_config.h file).
In the ino file (at least in V8), there is a line
//#define SEND_LINEAR_ACC
When uncommented the "linear" accelerations are copied in TEST_1, TEST_2 and TEST_3 and if your config file says that TEST_1, 2, 3 have to be transmited as AccX, Y and Z you will get accelerations on the Tx.
Still please note that you can not use the same oXs field (e.g TEST_1) for 2 purposes. In your case, you already uses it to transmit some GPS data.

I hope this is clear enough.
If not, do not hesitate to ask.

devil
Posts: 4
Joined: Fri Mar 24, 2017 11:29 am
Country: Germany

Re: Problem with the IMU 6050 and OXS

Post by devil » Fri Mar 24, 2017 8:13 pm

First times thank you for the quick explanation.

Sorry for my many questions ...

OK,
So what I have understood so far, the IMU transmits in OXS V7 some angles and in the V8 it is possible to change in acceleration when linear is switched on. As far as clear.

What I still do not understand yet ...
There will be angles as far as ok, but the sensor is flat on the table and the value changes with time, here it is I think no matter whether it is an angle or a force, But that should not be nevertheless ?


Point two I do not understand,
Why did the calibration of the IMU data has no effect on the transferred values?
If I now have these values from the serial monitor acc 169 -108 15204
In the Config.h, absolutely nothing changes at the output values.

#define USE_6050 // uncomment this line if a IMU 6050 is connected
#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)
#define ACC_OFFSET_X 169 // fill here the first value reported when DISPLAY_ACC_OFFSET is activated (eg. -160)
#define ACC_OFFSET_Y -108 // fill here the second value reported when DISPLAY_ACC_OFFSET is activated (eg. -150)
#define ACC_OFFSET_Z 15204 // fill here the third value reported when DISPLAY_ACC_OFFSET is activated (eg. -1100)
#define DISPLAY_ACC_OFFSET // used ONLY in order to display the acceleration offset on pc terminal; KEEP AS COMMENT once offsets have been s

I've already tested 0 or 1000000 as value or + and - no change is always the same output value.

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

Re: Problem with the IMU 6050 and OXS

Post by mstrens » Fri Mar 24, 2017 8:53 pm

devil wrote:
Fri Mar 24, 2017 8:13 pm
So what I have understood so far, the IMU transmits in OXS V7 some angles and in the V8 it is possible to change in acceleration when linear is switched on. As far as clear.
In fact in V7 I think that you can also get the "linear" accelerations.
In line 781, you have //#define TEST_SEND_MPU.
If you remove the "//", the line will be uncommented and oXs will fill TEST_1, TEST_2 and TEST_3. So if your config.h file asks for sending those fields in AccX, Y, Z you should get them.
When you uncomment the line, oXs will fill with what is named "linear" accelerations. Linear accelerations are not exactly the same as accelerations from the 6050. In fact in linear accelerations, gravity is taken away (taking into accout the oriention of the sensor calculated by oXs based on the gyros). So, in a perfect world linear accelerations should be equal to 0 when the sensor do not move and this for any orientation (while the "original" accelerations will report an acceleration of 1 g when the sensor is flat on table)
devil wrote:
Fri Mar 24, 2017 8:13 pm
What I still do not understand yet ...
There will be angles as far as ok, but the sensor is flat on the table and the value changes with time, here it is I think no matter whether it is an angle or a force, But that should not be nevertheless ?
In your set up, AccZ was filled with "Yaw". Yaw give the horizontal direction of the sensor (= direction of fly); Idealy 0 means that you go to North, 180 to South. Still oXs has no reference to know where is North and so 0 could be any direction. Still if you turn oXs 30 degree to the right, value should change and then if you turn back 30 degree to the left, value should go back to 0.
If you do not turn oXs , you still see that the Yaw (AccZ on your screen) change slowly. This results from the fact that when the IMU do not move, the gyro does not give exactly 0 (there is some offsets in all gyros) and so the angle (Yaw) will vary. The only way to avoid this is to "realign" the Yaw value with another sensor (e.g. a magnetometer) but this is not performed by oXS.
So, it is not a bug if yaw drift over time.
devil wrote:
Fri Mar 24, 2017 8:13 pm
Point two I do not understand,
Why did the calibration of the IMU data has no effect on the transferred values?
If I now have these values from the serial monitor acc 169 -108 15204
In the Config.h, absolutely nothing changes at the output values.

#define USE_6050 // uncomment this line if a IMU 6050 is connected
#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)
#define ACC_OFFSET_X 169 // fill here the first value reported when DISPLAY_ACC_OFFSET is activated (eg. -160)
#define ACC_OFFSET_Y -108 // fill here the second value reported when DISPLAY_ACC_OFFSET is activated (eg. -150)
#define ACC_OFFSET_Z 15204 // fill here the third value reported when DISPLAY_ACC_OFFSET is activated (eg. -1100)
#define DISPLAY_ACC_OFFSET // used ONLY in order to display the acceleration offset on pc terminal; KEEP AS COMMENT once offsets have been s

I've already tested 0 or 1000000 as value or + and - no change is always the same output value.
Please note that you should normally not have such a high value for ACC_OFFSET.
Here an extract of the explanation given in the file oXs_config_description.h

* In order to get best results from IMU, it is required to calibrate the accelerometer offsets. To do so, please :
* - upload a version of oXs firmware whith the line #define DISPLAY_ACC_OFFSET uncommented
* - let oXs runs while connected to the PC (via USB serial interface = FTDI)
* - open Arduino IDE terminal (press CTRL + SHIFT + M simultaniously)
* - take care to set the baud rate to 115200 (or 38400 if GPS is activated too)
* - 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 (GY86) 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.h file filling the 3 numbers in lines #define ACC_OFFSET_X , #define ACC_OFFSET_Y and #define ACC_OFFSET_Z
* - set line #define DISPLAY_ACC_OFFSET as comment (adding "//" in front)
* - upload again oXs firmware in arduino

When oXs is flat on the table, you shoud note the fist 2 parameters (AccX and AccY). AccZ offset requires that you turn the IMU by 90 degree on a side (so X or Y becomes vertical and so Z should idealy give 0; in a real world, it will not be 0 but probably less than 2000)

I am a little surprised that filling high dummy values does not have an impact. I can't explain it.

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