SmartBomb Posted November 12, 2013 Report Share Posted November 12, 2013 I was under the impression that the default range for the MPU-6050 accelerometer was +/-2g, but after doing some datalogging I'm beginning to think that is only the case for the raw values (i.e. using MPU6050_raw.ino) and not true when using the DMP (i.e. using DMP6050_DMP6.ino). The values I obtained are half of what I believe they should be, leading me to believe that with DMP the default range is +/-4g. I found a line in MPU6050_6Axis_MotionApps20.h that only confuses me more: // get rid of the gravity component (+1g = +8192 in standard DMP FIFO packet, sensitivity is 2g) If the sensitivity is 2g, doesn't 1g = 16,384? Or am I reading the datasheet incorrectly? At this point I'm pretty confused and hopefully somebody can clear it all up for me... Ekbergdub and Samellanak 2 Quote Link to comment Share on other sites More sharing options...
SmartBomb Posted November 12, 2013 Author Report Share Posted November 12, 2013 Just to add some additional information: I'm outputting the REALACCEL acceleration values and dividing them by 16,384, as indicated in the datasheet for +/-2g sensitivity. If the sensitivity when using the DMP is actually +/-4g, I should only be dividing by 8,192. This will double the 'g-force' numbers that I am currently logging, putting them more in line with what I expect. Quote Link to comment Share on other sites More sharing options...
icewolf Posted April 24, 2014 Report Share Posted April 24, 2014 Im having the exact same problem. Shouldnt 1g =( 2^16)/2 = 16384 ? Is it showing correct looking linear acceleration values through some offset register hocus pocus or is 1g really equal to 8192? Its confusing because inworld accelerations appear to be free of any gravity component even though 8192 is used. Quote Link to comment Share on other sites More sharing options...
Sondre Posted May 23, 2014 Report Share Posted May 23, 2014 Is the DMP limited to a 4g sensitivity? I tried changing the sensitivity, but it still outputs 8192... I changed this line: setFullScaleAccelRange(MPU6050_ACCEL_FS_2); into setFullScaleAccelRange(MPU6050_ACCEL_FS_8); And it didn't change anything on the DMP... Quote Link to comment Share on other sites More sharing options...
pico Posted February 8, 2015 Report Share Posted February 8, 2015 That is correct! Raw accelerometer output is 4g resolution. Quote Link to comment Share on other sites More sharing options...
Kamper Posted January 15, 2018 Report Share Posted January 15, 2018 Same issue here. After: (MPU6050.ccp) void MPU6050::initialize() { setClockSource(MPU6050_CLOCK_PLL_XGYRO); setFullScaleGyroRange(MPU6050_GYRO_FS_250); setFullScaleAccelRange(MPU6050_ACCEL_FS_2); setSleepEnabled(false); // thanks to Jack Elston for pointing this one out! } ... * <pre> * AFS_SEL | Full Scale Range | LSB Sensitivity * --------+------------------+---------------- * 0 | +/- 2g | 8192 LSB/mg * 1 | +/- 4g | 4096 LSB/mg * 2 | +/- 8g | 2048 LSB/mg * 3 | +/- 16g | 1024 LSB/mg * </pre> So the MPU6050_6Axis_MotionApps20.h expands... uint8_t MPU6050::dmpGetLinearAccel(VectorInt16 *v, VectorInt16 *vRaw, VectorFloat *gravity) { // get rid of the gravity component (+1g = +8192 in standard DMP FIFO packet, sensitivity is 2g) v -> x = vRaw -> x - gravity -> x*8192; v -> y = vRaw -> y - gravity -> y*8192; v -> z = vRaw -> z - gravity -> z*8192; return 0; } But the MPU 6050 Product Specification says: If the values are queried with the Rowberg-Skript, they are to low. But if I divide the "output_readable_realaccel" aaReal by 8192 instead 16384 it seems to be correct. How to fix it correctly? Sorry for take up the old topic, but its pretty confusing. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.