BMI160 Series IMU Design Guide

 Introduction

This document is intended as a reference guide on how to design using Bosch Sensortec’s BMI160 series IMU (inertial measurement unit)

Selecting the right part

The BMI16x family has two products: BMI160 and BMG250. Table 1 gives an overview of these two products. As the BMM150 can be connected to the secondary interface of BMI160 and BMI120 for 9-axis applications, it is also introduced below.

                                                         Table 1: Overview of the products in the BMI16x family

 

  Common characteristics

The main characteristics of the BMI16x family are:

  • Highly integrated, low power IMU
  • 16-bit digital, tri-axial accelerometer
  • 16-bit digital, tri-axial gyroscope

  Key features

  • 3.0x2.5mm2 size
  • Pin-to-pin compatibility with products in this family itself and in the BMI2XY family
  • SPI or I2C interface
  • Configurable range from ±2g to ±16g for accelerometer and ±125dps to ±2000dps for gyroscope
  • Configurable output data rate up to 1.6kHZ for accelerometer and 6.4kHZ for gyroscope
  • Integrated 1KB FIFO
  • Auxiliary I2C interface for connecting external magnetometer, including data synchronization
  • Built-in smart interrupt controller, with features such as step counter, any motion, no motion, etc

   Differences among products

The main differences among the BMI160 product family are in the function and overall performance. The BMI160 is the right choice for most standard applications. The BMG250 is a standalone gyroscope for applications where only a gyroscope is required, e.g. OIS etc. See Table 2 for their differences.

Table 2: Differences between products in the BMI16x family

  Available evaluation tools and software

To best evaluate the products from the BMI160 family, the following combination of evaluation tools are recommended:

  • Without Bluetooth
  • Sensor shuttle board

 Reference design

Figure 1 shows a mockup reference design of the BMI16x family.

                                                        Figure 1: Mockup reference design

Bill of materials

Table 3 lists the bill of necessary materials.

                                                                              Table 3: Bill of materials

 Layout recommendations

Because the BMI160 family contains tiny mechanical structures inside the package, care must be taken during the layout phase to ensure optimum performance. The complete handling and soldering guide can be found on the Bosch Sensortec’s website.

The typical manufacturing procedures for the BMI160 accelerometers are described in the following sections.

Landing pattern

Figure 2 shows the landing pattern of the BMI160 family.

                                                                    Figure 2: Landing pattern (in mm)

Typical layout

Figure 3 shows the typical layout.

                                                                     Figure 3: Typical layout (in mm)

Manufacturing notes

Table 4 lists the recommendations for the manufacture.

                                                         Table 4: Manufacture recommendations

First power-on

After powering on the sensor for the first time, the initial specs would be tested for communication with the device. This can be done by simply reading the chip identification code in the register 0x00. See Table 5 for the chip IDs.

                                                           Table 5: Chip IDs of the BMI160 product family

Below is some example code on how to perform this test based on the BMI160, using the COINES software as the host.

static void init_bmi160(void)
{
    int8_t rslt;
    rslt = bmi160_init(&bmi160dev);

    if (rslt == BMI160_OK)
    {
        printf("BMI160 initialization success !\n");
        printf("Chip ID 0x%X\n", bmi160dev.chip_id);
    }
    else
    {
        printf("BMI160 initialization failure !\n");
        exit(COINES_E_FAILURE);
    }
}

/*!
 *  @brief Main Function where the execution getting started to test the code.
 *
 *  @param[in] argc
 *  @param[in] argv
 *
 *  @return status
 *
 */
int main(int argc, char *argv[])
{
    struct coines_board_info board_info;
    int16_t rslt;

    init_bmi160_sensor_driver_interface();

    rslt = coines_open_comm_intf(COINES_COMM_INTF_USB);

    if (rslt < 0)
    {
        printf("\n Unable to connect with Application Board ! \n"
               " 1. Check if the board is connected and powered on. \n"
               " 2. Check if Application Board USB driver is installed. \n"
               " 3. Check if board is in use by another application. (Insufficient permissions to access USB) \n");
        exit(rslt);
    }

    rslt = coines_get_board_info(&board_info);

    if (rslt == COINES_SUCCESS)
    {
        if (board_info.shuttle_id != BMI160_SHUTTLE_ID)
        {

            printf("! Warning invalid sensor shuttle \n ,"
                   "This application will not support this sensor \n");
            exit(COINES_E_FAILURE);
        }
    }

    init_sensor_interface();
    /* after sensor init introduce 200 msec sleep */
    coines_delay_msec(200);
    init_bmi160();hz
    coines_close_comm_intf(COINES_COMM_INTF_USB);
    return EXIT_SUCCESS;
}

Testing sensor functionality

The BMI160 series IMU features a fully integrated and motionless self-test procedure on the ASIC itself. When the self-test is triggered, the accelerometer uses electric fields to physically move the electrodes in all directions, senses the deflection and compares it with the expected output. The gyroscope checks the sensor drive amplitude, frequency and stability of the drive control loop. Therefore, it is recommended to test the BMI160’s functionality using the built-in self-test feature.

Here is some sample code on how to perform this self-test, based on BMI160, using the COINES software as the host.

Testing sensor performance

The BMI160 family’s performance parameters, e.g. offset and noise, can be easily tested with the device motionless. See below for the typical values of the BMI160 family.

                                     Table 6: Typical performance of the BMI160 product family

Note:

Typical values are defined as ± 1σ, which means that 68.3% of sensors are expected to fall within these values. Min/Max values are defined as ± 3σ, which means 99.7% of sensors shall be within these values.

The offset testing procedure is quite simple. This can be done by putting the device in a known position, e.g. on a flat surface, calculate the average value for each axis, and subtract the expected output (e.g. 0G, 0G, +1G) from the value. The result is the offset of the sensor. The example code on how to perform this test will be provided when available.

The noise calculation is a bit more complicated. First, subtract the offset from each data point. The RMS value can be calculated as the square root of the arithmetic mean of the squares of the noise values.

Since the noise value is affected by the bandwidth of the digital filter, it needs to be converted back to noise density using the following formula. Note that this applies to a second order filter only.

The example code on how to perform noise calculation will be provided when available.

 Example Code

The complete example code can be compiled and executed from the following subfolder:

 /examples/c/bmi160/ under the COINES installation directory (C:/COINES on Windows by default).

Calibration

The BMI16x family has been pre-trimmed at the factory, but the offset may vary due to the soldering process and PCB bending during assembly. Therefore, it is preferred to calibrate the accelerometer and the gyroscope after assembling the device into its housing.

The BMI16x family calibration includes accelerometer offset calibration and gyroscope offset calibration

Example code

The calibration procedures can be found in the BMI160 Datasheet.

Once the offsets are determined, they can be written into the NVM (non-volatile memory) so that the sensor automatically compensates for the soldering offset even after physically diconnecting the power.

The example code on how to perform calibration and save calibration data to NVM will be provided when available.

The complete example code can be compiled and executed from the subfolder: /examples/c/bmi160/ under the COINES installation directory (by default, C:/COINES on Windows).

Usage

The COINES installation provides sample code on how to turn on the sensor, configure it and read out the IMU data.

 Example code

Below is some example code on how to evaluate basic communication based on the BMI160, using the COINES software as the host.

int main(int argc, char *argv[])
{
    struct coines_board_info board_info;
    int16_t rslt;

    init_bmi160_sensor_driver_interface();

    rslt = coines_open_comm_intf(COINES_COMM_INTF_USB);

    if (rslt < 0)
    {
        printf("\n Unable to connect with Application Board ! \n"
               " 1. Check if the board is connected and powered on. \n"
               " 2. Check if Application Board USB driver is installed. \n"
               " 3. Check if board is in use by another application. (Insufficient permissions to access USB) \n");
        exit(rslt);
    }

    rslt = coines_get_board_info(&board_info);

    if (rslt == COINES_SUCCESS)
    {
        if (board_info.shuttle_id != BMI160_SHUTTLE_ID)
        {

            printf("! Warning invalid sensor shuttle \n ,"
                   "This application will not support this sensor \n");
            exit(COINES_E_FAILURE);
        }
    }

    init_sensor_interface();
    /* after sensor init introduce 200 msec sleep */
    coines_delay_msec(200);
    init_bmi160();hz
    coines_close_comm_intf(COINES_COMM_INTF_USB);
    return EXIT_SUCCESS;
}

Further reads

Datasheets:

Handling, soldering and mounting instructions:

 

 

 

2 replies