Measure linear acceleration, angular rate, and temperature from LSM6DSO sensor
Simulink Support Package for Arduino Hardware / Sensors
The LSM6DSO IMU Sensor block measures linear acceleration and angular rate along the X, Y, and Z axis using the LSM6DSO Inertial Measurement Unit (IMU) sensor interfaced with the Arduino® hardware. This 6-Degree of Freedom (DoF) IMU sensor comprises of an accelerometer and gyroscope used to measure linear acceleration and angular rate, respectively. The block also measures the temperature from the embedded temperature sensor in LSM6DSO Sensor.
You can also use the composite filter option in the block for the accelerometer values, and use the high pass and low pass filter options for gyroscope values.
You can select the active sensor(s) to measure angular velocity, acceleration, temperature, or a combination of these measurements.
Acceleration — Acceleration along each axis as measured by accelerometerThe block outputs acceleration as a 1-by-3
vector. Each value represents the measurement of acceleration in
m/s^2 along the X, Y, and Z axes.
This output port appears only if you select the Acceleration (m/s2) parameter.
Data Types: double
Angular Velocity — Angular velocity along each axis as measured by gyroscopeThe block outputs angular velocity as a
1-by-3 vector. Each value represents the
measurement of angular velocity in radians per second (rad/s) along the X, Y, and Z
axes.
This output port appears only if you select the Angular Velocity (rad/s) parameter.
Data Types: double
Temperature — Temperature measured by LSM6DSO sensorTemperature (in ℃) measured by LSM6DSO sensor connected to Arduino board.
This output port appears only if you select the Temperature (℃) parameter.
Data Types: double
Status — Status of acceleration, angular velocity and temperature measurements-1 | 0 | 1Status of acceleration, angular velocity and temperature measurements, specified
as a 1-by-3 vector. 0 indicates that the data read is new,
1 indicates that the data read is not new, and
-1 indicates that the corresponding output is not
selected.
This output port appears only if you select the Status parameter.
Data Types: int8
I2C address — Slave addresses to communicate with sensor peripherals0x6A
(default) | 0x6BThe slave addresses to communicate with the accelerometer and gyroscope peripherals on the LSM6DSO sensor are decided by the state of the SDO/SA0 pin on the hardware board. This table provides the slave addresses corresponding to the pin and their state.
| Pin Name | Pin State | Slave Address |
|---|---|---|
| SDO/SA0 | 0 | 0x6A |
| 1 | 0x6B |
Acceleration (m/s2) — Set output port for reading accelerationon (default) | offSelect this parameter to set Acceleration as one of the output ports.
Angular Velocity (rad/s) — Set output port for reading angular velocityon (default) | offSelect this parameter to set Angular Velocity as one of the output ports.
Temperature (℃) — Set output port for reading temperatureon (default) | offSelect this parameter to set Temperature as one of the output ports.
Status — Set output port for obtaining status of selected outputsoff (default) | onSelect this parameter to set Status as one of the output ports.
Sample time — Time interval to read data-1 (default) | positive integerSpecify how often this block reads the data from the LSM6DSO 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.
Full scale range — Full scale for measuring linear acceleration±2g (default) | ±4g | ±8g | ±16gSelect the full scale for measuring linear acceleration (the range of acceleration that the sensor needs to measure).
Output data rate — Rate at which accelerometer data is sampled12.5 Hz (default) | 26 Hz | 52 Hz | 104 Hz | 208 Hz | 416 Hz | 833 Hz | 1666 Hz | 3332 Hz | 6664 HzSelect the output data rate at which accelerometer data is sampled, which also determines the bandwidth.
Select composite filter — Composite filter used in the filtering chainNo filter (default) | High pass filter | Low pass filterSelect the type of composite filter used in the filtering chain for reading accelerometer values.
High pass filter bandwidth — Bandwidth of high pass filterODR/4 (default) | ODR/10 | ODR/20 | ODR/45 | ODR/100 | ODR/200 | ODR/400 | ODR/800Select the required bandwidth of the high pass filter in the composite filter used in the filtering chain.
This parameter appears only if you select High pass
filter in the Select composite filter
parameter.
Low pass filter bandwidth — Bandwidth of low pass filterODR/4 (default) | ODR/10 | ODR/20 | ODR/45 | ODR/100 | ODR/200 | ODR/400 | ODR/800Select the required bandwidth of the low pass filter in the composite filter used in the filtering chain.
This parameter appears only if you select Low pass
filter in the Select composite filter
parameter.
Full scale range — Full scale for measuring angular velocity250 dps (default) | 125 dps | 500 dps | 1000 dps | 2000 dpsSelect the full scale for measuring angular velocity (the range of angular velocity that the sensor needs to measure).
Output data rate — Rate at which gyroscope data is sampled12.5 Hz (default) | 26 Hz | 52 Hz | 104 Hz | 208 Hz | 416 Hz | 833 Hz | 1666 Hz | 3332 Hz | 6664 HzSelect the output data rate at which gyroscope data is sampled, which also determines the bandwidth.
Enable high pass filter — Enable high pass filter for gyroscope dataoff (default) | on | Enable the high pass filter for reading gyroscope values.
High pass filter bandwidth — Bandwidth of high pass filter0.016 Hz (default) | 0.065 Hz | 0.260 Hz | 1.04 HzSelect the required bandwidth of the high pass filter for reading gyroscope values.
This parameter appears only if you select the Enable high pass filter parameter.
Enable low pass filter — Enable low pass filter for gyroscope dataoff (default) | on | Enable the low pass filter for reading gyroscope values.
Low pass filter bandwidth mode — Bandwidth mode of low pass filter0 (default) | 1 | 2 | 3 | 4 | 5 | 6 | 7Select the required bandwidth mode of the low pass filter for reading gyroscope values.
For Gyroscope ODR > 1666 Hz, only these values are applicable for Low pass filter
bandwidth mode: 0, 1, 2,
3.
This parameter appears only if you select the Enable low pass filter parameter.
LSM6DS3 IMU Sensor | LSM6DS3H IMU Sensor | LSM6DSL IMU Sensor | LSM6DSM IMU Sensor | LSM6DSR IMU Sensor