Pixhawk last revision with 3.3.3 firmware.
It is not the first time it happens, but previously I suspect bad compass , Gps gliches, solar storms .
Today I check everything twice and all was going well.
The symptoms that something is going bad soon is the heading that change of some degrees or start to go in one direction.
In dataflash log just before minute 9 you can see a variation in both MAG.MagX andxMAG2.MagX.
That time it start rotated on yaw but it stop or I control it with Yaw stick, do not remember.
It happened again before uncontrolled descent/crash at minute 19.
It start to yaw right for some 150°, I switched to stabilized mode trying to keep the copter up giving more throttle and yaw command bur the hexa do not responds to radio sticks and gently went down in stable attitude , almost as if it was landing automatically but with no control from radio and a little bit fast.
No damages but I was at only 9 meters altitude.
No error messages, no warnings , no EKF compass errors.
Esc or motors were not hot at all.
I really need some help since really do not know what the hell is going on .
In attach the .bin file .
Before crash at minute 19, there is a variation as at minute 9 of MAG.MagX andxMAG2.MagX. but also MAG.MagY andxMAG2.MagY , it could be the reason for the ya rotation, lost of control and crash ?
low power of the batteries not at all , they were at less than 2/3 of their capacity
And looking at the datalog it seems that power to the Pixawk is perfect , I use a Mauch ubec
I have also a backup bec on the servo rail , I tested it switching off the main Ubec and the backup Ubec do the jod.
I was surprized that Mission planner do not seems to notice that main power went off I expect a warning message.
One thing that I notice is that barometer temperature , so the Pixhawk board was a bit high, 60 ° C. But her eit is summer and today air is at 33° C.
I found something very strange:
Pixhawk did not respond to CH3 input , Throttle !
When I saw the copter rotating on yaw and starting to loose altitude (Line 345.3) , I increased Throttle and change to Stabilize mode (RCIN5 line) , but the Outputs of the Pixhawks did not change at all.
Even if I was in Stabilize mode I do not have anymore the control even if the receiver got sticks commands.
Looking at your log, in the mechanical problems graph, it shows that just a few instants before your crash, the pich does not follow anymore the desired pitch. Also at the same time, the throttle maxes out at 100% and your battery goes down to 14,5Volts. If you fly with a 4S battery, that means a cell at 3,62Volts which means a depleted battery.
So two possibilities or both at the same time:
-you either had a mechnical failure (motor, esc, prop not tight, etc) that explains the pitch not following the desired pitch
-you either had an empty battery: the copter tried to stabilize but even pushing the throttle at 100%, there was not enough power left to stabilize the ship.
I do not see a compass issue in your log. The small yaw variations you see are due to magnetic influences of the environment. It could even be some metal screws you are using next to your compass that got magnetized =>use plastic or brass screws.
I do not see a vibrations issues in your log.
So in my opinion, check that all motors are well atttached, that props are well fixed to the motor shaft, that the arms are well fixed. Also do not fly as long as it empties the batteries you're using.
Thanks for reply Hugues.
I do not think it is a battery issue.
Today on a twin copter with the only differences in Esc, power supply Ubecs an dcurrent sensor I mounted the GPS and compass of yesterday crash and was able to achieve a 29.30 minutes Loiter without problems.
Today when the battery was at 14,5 volts , it flew 10 minutes more until failsafe battery @13,7 volts.
I mount two 6900mAh 4S new high quality batteries.
About the pitch and desired pitch I did notice it but the copter reamins always with a stable attitude , it just yaw for around 180° and went down on his vertical position , Mission Planner do not report crash event.
What I noticed upon your suggestions is that the Desired Altitude change when I was in Loiter mode , and the copter followed that desire , but who gave this command ? Not me for shure .
Another strange thing is that when the copter received a full throttle command , as I wrote before ,Pixhawk put two motors at full output but cut smoothly the other 4 motors , this really does make any sense to me.
All mechanical stuff was ok yesterday .
My doubt is about the Esc now.
A closer look to Log show that at minute 9 and 19 just before the crash or saying a descent to ground without any control would be more correct while there was no commands from the radio since I was in Loiter mode, Des Yaw and Des Alt change.
I was able to replicate the YAW problem in another flight
For the Des Yaw that change I found an explanation here , weak Yaw Pids (default in my case) bring to the problem.
Finally a Yaw autotune solve the Yaw problem , Rate "I" value was 20 time more than default value while main "P" went from 4.5 to 5.6.
In my opinion a system where something (EKF) decide what is better and take away control from the human is something EXTREMELY dangerous.
I suggest to developers at least to put some flags in the logs to clearly state to the human when EKF decide to change Altitude, Yaw or any other flight parameter , it was not easy to find out what happened in this case, not at all .
I am not aware that EKF in Ardupilot takes control away from the user. What makes you definitively conclude that (your loss of control might be caused by something else you did not identify yet) ?
Hugues , there were two events :
- Change in DesYaw and DesAlt without any input from the radio
- Lost of control, the copter do not respond to radio sticks
The autonomous and unwanted DesYaw event has been repeated and It has been proofed that it depends from weak YAW pids .
The software, EKF, call it as you want , decided that the YAW need to change , a developer confirmed that issue.
After 3.2 EKF is the Big Brother that control , evaluate and predict the attitude of your copter .
From documentation " ..when the EKF’s compass and velocity “variance” are higher than 0.8...If flying in a mode that requires GPS (Loiter, PosHold, RTL, Guided, Auto) the vehicle will switch to “pilot controlled” LAND. Meaning the pilot will have control of the roll and pitch angle but the vehicle will descend, land and finally disarm it’s motors."
A part the lost of control it is quite similar of what happened to me.
Let say there is some bug around ?
I have no explanation for non responding anymore to commands , but for sure it was not a hardware problem so it is a software issue. It seems to me logical .
A fact is that something (call it EKF or anyway else you prefer) changed Des Yaw and Des Alt while I was in Loiter with a poor Yaw stabilization , and copter act accordingly , without respondig anymore to radio sticks.
I reproduce again the YAW problem, while in ALT HOLD and again there is a Des Yaw that the software (EKF ? ) gave while my Yaw stick did not move, that is a fact also.
After proper YAW Pid settings , the problem disappear , and the copter did 32 minutes of continuous flight in Loiter twice without any issue , so it was only a software problem where weak YAW Pids (the default Pids) cause the problem of arbitary YAW rotations, for the lost of control I do not know , pehaps the software flag that allows sticks control in non GPS modes ?
My guess is that if the YAW problem happens in the same moment when there was a GPS glitch , then you'll go down without any control . As I wrote at the beginning of my post , it happened another time and I crashed in a tree .