I2Cdevlib Forums

acceleration in m/s^2

Recommended Posts

Hi, does anyone knows how to get acceleration in m/s^2 from the i2cdevlib OUTPUT_READABLE_WORLDACCEL? Further more, how to convert acceleration to velocity in m/s?

Share on other sites

• 2 weeks later...

Dont know if what i am saying is correct but

You get outpu X Y Z ( 3 axis)  2 bytes for each axe

each value ( 2bytes) is signed so you convert them to  -32768 till +32768 depend on your scale ( -+2G 4G 8G 16G) you divine your output.

for example for 16G you divine output/2048 (if you have stable the sensor Z axe will show you 1 gravity , so if it show you 2048 the accelerometer is on +-16G mode)

You get samples in internal, if you get every 0.001sec you -> velocityZ =accelerationZ*0.001*G => velocityZ=accelerationZ*0.001*9.8

G=9.8m/s2

But Sensor are not accurate your sample interal is not enough so the velicity probably will be far from real (and distance quad far )

Share on other sites

• 2 weeks later...

Thankyou so much. You saved me alot of time

Share on other sites

• 9 months later...

If you get output X Y Z ( 3 axis)  2 bytes for each axis each value ( 2bytes) is signed so you convert them to  -32768 till +32768 depend on your scale ( -+2G 4G 8G 16G) you divine your output.

For example for 16G you divine output/2048 (if you have stable the sensor Z axe will show you 1 gravity , so if it show you 2048 the accelerometer is on +-16G mode)

You get samples in internal, if you get every 0.001sec you -> velocityZ =accelerationZ*0.001*G => velocityZ=accelerationZ*0.001*9.8

G=9.8m/s2.

But Sensor are not accurate your sample interal is not enough so the velicity probably will be far from real.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

×   Pasted as rich text.   Paste as plain text instead

Only 75 emoji are allowed.