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 2.xxx 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