Difference between revisions of "Digital Accelerometer ADXL345 Module"

From Wiki
Jump to: navigation, search
(Resource)
Line 43: Line 43:
 
[[File:ADXL345_bb.png]]<br>
 
[[File:ADXL345_bb.png]]<br>
 
  '''Step2:''' Open the code file(15 ADXL345\code\ADXL345) <br>
 
  '''Step2:''' Open the code file(15 ADXL345\code\ADXL345) <br>
 +
 
  '''Step3:''' Select correct Board and Port<br>
 
  '''Step3:''' Select correct Board and Port<br>
 +
 
  '''Step4:''' Upload the sketch to the SunFounder Uno board<br>
 
  '''Step4:''' Upload the sketch to the SunFounder Uno board<br>
 
     After uploading, open Serial Monitor, where you can see the data detected. When the acceleration of the module changes, the figure will change accordingly on the window.<br>
 
     After uploading, open Serial Monitor, where you can see the data detected. When the acceleration of the module changes, the figure will change accordingly on the window.<br>
Line 49: Line 51:
  
 
=='''Resource'''==
 
=='''Resource'''==
[http://wiki.sunfounder.cc/images/8/8e/ADXL345datasheet.pdf ADXL345datasheet][[File:PDF.jpg]]<br>
+
[http://wiki.sunfounder.cc/images/4/45/ADXL345datasheet.pdf ADXL345datasheet][[File:PDF.jpg]]<br>
 
[https://www.sunfounder.com/learn/Super_Kit_V3_0_for_Raspberry_Pi/lesson-17-adxl345-super-kit-v3-0-for-raspberry-pi.html Test Experiment for Raspberry Pi][[File:LINK.jpg]]
 
[https://www.sunfounder.com/learn/Super_Kit_V3_0_for_Raspberry_Pi/lesson-17-adxl345-super-kit-v3-0-for-raspberry-pi.html Test Experiment for Raspberry Pi][[File:LINK.jpg]]

Revision as of 06:31, 19 August 2017

Digital Accelerometer ADXL345 Module

Introduction

Adxl345.png

The ADXL345 is a small, thin, low power, 3-axis accelerometer with high resolution (13-bit) measurement at up to ±16 g. Digital output data is formatted as 16-bit two’s complement and is accessible through either an SPI (3- or 4-wire) or I2C digital interface.
The ADXL345 is well suited to measure the static acceleration of gravity in tilt-sensing applications, as well as dynamic acceleration resulting from motion or shock. Its high resolution (4 mg/LSB) enables the inclination change measurement by less than 1.0°. And the excellent sensitivity (3.9mg/LSB @2g) provides a high-precision output of up to ±16g.
In this experiment, I2C digital interface is used.
See the following figure for the schematic diagram. There is a 3.3v voltage regulator chip in the circuit, so you can power the module with 5V or 3.3V.

Features

Ultra low power: 25 to 130 µA at VS = 2.5 V (typ)
Power consumption scales automatically with bandwidth
User selectable fixed 10-bit resolution or 4mg/LSB scale
factor in all g-ranges, up to 13-bit resolution at ±16 g
32 level output data FIFO minimizes host processor load
Built in motion detection functions
• Tap/Double Tap detection
• Activity/Inactivity monitoring
• Free-Fall detection
Supply and I/O voltage range: 1.8 V to 3.6 V
SPI (3 and 4 wire) and I2C digital interfaces
Flexible interrupt modes – Any interrupt mappable to either
interrupt pin
Measurement ranges selectable via serial command
Bandwidth selectable via serial command
Wide temperature range (-40 to +85°C)
10,000 g shock survival
Pb free/RoHS compliant
Small and thin: 3 × 5 × 1 mm LGA package

Schematic

ADXL345 ad.png

Test

To use the ADXL345 with Arduino, you can take the following steps.

Step1:Connecting circuit 
   It can share the I2C bus with other I2C devices as long as each device has a unique address. Only 4 connections are required for I2C communication.
ADXL345 ------- Arduino Uno/Mega2560
GND --------- GND
3.3V ------- 3.3V
SCL ------- A5 Uno/pin21 Mega2560
SDA ------- A4 Uno/pin20 Mega2560

ADXL345 bb.png

Step2: Open the code file(15 ADXL345\code\ADXL345) 
Step3: Select correct Board and Port
Step4: Upload the sketch to the SunFounder Uno board
After uploading, open Serial Monitor, where you can see the data detected. When the acceleration of the module changes, the figure will change accordingly on the window.

Adxl xinaxiang.jpg

Resource

ADXL345datasheetPDF.jpg
Test Experiment for Raspberry PiLINK.jpg