MMA7361 accelerometer problem, filtering?

Hi Community.

Last week i bought the MMA7361 accelerometer for my tricopter. (

The accelerometer works very well, when the 3 Motors are shut down. But when the motors are spinning( which makes some vibrations) the accelerometer flips out and allways send really unusable data. I read some threads here and fixed the accelerometer on different kinds of foam with no good result. The vibration/noise from the motor isn't really heavy, but it seems to be heavy enough, to let the sensor freak out. I heard, that there is an other opportunity: The MPU6050( ). My Questions to you are:

Do I propably have better results with the MPU6050? I've heard from a low pass filter in MMA7361, how do i use it? Is there some kind of "stabilization filter" or -algorithm (maybe kalman filter)?

I have to excuse, because I am an beginner in this field and really need some help. :cold_sweat:

thanks in advance, :) diiaf

Low Pass Filtering may help, only you have to know cut-off freq., or in other words, responsiveness time constant of your control loop. How do you read a data ? Why do you think its wrong?

Im just reading it with " analogRead(A0) ". So that i just have the raw data. I dont want to have angles or something like that, just the raw data, which have a standard deviation from +-3

Motors are shut down: Example: X = 321 X = 323 X = 319 X = 319 X = 323 X = 320 X = 321 X = 321

Motors running:

X = 119 X = 370 X = 256 X = 472 X = 360 X = 186 X = 401 .... ....

inclination of about 30 ° (motors not running)

X is something about 420 +-3

So for my further project I accept 320 as 0° and e.g. 420 as 30°

The main point is, that the code just have to calibrate the tricopter, when it has a inclination of a few °. I just will let one motor running higher, when X != 320, just as rough example.

AFAIU you are reading analog inputs in a loop, try to average readings, arduino IDE includs example in an analog sub-menu.

Yes im reading it in a loop. i dont think that averages are a solution, because the values have too much deviation. :/

i dont think that averages are a solution, because the values have too much deviation.

Its the only solution. Averaging is one of a few different types of LPF. What is important, isn't deviation magnitude itself, rather spectrum of the interference, in a case a motor it's probably rotational speed and it's multiplies. For example, 300 RPM, generates mainly 300 / 60 = 5 Hz interference, and probably at 10 and 15 as well. Filtering out anything above 3-4 Hz, and you good with your readings of th accelerometr. The problem may appears if you need response time close to 1/4Hz = 250 millisec,