ADXL345 Accelerometer 3DOF - Raspberry Pi, Arduino, ESP32 I2C Accelerometer | Klipper Tuning

What is the ADXL345?

The ADXL345 is a highly precise 3-axis accelerometer designed for a wide range of applications, from motion sensing and tilt detection to vibration analysis and shock detection. This sensor is particularly popular for its integration with Raspberry Pi, Arduino, and ESP32, and it excels in Klipper tuning for 3D printers. With its flat finish and pre-attached pins, the ADXL345 ensures stability, reliability, and ease of use, making it a favorite among DIY enthusiasts and professionals.

Explore More About This Product

Check out these videos and articles to gain deeper insights into how you can make the most of this product:

Operating Mechanisms of the ADXL345

The ADXL345 operates by utilizing its integrated sensors to measure acceleration along the X, Y, and Z axes. Here's a breakdown of its operating mechanisms:

  1. 3-Axis Accelerometer: The accelerometer measures linear acceleration in three directions: X, Y, and Z. This allows it to detect motion, tilt, and impacts, making it ideal for a wide range of applications, including Klipper tuning for 3D printers.
  2. Flat Finish for Stability: The ADXL345 features a redesigned flat finish with pre-attached pins for improved stability and performance. This design ensures reliable measurements, especially for Klipper firmware and other demanding applications.
  3. Pre-Soldered Convenience: The ADXL345 comes with pre-soldered pins, eliminating the need for soldering skills or additional equipment. This user-friendly design saves time and effort, making it accessible for both beginners and experienced users.
  4. Communication Interface: The ADXL345 supports both SPI and I2C interfaces, allowing for flexible and easy integration with various microcontrollers, including Raspberry Pi, Arduino, and ESP32. The sensor's registers can be accessed and configured through simple commands, allowing for customizable data acquisition and control.

By combining these mechanisms, the ADXL345 provides a comprehensive solution for motion sensing and control, making it an essential component in many modern electronic projects. 


ADXL345 Pinout

VCC (Power Supply: +3.3V to +5V)

This pin is used to supply power to the ADXL345. The sensor operates within a voltage range of 3.3V to 5V.
Connection: Connect this pin to the 3.3V or 5V power supply from your microcontroller or development board.

GND (Ground)

This pin is the ground connection for the sensor. It should be connected to the ground of your power supply or microcontroller.
Connection: Connect this pin to the ground (GND) of your microcontroller or development board.

SCL (Serial Clock)

This pin is used for the I2C clock signal. It synchronizes the data transfer between the ADXL345 and the microcontroller.
Connection: Connect this pin to the I2C clock pin (SCL) on your microcontroller.

SDA (Serial Data)

This pin is used for the I2C data signal. It is used for bidirectional data transfer between the sensor and the microcontroller.
Connection: Connect this pin to the I2C data pin (SDA) on your microcontroller.

CS (Chip Select)

This pin is used to select between the SPI and I2C communication protocols.
Connection: Connect this pin to VCC for I2C mode or to GND for SPI mode.

SDO (Serial Data Output for SPI)

This pin is used for the SPI data output. It transfers data from the sensor to the microcontroller in SPI mode.
Connection: Connect this pin to the SPI data input pin (MISO) on your microcontroller if using SPI mode.

INT1 (Interrupt 1)

This pin is used for the first interrupt output of the ADXL345. It can be programmed to trigger various events such as motion detection, free-fall detection, or tapping. You can configure the specific conditions that trigger this interrupt through the sensor’s register settings.

Connect this pin to an interrupt-capable GPIO pin on your microcontroller. Configure the microcontroller to monitor this pin for interrupt signals, allowing your system to react immediately to changes detected by the sensor.

INT2 (Interrupt 2)

This pin functions similarly to INT1 but provides a secondary interrupt channel. This allows you to configure the sensor for two different interrupt-driven events simultaneously, enhancing the application's ability to perform multiple monitoring tasks.

Similar to INT1, connect this pin to another interrupt-capable GPIO on your microcontroller. This setup allows the ADXL345 to manage more complex event detection and handling without polling the sensor for status continually.

Technical Specifications

Specification Details
Sensor Type 3-axis accelerometer
Measurement Range ±2g, ±4g, ±8g, or ±16g
Interface I2C and SPI (3- and 4-wire)
Power Supply 3.3V to 5V
Current Consumption 40uA (low power mode), 150uA (normal mode), 320uA (high resolution mode)
Operating Temperature -40°C to +85°C
Dimensions 2.8 x 1.4 x 1 cm (1.1” x 0.55" x 0.4”)

Explore More at Our Store!

Discover exclusive deals and new arrivals just a click away.

Visit Our Store
Back to blog