ADXL345

HI,

I am using the ADXL345 for vibration trending.Accelerometer ADXL345 I am using the Arduino Uno R3 as a microcontroller. Arduino Uno Board R3 Logging and send data via the wifi and sd storage on the Arduino Wifi Shield.

I want to see vibration in the X, Y and Z axis. Which the accelerometer gives in G needs to be converted to velocity.

What are the configuration that I would need for vibration trending?

A thread about ADXL345

I am really confused about the frequency that they mention in the thread.

Appreciate anyhelp! Thank you!

Please explain what you mean by “vibration analysis”, or describe what you really want to do.

jremington:
Please explain what you mean by “vibration analysis”, or describe what you really want to do.

I want to look at the trending of vibration when the motor is running at a higher speed or misalignment.

What I want to do is to use the accelerometer to measure the acceleration of the motor for monitoring the condition of the motor. I also need to convert the acceleration to velocity so that i can use it to refer it to the ISO vibration severity chart which measures vibration in velocity. The data in velocity will be transmit via wifi and stored in the SD card.

If my motor is running at 600rpm the frequency is 10hz. So my sampling rate rate should be at least 2.5 times right ?

You are going to need a much faster sample rate to capture the frequencies of interest. Vibration analysis can get down to identifying defects on the balls in the ball bearings, just from the vibration frequency.

MorganS: You are going to need a much faster sample rate to capture the frequencies of interest. Vibration analysis can get down to identifying defects on the balls in the ball bearings, just from the vibration frequency.

I understand I will need more and faster sample rate to be able to identify and locate the defects. My primarily concern now is just be able to read and log vibration data of a motor. Then I will start looking at vibration analysis.

Meaning at 10Hz i should be able to get x value worth of vibration in acceleration, if i increase to 50Hz, i should be able to see y value worth of vibration as well.

The bandwidth of the accelerometer is important. The upper limit for the ADXL345 is 3200 Hz.

However, to convert acceleration to velocity you need to integrate, which is a low pass filter that depends critically on the sample rate, which in turn depends on how you read it out.

jremington: The bandwidth of the accelerometer is important. The upper limit for the ADXL345 is 3200 Hz.

can you explain it in a simpler form? Thank you

However, to convert acceleration to velocity you need to integrate, which is a low pass filter that depends critically on the sample rate, which in turn depends on how you read it out.

Can I use this formula to find velocity? g * (9807) / (2*PI*F) = v But i got two unknown the F and v.

What is the correct way to find velocity using the acceleration from accelerometer? I just need to see the vibration in velocity trending as the motor run faster.

can you explain it in a simpler form?

How do you intend to convert acceleration into velocity? Post some code, using code tags, and I'll use it to explain the issue.

jremington:
How do you intend to convert acceleration into velocity? Post some code, using code tags, and I’ll use it to explain the issue.

My first idea is to use this formula,

Can I use this formula to find velocity?
g * (9807) / (2PIF) = v
But i got two unknown the F and v. And after reading around, this is not the correct method

/*-----( Import needed libraries )-----*/
#include <Wire.h>
#define DEVICE (0x53)    //ADXL345 device address
#define TO_READ (6)        //num of bytes we are going to read each time (two bytes for each axis)
#define THRESH_ACT  (0x24)
#define THRESH_INACT  (0x25)
byte buff[TO_READ] ;    //6 bytes buffer for saving data read from the device
char str[512];          //string buffer to transform data before sending it to the serial port
char str1[512];
char str2[512];

// Declare Variable
    float x, y, z; //Acceleration variable
    float x1, y1, z1; //Acceleration variable

    void regAddress()
    {
        int regAddress = 0x32;    //first axis-acceleration-data register on the ADXL345
        readFrom(DEVICE, regAddress, TO_READ, buff); //read the acceleration data from the ADXL345
         //each axis reading comes in 10 bit resolution, ie 2 bytes.  Least Significat Byte first!!
         //thus we are converting both bytes in to one int
        x = (((int)buff[1]) << 8) | buff[0];   
        y = (((int)buff[3])<< 8) | buff[2];
        z = (((int)buff[5]) << 8) | buff[4];
        
        x1 = x/256 *9807;
        y1 = y/256 *9807;
        z1 = z/256 *9807;

  Serial.println(" ");
  Serial.print("X: ");Serial.print(x1); Serial.println(" mm/s2");
  Serial.print("Y: ");Serial.print(y1); Serial.println(" mm/s2");
  Serial.print("Z: ");Serial.print(z1); Serial.println(" mm/s2");
     }

void setup()
{
  Wire.begin();        // join i2c bus (address optional for master)
  Serial.begin(9600);  // start serial for output
  writeTo(DEVICE, 0x2D, 0);   //Turning on the ADXL345
  writeTo(DEVICE, 0x2D, 16);  //Turning on the ADXL345
  writeTo(DEVICE, 0x2D, 8);   //Turning on the ADXL345
}

void loop()
{
  regAddress();
  Serial.write(10);
  delay(2000);  //It appears that delay is needed in order not to clog the port
}

This is my code now.
Thank you so much!

You need to learn more about the correct method - it is very basic physics.

jremington: You need to learn more about the correct method - it is very basic physics.

you mean i can just integrate the acceleration straight away? but what is the time that i need to do it ?

[u]You[/u] are doing the analysis, and it is probably important that you understand how and why you are doing it.

jremington: [u]You[/u] are doing the analysis, and it is probably important that you understand how and why you are doing it.

Okay, thank you. I will think through again. basic physic basic physic..