Slow constant pitch drift:

While tuning my PID on a custom quad I have encountered some questions that I need help on.

First, I have tied the copter across the roll axis to a support so I can adjust PID values for pitch.

I put it in acro mode and then adjust the PID’s until the copter behaves.

This time, I have a situation where the copter wants to keep rotating nose down at a slow rate without any stick input. The I term didn’t help.

While looking at the logs, I can see the behavior, but am not sure what the cause is. The CG is pretty close.

I did drop ACRO_BAL_PITCH and ACRO_BAL_ROLL to zero so the copter would arm in acro mode as I was having such an issue and that seemed to be the common solution to tune it. I don’t see how these params would effect the situation though as they return the copter to level at some chosen rate. In my case, the copter wants to pitch 360 slowly and continuously.

The second question is about the compass. I have pixhawk with ublox and thus it has two compasses. One of the compass MAGy follows the throttle, while non of the other MAG or MAG2 readings do the same. Just the magY reading.
I have an idea why this is so, but I cannot seem to figure out if Mag or Mag2 is the internal/external compass. Does anyone know which is which.

Log and two small snapshots attached.

Any Ideas on why the copter is not holding actual pitch in alignment with desired pitch?

I have answered all of these problems… I’ll post the answer for anyone else who comes across these issues.

  1. The ‘slow constant pitch drift’.
    I had tied the copter between two post to run the PID tuning. I turned it on and while booting, the copter is swinging after I touched it to plug in the battery.

When the copter is booting, it will calibrate the gyros. Since the copter was not still, as it was swinging a bit, the calibration routine gave bad results. This resulted in the HUD moving even though the copter was still.

Lesson… copter has to be still when booting until the gyro calibration is finished.

  1. This is classic motor interference. Running compassmot, will fix the problem. This is a classic example of compass and throttle interference. Unfortunately, compassmot kept giving NAN results until just recently when a firmware fix was released.

I ended up solving these myself, however it took me quite a bit of work. I am a bit disappointed there wasn’t much help form this forum.