

The LSM6DS3 is a 6-axis Inertial Measurement Unit (IMU) that integrates a 3-axis accelerometer and a 3-axis gyroscope into a single compact package. Manufactured by Alibaba, this sensor is designed for precise motion tracking and orientation detection. It is widely used in applications such as smartphones, wearables, gaming devices, robotics, and IoT systems. The LSM6DS3 is known for its low power consumption and high performance, making it ideal for battery-powered devices. Internally, it shares similarities with the BMI160 sensor, offering comparable functionality and reliability.








| Parameter | Value |
|---|---|
| Supply Voltage | 1.71V to 3.6V |
| Accelerometer Range | ±2g, ±4g, ±8g, ±16g |
| Gyroscope Range | ±125°/s, ±250°/s, ±500°/s, ±1000°/s, ±2000°/s |
| Output Data Rate (ODR) | Up to 6.66 kHz |
| Communication Interfaces | I²C (up to 1 MHz), SPI (up to 10 MHz) |
| Operating Temperature Range | -40°C to +85°C |
| Power Consumption | 0.9 mA (accelerometer + gyroscope in high-performance mode) |
The LSM6DS3 comes in a 14-pin LGA package. Below is the pinout description:
| Pin Number | Pin Name | Description |
|---|---|---|
| 1 | VDD | Power supply (1.71V to 3.6V) |
| 2 | VDDIO | I/O interface voltage supply |
| 3 | GND | Ground |
| 4 | SCL/SPC | I²C clock line / SPI clock |
| 5 | SDA/SDI/SDO | I²C data line / SPI data input/output |
| 6 | CS | SPI chip select (active low) |
| 7 | INT1 | Interrupt 1 output |
| 8 | INT2 | Interrupt 2 output |
| 9-14 | NC | Not connected (leave floating) |
Below is an example of how to initialize and read data from the LSM6DS3 using an Arduino UNO:
#include <Wire.h> // Include the Wire library for I²C communication
#define LSM6DS3_ADDR 0x6A // Default I²C address of the LSM6DS3
#define WHO_AM_I_REG 0x0F // Register to check device identity
#define CTRL1_XL 0x10 // Accelerometer control register
#define CTRL2_G 0x11 // Gyroscope control register
#define OUTX_L_XL 0x28 // Accelerometer X-axis low byte register
void setup() {
Wire.begin(); // Initialize I²C communication
Serial.begin(9600); // Start serial communication for debugging
// Check if the sensor is connected
Wire.beginTransmission(LSM6DS3_ADDR);
Wire.write(WHO_AM_I_REG);
Wire.endTransmission();
Wire.requestFrom(LSM6DS3_ADDR, 1);
if (Wire.available()) {
byte whoAmI = Wire.read();
if (whoAmI == 0x69) { // Expected WHO_AM_I response
Serial.println("LSM6DS3 detected!");
} else {
Serial.println("Device not detected. Check connections.");
while (1); // Halt execution
}
}
// Configure accelerometer (±2g, 104 Hz ODR)
Wire.beginTransmission(LSM6DS3_ADDR);
Wire.write(CTRL1_XL);
Wire.write(0x40); // 104 Hz ODR, ±2g range
Wire.endTransmission();
// Configure gyroscope (±250°/s, 104 Hz ODR)
Wire.beginTransmission(LSM6DS3_ADDR);
Wire.write(CTRL2_G);
Wire.write(0x40); // 104 Hz ODR, ±250°/s range
Wire.endTransmission();
}
void loop() {
// Read accelerometer X-axis data
Wire.beginTransmission(LSM6DS3_ADDR);
Wire.write(OUTX_L_XL);
Wire.endTransmission();
Wire.requestFrom(LSM6DS3_ADDR, 2); // Request 2 bytes (low and high)
if (Wire.available() == 2) {
int16_t accelX = Wire.read() | (Wire.read() << 8); // Combine low and high bytes
Serial.print("Accelerometer X: ");
Serial.println(accelX);
}
delay(500); // Wait before the next reading
}
Device Not Detected:
No Data Output:
Inconsistent Readings:
This concludes the documentation for the LSM6DS3 (Internally BMI160). For further assistance, consult the official datasheet or contact Alibaba support.