Product Manual Tutorials Menu ... Search Gravity: I2C Triple Axis Accelerometer - LIS2DH SKU:SEN0224 Home > Sensors & Modules > Sensors > IMU Sensors Contents [hide] 1 2 3 4 5 Introduction Application Features Specification Tutorial 5.1 Requirements 5.2 Connection Diagram 5.3 Sample Code 5.4 Expected Results 6 FAQ 7 More Introduction Gravity: I2C Triple Axis Accelerometer DFRobot presents the ultra low-power Arduino triple axis accelerometer! This device is LIS2DH SKU:SEN0224 based around a MEMS LIS2DH chip solution and has high-performance ultra-low power mode. The module is fitted with a Gravity I2C interface for easy plug and play integration in to your projects. The build in LDO power management chip gives you a wide range of input voltages, from 3.3 - 5V. The on-board I2C level conversion also makes it compatible with 3.3 and 5V devices. Compared to traditional ADXL345, The LIS2DH accelerometer has advantages such as extra stability and more efficient power consumption. Low power mode requires only 2A, while normal mode requires 11A. At maximum the module supports an output frequency of 5.3KHz. Sensitivity levels are adjustable to either +-2g, +-4g, +-8g or +-16g and the module supports 16-bit data outputs. There are 2 independent programmable interrupt generators for free-fall and motion detection, that will activate interrupt wake-up. This module has many potential applications including wearable tech, display orientation and impact recognition. Application Motion-activated Display orientation Shake control Pedometer Gaming and virtual reality input devices Impact recognition and logging Features Gravity plug and play interface Ultra-low power (2uA) Fast response rate (up to 400KHz) Low price Compact and easy to install Specification Operating Voltage: 3.3V ~ 5V Operating Current: 2uA (low-power mode 50Hz ODR) / 11uA (normal mode 50Hz ODR) Interface: Gravity-I2C interface Adjustable Sensitivity: 2g / 4g / 8g / 16g Frequency: 1Hz ~ 5.3KHz 16-bit data output 2 independent programmable interrupt generators for free-fall and motion detection 6D/4D orientation detection Embedded Temperature Sensor Embedded FIFO 1 million grams of high impact resistance Operating Temperature: -40 ~ +85 Module Size: 26.2 x 26.2 (mm) /1.03 x 1.03 (inches) Weight: 12 g Tutorial In this tutorial, we'll show you how does the sensor work. Requirements Hardware DFRduino UNO (or similar) x 1 Gravity: I2C Triple Axis Accelerometer - LIS2DH x1 M-M/F-M/F-F Jumper wires Software Arduino IDE, Click to Download Arduino IDE from Arduino(R) Connection Diagram Sample Code Click to download Arduino LIS2DH Library How to install Libraries in Arduino IDE LIS2DH Arduino VCC GND SDA SCL 5V / 3V3 GND A4(SDA) A5(SCL) /*! * @file testLIS2DH12.ino * @brief DFRobot's Read LIS2DH12 data * @n This example is in order to achieve the serial port to receive LIS2DH12 back to the data * * @copyright [DFRobot](http://www.dfrobot.com), 2016 * @copyright GNU Lesser General Public License * @author [Wuxiao](xiao.wu@dfrobot.com) * @version V1.0 * @date 2016-10-13 * @https://github.com/DFRobot/DFRobot_LIS2DH12 */ #include #include DFRobot_LIS2DH12 LIS //Accelerometer void setup(){ Wire.begin() Serial.begin(115200) while(!Serial) delay(100) // Set measurement range // Ga: LIS2DH12_RANGE_2GA // Ga: LIS2DH12_RANGE_4GA // Ga: LIS2DH12_RANGE_8GA // Ga: LIS2DH12_RANGE_16GA while(LIS.init(LIS2DH12_RANGE_16GA) == -1){ Serial.println("No I2C devices found") delay(1000) } //Equipment connection exception or I2C address error } void loop(){ acceleration() } /*! * @brief Print the position result. */ void acceleration(void) { int16_t x, y, z delay(100) LIS.readXYZ(x, y, z) LIS.mgScale(x, y, z) Serial.print("Acceleration x: ") //print acceleration Serial.print(x) Serial.print(" mg \ty: ") Serial.print(y) Serial.print(" mg \tz: ") Serial.print(z) Serial.println(" mg") } Expected Results Open the Serial monitor, you'll get the following data. FAQ For any questions, advice or cool ideas to share, please visit the DFRobot Forum. More Schmatic Layout LIS2DH Datashett LIS2DH library (Github) Shopping from Gravity: I2C Triple Axis Accelerometer - LIS2DH or DFRobot Distributor. What links here Related changes Special pages Printable version Permanent link Page information This page was last modified on 19 May 2017, at 14:26. Content is available under GNU Free Documentation License 1.3 or later unless otherwise noted. Privacy policy About DFRobot Electronic Product Wiki and Tutorial: Arduino and Robot Wiki-DFRobot.com Disclaimers