Loiter drift - mag is ok..have I missed anything?

My alt hold and stab are solid but as soon as I go to loiter it begins to drift in one direction, Land does the same.

I have 10 sats and 1.8 hdop. I have run the compass/motor calibration and get about 2% interference. Auto analysis on the dataflash log is always interference less than 10. X and Y vibrations are-2~+2, z is -8~-12. Compass heading is correct.

Running simonk on 30 amp ESCs and they seem to really work great. I have been able to tune this thing so it flys fast and tight.

I have a new gps/compass on the way just in case but I have no idea what the problem may be.

Any ideas?

Thanks

Are you using any trim on your radio? Is rc calibrated?

sent from my phone so apologies for any typos

Trimmed it in the beginning and did autotrim. Flys nice and flat in stab or alt hold.

Does that mean you unset the trims after auto trimming as you are supposed to?

+1 Same issue I experienced. Description here:
diydrones.com/group/arducopterus … e=activity

Sorry for the mis info on trim. I trimmed it then did a savetrim and reset Tx back to 0. I did this in the beginning when first flying in stab mode. I tuned it on a pvc frame i set up in garage. Strung it up and went thru the tuning process.

When I ran the compass/motor check the interference barley reached 2. My GPS/compass is on a mast at least 20 cm from the nearest source of interference.

The gps/compass has taken a beating in its lifetime lol. I wonder if the last crash was the final straw?

Turned out my Tx calibration had gotten FUBARed by me at some point during the tuning process. Went back and set Tx trims to 000, recalibrated radio with MP, flew in stabilize mode and trimmed quad until level and then did a save trim. Reset Tx trims back to zero and then loiter was solid.

Cool, glad you sorted it. It did seem like a trim issue.

sent from my phone so apologies for any typos

How did you trim quad? I must do for myself.

This is for folks who end up here searching solutions for the same problem.

If you’ve tried all the main recommendations for getting stable loiter, such as magnetometer/compass/RC calibration, GPS signal strength/lock, stick trim, compassMOT etc. there’s one more possibility to add to the list which has had me chasing shadows for months.

My quad would slide backwards or sideways when put into loiter or Pos Hold. After tearing my hair out trying all the usual recommendations over and over, I finally got it sorted: my joysticks were not centering properly when released.

RC controller joysticks typically send a pwm signal from around 1000 (minimum) to ~2000 (highest) with the mid point at ~1500. The RC calibration function in APM Planner / Mission Planner measures these values for each of your sticks and sets the autopilot accordingly. However, it assumes that the sticks return to (nearly) exactly the same position / signal when released. Mine didn’t. Visually, you couldn’t tell, but the electronic signal was just too far off centre.

APM has a set of parameters RC1_DZ, RC2_DZ … which set a “dead zone” in the centre position, so that small errors in re-centering the sticks don’t get seen as pilot stick input. The default is 30, so if your stick centres on 1500, the flight controller needs an RC signal <1470 or >1530 before it responds to the stick.

(Note: this is not the same as adjusting trim on the RC transmitter. Adjusting trim works if the stick returns to the same value each time, but that value is not half way between min and max. My problem was that the stick returns to a random value close to the mid point, but not close enough.)

My pitch and yaw stick had a centering error of around ~60 - when released it would return to a random value between ~1440 and ~1560. So when I released the stick, the flight controller often thought I still had a small amount of stick applied, and was (correctly) flying in that direction. My problem was solved by increasing the appropriate RCx_DZ value to 100.

Symptoms:
Drone drifts slowly in a straight line when in loiter/pos hold and sticks released despite good setup and HDOP.
You might have a cheap RC transmitter.

Diagnosis:

  1. Connect your drone and to APM Planner/mission planner and turn on the RC transmitter.
  2. Open RC calibration in the initial setup tab.
  3. Perform RC calibration. Note the centre values it returns for each stick (e.g. min 1008, max 2000, centre 1498 - 1498 is the value you want).
  4. In the RC calibration screen (without hitting calibrate), watch the RC displays. For the direction your quad drifts, flick the stick fully up (or down/left/right), and release it. See what value it returns to. Do it a few times to see the spread of results. If the stick ever fails to re-centre to within 30 of the centre value from calibration (eg. <1468 or >1528 in the example), there’s your problem.

Cure:

  1. Brute force method: note the RC channel affected by the sticky stick. Go into Full Parameters, find the RCx_DZ value (where x is the RC channel affected) and increase to a value circa 20 or so bigger than the biggest difference between calibrated centre value and the actual stick centred values. This will make your quad a little less responsive to stick. I wouldn’t set a DZ value to much over 100 - that would indicate you have a busted RC joystick.
  2. Open your RC transmitter, and give the offending joystick a check. You might have gunk in the works, or might be able to tighten the return spring to centre harder. Give the potentiometer a blow out (you can also use WD40, but that can sometimes attract dust later).
  3. Replace the joystick in your RC unit.

Hope this helps someone.

1 Like