I’ve been asking myself various questions and checking the answers through test flights:
- Do the negative G values show up in passive flights? If the motors aren’t powered up, negative G values are not seen.
- What about alpf? With alpf set to 0 or 1 (460 or 184 Hz accelerometer low pass filter), I see the negative G ‘error’, but set to 2 (92Hz) or greater it doesn’t happen.
- What are the values of the other accelerometer and gyro readings when this happens with alpf set to 0? These are all believable: ax = -4214, ay = -696, az = -270, qx = 2922, gy = 870, gz = 1531 – no magic hex numbers in there suggesting problems.
- What about sampling frequency? With alpf set to 0, but with the sampling frequency dropped from 500Hz to 200Hz (SMPLRT_DIV 1 => 4), there are still negative G ‘errors’.
- What happens if the range is set to ±4g instead of ±2g with alpf set to 0? The problem remains – there are negative G ‘errors’.
To me, that suggests that somehow, the negative G readings are not an ‘error’ but are real. They are filtered out by the lower low pass filter frequencies. The MPU-9250 is working perfectly. I’ll continue running with sampling frequency of 500Hz, and alpf of 0, and with the diagnostic / protective code disabled.
This then points the blame for head-butting the ceiling towards the ESCs – it’s as though they have latched at maximum power. The PWM signals I’m sending range from 1ms to 2ms inclusive, and I’m now wondering whether sometimes, the PWM output does hit 2ms and latches the ESC; I’ve turned down the maximum to 1.999ms and see what happens – it’s a hunch based on a long lost memory of something I’d seen or read.