accelerometer results while driving a robot

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

accelerometer results while driving a robot

575 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)
1 Reply

390 Views
reyes
NXP TechSupport
NXP TechSupport

Hello,

First it is important to mention that MMA7361 is no longer manufactured (obsolete) since Q4 2013 as mentioned in the PCN15634.http://cache.freescale.com/files/shared/doc/pcn/PCN15634.htm

Unfortunately there are no direct replacement for this device, but we do have a new 3-axis low-power Analog-Output Accelerometer Family, the FXLN83xxQ Family, I recommend you to take a look at the FXLN83xxQ datasheet to see if it can work for your application.

Since MMA7361 is no longer manufactured (and Archive) device, documentation/information and support can be limited, but let me try to help you for your question.

What seems to be affecting the accelerometer results it’s the noise caused by the motors when driving the robot, accelerometer is susceptible to the vibrations caused by the motor while moving.

Motors tend to generate a lot of electrical noise that can interfere with other circuits if not isolated properly, giving as result an erratic behaviors. This kind of noise-induced erratic behavior can sometimes be very hard to trace and debug, but a good starting point can be to add a capacitor (1uF can work) right across the motor leads, this would help to reduce the noise, but if it do not work, then you would need to add a more complex filter.


Have a great day,
Jose Reyes

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------