Sensing linear motion using ADXL335 Accelerometer

I want to use my Arduino Leonardo with the ADXL335 accelerometer to make a glove that works like a mouse.
I need to know how to use the accelerometer readings to sense displacement along the x,y and z axes.
If i move the accelerometer to the left, it should tell me that it moved to the left and how much(roughly) and so on for all 3 axes.

Any help would be appreciated.

Acceleration will tell you rate of change in velocity.

Assume you start at Velocity 0,0,0.

Multiply acceleration by Time to get Change in Velocity

Accumulate (add together) all the changes in velocity to get velocity.

Multiply Velocity by Time to get Distance.

Accumulate (add together) the Distance measurements to get position.

Hi

Can you please show some guideline to just find if object is in motion or not using ADXL335 and arduino.
I searched google but didn't get any thing for me.

ssomnath678:
Hi

Can you please show some guideline to just find if object is in motion or not using ADXL335 and arduino.
I searched google but didn't get any thing for me.

basically my question is how to check the linear acceleration using ADXL335.
Is it posible.Please share some guideline.

johnwasser:
Acceleration will tell you rate of change in velocity.

Assume you start at Velocity 0,0,0.

Multiply acceleration by Time to get Change in Velocity

Accumulate (add together) all the changes in velocity to get velocity.

Multiply Velocity by Time to get Distance.

Accumulate (add together) the Distance measurements to get position.

basically my question is how to check the linear acceleration using ADXL335.
Is it posible.Please share some guideline.

If you keep the sensor at all times parallel to the ground, you can simply use the x and y values (in 1g -> 9,81m/s^2) and multiply by the time past since the last measurement and you have your velocity.

However, to get the distance from those readings, you can't just multiply it by the time. Assuming the acceleration is constant in the given interval, you can calculate the distance with s(t) = (1/2)at^2. (s = distance, a = acceleration, t = time)

The general approach of using an accelerometer to estimate position and velocity does not work with consumer grade sensors, as explained here: http://www.chrobotics.com/library/accel-position-velocity