I wanted to start a conversation around the roll and pitch of Arducopter drifting as you fly.
The reason is I just assembled new hardware and problems that weren't there before have now shown up in a bad way. Flying indoors in a 5ft space I was able to get up to 30° error in roll and around 10-15° in pitch. I was able to control it and it flew perfectly level the whole time, I just had to hold the stick into the corner of the radio. Lading and waiting corrects the issue.
What could cause this. I had been flying an older version of the IMU this whole time. This version has an analogue filter for the gyros where the new hardware has it as an option. You must solder the pads around the gyros to enable them. I was also flying with two slightly tweaked motors giving off a lot of vibration. This could affect the accels.
My question is: If you have a problem like this, what is the vibration level on your copter, and do you have the filter pads soldered?
And notice I didn't say "loss of control" or "it didn't fly stable". I had control, and it flew perfectly. It just lost it's reference to the ground and I had to compensate with the stick. Had it been worse than 45° I would have lost control.
There are three pairs of pads, each with a white outline. (look for GYRO-XY near the relay).
Jani Solders his to enable the filter. I have never flown this board until now. I will solder them to test the filters this week.
Replies are closed for this discussion.
I repaired the crash damage and reassembled my arducopter. I changed nothing except I soldered the three gyro pads per the posts above. I balanced a couple of new props, got the motors aligned and (I thought) leveled nicely, re-loaded new code (2.0.23 still) went through the setup using the new APM and even recalibrated the ESC's - just like a new build, following all of the wiki all the way through. Set modes to stab, alt hold and loiter.
It rained yesterday, but this evening was perfect, overcast 65°, 0 to 2 knots wind, steady no gusts. I took off and it was immediately stable in hover at 2m altitude. I punched ch7 and it did not do its normal wobble dance, but it was still stable. Stick centering OK, no drift yet. Lowered to about 1m and engaged alt hold (sonar EZ0) and it held alt just fine. I let it hover for a bit, holding position manually and it was fine, no stick drift yet. I hovered in a small area, maybe 3m for about 3 minutes, still no stick drift, just some stick needed to counterract the light wind. Then I flew it around, not agressively, perhaps 15 to 20° roll and pitch, it held alitude within about half a meter, but did not lose sonar lock. I brought it back to hover with no noticeable stick drift, just that required to counteract the wind.
I landed, waited 15 seconds, took off and no stick drift. Engaged alt hold, no problem, after about 1 minute, I selected loiter and to my surprise it held position - it's never held position in loiter before, but it is now. It held at about 1.5m alt and within a 1 to 2m radius. The wind would push it a bit, but it corrected pretty well.
I let it hover in loiter for about three minutes, selected stab mode and no apparent stick drift. I landed to change batteries.
With a fresh battery and gps lock, I took off, stab mode, punched ch7 in a stable hover and selected alt hold. Hovered for about thirty seconds and then flew agressively up and down the field. Returned to hover still in sonar alt hold and no stick drift. I flew down the field again and let it climb up out of sonar range without correcting it, it lost sonar lock and continued to climb with no response from the baro hold. It climbed slower than it had before when it lost sonar lock, but I finally selected stab mode and brought it back down, so the transition from sonar to baro is not working (is that what it is designed to do? recover back down to 1.5m?)
Back to loiter and it was so stable now that I could remove my iPhone and take a video which I shall attach.
I used the pitch to move the copter about 30m away from gps hold position (still in loiter) and it immediately returned to its hold position, but with significant x-track error - it overshot by a few meters, then tried to recover, overshot again and finally just oscillated back and forth laterally, overshooting its hold position because it doesn't respond fast enough to center itself. I suspect that can be cured with PID settings, but I don't know what to tweak in the PIDS, still reading abut that and pretty clueless right now. Any ideas on what PIDS to tweak to fix loiter overshoot would be greatly appreciated.
I did that a couple of times, displaced the copter laterally a dozen or so meters while in loiter and it returned as it should but always overshot the hold position laterally and had difficulty settling down to a stable hover in the hold position. I could help it correct with the stick and it would hold fine with no further inputs from me. That is, as it was overshooting during its attempts to get to hold position, I could see it was going to overshoot and input a quick correction before it realized it was past the mark. It appreciated my help and responded by holding position just fine.
Results of this test are:
1) Soldering the gyro pads was the only config change I made and that was a significant improvement in stick drift for me. I flew three batteries, about 20 minutes total (I won't run them low again!!) and had no stick drift at all.
2) Loiter mode now works, but I do not know why. I know nothing is different in the configuration and I've reloaded code and re-setup the configuration numerous times with this copter in the past two weeks, so it's not something I did correctly by accident this time. It just started working.
3) Even after careful reassembly and leveling, one motor is slight off kilter in yaw - I can see it when I sight along the props while it's hovering nicely in loiter mode, and I believe it's very important for all of the motors to be properly aligned and balanced, if they're not, I think (my opinion) the quad has to work harder than normal.
4) Baro hold does not appear to be working since I installed the sonar. Before I installed the sonar, baro hold worked fine. Now when it loses sonar lock it just climbs up, when I engage alt hold above 4m, it just slowly climbs away, vertical speed depending on throttle setting.
I can load up a log if anyone is interested.
Yes I would appreciate your logs. The CTUN is the one I'm after. Thanks!
the discussion and the the amount of responses is a big surprise to me.
i thought i was the only one having the problem ...
in 0.23 yaw causes low frequency oscilations.
will test with the pirates trunk - that code base is rock stable.
Well now I am confused...
I tried to reproduce the drift issue tonight with aggressive flying and could not do it!! the quad with the current 2.0.23 firmware just worked really well. I still have yaw sloppiness but the level was maintained fairly well with very minimal drift and I did not get into the situation where in I had to maintain a correcting stick position to keep the quad level.
the differences from before is I have enabled the " trim_accel();" and used it indoors to get a nice level and also I updated firmware from 20. to 23.
when fooling around with on the fly trimming though I could see that if you didn't know it was activated and you were holding the quad "level" against the wind that you would reset level to a new angle tilted toward wind and if you let go of the stick it would potentially cause a similar behaviour???
Is it possible that in an earlier firmware the trim accel() was inadvertently active???
I'll keep trying to reproduce this again with some wind
I experienced the same drift flying AC2 for the first time a couple of weeks ago in a moderate wind. The drift was in the same direction as the wind. It required nearly full stick movement to return the quad, when it was back over the launch site i centred the stick and instantly the quad flipped!
The airframe has both rubber and foam vibration damping with balanced props and new smooth motors. I am still using a first generation APM Shield.