How to get calibration values for my accelerometer
14 ビュー (過去 30 日間)
古いコメントを表示
Hello all, I'm building my own flight controller and I'm using the mpu9250 IMU.
I'm sampelling the data at 1[khz].
I wasn't able to find if there is a function or app in Matlab that I can use to get the desigred bias and magnitude calibration values for my accelerometer.
I want to record the data from my IMU and than use it in some Matlab function to get the calibration values :)
Thank you for the help!
回答 (1 件)
Bora Eryilmaz
2022 年 12 月 15 日
編集済み: Bora Eryilmaz
2022 年 12 月 15 日
It looks like this IC has a 16-bit ADC. Depending on which acceleration range you select, the magnitude would be scaled as:
range = 2; % For a full-scale range of +/-2g.
magADC = 4096; % A 16-bit value read from the accelerometer.
magG = (magADC / 2^16) * range % Magnitude in g.
The bias correction would require reading a steady +1g from the accelerometer when it is at rest and adjusting the magADC value above as:
magADC0 = 35000; % Say you read this value for +1g, instead of the theoretical 32768.
delta = magADC0 - 2^15; % This is the bias correction needed.
magG = (magADC0 / 2^16) * range % This would be the uncalibrated value.
magADC = 35000; % The values you would read later during operation.
magG = (magADC - delta) / 2^16 * range % This is the calibrated value.
0 件のコメント
参考
カテゴリ
Help Center および File Exchange で Biotech and Pharmaceutical についてさらに検索
製品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!