Main Content

BMI160

Measure linear acceleration, angular rate, and temperature from BMI160 sensor

  • Library:
  • Embedded Coder Support Package for Texas Instruments C2000 Processors / Sensors

Description

The BMI160 block outputs the values of linear acceleration and angular rate along x-, y- and z- axes as measured by the BMI160 sensor connected to TI’s C2000™ board. The block also outputs the temperature as read by the BMI160 sensor. If you connect the BMM150 as a secondary sensor to BMI160, the BMI160 block also outputs magnetic field along x-, y- and z- axes as measured by the BMM150 sensor.

Ports

Output

expand all

Linear acceleration (in m/s2) measured by BMI160 sensor connected to C2000 board, along the x-, y- and z- axes, specified as a row vector [x,y,z].

Dependencies

This output port appears only if you select the Acceleration (m/s2) parameter.

Data Types: double

Angular rate (in rad/s) measured by BMI160 sensor connected to C2000 board, along the x-, y- and z- axes, specified as a row vector [x,y,z].

Dependencies

This output port appears only if you select the Angular rate (rad/s) parameter.

Data Types: double

Magnetic field strength (in µT) measured by a BMM150 sensor that is connected as a secondary sensor to BMI160 sensor, along the x-, y- and z- axes, specified as a row vector [x,y,z].

Dependencies

This output port appears only if you select the Enable secondary magnetometer and Magnetic Field (µT) parameters.

Data Types: double

Temperature (in ℃) measured by BMI160 sensor connected to C2000 board.

Dependencies

This output port appears only if you select the Temperature (℃) parameter.

Data Types: double

Status of acceleration 0 indicates that the data read is new and 1 indicates that the data read is not new.

Dependencies

This output port appears only if you select the Acceleration Status parameter.

Data Types: int8

Status of angular rate 0 indicates that the data read is new and 1 indicates that the data read is not new.

Dependencies

This output port appears only if you select the Angular Rate Status parameter.

Data Types: int8

Status of magnetic field 0 indicates that the data read is new and 1 indicates that the data read is not new.

Dependencies

This output port appears only if you select the Magnetic Field Status parameter.

Data Types: int8

Parameters

expand all

Main Tab

The I2C module to be used for communication to the BMI160 sensor. The number of I2C modules supported varies across different C2000 processors. You can find the supported I2C modules corresponding to the processor (which you selected for the Hardware Board parameter in the Simulink model) by opening the Configuration Parameters dialog box and checking the I2C specific tabs under Target hardware resources.

The I2C address used by BMI160 sensor communicating with the C2000 processor. The default parameter value (0x69) corresponds to the value mentioned in the Schematics section of the BOOSTXL-SENSORS BoosterPackTM Plug-in Module User's Guide.

If this option is selected, an interrupt is generated on pin INT1 or INT2 of the sensor when data is ready, allowing you to trigger other subsystems to perform any action.

Note

Selecting this parameter (Enable data ready interrupt) overrides the availability of other status values at the output. The selection of parameters for other status outputs (Acceleration status, Angular rate status, and Magnetic field status) is also disabled.

Select the pin on which the data ready interrupt, which can be used by the C2000 processor, gets generated on the sensor.

Dependencies

This parameter appears only if you select the Enable data ready interrupt parameter.

If this option is selected, the block can read magnetometer data from a BMM150 sensor that is connected as a secondary sensor to BMI160.

The I2C address used by BMM150 sensor connected as a secondary sensor to BMI160 sensor. The default parameter value (0x13) corresponds to the value mentioned in the Schematics section of the BOOSTXL-SENSORS BoosterPackTM Plug-in Module User's Guide.

Dependencies

This parameter appears only if you select the Enable secondary magnetometer parameter.

Select this parameter to set Acceleration as one of the output ports.

Select this parameter to set Angular Rate as one of the output ports.

Select this parameter to set Magnetic Field as one of the output ports.

Select this parameter to set Temperature as one of the output ports.

Select this parameter to set Acceleration Status as one of the output ports.

Select this parameter to set Angular Rate Status as one of the output ports.

Select this parameter to set Magnetic Field Status as one of the output ports.

Specify the output data type for the values read from BMI160 sensor. The default data type for TI’s C2000 processors is single. Use this parameter to change the values to double, if required.

Specify how often this block reads the data from the BMI160 sensor. When you set this parameter to -1, Simulink determines the best sample time for the block based on the block context within the model.

Advanced Tab

Select the full scale for measuring linear acceleration (the range of acceleration that the sensor needs to measure).

Select the output data rate at which accelerometer data is sampled, which also determines the bandwidth.

Select this option to enable the low-pass filter for the acceleration values read from BMI160 sensor.

Select the filter mode for low pass filter for accelerometer values. The 3dB Cutoff frequency of the accelerometer depends on the value of this parameter and the ODR that you selected using the Accelerometer output data rate parameter.

Select the full scale for measuring angular rate (the range of angular rate that the sensor needs to measure).

Select the output data rate at which gyroscope data is sampled, which also determines the bandwidth.

Select this option to enable the low-pass filter for the angular rate values read from BMI160 sensor.

Select the filter mode for low pass filter for gyroscope values. The 3dB Cutoff frequency of the gyroscope depends on the value of this parameter and the ODR that you selected using the Gyroscope output data rate parameter.

Select the output data rate at which magnetometer data is sampled.

Version History

Introduced in R2021b

See Also