Creative Commons images are CC BY 2.0

Description: This is a breakout board for the ultra low-power LIS331HH three axis linear accelerometer. The device has a digital I2C/SPI serial interface which makes it ideal for using in embedded applications. All major pins are broken out to 0.1" spaced headers. It also includes two mounting holes as well.

The LIS331HH is an ultra low-power full-scale three axis MEMS linear accelerometer. It has a digital I2C/SPI serial interface which makes it ideal for using in embedded applications. The device also features ultra low-power operational modes that allow advanced power saving and smart sleep to wake-up functions.

The LIS331HH has dynamically user selectable full scales of +-6g/+-12g/+-24g and is capable of measuring accelerations with output data rates from 0.5 Hz to 1kHz. The self-test capability allows the user to check the functioning of the sensor in the final application.

Not sure which accelerometer is right for you? Our Accelerometer and Gyro Buying Guide might help!


  • 2.16-3.6V input
  • Ultra low-current mode, down to 10uA
  • 6g/12g/24g selectable
  • I2C/SPI digital output
  • 16 bit data output


Recommended Products

Customer Comments

  • We have bought several Sparfkun Accelerometer Breakout boards. Two are currently attached to a Teensy 3.2 USB development board who samples at 1000 Hz. We notice that the accelerometer values sometimes don’t vary every millisecond.

    Is it possible that the accelerometers do not reach the 1000 Hz as stated in the product sheet??

  • we are trying to interface LIS331HH with MSP430 MCU but we are getting the same value on MISO pin which we are sending on MOSI pin of Accelerometer , just like we are getting a echo output from input.. please help me to sort out this.

  • This question references the LIS331 Data Sheet:

    Table 4 (p10) Table 19 (p25)

    Does anyone know why the low pass frequencies given in table 19 are more half of the out put data rates (ODRs), even though the band widths are cited in table 4 are half of the ODRs? Normally you wouldn’t want the data reaching the sampler to have any frequencies over half the ODR removed so that they don’t create aliases in the sampled data.

  • Has anyone got this sensor to work on the PSOC3 or 4. I have been trying for weeks and can’t seam to be getting to work. I am trying to run it off 4 wire SPI.

  • Hello, I am using this accelerometer through SPI. I can read data but I think something is not very good. When I set register 0x20 to 0x37 and then read it, it returns 0x3F (instead of 0x37). Does anybody know why that is happening?

  • I am putting this and an altitude sensor on a model rocket with a data logger. I can’t wait!

  • This is definitely got the range +-6g/+-12g/+-24g right?

    My unit seems to cap at +-2g if i set register to lowest range and +-8 at highest.

    I assume I have scaled in the code correctly because I see a total of 1g when the unit has axis orientated inline with gravity.

    Anybody else seen this?

    • I bought this product months ago, it works fine.

      did you check the lis331 chip on PCB? is it marked as “lis331hh” or something else like “lis331dlh” or ‘lis331dh’?

      if it is lis331hh, it is definitely got the range +-6g/+-12g/+-24g! if no, there must be something wrong.

  • Quick “Hidden Gem” from the Data Sheet - Unlike many I2C devices, doing a multiple-byte read (e.g. to read all x,y,z values) does not automatically advance the register pointer, unless you set bit 7 in the register address. Reading 6 values from register 0x28 returns you the low order x-acceleration byte 6 times - reading 6 values from register 0xA8 will return the 3 axis 16 bit acceleration values.

  • are you sure this thing gives 16-bit data output? From the resolution in the datasheet, it looks like it’s 12-bits not 16… Can someone double-check this please?

    • The data output is 16 bits but right 4 bits are ‘0000’ which is not mentioned in datasheet I think(at least I have not found and I figured out by checking the data output). hope this help.^_^

  • I have been looking to use this board and compile the code.

    The sample code talks about using arduino but the code isn’t for the arduino IDE and I don’t know what was used to compile it.

    Any chance of getting code that works as demo code for the arduino IDE ?

    This device is pretty useless to me atm.

  • Nice accelerometer, but just in case no one’s noticed, the pin labels (back side) are the wrong direction. Not a big deal, but if you’re taking the time to label them, label them correctly.

  • OK. My brilliant plan – output from LIS331 (in SPI mode) to data in (DIN) on an XBee for remote accelerometer (talking to an XBee on an XBee Dongle).
    Problem: the 331 needs a clock circuit (for either SPI or I2C). Suggestions needed ASAP. I don’t think a 555 timer will work, but if it will, can someone give me the C/R1/R2 values if I want 9600 baud SPI output?
    Thanks in advance.

    • Nevermind, these two pages helped:
      Off to RadioShack (sorry!) for a 555 and some resistors…

  • The example code uses the SPI interface, I wrote an I2C implementation here:

  • when using i2C to write and read the registers of this accer, all the data I read from all registers is 0x31. I already send data 0x37 to register 0x20. Reading the register 0x20 turns out 0x31 and so the other registers. Could anyone help?

  • Why it Accelerometer module in “Breakout Boards”?

Customer Reviews

5 out of 5

Based on 2 ratings:

Currently viewing all customer reviews.

Model rocket acceleration

I’ll be ordering a bunch more of these for my freshman community-college course in microcontroller-based instrumentation systems. We’ll send them up in model rockets (“E” motors) with an Arduino Feather datalogger and a temperature/pressure (thus altitude) sensor. I chose this LIS331 accelerometer because of its 24g range. I hacked the driver to work with I2C, and find I can take 3-axis acceleration data and temp/pressure data at a rate of at least 100 datapoints per second, and write them to SD. Thanks for making this unit available!