How to get calibration values for my accelerometer
조회 수: 15 (최근 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에서 Sensors and Transducers에 대해 자세히 알아보기
제품
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!