2.0V to 3.6V
2.0V to 3.6V
0.1mA to 0.4mA
SPI or IC interface
10-bit or 12-bit
2g, 4g, 8g, or 16g
0.5Hz to 2.5kHz
256 LSB/g
2%
-40C to 85C
-40C to 150C
Applications
Robotics and autonomous systems
Industrial vibration monitoring
Wearable devices and gaming controllers
Navigation and balance systems
Motion detection and analysis
Package and Dimensions
The ADXL345 Digital Angle Acceleration Sensor Module is typically supplied in a compact, 25-pin LFCSP (Lead Frame Chip Scale Package) package with dimensions of 3mm x 3mm x 0.95mm. The module is also available in other package options, including a 5-pin SOT23 package.
Documentation and Resources
ADXL345 Digital Angle Acceleration Sensor Module datasheet
AN-1047, AN-1071, and AN-1116
ADXL345 Evaluation Board and ADXL345 Breakout Board
By providing accurate and reliable acceleration data, the ADXL345 Digital Angle Acceleration Sensor Module is an ideal component for a wide range of applications that require motion detection, orientation, and vibration analysis.
ADXL345 Digital Angle Acceleration Sensor Module Documentation
Overview
The ADXL345 is a low-power, 3-axis digital accelerometer module designed to measure static acceleration, vibration, and orientation. It is a popular choice for IoT applications, robotics, and wearable devices. This module provides a high-resolution, 13-bit analog-to-digital converter (ADC) and a built-in FIFO buffer to store acceleration data.
Pinout and Interface
The ADXL345 module typically has the following pinout:
VCC: Power supply (3.3V or 5V)
GND: Ground
SCL: I2C clock line
SDA: I2C data line
INT1 and INT2: Interrupt pins (optional)
The ADXL345 communicates with a microcontroller or other devices using the I2C protocol.
Code Examples
### Example 1: Measuring Acceleration with Arduino
This example demonstrates how to connect the ADXL345 to an Arduino board and read the acceleration data in three axes.
```c++
#include <Wire.h>
#define ADXL345_ADDRESS 0x1D // Default I2C address
void setup() {
Serial.begin(9600);
Wire.begin(); // Initialize I2C interface
}
void loop() {
int16_t x, y, z; // Acceleration values
// Read acceleration data from ADXL345
Wire.beginTransmission(ADXL345_ADDRESS);
Wire.write(0x32); // Register address for X-axis data
Wire.endTransmission();
Wire.requestFrom(ADXL345_ADDRESS, 6); // Request 6 bytes of data
x = Wire.read() << 8 | Wire.read();
y = Wire.read() << 8 | Wire.read();
z = Wire.read() << 8 | Wire.read();
// Print acceleration values
Serial.print("X: ");
Serial.print(x);
Serial.print(" Y: ");
Serial.print(y);
Serial.print(" Z: ");
Serial.println(z);
delay(100);
}
```
### Example 2: Measuring Tilt Angle with Raspberry Pi (Python)
This example demonstrates how to connect the ADXL345 to a Raspberry Pi and calculate the tilt angle in degrees.
```python
import smbus
import math
# Define I2C bus and ADXL345 address
bus = smbus.SMBus(1)
adxl345_address = 0x1D
def read_acceleration(axis):
# Read 2 bytes from the specified axis register
data = bus.read_i2c_block_data(adxl345_address, axis, 2)
return (data[1] << 8) + data[0]
def calculate_tilt_angle(x, y, z):
# Calculate tilt angle using acceleration values
angle = math.atan2(y, x)
return math.degrees(angle)
try:
while True:
x = read_acceleration(0x32) # X-axis register
y = read_acceleration(0x34) # Y-axis register
z = read_acceleration(0x36) # Z-axis register
tilt_angle = calculate_tilt_angle(x, y, z)
print("Tilt Angle: {:.2f} degrees".format(tilt_angle))
time.sleep(0.1)
except KeyboardInterrupt:
pass
```
These examples demonstrate the basic usage of the ADXL345 digital angle acceleration sensor module. You can modify the code to suit your specific application requirements.