Wierd control when switching to AltHold - Yaw linked to Pitch?

Hi ! First post here !


I’ve built a single-copter and I managed to manually tune it in stabilize mode. It’s very stable and safe in stabilize mode, no problem here.

BUT, when switching to AltHold the controls are off. This led to a first (very bad) crash, a few seconds after AltHold, I pitched-rolled a bit and the copter began a spiral fall. The yaw (that I had not touched) seemed crazy and the copter unable to stabilize because of it.

After a week of rebuilding and further testing today, I re-enabled AltHold after many succesful Stabilize flights. After a few seconds in AltHold, I Pitch and Roll to correct for the drifting, but then, the copter ALSO changed its yaw by 150°. This time no crash (maybe because I tuned down the Roll/Pitch PID after the first crash), after noticing the unwanted Yaw/Roll behavior I let it drift, not touching Roll/Pitch stick, while praying that it will avoid the trees before landing.

Log Analysis

I analysed the logs (the first, from the crash was pretty useless : too short) but couldn’t find anything :

  • The change in yaw was well detected by ardupilot : not a compass/gyro error. Though I’ve no video to verify the rotation because the copter is outside the frame.
  • CH4 (Yaw) was on the neutral position the whole time : not a radio problem
  • Altitude control seems fine and follows my (few) inputs : not an Altitude controll algorithm problem.
  • The throttle (C.OUT5) was stable : the yaw is not due to the single propeller gaining momentum
  • The 150° roll occured during an input on CH1 (Pitch) : Pitch linked to Yaw ?
  • An input was made on CH2 (Roll) just before, but that doesn’t seem to have impacted the Yaw : Maybe not the Roll linked to Yaw
  • After the Yaw change, the copter didn’t rotate a second time because I (tried to) not input anything other than CH3 (Throttle) : not an Altitude controll algorithm problem.

I Don’t Know what’s happening

I though that maybe the copter wants to face a waypoint (home) when changing flight mod, so it rotates a few second after I pull the switch for AltHold, and I could have controled it by inputing Roll/Pitch. But this seems very unlikely.

I simply can’t pinpoint where this is comming from and I don’t want to risk another crash without changing anything.

Last log : Should I send a log with my GPS data in it ? (yes, I’m new here)
First crash log : idem

You will have to post a link to the log file for help. Mission Planner has a Log Anonomizer function if you are worried about that. Use latest Beta version and from the Cntrl>F menu.

Ok thanks,

Here they are :

Last log : pitch-yaw-anon.log (867.2 KB)
1st Crash : crash-anon.log (357.2 KB)

OK I get it !

First is has nothing to do with AltHold, I recreated the problem in Stabilize.

It’s because one of the flap servo (OUT3) saturates. Therefore the copter can’t compensate for the Yaw potentialy leading to a death spiral if the pitch/roll control also needs this servo.

Now, I don’t understand why it is ALWAYS servo 3 that reach its limit. Servo 3 is much lower than any other throughout the flight and that’s why it saturates.

It happens more easly in AltHold because I fly higher and play more with the throttle. When reducing the throttle obviously the flaps have less lift and should compensate more, saturating servo 3.

The problem now is that I don’t know how to correct this issue. I don’t know if I can increase the max angle of my flaps, because, if the angle is too high I will lose lift. But this will be the easiest solution.
I could change the design of the flaps, now they are symetric, but I could change the curvature because one face is always used more than the other (like a plane) to compensate the torque.
I could do longer flaps to have more lift and to not reach saturation. But I don’t like this because the flaps already do not move a lot and I could reach some problem with the resolution of the servos (it’s totally doable though).

This is the max angle of servo3’s flaps :

This is the shape of the flaps :

for scale they are here on the (slightly broken) copter, and are a bit more than 15cm long :

If you have any other idea on how to help this poor servo 3, I will gladly take it.

(this may not be a copter 4.0 firmware issue anymore)