Stufin
Home Quick Cart Profile

ADXL345 Digital Angle Acceleration Sensor Module

Buy Now

Supply Voltage

2.0V to 3.6V

Current Consumption

0.1mA to 0.4mA

Digital Output

SPI or IC interface

Resolution

10-bit or 12-bit

Acceleration Range

2g, 4g, 8g, or 16g

Bandwidth

0.5Hz to 2.5kHz

Sensitivity

256 LSB/g

Accuracy

2%

Operating Temperature

-40C to 85C

Storage Temperature

-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

Datasheet

ADXL345 Digital Angle Acceleration Sensor Module datasheet

Application Notes

AN-1047, AN-1071, and AN-1116

Evaluation Boards

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.

Pin Configuration

  • ADXL345 Digital Angle Acceleration Sensor Module Pinout Explanation
  • The ADXL345 Digital Angle Acceleration Sensor Module is a 3-axis accelerometer that measures acceleration, tilt, and vibration. It has 14 pins, which are explained below:
  • Pinout Description:
  • 1. VCC (Pin 1):
  • Function: Power supply pin
  • Description: Connect to a 3.3V or 5V power source
  • Recommended operating voltage: 2.0V to 3.6V
  • 2. GND (Pin 2):
  • Function: Ground pin
  • Description: Connect to the ground of the system
  • 3. CS (Pin 3):
  • Function: Chip Select pin
  • Description: Active low, used to select the ADXL345 device when communicating via SPI
  • 4. INT1 (Pin 4):
  • Function: Interrupt pin 1
  • Description: Can be configured to generate interrupts for various events (e.g., data ready, over-range, etc.)
  • 5. INT2 (Pin 5):
  • Function: Interrupt pin 2
  • Description: Can be configured to generate interrupts for various events (e.g., data ready, over-range, etc.)
  • 6. SDO (Pin 6):
  • Function: Serial Data Output pin
  • Description: Used for SPI data output
  • 7. SDI (Pin 7):
  • Function: Serial Data Input pin
  • Description: Used for SPI data input
  • 8. SCL (Pin 8):
  • Function: Serial Clock pin
  • Description: Used for SPI clock input
  • 9. DEN (Pin 9):
  • Function: Data Enable pin (optional)
  • Description: When connected to VCC, enables the ADXL345 to output data on SDO pin
  • 10. FSYNC (Pin 10):
  • Function: Frame Synchronization pin
  • Description: Used for synchronizing the accelerometer's output data with an external clock signal
  • 11. SELF (Pin 11):
  • Function: Self-Test pin
  • Description: When connected to GND, enables the ADXL345's self-test mode
  • 12. XOUT (Pin 12):
  • Function: Analog output pin for X-axis acceleration
  • Description: Outputs an analog signal proportional to the X-axis acceleration
  • 13. YOUT (Pin 13):
  • Function: Analog output pin for Y-axis acceleration
  • Description: Outputs an analog signal proportional to the Y-axis acceleration
  • 14. ZOUT (Pin 14):
  • Function: Analog output pin for Z-axis acceleration
  • Description: Outputs an analog signal proportional to the Z-axis acceleration
  • Connection Structure:
  • To connect the ADXL345 module, follow these steps:
  • 1. Power Connection:
  • Connect VCC (Pin 1) to a 3.3V or 5V power source
  • Connect GND (Pin 2) to the ground of the system
  • 2. SPI Connection:
  • Connect CS (Pin 3) to a digital output pin of your microcontroller (e.g., Arduino, Raspberry Pi)
  • Connect SDO (Pin 6) to a digital input pin of your microcontroller
  • Connect SDI (Pin 7) to a digital output pin of your microcontroller
  • Connect SCL (Pin 8) to a digital output pin of your microcontroller (clock signal)
  • 3. Interrupt Connection (Optional):
  • Connect INT1 (Pin 4) and/or INT2 (Pin 5) to digital input pins of your microcontroller to receive interrupt signals
  • 4. Analog Output Connection (Optional):
  • Connect XOUT (Pin 12), YOUT (Pin 13), and ZOUT (Pin 14) to analog input pins of your microcontroller or an ADC (Analog-to-Digital Converter) if you want to read the analog acceleration values directly
  • Note: Make sure to consult the ADXL345 datasheet and your microcontroller's documentation for specific connection and configuration details.

Code Examples

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.