Main Content

LSM9DS1 IMU Sensor

Measure linear acceleration, angular rate, and magnetic field along X, Y, and Z axis

  • Library:
  • Simulink Support Package for Arduino Hardware / Sensors

  • block icon for LSM9DS1 IMU Sensor

Description

The LSM9DS1 IMU Sensor block measures linear acceleration, angular rate, and magnetic field along the X, Y, and Z axis using the LSM9DS1 Inertial Measurement Unit (IMU) sensor interfaced with the Arduino® hardware. This 9-Degree of Freedom (DoF) IMU sensor comprises of an accelerometer, gyroscope, and magnetometer used to measure linear acceleration, angular rate, and magnetic field, respectively.

Ports

Input

expand all

The slave addresses to communicate with the accelerometer, gyroscope, and magnetometer peripherals on the LSM9DS1 sensor are decided by the state of the SDA_M and SDA_AG pins on the hardware board. This table provides the slave addresses corresponding to the pins and their state.

Pin NamePin StateSlave Address
SDA_M (Magnetometer)00x1C
10x1E
SDA_AG (Accelerometer and Gyroscope)00x6A
10x6B

Data Types: uint8

Output

expand all

You can select the active sensor(s) to measure angular velocity, acceleration, magnetic field, or a combination of these measurements.

The block outputs acceleration as a 1-by-3 vector. Each value represents the measurement of acceleration in g(9.8 m/s^2) along the X, Y, and Z axes.

Data Types: double

The block outputs velocity as a 1-by-3 vector. Each value represents the measurement of angular velocity in degrees per second (dps) along the X, Y, and Z axes.

Data Types: double

The block outputs magnetic field as a 1-by-3 vector. Each value represents the measurement of magnetic field in micro Tesla (µT) along the X, Y, and Z axes.

Data Types: double

Parameters

expand all

Select the rate at which you want the accelerometer to measure the acceleration.

Select the required sensitivity for measurement of acceleration. This parameter specifies the upper and lower limits of what the sensor can measure. In general, for all sensors, you get a more precise measurement with a low full-scale range.

Set the bandwidth for the low-pass filter associated with the measurement of acceleration.

Refer to the LSM9DS1 Sensor data sheet for further information.

Select the rate at which you want the gyroscope to measure the angular velocity.

Select the required sensitivity for measurement of angular velocity. This parameter specifies the upper and lower limits of what the sensor can measure. In general, for all the sensors, you get a more precise measurement from a sensor with a low full-scale range.

Select the desired bandwidth mode to set the cutoff frequency for the low-pass filter associated with the gyroscope. Refer to this table for information regarding the cutoff frequencies.

Output Data Rate (ODR) and Bandwidth Configuration Setting After Low-Pass Filter 2 (LPF2)

Bandwidth ModeODR (Hz)Cutoff (Hz)
014.9NA
114.9NA
214.9NA
314.9NA
059.516
159.516
259.516
359.516
011914
111931
211931
311931
023814
123829
223863
323878
047621
147628
247657
3476100
095233
195240
295258
3952100

Select this option to enable the high-pass filter for the gyroscope.

Select the high-pass filter mode to set the desired cutoff frequencies for the high-pass filter. Refer to this table given to select the desired cutoff frequency.

Gyroscope High Pass Filter Cutoff Frequency Configuration (Hz)

HPF ModeODR=14.9 HzODR=59.5 HzODR=119 HzODR=238 HzODR=476 HzODR=952 Hz
0148153057
10.52481530
20.2124815
30.10.51248
40.050.20.5124
50.020.10.20.512
60.010.050.10.20.51
70.0050.020.050.10.20.5
80.0020.010.020.0050.10.2
90.0010.0050.010.0020.0050.1

Refer to the LSM9DS1 Sensor data sheet for further information.

Select the required rate at which you want the Magnetometer to measure the magnetic field.

Select the required sensitivity for measurement of magnetic field. This parameter specifies the upper and lower limits of what the sensor can measure. In general, for all the sensors, you get a more precise measurement with a low full-scale range.

Enter the time interval in seconds at which the block reads values from the active sensors.

See Also

External Websites

Introduced in R2020b