Hexacopter drifting away = crash (log + video)

Hi there,

today I tried to fly my hexacopter for the very first time but unfortunately crashed (all 6 propellers broken).

FC: Pixhawk 2.4.8 (ebay clone)
FW: APM 3.5.5

Controlled by mavproxy - pixhawk is connected to raspberry via uart and raspberry connected to wifi hotspot where i control it by commands). I don’t have RC but after this I’m definitely getting one.

I did all the required steps (mission planner):

  • level + accelerometer calibration
  • compass calibration (pixhawk onboard compass, the one inside UBLOX M8N module seems broken - for now disconnected from i2c)
  • ESC calibration (identical RPM)
  • RC calibration (joystick, just to bypass the RC calibration prearm check)
  • ARMING_CHECK = 0 (to skip the throttle below failsafe check when arming)

My plan is to control it via 4G dongle that’s why I didn’t get any RC even though I knew it was strongly recommended.

Video of crash: https://www.youtube.com/watch?v=Bgy_M7LOyWY

Mavproxy history:

mode guided
GUIDED> Got MAVLink msg: COMMAND_ACK {command : 11, result : 0}
arm throttle
GUIDED>
Got MAVLink msg: COMMAND_ACK {command : 400, result : 0}
ARMED
Arming checks disabled
APM: EKF2 IMU1 in-flight yaw alignment complete
takeoff 3
GUIDED>
Take Off started
Got MAVLink msg: COMMAND_ACK {command : 22, result : 0}
APM: EKF2 IMU0 ground mag anomaly, yaw re-aligned
mode land
GUIDED> Got MAVLink msg: COMMAND_ACK {command : 11, result : 0}
APM: EKF2 IMU0 in-flight yaw alignment complete
LAND> Mode LAND
mode landAPM: GPS Glitch
LAND> Got MAVLink msg: COMMAND_ACK {command : 11, result : 0}
APM: EKF variance
APM: EKF primary changed:1
height 80
height 20
APM: EKF primary changed:0
height 0
APM: EKF primary changed:1
APM: EKF primary changed:0
APM: GPS Glitch cleared

In short: mode guided -> arm throttle -> takeoff 3 -> after few seconds starts to drift away -> mode land (no response) -> still drifting and crash…

LOG file: log.BIN (788 KB)

Attached compass calibration values - not sure if they are OK.

compass

1st mistake, arming checks disabled.
2nd mistake, not having a LARGE area to test in considering you were relying solely on guided mode without first trimming and checking flight characteristics.
3rd mistake, too close to trees - really relates to 2 but it may have contributed to your GPS glitch.

Apart from that I think it was doing quite well until it hit the tree.

An RC is recommended for the very reasons you experienced.
If the frame, motors, batteries and electronics are not setup exactly right then a guided mode will not help.
First is stabilise, which enables full manual testing to make sure everything is operating OK and the frame is balanced, calibrations are correct, etc.
Then comes AltHold, and if all goes well finally Loiter or another suitable guided mode.

It does look like you had a GPS Glitch then a compass variance issue which might have been the cause of the drift.
But then you had no way to quickly stop it, like an RC, and switch to Stabilise and land safely.

This is a perfect example of how not to test a new aircraft.

And IMNSHO, trying to control an aircraft using WiFi is foolhardy.

Update: received new propellers + RC and had a test flight yesterday.

This time I armed in stabilize mode and made a few flights. Then switched to althold and poshold as recommended. Althod works ok. Poshold not so great, it moves around a lot and sometimes starts to drift away, then I have to switch back to stabilize. I think this is probably a compass problem?

So again I’m trying to use the external compass that is inside ublox m8n module. When I connect it to i2c, connect USB, the main pixhawk LED is off all the time (gps is connected and gets a gps fix). I made a lot of attempts to calibrate it with the ‘onboard mag calibration’ but the calibration bar will accept only internal compass (relaxed, normal, …). The heading in mission planner changes only when moving pixhawk, no reaction to m8n module movement (‘use compass’ and ‘enable compass’ is set to external compass - checked by mx my mz, mx2 my2 mz2).

I also tried live calibration and there are points from both compasses. The external compass is lagging sometimes.

Now I really don’t know what is wrong. If the pixhawk is damaged or the module or maybe I’m doing something wrong. I remember that this was the same behavior of the module as before the crash.

Before you arm and take off, did you switch to poshly and check that you still had a green LED?

The EKF refuses to switch to a guided mode sometimes even though you have a GPS 3D fix.
The only way to be sure is to wait on the ground before arming and switch to a guided mode and see if the LED stays green or goes back to blue.

I’m not sure, but I will check that tomorrow. When arming in stabilize mode, it sometimes flashes red and yellow but goes back to green after 3-4 seconds. This happens only when arming.

I made a few new flights today with internal compass (calibrated again several times to check if the offsets are similar). Sometimes it holds position great and sometimes it rotates (yaw) and starts to fly in a circle (from 5 to even 30 meters in diameter) - both loiter and poshold. I made a video how it holds position: https://www.youtube.com/watch?v=scP8mFfz08A

Not sure what the problem might be. When it starts to move I have to constantly correct the position. I think this has something to do with heading.

It’s not perfectly balanced but I think it should not be a problem if it flys great for one moment and then not. Also I noticed the GPS module was off by a few degrees compare to pixhawk. I will fix that tomorrow.

Some flights were made with declination set to auto / manual. Same results.

I’m trying to learn to read the log files but I’m not quite there yet. Attached is a log file from last flight when it was trying to fly in a ~20m circle and I had to correct it all the time to stay close to me.

log.zip (996.0 KB)

The symptom you describe of flying in circles after yawing (toilet bowling) is typical of a compass problem.
The external compass in the GPS is the usual one to use as it is further away from magnetic interference than the internal compass.
Make sure you calibrate it correctly and away from any metal or magnetism.

A quick look at your log and I noticed you have Tx trim on yaw as it is at 1577 except for correction and roll is at 1388.
That is a good reason for the copter moving around if the Rx has trims set.
Try putting your Tx controls at 1500 and see how you go.