arduino and vibrations

I'm new to Arduino using. How can I use Arduino to take measure of vibrational characteristics of a beam?

Attach an accelerometer to the beam, and read its outputs.
An example:

thks!
noq i want to plot the data as function of time

Try sending it to this program on a PC:
http://www.negtronics.com/simplot

Steph3310,

Or get a data logger shield that records the data you gather from the accelerometer to an sd card. Then you can just download the data to a spread sheet and analyze it, plot it etc...

Here is such a shield Adafruit Assembled Data Logging shield for Arduino : ID 1141 : $13.95 : Adafruit Industries, Unique & fun DIY electronics and kits

Good Luck!

I receive data in m/s^2 but I want to convert this data to displacement....Help pls!

If I recall,
s = sqrt (1/2 * A * T^2)
(or something pretty close to that - freshman year physics I think, long time ago, in a galaxy far, far away the next state over)
s = distance, A =acceleration, T = time
You want s, you appear to be getting A, so you just need to know how long the A was applied for.

ok! but the problem is the time....because I use the code of ADXL3xx in arduino. I also want to know how to change the code to include the time.
I'm very a beginner to programmation

I you're just taking the data from your sensor and printing it to the Serial Monitor or passing it to another program, you could get the time the measurement is taken at using the millis() function immediately after you receive the sensor data in your code.

If the beam is vibrating harmonically at a single frequency, then at some point on the beam the lateral displacement X can be written as X = Csin(2pift) where f is the frequency in Hz, C is the maximum displacement, t is time in seconds and pi = 3.14159... .

The lateral acceleration A of that point on the beam is then (neglecting sign changes) A = C*(2pif)2 sin(2pif*t) .

So, if you measure the lateral acceleration A as a function of time, you can work backward to get X = A/(2pif)2 as a function of time.