accelerometer results while driving a robot

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

accelerometer results while driving a robot

893 Views
drorpopper
Contributor I

Hello,

 

I've tried to calculate the speed of a robot while in movement, by measuring the acceleration(by using MMA7361LC).

I've tested the accelerometer and it gives good results when moving it (forward, backward) and when checking if it measures the gravity.

Even when it is fixed to the robot(tank), if I'm moving the robot by hand - works well.

The problem is that while driving the robot with it's wheel motors - I'm not able to get reasonable results at all.

From the beginning I'm getting the same oscillations until the robot stops - that I can very barely analyze where there was a positive or negative acceleration, and the noise is very high, even after a 70Hz simple LPF.

 

I don't understand why when the robot is in movement(by the wheel motors) I don't get something close to a straight line?

 

In the attached files:

Green - the positive driving axis, before the LPF.

Orange - the positive driving axis, after the LPF.

scope_3 - a low acceleration(for about 0.5 seconds), a fixed velocity, and then a low negative acceleration(for about 0.5 seconds).

scope_4 - same, with a higher acceleration in the start and in the end.

 

Please help.

Thanks, Dror.

Labels (1)
0 Kudos
1 Reply

514 Views
michaelestanley
NXP Employee
NXP Employee

Dror,

I hate to tell you this, but your basic premise is flawed.  Trying to get velocity/position by single/double integration is almost always a bad idea.

Problem #1 is that every sensor has noise, and when you integrate noise, you get a random walk over time.  See Position Reckoning for more details.

Problem #2 is that one man's signal is another man's noise and vice versa.  I'm pretty sure you are seeing vibrations from your robot's motor and gear train.

You would be better off with a rotary encoder for this application to determine speed/distance.   Fusion of accel/gyro data can give you your robot's orientation and linear acceleration, but if you need accuracy in velocity and position, you should look at other sensor types.

Mike

0 Kudos