LIS3DH Hookup Guide
The LIS3DH is a triple axis accelerometer you can use to add translation detection to your project. The “3D” in LIS3DH refers to the fact that it is a 3DoF, or 3 Degrees of Freedom. Additionally, it has a few analog inputs to play with, and it has some built in movement detection features to detect things like free-fall, and to indicate if the FIFO buffers are full.
If you’re looking for something small and inexpensive, and are only measuring acceleration, this is the product for you. Other inertial measurement units (or IMUs), such as the LSM9DS1; the LSM6DS3; or the LSM303C, can provide additional space location data such as gyroscopic or magnetometric.
This guide presents the basics of plugging the board into a RedBoard, shows how to use the Arduino library to get acceleration data live or by FIFO collection, and describes the library usage.
To follow along, you’ll need the following materials:
- LIS3DH Breakout Board
- Arduino UNO, RedBoard, or another Arduino-compatible board
- Straight Male Headers – Or wire. Something to connect between the breakout and a breadboard.
- Breadboard – Any size (even mini) should do.
- M/M Jumper Wires – To connect between Arduino and breadboard.
A logic level shifter is required for any 5V-operating Arduino (UNO, RedBoard, Leonardo, etc). If you use a 3.3V-based ‘duino – like the Arduino Pro 3.3V or 3.3V Pro Mini – there is no need for level shifting.
If you’re not familiar with some of the concepts below, we recommend checking out that tutorial before continuing on.
- Accelerometer Basics
- Serial Peripheral Interface (SPI)
- Inter-IC Communication (I2C)
- Logic Levels
- Bi-Directional Level Shifter Hookup Guide
Also, the following ST documents are helpful for advanced users:
- LIS3DH_Datasheet – Hardware information and register map.
- LIS3DH_AppNote – Descriptive material showing basic usage.