# MPU-6050 Calculating Impact Acceleration (Inch per Second)

Hi,
I am trying to build a system thru which calculate the impact acceleration valute between objects moving on a conveyor.
I assembled an Arduino Nano v3.0 and a MPU-6050 (GY-521 board) sensor via I2C bus.
I need to obtain IPS (Inch per Second) value on the three axis and globally (total amount of energy regardless axis direction).
Could someone help me?
Thanks.

IPS "Inch per second" is not a measure of acceleration, or of energy. IPS would be a velocity.

Given acceleration readings from three axes (ax, ay, az, floating point values), the total acceleration is

``````float atotal = sqrt(ax*ax + ay*ay + az*az);
``````

Good!!!
Thanks.
And my question is: how can I calculate Inch per Second (or equivalent mm per second)?
Thanks.

how can I calculate Inch per Second (or equivalent mm per second)?

You can integrate acceleration with respect to time to get the change in velocity, but it will be accurate only for very short times.

Have you tried the software from I2Cdevlib? IMO, it's pretty amazing.

Iit will integrate the acceleration for you. The MPU6050 can integrate sensor readings inside the chip itself which produces superior results than attempting to integrate the raw data.

Once you figure out how to get a speed value from the sensor/library it shouldn't be hard to convert the units to inches per second.

Yes, I am using I2CDevLib but I do not understand how to obtain velocity....

(change in velocity) = (average acceleration during time interval)*(time interval)

I would have thought there would be some sort of speed of velocity function but I couldn't find one.

It looks like you may need to keep track of velocity yourself using jremington's method.

Edit: I think there's a reason why there's not a velocity function. It is not likely to be very accurate.

Edit: I think there's a reason why there's not a velocity function. It is not likely to be very accurate.

Yes, the problems are summarized very well in this post on the CHRobotics web site.

jremington:
Yes, the problems are summarized very well in this post on the CHRobotics web site.

Very interesting.