# Idea for accelerometer

I have ADXL345 and I want to use to to predict the location after walking. Is there any idea, video, or website that I can follow?

One idea is to use Rate multiplied by time to get distance traveled.

A MCU can count time, a ADXL345 can give acceleration. Two components needed to get distance traveled.

The problem with this is, if your speed is constant, you have zero acceleration.

If the MMU is mounted on a platform that is counter torqued to keep the MMU from producing accelerations then the torque applied to counter the acceleration force is equal to the forward motion of the MMU, is one way to overcome that problem.

And how do you propose to implement such platform and measurement if you are walking?

I want to use to to predict the location after walking

Integrating an accelerometer will lead to a drift. Just like integrating a gyroscope.

The problem with this is, if your speed is constant, you have zero acceleration.

The least of your problems are a constant velocity. In a perfect world, an accelerometer could be a good tool. If you integrate the acceleration you get a velocity. You are adding on to a constant when you are accelerating. If the velocity becomes constant, the acceleration is zero, so the constant velocity is shown. Integrate this and you have your position. This will add on to a new constant.
The other issue is ofcourse the body frame. The accelerometer follows the sensor body frame. This needs to be converted into the NED frame. This can be done by multiplying the accelerometer with the rotation matrix. This requires a heading indicator (Yaw).

You need a GPS.

hzrnbgy:
And how do you propose to implement such platform and measurement if you are walking?

What kind of question is that? It doesn't matter. That's his/her problem. There are so many different uses for this kind of measurement.

I want to use to to predict the location after walking.

One approach to measure total distance traveled is to count your steps, and multiply by the average distance traveled per step. The accelerometer can be used to detect the steps.

This tutorial explains why conventional integration to get velocity and position does not work with consumer grade accelerometers.

hzrnbgy:
And how do you propose to implement such platform and measurement if you are walking?

Me, using hobby grade IMU's would not make such an attempt.

Idahowalker:
If the MMU is mounted on a platform that is counter torqued to keep the MMU from producing accelerations then the torque applied to counter the acceleration force is equal to the forward motion of the MMU, is one way to overcome that problem.

Now say that very quickly 10 times....

Idahowalker:
Me, using hobby grade IMU's would not make such an attempt.

Yeah, I agree, but I think its a good learning experience. Therefore, if I were the person asking the question, I would still attempt it. From the given information, the person won't be surprised by the results. After that, other strategies can be considered.

dyso:
Yeah, I agree, but I think its a good learning experience. Therefore, if I were the person asking the question, I would still attempt it. From the given information, the person won't be surprised by the results. After that, other strategies can be considered.

Not arguing that with you.

I like the idea of using the accelerometer to measure steps. Add to that a magnetic compass (magnetometer) to get direction and you might actually come close to determining a position.

This comes up loads of times and an accelerometer is not a good sensor for calculating distance by double integration, you need to look to another device such as gps.