Multi-rotor crashed suddenly while in air

while I was flying my drone its suddenly crashed badly in the air, the auto analyze outputed the follwoing

Log File C:\Users\user\AppData\Local\Temp\tmpAA1F.tmp.log
Size (kb) 5516.919921875
No of lines 58998
Duration 0:02:59
Vehicletype ArduCopter
Firmware Version V4.5.4
Firmware Hash fd1bcc61
Hardware Type
Free Mem 0
Skipped Lines 0
Test: Autotune = UNKNOWN - No ATUN log data
Test: Brownout = GOOD -
Test: Compass = FAIL - Large change in mag_field (55.15%)
Max mag field length (572.00) > recommended (550.00)

Test: Dupe Log Data = GOOD -
Test: Empty = GOOD -
Test: Event/Failsafe = GOOD -
Test: GPS = GOOD -
Test: IMU Mismatch = NA -
Test: Motor Balance = UNKNOWN - ‘QUAD/X’
Test: NaNs = FAIL - Found NaN in BAT.Curr
Found NaN in BAT.CurrTot
Found NaN in BAT.EnrgTot
Found NaN in CTUN.DSAlt

Test: OpticalFlow = FAIL - ‘FLOW_FXSCALER’ not found
Test: Parameters = FAIL - ‘MAG_ENABLE’ not found
Test: PM = UNKNOWN - ‘NLoop’
Test: Pitch/Roll = UNKNOWN - ‘BarAlt’
Test: Thrust = GOOD -
Test: VCC = UNKNOWN - No CURR log data

its seems that the problem was with the compass is that possible since i was flying the drone in stablize mode. I will apperiate any help and bossible solution now my pixhawk power port is not working.

Is it the same copter?

We need to see a .bin log file to tell anything. A compass generally doesnt cause a crash, in fact the compass can disappear or go bad and the EKF can handle it and should just go into Land mode if required.

The log file

The copter doesnt really get flying well in this log. I’m assuming this is like a first flight??

Set ARMING_CHECK,1 and use MissionPlanner motor test to check all motors spin in the correct order and direction.
Then I strongly recommend you follow the new Configurator routine before attempting flight again.

It seems not properly controlled if it’s hovering

Multiple large pitch back from 1500(center) to 1200(back) while yaw keeps increasing. Do you feel like you’ve lost direction?

the copter was taking off and it reached about 3 meters and then suddenly fliped over. the motors were spinning in the right direction.

no the copter was in the takeoff phase maybe the problem is from the RC, before that flight i was attempting to arm the drone but it did not successed the prearm error was RC2 is not natural i have change rc2_trim to 1510, one another possible reason could be one of motors stoped working as it is not receiving the pwm input from flight controller but I am not sure.

I’m a bit worried about the BEC supplying the flight controller with +5volts.
When the battery load increases with motor output (and the loss of control) the BEC voltage also drops down quite lot, so it’s not a very good regulator.
You might want to try adding a Low ESR capacitor to the input of the BEC, and also an ordinary electrolytic to the output, or just get a different power brick - there’s lots of good choices these days.

So far I cant say definitively what is the cause, unless there was some sudden physical breakage or weight shift (battery came loose).

Future crashes are avoidable if the user reads the How to methodically configure and tune any ArduCopter blog post, especially section 1.1 of it.
All of these issues are addressed there.

Users should be asking questions about specific parameters, and not asking why their vehicle crashed.

Crashed vehicles is very avoidable if you follow the publicly available, simple to follow documentation.

AFAIK the hard part is understanding the parameters and their effect.

Thank you all for your help. now the pixhwak power1 port is not working but when i power the pixhwak through the usb port its working fine is it a good idea to power the pixhwak thoruhg the usb port instead of the power1 I know there will be no feedback for the battery voltage but is there any other issues?
and how i could test if my compass is working well?

It will not ARM when powered by USB port AFAIK.

This is to prevent taking off with an USB cable attached, just to crash as soon as the props cut the USB cable.

  • IMU seems working properly.
  • motor3/4 spins down to idle in turn
  • roll/pitch/yaw can’t be stablized at center (which is desired from log), and then lost control.

ESC hot??? I’m NOT sure, but there is something out there. (BTW don’t spin/yaw that much when hover)

i am not realy sure about the esc but it seems that motor4 and motor3 could cause the issuse at that moment?

If it’s wire connection or propeller mounting skew issue, RC out will go high.

I think it might have significant aerodynamic issue at that moment. As it fly not high enough(3meters, motor3/4 did come back power right after idle) , but it does not have time to recover from unstable state.

— EDIT:

Please don’t spin/yaw that much when you are NOT confident with you tuning parameters.