Altitude hold problems in 3.1?

I am having a terrible time with the Alititude Hold function with firmware 3.1.

The Altitude hold worked very well close to the gound (about 1m) in the 2.x firmware. My sonar, APM telemetry and ESCs are all the same. My motors were upgraded from D2830 to D2836s

I have tried with the defaults shown in the APM 3.0 Preparedness page but the copter drifts down for about 3 seconds (about 0.5m/s) and then pulls up to about 3 m higher than the desired level and after about 5 seconds it drops down. I have tried many different changes to the PID parameters but something is definitely now working well. I noticed that the ranges for the PID values have changed considerably between and 3.0. I looks to me like there is a problem with the ranges, or with the control loop.

I have a APM 1.0 on quad with

  • Turnigy D2863 motors
  • 10x4.5 props
  • jDrones ESCs
  • APM 1.0 with 3.1 frimware
  • Maxbotics LV- sonar (with shielded cable and voltage smoothing capacitor as suggested)
  • Xbee telemetry
  • Mission Planner 1.2.82 build 5033

I have taken great care to get the sonar working well and the readings are all over asphalt surfaces. The graphs below show clean and accurate altitude readings.
I have noticed the that the Sonar Gain is defaulted to 2 but when I make a change it gives a range of 0.05 to 0.5. Not sure what a suggested value here is (I have used 0.03 through to 0.5)

I have attached a chart of the baro and sonar. The readings correspond very well. The chart shows numerous short flights as I tried changing the parameters.

Could anybody confirm that they have Altitude hold working in 3.1 with Sonar? If so, can you please send me the values for your parameters as a starting point?

Thanks so much

Hi there,

You seem to be having the same problem as a few of us with the alt_hold not working as good as in the previous firmware releases. Have a look here: … -hold-with

I also have a APM1 board on my quad and for now it seems that we’ll have to be happy with flying without the sonar…


I read in the release that the sonar gain must be set around 0.8.
I should try a fly with the sonar disabled just to check :wink:

I tried tuning the sonar gain from 0 all the way up to 2 but it made no difference. I will be flying with the sonar disabled for now. My plans are to tune thr_accel_p using ch6 and then once the quad is holding alt nicely I will attemp autotune… :slight_smile: