Replies

  • You can change the range of the MPU by setting the right register bytes during the MPU configuration.

    In the MPU6000.h header file you find:

    #define BITS_FS_250DPS              0x00 // range of +-250 °/s
    #define BITS_FS_500DPS              0x08 // range of +-500 °/s
    #define BITS_FS_1000DPS             0x10 // ...
    #define BITS_FS_2000DPS             0x18

    Add the following lines for the accelerometer range:

    #define BITS_FS_2G                  0x00 // range of +- 2g
    #define BITS_FS_4G                  0x08 // range of +- 4g
    #define BITS_FS_8G                  0x10 // ...
    #define BITS_FS_16G                 0x18

    In the original arduimu 1.9 code the range is set to +-4g and 2000°/s. Change the code at
    the MPU6000_Init method where you find:

    MPU6000_SPI_write(MPUREG_GYRO_CONFIG,BITS_FS_2000DPS);  // Gyro scale 2000º/s
    MPU6000_SPI_write(MPUREG_ACCEL_CONFIG,0x08);            // Accel scale 4g (4096LSB/g)

    Change to:

    MPU6000_SPI_write(MPUREG_GYRO_CONFIG,BITS_FS_250DPS);  // Gyro scale 250°/s
    MPU6000_SPI_write(MPUREG_ACCEL_CONFIG,BITS_FS_2G);   // Accel scale 2g

    When you have changed the scale the next step is to change the equivalent sensitivity for the analog output of the sensors.

    gyros:
    ± 250 °/s = 131 LSB/°/s
    ± 500 °/s = 65.5 LSB/°/s
    ± 1000 °/s = 32.8 LSB/°/s
    ± 2000 °/s = 16.4 LSB/°/s

    accelerometer:
    ±2g = 16384 LSB/g
    ±4g = 8192 LSB/g
    ±8g = 4096 LSB/g
    ±16g = 2048 LSB/g

    In the main arduimu code you find:

    // MPU6000 4g range => g = 4096
    #define GRAVITY 4096  // This equivalent to 1G in the raw data coming from the accelerometer

    // MPU6000 sensibility  (theorical 0.0152 => 1/65.6LSB/deg/s at 500deg/s) (theorical 0.0305 => 1/32.8LSB/deg/s at 1000deg/s) ( 0.0609 => 1/16.4LSB/deg/s at 2000deg/s)
    #define Gyro_Gain_X 0.0609
    #define Gyro_Gain_Y 0.0609
    #define Gyro_Gain_Z 0.0609

    Look at the MPU manual p. 14,15 and p. 30/32 for more details.

This reply was deleted.

Activity