User Manual

118
Lesson 17 ADXL345
Introduction
In this lesson, w e will learn how to use the acceleration sensor ADXL345.
Components
- 1 * Raspberry Pi
- 1 * Breadboard
- 1 * ADXL345 module
- Jumper wires
Principle
ADXL345
The ADXL345 is a small, thin, low power, 3-axis accelerometer w ith high resolution (13-bit)
measurement at up to ±16 g. Digital output data is formatted as 16-bit two’s complement
and is accessible through either an SPI (3- or 4-wire) or I2C digital interface.
The ADXL345 is w ell suited to measure the static acceleration of gravity in tilt-sensing
applications, as well as dynamic acceleration resulting from motion or shock. Its high
resolution (4 mg/LSB) enables the inclination change measurement by less than 1.0°. And the
excellent sensitivity (3.9mg/LSB @2g) prov ides a high-precision output of up to ±16g.
In this experiment, I2C digital interface is used.
ADXL345 works like this:
Axes of detection by ADXL345
When you place the module face up, Z_OUT is at the maximum which is +1g; face down,
Z_OUT is at the minimum. No matter of face, as long as it's placed on a level surface, X_OUT
increases along the Ax axis direction, so does Y_OUT along the Ay axis. See the picture below.
Thus, when you rotate the module, you can see the changes of X_OUT, Y_OUT, and Z_OUT.
SunFounder