Cirkit Designer Logo
Cirkit Designer
Your all-in-one circuit design IDE
Home / 
Component Documentation

How to Use Adafruit LSM6DS3TR-C + LIS3MDL - Precision 9 DoF IMU - STEMMA QT / Qwiic: Examples, Pinouts, and Specs

Image of Adafruit LSM6DS3TR-C + LIS3MDL - Precision 9 DoF IMU - STEMMA QT / Qwiic
Cirkit Designer LogoDesign with Adafruit LSM6DS3TR-C + LIS3MDL - Precision 9 DoF IMU - STEMMA QT / Qwiic in Cirkit Designer

Introduction

The Adafruit LSM6DS3TR-C + LIS3MDL (Part ID: 5543) is a precision 9 Degrees of Freedom (DoF) Inertial Measurement Unit (IMU) designed for accurate motion tracking and orientation sensing. This module combines two powerful sensors: the LSM6DS3TR-C, which integrates a 3-axis accelerometer and a 3-axis gyroscope, and the LIS3MDL, a 3-axis magnetometer. Together, these sensors provide comprehensive motion and orientation data.

This IMU is equipped with STEMMA QT / Qwiic connectors, enabling plug-and-play compatibility with a wide range of development boards and simplifying integration into projects. It is ideal for applications such as robotics, drones, wearable devices, and gaming controllers.

Explore Projects Built with Adafruit LSM6DS3TR-C + LIS3MDL - Precision 9 DoF IMU - STEMMA QT / Qwiic

Use Cirkit Designer to design, explore, and prototype these projects online. Some projects support real-time simulation. Click "Open Project" to start designing instantly!
Adafruit MPU6050 and VL6180X Sensor Interface with Servo Control
Image of wire: A project utilizing Adafruit LSM6DS3TR-C + LIS3MDL - Precision 9 DoF IMU - STEMMA QT / Qwiic in a practical application
This circuit features an Adafruit QT Py microcontroller interfaced with an Adafruit MPU6050 6-axis accelerometer/gyroscope and an Adafruit VL6180X Time of Flight (ToF) distance sensor, both connected via I2C communication. The QT Py also controls a Servomotor SG90, likely for physical actuation based on sensor inputs. The embedded code initializes the sensors, reads their data, and outputs the readings to a serial monitor, with the potential for motion control based on the sensor feedback.
Cirkit Designer LogoOpen Project in Cirkit Designer
Raspberry Pi 5-Based Multi-Sensor IMU System with MPU-6050 and LSM303c
Image of GRS: A project utilizing Adafruit LSM6DS3TR-C + LIS3MDL - Precision 9 DoF IMU - STEMMA QT / Qwiic in a practical application
This circuit integrates a Raspberry Pi 5 with multiple sensors, including an MPU-6050 accelerometer and gyroscope, and an LSM303c 6DOF IMU, to collect and process motion and orientation data. The Raspberry Pi serves as the central processing unit, interfacing with the sensors via GPIO pins and providing power to them.
Cirkit Designer LogoOpen Project in Cirkit Designer
Battery-Powered Arduino UNO with BNO085 IMU and Bluetooth HC-06 for Orientation Tracking
Image of bno085: A project utilizing Adafruit LSM6DS3TR-C + LIS3MDL - Precision 9 DoF IMU - STEMMA QT / Qwiic in a practical application
This circuit integrates an Arduino UNO with an Adafruit BNO085 9-DOF Orientation IMU and a Bluetooth HC-06 module. The Arduino reads orientation data from the IMU via I2C and transmits it over Bluetooth, powered by a 7.4V battery.
Cirkit Designer LogoOpen Project in Cirkit Designer
Arduino UNO-Based IMU and Bluetooth Communication System
Image of New one: A project utilizing Adafruit LSM6DS3TR-C + LIS3MDL - Precision 9 DoF IMU - STEMMA QT / Qwiic in a practical application
This circuit features an Arduino UNO microcontroller interfaced with a Bluetooth HC-06 module for wireless communication and an Adafruit BNO085 9-DOF Orientation IMU for motion sensing. The Arduino handles data acquisition from the IMU via I2C and communicates the data wirelessly through the Bluetooth module.
Cirkit Designer LogoOpen Project in Cirkit Designer

Explore Projects Built with Adafruit LSM6DS3TR-C + LIS3MDL - Precision 9 DoF IMU - STEMMA QT / Qwiic

Use Cirkit Designer to design, explore, and prototype these projects online. Some projects support real-time simulation. Click "Open Project" to start designing instantly!
Image of wire: A project utilizing Adafruit LSM6DS3TR-C + LIS3MDL - Precision 9 DoF IMU - STEMMA QT / Qwiic in a practical application
Adafruit MPU6050 and VL6180X Sensor Interface with Servo Control
This circuit features an Adafruit QT Py microcontroller interfaced with an Adafruit MPU6050 6-axis accelerometer/gyroscope and an Adafruit VL6180X Time of Flight (ToF) distance sensor, both connected via I2C communication. The QT Py also controls a Servomotor SG90, likely for physical actuation based on sensor inputs. The embedded code initializes the sensors, reads their data, and outputs the readings to a serial monitor, with the potential for motion control based on the sensor feedback.
Cirkit Designer LogoOpen Project in Cirkit Designer
Image of GRS: A project utilizing Adafruit LSM6DS3TR-C + LIS3MDL - Precision 9 DoF IMU - STEMMA QT / Qwiic in a practical application
Raspberry Pi 5-Based Multi-Sensor IMU System with MPU-6050 and LSM303c
This circuit integrates a Raspberry Pi 5 with multiple sensors, including an MPU-6050 accelerometer and gyroscope, and an LSM303c 6DOF IMU, to collect and process motion and orientation data. The Raspberry Pi serves as the central processing unit, interfacing with the sensors via GPIO pins and providing power to them.
Cirkit Designer LogoOpen Project in Cirkit Designer
Image of bno085: A project utilizing Adafruit LSM6DS3TR-C + LIS3MDL - Precision 9 DoF IMU - STEMMA QT / Qwiic in a practical application
Battery-Powered Arduino UNO with BNO085 IMU and Bluetooth HC-06 for Orientation Tracking
This circuit integrates an Arduino UNO with an Adafruit BNO085 9-DOF Orientation IMU and a Bluetooth HC-06 module. The Arduino reads orientation data from the IMU via I2C and transmits it over Bluetooth, powered by a 7.4V battery.
Cirkit Designer LogoOpen Project in Cirkit Designer
Image of New one: A project utilizing Adafruit LSM6DS3TR-C + LIS3MDL - Precision 9 DoF IMU - STEMMA QT / Qwiic in a practical application
Arduino UNO-Based IMU and Bluetooth Communication System
This circuit features an Arduino UNO microcontroller interfaced with a Bluetooth HC-06 module for wireless communication and an Adafruit BNO085 9-DOF Orientation IMU for motion sensing. The Arduino handles data acquisition from the IMU via I2C and communicates the data wirelessly through the Bluetooth module.
Cirkit Designer LogoOpen Project in Cirkit Designer

Technical Specifications

Key Technical Details

  • Manufacturer: Adafruit
  • Part ID: 5543
  • Sensors:
    • LSM6DS3TR-C: 3-axis accelerometer and 3-axis gyroscope
    • LIS3MDL: 3-axis magnetometer
  • Interface: I²C (default) or SPI
  • I²C Address:
    • LSM6DS3TR-C: 0x6A (default) or 0x6B
    • LIS3MDL: 0x1C, 0x1E, 0x1D, or 0x1F (configurable)
  • Voltage Range: 3.3V to 5V (logic and power)
  • Current Consumption: ~5mA (typical)
  • Operating Temperature: -40°C to +85°C
  • Dimensions: 25mm x 17mm x 4mm
  • Weight: 2g

Pin Configuration and Descriptions

The Adafruit LSM6DS3TR-C + LIS3MDL module features the following pins:

Pin Label Description
1 VIN Power input (3.3V to 5V). Connect to the power supply of your microcontroller.
2 GND Ground. Connect to the ground of your circuit.
3 SCL I²C clock line. Connect to the SCL pin of your microcontroller.
4 SDA I²C data line. Connect to the SDA pin of your microcontroller.
5 INT1 Interrupt pin 1 from the LSM6DS3TR-C. Optional for advanced applications.
6 INT2 Interrupt pin 2 from the LSM6DS3TR-C. Optional for advanced applications.
7 DRDY Data ready pin from the LIS3MDL. Optional for advanced applications.
8 CS Chip select for SPI communication. Leave unconnected for I²C mode.

Usage Instructions

How to Use the Component in a Circuit

  1. Power the Module: Connect the VIN pin to a 3.3V or 5V power source and the GND pin to ground.
  2. Connect I²C Lines:
    • Connect the SCL pin to the I²C clock line of your microcontroller.
    • Connect the SDA pin to the I²C data line of your microcontroller.
  3. Optional Connections:
    • Use the INT1, INT2, or DRDY pins for interrupt-driven applications.
    • If using SPI, connect the CS pin and configure the microcontroller accordingly.
  4. Install Required Libraries: Use the Adafruit Unified Sensor library and the Adafruit LSM6DS3TR-C and LIS3MDL libraries for Arduino.

Example Arduino Code

Below is an example Arduino sketch to read accelerometer, gyroscope, and magnetometer data using I²C:

#include <Wire.h>
#include <Adafruit_Sensor.h>
#include <Adafruit_LSM6DS33.h>
#include <Adafruit_LIS3MDL.h>

// Create sensor objects
Adafruit_LSM6DS33 lsm6ds33;
Adafruit_LIS3MDL lis3mdl;

void setup() {
  Serial.begin(115200);
  while (!Serial) delay(10); // Wait for Serial Monitor to open

  // Initialize LSM6DS33
  if (!lsm6ds33.begin_I2C()) {
    Serial.println("Failed to find LSM6DS33 chip");
    while (1) delay(10);
  }
  Serial.println("LSM6DS33 Found!");

  // Initialize LIS3MDL
  if (!lis3mdl.begin_I2C()) {
    Serial.println("Failed to find LIS3MDL chip");
    while (1) delay(10);
  }
  Serial.println("LIS3MDL Found!");
}

void loop() {
  // Read accelerometer data
  sensors_event_t accel, gyro, temp;
  lsm6ds33.getEvent(&accel, &gyro, &temp);

  // Read magnetometer data
  sensors_event_t mag;
  lis3mdl.getEvent(&mag);

  // Print accelerometer data
  Serial.print("Accel X: "); Serial.print(accel.acceleration.x); Serial.print(" m/s^2 ");
  Serial.print("Y: "); Serial.print(accel.acceleration.y); Serial.print(" m/s^2 ");
  Serial.print("Z: "); Serial.print(accel.acceleration.z); Serial.println(" m/s^2");

  // Print gyroscope data
  Serial.print("Gyro X: "); Serial.print(gyro.gyro.x); Serial.print(" rad/s ");
  Serial.print("Y: "); Serial.print(gyro.gyro.y); Serial.print(" rad/s ");
  Serial.print("Z: "); Serial.print(gyro.gyro.z); Serial.println(" rad/s");

  // Print magnetometer data
  Serial.print("Mag X: "); Serial.print(mag.magnetic.x); Serial.print(" uT ");
  Serial.print("Y: "); Serial.print(mag.magnetic.y); Serial.print(" uT ");
  Serial.print("Z: "); Serial.print(mag.magnetic.z); Serial.println(" uT");

  delay(500); // Delay for readability
}

Important Considerations and Best Practices

  • I²C Pull-Up Resistors: Ensure your I²C bus has appropriate pull-up resistors (typically 4.7kΩ).
  • Power Supply: Use a stable power source to avoid noise in sensor readings.
  • Orientation: Mount the IMU securely and in the correct orientation for accurate measurements.
  • Calibration: Perform sensor calibration for precise results, especially for the magnetometer.

Troubleshooting and FAQs

Common Issues

  1. Sensor Not Detected:

    • Ensure the I²C connections (SCL, SDA) are correct.
    • Verify the I²C address matches the default or configured value.
    • Check for loose or faulty wiring.
  2. Incorrect or No Data:

    • Confirm the power supply voltage is within the specified range.
    • Ensure the sensor is not exposed to excessive vibrations or magnetic interference.
  3. I²C Communication Errors:

    • Check for conflicting I²C addresses on the bus.
    • Verify pull-up resistors are present on the I²C lines.

Solutions and Tips for Troubleshooting

  • Use a logic analyzer or oscilloscope to debug I²C communication issues.
  • Test the module with a known working microcontroller and example code.
  • Update the Adafruit libraries to the latest version for compatibility.

By following this documentation, you can effectively integrate the Adafruit LSM6DS3TR-C + LIS3MDL IMU into your projects for precise motion and orientation sensing.