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

How to Use Adafruit LIS3DH Triple-Axis Accelerometer: Examples, Pinouts, and Specs

Image of Adafruit LIS3DH Triple-Axis Accelerometer
Cirkit Designer LogoDesign with Adafruit LIS3DH Triple-Axis Accelerometer in Cirkit Designer

Introduction

The Adafruit LIS3DH (Part ID: 2809) is a compact, low-power triple-axis accelerometer capable of measuring acceleration in three dimensions (X, Y, Z). It is widely used for motion detection, orientation sensing, and tilt measurement in a variety of applications. With its high-resolution output and versatile features, the LIS3DH is ideal for projects ranging from wearable devices to robotics and gaming controllers.

Explore Projects Built with Adafruit LIS3DH Triple-Axis Accelerometer

Use Cirkit Designer to design, explore, and prototype these projects online. Some projects support real-time simulation. Click "Open Project" to start designing instantly!
Arduino UNO R4 WiFi and Adafruit LIS3DH Accelerometer-Based Motion Detection System
Image of circuit: A project utilizing Adafruit LIS3DH Triple-Axis Accelerometer in a practical application
This circuit consists of an Arduino UNO R4 WiFi connected to an Adafruit LIS3DH Triple-Axis Accelerometer via I2C communication. The Arduino reads acceleration data from the LIS3DH sensor and outputs it to the serial monitor for further analysis or processing.
Cirkit Designer LogoOpen Project in Cirkit Designer
Teensy 4.1 Based Biometric Data Acquisition System with AD8232 Heart Rate Monitor and LIS3DH Accelerometer
Image of Teensy 4.1 accelerometer: A project utilizing Adafruit LIS3DH Triple-Axis Accelerometer in a practical application
This circuit integrates a Teensy 4.1 microcontroller with an Adafruit LIS3DH Triple-Axis Accelerometer and an AD8232 Heart Rate Monitor. The accelerometer communicates with the Teensy via I2C (SCL and SDA lines), while the heart rate monitor's output and lead-off detection (LO+ and LO-) are connected to the Teensy's analog inputs. The circuit is designed to measure both acceleration and heart rate signals, likely for a wearable or health monitoring device.
Cirkit Designer LogoOpen Project in Cirkit Designer
Arduino Ethernet with LSM303DLHC Accelerometer and Compass Interface
Image of Compass: A project utilizing Adafruit LIS3DH Triple-Axis Accelerometer in a practical application
This circuit connects an Adafruit LSM303DLHC Triple-axis Accelerometer+Magnetometer (Compass) to an Arduino Board Ethernet using I2C communication protocol. The SCL and SDA pins of the sensor are connected to the A5 and A4 pins of the Arduino, respectively, for serial clock and data transfer. The sensor is powered by the Arduino's 5V output, and both devices share a common ground.
Cirkit Designer LogoOpen Project in Cirkit Designer
ADXL335 Accelerometer Data Visualization with Oscilloscope
Image of SYS Circuit: A project utilizing Adafruit LIS3DH Triple-Axis Accelerometer in a practical application
This circuit connects an AITrip ADXL335 GY-61 accelerometer to an oscilloscope for signal visualization and a 3xAA battery pack for power. The accelerometer's Z-axis output is directly monitored on the oscilloscope, allowing for real-time observation of acceleration changes along that axis. The circuit is likely used for educational or testing purposes to demonstrate how the accelerometer responds to motion.
Cirkit Designer LogoOpen Project in Cirkit Designer

Explore Projects Built with Adafruit LIS3DH Triple-Axis Accelerometer

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 circuit: A project utilizing Adafruit LIS3DH Triple-Axis Accelerometer in a practical application
Arduino UNO R4 WiFi and Adafruit LIS3DH Accelerometer-Based Motion Detection System
This circuit consists of an Arduino UNO R4 WiFi connected to an Adafruit LIS3DH Triple-Axis Accelerometer via I2C communication. The Arduino reads acceleration data from the LIS3DH sensor and outputs it to the serial monitor for further analysis or processing.
Cirkit Designer LogoOpen Project in Cirkit Designer
Image of Teensy 4.1 accelerometer: A project utilizing Adafruit LIS3DH Triple-Axis Accelerometer in a practical application
Teensy 4.1 Based Biometric Data Acquisition System with AD8232 Heart Rate Monitor and LIS3DH Accelerometer
This circuit integrates a Teensy 4.1 microcontroller with an Adafruit LIS3DH Triple-Axis Accelerometer and an AD8232 Heart Rate Monitor. The accelerometer communicates with the Teensy via I2C (SCL and SDA lines), while the heart rate monitor's output and lead-off detection (LO+ and LO-) are connected to the Teensy's analog inputs. The circuit is designed to measure both acceleration and heart rate signals, likely for a wearable or health monitoring device.
Cirkit Designer LogoOpen Project in Cirkit Designer
Image of Compass: A project utilizing Adafruit LIS3DH Triple-Axis Accelerometer in a practical application
Arduino Ethernet with LSM303DLHC Accelerometer and Compass Interface
This circuit connects an Adafruit LSM303DLHC Triple-axis Accelerometer+Magnetometer (Compass) to an Arduino Board Ethernet using I2C communication protocol. The SCL and SDA pins of the sensor are connected to the A5 and A4 pins of the Arduino, respectively, for serial clock and data transfer. The sensor is powered by the Arduino's 5V output, and both devices share a common ground.
Cirkit Designer LogoOpen Project in Cirkit Designer
Image of SYS Circuit: A project utilizing Adafruit LIS3DH Triple-Axis Accelerometer in a practical application
ADXL335 Accelerometer Data Visualization with Oscilloscope
This circuit connects an AITrip ADXL335 GY-61 accelerometer to an oscilloscope for signal visualization and a 3xAA battery pack for power. The accelerometer's Z-axis output is directly monitored on the oscilloscope, allowing for real-time observation of acceleration changes along that axis. The circuit is likely used for educational or testing purposes to demonstrate how the accelerometer responds to motion.
Cirkit Designer LogoOpen Project in Cirkit Designer

Common Applications

  • Motion detection and gesture recognition
  • Orientation sensing for mobile devices
  • Tilt sensing in robotics and drones
  • Step counting and activity tracking in wearables
  • Vibration monitoring in industrial systems

Technical Specifications

The Adafruit LIS3DH accelerometer offers a range of features and specifications that make it suitable for a wide variety of applications.

Key Technical Details

Parameter Specification
Operating Voltage 1.7V to 3.6V
Communication Interface I2C (default) or SPI
Measurement Range ±2g, ±4g, ±8g, ±16g (configurable)
Output Resolution 16-bit
Data Rate 1 Hz to 5.3 kHz
Operating Temperature -40°C to +85°C
Dimensions 2.0mm x 2.0mm x 1.0mm

Pin Configuration and Descriptions

The LIS3DH breakout board from Adafruit includes the following pins:

Pin Name Description
VIN Power input (3.3V or 5V). Regulated down to the sensor's operating voltage.
GND Ground connection.
SCL I2C clock line (or SPI clock line in SPI mode).
SDA I2C data line (or SPI MOSI line in SPI mode).
SDO I2C address selection (connect to GND for 0x18 or VIN for 0x19).
CS Chip select for SPI mode (leave unconnected for I2C mode).
INT1 Interrupt 1 output (configurable).
INT2 Interrupt 2 output (configurable).

Usage Instructions

The Adafruit LIS3DH can be used in either I2C or SPI mode, depending on your application. Below are the steps to integrate the sensor into your project.

Connecting the LIS3DH to an Arduino UNO (I2C Mode)

  1. Wiring: Connect the LIS3DH breakout board to the Arduino UNO as follows:

    • VIN5V on Arduino
    • GNDGND on Arduino
    • SCLA5 on Arduino (I2C clock line)
    • SDAA4 on Arduino (I2C data line)
    • Leave CS unconnected for I2C mode.
    • Connect SDO to GND for I2C address 0x18 or to VIN for 0x19.
  2. Install the Adafruit LIS3DH Library:

    • Open the Arduino IDE.
    • Go to SketchInclude LibraryManage Libraries.
    • Search for "Adafruit LIS3DH" and install the library.
  3. Example Code: Use the following example code to read acceleration data from the LIS3DH:

    #include <Wire.h>
    #include <Adafruit_LIS3DH.h>
    #include <Adafruit_Sensor.h>
    
    // Create an LIS3DH object using I2C
    Adafruit_LIS3DH lis = Adafruit_LIS3DH();
    
    void setup() {
      Serial.begin(9600);
      // Initialize the LIS3DH sensor
      if (!lis.begin(0x18)) { // 0x18 is the default I2C address
        Serial.println("Could not find a valid LIS3DH sensor, check wiring!");
        while (1); // Halt execution if sensor is not found
      }
      Serial.println("LIS3DH initialized!");
    
      // Set the range to ±2g (other options: ±4g, ±8g, ±16g)
      lis.setRange(LIS3DH_RANGE_2_G);
      Serial.println("Range set to ±2g");
    }
    
    void loop() {
      // Create a variable to store acceleration data
      sensors_event_t event;
      lis.getEvent(&event);
    
      // Print acceleration data to the Serial Monitor
      Serial.print("X: "); Serial.print(event.acceleration.x); Serial.print(" m/s^2 ");
      Serial.print("Y: "); Serial.print(event.acceleration.y); Serial.print(" m/s^2 ");
      Serial.print("Z: "); Serial.print(event.acceleration.z); Serial.println(" m/s^2");
    
      delay(500); // Wait 500ms before the next reading
    }
    

Important Considerations

  • Power Supply: Ensure the sensor is powered within its operating voltage range (1.7V to 3.6V). The breakout board includes a voltage regulator, so it can be powered with 3.3V or 5V.
  • I2C Address: The default I2C address is 0x18. If SDO is connected to VIN, the address changes to 0x19.
  • Interrupts: The INT1 and INT2 pins can be configured for various interrupt events, such as free-fall detection or activity recognition.

Troubleshooting and FAQs

Common Issues

  1. Sensor Not Detected:

    • Cause: Incorrect wiring or I2C address mismatch.
    • Solution: Double-check the wiring and ensure the correct I2C address is used in the code.
  2. No Data Output:

    • Cause: The sensor is not initialized properly.
    • Solution: Verify that the lis.begin() function returns true. Check the power supply and connections.
  3. Inaccurate Readings:

    • Cause: Incorrect range setting or external vibrations.
    • Solution: Set the appropriate range using lis.setRange() and minimize external vibrations.
  4. Interrupts Not Working:

    • Cause: Interrupt pins not configured correctly.
    • Solution: Refer to the Adafruit LIS3DH library documentation for interrupt configuration.

FAQs

Q: Can the LIS3DH be used with a 3.3V microcontroller?
A: Yes, the breakout board includes level-shifting circuitry, making it compatible with both 3.3V and 5V logic levels.

Q: How do I switch between I2C and SPI modes?
A: For I2C mode, leave the CS pin unconnected. For SPI mode, connect CS to a GPIO pin and configure the library accordingly.

Q: What is the maximum sampling rate of the LIS3DH?
A: The LIS3DH supports data rates up to 5.3 kHz, but higher rates may increase power consumption.

Q: Can the LIS3DH detect free-fall events?
A: Yes, the LIS3DH includes built-in free-fall detection, which can be configured using the interrupt pins.

By following this documentation, you can effectively integrate the Adafruit LIS3DH accelerometer into your projects and troubleshoot common issues.