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

How to Use LIS331: Examples, Pinouts, and Specs

Image of LIS331
Cirkit Designer LogoDesign with LIS331 in Cirkit Designer

Introduction

The LIS331 is a low-power, 3-axis accelerometer designed to measure acceleration in three dimensions. It is widely used in motion sensing applications, such as gesture recognition, tilt detection, and vibration monitoring. The LIS331 provides digital output via I2C or SPI interfaces, making it easy to integrate into microcontroller-based systems. Its compact size and low power consumption make it ideal for portable devices, including smartphones, fitness trackers, and gaming peripherals.

Explore Projects Built with LIS331

Use Cirkit Designer to design, explore, and prototype these projects online. Some projects support real-time simulation. Click "Open Project" to start designing instantly!
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 LIS331 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
Battery-Powered Raspberry Pi Pico GPS Tracker with Sensor Integration
Image of Copy of CanSet v1: A project utilizing LIS331 in a practical application
This circuit is a data acquisition and communication system powered by a LiPoly battery and managed by a Raspberry Pi Pico. It includes sensors (BMP280, MPU9250) for environmental data, a GPS module for location tracking, an SD card for data storage, and a WLR089-CanSAT for wireless communication. The TP4056 module handles battery charging, and a toggle switch controls power distribution.
Cirkit Designer LogoOpen Project in Cirkit Designer
ESP32-C3 Mini Based Health Monitoring System with LiPo Battery Power
Image of pp 2: A project utilizing LIS331 in a practical application
This circuit is designed for health monitoring, featuring an ESP32-C3 Mini microcontroller that collects data from a MAX30102 heart rate and SpO2 sensor, and an Adafruit LSM303DLHC accelerometer and magnetometer. The system is powered by a 3.7V LiPo battery with a 3.3V regulator, and uses I2C communication with pull-up resistors for sensor interfacing.
Cirkit Designer LogoOpen Project in Cirkit Designer
Smart Weighing System with ESP8266 and HX711 - Battery Powered and Wi-Fi Enabled
Image of gggg: A project utilizing LIS331 in a practical application
This circuit is a multi-sensor data acquisition system powered by a 18650 battery and managed by an ESP8266 microcontroller. It includes a load sensor interfaced with an HX711 module for weight measurement, an IR sensor, an ADXL345 accelerometer, a VL53L0X distance sensor, and a Neo 6M GPS module for location tracking. The system is designed for wireless data transmission and is supported by a TP4056 module for battery charging.
Cirkit Designer LogoOpen Project in Cirkit Designer

Explore Projects Built with LIS331

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 Teensy 4.1 accelerometer: A project utilizing LIS331 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 Copy of CanSet v1: A project utilizing LIS331 in a practical application
Battery-Powered Raspberry Pi Pico GPS Tracker with Sensor Integration
This circuit is a data acquisition and communication system powered by a LiPoly battery and managed by a Raspberry Pi Pico. It includes sensors (BMP280, MPU9250) for environmental data, a GPS module for location tracking, an SD card for data storage, and a WLR089-CanSAT for wireless communication. The TP4056 module handles battery charging, and a toggle switch controls power distribution.
Cirkit Designer LogoOpen Project in Cirkit Designer
Image of pp 2: A project utilizing LIS331 in a practical application
ESP32-C3 Mini Based Health Monitoring System with LiPo Battery Power
This circuit is designed for health monitoring, featuring an ESP32-C3 Mini microcontroller that collects data from a MAX30102 heart rate and SpO2 sensor, and an Adafruit LSM303DLHC accelerometer and magnetometer. The system is powered by a 3.7V LiPo battery with a 3.3V regulator, and uses I2C communication with pull-up resistors for sensor interfacing.
Cirkit Designer LogoOpen Project in Cirkit Designer
Image of gggg: A project utilizing LIS331 in a practical application
Smart Weighing System with ESP8266 and HX711 - Battery Powered and Wi-Fi Enabled
This circuit is a multi-sensor data acquisition system powered by a 18650 battery and managed by an ESP8266 microcontroller. It includes a load sensor interfaced with an HX711 module for weight measurement, an IR sensor, an ADXL345 accelerometer, a VL53L0X distance sensor, and a Neo 6M GPS module for location tracking. The system is designed for wireless data transmission and is supported by a TP4056 module for battery charging.
Cirkit Designer LogoOpen Project in Cirkit Designer

Technical Specifications

The LIS331 accelerometer offers a range of features and specifications that make it versatile for various applications. Below are the key technical details:

General Specifications

  • Operating Voltage: 2.16V to 3.6V
  • Current Consumption:
    • Normal Mode: 300 µA
    • Power-Down Mode: 1 µA
  • Measurement Range: ±2g, ±4g, ±8g (configurable)
  • Output Data Rate (ODR): 0.5 Hz to 1 kHz
  • Communication Interfaces: I2C (up to 400 kHz) and SPI (up to 10 MHz)
  • Operating Temperature Range: -40°C to +85°C
  • Package: LGA-16 (3x3x1 mm)

Pin Configuration and Descriptions

The LIS331 is housed in a 16-pin LGA package. Below is the pin configuration:

Pin Number Pin Name Description
1 VDD Power supply (2.16V to 3.6V)
2 VDD_IO I/O interface voltage supply
3 GND Ground
4 CS SPI chip select (active low)
5 SCL/SPC I2C clock / SPI serial port clock
6 SDA/SDI/SDO I2C data / SPI data input/output
7 SDO/SA0 SPI data output / I2C least significant bit of
the device address
8-16 NC Not connected (leave floating or grounded)

Usage Instructions

The LIS331 can be used in a variety of applications by interfacing it with a microcontroller via I2C or SPI. Below are the steps and considerations for using the LIS331 in a circuit:

Connecting the LIS331 to an Arduino UNO (I2C Interface)

  1. Wiring:

    • Connect the VDD pin to the Arduino's 3.3V pin.
    • Connect the GND pin to the Arduino's GND.
    • Connect the SCL/SPC pin to the Arduino's A5 (SCL) pin.
    • Connect the SDA/SDI/SDO pin to the Arduino's A4 (SDA) pin.
    • Pull-up resistors (4.7 kΩ) are recommended for the I2C lines (SCL and SDA).
  2. Arduino Code: Below is an example Arduino sketch to read acceleration data from the LIS331:

    #include <Wire.h>
    
    #define LIS331_ADDR 0x18 // I2C address of the LIS331 (SA0 = GND)
    
    // LIS331 register addresses
    #define CTRL_REG1 0x20
    #define OUT_X_L   0x28
    #define OUT_X_H   0x29
    #define OUT_Y_L   0x2A
    #define OUT_Y_H   0x2B
    #define OUT_Z_L   0x2C
    #define OUT_Z_H   0x2D
    
    void setup() {
      Wire.begin(); // Initialize I2C communication
      Serial.begin(9600); // Initialize serial communication
    
      // Configure LIS331: Enable all axes, set ODR to 100 Hz
      Wire.beginTransmission(LIS331_ADDR);
      Wire.write(CTRL_REG1);
      Wire.write(0x27); // 0x27 = 00100111 (Normal mode, all axes enabled)
      Wire.endTransmission();
    }
    
    void loop() {
      int16_t x, y, z;
    
      // Read X-axis data
      x = readAxis(OUT_X_L, OUT_X_H);
    
      // Read Y-axis data
      y = readAxis(OUT_Y_L, OUT_Y_H);
    
      // Read Z-axis data
      z = readAxis(OUT_Z_L, OUT_Z_H);
    
      // Print acceleration values
      Serial.print("X: ");
      Serial.print(x);
      Serial.print(" Y: ");
      Serial.print(y);
      Serial.print(" Z: ");
      Serial.println(z);
    
      delay(100); // Delay for readability
    }
    
    int16_t readAxis(uint8_t lowReg, uint8_t highReg) {
      Wire.beginTransmission(LIS331_ADDR);
      Wire.write(lowReg | 0x80); // Set MSB for auto-increment
      Wire.endTransmission();
      Wire.requestFrom(LIS331_ADDR, 2);
    
      uint8_t lowByte = Wire.read();
      uint8_t highByte = Wire.read();
    
      return (int16_t)((highByte << 8) | lowByte); // Combine high and low bytes
    }
    

Important Considerations

  • Power Supply: Ensure the LIS331 is powered within its operating voltage range (2.16V to 3.6V). If using a 5V microcontroller, use a voltage regulator or level shifter for compatibility.
  • Pull-Up Resistors: For I2C communication, use pull-up resistors (typically 4.7 kΩ) on the SCL and SDA lines.
  • Mounting Orientation: The LIS331 measures acceleration along three axes. Ensure proper orientation for accurate readings.
  • Configuration: The measurement range (±2g, ±4g, ±8g) and output data rate (ODR) can be configured via control registers.

Troubleshooting and FAQs

Common Issues

  1. No Communication with the LIS331:

    • Cause: Incorrect I2C address or wiring.
    • Solution: Verify the I2C address (default is 0x18 if SA0 is grounded) and check all connections.
  2. Incorrect or No Acceleration Data:

    • Cause: Improper configuration of control registers.
    • Solution: Ensure the LIS331 is configured correctly (e.g., enable axes, set ODR).
  3. High Noise in Readings:

    • Cause: Electrical noise or improper grounding.
    • Solution: Use decoupling capacitors near the power pins and ensure a solid ground connection.
  4. Device Overheating:

    • Cause: Exceeding the operating voltage range.
    • Solution: Ensure the supply voltage is within 2.16V to 3.6V.

FAQs

  • Q: Can the LIS331 be used with a 5V microcontroller?
    A: Yes, but you must use a level shifter or voltage divider for the I2C/SPI lines and a 3.3V regulator for the power supply.

  • Q: How do I change the measurement range?
    A: Write to the CTRL_REG4 register to configure the full-scale range (±2g, ±4g, or ±8g).

  • Q: What is the default output data rate (ODR)?
    A: The default ODR is 50 Hz in normal mode.

  • Q: Can I use SPI instead of I2C?
    A: Yes, the LIS331 supports both SPI and I2C. Configure the communication mode by setting the appropriate pins (CS and SDO/SA0).