Loiter problem with Px4mini v1.3

Hello

I´m building a mini tricopter, trifecta from quanum, and I´m having an issue that might be related to arducopter running on the px4mini board that i have just bought.
After all the setup, autotuning and installing the fpv gear, I started testing loiter mode and the problem begun.
As soon as I switch to stabilize the copter start to drift to a direction , building speed until I switch back to althold. The movement is intense and i cannot counterreack through the sticks.

It looks like if it was wrong compass offset/direction and I really had bad times setting the compass, but it isn´t the case. I´ve triple checked the compass, even comparing with a real one and both matches.

The board that I am using is a px4mini v1.3 from airbot . This board is a little bit weird so it might could be the reason or might not.
The GPS is a M8N from banggood and it seems to be OK. Pretty solid lock .

The gear:
Autobot Px4mini v1.3 ( shop.myairbot.com/index.php/minipx4v1-3.html )
Copter 3.3.3-rc2-tri( stock build from mission planner)
banggood m8n gps mounted pointed back ( the only way it works since I cannot change compass orientation due to the fact that it is not being recognized as an external compass )
led/usb board with compass disabled
3x afro 12a escs
multistar 2216-800kv with 8055prop mounted ccw-ccw-cw
3dr power module ( tested both original from 3dr and from hobbyking )
frsky d4r-ii receiver
Multistar 5200 4s
fpv gear ( minimosd and 800mv tx )

what I have already tried so far:

  1. installed an cooper plate to isolate emf from eletronics to gps ( anyway - id doesn´t seems to be a gps glitch )
  2. tried different arducopter fw.
  3. reset arducopter and setup all over again three different times
  4. disconnected all fpv gear
  5. get rid of gopro.
  6. checked compass orientation ( north , est ) and all seems to be good.
  7. tried to play with gps settings ( only gps , gps+sbas , gps+sbas+glonass )
  8. Tried both manual compass declination and auto.
  9. get rid of all fpv gear

Notes:

  • The drone is flying awesome on manual modes. I have successfully ran autotune.
  • The vibration level seems to be OK.
  • Yaw control autotune gave me bad results. Needs improvement but it is flyable right now with default pids
  • Compassmot gave me <20% of interference. I´ve tried with compassmot enabled and disabled - the same.
  • It looks like the flyaway direction is kinda random. I cannot predict it even if I takeoff from the very same place/orientation.

By the log´s ( I have plenty of them ) it seems that ardupilot is willing to send the drone to the opposite direction it should. I have no idea of how i could fix that…

I would really appreciate if someone could take a look at it and help me.

Log files: dropbox.com/sh/5541nd8lt31i … HJg1a?dl=0

The build: rcgroups.com/forums/showpost … count=2894

I don’t know if it has something to do with:

github.com/diydrones/ardupilot/pull/3563

I realize that my gps has the HMC5883L magnetometer chip.

Trying to dig on it.

Got it ! Problem solved. After two weeks and two full rebuilds, yesterday I was analysing the logs, and realized that the position ( pos ) was jumping around 10 - 15 meters.

The Ekf logs has shown that ekf3 ( ivn, ive and ivd ) innovations were high, besides the fact that the VIbrations 3.3 graph were inside recommended range.

Since mainly only GPS and IMU could be the cupid and the vibrations logs were fine, I was trying to deal with it by playing with the gps. I’ve changed several settings, enabled and disabled glonass, sbas and nada.

So I tried something more radical. Held the drone with my hand , letting loiter try to release it ( like hell ) wile standing still. The result was that I have almost a SOLID dot in the logs, showing that GPS were always right about the position. Good!

Now the only thing left: Virbations. Changed the 3m foam to kiosho gel tape and the virbrations were almost gone for good. Today I’ve tried to fly and IT WAS GOOD!! After two weeks, i’m so happy that i have figured it out!

Lession learned and something for the devs to think about. We should find a better way to determine that vibrations are affecting the performance in addition to the vibe levels. The vibration levels were always below 10m/s/s . THe wiki recommends something below 15m/s/s as normal.

Now time to get back to PID gains. I’m planning to try autotune with the new vibration levels.

Rest of the log screenshots…