
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 compact, low-power, 3-axis accelerometer that offers high-resolution (13-bit) measurement across a range of up to ±16 g. Manufactured by Adafruit, this versatile sensor is capable of providing real-time acceleration data, which makes it ideal for applications in motion detection, free-fall detection, and dynamic orientation detection. Common use cases include mobile devices, gaming systems, and activity monitoring.

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.
| Parameter | Condition | Min | Typ | Max | Unit |
|---|---|---|---|---|---|
| Supply Voltage | VDD | 2.0 | 3.3 | 3.6 | V |
| I/O Voltage | VDDIO | 1.7 | 3.3 | 3.6 | V |
| Output Current | per pin | 10 | mA | ||
| Operating Temp. | Range | -40 | +85 | °C |
| Pin Number | Name | Description |
|---|---|---|
| 1 | GND | Ground |
| 2 | VCC | Power supply (2.0V to 3.6V) |
| 3 | CS | Chip select for SPI (active low) |
| 4 | INT1 | Interrupt 1 output |
| 5 | INT2 | Interrupt 2 output |
| 6 | SDO | Serial data out for SPI / alt address for I2C |
| 7 | SDA | Serial data for I2C / MOSI for SPI |
| 8 | SCL | Serial clock for I2C / SCLK for SPI |
To use the ADXL345 in a circuit:
#include <Wire.h>
#include <Adafruit_ADXL345_U.h>
Adafruit_ADXL345_Unified accel = Adafruit_ADXL345_Unified(12345);
void setup() {
Serial.begin(9600);
if (!accel.begin()) {
Serial.println("No ADXL345 detected");
while (1);
}
accel.setRange(ADXL345_RANGE_16_G);
}
void loop() {
sensors_event_t event;
accel.getEvent(&event);
Serial.print("X: "); Serial.print(event.acceleration.x); Serial.print(" ");
Serial.print("Y: "); Serial.print(event.acceleration.y); Serial.print(" ");
Serial.print("Z: "); Serial.print(event.acceleration.z); Serial.print(" m/s^2 ");
Serial.println();
delay(500);
}
This example initializes the ADXL345 and continuously reads the acceleration data along the X, Y, and Z axes, outputting the results to the serial monitor.
Q: Can the ADXL345 be used with a 5V microcontroller? A: Yes, but ensure that the I/O voltage does not exceed 3.6V. Use level shifters if necessary.
Q: How can I change the data rate of the sensor?
A: Use the setDataRate() function provided by the Adafruit ADXL345 library to configure the output data rate.
Q: What is the purpose of the CS pin? A: The CS pin is used to select the ADXL345 when multiple devices are connected to the same SPI bus. It is not used in I2C mode.
For further assistance, consult the Adafruit ADXL345 datasheet and the library documentation.