
This circuit features an Arduino Nano interfaced with an ADXL345 accelerometer for measuring acceleration. The Arduino provides power and I2C communication to the accelerometer, enabling it to capture and process motion-related data.
The ADXL345 is a small, thin, low-power 3-axis accelerometer capable of high-resolution (13-bit) measurements at up to ±16g. It is designed for applications requiring precise motion sensing, tilt detection, and gesture recognition. The device supports both I2C and SPI communication protocols, making it versatile and easy to integrate into a wide range of projects.

This circuit features an Arduino Nano interfaced with an ADXL345 accelerometer for measuring acceleration. The Arduino provides power and I2C communication to the accelerometer, enabling it to capture and process motion-related data.

This circuit interfaces an ADXL345 accelerometer with an Arduino Leonardo via I2C communication. The Arduino provides power and ground to the accelerometer and reads acceleration data through the SDA and SCL lines.

This circuit features an Arduino UNO microcontroller interfaced with an Adafruit ADXL345 accelerometer for motion detection, powered by two parallel-connected 18650 Li-ion batteries. The accelerometer communicates with the Arduino over I2C, and the system is designed for further code development to utilize the motion sensing capabilities.

This circuit is a sensor monitoring system powered by a 7.4V battery, regulated to 5V using a 7805 voltage regulator. It uses an ESP32 microcontroller to interface with an ADXL345 accelerometer, INA219 current sensor, BMP280 pressure sensor, and an IR sensor, all connected via I2C and GPIO for data acquisition and processing.
The ADXL345 offers a robust set of features and specifications that make it suitable for various applications. Below are the key technical details:
| Parameter | Value |
|---|---|
| Supply Voltage (VDD) | 2.0V to 3.6V |
| I/O Voltage (VDDIO) | 1.7V to VDD |
| Measurement Range | ±2g, ±4g, ±8g, ±16g |
| Resolution | 13-bit |
| Communication Protocols | I2C (up to 400 kHz), SPI (up to 5 MHz) |
| Operating Temperature | -40°C to +85°C |
| Power Consumption | 40 µA in measurement mode, 0.1 µA in standby mode |
The ADXL345 is typically available in a 14-pin LGA package. Below is the pin configuration:
| Pin Number | Pin Name | Description |
|---|---|---|
| 1 | VDD | Power supply (2.0V to 3.6V) |
| 2 | GND | Ground |
| 3 | CS | Chip Select (SPI mode) |
| 4 | INT1 | Interrupt 1 output |
| 5 | INT2 | Interrupt 2 output |
| 6 | SDO/ALT_ADDR | SPI Data Out / I2C Alternate Address Select |
| 7 | SDA/SDI/SDIO | I2C Data / SPI Data In / Data I/O |
| 8 | SCL/SCLK | I2C Clock / SPI Clock |
| 9-14 | NC | No Connection |
The ADXL345 can be used in a variety of circuits and applications. Below are the steps and considerations for using the component effectively.
The ADXL345 can communicate with an Arduino UNO using the I2C protocol. Follow these steps to connect the device:
Wiring:
VDD pin of the ADXL345 to the 3.3V pin on the Arduino.GND pin of the ADXL345 to the GND pin on the Arduino.SDA pin of the ADXL345 to the A4 pin on the Arduino (I2C data line).SCL pin of the ADXL345 to the A5 pin on the Arduino (I2C clock line).SDO/ALT_ADDR pin to GND.Install Required Libraries:
Adafruit_ADXL345 library from the Arduino Library Manager.Example Code: Below is an example Arduino sketch to read acceleration data from the ADXL345:
#include <Wire.h>
#include <Adafruit_Sensor.h>
#include <Adafruit_ADXL345_U.h>
// Create an ADXL345 object
Adafruit_ADXL345_Unified accel = Adafruit_ADXL345_Unified(12345);
void setup() {
Serial.begin(9600);
// Initialize the ADXL345
if (!accel.begin()) {
Serial.println("Failed to find ADXL345 chip");
while (1); // Halt if the sensor is not detected
}
Serial.println("ADXL345 initialized successfully!");
// Set the range to ±16g
accel.setRange(ADXL345_RANGE_16_G);
Serial.println("Range set to ±16g");
}
void loop() {
sensors_event_t event;
accel.getEvent(&event);
// Print acceleration data
Serial.print("X: "); Serial.print(event.acceleration.x); Serial.print(" m/s^2 ");
Serial.print("Y: "); Serial.print(event.acceleration.y); Serial.print(" m/s^2 ");
Serial.print("Z: "); Serial.print(event.acceleration.z); Serial.println(" m/s^2");
delay(500); // Delay for readability
}
INT1 and INT2 pins can be configured for specific events, such as free-fall detection or activity monitoring.No Data Output:
Inconsistent Readings:
Device Not Detected:
0x53) and try scanning for devices using an I2C scanner sketch.Can the ADXL345 operate at 5V?
How do I change the measurement range?
setRange() function in the library to set the range to ±2g, ±4g, ±8g, or ±16g.What is the default I2C address of the ADXL345?
0x53. It can be changed to 0x1D by connecting the SDO/ALT_ADDR pin to VDD.By following this documentation, you can effectively integrate the ADXL345 into your projects for reliable motion sensing and acceleration measurements.