6 years, 10 months ago.

Drifting IMU value with spinning motors

I am using the MEMS multi-sensor (X-NUCLEO-IKS01A1) expansion board with the Nucleo STM32F411 as a simple flight controller for a very simple multicopter. The raw values generated for pitch and roll of the combined boards attached to a frame are accurate and reliable when stationary and rotated in space.

However, when hooked up to running motors with the boards/frame stationary, raw values seem to be stable. When rotated in space and brought back to stationary, raw values drift and would not stabilize at any specific value. Also, when rotated in space with motors running, the raw values are random and not remotely close to representing the rotation at all. Values only drift and not sporadically fluctuating. Otherwise, IMU works fine when motors aren't spinning.

I am using Sensor Fusion to get a positional value in terms of degree. I am not sure if I have mechanical or electrical noise or both. If mechanical, I guess foam or gel material should help isolate vibration from the boards from the spinning motors. If electrical noise, not sure what to do differently to avoid drifting values. Does it have any thing to do with sloppy wiring, placement of electrical components, etc, that would disturb signals? Also, I thought that Sensor Fusion already has all the appropriate filters embedded, so not sure if I need physical filter in the electrical schematic to reduce noise.

Has anybody dealt with drifting IMU values when hooked up to spinning motors? Your input is much appreciated.

1 Answer

6 years, 10 months ago.

Just to clarify, everything works perfectly with the motors off. When the motors are on you see a constant rate of drift in calculated orientation indicating that the gyroscopes are measuring a constant non-zero rate of turn. You don't see a (significant) constant position drift which would indicate accelerator errors, just orientation drift.

How are things powered? Are the motors and sensor using the same power source? MEMS sensors can be impacted by noisy power supplies and motors can put a lot of noise onto the power and ground rails.

If possible run the sensors and the motors from two completely isolated power sources, if that fixes it then it's probably a conducted electrical noise issue. You need separate power supplies with a single common ground point and some big capacitors.

High frequency vibration can also cause issues. If that's not the issue try eliminating the mechanical vibration. Unmount the sensors from the copter but keep all the electrical connections there. Now with the motors running but in someway isolated (e.g. get someone to hold it) rotate the sensors and see if the problem has gone. If so then you need some foam, rubber mounting gaskets, springs or whatever else you can fit.

While doing this also try moving the sensors closer and further from the motors, if that has an impact then it is probably radiated electrical noise. You need to shield either the sensors or the motors/motor controllers. A layer of insulation and then a layer of aluminium foil around the sensors if probably your best bet for that.

Accepted Answer

This is really good stuff that I'll keep for reference. It was not electrical noise from the shared power supply. In my case, it was the excessive vibration from the motors and props transferred to the sensors. Held the frame/high spinning motors in one hand and the sensors in the other, rotated sensor board aggressively in space and the sensor values responded reliably, electrical wiring constant.

If spinning motors were enough vibration to affect the MEMS sensor board, I wonder how to prevent mechanical noise when I decide to consolidate MCU and sensors onto one PCB then onto a frame? Is it in the frame design, arm material, motor choice, all of the above or must there always be adequate vibration absorption material for every multicopter built?

posted by Heather Holmes 23 Jul 2016