How to get calibration values for my accelerometer
10 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
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!
Risposte (1)
Bora Eryilmaz
il 15 Dic 2022
Modificato: Bora Eryilmaz
il 15 Dic 2022
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 Commenti
Vedere anche
Categorie
Scopri di più su Biotech and Pharmaceutical in Help Center e File Exchange
Prodotti
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!