Cirkit Designer Logo
Cirkit Designer
Your all-in-one circuit design IDE
Home / 
Project Documentation

Arduino UNO and ADXL345 Accelerometer Data Logger

Image of Arduino UNO and ADXL345 Accelerometer Data Logger

Circuit Documentation

Summary of the Circuit

This circuit integrates an Arduino UNO microcontroller with an Adafruit ADXL345 accelerometer and is powered by two 18650 Li-ion batteries. The Arduino UNO serves as the central processing unit, interfacing with the ADXL345 to collect acceleration data. The batteries provide the necessary power to the system, with one battery connected to the Arduino's Vin pin for direct voltage input and the other ensuring a common ground across the components. The ADXL345 is powered by the 5V output from the Arduino and communicates with the microcontroller via the I2C protocol, using the SDA and SCL lines.

Component List

Arduino UNO

  • Description: A microcontroller board based on the ATmega328P.
  • Purpose: Acts as the central processing unit for controlling the ADXL345 accelerometer and processing its data.

Adafruit ADXL345

  • Description: A small, thin, low power, 3-axis accelerometer with high resolution (13-bit) measurement.
  • Purpose: Provides acceleration data to the Arduino UNO for processing.

18650 Li-ion Battery (x2)

  • Description: A rechargeable battery commonly used in laptops and high-power handheld devices.
  • Purpose: Supplies power to the Arduino UNO and the ADXL345 accelerometer.

Wiring Details

Arduino UNO

  • 5V: Provides power to the ADXL345 accelerometer.
  • GND: Connected to the negative terminal of both 18650 Li-ion batteries for a common ground.
  • Vin: Receives power from the positive terminal of one of the 18650 Li-ion batteries.
  • A4 (SDA): Connected to the SDA/SDIO pin of the ADXL345 for I2C data communication.
  • A5 (SCL): Connected to the SCL pin of the ADXL345 for I2C clock signal.

Adafruit ADXL345

  • VIN: Connected to the 5V output from the Arduino UNO.
  • GND: Shares a common ground with the Arduino UNO and one of the 18650 Li-ion batteries.
  • SDA/SDIO: Connected to the A4 (SDA) pin on the Arduino UNO for I2C data communication.
  • SCL: Connected to the A5 (SCL) pin on the Arduino UNO for I2C clock signal.

18650 Li-ion Battery

  • + (Positive Terminal): One battery is connected to the Vin pin of the Arduino UNO.
  • - (Negative Terminal): Both batteries are connected to the GND pin of the Arduino UNO, with one also connected to the GND pin of the ADXL345.

Documented Code

Arduino UNO Code (sketch.ino)

void setup() {
  // put your setup code here, to run once:

}

void loop() {
  // put your main code here, to run repeatedly:

}

This code template provides the basic structure for an Arduino sketch, with setup() function to initialize settings and loop() function to contain the main logic that will run continuously. The user is expected to fill in these functions with code to initialize the ADXL345 accelerometer and to read and process the acceleration data.