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

How to Use Adafruit ADXL343 STEMMA QT: Examples, Pinouts, and Specs

Image of Adafruit ADXL343 STEMMA QT
Cirkit Designer LogoDesign with Adafruit ADXL343 STEMMA QT in Cirkit Designer

Introduction

The Adafruit ADXL343 STEMMA QT (Part ID: 4097) is a compact, low-power 3-axis accelerometer designed for motion sensing and orientation detection. It features an I2C interface for easy integration into microcontroller-based projects and is equipped with the STEMMA QT connector system, enabling plug-and-play functionality. This accelerometer is ideal for applications such as tilt sensing, vibration monitoring, and gesture recognition in robotics, wearables, and IoT devices.

Explore Projects Built with Adafruit ADXL343 STEMMA QT

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 ADXL343 STEMMA QT 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
ESP32 and ADXL343-Based Battery-Powered Accelerometer with SPI Communication
Image of vibration module: A project utilizing Adafruit ADXL343 STEMMA QT in a practical application
This circuit features an ESP32 microcontroller interfaced with an ADXL343 accelerometer via SPI communication, powered by a 12V battery regulated down to 5V and 8V using 7805 and 7808 voltage regulators. The ESP32 reads accelerometer data and outputs it via serial communication, with additional components including a pushbutton and a rocker switch for user input.
Cirkit Designer LogoOpen Project in Cirkit Designer
Battery-Powered Sensor Hub with Adafruit QT Py RP2040 and OLED Display
Image of 512: A project utilizing Adafruit ADXL343 STEMMA QT in a practical application
This circuit features an Adafruit QT Py RP2040 microcontroller interfacing with an MPU-6050 accelerometer, an Adafruit APDS-9960 sensor, and a 0.96" OLED display via I2C communication. It is powered by a 3.7V LiPo battery and includes a green LED with a current-limiting resistor connected to an analog pin of the microcontroller.
Cirkit Designer LogoOpen Project in Cirkit Designer
Arduino Mega 2560-Based Sensor Data Logger with ESP32-CAM and LCD Interface
Image of DA_Schema: A project utilizing Adafruit ADXL343 STEMMA QT in a practical application
This is a multifunctional sensor system with visual feedback and control interfaces. It utilizes an Arduino Mega 2560 to process data from an accelerometer, ultrasonic sensor, and camera module, and displays information on an LCD screen. User inputs can be provided through toggle and DIP switches, while LEDs indicate system status.
Cirkit Designer LogoOpen Project in Cirkit Designer

Explore Projects Built with Adafruit ADXL343 STEMMA QT

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 ADXL343 STEMMA QT 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 vibration module: A project utilizing Adafruit ADXL343 STEMMA QT in a practical application
ESP32 and ADXL343-Based Battery-Powered Accelerometer with SPI Communication
This circuit features an ESP32 microcontroller interfaced with an ADXL343 accelerometer via SPI communication, powered by a 12V battery regulated down to 5V and 8V using 7805 and 7808 voltage regulators. The ESP32 reads accelerometer data and outputs it via serial communication, with additional components including a pushbutton and a rocker switch for user input.
Cirkit Designer LogoOpen Project in Cirkit Designer
Image of 512: A project utilizing Adafruit ADXL343 STEMMA QT in a practical application
Battery-Powered Sensor Hub with Adafruit QT Py RP2040 and OLED Display
This circuit features an Adafruit QT Py RP2040 microcontroller interfacing with an MPU-6050 accelerometer, an Adafruit APDS-9960 sensor, and a 0.96" OLED display via I2C communication. It is powered by a 3.7V LiPo battery and includes a green LED with a current-limiting resistor connected to an analog pin of the microcontroller.
Cirkit Designer LogoOpen Project in Cirkit Designer
Image of DA_Schema: A project utilizing Adafruit ADXL343 STEMMA QT in a practical application
Arduino Mega 2560-Based Sensor Data Logger with ESP32-CAM and LCD Interface
This is a multifunctional sensor system with visual feedback and control interfaces. It utilizes an Arduino Mega 2560 to process data from an accelerometer, ultrasonic sensor, and camera module, and displays information on an LCD screen. User inputs can be provided through toggle and DIP switches, while LEDs indicate system status.
Cirkit Designer LogoOpen Project in Cirkit Designer

Technical Specifications

The ADXL343 accelerometer offers a wide range of features and capabilities, making it suitable for various applications. Below are the key technical details:

Key Specifications

Parameter Value
Operating Voltage 3.3V to 5V
Communication Interface I2C (default) or SPI
Measurement Range ±2g, ±4g, ±8g, ±16g (configurable)
Sensitivity 256 LSB/g (±2g range)
Data Rate 0.1 Hz to 3200 Hz
Operating Temperature -40°C to +85°C
Power Consumption 40 µA (measurement mode), 0.1 µA (standby)
Dimensions 25.5mm x 17.8mm x 4.6mm

Pin Configuration

The ADXL343 STEMMA QT board has the following pinout:

Pin Name Description
VIN Power input (3.3V to 5V)
GND Ground
SCL I2C clock line
SDA I2C data line
STEMMA QT Plug-and-play I2C connectors

Usage Instructions

The Adafruit ADXL343 STEMMA QT is straightforward to use in a circuit. Below are the steps and best practices for integrating it into your project:

Connecting the ADXL343 to an Arduino UNO

  1. Wiring: Use the STEMMA QT connectors for a quick and reliable connection. Alternatively, you can use jumper wires:

    • Connect VIN to the Arduino's 5V pin.
    • Connect GND to the Arduino's GND pin.
    • Connect SCL to the Arduino's A5 pin (I2C clock line).
    • Connect SDA to the Arduino's A4 pin (I2C data line).
  2. Install Libraries: Download and install the Adafruit ADXL343 library and the Adafruit Unified Sensor library from the Arduino Library Manager.

  3. Upload Example Code: Use the following example code to read acceleration data:

#include <Wire.h>
#include <Adafruit_Sensor.h>
#include <Adafruit_ADXL343.h>

// Create an ADXL343 object
Adafruit_ADXL343 accel = Adafruit_ADXL343(12345); // Pass an arbitrary sensor ID

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

  Serial.println("Adafruit ADXL343 Test");

  // Initialize the sensor
  if (!accel.begin()) {
    Serial.println("Failed to find ADXL343 chip");
    while (1) {
      delay(10); // Halt if sensor is not found
    }
  }
  Serial.println("ADXL343 Found!");

  // Set range to ±2g
  accel.setRange(ADXL343_RANGE_2_G);
  Serial.print("Range set to: ");
  Serial.println(accel.getRange());
}

void loop() {
  // Read acceleration data
  sensors_event_t event;
  accel.getEvent(&event);

  // Print acceleration values
  Serial.print("X: ");
  Serial.print(event.acceleration.x);
  Serial.print(" m/s^2, Y: ");
  Serial.print(event.acceleration.y);
  Serial.print(" m/s^2, Z: ");
  Serial.print(event.acceleration.z);
  Serial.println(" m/s^2");

  delay(500); // Delay for readability
}

Important Considerations

  • Power Supply: Ensure the board is powered within the specified voltage range (3.3V to 5V).
  • I2C Address: The default I2C address is 0x53. If you have multiple devices on the same I2C bus, ensure there are no address conflicts.
  • Mounting Orientation: The sensor's orientation affects the acceleration readings. Mount it securely to avoid vibrations or misalignment.

Troubleshooting and FAQs

Common Issues

  1. Sensor Not Detected:

    • Ensure the wiring is correct and secure.
    • Verify that the I2C address matches the default (0x53) or the configured address.
    • Check if the Adafruit ADXL343 library is installed correctly.
  2. Incorrect or No Data:

    • Confirm that the sensor is powered within the specified voltage range.
    • Ensure the sensor is not exposed to excessive vibrations or shocks.
  3. Arduino Code Compilation Errors:

    • Verify that all required libraries are installed.
    • Ensure the library versions are compatible with your Arduino IDE.

FAQs

Q: Can I use the ADXL343 with a 3.3V microcontroller?
A: Yes, the ADXL343 supports both 3.3V and 5V logic levels, making it compatible with a wide range of microcontrollers.

Q: How do I change the measurement range?
A: Use the setRange() function in the Adafruit ADXL343 library. For example, accel.setRange(ADXL343_RANGE_4_G); sets the range to ±4g.

Q: Can I use SPI instead of I2C?
A: Yes, the ADXL343 supports SPI communication. However, the STEMMA QT connectors are designed for I2C. For SPI, you will need to manually wire the SPI pins.

Q: What is the maximum cable length for the STEMMA QT connectors?
A: The maximum cable length depends on the I2C bus speed and environment. For standard I2C speeds (100 kHz), a cable length of up to 1 meter is generally reliable.

By following this documentation, you can effectively integrate the Adafruit ADXL343 STEMMA QT into your projects for accurate motion sensing and orientation detection.