Wish List 0

Adxl345 Tripple Axis Accelerometer Board I2C Or Spi

Rs. 90.00 Rs. 104.00

-ADXL345 Tripple Axis Accelerometer Board is a small, thin, low electricity, three-axis accelerometer with excessive resolution (13-bit) dimension at as much as ±16g.
-Digital output records is format as 16-bit twos complement and is out there through both an SPI (3- or four-wire) or I2C virtual interface.

-The ADXL345 Tripple Axis Accelerometer Board is nicely suited for mobile device applications.
-It measures the static acceleration of gravity in tilt-sensing packages, in addition to dynamic acceleration as a result of motion or shock.
-Its high decision (4 mg/LSB) permits measurement of inclination modifications less than 1.Zero°.

Applications :
-Pointing devices.
-Handsets.
-Medical Instrumentation.
-Gaming.
-Industrial instrumentation.
-Personal navigation devices.
-Hard disk drive (HDD) protection.
-Fitness equipment.
-defense and aerospace.

Features :
-Ultra-Low Power: 40µA in measurement mode, 0.1µA in standby@ 2.5V.
-Free-Fall Detection.
-Tap/Double Tap Detection.
-Flexible interrupt modes mappable to either interrupt pin Measurement ranges selectable via serial command Bandwidth selectable via serial command
-Wide temperature range (−40°C to +85°C).
-10,000 g shock survival.
-Support 5V/3.3V voltage input, onboard RT9161 power chip, lower pressure drop faster than 1117, the faster load speed of response, very suitable for high-noise power supply environment.
 User-selectable resolution
-Fixed 10-bit resolution.
-Full resolution, where resolution increases with G range, up to 13-bit resolution at ±16 g (maintaining 4 mg/LSB scale factor in all G ranges).

SPECIFICATIONS:
Supply Voltage (V)    3.3 to 5
Interface Type        I²C, SPI
Sensing Range         ±2g, ±4g, ±8g, ±16g
X-Axis Sensitivity    28.6 LSB/g
Y-Axis Sensitivity    31.2 LSB/g
Z-Axis Sensitivity    34.5 LSB/g
OVERVIEW:
Supply Voltage  3.3 V/ 5V.
Interface Type  I²C, SPI.
Sensing Range   ±2g, ±4g, ±8g, ±16g.
Sensitivity:
X                 28.6 LSB/g.
Y                 31.2 LSB/g.
Z                 34.5 LSB/g.
Ultra Low Power   40µA in measurement mode, 0.1µA in standby@ 2.5V.

PACKAGE INCLUDES:

1 PCS x Adxl345 Tripple Axis Accelerometer Board I2C Or Spi


//SOURCE CODE TAKEN FROM BELOW LINK

//https://forum.arduino.cc/index.php?topic=132879.0



#include <Wire.h>

// include the library code for ADXL345:

#include <ADXL345.h>

// include the library code for LCD:

#include <LiquidCrystal.h>


// initialize the LCD library with the numbers of the interface pins

LiquidCrystal lcd(7, 6, 5, 4, 3, 2);



ADXL345 adxl; //variable adxl is an instance of the ADXL345 library




void setup(){

 

 // set up the LCD's number of columns and rows:

 lcd.begin(20, 4);

 // Print a message to the LCD.

 lcd.print("Czas od resetu:");


 adxl.powerOn();

 

 

 

//code from old sample code attached to the library.

 //set activity/ inactivity thresholds (0-255)

 adxl.setActivityThreshold(75); //62.5mg per increment

 adxl.setInactivityThreshold(75); //62.5mg per increment

 adxl.setTimeInactivity(10); // how many seconds of no activity is inactive?


 //look of activity movement on this axes - 1 == on; 0 == off

 adxl.setActivityX(1);

 adxl.setActivityY(1);

 adxl.setActivityZ(1);


 //look of inactivity movement on this axes - 1 == on; 0 == off

 adxl.setInactivityX(1);

 adxl.setInactivityY(1);

 adxl.setInactivityZ(1);


 //look of tap movement on this axes - 1 == on; 0 == off

 adxl.setTapDetectionOnX(0);

 adxl.setTapDetectionOnY(0);

 adxl.setTapDetectionOnZ(1);


 //set values for what is a tap, and what is a double tap (0-255)

 adxl.setTapThreshold(50); //62.5mg per increment

 adxl.setTapDuration(15); //625?s per increment

 adxl.setDoubleTapLatency(80); //1.25ms per increment

 adxl.setDoubleTapWindow(200); //1.25ms per increment


 //set values for what is considered freefall (0-255)

 adxl.setFreeFallThreshold(7); //(5 - 9) recommended - 62.5mg per increment

 adxl.setFreeFallDuration(45); //(20 - 70) recommended - 5ms per increment


 //setting all interupts to take place on int pin 1

 //I had issues with int pin 2, was unable to reset it

 adxl.setInterruptMapping( ADXL345_INT_SINGLE_TAP_BIT,   ADXL345_INT1_PIN );

 adxl.setInterruptMapping( ADXL345_INT_DOUBLE_TAP_BIT,   ADXL345_INT1_PIN );

 adxl.setInterruptMapping( ADXL345_INT_FREE_FALL_BIT,    ADXL345_INT1_PIN );

 adxl.setInterruptMapping( ADXL345_INT_ACTIVITY_BIT,     ADXL345_INT1_PIN );

 adxl.setInterruptMapping( ADXL345_INT_INACTIVITY_BIT,   ADXL345_INT1_PIN );


 //register interupt actions - 1 == on; 0 == off  

 adxl.setInterrupt( ADXL345_INT_SINGLE_TAP_BIT, 1);

 adxl.setInterrupt( ADXL345_INT_DOUBLE_TAP_BIT, 1);

 adxl.setInterrupt( ADXL345_INT_FREE_FALL_BIT,  1);

 adxl.setInterrupt( ADXL345_INT_ACTIVITY_BIT,   1);

 adxl.setInterrupt( ADXL345_INT_INACTIVITY_BIT, 1);

}


void loop(){

 

 //Boring accelerometer stuff  

 int x,y,z;  

 adxl.readAccel(&x, &y, &z); //read the accelerometer values and store them in variables  x,y,z


 // set the cursor to column 0, line 1

 // (note: line 1 is the second row, since counting begins with 0):

 lcd.setCursor(0, 1);

 // print the number of seconds since reset:

 lcd.print(millis()/1000);

 lcd.print(" sek");

 lcd.setCursor(0, 2);

 //prints X, Y, Z values on to LCD

 lcd.print("x:");

 lcd.print(x);

 lcd.print(" ");

 lcd.print("y:");

 lcd.print(y);

 lcd.print(" ");  

 lcd.print("z:");

 lcd.print(z);

 lcd.print(" ");  

 delay(150);


}



15 days

Write a review

Please login or register to review