Accelerometer greatly disturbed by vibrations (bma180)

Hi,

This is my first post so I hope I'm doing this right.

I am currently building a quadcopter and I have integrated a BMA180 accelerometer and a ITG3200 gyroscope for orientation sensing. I use a complementary filter for sensor fusion. I have 10Hz low pass filters on both the accelerometer and the gyroscope. I also tried integrating a median filter to both sensors.

The problem I'm having is that when I turn on the motors, I start receiving erroneous readings for the pitch and roll angles (I haven't worked with the yaw angle yet). If my quadcopter is at approximately 0 degrees and I read the sensors with the motors off, I get readings around +- 1 degrees for the pitch and roll. But when I turn the motors on and keep the quadcopter flat, I get readings that can range up to-40 degrees to 40 degrees. I think the problem is that my accelerometer (and maybe the gyroscope) is being greatly affected by the vibrations that the motors are causing. I am going to try to balance the motors but I still don't think that balancing the motors will completely solve the problem.

Does anybody know what filter or which setting in the accelerometer/gyroscope can help reduce these ridiculous readings?

Thanks,
Juan

Hello Juan,

Firstly, I may be wrong but do you really want a lowpass filter on the gyros? I made a auto level system for a RC plane and did not use any lowpass on them.
Secondly, are the readings good when you tilt the quad in your hands, motors off? I had a simlar problem that was caused by having reversed sensor values (the gyro was in the opposite direction than what was labeled) and it gave good readings while still but went crazy when it moved.
Also make sure that your filter ignores readings that have to high total acceleration.

Lastly, I used a filter I made myself, on top of the complementary which just worked, I suppose it a kind of lowpass?

void delayFilter(int *oldValue, int newValue){
  *oldValue = (newValue + ( (DELAY_FILTER - 1) * *oldValue)) / DELAY_FILTER;
}

Hi Kalveo,

Thank you for your reply.

I thought that both sensors needed to be at 10Hz bandwidth. The sensors do read correctly when I tilt the quad with the motors off.

When you say that my filter should ignore high acceleration values, how do I do that?

and I did try to put a second low pass filter before the complimentary but I still get crazy readings.

Thanks,
Juan

By ignoring I mean that you sum the acceleration in X, Y and Z and if it's more than let's say 2G ignore that reading.